Jelajahi Sumber

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

# Conflicts:
#	watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
wangxiaoming 7 tahun lalu
induk
melakukan
931b3a0d10
23 mengubah file dengan 1359 tambahan dan 154 penghapusan
  1. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedFitting.java
  2. 13 4
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectInfo.java
  3. 16 34
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintMaintenanceInfo.java
  4. 9 9
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Reissue.java
  5. 145 19
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Renewed.java
  6. 9 9
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java
  7. 6 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintDetectInfoService.java
  8. 27 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/RenewedService.java
  9. 28 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintDetectInfoServiceImpl.java
  10. 31 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/RenewedServiceImpl.java
  11. 15 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RenewedMapper.java
  12. 12 7
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml
  13. 17 25
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintMaintenanceInfoMapper.xml
  14. 50 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml
  15. 38 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  16. 130 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  17. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/PtsCodeController.java
  18. 356 26
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  19. 3 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  20. 85 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl
  21. 197 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl
  22. 34 11
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  23. 127 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_produced_info.ftl

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedFitting.java

@@ -14,6 +14,16 @@ public class ClosedFitting  implements Serializable {
 
     private Integer closedFittingNumber;
 
+    private String fittingName;     //配件名称
+
+    public String getFittingName() {
+        return fittingName;
+    }
+
+    public void setFittingName(String fittingName) {
+        this.fittingName = fittingName;
+    }
+
     public Integer getClosedFittingId() {
         return closedFittingId;
     }

+ 13 - 4
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectInfo.java

@@ -29,6 +29,7 @@ public class ComplaintDetectInfo implements Serializable {
     private String detectAnalysis;//原因分析
     private Integer detectCustomerId;//客诉id
     private Integer detectRevolutionProduced;//是否转入生产部门
+    private Integer maintenanceResults;//QC检测结果
     private String detectDesc;//备注
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
@@ -40,8 +41,8 @@ public class ComplaintDetectInfo implements Serializable {
 
 
     private String questionTitle;//问题标题
-    private String detectIsMaintenance;//是否需要维修
-    private String productName;//是否需要维修
+    private Integer detectIsMaintenance;//是否需要维修 1 需要 2不需要
+    private String productName;//产品名称
 
 
     public Integer getDetectId() {
@@ -204,11 +205,11 @@ public class ComplaintDetectInfo implements Serializable {
         this.machineNo = machineNo;
     }
 
-    public String getDetectIsMaintenance() {
+    public Integer getDetectIsMaintenance() {
         return detectIsMaintenance;
     }
 
-    public void setDetectIsMaintenance(String detectIsMaintenance) {
+    public void setDetectIsMaintenance(Integer detectIsMaintenance) {
         this.detectIsMaintenance = detectIsMaintenance;
     }
 
@@ -227,4 +228,12 @@ public class ComplaintDetectInfo implements Serializable {
     public void setProductName(String productName) {
         this.productName = productName;
     }
+
+    public Integer getMaintenanceResults() {
+        return maintenanceResults;
+    }
+
+    public void setMaintenanceResults(Integer maintenanceResults) {
+        this.maintenanceResults = maintenanceResults;
+    }
 }

+ 16 - 34
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintMaintenanceInfo.java

@@ -3,7 +3,7 @@ package com.iamberry.rst.core.cm;
 import java.io.Serializable;
 import java.util.Date;
 /**
- * 客诉-签收产品
+ * 客诉-生产维修
  * @author LJK
  * @company 深圳爱贝源科技有限公司
  * @date 2017/6/22 16:05
@@ -14,23 +14,21 @@ public class ComplaintMaintenanceInfo  implements Serializable {
 
     private Integer detectId;//品质检测ID
 
-    private Integer maintenanceEquipmentNumber;//设备编号
+    private String maintenanceEquipmentNumber;//设备编号
 
-    private Integer maintenanceProductType;//产品类型
+    private Integer productId;//产品id
 
     private String maintenanceProductNumber;//产品型号
 
-    private String maintenanceResults;//QC检测结果
 
-    private Boolean maintenanceState;//状态
+
+    private Integer maintenanceState;//状态
 
     private String maintenanceAnalysis;//原因分析
 
     private Integer maintenanceCustomerId;//客诉id
 
-    private Boolean maintenanceIdRepair;//是否可返修
-
-    private String maintenanceContent;//返修内容
+    private Integer maintenanceIdRepair;//是否可返修
 
     private Date maintenanceContentDate;//返修日期
 
@@ -54,20 +52,20 @@ public class ComplaintMaintenanceInfo  implements Serializable {
         this.detectId = detectId;
     }
 
-    public Integer getMaintenanceEquipmentNumber() {
+    public String getMaintenanceEquipmentNumber() {
         return maintenanceEquipmentNumber;
     }
 
-    public void setMaintenanceEquipmentNumber(Integer maintenanceEquipmentNumber) {
+    public void setMaintenanceEquipmentNumber(String maintenanceEquipmentNumber) {
         this.maintenanceEquipmentNumber = maintenanceEquipmentNumber;
     }
 
-    public Integer getMaintenanceProductType() {
-        return maintenanceProductType;
+    public Integer getProductId() {
+        return productId;
     }
 
-    public void setMaintenanceProductType(Integer maintenanceProductType) {
-        this.maintenanceProductType = maintenanceProductType;
+    public void setProductId(Integer productId) {
+        this.productId = productId;
     }
 
     public String getMaintenanceProductNumber() {
@@ -78,19 +76,11 @@ public class ComplaintMaintenanceInfo  implements Serializable {
         this.maintenanceProductNumber = maintenanceProductNumber == null ? null : maintenanceProductNumber.trim();
     }
 
-    public String getMaintenanceResults() {
-        return maintenanceResults;
-    }
-
-    public void setMaintenanceResults(String maintenanceResults) {
-        this.maintenanceResults = maintenanceResults == null ? null : maintenanceResults.trim();
-    }
-
-    public Boolean getMaintenanceState() {
+    public Integer getMaintenanceState() {
         return maintenanceState;
     }
 
-    public void setMaintenanceState(Boolean maintenanceState) {
+    public void setMaintenanceState(Integer maintenanceState) {
         this.maintenanceState = maintenanceState;
     }
 
@@ -110,22 +100,14 @@ public class ComplaintMaintenanceInfo  implements Serializable {
         this.maintenanceCustomerId = maintenanceCustomerId;
     }
 
-    public Boolean getMaintenanceIdRepair() {
+    public Integer getMaintenanceIdRepair() {
         return maintenanceIdRepair;
     }
 
-    public void setMaintenanceIdRepair(Boolean maintenanceIdRepair) {
+    public void setMaintenanceIdRepair(Integer maintenanceIdRepair) {
         this.maintenanceIdRepair = maintenanceIdRepair;
     }
 
-    public String getMaintenanceContent() {
-        return maintenanceContent;
-    }
-
-    public void setMaintenanceContent(String maintenanceContent) {
-        this.maintenanceContent = maintenanceContent == null ? null : maintenanceContent.trim();
-    }
-
     public Date getMaintenanceContentDate() {
         return maintenanceContentDate;
     }

+ 9 - 9
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Reissue.java

@@ -24,11 +24,11 @@ public class Reissue  implements Serializable {
     //  寄送人电话 
     private String reissueSendTel;
     //  寄送地址-省 
-    private String provinceNumber;
+    private Integer provinceNumber;
     //  寄送地址-市 
-    private String cityNumber;
+    private Integer cityNumber;
     //  寄送地址-区 
-    private String areaNumber;
+    private Integer areaNumber;
     //  寄送地址-省市区 
     private String reissueSendMergeAddress;
     //  寄送地址-详细地址 
@@ -103,27 +103,27 @@ public class Reissue  implements Serializable {
         this.reissueSendTel = reissueSendTel;
     }
 
-    public String getProvinceNumber() {
+    public Integer getProvinceNumber() {
         return provinceNumber;
     }
 
-    public void setProvinceNumber(String provinceNumber) {
+    public void setProvinceNumber(Integer provinceNumber) {
         this.provinceNumber = provinceNumber;
     }
 
-    public String getCityNumber() {
+    public Integer getCityNumber() {
         return cityNumber;
     }
 
-    public void setCityNumber(String cityNumber) {
+    public void setCityNumber(Integer cityNumber) {
         this.cityNumber = cityNumber;
     }
 
-    public String getAreaNumber() {
+    public Integer getAreaNumber() {
         return areaNumber;
     }
 
-    public void setAreaNumber(String areaNumber) {
+    public void setAreaNumber(Integer areaNumber) {
         this.areaNumber = areaNumber;
     }
 

+ 145 - 19
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Renewed.java

@@ -1,7 +1,9 @@
 package com.iamberry.rst.core.cm;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 售后换新主键
@@ -41,11 +43,11 @@ public class Renewed  implements Serializable {
      //寄送人电话 
     private String renewedSendTel;
      //寄送地址-省 
-    private String provinceNumber;
+    private Integer provinceNumber;
      //寄送地址-市 
-    private String cityNumber;
+    private Integer cityNumber;
      //寄送地址-区 
-    private String areaNumber;
+    private Integer areaNumber;
      //寄送地址-省市区 
     private String renewedSendMergeAddress;
      //寄送地址-详细地址 
@@ -67,8 +69,132 @@ public class Renewed  implements Serializable {
     // 修改时间,
     private Date renewedUpdateTime;
 
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
+    private String detectPhenomenon;            //工厂检测现象
+    private String detectFailureClassification; //故障分类
+    private String detectFailureCause;          //故障原因
+    private String detectResults;               //判定结果
+    private String detectPoint;                 //故障指向
+    private String detectAnalysis;              //原因分析
+    private Integer detectRevolutionProduced;   //是否转入生产部门
+    private Integer maintenanceIdRepair;        //是否可返修
+    private String maintenanceContent;          //返修内容
+    private Date maintenanceContentDate;        //返修日期
+    private Integer closedProdcueNumber;        //寄回产品数量
+    private String productName;                 //产品名称
+    private Integer detectState;                //品质检测状态
+
+    public Integer getDetectState() {
+        return detectState;
+    }
+
+    public void setDetectState(Integer detectState) {
+        this.detectState = detectState;
+    }
+
+    private List<ClosedFitting> closedFittings = new ArrayList<ClosedFitting>();//寄回配件集合
+
+    public Integer getClosedProdcueNumber() {
+        return closedProdcueNumber;
+    }
+
+    public void setClosedProdcueNumber(Integer closedProdcueNumber) {
+        this.closedProdcueNumber = closedProdcueNumber;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public List<ClosedFitting> getClosedFittings() {
+        return closedFittings;
+    }
+
+    public void setClosedFittings(List<ClosedFitting> closedFittings) {
+        this.closedFittings = closedFittings;
+    }
+
+    public String getDetectPhenomenon() {
+        return detectPhenomenon;
+    }
+
+    public void setDetectPhenomenon(String detectPhenomenon) {
+        this.detectPhenomenon = detectPhenomenon;
+    }
+
+    public String getDetectFailureClassification() {
+        return detectFailureClassification;
+    }
+
+    public void setDetectFailureClassification(String detectFailureClassification) {
+        this.detectFailureClassification = detectFailureClassification;
+    }
+
+    public String getDetectFailureCause() {
+        return detectFailureCause;
+    }
+
+    public void setDetectFailureCause(String detectFailureCause) {
+        this.detectFailureCause = detectFailureCause;
+    }
+
+    public String getDetectResults() {
+        return detectResults;
+    }
+
+    public void setDetectResults(String detectResults) {
+        this.detectResults = detectResults;
+    }
+
+    public String getDetectPoint() {
+        return detectPoint;
+    }
+
+    public void setDetectPoint(String detectPoint) {
+        this.detectPoint = detectPoint;
+    }
+
+    public String getDetectAnalysis() {
+        return detectAnalysis;
+    }
+
+    public void setDetectAnalysis(String detectAnalysis) {
+        this.detectAnalysis = detectAnalysis;
+    }
+
+    public Integer getDetectRevolutionProduced() {
+        return detectRevolutionProduced;
+    }
+
+    public void setDetectRevolutionProduced(Integer detectRevolutionProduced) {
+        this.detectRevolutionProduced = detectRevolutionProduced;
+    }
+
+    public Integer getMaintenanceIdRepair() {
+        return maintenanceIdRepair;
+    }
+
+    public void setMaintenanceIdRepair(Integer maintenanceIdRepair) {
+        this.maintenanceIdRepair = maintenanceIdRepair;
+    }
+
+    public String getMaintenanceContent() {
+        return maintenanceContent;
+    }
+
+    public void setMaintenanceContent(String maintenanceContent) {
+        this.maintenanceContent = maintenanceContent;
+    }
+
+    public Date getMaintenanceContentDate() {
+        return maintenanceContentDate;
+    }
+
+    public void setMaintenanceContentDate(Date maintenanceContentDate) {
+        this.maintenanceContentDate = maintenanceContentDate;
     }
 
     public Integer getRenewedId() {
@@ -191,38 +317,38 @@ public class Renewed  implements Serializable {
         this.renewedSendTel = renewedSendTel;
     }
 
-    public String getProvinceNumber() {
+    public String getRenewedSendMergeAddress() {
+        return renewedSendMergeAddress;
+    }
+
+    public void setRenewedSendMergeAddress(String renewedSendMergeAddress) {
+        this.renewedSendMergeAddress = renewedSendMergeAddress;
+    }
+
+    public Integer getProvinceNumber() {
         return provinceNumber;
     }
 
-    public void setProvinceNumber(String provinceNumber) {
+    public void setProvinceNumber(Integer provinceNumber) {
         this.provinceNumber = provinceNumber;
     }
 
-    public String getCityNumber() {
+    public Integer getCityNumber() {
         return cityNumber;
     }
 
-    public void setCityNumber(String cityNumber) {
+    public void setCityNumber(Integer cityNumber) {
         this.cityNumber = cityNumber;
     }
 
-    public String getAreaNumber() {
+    public Integer getAreaNumber() {
         return areaNumber;
     }
 
-    public void setAreaNumber(String areaNumber) {
+    public void setAreaNumber(Integer areaNumber) {
         this.areaNumber = areaNumber;
     }
 
-    public String getRenewedSendMergeAddress() {
-        return renewedSendMergeAddress;
-    }
-
-    public void setRenewedSendMergeAddress(String renewedSendMergeAddress) {
-        this.renewedSendMergeAddress = renewedSendMergeAddress;
-    }
-
     public String getRenewedSendAddress() {
         return renewedSendAddress;
     }

+ 9 - 9
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java

@@ -41,11 +41,11 @@ public class Repair  implements Serializable {
     //  寄送人电话 
     private String repairSendTel;
     //  寄送地址-省 
-    private String provinceNumber;
+    private Integer provinceNumber;
     //  寄送地址-市 
-    private String cityNumber;
+    private Integer cityNumber;
     //  寄送地址-区 
-    private String areaNumber;
+    private Integer areaNumber;
     //  寄送地址-省市区 
     private String repairSendMergeAddress;
     //  寄送地址-详细地址 
@@ -187,27 +187,27 @@ public class Repair  implements Serializable {
         this.repairSendTel = repairSendTel;
     }
 
-    public String getProvinceNumber() {
+    public Integer getProvinceNumber() {
         return provinceNumber;
     }
 
-    public void setProvinceNumber(String provinceNumber) {
+    public void setProvinceNumber(Integer provinceNumber) {
         this.provinceNumber = provinceNumber;
     }
 
-    public String getCityNumber() {
+    public Integer getCityNumber() {
         return cityNumber;
     }
 
-    public void setCityNumber(String cityNumber) {
+    public void setCityNumber(Integer cityNumber) {
         this.cityNumber = cityNumber;
     }
 
-    public String getAreaNumber() {
+    public Integer getAreaNumber() {
         return areaNumber;
     }
 
-    public void setAreaNumber(String areaNumber) {
+    public void setAreaNumber(Integer areaNumber) {
         this.areaNumber = areaNumber;
     }
 

+ 6 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintDetectInfoService.java

@@ -28,6 +28,12 @@ public interface ComplaintDetectInfoService {
     int updateComplaintDetectById(ComplaintDetectInfo record);
 
     /**
+     * 修改单个待品质检测产品并生成生产数据
+     * @return
+     */
+    int updateComplaintDetect(ComplaintDetectInfo record);
+
+    /**
      * 获取品质检测列表
      * @return
      */

+ 27 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/RenewedService.java

@@ -0,0 +1,27 @@
+package com.iamberry.rst.faces.cm;
+
+import com.iamberry.rst.core.cm.ClosedFitting;
+import com.iamberry.rst.core.cm.Renewed;
+
+import java.util.List;
+
+/**
+ * 换新service
+ * Created by liuzhiwei on 2017/11/7.
+ */
+public interface RenewedService {
+
+    /**
+     * 获取换新详情和品质检测信息
+     * @param renewed
+     * @return
+     */
+    Renewed getRenewedInfo(Renewed renewed);
+
+    /**
+     * 获取寄回配件集合
+     * @param closedFitting
+     * @return
+     */
+    List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting);
+}

+ 28 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintDetectInfoServiceImpl.java

@@ -3,22 +3,27 @@ package com.iamberry.rst.service.cm;
 
 import com.github.pagehelper.PageHelper;
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.cm.ComplaintMaintenanceInfo;
 import com.iamberry.rst.core.order.Order;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.ComplaintDetectInfoService;
 import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
 import com.iamberry.rst.service.cm.mapper.ComplaintDetectInfoMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintMaintenanceInfoMapper;
 import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
 public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoService {
     @Autowired
     private ComplaintDetectInfoMapper complaintDetectInfoMapper;
+    @Autowired
+    private ComplaintMaintenanceInfoMapper complaintMaintenanceInfoMapper;
 
     @Override
     public int insert(ComplaintDetectInfo record) {
@@ -34,6 +39,29 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     public int updateComplaintDetectById(ComplaintDetectInfo record) {
         return complaintDetectInfoMapper.updateComplaintDetectById(record);
     }
+
+    @Override
+    public int updateComplaintDetect(ComplaintDetectInfo record) {
+        Integer msg = complaintDetectInfoMapper.updateComplaintDetectById(record);
+        if (msg > 0) {
+            if(record.getDetectRevolutionProduced() == 2){ //在生产表生成记录
+                ComplaintDetectInfo detectInfo = complaintDetectInfoMapper.getComplaintDetectById(record.getDetectId());
+                ComplaintMaintenanceInfo complaintMaintenanceInfo = new ComplaintMaintenanceInfo();
+                complaintMaintenanceInfo.setDetectId(detectInfo.getDetectId());
+                complaintMaintenanceInfo.setMaintenanceEquipmentNumber(detectInfo.getMachineNo() == null ? null:detectInfo.getMachineNo());
+                complaintMaintenanceInfo.setProductId(detectInfo.getProductId());
+                complaintMaintenanceInfo.setMaintenanceProductNumber(detectInfo.getDetectProductNumber() == null ? null:detectInfo.getDetectProductNumber());
+                complaintMaintenanceInfo.setMaintenanceState(1);//默认待维修更换
+                complaintMaintenanceInfo.setMaintenanceAnalysis(record.getDetectAnalysis());
+                complaintMaintenanceInfo.setMaintenanceCustomerId(detectInfo.getCustomerId() == null ? null:detectInfo.getCustomerId());
+                complaintMaintenanceInfo.setMaintenanceIdRepair(1);//默认未评估
+                complaintMaintenanceInfo.setMaintenanceContentDate(new Date());
+                complaintMaintenanceInfo.setMaintenanceCreateTime(new Date());
+                complaintMaintenanceInfoMapper.insert(complaintMaintenanceInfo);
+            }
+        }
+        return msg;
+    }
     @Override
     public PagedResult<ComplaintDetectInfo> listComplaintDetect(PageRequest<ComplaintDetectInfo> pageRequest) {
         PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());

+ 31 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/RenewedServiceImpl.java

@@ -0,0 +1,31 @@
+package com.iamberry.rst.service.cm;
+
+import com.iamberry.rst.core.cm.ClosedFitting;
+import com.iamberry.rst.core.cm.Renewed;
+import com.iamberry.rst.faces.cm.RenewedService;
+import com.iamberry.rst.service.cm.mapper.RenewedMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 换新service
+ * Created by liuzhiwei on 2017/11/7.
+ */
+@Service
+public class RenewedServiceImpl implements RenewedService {
+
+    @Autowired
+    private RenewedMapper renewedMapper;
+
+    @Override
+    public Renewed getRenewedInfo(Renewed renewed) {
+        return renewedMapper.getRenewedInfo(renewed);
+    }
+
+    @Override
+    public List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting) {
+        return renewedMapper.listClosedFitting(closedFitting);
+    }
+}

+ 15 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RenewedMapper.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.service.cm.mapper;
 
+import com.iamberry.rst.core.cm.ClosedFitting;
 import com.iamberry.rst.core.cm.Renewed;
 
 import java.util.List;
@@ -11,8 +12,6 @@ public interface RenewedMapper {
 
     int insertSelective(Renewed record);
 
-    Renewed selectByPrimaryKey(Integer renewedId);
-
     int updateByPrimaryKeySelective(Renewed record);
 
     int updateByPrimaryKey(Renewed record);
@@ -23,4 +22,18 @@ public interface RenewedMapper {
      * @return
      */
     List<Renewed> listRenewed(Renewed renewed);
+
+    /**
+     * 获取换新详情和品质检测信息
+     * @param renewed
+     * @return
+     */
+    Renewed getRenewedInfo(Renewed renewed);
+
+    /**
+     * 获取寄回配件集合
+     * @param closedFitting
+     * @return
+     */
+    List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting);
 }

+ 12 - 7
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml

@@ -20,15 +20,15 @@
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
     <result column="machine_no" property="machineNo" jdbcType="VARCHAR" />
-    <result column="detect_is_maintenance" property="detectIsMaintenance" jdbcType="VARCHAR" />
+    <result column="detect_is_maintenance" property="detectIsMaintenance" jdbcType="BIT" />
     <result column="detect_date" property="detectDate" jdbcType="DATE" />
-
+    <result column="maintenance_results" property="maintenanceResults" jdbcType="BIT" />
   </resultMap>
   <sql id="Base_Column_List" >
     detect_id, customer_id,signclosed_id,product_id,detect_product_number, detect_state,
     detect_phenomenon, detect_failure_classification, detect_failure_cause, detect_results, 
     detect_point, detect_analysis, detect_customer_id, detect_revolution_produced, detect_desc, 
-    signclosed_create_time, signclosed_update_time,detect_is_maintenance,detect_date
+    signclosed_create_time, signclosed_update_time,detect_is_maintenance,detect_date,maintenance_results
   </sql>
   <select id="getComplaintDetectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -60,7 +60,8 @@
       cd.detect_is_maintenance detectIsMaintenance,
       cd.detect_date detectDate,
       ci.customer_question_title questionTitle,
-      pi.product_name productName
+      pi.product_name productName,
+      cd.maintenance_results maintenanceResults
     from tb_rst_complaint_detect cd LEFT JOIN tb_rst_customer_info ci ON cd.customer_id = ci.customer_id
         LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
     <where>
@@ -108,7 +109,8 @@
       detect_failure_classification, detect_failure_cause, 
       detect_results, detect_point, detect_analysis, 
       detect_customer_id, detect_revolution_produced, 
-      detect_desc, signclosed_create_time, signclosed_update_time,machine_no,detect_is_maintenance,detect_date
+      detect_desc, signclosed_create_time, signclosed_update_time,
+      machine_no,detect_is_maintenance,detect_date,maintenance_results
       )
     values (#{detectId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},#{signclosedId,jdbcType=INTEGER},
       #{productId,jdbcType=INTEGER},
@@ -117,7 +119,7 @@
       #{detectResults,jdbcType=VARCHAR}, #{detectPoint,jdbcType=VARCHAR}, #{detectAnalysis,jdbcType=VARCHAR}, 
       #{detectCustomerId,jdbcType=INTEGER}, #{detectRevolutionProduced,jdbcType=BIT}, 
       #{detectDesc,jdbcType=VARCHAR}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
-      ,#{machineNo,jdbcType=VARCHAR},#{detectIsMaintenance,jdbcType=BIT},#{detectDate,jdbcType=DATE}
+      ,#{machineNo,jdbcType=VARCHAR},#{detectIsMaintenance,jdbcType=BIT},#{detectDate,jdbcType=DATE},#{maintenanceResults,jdbcType=BIT}
       )
   </insert>
 
@@ -164,7 +166,10 @@
         signclosed_update_time = #{signclosedUpdateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="detectIsMaintenance != null" >
-        detect_is_maintenance = #{detectIsMaintenance,jdbcType=TIMESTAMP}
+        detect_is_maintenance = #{detectIsMaintenance,jdbcType=TIMESTAMP},
+      </if>
+      <if test="maintenanceResults != null" >
+        maintenance_results = #{maintenanceResults,jdbcType=BIT}
       </if>
     </set>
     where detect_id = #{detectId,jdbcType=INTEGER}

+ 17 - 25
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintMaintenanceInfoMapper.xml

@@ -5,22 +5,20 @@
     <id column="maintenance_id" property="maintenanceId" jdbcType="INTEGER" />
     <result column="detect_id" property="detectId" jdbcType="INTEGER" />
     <result column="maintenance_equipment_number" property="maintenanceEquipmentNumber" jdbcType="INTEGER" />
-    <result column="maintenance_product_type" property="maintenanceProductType" jdbcType="BIT" />
+    <result column="product_id" property="productId" jdbcType="INTEGER" />
     <result column="maintenance_product_number" property="maintenanceProductNumber" jdbcType="VARCHAR" />
-    <result column="maintenance_results" property="maintenanceResults" jdbcType="VARCHAR" />
-    <result column="maintenance_state" property="maintenanceState" jdbcType="BIT" />
+    <result column="maintenance_state" property="maintenanceState" jdbcType="INTEGER" />
     <result column="maintenance_analysis" property="maintenanceAnalysis" jdbcType="VARCHAR" />
     <result column="maintenance_customer_id" property="maintenanceCustomerId" jdbcType="INTEGER" />
-    <result column="maintenance_id_repair" property="maintenanceIdRepair" jdbcType="BIT" />
-    <result column="maintenance_content" property="maintenanceContent" jdbcType="VARCHAR" />
+    <result column="maintenance_id_repair" property="maintenanceIdRepair" jdbcType="INTEGER" />
     <result column="maintenance_content_date" property="maintenanceContentDate" jdbcType="TIMESTAMP" />
     <result column="maintenance_create_time" property="maintenanceCreateTime" jdbcType="TIMESTAMP" />
     <result column="maintenance_update_time" property="maintenanceUpdateTime" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
-    maintenance_id, detect_id, maintenance_equipment_number, maintenance_product_type, 
-    maintenance_product_number, maintenance_results, maintenance_state, maintenance_analysis, 
-    maintenance_customer_id, maintenance_id_repair, maintenance_content, maintenance_content_date, 
+    maintenance_id, detect_id, maintenance_equipment_number, product_id,
+    maintenance_product_number, maintenance_state, maintenance_analysis,
+    maintenance_customer_id, maintenance_id_repair,maintenance_content_date,
     maintenance_create_time, maintenance_update_time
   </sql>
   <select id="getMaintenanceByid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -31,17 +29,17 @@
   </select>
   <insert id="insert" parameterType="ComplaintMaintenanceInfo" >
     insert into tb_rst_complaint_maintenance (maintenance_id, detect_id, maintenance_equipment_number, 
-      maintenance_product_type, maintenance_product_number, 
-      maintenance_results, maintenance_state, maintenance_analysis, 
+      product_id, maintenance_product_number,
+      maintenance_state, maintenance_analysis,
       maintenance_customer_id, maintenance_id_repair, 
-      maintenance_content, maintenance_content_date, 
+      maintenance_content_date,
       maintenance_create_time, maintenance_update_time
       )
     values (#{maintenanceId,jdbcType=INTEGER}, #{detectId,jdbcType=INTEGER}, #{maintenanceEquipmentNumber,jdbcType=INTEGER}, 
-      #{maintenanceProductType,jdbcType=BIT}, #{maintenanceProductNumber,jdbcType=VARCHAR}, 
-      #{maintenanceResults,jdbcType=VARCHAR}, #{maintenanceState,jdbcType=BIT}, #{maintenanceAnalysis,jdbcType=VARCHAR}, 
-      #{maintenanceCustomerId,jdbcType=INTEGER}, #{maintenanceIdRepair,jdbcType=BIT}, 
-      #{maintenanceContent,jdbcType=VARCHAR}, #{maintenanceContentDate,jdbcType=TIMESTAMP}, 
+      #{productId,jdbcType=BIT}, #{maintenanceProductNumber,jdbcType=VARCHAR},
+      #{maintenanceState,jdbcType=INTEGER}, #{maintenanceAnalysis,jdbcType=VARCHAR},
+      #{maintenanceCustomerId,jdbcType=INTEGER}, #{maintenanceIdRepair,jdbcType=INTEGER},
+      #{maintenanceContentDate,jdbcType=TIMESTAMP},
       #{maintenanceCreateTime,jdbcType=TIMESTAMP}, #{maintenanceUpdateTime,jdbcType=TIMESTAMP}
       )
   </insert>
@@ -55,17 +53,14 @@
       <if test="maintenanceEquipmentNumber != null" >
         maintenance_equipment_number = #{maintenanceEquipmentNumber,jdbcType=INTEGER},
       </if>
-      <if test="maintenanceProductType != null" >
-        maintenance_product_type = #{maintenanceProductType,jdbcType=BIT},
+      <if test="productId != null" >
+        product_id = #{productId,jdbcType=BIT},
       </if>
       <if test="maintenanceProductNumber != null" >
         maintenance_product_number = #{maintenanceProductNumber,jdbcType=VARCHAR},
       </if>
-      <if test="maintenanceResults != null" >
-        maintenance_results = #{maintenanceResults,jdbcType=VARCHAR},
-      </if>
       <if test="maintenanceState != null" >
-        maintenance_state = #{maintenanceState,jdbcType=BIT},
+        maintenance_state = #{maintenanceState,jdbcType=INTEGER},
       </if>
       <if test="maintenanceAnalysis != null" >
         maintenance_analysis = #{maintenanceAnalysis,jdbcType=VARCHAR},
@@ -74,10 +69,7 @@
         maintenance_customer_id = #{maintenanceCustomerId,jdbcType=INTEGER},
       </if>
       <if test="maintenanceIdRepair != null" >
-        maintenance_id_repair = #{maintenanceIdRepair,jdbcType=BIT},
-      </if>
-      <if test="maintenanceContent != null" >
-        maintenance_content = #{maintenanceContent,jdbcType=VARCHAR},
+        maintenance_id_repair = #{maintenanceIdRepair,jdbcType=INTEGER},
       </if>
       <if test="maintenanceContentDate != null" >
         maintenance_content_date = #{maintenanceContentDate,jdbcType=TIMESTAMP},

+ 50 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml

@@ -40,11 +40,56 @@
     renewed_desc, renewed_state, renewed_alipay, renewed_is_transfer, renewed_create_time, 
     renewed_update_time
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-    select 
-    <include refid="Base_Column_List" />
-    from tb_rst_renewed
-    where renewed_id = #{renewedId,jdbcType=INTEGER}
+
+  <!-- 获取换新详情和品质检测信息 -->
+  <select id="getRenewedInfo" parameterType="Renewed" resultType="Renewed">
+    select
+      r.*,
+      d.detect_state detectState,
+      d.detect_phenomenon detectPhenomenon,
+      d.detect_failure_classification detectFailureClassification,
+      d.detect_failure_cause detectFailureCause,
+      d.detect_results detectResults,
+      d.detect_point detectPoint,
+      d.detect_analysis detectAnalysis,
+      d.detect_revolution_produced detectRevolutionProduced,
+      m.maintenance_id_repair maintenanceIdRepair,
+      m.maintenance_content maintenanceContent,
+      m.maintenance_content_date maintenanceContentDate,
+      p.closed_prodcue_number closedProdcueNumber,
+      pi.product_name productName
+    from
+      tb_rst_renewed r
+    LEFT JOIN tb_rst_complaint_detect d ON r.customer_id = d.customer_id
+    LEFT JOIN tb_rst_complaint_maintenance m ON d.detect_id = m.detect_id
+    LEFT JOIN tb_rst_closed_prodcue p ON p.relation_id = r.renewed_id
+    LEFT JOIN tb_rst_product_info pi ON p.product_id = pi.product_id
+    <where>
+      <if test="renewedId != null and renewedId != ''">
+        renewed_id = #{renewedId}
+      </if>
+      <if test="customerId != null and customerId != ''">
+        and r.customer_id = #{customerId}
+      </if>
+      <if test="renewedState != null and renewedState != ''">
+        and r.renewed_state = #{renewedState}
+      </if>
+    </where>
+  </select>
+
+  <!-- 获取寄回配件集合 -->
+  <select id="listClosedFitting" parameterType="ClosedFitting" resultType="ClosedFitting">
+    select
+      cf.closed_fitting_number closedFittingNumber,
+      pf.fittings_name fittingName
+    from
+      tb_rst_closed_fitting cf
+    LEFT JOIN tb_rst_product_fittings pf ON cf.fittings_id = pf.fittings_id
+    <where>
+      <if test="relationId != null and relationId != ''">
+        relation_id = #{relationId}
+      </if>
+    </where>
   </select>
 
   <!-- 查询售后换新集合 -->

+ 38 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -26,7 +26,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
 import java.util.Date;
 import java.util.List;
 
@@ -56,8 +55,12 @@ public class AdminCustomerController {
     @Autowired
     private QuestionDescribeService questionDescribeService;
     @Autowired
+    private RenewedService renewedService;
+
+    @Autowired
     private FittingsInfoService fittingsInfoService;
 
+
     /**
      * 获取客诉列表
      *
@@ -436,5 +439,39 @@ public class AdminCustomerController {
         rj.addResponseKeyValue("describe", describe);
         return rj;
     }
+
+    /**
+     * 获取换新详情
+     * @param request
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:get:renewed")
+    @RequestMapping("/get_renewed_info")
+    public ResponseJson getRenewedInfo(HttpServletRequest request) {
+        String customerId = request.getParameter("customerId");
+        if (!StringUtils.isNotEmpty(customerId)) {
+            return new ResponseJson(500, "该客诉信息不存在!", 500);
+        }
+        Renewed renewed = new Renewed();
+        renewed.setCustomerId(Integer.parseInt(customerId));
+        renewed.setRenewedState(1);
+        //获取换新详情和检测信息
+        renewed = renewedService.getRenewedInfo(renewed);
+        if (renewed == null) {
+            return new ResponseJson(500, "该客诉没有换新信息!", 500);
+        } else {
+            ClosedFitting closedFitting = new ClosedFitting();
+            closedFitting.setRelationId(renewed.getRenewedId());
+            //获取寄回配件集合
+            List<ClosedFitting> fittingList = renewedService.listClosedFitting(closedFitting);
+            if (fittingList != null && fittingList.size() > 0) {
+                renewed.setClosedFittings(fittingList);
+            }
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("renewed", renewed);
+            return rj;
+        }
+    }
 }
 

+ 130 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -170,5 +170,135 @@ public class AdminDetectController {
         }
         return msg;
     }
+
+    /**
+     * 跳转到添加检测备注页面
+     *
+     * @return
+     */
+    @RequiresPermissions("info:update:info")
+    @RequestMapping(value = "/to_add_remark")
+    public ModelAndView toAddRemark(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/add_remark");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return null;
+        }
+        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectInfo",detectInfo);
+        return mv;
+    }
+
+    /**
+     * 跳转到添加修改转入信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("remark:add:remark")
+    @RequestMapping(value = "/to_produced_info")
+    public ModelAndView toProducedInfo(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/update_produced_info");
+        String detectId = request.getParameter("detectId");
+        String state = request.getParameter("state");
+        if(detectId == null || detectId.equals("")){
+            return null;
+        }
+        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectInfo",detectInfo);
+        mv.addObject("state",state);
+        return mv;
+    }
+
+    /**
+     * 跳转到检测完成页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_detect_complete")
+    public ModelAndView toDetectComplete(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/detect_complete");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return null;
+        }
+        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectInfo",detectInfo);
+        return mv;
+    }
+
+
+    /**
+     * 添加/修改检测信息
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("remark:add:remark")
+    @ResponseBody
+    @RequestMapping("/add_remark")
+    public ResponseJson addRemark(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(detectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(detectInfo.getDetectId() == null || detectInfo.getDetectId().equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(detectInfo.getDetectIsMaintenance() == 2){ //选择不需要转入时 detect_revolution_produced 统一改为待转入
+            detectInfo.setDetectRevolutionProduced(1);
+        }
+        Integer num = complaintDetectInfoService.updateComplaintDetectById(detectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
+     * 检测完成
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("complete:update:complete")
+    @ResponseBody
+    @RequestMapping("/detect_complete")
+    public ResponseJson detect_complete(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(detectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(detectInfo.getDetectId() == null || detectInfo.getDetectId().equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(detectInfo.getDetectIsMaintenance() == 2){ //选择不需要转入时 detect_revolution_produced 统一改为待转入
+            detectInfo.setDetectRevolutionProduced(1);
+        }
+        Integer num = complaintDetectInfoService.updateComplaintDetect(detectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
 }
 

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/PtsCodeController.java

@@ -87,7 +87,7 @@ public class PtsCodeController {
             if(phones.get(i).length() != 11){
                 return "快递公司出错,请检查文档内的数据是否正常!";
             }
-            String text = MessageFormat.format(SEND_NOTICE_INFORM2, autograph);
+            String text = MessageFormat.format(SEND_NOTICE_INFORM, autograph);
             msg = smsService.sendOtherCMS(phones.get(i),text);
             if(msg.equals("SUCCESS")){
                 successNumber++;

+ 356 - 26
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -18,6 +18,7 @@
         .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
         .barcodeImg{margin:10px 0px}
         .table-bg thead th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
         /*input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/rst/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(/rst/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}*/
     </style>
@@ -205,7 +206,193 @@
 				<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="hide_this(this)" href="javascript:;"></a>
 		</span>
         </div>
-        <!-- 查看已完成回访内容end -->
+        <!-- 查看问题描述内容end -->
+        <!-- 换新处理start -->
+        <div class="layui-layer layui-anim layui-layer-iframe" id="update-renewed-info" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 700px; height: 700px; position: absolute; top: 100px; left: 250px;text-align: left;">
+            <form action="" name="form-visit-finish" method="post" class="form form-horizontal" id="form-visit-finish">
+                <div class="layui-layer-title" id="synOrder" style="cursor: move;" move="ok">换新处理</div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;当前进度:</label>
+                        <label id="renewedSchedule"></label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls renewed_back_status">
+                        <label><span class="c-red">*</span>&nbsp;客户已寄回:</label>
+                        <input type="radio" name="renewedBackStatus" value="1"/><label>未寄回&nbsp;&nbsp;</label>
+                        <input type="radio" name="renewedBackStatus" value="2"/><label>已寄回&nbsp;&nbsp;</label>
+                        <input type="radio" name="renewedBackStatus" value="3"/><label>已收货&nbsp;&nbsp;</label>
+                    </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回物流:</label>
+                        <select name="renewedBackLogisticsCompany" id="renewedBackLogisticsCompany" style="height: 30px;width: 100px;">
+                            <option value="sto">申通快递</option>
+                            <option value="yto">圆通快递</option>
+                            <option value="sf">顺丰快递</option>
+                            <option value="ems">邮政EMS</option>
+                            <option value="zto">中通快递</option>
+                            <option value="zjs">宅急送</option>
+                            <option value="yunda">韵达快递</option>
+                            <option value="cces">cces快递</option>
+                            <option value="pick">上门提货</option>
+                            <option value="htky">汇通快递</option>
+                            <option value="ttkdex">天天快递</option>
+                            <option value="stars">星晨急便</option>
+                            <option value="jd">京东快递</option>
+                            <option value="01">其他</option>
+                            <option value="02">上门送货</option>
+                        </select>
+                        <input type="text" id="renewedBackLogisticsNo" class="input-text" value="" style="width: 150px;" name="renewedBackLogisticsNo">
+                        <input type="text" id="renewedBackPostage" class="input-text" value="" style="width: 150px;" name="renewedBackPostage">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回信息:</label>
+                        <input type="text" id="renewedBackName" class="input-text" value="" style="width: 150px;" name="renewedBackName">
+                        <input type="text" id="renewedBackTel" class="input-text" value="" style="width: 150px;" name="renewedBackTel">
+                        <input type="text" id="renewedBackMachineNo" class="input-text" value="" style="width: 150px;" name="renewedBackMachineNo">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄送产品:</label>
+                        <div id="renewedProduct" class="update-parts"></div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <hr/>
+                <div style="margin-left: 10px;">
+                    <div class="formControls renewed_send_status" style="margin-top: 10px;">
+                        <label>是否已寄送:</label>
+                        <input type="radio" name="renewedSendStatus" value="1"/><label>未寄出&nbsp;&nbsp;</label>
+                        <input type="radio" name="renewedSendStatus" value="2"/><label>已寄出&nbsp;&nbsp;</label>
+                        <input type="radio" name="renewedSendStatus" value="3"/><label>已收货&nbsp;&nbsp;</label>
+                        <label>Efast订单号:</label>
+                        <label id="renewedBackEfastOrderId"></label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;用户地址:</label>
+                        <input type="text" id="renewedSendName" class="input-text" value="" style="width: 150px;" name="renewedSendName">
+                        <input type="text" id="renewedSendTel" class="input-text" value="" style="width: 150px;" name="renewedSendTel">
+                    </div>
+                    <div class="formControls">
+                        <select id="provinceNumber" name="provinceNumber" style="height: 30px;width: 100px;" onchange=""></select>
+                        <select id="cityNumber" name="cityNumber" style="height: 30px;width: 100px;" onchange=""></select>
+                        <select id="areaNumber" name="areaNumber" style="height: 30px;width: 100px;" onchange=""></select>
+                    </div>
+                    <div class="formControls">
+                        <textarea id="renewedSendAddress" name="renewedSendAddress" cols="" rows="" style="width: 500px;height: 70px;" class="textarea" ></textarea>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄出物流:</label>
+                        <select name="renewedSendLogisticsCompany" id="renewedSendLogisticsCompany" style="height: 30px;width: 100px;">
+                            <option value="sto">申通快递</option>
+                            <option value="yto">圆通快递</option>
+                            <option value="sf">顺丰快递</option>
+                            <option value="ems">邮政EMS</option>
+                            <option value="zto">中通快递</option>
+                            <option value="zjs">宅急送</option>
+                            <option value="yunda">韵达快递</option>
+                            <option value="cces">cces快递</option>
+                            <option value="pick">上门提货</option>
+                            <option value="htky">汇通快递</option>
+                            <option value="ttkdex">天天快递</option>
+                            <option value="stars">星晨急便</option>
+                            <option value="jd">京东快递</option>
+                            <option value="01">其他</option>
+                            <option value="02">上门送货</option>
+                        </select>
+                        <input type="text" id="renewedSendLogisticsNo" class="input-text" value="" style="width: 150px;" name="renewedSendLogisticsNo">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;备注:</label>
+                        <input type="text" id="renewedDesc" class="input-text" value="" style="width: 150px;" name="renewedDesc">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <hr/>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;QC进度:</label>
+                        <div>
+                            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                                <tr>
+                                    <th>工厂检测现象</th>
+                                    <th>故障分类</th>
+                                    <th>故障原因</th>
+                                    <th>判定结果</th>
+                                    <th>故障指向</th>
+                                    <th>原因分析</th>
+                                    <th>生产维修</th>
+                                </tr>
+                                <tr>
+                                    <td id="detectPhenomenon"></td>
+                                    <td id="detectFailureClassification"></td>
+                                    <td id="detectFailureCause"></td>
+                                    <td id="detectResults"></td>
+                                    <td id="detectPoint"></td>
+                                    <td id="detectAnalysis"></td>
+                                    <td id="detectRevolutionProduced"></td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;返修进度:</label>
+                        <div>
+                            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                                <tr>
+                                    <th>是否可返修</th>
+                                    <th>返修内容</th>
+                                    <th>返修日期</th>
+                                </tr>
+                                <tr>
+                                    <td id="maintenanceIdRepair"></td>
+                                    <td id="maintenanceContent"></td>
+                                    <td id="maintenanceContentDate"></td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label>
+                            寄送产品将自动推送Efast,系统自动获取物流信息,并更新。<br/>
+                            如果在Efast作废订单等操作后,无法获取物流信息,请手动填写物流信息。
+                        </label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div class="col-9 col-offset-3">
+                    <input class="btn btn-primary radius" onclick="updateVisitInfo();" type="button" value="&nbsp;&nbsp;确认&nbsp;&nbsp;">
+                </div>
+            </form>
+            <span class="layui-layer-setwin">
+				<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="hide_this(this)" href="javascript:;"></a>
+		</span>
+        </div>
+        <!-- 换新处理start -->
         <form action="${path}/admin/customer/select_customer_list" method="post">
             <button type="button" style="cursor:pointer; float: left;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
             <input type="text" class="my-input"  style="width:100px;margin-right: 0px;" value="${customerId!}" placeholder="客户姓名" id="customerName" name="customerName">
@@ -309,29 +496,31 @@
                                     未解决
                                 <#elseif customer.customerIsSolve == 3>
                                     换新(
-                                    <#if customer.backStatus == 1>
-                                        未寄回
-                                    <#elseif customer.backStatus == 2>
-                                        已寄回
-                                    <#elseif customer.backStatus == 3>
-                                        已收货
-                                    </#if>,
-                                    <#if customer.sendStatus == 1>
-                                        未寄送
-                                    <#elseif customer.sendStatus == 2>
-                                        已寄送
-                                    <#elseif customer.sendStatus == 3>
-                                        已收货
-                                    </#if>,
-                                    <#if customer.detectState == 1>
-                                        待仓库转入
-                                    <#elseif customer.detectState == 2>
-                                        正在检查
-                                    <#elseif customer.detectState == 3>
-                                        检查通过
-                                    <#elseif customer.detectState == 4>
-                                        检查未通过
-                                    </#if>
+                                    <a style="text-decoration:none" href="javascript:void(0);" onclick="get_renewed_info(${customer.customerId!''})">
+                                        <#if customer.backStatus == 1>
+                                            未寄回
+                                        <#elseif customer.backStatus == 2>
+                                            已寄回
+                                        <#elseif customer.backStatus == 3>
+                                            已收货
+                                        </#if>,
+                                        <#if customer.sendStatus == 1>
+                                            未寄送
+                                        <#elseif customer.sendStatus == 2>
+                                            已寄送
+                                        <#elseif customer.sendStatus == 3>
+                                            已收货
+                                        </#if>,
+                                        <#if customer.detectState == 1>
+                                            待仓库转入
+                                        <#elseif customer.detectState == 2>
+                                            正在检查
+                                        <#elseif customer.detectState == 3>
+                                            检查通过
+                                        <#elseif customer.detectState == 4>
+                                            检查未通过
+                                        </#if>
+                                    </a>
                                     )
                                 <#elseif customer.customerIsSolve == 4>
                                     维修(
@@ -430,9 +619,9 @@
                                         </a>&nbsp;
                                     </#if>
                                 </#if>
-                                <a style="text-decoration:none" href="javascript:void(0);" title="修改客诉信息" onclick="admin_update_customer(${customer.customerId!''})">
+                                <#--<a style="text-decoration:none" href="javascript:void(0);" title="修改客诉信息" onclick="admin_update_customer(${customer.customerId!''})">
                                     <i class="Hui-iconfont">修改客诉信息</i>
-                                </a>&nbsp;
+                                </a>&nbsp;-->
                                 <#if customer.customerIsVisit == "1">
                                     <a style="text-decoration:none" href="javascript:void(0)" title="需要回访" onclick="showVisit(${customer.customerId!''})">
                                         <i class="Hui-iconfont">需要回访</i>
@@ -668,6 +857,147 @@
         });
     }
 
+    function get_renewed_info(customerId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":customerId},
+            url: "${path}/admin/customer/get_renewed_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+
+                    var renewed = data.returnMsg.renewed;
+
+                    getProvince();
+                    getCity(renewed.provinceNumber);
+                    getDistrict(renewed.cityNumber);
+                    console.log(renewed);
+                    var renewedSchedule = '';
+                    switch (renewed.renewedBackStatus) {
+                        case 1:renewedSchedule += '待寄回,';break;
+                        case 2:renewedSchedule += '已寄回,';break;
+                        case 3:renewedSchedule += '已收货,';break;
+                    }
+                    switch (renewed.renewedSendStatus) {
+                        case 1:renewedSchedule += '待寄送,';break;
+                        case 2:renewedSchedule += '已寄送,';break;
+                        case 3:renewedSchedule += '已收货,';break;
+                    }
+                    switch (renewed.detectState) {
+                        case 1:renewedSchedule += '待仓库转入';break;
+                        case 2:renewedSchedule += '正在检查';break;
+                        case 3:renewedSchedule += '检查通过';break;
+                        case 3:renewedSchedule += '检查未通过';break;
+                    }
+                    var renewedProduct = '';
+                    if (renewed.productName != null && renewed.productName != '') {
+                        renewedProduct += '<span>'+ renewed.productName + '*' + renewed.closedProdcueNumber + '</span>';
+                    }
+                    if (renewed.closedFittings != null && renewed.length > 0) {
+                        $.each(renewed.closedFittings,function(index,element){
+                            renewedProduct += '<span>'+ this.fittingName + '*' + this.closedFittingNumber + '</span>';
+                        })
+                    }
+                    $(".renewed_back_status input[value='"+ renewed.renewedBackStatus +"']").attr("checked",true);
+                    $(".renewed_send_status input[value='"+ renewed.renewedSendStatus +"']").attr("checked",true);
+                    $('#renewedSchedule').html(renewedSchedule);
+                    $('#renewedProduct').val(renewedProduct);
+                    $("#renewedBackLogisticsCompany option[value='" + renewed.renewedBackLogisticsCompany + "']").attr("selected","true");
+                    $("#renewedSendLogisticsCompany option[value='" + renewed.renewedSendLogisticsCompany + "']").attr("selected","true");
+
+                    $("#provinceNumber option[value='" + renewed.provinceNumber + "']").attr("selected","true");
+                    $("#cityNumber option[value='" + renewed.cityNumber + "']").attr("selected","true");
+                    $("#areaNumber option[value='" + renewed.areaNumber + "']").attr("selected","true");
+                    $('#renewedBackLogisticsNo').val(renewed.renewedBackLogisticsNo);
+                    $('#renewedBackPostage').val(renewed.renewedBackPostage);
+                    $('#renewedBackName').val(renewed.renewedBackName);
+                    $('#renewedBackTel').val(renewed.renewedBackTel);
+                    $('#renewedBackMachineNo').val(renewed.renewedBackMachineNo);
+                    $('#renewedBackEfastOrderId').html(renewed.renewedBackEfastOrderId);
+                    $('#renewedSendName').val(renewed.renewedSendName);
+                    $('#renewedSendTel').val(renewed.renewedSendTel);
+                    $('#renewedSendAddress').val(renewed.renewedSendAddress);
+                    $('#renewedSendLogisticsNo').val(renewed.renewedSendLogisticsNo);
+                    $('#renewedDesc').val(renewed.renewedDesc);
+                    $('#detectPhenomenon').val(renewed.detectPhenomenon);
+                    $('#detectFailureClassification').val(renewed.detectFailureClassification);
+                    $('#detectFailureCause').val(renewed.detectFailureCause);
+                    $('#detectResults').val(renewed.detectResults);
+                    $('#detectPoint').val(renewed.detectPoint);
+                    $('#detectAnalysis').val(renewed.detectAnalysis);
+                    $('#detectRevolutionProduced').val(renewed.detectRevolutionProduced);
+                    $('#maintenanceIdRepair').val(renewed.maintenanceIdRepair);
+                    $('#maintenanceContent').val(renewed.maintenanceContent);
+                    $('#maintenanceContentDate').val(renewed.maintenanceContentDate);
+                    $('#update-renewed-info').show();
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+    /**
+     * 获取省
+     */
+    function getProvince() {
+        var province = listProvince();
+        if(province!=null){
+            var provinceHtml = '';
+            for(var i=0;i<province.length;i++){
+                provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
+            }
+            $('#provinceNumber').append(provinceHtml);
+        }
+    }
+
+    /**
+     * 获取市
+     */
+    function getCity(provineceId) {
+        var city = listCity(provineceId,'');
+        if(city!=null){
+            var cityHtml = '';
+            for(var i=0;i<city.length;i++){
+                cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
+            }
+            $('#cityNumber').append(cityHtml);
+        }
+    }
+
+    /**
+     * 获取区
+     */
+    function getDistrict(cityId) {
+        var district = listDistrict(cityId,'');
+        if(district!=null){
+            var districtHtml = '';
+            for(var i=0;i<district.length;i++){
+                districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
+            }
+            $('#areaNumber').append(districtHtml);
+        }
+    }
+
+    /*监听省选择事件*/
+    $(document).on('change', '#provinceNumber', function() {
+        var proId = $("#provinceNumber").val();
+        $('#cityNumber option').remove();
+        getCity(proId);
+        var cityId = $("#cityNumber").val();
+        $('#areaNumber option').remove();
+        getDistrict(cityId);
+    });
+
+    /*监听市选择事件*/
+    $(document).on('change', '#cityNumber', function() {
+        var city = $("#cityNumber").val();
+        $('#areaNumber option').remove();
+        getDistrict(city);
+    });
+
+
 </script>
 </body>
 </html>

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

@@ -204,7 +204,9 @@
             success: function(data){
                 if (data.returnCode == 200) {
                     layer.msg('添加成功',{icon: 1,time:1000},function () {
-                        location.replace(location.href);
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
                     });
                 } else {
                     layer.msg('添加失败',{icon: 5,time:1000});

+ 85 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl

@@ -0,0 +1,85 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>修改备注 - H-ui.filter v2.4</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/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(/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box"   style="text-align:center;">
+            <span class="input-dic spanhidth">备注</span>
+            <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+
+        </div>
+        <div style="text-align:center;">
+            <span>如果转入生产,则生产部门同事可查看!</span>
+        </div>
+        <div style="text-align:center;">
+
+            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+           <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+
+    function  add() {
+        var detectDesc = $("#detectDesc").val();
+        if( detectDesc != null){
+            if( detectDesc.length > 200 ){
+                layer.msg('备注长度不得大于100个字符',{icon: 5,time:1000});
+                return;
+            }
+        }
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/add_remark",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('修改成功',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('修改失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('修改错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 197 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl

@@ -0,0 +1,197 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>检测完成</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        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;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">检测结果</span>
+            <label for="radio-3">
+                <input type="radio" id="radio-3" name="detectState" value="3" checked/>检测通过
+            </label>
+            <label for="radio-4" style="margin-left: 50px;">
+                <input type="radio" id="radio-4" name="detectState" value="4"/>检测未通过
+            </label>
+        </div>
+
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon" ${detectInfo.detectPhenomenon!''} class="my-textarea" placeholder="工厂检测现象"></textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification" ${detectInfo.detectFailureClassification!''} class="my-textarea" placeholder="故障分类"></textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause" ${detectInfo.detectFailureCause!''} class="my-textarea" placeholder="故障原因"></textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectResults" id="detectResults" ${detectInfo.detectResults!''} class="my-textarea" placeholder="判定结果"></textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint" ${detectInfo.detectPoint!''} class="my-textarea" placeholder="故障指向"></textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis" ${detectInfo.detectAnalysis!''} class="my-textarea" placeholder="原因分析"></textarea>
+        </div>
+
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">是否需要转入生产部门</span>
+            <label for="radio-5">
+                <input type="radio" id="radio-5" name="detectIsMaintenance" onclick="show()" value="1" checked/>需要转入生产部门
+            </label>
+            <label for="radio-6" style="margin-left: 50px;">
+                <input type="radio" id="radio-6" name="detectIsMaintenance" onclick="hide()" value="2"/>不需要转入生产部门
+            </label>
+        </div>
+        <div class="input-box" id="revolutionProducedId">
+            <span class="input-dic" style="margin-top: 0">立即转入生产部门</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-7" name="detectRevolutionProduced" value="2" checked/>立即转入
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-8" name="detectRevolutionProduced" value="1"/>以后转入
+            </label>
+        </div>
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">QC检查状态</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-9" name="maintenanceResults" value="1" checked/>通过
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-10" name="maintenanceResults" value="2"/>不通过
+            </label>
+        </div>
+        <div class="input-box">
+            <span class="input-dic spanhidth">备注</span>
+            <textarea rows="3" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+        </div>
+        <div>
+            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+           <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+    function hide() {
+        $("#revolutionProducedId").hide();
+    }
+    function show() {
+        $("#revolutionProducedId").show();
+    }
+
+    function  add() {
+
+        var detectPhenomenon = $("#detectPhenomenon").val();
+        if( detectPhenomenon == null || detectPhenomenon == "" ){
+            layer.msg('请输入工厂检测现象',{icon: 5,time:1000});
+            return;
+        }
+        if( detectPhenomenon.length > 300 ){
+            layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
+            return;
+        }
+        var detectFailureClassification = $("#detectFailureClassification").val();
+        if( detectFailureClassification == null || detectFailureClassification == "" ){
+            layer.msg('请输入故障分类',{icon: 5,time:1000});
+            return;
+        }
+        if( detectFailureClassification.length > 50 ){
+            layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
+            return;
+        }
+        var detectFailureCause = $("#detectFailureCause").val();
+        if( detectFailureCause == null || detectFailureCause == "" ){
+            layer.msg('请输入故障原因',{icon: 5,time:1000});
+            return;
+        }
+        if( detectFailureCause.length > 100 ){
+            layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectResults = $("#detectResults").val();
+        if( detectResults == null || detectResults == "" ){
+            layer.msg('请输入判定结果',{icon: 5,time:1000});
+            return;
+        }
+        if( detectResults.length > 100 ){
+            layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectPoint = $("#detectPoint").val();
+        if( detectPoint == null || detectPoint == "" ){
+            layer.msg('请输入故障指向',{icon: 5,time:1000});
+            return;
+        }
+        if( detectPoint.length > 100 ){
+            layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectAnalysis = $("#detectAnalysis").val();
+        if( detectAnalysis == null || detectAnalysis == "" ){
+            layer.msg('请输入原因分析',{icon: 5,time:1000});
+            return;
+        }
+        if( detectAnalysis.length > 100 ){
+            layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/detect_complete",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('检测完成',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('检测完成失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('检测错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 34 - 11
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

@@ -3,6 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <title></title>
+<#include "/base/list_base.ftl">
     <style>
         *{padding: 0;margin: 0;}
         .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 25px;margin-right: 5px;}
@@ -14,7 +15,6 @@
         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;}
     </style>
-<#include "/base/list_base.ftl">
 </head>
 <body>
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
@@ -96,24 +96,38 @@
                     <td class="text-c" width="100">${detect.detectAnalysis!}</td>
                     <td class="text-c" width="100">${detect.customerId!}</td>
                     <td class="text-c" width="100">
-                        <#if detect.detectRevolutionProduced == 1>
-                            待转入
-                        </#if>
-                        <#if detect.detectRevolutionProduced == 2>
-                            已转入
-                        </#if>
-                        <#if detect.detectRevolutionProduced == 3>
+                        <#if detect.detectIsMaintenance == 2>
                             不需要转入
+                        <#else >
+                            <#if detect.detectRevolutionProduced == 1>
+                                待转入
+                            </#if>
+                            <#if detect.detectRevolutionProduced == 2>
+                                已转入
+                            </#if>
                         </#if>
                     </td>
                     <td class="text-c" width="100">${detect.detectDesc!}</td>
                     <td class="text-c" width="100">${(detect.detectDate?string("yyyy-MM-dd"))!''}</td>
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c">
-                        <#--<a style="text-decoration:none" href="javascript:;" title="修改"
-                           onclick="edit_detail('${path}/admin/equipment/_update_device?deviceId=${device.deviceId!}');">
+                        <a style="text-decoration:none" href="javascript:;" title="修改备注"
+                           onclick="add_remark('修改备注','${path}/admin/detect/to_add_remark?detectId=${detect.detectId!''}','570','450');">
                             <i class="Hui-iconfont">&#xe6df;</i>
-                        </a>-->
+                        </a>
+                        <#if detect.detectIsMaintenance == 2>
+                            <a style="text-decoration:none" href="javascript:;" title="需要转入生产"
+                               onclick="update_info('需要转入生产','${path}/admin/detect/to_produced_info?detectId=${detect.detectId!''}&state=1','570','450');">
+                                <i class="Hui-iconfont">&#xe644;</i>
+                            </a>
+                        <#else >
+                            <#if detect.detectRevolutionProduced == 1>
+                                <a style="text-decoration:none" href="javascript:;" title="转入生产"
+                                   onclick="update_info('转入生产','${path}/admin/detect/to_detect_complete?detectId=${detect.detectId!''}&state=2','570','450');">
+                                    <i class="Hui-iconfont">&#xe645;</i>
+                                </a>
+                            </#if>
+                        </#if>
                     </td>
                 </tr>
                 </#list>
@@ -132,6 +146,15 @@
     function add_detect(title,url,w,h){
         layer_show(title,url,w,h);
     }
+    /*修改备注*/
+    function add_remark(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+    /*转入生产*/
+    function update_info(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+
 </script>
 </body>
 </html>

+ 127 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_produced_info.ftl

@@ -0,0 +1,127 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>修改备注 - H-ui.filter v2.4</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/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(/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">当前状态为:</span>
+            <label for="radio-7">
+                <#if detectInfo.detectIsMaintenance == 1>
+                    需要转入生产部门
+                </#if>
+                <#if detectInfo.detectIsMaintenance == 2>
+                    不需要转入生产部门
+                </#if>
+            </label>
+        </div>
+
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">转入生产部门</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-1" name="detectIsMaintenance" onclick="show();" value="1" checked/>需要转入生产部门
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-2" name="detectIsMaintenance" onclick="hide();" value="2"/>不需要转入生产部门
+            </label>
+        </div>
+        <div class="input-box" id="revolutionProducedId">
+            <span class="input-dic" style="margin-top: 0">已转入生产部门</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-3" name="detectRevolutionProduced" value="2"
+                <#if state == '2'>
+                       checked
+                </#if>/>已转入生产部门
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-4" name="detectRevolutionProduced" value="1"
+                <#if state == '1'>
+                       checked
+                </#if>/>未转入生产部门
+            </label>
+        </div>
+
+        <div class="input-box"   style="text-align:center;">
+            <span class="input-dic spanhidth">备注</span>
+            <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+
+        </div>
+        <div style="text-align:center;">
+            <span>如果转入生产,则生产部门同事可查看!</span>
+        </div>
+        <div style="text-align:center;">
+
+            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+           <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    function hide() {
+        $("#revolutionProducedId").hide();
+    }
+    function show() {
+        $("#revolutionProducedId").show();
+    }
+
+    function  add() {
+        var detectDesc = $("#detectDesc").val();
+        if( detectDesc != null){
+            if( detectDesc.length > 200 ){
+                layer.msg('备注长度不得大于100个字符',{icon: 5,time:1000});
+                return;
+            }
+        }
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/add_remark",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('修改成功',{icon: 1,time:1000},function () {
+                        location.replace(location.href);
+                    });
+                } else {
+                    layer.msg('修改失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('修改错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>