|
@@ -192,57 +192,59 @@
|
|
var berGenerateRules = produce.berGenerateRules; //1 序列化生成(原有生成规则)、2 随机生成 3 博乐宝生成规则
|
|
var berGenerateRules = produce.berGenerateRules; //1 序列化生成(原有生成规则)、2 随机生成 3 博乐宝生成规则
|
|
produceCreateTime = formatDate(new Date());
|
|
produceCreateTime = formatDate(new Date());
|
|
var machineNo = "NO." + $("#"+machineBarcode+"Id").val();
|
|
var machineNo = "NO." + $("#"+machineBarcode+"Id").val();
|
|
- for (var i = 0; i < settingNumber; i++) {
|
|
|
|
- code1282(machineBarcode);
|
|
|
|
- var barcodes = $("#bcTarget").html();
|
|
|
|
- /*$("#barcodeId").html(machineBarcode);
|
|
|
|
- $("#qrcodeImg").attr('src',machineQrcode);*/
|
|
|
|
- if (isPrintQrcode == 2) {
|
|
|
|
- if(berGenerateRules === 3){
|
|
|
|
- code128(machineBarcode);
|
|
|
|
- var barcodes2 = $("#bcTarget").html();
|
|
|
|
- $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
|
|
- '<span style="padding-left: 10px;">反渗透净水机</span>' +
|
|
|
|
- '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
|
|
- '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
|
|
- '<div style="position: absolute;padding-top: 25px;" id="bcTarget2" class="barcodeImg">'+barcodes2+'</div>' +
|
|
|
|
- /*'<span style="position: absolute;padding-top: 100px;padding-left: -100px;" id="barcodeId">'+machineBarcode+'</span>' +*/
|
|
|
|
- '</div>');
|
|
|
|
- // $("#printlist").append();
|
|
|
|
- }else{
|
|
|
|
- $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
|
|
- '<span style="position: absolute;left: 10px;font-size: 14px;">反渗透净水机</span>' +
|
|
|
|
- '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
|
|
- '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
|
|
- '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
|
|
|
|
- '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
|
|
|
|
- '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px; display: none;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
|
|
|
|
- '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ produceCreateTime +'</span>' +
|
|
|
|
- '</div>');
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- if(isGeneralQrcode == 1 || berGenerateRules == 2){
|
|
|
|
- $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
|
|
- '<span style="position: absolute;left: 10px;font-size: 14px;"></span>' +
|
|
|
|
- '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
|
|
- '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
|
|
- '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
|
|
|
|
- '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
|
|
|
|
- '<img style="position: absolute;right: 5px;top:23px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
|
|
|
|
- '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;display: none;">'+ produceCreateTime +'</span>' +
|
|
|
|
- '</div>');
|
|
|
|
- }else{
|
|
|
|
|
|
+ if(isEmpty(machineId)){
|
|
|
|
+ for (var i = 0; i < settingNumber; i++) {
|
|
|
|
+ code1282(machineBarcode);
|
|
|
|
+ var barcodes = $("#bcTarget").html();
|
|
|
|
+ /*$("#barcodeId").html(machineBarcode);
|
|
|
|
+ $("#qrcodeImg").attr('src',machineQrcode);*/
|
|
|
|
+ if (isPrintQrcode == 2) {
|
|
|
|
+ if(berGenerateRules === 3){
|
|
|
|
+ code128(machineBarcode);
|
|
|
|
+ var barcodes2 = $("#bcTarget").html();
|
|
|
|
+ $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
|
|
+ '<span style="padding-left: 10px;">反渗透净水机</span>' +
|
|
|
|
+ '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
|
|
+ '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
|
|
+ '<div style="position: absolute;padding-top: 25px;" id="bcTarget2" class="barcodeImg">'+barcodes2+'</div>' +
|
|
|
|
+ /*'<span style="position: absolute;padding-top: 100px;padding-left: -100px;" id="barcodeId">'+machineBarcode+'</span>' +*/
|
|
|
|
+ '</div>');
|
|
|
|
+ // $("#printlist").append();
|
|
|
|
+ }else{
|
|
$("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
$("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
'<span style="position: absolute;left: 10px;font-size: 14px;">反渗透净水机</span>' +
|
|
'<span style="position: absolute;left: 10px;font-size: 14px;">反渗透净水机</span>' +
|
|
'<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
'<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
'<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
'<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
'<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
|
|
'<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
|
|
'<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
|
|
'<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
|
|
- '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
|
|
|
|
|
|
+ '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px; display: none;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
|
|
'<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ produceCreateTime +'</span>' +
|
|
'<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ produceCreateTime +'</span>' +
|
|
'</div>');
|
|
'</div>');
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(isGeneralQrcode == 1 || berGenerateRules == 2){
|
|
|
|
+ $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
|
|
+ '<span style="position: absolute;left: 10px;font-size: 14px;"></span>' +
|
|
|
|
+ '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
|
|
+ '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
|
|
+ '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
|
|
|
|
+ '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
|
|
|
|
+ '<img style="position: absolute;right: 5px;top:23px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
|
|
|
|
+ '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;display: none;">'+ produceCreateTime +'</span>' +
|
|
|
|
+ '</div>');
|
|
|
|
+ }else{
|
|
|
|
+ $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
|
|
|
|
+ '<span style="position: absolute;left: 10px;font-size: 14px;">反渗透净水机</span>' +
|
|
|
|
+ '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
|
|
|
|
+ '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
|
|
|
|
+ '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
|
|
|
|
+ '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
|
|
|
|
+ '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
|
|
|
|
+ '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;">'+ produceCreateTime +'</span>' +
|
|
|
|
+ '</div>');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(${machineIsPrint} == '1')
|
|
if(${machineIsPrint} == '1')
|
|
{
|
|
{
|
|
updatePrint(machineBarcode,false);
|
|
updatePrint(machineBarcode,false);
|