Преглед на файлове

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

liuzhiwei преди 7 години
родител
ревизия
b3152a2753
променени са 20 файла, в които са добавени 315 реда и са изтрити 121 реда
  1. 33 2
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java
  2. 42 47
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  3. 6 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineMapper.xml
  4. 5 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  5. 5 5
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsBomController.java
  6. 41 16
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl
  7. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl
  8. 42 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  9. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/view_progress.ftl
  10. 41 4
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/add_maintenance.ftl
  11. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/maintenance_list.ftl
  12. 39 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/update_maintenance.ftl
  13. 5 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  14. 4 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/update_sender.ftl
  15. 5 2
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/add_bom.ftl
  16. 1 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/addRenovationMachine.ftl
  17. 12 8
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_List.ftl
  18. 6 6
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_particulars.ftl
  19. 18 11
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl
  20. 7 4
      watero-rst-web/src/main/webapp/common/js/common/common.js

+ 33 - 2
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java

@@ -3,6 +3,7 @@ package com.iamberry.rst.faces.cm;
 import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.core.order.ProductType;
 import com.iamberry.rst.core.page.PagedResult;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 import java.util.Map;
@@ -17,14 +18,14 @@ public interface CustomerService {
      * @param customerInfo
      * @return
      */
-    Integer saveCustomerInfo(CustomerInfo customerInfo,SalesOrder salesOrder) throws Exception;
+    Integer saveCustomerInfo(CustomerInfo customerInfo,SalesOrder salesOrder);
 
     /**
      * 添加订单到efast
      * @param salesOrder
      * @return
      */
-    Map<String,Object> sendEfastOrder(SalesOrder salesOrder)throws Exception;
+    Map<String,Object> sendEfastOrder(SalesOrder salesOrder);
 
     /**
      * 根据id获取客诉信息
@@ -102,4 +103,34 @@ public interface CustomerService {
      * @return
      */
     ProductType getcompanyAffiliation(Integer customerId);
+
+    /*设置产品,配件参数*/
+    void setName(CustomerCommon cc);
+    /**
+     * 将原订单生成退货单
+     * @param customerCommon
+     * @param salesOrder
+     * @return
+     * @throws Exception
+     */
+    void chargebackEfastOrder(CustomerCommon customerCommon, SalesOrder salesOrder,Integer status);
+    /**
+     * 添加仓储
+     * @param customerCommon
+     * @return
+     */
+    void saveComplaintSignclosedInfo(ComplaintSignclosedInfo complaintSignclosedInfo,CustomerCommon customerCommon);
+    /**
+     * 添加品检
+     * @param complaintDetectInfo
+     * @param customerCommon
+     * @return
+     */
+    void saveComplaintDetectInfo(ComplaintDetectInfo complaintDetectInfo,CustomerCommon customerCommon);
+    /**
+     * 向Efast推送订单  仅换新,维修 ,补发
+     * @return
+     */
+    @Transactional
+    Map<String,Object> sendEfastOrder(CustomerCommon customerCommon,SalesOrder salesOrder);
 }

+ 42 - 47
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -74,8 +74,6 @@ public class CustomerServiceImpl implements CustomerService {
     @Autowired
     private EfastOrderService efastOrderService;
 
-
-
     @Override
     public CustomerInfo getCustomerInfo(Integer customerId) {
         return customerInfoMapper.getCustomerInfo(customerId);
@@ -83,13 +81,13 @@ public class CustomerServiceImpl implements CustomerService {
 
     @Override
     @Transactional
-    public Integer saveCustomerInfo(CustomerInfo customerInfo,SalesOrder salesOrder) throws Exception{
+    public Integer saveCustomerInfo(CustomerInfo customerInfo,SalesOrder salesOrder){
 
         //添加客诉基本信息
         Integer flag = 0;
         flag = customerInfoMapper.insert(customerInfo);
         if(flag < 1){
-            throw new Exception("添加客诉失败");
+            throw new RuntimeException("添加客诉失败");
         }
 
         QuestionDescribe questionDescribe = new QuestionDescribe();
@@ -99,7 +97,7 @@ public class CustomerServiceImpl implements CustomerService {
         questionDescribe.setDescribeHandleDesc(customerInfo.getDescribeHandleDesc());   //处理描述
         flag = questionDescribeMapper.insert(questionDescribe);
         if(flag < 1){
-            throw new Exception("添加客诉失败");
+            throw new RuntimeException("添加客诉失败");
         }
 
         if ("2".equals(customerInfo.getCustomerIsVisit())) {
@@ -113,7 +111,7 @@ public class CustomerServiceImpl implements CustomerService {
             visit.setVisitStatus(1);    //回访状态
             flag = visitMapper.addVisitInfo(visit);
             if(flag < 1){
-                throw new Exception("添加客诉失败");
+                throw new RuntimeException("添加客诉失败");
             }
         }
 
@@ -136,7 +134,7 @@ public class CustomerServiceImpl implements CustomerService {
             customerCommon.setRelationBackPostage(0);   //邮费默认为0
 
             /*  初始化产品类型,名称,配件名称 */
-            this.setName(customerCommon);
+            customerService.setName(customerCommon);
 
             ComplaintDetectInfo complaintDetectInfo = new ComplaintDetectInfo();  //品质检测
             ComplaintSignclosedInfo complaintSignclosedInfo = new ComplaintSignclosedInfo(); //客诉-签收表
@@ -145,62 +143,62 @@ public class CustomerServiceImpl implements CustomerService {
             switch (customerInfo.getCustomerIsSolve()) {  //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
                 case 3: //换新
 
-                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,2);    //原订单生成退单
+                    customerService.chargebackEfastOrder(customerCommon,salesOrder,2);    //原订单生成退单
 
-                    map = this.sendEfastOrder(customerCommon,salesOrder);  //换新需要向Efast推送一条换新发货的订单
+                    map = customerService.sendEfastOrder(customerCommon,salesOrder);  //换新需要向Efast推送一条换新发货的订单
                     if(map.get("status") == 1){
                         customerCommon.setRelationBackEfastOrderId(String.valueOf(map.get("EfastOrderId")));  //存放Efast订单编号
                         complaintSignclosedInfo.setNewEfastId(String.valueOf(map.get("EfastOrderId")));     //仓储签收表添加  发货的Efast订单id
                     }else{
-                        throw new Exception("换新创建Efast订单失败");
+                        throw new RuntimeException("换新创建Efast订单失败");
                     }
                     complaintSignclosedInfo.setOldEfastId(salesOrder.getSalesOrderId());    //原有订单的Efast的订单编号
-                    this.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
+                    customerService.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
                     complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储签收id
-                    this.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
+                    customerService.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
                     break;
                 case 4: //维修
 
-                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,2);    //原订单生成退单
+                    customerService.chargebackEfastOrder(customerCommon,salesOrder,2);    //原订单生成退单
 
-                    map = this.sendEfastOrder(customerCommon,salesOrder);  //维修需要向Efast推送一条维修发货的订单
+                    map = customerService.sendEfastOrder(customerCommon,salesOrder);  //维修需要向Efast推送一条维修发货的订单
                     if(map.get("status") == 1){
                         customerCommon.setRelationBackEfastOrderId(String.valueOf(map.get("EfastOrderId")));  //存放Efast订单编号
                         complaintSignclosedInfo.setNewEfastId(String.valueOf(map.get("EfastOrderId")));     //仓储签收表添加  发货的Efast订单id
                     }else{
-                        throw new Exception("维修创建Efast订单失败");
+                        throw new RuntimeException("维修创建Efast订单失败");
                     }
                     complaintSignclosedInfo.setOldEfastId(salesOrder.getSalesOrderId());    //原有订单的Efast的订单编号
-                    this.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
+                    customerService.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
                     complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储签收id
-                    this.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
+                    customerService.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
                     break;
                 case 5: //补发  不用创建仓储签收任务
-                    map = this.sendEfastOrder(customerCommon,salesOrder);  //补发需要向Efast推送一条发货的订单
+                    map = customerService.sendEfastOrder(customerCommon,salesOrder);  //补发需要向Efast推送一条发货的订单
                     if(map.get("status") == 1){
                         customerCommon.setRelationBackEfastOrderId(String.valueOf(map.get("EfastOrderId")));  //存放Efast订单编号
                         complaintSignclosedInfo.setNewEfastId(String.valueOf(map.get("EfastOrderId")));     //仓储签收表添加  发货的Efast订单id
                     }else{
-                        throw new Exception("补发创建Efast订单失败");
+                        throw new RuntimeException("补发创建Efast订单失败");
                     }
                     break;
                 case 6: //退货
 
-                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,3);    //原订单生成退单
+                   customerService.chargebackEfastOrder(customerCommon,salesOrder,3);    //原订单生成退单
 
                     complaintSignclosedInfo.setOldEfastId(salesOrder.getSalesOrderId());    //原有订单的Efast的订单编号
-                    this.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
+                    customerService.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
                     complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储签收id
-                    this.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
+                    customerService.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
                     break;
                 case 7: //无理由退货
 
-                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,3);    //原订单生成退单
+                    customerService.chargebackEfastOrder(customerCommon,salesOrder,3);    //原订单生成退单
 
                     complaintSignclosedInfo.setOldEfastId(salesOrder.getSalesOrderId());    //原有订单的Efast的订单编号
-                    this.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
+                    customerService.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
                     complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储签收id
-                    this.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
+                    customerService.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
                     break;
             }
             customerCommon.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储id
@@ -235,7 +233,7 @@ public class CustomerServiceImpl implements CustomerService {
                     break;
             }
             if (flag < 1) {
-                throw new Exception("添加客诉处理结果失败");
+                throw new RuntimeException("添加客诉处理结果失败");
             }
 
             customerCommon.setRelationId(relationId);
@@ -263,7 +261,7 @@ public class CustomerServiceImpl implements CustomerService {
      * 产品配件初始化
      * @param cc
      */
-    private void setName(CustomerCommon cc){
+    public void setName(CustomerCommon cc){
         for (int i=0;i<cc.getSendProdcues().size();i++) {
             Product product = productMapper.getProduce(cc.getSendProdcues().get(i).getProductId());
             cc.getSendProdcues().get(i).setSendProduceName(product.getProductName());
@@ -299,7 +297,7 @@ public class CustomerServiceImpl implements CustomerService {
      * @return
      */
     @Transactional
-    public void saveComplaintDetectInfo(ComplaintDetectInfo complaintDetectInfo,CustomerCommon customerCommon) throws  Exception{
+    public void saveComplaintDetectInfo(ComplaintDetectInfo complaintDetectInfo,CustomerCommon customerCommon){
         Integer flag = 0;
         List<ComplaintDetectInfo> complaintDetectInfoList = new ArrayList<ComplaintDetectInfo>();
         complaintDetectInfo.setCustomerId(customerCommon.getCustomerId());    //添加客诉
@@ -322,7 +320,7 @@ public class CustomerServiceImpl implements CustomerService {
             flag = complaintDetectInfoMapper.insertList(complaintDetectInfoList);
         }
         if(flag < 1){
-            throw new Exception("添加品检失败");
+            throw new RuntimeException("添加品检失败");
         }
     }
 
@@ -332,7 +330,7 @@ public class CustomerServiceImpl implements CustomerService {
      * @return
      */
     @Transactional
-    public void saveComplaintSignclosedInfo(ComplaintSignclosedInfo complaintSignclosedInfo,CustomerCommon customerCommon)throws  Exception{
+    public void saveComplaintSignclosedInfo(ComplaintSignclosedInfo complaintSignclosedInfo,CustomerCommon customerCommon){
         Integer flag;
         complaintSignclosedInfo.setSignclosedType(1); //客诉寄回
         complaintSignclosedInfo.setSignclosedIsQuality(1); //是否平品检 1:需要品检
@@ -343,7 +341,7 @@ public class CustomerServiceImpl implements CustomerService {
         complaintSignclosedInfo.setSignclosedIsFittings(2);
         flag = complaintSignclosedInfoMapper.insert(complaintSignclosedInfo);
         if(flag < 1){
-            throw new Exception("添加签收失败");
+            throw new RuntimeException("添加签收失败");
         }
 
         //添加代签收表
@@ -378,7 +376,7 @@ public class CustomerServiceImpl implements CustomerService {
 
         flag = complaintSignclosedProductInfoMapper.insertList(awaitingSignclosedProductInfoArrayList);
         if(flag < 1){
-            throw new Exception("添加签收产品失败");
+            throw new RuntimeException("添加签收产品失败");
         }
     }
 
@@ -387,7 +385,7 @@ public class CustomerServiceImpl implements CustomerService {
      * @return
      */
     @Transactional
-    public Map<String,Object> sendEfastOrder(CustomerCommon customerCommon,SalesOrder salesOrder) throws Exception{
+    public Map<String,Object> sendEfastOrder(CustomerCommon customerCommon,SalesOrder salesOrder){
         Map<String,Object> map = new HashMap<String,Object>();
         List<EfastOrder> orderList = new ArrayList<EfastOrder>();
         List<OrderItem> itemList = new ArrayList<OrderItem>();
@@ -479,12 +477,12 @@ public class CustomerServiceImpl implements CustomerService {
      * @return
      */
     @Transactional
-    public Map<String,Object> sendEfastOrder(SalesOrder salesOrder) throws Exception{
+    public Map<String,Object> sendEfastOrder(SalesOrder salesOrder){
 
         //添加订单数据
         int orderNum = salesOrderMapper.addSalesOrder(salesOrder);
         if (orderNum <= 0) {
-            throw new Exception("添加订单失败");
+            throw new RuntimeException("添加订单失败");
         }
         for (SalesOrderItem item : salesOrder.getSalesOrderItemList()) {
             item.setItemOrderId(salesOrder.getSalesId());
@@ -492,7 +490,7 @@ public class CustomerServiceImpl implements CustomerService {
         //批量添加订单项数据
         int itemNum = salesOrderMapper.addOrderItemList(salesOrder.getSalesOrderItemList());
         if (itemNum <= 0) {
-            throw new Exception("添加订单项失败");
+            throw new RuntimeException("添加订单项失败");
         }
 
         Map<String,Object> map = new HashMap<String,Object>();
@@ -582,7 +580,7 @@ public class CustomerServiceImpl implements CustomerService {
         if(oList != null && oList.size() > 0){
             map.put("EfastOrderId",oList.get(0).getOrderId());
         }else{
-            throw new Exception("添加订单项失败");
+            throw new RuntimeException("添加订单项失败");
         }
         map.put("status",status);
         return map;
@@ -593,19 +591,18 @@ public class CustomerServiceImpl implements CustomerService {
      * @param customerCommon
      * @param salesOrder
      * @return
-     * @throws Exception
+     * @throws RuntimeException
      */
     @Transactional
-    boolean chargebackEfastOrder(CustomerCommon customerCommon, SalesOrder salesOrder,Integer status) throws Exception{
+    public void chargebackEfastOrder(CustomerCommon customerCommon, SalesOrder salesOrder,Integer status){
 
         SalesOrder order = new SalesOrder();
         order.setSalesId(salesOrder.getSalesId());
         order.setSalesOrderStatus(status); //换货状态
         Integer flag = salesOrderMapper.updateSalesOrder(order);
-//        if(flag < 0){
-//            throw new Exception("退货失败");
-//        }
-
+        if(flag < 0){
+            throw new RuntimeException("生成退单失败");
+        }
         EfastOrder efastOrder = new EfastOrder();
         List<EfastOrderItem> itemList = new ArrayList<>();
 
@@ -640,10 +637,8 @@ public class CustomerServiceImpl implements CustomerService {
         }catch (Exception e){
             logger.info("------将原订单生成退货订单报错------");
         }
-        if(fg){
-            return true;
-        }else{
-            return false;
+        if(!fg){
+            throw new RuntimeException("生成退单失败");
         }
     }
 

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

@@ -181,12 +181,16 @@
         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 machine_id > #{machineId}
-        order by machine_create_time desc
+        order by t.machine_id asc
     </select>
 
     <select id="maxMachineId" resultType="Integer">

+ 5 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -609,8 +609,11 @@ public class AdminCustomerController {
         }
         customerInfo.setTransactionNumber(orderId);
 
-        flag = customerService.saveCustomerInfo(customerInfo, salesOrder);
-
+        try{
+            flag = customerService.saveCustomerInfo(customerInfo, salesOrder);
+        }catch (RuntimeException e){
+            return new ResponseJson(500, e.getMessage(), 500);
+        }
         if (flag < 1) {
             return new ResponseJson(500, "添加客诉失败!", 500);
         } else {

+ 5 - 5
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsBomController.java

@@ -210,13 +210,13 @@ public class AdminPtsBomController {
     @RequestMapping(value = "/get_listBom")
     public ResponseJson listBomByProduceId(HttpServletRequest request) {
 
-        String produceId = request.getParameter("produceId");
-        if (produceId == null || "".equals(produceId)) {
-            return new ResponseJson(500, "ERROR", 500);
-        }
+//        String produceId = request.getParameter("produceId");
+//        if (produceId == null || "".equals(produceId)) {
+//            return new ResponseJson(500, "ERROR", 500);
+//        }
 
         PtsBom ptsBom = new PtsBom();
-        ptsBom.setProduceId(Integer.valueOf(produceId));
+//        ptsBom.setProduceId(Integer.valueOf(produceId));
         List<PtsBom> ptsBomsList = ptsBomService.listBom(ptsBom);
 
         if (ptsBomsList != null) {

+ 41 - 16
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -849,14 +849,11 @@
         initVisitEvent();
     }
 
-    function keyFun(node){
-        var c=$(node);
-        if(/[^\d]/.test(c.val())){//替换非数字字符
-            var temp_amount=c.val().replace(/[^\d]/g,'');
-            $(node).val(temp_amount);
-        }
-    }
-
+//    function keyFun(node){
+//        var c=$(node);
+//        var temp_amount=c.val().replace(/[^\d]/g,'');
+//        $(node).val(Number(temp_amount));
+//    }
 
     /*初始化客服*/
     var sysAminList;
@@ -1864,10 +1861,16 @@
                             location.href = "${path}/admin/customer/select_customer_list";
                         } else {
                             layer.close(index);
+                            layer.msg(data.resultMsg, {icon: 5, time: 3000});
                         }
                         return ;
                     });
                 }
+            },
+            ajaxurl:function (data) {
+                if (data) {
+
+                }
             }
         });
     })
@@ -1999,45 +2002,45 @@
             case 3:
                 process = processIsEmpty([closedProdcues,closedFittings]);
                 if(!process){
-                    layer.msg("必须选择一个换新寄回的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个换新寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 process = processIsEmpty([sendProdcues,sendFittings]);
                 if(!process){
-                    layer.msg("必须选择一个换新寄送的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个换新寄送的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 break;
             case 4:
                 process = processIsEmpty([closedProdcues,closedFittings]);
                 if(!process){
-                    layer.msg("必须选择一个维修寄回的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个维修寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 process = processIsEmpty([sendProdcues,sendFittings]);
                 if(!process){
-                    layer.msg("必须选择一个维修寄送的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个维修寄送的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 break;
             case 5:
                 process = processIsEmpty([sendProdcues,sendFittings]);
                 if(!process){
-                    layer.msg("必须选择一个补发寄送的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个补发寄送的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 break;
             case 6:
                 process = processIsEmpty([closedProdcues,closedFittings]);
                 if(!process){
-                    layer.msg("必须选择一个退货寄回的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个退货寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 break;
             case 7:
                 process = processIsEmpty([closedProdcues,closedFittings]);
                 if(!process){
-                    layer.msg("必须选择一个退货寄回的产品或配件并填写数量!", {icon: 5, time: 3000});
+                    layer.msg("选择一个退货寄回的产品或配件并填写一个以上的数量!", {icon: 5, time: 3000});
                     return false;
                 }
                 break;
@@ -2056,14 +2059,36 @@
     function processIsEmpty(process){
         if(process != null && process != "" && process.length > 0){
             var flag = 2;
+            var num = 0;
             if(process[0] == null ||  process[0].length < 1 ){
                 flag -- ;
             }
             if(process[1] == null ||  process[1].length < 1 ){
                 flag -- ;
             }
+
+            for(var j=0; j<process.length;j++){
+                for(var i=0;i<process[j].length;i++){
+                    if(process[j][i].sendProdcueNumber !== undefined){
+                        num +=  process[j][i].sendProdcueNumber;
+                    }
+                    if(process[j][i].sendFittingNumber !== undefined){
+                        num += process[j][i].sendFittingNumber;
+                    }
+                    if(process[j][i].closedProdcueNumber !== undefined){
+                        num += process[j][i].closedProdcueNumber ;
+                    }
+                    if(process[j][i].closedFittingNumber !== undefined){
+                        num += process[j][i].closedFittingNumber;
+                    }
+                }
+            }
+
             if(flag == 0){
-                return false
+                return false;
+            }
+            if(num == 0){
+                return false;
             }
         }
         return true;

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl

@@ -344,7 +344,7 @@
                                 ' <td>'+ salesOrder.salesId +'</td>' +
                                 ' <td>'+ salesOrder.salesAddressName +'</td>' +
                                 ' <td>'+ salesOrder.salesAddressTel +'</td>' +
-                                ' <td>'+ salesOrder.salesAmount +'</td>' +
+                                ' <td>'+ salesOrder.salesAmount/100 +'</td>' +
                                 ' <td>'+ productsHtml +'</td>' +
                                 ' <td>'+ time +'</td>' +
                                 ' <td>'+ salesOrder.salesAddressInfo +'</td>' +

+ 42 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl

@@ -33,10 +33,49 @@
     <form class="form form-horizontal" id="form-admin-add">
         <div class="input-box">
             <label class="form-label col-2 col-sm-2 huanhang">检测产品:</label>
-            <div class="formControls col-9 col-sm-9 text-c huanhang">
+            <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-bottom: 15px;">
+                <table class="table table-border table-bg table-bordered" style="width: 420px;">
+                    <thead>
+                    <tr class="text-c">
+                        <th style="text-align: center;" width="100">产品名称</th>
+                        <th style="text-align: center;" width="50">产品颜色</th>
+                        <th style="text-align: center;" width="50">产品编号</th>
+                    </tr>
+                    </thead>
+                    <tbody id="addProduct">
+                    <#if (productList?size > 0)>
+                        <#list productList as product>
+                        <tr>
 
-            <#if (productList?size > 0)>
+                        <td>
+                            <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
+                        </td>
+                        <td>
+                            <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%" class="my-select">
+                            <#if (product.colorList?size > 0)>
+                                <#list product.colorList as colorList>
+                                    <option value ="${colorList.colorId!''}">${colorList.colorName!''}</option>
+                                </#list>
+                            <#else>
+                                <option value ="">暂无颜色</option>
+                            </#if>
+                            </select>
+                        </td>
+                        <td>
+                            <input class="input-text" type="text" id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 100%;" placeholder="机器编号" /><br>
+                        </td>
+
+                        </tr>
+                        </#list>
+                    </#if>
+                    </tbody>
+                </table>
+
+            <#--<#if (productList?size > 0)>
                 <#list productList as product>
+
+
+
                     <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
                     <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:60px" class="select">
                         <#if (product.colorList?size > 0)>
@@ -49,7 +88,7 @@
                     </select>
                     <input class="input-text" type="text" id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 20%;" placeholder="机器编号" /><br>
                 </#list>
-            </#if>
+            </#if>-->
 
             </div>
         </div>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/view_progress.ftl

@@ -70,7 +70,7 @@
                 <button type="button" class="my-btn-submit" onclick="add();">催促仓库转入QC</button>
             </#if>
             <#if signclosedInfo.signclosedState == 2>
-                <button type="button" class="my-btn-submit" onclick="openLogistics('物流信息','${path}/admin/detect/to_view_logistics?billCode=${signclosedInfo.signclosedLogisticsNumber}&billName=${signclosedInfo.signclosedLogistics  }',375,400);">查看物流</button>
+                <button type="button" class="my-btn-submit" onclick="openLogistics('物流信息','${path}/admin/detect/to_view_logistics?billCode=${signclosedInfo.signclosedLogisticsNumber!''}&billName=${signclosedInfo.signclosedLogistics!''}',375,400);">查看物流</button>
             </#if>
         <#else >
             <button type="button" class="my-btn-submit" onclick="add();">催促仓库转入QC</button>

+ 41 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/add_maintenance.ftl

@@ -32,10 +32,47 @@
 <article class="page-container">
     <form class="form form-horizontal" id="form-admin-add">
         <div class="input-box">
-            <label class="form-label col-3 col-sm-3 huanhang">维修产品:</label>
-            <div class="formControls col-9 col-sm-9 text-c huanhang">
+            <label class="form-label col-2 col-sm-2 huanhang">维修产品:</label>
+            <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-bottom: 15px;">
+                <table class="table table-border table-bg table-bordered" style="width: 420px;">
+                    <thead>
+                    <tr class="text-c">
+                        <th style="text-align: center;" width="100">产品名称</th>
+                        <th style="text-align: center;" width="50">产品颜色</th>
+                        <th style="text-align: center;" width="50">产品编号</th>
+                    </tr>
+                    </thead>
+                    <tbody id="addProduct">
+                    <#if (productList?size > 0)>
+                        <#list productList as product>
+                        <tr>
+                            <td>
+                                <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
+                            </td>
+                            <td>
+                                <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%" class="my-select">
+                                    <#if (product.colorList?size > 0)>
+                                        <#list product.colorList as colorList>
+                                            <option value ="${colorList.colorId!''}">${colorList.colorName!''}</option>
+                                        </#list>
+                                    <#else>
+                                        <option value ="">暂无颜色</option>
+                                    </#if>
+                                </select>
+                            </td>
+                            <td>
+                                <input class="input-text" type="text" id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 100%;" placeholder="机器编号" /><br>
+                            </td>
 
-            <#if (productList?size > 0)>
+                        </tr>
+                        </#list>
+                    </#if>
+                    </tbody>
+                </table>
+
+
+
+            <#--<#if (productList?size > 0)>
                 <#list productList as product>
                     <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product_index == 0>checked</#if>/>${product.productName!''}
                     <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:60px" class="select">
@@ -49,7 +86,7 @@
                     </select>
                     <input class="input-text" type="text" id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 20%;" placeholder="机器编号" /><br>
                 </#list>
-            </#if>
+            </#if>-->
 
             </div>
         </div>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/maintenance_list.ftl

@@ -136,7 +136,7 @@
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c">
                         <a style="text-decoration:none" href="javascript:;" title="修改维修信息"
-                           onclick="add_maintenance('修改维修信息','${path}/admin/maintenance/to_update_maintenance?maintenanceId=${maintenanceInfo.maintenanceId!''}','570','450');">
+                           onclick="add_maintenance('修改维修信息','${path}/admin/maintenance/to_update_maintenance?maintenanceId=${maintenanceInfo.maintenanceId!''}','670','450');">
                             <i class="Hui-iconfont">&#xe60c;</i>
                         </a>
                         <a style="text-decoration:none" href="javascript:;" title="完善机器编号"

+ 39 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/maintenance/update_maintenance.ftl

@@ -33,9 +33,45 @@
     <form class="form form-horizontal" id="form-admin-add">
         <div class="input-box">
             <label class="form-label col-2 col-sm-2 huanhang">维修产品:</label>
-            <div class="formControls col-10 col-sm-10 text-c huanhang">
+            <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-bottom: 15px;">
 
-            <#if (productList?size > 0)>
+                <table class="table table-border table-bg table-bordered" style="width: 420px;">
+                    <thead>
+                    <tr class="text-c">
+                        <th style="text-align: center;" width="100">产品名称</th>
+                        <th style="text-align: center;" width="50">产品颜色</th>
+                        <th style="text-align: center;" width="50">产品编号</th>
+                    </tr>
+                    </thead>
+                    <tbody id="addProduct">
+                    <#if (productList?size > 0)>
+                        <#list productList as product>
+                        <tr>
+                            <td>
+                                <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product.productId == maintenanceInfo.productId>checked</#if>/>${product.productName!''}
+                            </td>
+                            <td>
+                                <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:90%;" class="my-select">
+                                    <#if (product.colorList?size > 0)>
+                                        <#list product.colorList as colorList>
+                                            <option value ="${colorList.colorId!''}">${colorList.colorName!''}</option>
+                                        </#list>
+                                    <#else>
+                                        <option value ="">暂无颜色</option>
+                                    </#if>
+                                </select>
+                            </td>
+                            <td>
+                                <input class="input-text" <#if product.productId == maintenanceInfo.productId>value="${maintenanceInfo.maintenanceEquipmentNumber!''}"</#if> type="text" id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 100%;" placeholder="机器编号" /><br>
+                            </td>
+
+                        </tr>
+                        </#list>
+                    </#if>
+                    </tbody>
+                </table>
+
+            <#--<#if (productList?size > 0)>
                 <#list productList as product>
                     <input type="radio" id="radio-${product.productId!''}" name="productId" value="${product.productId!''}" <#if product.productId == maintenanceInfo.productId>checked</#if>/>${product.productName!''}
                     <select name="colorId${product.productId!''}" id="colorId${product.productId!''}" style="width:60px" class="select">
@@ -50,7 +86,7 @@
                     <input class="input-text" type="text" id="maintenanceEquipmentNumber${product.productId!''}" name="maintenanceEquipmentNumber${product.productId!''}" style="width: 20%;" placeholder="机器编号" /><br>
                 </#list>
             </#if>
-
+-->
             </div>
         </div>
 

+ 5 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl

@@ -14,7 +14,7 @@
         .table-bg thead th{background-color: #e2f6ff;}
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
-        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #44C861;border: 1px solid #44C861;border-radius: 5px;color: #E5EAEA;font-weight:bold;}
     </style>
 </head>
 <body>
@@ -189,8 +189,11 @@
                     <td class="text-c" width="100">
                         <#if signclosed.signclosedObjectsState == 1>
                             正常签收
-                        <#else>
+
+                        <#elseif signclosed.signclosedObjectsState == 2>
                             物件不对
+                        <#else>
+                            待签收
                         </#if>
                     </td>
                     <td class="text-c" width="100">${signclosed.signclosedDesc!}</td>

+ 4 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/update_sender.ftl

@@ -54,6 +54,7 @@
             <label class="form-label col-3 col-sm-3 huanhang">物流公司:</label>
             <div class="formControls col-3 col-sm-3 skin-minimal huanhang">
                     <span>
+                        <#if complaintSignclosedInfo.signclosedLogistics??>
                         <#if complaintSignclosedInfo.signclosedLogistics == "sto">申通快递</#if>
                         <#if complaintSignclosedInfo.signclosedLogistics == "yto">圆通快递</#if>
                         <#if complaintSignclosedInfo.signclosedLogistics == "sf">顺丰快递</#if>
@@ -66,8 +67,10 @@
                         <#if complaintSignclosedInfo.signclosedLogistics == "ttkdex">天天快递</#if>
                         <#if complaintSignclosedInfo.signclosedLogistics == "jd">京东快递</#if>
                         <#if complaintSignclosedInfo.signclosedLogistics == "01">其他</#if>
-                        <#if complaintSignclosedInfo.signclosedLogistics == "02">上门送货</#if>,
+                        <#if complaintSignclosedInfo.signclosedLogistics == "02">上门送货</#if>
+                       ,
                         ${complaintSignclosedInfo.signclosedLogisticsNumber!''}
+                        </#if>
                     </span>
             </div>
         </div>

+ 5 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/add_bom.ftl

@@ -186,7 +186,7 @@
 
         var produceId =   $("[name='produceId']").val();
         staticProduceId = produceId;
-        getBomByProduce(produceId);
+        getBomByProduce(produceId);  //获取bom单
 
         /*监听产品选择*/
         $("[name='produceId']").change(function(){
@@ -347,11 +347,14 @@
                                 addComponents(components[i].componentsId,components[i].bomComponentsQuantity/100);
                             }
                         }
-                        layer.close(index);
+
                     }else{
                         defaultAllInput();
                     }
+                }else{
+                    defaultAllInput();
                 }
+                layer.close(index);
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){
             }

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

@@ -82,6 +82,7 @@
 
         <div class="input-box"><span class="input-dic spanhidth">拉线:</span><input class="my-input" type="text" style="width: 76%;"  name="machineLine" id="machineLine" value="A1"/> </div>
         <div class="input-box"><span class="input-dic spanhidth">机器数量:</span><input class="my-input" type="text" style="width: 76%;"  name="number" id="number" value="4" placeholder="每次最少生成一个机器"/> </div>
+        <div class="input-box">如果遇到批次,软件版本,BOM不清晰时,请联系POA(刘经理)</div>
 
         <div class="input-box">
             <span class="input-dic spanhidth"></span>

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

@@ -29,7 +29,7 @@
 					<#--<button type="button" class="my-btn-search" onclick="setting();" style="cursor:pointer; margin-right: 50px;">设置</button>-->
                     <#-- <button type="button" class="my-btn-search" onclick="batch_add_machine('批量添加机器','${path}/admin/machine/_to_add_batch','','550');" style="cursor:pointer; margin-right: 50px;">添加机器</button>
                      &nbsp; &nbsp;-->
-                     <button type="button" class="my-btn-search" onclick="add_renovationmachine('批量添加机器','${path}/admin/machine/_to_add_renovation','570','450');" style="cursor:pointer; margin-right: 50px;">添加翻新机</button>
+                     <button type="button" class="my-btn-search" onclick="add_renovationmachine('批量添加机器','${path}/admin/machine/_to_add_renovation','570','450');" style="cursor:pointer; margin-right: 50px;">添加机</button>
 
 					<input class="my-input" type="text" name="machineBarcode" value="${machineBarcode!''}" placeholder="请输入机器编号"/>
 					<select class="my-select" name="machineIsPrint">
@@ -76,6 +76,7 @@
 			<table class="table table-border table-bordered table-bg table-hover table-sort">
 				<thead>
 				<tr class="text-c">
+                    <th width="100">产品名/型号</th>
 					<th width="100">机器条码</th>
 					<th width="100">机器二维码</th>
 					<th width="100">打印状态</th>
@@ -86,7 +87,6 @@
                     <th width="40">硬件版本</th>
                     <th width="40">软件版本</th>
                     <th width="40">是否是翻新机</th>
-                    <th width="70">产品名/型号</th>
 					<th width="150">操作</th>
 				</tr>
 				</thead>
@@ -94,6 +94,9 @@
                 <#if page.dataList?? &&  (page.dataList?size > 0) >
 					<#list page.dataList as list>
 						<tr>
+                            <td class="text-c" width="140">
+                            ${list.produceName }/${list.producePattern }-${list.produceModel }
+                            </td>
 							<td class="text-c" width="100">${list.machineBarcode }</td>
 							<td class="text-c" width="100"><div id="${100000 + list_index}" onclick="print('${list.machineBarcode }','${list.machineQrcode }','${list.machineId }','${list.machineProduceType }')"><img style="width: 50px;height: 50px;" src="${list.machineQrcode }"></td>
                             <td class="text-c" width="100">
@@ -132,9 +135,6 @@
                                 </#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>
@@ -143,7 +143,7 @@
 						</tr>
 					</#list>
                 <#else>
-                <tr><td colspan="11" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
+                <tr><td id="noMachineTr" colspan="11" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
                 </#if>
 				</tbody>
 			</table>
@@ -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);
@@ -231,7 +230,7 @@
 
             ref = setInterval(function(){
                 latestMachines();
-            },2000);
+            },3000);
             function  latestMachines() {
                 $.ajax({
                     cache: true,
@@ -240,6 +239,7 @@
                     data:{machineId : $("#machineId").val()},// 你的formid
                     success: function(data){
                         if(data != null){
+                            $("#noMachineTr").remove();
                             $.each(data,function(i,value) {
                                 if(i+1 == data.length){
                                     $("#machineId").val(value.machineId);
@@ -290,6 +290,7 @@
                                 if(value.machineIsRetreading == 2){
                                     machineIsRetreading =  "否";
                                 }
+                                var machineName = value.produceName+"/"+value.producePattern+"-"+value.produceModel;
 								$("#listid").prepend('<tr>'
                                         +'<td class="text-c" width="100">'+value.machineBarcode+'</td>'
                                         +'<td class="text-c" width="100"><div id="" onclick="print('+'\''+value.machineBarcode+'\''+','+'\''+value.machineQrcode+'\''+','+'\''+value.machineId+'\''+','+'\''+value.machineProduceType+'\''+')"><img style="width: 50px;height: 50px;" src="'+value.machineQrcode+'"></td>'
@@ -301,6 +302,7 @@
                                         +'<td class="text-c" width="50">'+value.machineHardwareVersionName+'</td>'
                                         +'<td class="text-c" width="50">'+value.machineSoftwareVersionName+'</td>'
                                         +'<td class="text-c" width="50">'+machineIsRetreading+'</td>'
+                                        +'<td class="text-c" width="50">'+machineName+'</td>'
                             			+'<td class="td-manage text-c">'
                                         +'<a onclick="machineLogs('+value.machineId+');" title="生产流程" href="javascript:;"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe667;</i></a>'
                                         +'<a onclick="print('+'\''+value.machineBarcode+'\''+','+'\''+value.machineQrcode+'\''+','+'\''+value.machineId+'\''+','+'\''+value.machineProduceType+'\''+')" title="打印" href="javascript:;"  class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe652;</i></a>'
@@ -369,6 +371,7 @@
                 produce.producePattern = "";
                 produce.produceModel = "";
                 produce.produceFeature = "";
+                produce.produceName = "";
                 $.ajax({
                     type: "POST",
                     url: "${path}/admin/machine/_getProduce_print",
@@ -379,6 +382,7 @@
                             produce.producePattern = data.producePattern;
                             produce.produceModel = data.produceModel;
                             produce.produceFeature = data.produceFeature;
+                            produce.produceName = data.produceName;
                         }
                     },
                     error: function(){

+ 6 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_particulars.ftl

@@ -147,22 +147,22 @@
 		<#if ptsMachine.machineProcessState == 2><span class="text-red">异常</#if></span></li>
 
         <li style="width: 100%;height: 25px;">
-            <div style="float: left;width: 200px;">软件版本:
+            <div style="float: left;width: 300px;">软件版本:
                 <span class="text-red">
                     <a class="rj-a" style="" href="javascript:void(0);" title="点击查看软件版本" onclick="selectVersion('${produce.produceId ! ''}','${produce.produceName ! ''}')">${ptsMachineVersion.machineVersionNo ! ''}</a>
                 </span>
             </div>
-            <div style="float: left;width: 200px;">硬件版本:<span class="text-red">${ptsBom.bomVersion ! ''}</span></div>
+            <div style="float: left;width: 300px;">硬件版本:<span class="text-red">${ptsBom.bomVersion ! ''}</span></div>
         </li>
 
         <li style="width: 100%;height: 25px;">
-            <div style="float: left;width: 200px;">所属批次:${ptsBatch.batchNo ! ''}</div>
-            <div style="float: left;width: 200px;">所属Bom:${ptsBom.bomName ! ''}</div>
+            <div style="float: left;width: 300px;">所属批次:${ptsBatch.batchNo ! ''}</div>
+            <div style="float: left;width: 300px;">所属Bom:${ptsBom.bomName ! ''}</div>
         </li>
 
         <li style="width: 100%;height: 25px;">
-            <div style="float: left;width: 200px;">Bom总质量:${ptsBom.allComponentsWeight ! ''}g</div>
-            <div style="float: left;width: 200px;">Bom总价格:${ptsBom.allComponentsCost/100 ! ''}元</div>
+            <div style="float: left;width: 300px;">Bom总质量:${ptsBom.allComponentsWeight ! ''}g</div>
+            <div style="float: left;width: 300px;">Bom总价格:${ptsBom.allComponentsCost/100 ! ''}元</div>
         </li>
 
         <li  style="width: 100%;height: 25px;">Bom零件清单</li>

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

@@ -40,14 +40,14 @@
 			</form>
 		</div>
 		<div class="mt-2" style="margin: 20px; " >
-            <div style="width: 50%;margin: 0 auto; ">
+            <div style="width: 55%;margin: 0 auto; ">
                 <table class="table table-border table-bordered table-bg table-hover table-sort" >
                     <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="25">产品名/型号</th>
+                        <th width="70">产品名/型号</th>
                         <th width="10">生产时间</th>
                         <th width="20">操作</th>
                     </tr>
@@ -70,7 +70,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">
-                                ${list.produceName }-${list.producePattern }-${list.produceModel }
+                                ${list.produceName }/${list.producePattern }-${list.produceModel }
                                 </td>
                                 <td>${(list.machineCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                                 <!-- 遍历操作 -->
@@ -83,7 +83,7 @@
                             </tr>
                         </#list>
                         <#else>
-                        <tr><td colspan="6" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
+                        <tr id="noMachineTr"><td colspan="6" class="td-manage text-c" >暂时没有机器,请添加!</td></tr>
                         </#if>
                     </tbody>
                 </table>
@@ -251,26 +251,32 @@
                         data:{machineId : $("#machineId").val()},// 你的formid
                         success: function(data){
                             if(data != null){
+                                $("#noMachineTr").remove();
                                 $.each(data,function(i,value) {
                                     if(i+1 == data.length){
                                         $("#machineId").val(value.machineId);
                                     }
-                                    var machineType = "";
+                                    var machineName = value.produceName+"/"+value.producePattern+"-"+value.produceModel;
+                                    /*var machineType = "";
                                     if(value.machineProduceType == 1){
                                         machineType = "净水机";
                                     }
                                     if(value.machineProduceType == 2){
                                         machineType = "冲奶机";
-                                    }
+                                    }*/
                                     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>' +
-                                    '<td class="text-c" style="font-size: 24px" width="10">'+private+'</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">'+machineType+'</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>');
 
 
                                 });
@@ -391,6 +397,7 @@
                 produce.producePattern = "";
                 produce.produceModel = "";
                 produce.produceFeature = "";
+                produce.produceName = "";
                 $.ajax({
                     type: "POST",
                     url: "${path}/admin/machine/_getProduce_print",

+ 7 - 4
watero-rst-web/src/main/webapp/common/js/common/common.js

@@ -147,11 +147,14 @@ function listDistrict(cityId,districtName){
  */
 function keyFun(node){
     var c=$(node);
-    if(/[^\d]/.test(c.val())){//替换非数字字符
-        var temp_amount=c.val().replace(/[^\d]/g,'');
-        $(node).val(temp_amount);
-    }
+    var temp_amount=c.val().replace(/[^\d]/g,'');
+    $(node).val(Number(temp_amount));
 }
+// var c=$(node);
+// if(/[^\d]/.test(c.val())){//替换非数字字符
+//     var temp_amount=c.val().replace(/[^\d]/g,'');
+//     $(node).val(temp_amount);
+// }
 
 /**
  * 用于展示错误信息,并让该节点得到焦点