Browse Source

打印机页面修改

liujiankang 7 years ago
parent
commit
f0cad5ab65

+ 2 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_List.ftl

@@ -180,7 +180,6 @@
                 var producePattern =  produce.producePattern;    //获取产品型号前两位
                 var produceModel =  produce.produceModel;        //获取产品型号后两位
                 var produceName = produce.produceName;           //获取产品名称
-                
 
                 var settingNumber = $("#settingNumber").val();
                 var machineNo = 1000000 + parseInt(machineId);
@@ -371,6 +370,7 @@
                 produce.producePattern = "";
                 produce.produceModel = "";
                 produce.produceFeature = "";
+                produce.produceName = "";
                 $.ajax({
                     type: "POST",
                     url: "${path}/admin/machine/_getProduce_print",
@@ -381,6 +381,7 @@
                             produce.producePattern = data.producePattern;
                             produce.produceModel = data.produceModel;
                             produce.produceFeature = data.produceFeature;
+                            produce.produceName = data.produceName;
                         }
                     },
                     error: function(){

+ 7 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

@@ -45,7 +45,7 @@
                     <thead>
                     <tr class="text-c">
                         <th width="1"><input name='checkbox' type='checkbox' value='' id="all" ></th>
-                        <th width="25">设备尾号</th>
+                        <th width="40">设备尾号</th>
                         <th width="40">产品条码</th>
                         <th width="70">产品名/型号</th>
                         <th width="10">生产时间</th>
@@ -266,14 +266,16 @@
                                     var private = value.machineBarcode.substr(value.machineBarcode.length-4);
                                     var machineCreateTime = formatDate(value.machineCreateTime,"yyyy-MM-dd HH:mm:ss");
                                     $("#listid").prepend('<tr class="text-c"><td width="2"> ' +
-                                            '<input name="checkbox" type="checkbox" value="'+value.machineBarcode+value.machineQrcode+value.machineProduceType+'"  machineId="'+value.machineId+'"> ' +
+                                            '<input name="checkbox" type="checkbox" value="'+value.machineBarcode+'"  machineId="'+value.machineId+'"> ' +
                                             '<input type="hidden" value="'+value.machineId + 1000000 +'" id="'+value.machineBarcode + 'Id'+'"></td>' +
+                                            '<input type="hidden" value="'+value.machineQrcode+'" id="'+'machineQrcode'+value.machineId+'">' +
+                                            '<input type="hidden" value="'+value.machineProduceType+'" id="'+'machineProduceType'+value.machineId+'">' +
                                             '<td class="text-c" style="font-size: 24px" width="10">'+private+'</td>' +
                                             '<td class="text-c" width="10">'+value.machineBarcode+'</td>' +
                                             '<td class="text-c" width="10">'+machineName+'</td>' +
                                             '<td>'+machineCreateTime+'</td>' +
                                             '<td class="td-manage text-c"> <a onclick="updatePrint('+value.machineBarcode+',true);" title="修改为已打印" href="javascript:;"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6a7;</i></a>' +
-                                            '<a onclick="barCodePrint('+value.machineBarcode+value.machineQrcode+value.machineProduceType+','+value.machineId+');" title="打印" href="javascript:;"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe652;</i></a> </td></tr>');
+                                            '<a onclick="barCodePrint('+value.machineBarcode+','+value.machineId+');" title="打印" href="javascript:;"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe652;</i></a> </td></tr>');
 
 
                                 });
@@ -335,6 +337,7 @@
 
             //单个打印条形码
              function barCodePrint(barCode,machineId){
+                alert(barCode+"-"+machineId);
                  var  machineBarcode = barCode;
                  var machineQrcode = $("#machineQrcode"+machineId).val();
                  var machineProduceType = $("#machineProduceType"+machineId).val();
@@ -394,6 +397,7 @@
                 produce.producePattern = "";
                 produce.produceModel = "";
                 produce.produceFeature = "";
+                produce.produceName = "";
                 $.ajax({
                     type: "POST",
                     url: "${path}/admin/machine/_getProduce_print",