Browse Source

打印机页面修改

liujiankang 7 years ago
parent
commit
a7a5bdc574

+ 27 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsMachine.java

@@ -43,6 +43,9 @@ public class PtsMachine implements Serializable{
 
     private Integer machineSalesCompanyId; //销售公司主键
     private String machineSalesCompanyName; //销售公司名称
+    private String produceName; //产品名称
+    private String producePattern; //产品型号首两位
+    private String produceModel; //产品型号后两位
 
     public Integer getMachineId() {
         return machineId;
@@ -251,4 +254,28 @@ public class PtsMachine implements Serializable{
     public void setMachineSalesCompanyName(String machineSalesCompanyName) {
         this.machineSalesCompanyName = machineSalesCompanyName;
     }
+
+    public String getProduceName() {
+        return produceName;
+    }
+
+    public void setProduceName(String produceName) {
+        this.produceName = produceName;
+    }
+
+    public String getProducePattern() {
+        return producePattern;
+    }
+
+    public void setProducePattern(String producePattern) {
+        this.producePattern = producePattern;
+    }
+
+    public String getProduceModel() {
+        return produceModel;
+    }
+
+    public void setProduceModel(String produceModel) {
+        this.produceModel = produceModel;
+    }
 }

+ 5 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineMapper.xml

@@ -98,10 +98,14 @@
             t.machine_produce_id machineProduceId,
             t.machine_is_retreading machineIsRetreading,
             trpb.bom_version AS machineHardwareVersionName,
-            trpmv.machine_version_no AS machineSoftwareVersionName
+            trpmv.machine_version_no AS machineSoftwareVersionName,
+            pi.produce_name AS produceName,
+            pi.produce_pattern AS producePattern,
+            pi.produce_model AS produceModel
         FROM  tb_rst_pts_machine t
         LEFT JOIN tb_rst_pts_bom trpb ON t.machine_bom_id = trpb.bom_id
         LEFT JOIN tb_rst_pts_machine_version trpmv ON t.machine_software_version = trpmv.machine_version_id
+        LEFT JOIN tb_rst_pts_produce pi ON t.machine_produce_id = pi.produce_id
         <where>
             <if test="machineBarcode != null and machineBarcode != ''">
                 machine_barcode = #{machineBarcode}

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

@@ -86,6 +86,7 @@
                     <th width="40">硬件版本</th>
                     <th width="40">软件版本</th>
                     <th width="40">是否是翻新机</th>
+                    <th width="70">产品名/型号</th>
 					<th width="150">操作</th>
 				</tr>
 				</thead>
@@ -131,6 +132,9 @@
                                 </#if>
                             </td>
+                            <td class="text-c" width="100">
+                                ${list.produceName }-${list.producePattern }-${list.produceModel }
+                            </td>
 							<!-- 遍历操作 -->
 							<td class="td-manage text-c">
                                 <a onclick="machineLogs(${list.machineId});" title="生产流程" href="javascript:;"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe667;</i></a>
@@ -139,7 +143,7 @@
 						</tr>
 					</#list>
                 <#else>
-                <tr><td colspan="10" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
+                <tr><td colspan="11" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
                 </#if>
 				</tbody>
 			</table>
@@ -185,7 +189,7 @@
                     var barcodes = $("#bcTarget").html();
                     /*$("#barcodeId").html(machineBarcode);
                     $("#qrcodeImg").attr('src',machineQrcode);*/
-                    if(produceType == 1){//净水机模板
+                    /*if(produceType == 1){//净水机模板*/
                         $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                 '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
                                 '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
@@ -195,8 +199,8 @@
                                 '<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;">NO.'+ machineNo +'</span>' +
                                 '</div>');
-                    }
-                    if(produceType == '' || produceType == null){
+                    /*}*/
+                    /*if(produceType == '' || produceType == null){
                         $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                 '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
                                 '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
@@ -217,7 +221,7 @@
                                 '<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;">NO.'+ machineNo +'</span>' +
                                 '</div>');
-                    }
+                    }*/
 
                 }
                 $("#printlist").printArea();

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

@@ -47,7 +47,7 @@
                         <th width="1"><input name='checkbox' type='checkbox' value='' id="all" ></th>
                         <th width="25">设备尾号</th>
                         <th width="40">产品条码</th>
-                        <th width="25">所属产品</th>
+                        <th width="25">产品名/型号</th>
                         <th width="10">生产时间</th>
                         <th width="20">操作</th>
                     </tr>
@@ -68,12 +68,7 @@
                                 <td class="text-c" style="font-size: 24px" width="10">${list.machineBarcode?substring(list.machineBarcode?length-4) }</td>
                                 <td class="text-c" width="10">${list.machineBarcode }</td>
                                 <td class="text-c" width="6">
-                                    <#if list.machineProduceType == 1>
-                                        净水机
-                                    </#if>
-                                    <#if list.machineProduceType == 2>
-                                        冲奶机
-                                    </#if>
+                                ${list.produceName }-${list.producePattern }-${list.produceModel }
                                 </td>
                                 <td>${(list.machineCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                                 <!-- 遍历操作 -->
@@ -86,7 +81,7 @@
                             </tr>
                         </#list>
                         <#else>
-                        <tr><td colspan="5" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
+                        <tr><td colspan="6" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
                         </#if>
                     </tbody>
                 </table>
@@ -176,7 +171,7 @@
                         var barcodes = $("#bcTarget").html();
                         /*$("#barcodeId").html(machineBarcode);
                         $("#qrcodeImg").attr('src',machineQrcode);*/
-                        if (machineProduceType == 1) {//净水机模板
+                       /* if (machineProduceType == 1) {//净水机模板*/
                             $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                     '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
                                     '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
@@ -186,8 +181,8 @@
                                     '<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;">'+ machineNo +'</span>' +
                                     '</div>');
-                        }
-                        if (machineProduceType == 2) {//冲奶机模板
+                        /*}*/
+                        /*if (machineProduceType == 2) {//冲奶机模板
                             $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                     '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
                                     '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
@@ -197,7 +192,7 @@
                                     '<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;">'+ machineNo +'</span>' +
                                     '</div>');
-                        }
+                        }*/
                         if(${machineIsPrint} == '1')
                         {
                             updatePrint(machineBarcode,false);
@@ -346,20 +341,8 @@
                 for (var i=0;i<settingNumber;i++){
                     code128(machineBarcode);
                     var barcodes = $("#bcTarget").html();
-                    /*$("#barcodeId").html(machineBarcode);
-                    $("#qrcodeImg").attr('src',machineQrcode);*/
-
-                    /*$("#printlist").append('<div style="width: 268px;height: 152px;position: relative;">' +
-                            '<span style="position: absolute;top:0px;font-size: 14px;">WaterO可移动智能净水机</span>' +
-                            '<span style="position: absolute;top: 24px;font-size: 12px;">型号:WA-1X</span>' +
-                            '<span style="position: absolute;top: 40px;font-size: 12px;">S/N</span>' +
-                            '<div style="position: absolute;left: -10px;top: 75px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
-                            '<span style="position: absolute;top: 102px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
-                            '<img style="position: absolute;right: 2px;top:18px;width: 86px;height: 86px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
-                            '<span style="position: absolute;right: 9px;top: 102px;font-size: 12px;">'+ machineNo +'</span> ' +
-                            '</div>');*/
-
-                    if(machineProduceType == 1){//净水机模板
+
+                    /*if(machineProduceType == 1){//净水机模板*/
                         $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                 '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
                                 '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
@@ -369,8 +352,8 @@
                                 '<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;">'+ machineNo +'</span>' +
                                 '</div>');
-                    }
-                    if(machineProduceType == 2){//冲奶机模板
+                    /*}*/
+                    /*if(machineProduceType == 2){//冲奶机模板
                         $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                 '<span style="position: absolute;left: 10px;font-size: 14px;">'+produceName+'</span>' +
                                 '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">型号:'+producePattern+'-'+produceModel+'</span>' +
@@ -380,7 +363,7 @@
                                 '<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;">'+ machineNo +'</span>' +
                                 '</div>');
-                    }
+                    }*/
 
                 }
                  if(settingNumber > 24){