liujiankang преди 6 години
родител
ревизия
6355031739
променени са 23 файла, в които са добавени 1760 реда и са изтрити 124 реда
  1. 55 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java
  2. 34 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/DetectionConfig.java
  3. 52 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/DetectionItem.java
  4. 43 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/MaterialItem.java
  5. 49 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/QcInfo.java
  6. 77 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/TreatmentRecordLog.java
  7. 85 1
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java
  8. 35 30
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  9. 241 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
  10. 81 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java
  11. 102 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml
  12. 157 3
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  13. 2 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java
  14. 5 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/InventoryController.java
  15. 5 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  16. 11 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  17. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_QC.ftl
  18. 47 4
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/complete_maintenance.ftl
  19. 83 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl
  20. 54 44
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  21. 244 12
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl
  22. 287 14
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_detect.ftl
  23. 10 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/update_sender.ftl

+ 55 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java

@@ -80,6 +80,13 @@ public class ComplaintDetectInfo implements Serializable {
     private String signclosedAddrCityName;//市
     private String signclosedAddrAreaName;//区
 
+    private String[] configli1;//检测现象集合
+    private String[] configli2;//故障原因集合
+    private String[] configli3;//判定结果集合
+    private String[] configli4;//故障指向集合
+    private String[] configli5;//原因分析集合
+    private String[] configli6;//维修配件集合
+
     public Integer getDetectId() {
         return detectId;
     }
@@ -479,4 +486,52 @@ public class ComplaintDetectInfo implements Serializable {
     public void setSignclosedAddrAreaName(String signclosedAddrAreaName) {
         this.signclosedAddrAreaName = signclosedAddrAreaName;
     }
+
+    public String[] getConfigli1() {
+        return configli1;
+    }
+
+    public void setConfigli1(String[] configli1) {
+        this.configli1 = configli1;
+    }
+
+    public String[] getConfigli2() {
+        return configli2;
+    }
+
+    public void setConfigli2(String[] configli2) {
+        this.configli2 = configli2;
+    }
+
+    public String[] getConfigli3() {
+        return configli3;
+    }
+
+    public void setConfigli3(String[] configli3) {
+        this.configli3 = configli3;
+    }
+
+    public String[] getConfigli4() {
+        return configli4;
+    }
+
+    public void setConfigli4(String[] configli4) {
+        this.configli4 = configli4;
+    }
+
+    public String[] getConfigli5() {
+        return configli5;
+    }
+
+    public void setConfigli5(String[] configli5) {
+        this.configli5 = configli5;
+    }
+
+    public String[] getConfigli6() {
+        return configli6;
+    }
+
+    public void setConfigli6(String[] configli6) {
+        this.configli6 = configli6;
+    }
 }

+ 34 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/DetectionConfig.java

@@ -0,0 +1,34 @@
+package com.iamberry.rst.core.fm;
+
+import java.io.Serializable;
+
+public class DetectionConfig implements Serializable {
+    private static final long serialVersionUID = 7428754316371793045L;
+    private Integer configId;
+    private String configDetectContent;
+    private Integer configType;
+
+    public Integer getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(Integer configId) {
+        this.configId = configId;
+    }
+
+    public String getConfigDetectContent() {
+        return configDetectContent;
+    }
+
+    public void setConfigDetectContent(String configDetectContent) {
+        this.configDetectContent = configDetectContent;
+    }
+
+    public Integer getConfigType() {
+        return configType;
+    }
+
+    public void setConfigType(Integer configType) {
+        this.configType = configType;
+    }
+}

+ 52 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/DetectionItem.java

@@ -0,0 +1,52 @@
+package com.iamberry.rst.core.fm;
+
+import java.io.Serializable;
+
+public class DetectionItem implements Serializable{
+    private static final long serialVersionUID = 2797469187410284800L;
+    private Integer itemId;
+    private Integer detectId;
+    private Integer itemConfigId;
+    private String itemDetectContent;
+    private Integer configType;
+
+    public Integer getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(Integer itemId) {
+        this.itemId = itemId;
+    }
+
+    public Integer getDetectId() {
+        return detectId;
+    }
+
+    public void setDetectId(Integer detectId) {
+        this.detectId = detectId;
+    }
+
+    public Integer getItemConfigId() {
+        return itemConfigId;
+    }
+
+    public void setItemConfigId(Integer itemConfigId) {
+        this.itemConfigId = itemConfigId;
+    }
+
+    public String getItemDetectContent() {
+        return itemDetectContent;
+    }
+
+    public void setItemDetectContent(String itemDetectContent) {
+        this.itemDetectContent = itemDetectContent;
+    }
+
+    public Integer getConfigType() {
+        return configType;
+    }
+
+    public void setConfigType(Integer configType) {
+        this.configType = configType;
+    }
+}

+ 43 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/MaterialItem.java

@@ -0,0 +1,43 @@
+package com.iamberry.rst.core.fm;
+
+import java.io.Serializable;
+
+public class MaterialItem implements Serializable{
+    private static final long serialVersionUID = 1560608189285590350L;
+    private Integer materialItemId;
+    private Integer materialId;
+    private String materialName;
+    private Integer detectId;
+
+    public Integer getMaterialItemId() {
+        return materialItemId;
+    }
+
+    public void setMaterialItemId(Integer materialItemId) {
+        this.materialItemId = materialItemId;
+    }
+
+    public Integer getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(Integer materialId) {
+        this.materialId = materialId;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public Integer getDetectId() {
+        return detectId;
+    }
+
+    public void setDetectId(Integer detectId) {
+        this.detectId = detectId;
+    }
+}

+ 49 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/QcInfo.java

@@ -0,0 +1,49 @@
+package com.iamberry.rst.core.fm;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class QcInfo implements Serializable {
+    private static final long serialVersionUID = -5517718919139750068L;
+    private Integer qcInfoId;
+    private Integer qcIsThrough;
+    private Integer detectId;
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+    private Date qcCreateTime;
+
+    public Integer getQcInfoId() {
+        return qcInfoId;
+    }
+
+    public void setQcInfoId(Integer qcInfoId) {
+        this.qcInfoId = qcInfoId;
+    }
+
+    public Integer getQcIsThrough() {
+        return qcIsThrough;
+    }
+
+    public void setQcIsThrough(Integer qcIsThrough) {
+        this.qcIsThrough = qcIsThrough;
+    }
+
+    public Integer getDetectId() {
+        return detectId;
+    }
+
+    public void setDetectId(Integer detectId) {
+        this.detectId = detectId;
+    }
+
+    public Date getQcCreateTime() {
+        return qcCreateTime;
+    }
+
+    public void setQcCreateTime(Date qcCreateTime) {
+        this.qcCreateTime = qcCreateTime;
+    }
+}

+ 77 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/TreatmentRecordLog.java

@@ -0,0 +1,77 @@
+package com.iamberry.rst.core.fm;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class TreatmentRecordLog implements Serializable {
+
+    private static final long serialVersionUID = 1589537146269467435L;
+    private Integer recordId;
+    private Integer recordProcessingResults;
+    private String recordDesc;
+    private Integer recordAdminId;
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+    private Date recordCreateTime;
+    private Integer detectId;
+    private String adminName;
+
+    public Integer getRecordId() {
+        return recordId;
+    }
+
+    public void setRecordId(Integer recordId) {
+        this.recordId = recordId;
+    }
+
+    public Integer getRecordProcessingResults() {
+        return recordProcessingResults;
+    }
+
+    public void setRecordProcessingResults(Integer recordProcessingResults) {
+        this.recordProcessingResults = recordProcessingResults;
+    }
+
+    public String getRecordDesc() {
+        return recordDesc;
+    }
+
+    public void setRecordDesc(String recordDesc) {
+        this.recordDesc = recordDesc;
+    }
+
+    public Integer getRecordAdminId() {
+        return recordAdminId;
+    }
+
+    public void setRecordAdminId(Integer recordAdminId) {
+        this.recordAdminId = recordAdminId;
+    }
+
+    public Date getRecordCreateTime() {
+        return recordCreateTime;
+    }
+
+    public void setRecordCreateTime(Date recordCreateTime) {
+        this.recordCreateTime = recordCreateTime;
+    }
+
+    public Integer getDetectId() {
+        return detectId;
+    }
+
+    public void setDetectId(Integer detectId) {
+        this.detectId = detectId;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+}

+ 85 - 1
watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java

@@ -3,6 +3,7 @@ package com.iamberry.rst.faces.fm;
 import com.iamberry.rst.core.fm.*;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.sys.Admin;
 
 import java.util.List;
 
@@ -21,6 +22,16 @@ public interface ComplaintDetectInfoService {
      */
     int updateDetectById(ComplaintDetectInfo record);
     /**
+     * 修改单个待品质检测产品qc检测记录
+     * @return
+     */
+    int updateDetectQc(ComplaintDetectInfo record);
+    /**
+     * 修改单个待维修内容
+     * @return
+     */
+    int updateDetectContent(ComplaintDetectInfo record);
+    /**
      * 修改单个待品质检测产品并添加图片
      * @return
      */
@@ -66,7 +77,7 @@ public interface ComplaintDetectInfoService {
      * 获取品质检测列表
      * @return
      */
-    boolean customerConfirm(ComplaintDetectInfo detectInfo);
+    boolean customerConfirm(ComplaintDetectInfo detectInfo,Admin admin);
 
     /**
      * 查询检测图片
@@ -84,4 +95,77 @@ public interface ComplaintDetectInfoService {
      * @return
      */
     List<MaterialNumberInfo> listMaterialNumber();
+    /**
+     * 查询维修配置
+     * @return
+     */
+    List<DetectionConfig> listDetectionConfig(Integer configType);
+
+    /**
+     * 查询单个维修配置
+     * @return
+     */
+    DetectionConfig getDetectionConfig(Integer configId);
+
+    /**
+     * 添加检测信息项
+     * @return
+     */
+    Integer insertItem(DetectionItem detectionItem);
+    /**
+     * 查询检测项
+     * @return
+     */
+    List<DetectionItem> listDetectionItem(DetectionItem detectionItem);
+    /**
+     * 删除检测项
+     * @return
+     */
+    Integer detectDetectionItem(Integer detectId);
+
+    /**
+     * 查询维修配件
+     * @return
+     */
+    MaterialNumberInfo getMaterialNumber(Integer materialId);
+    /**
+     * 添加维修配件记录
+     * @return
+     */
+    Integer addMaterialItem(MaterialItem materialItem);
+
+    /**
+     * 查询维修配件记录
+     * @return
+     */
+    List<MaterialItem> listMaterialItem(Integer detectId);
+
+    /**
+     * 删除维修配件记录
+     * @return
+     */
+    Integer detectMaterialItem(Integer detectId);
+    /**
+     * 添加qc检测记录
+     * @return
+     */
+    Integer addQcInfo(QcInfo qcInfo);
+
+    /**
+     * 查询qc检测记录
+     * @return
+     */
+    List<QcInfo> listQcInfo(Integer detectId);
+
+    /**
+     * 添加客诉售后处理修改记录
+     * @return
+     */
+    Integer addTreatmentRecordLog(TreatmentRecordLog treatmentRecordLog);
+
+    /**
+     * 查询客诉售后处理修改记录
+     * @return
+     */
+    List<TreatmentRecordLog> listTreatmentRecordLog(Integer detectId);
 }

+ 35 - 30
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -911,35 +911,6 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         salesOrderMapper.delSalesOrder(id);
         return 1;
     }
-
-    //执行删除和作废订单时返还库存
-    public boolean returnInventory(Integer salesId){
-        SalesOrderItem salesOrderItem = new SalesOrderItem();
-        salesOrderItem.setItemOrderId(salesId);
-        List<SalesOrderItem> listOrderitem = salesOrderService.listSalesOrderItem(salesOrderItem);
-        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        for(SalesOrderItem item : listOrderitem){
-            InventoryInfo info = inventoryMapper.getByInventoryByBar(item.getItemColorBar());
-            if(info != null){
-                    info.setInventoryGoodProductNum(info.getInventoryGoodProductNum() + item.getItemNum());
-                info.setInventoryRecentRecord(sdf.format(new Date())+"删除/作废订单返还库存:"+item.getItemNum()+"件");
-                inventoryMapper.updateById(info);
-                //添加日志
-                InventoryLog inventoryLog = new InventoryLog();
-                inventoryLog.setLogProductName(info.getInventoryProductName());
-                inventoryLog.setLogProductBar(info.getInventoryProductBar());
-                inventoryLog.setLogRemainingNum(item.getItemNum());
-                inventoryLog.setLogType(1);
-                inventoryLog.setLogOperationType(1);
-                inventoryLog.setLogDesc(sdf.format(new Date())+"删除/作废订单返还库存:"+item.getItemNum()+"件");
-                inventoryLog.setLogQualityType(1);
-                inventoryLog.setLogWarehouseId(1);
-                inventoryLogMapper.insert(inventoryLog);
-            }
-
-        }
-        return true;
-    }
     @Override
     public Integer updateOrderItem(SalesOrderItem salesOrderItem) {
         return salesOrderMapper.updateOrderItem(salesOrderItem);
@@ -1091,13 +1062,19 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     @Transactional
     @Override
     public Integer updateDeliver(SalesOrder salesOrder) {
-            if(salesOrder.getSalesDeliver() == 2){//修改库存
+            if(salesOrder.getSalesDeliver() == 2){//标记出库,修改库存
                 if(!updateInventory(salesOrder.getSalesId())){
                     return 0;
                 }
             }
+        if(salesOrder.getSalesDeliver() == 1){//标记未出库,修改库存
+            if(!returnInventory(salesOrder.getSalesId())){
+                return 0;
+            }
+        }
         return salesOrderMapper.updateDeliver(salesOrder);
     }
+    //减少库存
     public boolean updateInventory(Integer salesId){
         SalesOrderItem salesOrderItem = new SalesOrderItem();
         salesOrderItem.setItemOrderId(salesId);
@@ -1129,6 +1106,34 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         }
         return true;
     }
+    //标记未出库时返还库存
+    public boolean returnInventory(Integer salesId){
+        SalesOrderItem salesOrderItem = new SalesOrderItem();
+        salesOrderItem.setItemOrderId(salesId);
+        List<SalesOrderItem> listOrderitem = salesOrderService.listSalesOrderItem(salesOrderItem);
+        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        for(SalesOrderItem item : listOrderitem){
+            InventoryInfo info = inventoryMapper.getByInventoryByBar(item.getItemColorBar());
+            if(info != null){
+                info.setInventoryGoodProductNum(info.getInventoryGoodProductNum() + item.getItemNum());
+                info.setInventoryRecentRecord(sdf.format(new Date())+"删除/作废/标记未出库时订单返还库存:"+item.getItemNum()+"件");
+                inventoryMapper.updateById(info);
+                //添加日志
+                InventoryLog inventoryLog = new InventoryLog();
+                inventoryLog.setLogProductName(info.getInventoryProductName());
+                inventoryLog.setLogProductBar(info.getInventoryProductBar());
+                inventoryLog.setLogRemainingNum(item.getItemNum());
+                inventoryLog.setLogType(1);
+                inventoryLog.setLogOperationType(1);
+                inventoryLog.setLogDesc(sdf.format(new Date())+"删除/作废/标记未出库时订单返还库存:"+item.getItemNum()+"件");
+                inventoryLog.setLogQualityType(1);
+                inventoryLog.setLogWarehouseId(1);
+                inventoryLogMapper.insert(inventoryLog);
+            }
+
+        }
+        return true;
+    }
 
     @Override
     public List<SalesOrderItem> getDeliverNum(SalesOrder salesOrder) {

+ 241 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -7,12 +7,14 @@ import com.iamberry.rst.core.cm.ProcMethod;
 import com.iamberry.rst.core.fm.*;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
 import com.iamberry.rst.service.cm.mapper.CustomerInfoMapper;
 import com.iamberry.rst.service.cm.mapper.ProcMethodMapper;
 import com.iamberry.rst.service.fm.mapper.ComplaintDetectInfoMapper;
 import com.iamberry.rst.service.fm.mapper.ComplaintMaintenanceInfoMapper;
 import com.iamberry.rst.util.PageUtil;
+import com.iamberry.wechat.core.entity.AdminUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -36,7 +38,108 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     }
 
     @Override
+    @Transactional
     public int updateDetectById(ComplaintDetectInfo record) {
+            try {
+            //删除旧检测项
+                complaintDetectInfoMapper.detectDetectionItem(record.getDetectId());
+                //封装检测信息
+                //检测现象
+                if(record.getConfigli1() != null) {
+                    if (record.getConfigli1().length > 0) {
+                        StringBuffer detectPhenomenon = new StringBuffer("");
+                        for (String configid : record.getConfigli1()) {
+                            detectPhenomenon.append(adddetectItem(configid, record.getDetectId()) + ";");
+                        }
+                        record.setDetectPhenomenon(detectPhenomenon.toString());
+                    }
+                }else{
+                    record.setDetectPhenomenon("");
+                }
+                //故障原因
+                if(record.getConfigli2() != null) {
+                    if (record.getConfigli2().length > 0) {
+                        StringBuffer detectFailureCause = new StringBuffer("");
+                        for (String configid : record.getConfigli2()) {
+                            detectFailureCause.append(adddetectItem(configid, record.getDetectId()) + ";");
+                        }
+                        record.setDetectFailureCause(detectFailureCause.toString());
+                    }
+                }else{
+                    record.setDetectFailureCause("");
+                }
+                //判定结果
+                if(record.getConfigli3() != null){
+                    if(record.getConfigli3().length > 0){
+                        StringBuffer detectResults = new StringBuffer("");
+                        for (String configid : record.getConfigli3()){
+                            detectResults.append(adddetectItem(configid,record.getDetectId())+";");
+                        }
+                        record.setDetectResults(detectResults.toString());
+                    }
+                }else{
+                    record.setDetectResults("");
+                }
+                //故障指向
+                if(record.getConfigli4() != null) {
+                    if (record.getConfigli4().length > 0) {
+                        StringBuffer detectPoint = new StringBuffer("");
+                        for (String configid : record.getConfigli4()) {
+                            detectPoint.append(adddetectItem(configid, record.getDetectId()) + ";");
+                        }
+                        record.setDetectPoint(detectPoint.toString());
+                    }
+                }else{
+                    record.setDetectPoint("");
+                }
+                //原因分析
+                if(record.getConfigli5() != null) {
+                    if (record.getConfigli5().length > 0) {
+                        StringBuffer detectNalysis = new StringBuffer("");
+                        for (String configid : record.getConfigli5()) {
+                            detectNalysis.append(adddetectItem(configid, record.getDetectId()) + ";");
+                        }
+                        record.setDetectNalysis(detectNalysis.toString());
+                    }
+                }else{
+                    record.setDetectNalysis("");
+                }
+            }catch (Exception e){
+                throw new RuntimeException("修改检测失败");
+            }
+        return complaintDetectInfoMapper.updateDetectById(record);
+    }
+    @Override
+    @Transactional
+    public int updateDetectContent(ComplaintDetectInfo record) {
+        complaintDetectInfoMapper.detectMaterialItem(record.getDetectId());
+        try {
+            //维修配件
+            if(record.getConfigli6() != null) {
+                if (record.getConfigli6().length > 0) {
+                    for (String configid : record.getConfigli6()) {
+                        MaterialNumberInfo materialNumberInfo = complaintDetectInfoMapper.getMaterialNumber(Integer.valueOf(configid));
+                        MaterialItem materialItem = new MaterialItem();
+                        materialItem.setDetectId(record.getDetectId());
+                        materialItem.setMaterialId(Integer.valueOf(configid));
+                        materialItem.setMaterialName(materialNumberInfo.getMaterialName());
+                        complaintDetectInfoMapper.addMaterialItem(materialItem);
+                    }
+                }
+            }
+        }catch (Exception e){
+            throw new RuntimeException("修改检测维修内容失败");
+        }
+        return complaintDetectInfoMapper.updateDetectById(record);
+    }
+    @Override
+    @Transactional
+    public int updateDetectQc(ComplaintDetectInfo record) {
+        //添加日志
+        QcInfo qcInfo = new  QcInfo();
+        qcInfo.setDetectId(record.getDetectId());
+        qcInfo.setQcIsThrough(record.getMaintenanceResults());
+        complaintDetectInfoMapper.addQcInfo(qcInfo);
         return complaintDetectInfoMapper.updateDetectById(record);
     }
     @Transactional
@@ -77,8 +180,58 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                     }
             }
         }
-
-      /*  try {*/
+        try {
+        //封装检测信息
+        //检测现象
+        if(record.getConfigli1() != null) {
+            if (record.getConfigli1().length > 0) {
+                StringBuffer detectPhenomenon = new StringBuffer("");
+                for (String configid : record.getConfigli1()) {
+                    detectPhenomenon.append(adddetectItem(configid, record.getDetectId()) + ";");
+                }
+                record.setDetectPhenomenon(detectPhenomenon.toString());
+            }
+        }
+        //故障原因
+        if(record.getConfigli2() != null) {
+            if (record.getConfigli2().length > 0) {
+                StringBuffer detectFailureCause = new StringBuffer("");
+                for (String configid : record.getConfigli2()) {
+                    detectFailureCause.append(adddetectItem(configid, record.getDetectId()) + ";");
+                }
+                record.setDetectFailureCause(detectFailureCause.toString());
+            }
+        }
+        //判定结果
+        if(record.getConfigli3() != null){
+            if(record.getConfigli3().length > 0){
+                StringBuffer detectResults = new StringBuffer("");
+                for (String configid : record.getConfigli3()){
+                    detectResults.append(adddetectItem(configid,record.getDetectId())+";");
+                }
+                record.setDetectResults(detectResults.toString());
+            }
+        }
+        //故障指向
+        if(record.getConfigli4() != null) {
+            if (record.getConfigli4().length > 0) {
+                StringBuffer detectPoint = new StringBuffer("");
+                for (String configid : record.getConfigli4()) {
+                    detectPoint.append(adddetectItem(configid, record.getDetectId()) + ";");
+                }
+                record.setDetectPoint(detectPoint.toString());
+            }
+        }
+        //原因分析
+        if(record.getConfigli5() != null) {
+            if (record.getConfigli5().length > 0) {
+                StringBuffer detectNalysis = new StringBuffer("");
+                for (String configid : record.getConfigli5()) {
+                    detectNalysis.append(adddetectItem(configid, record.getDetectId()) + ";");
+                }
+                record.setDetectNalysis(detectNalysis.toString());
+            }
+        }
             if(complaintDetectInfoMapper.updateDetectById(record) > 0){
                 if(imgs != null){
                     if(imgs.length > 0){
@@ -91,11 +244,22 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                     }
                 }
             }
-       /* }catch (Exception e){
+        }catch (Exception e){
             throw new RuntimeException("完成检测失败");
-        }*/
+        }
         return 1;
     }
+    //添加检测项
+    public String adddetectItem(String configid,Integer detectId){
+        DetectionConfig config = complaintDetectInfoMapper.getDetectionConfig(Integer.valueOf(configid));
+        DetectionItem item = new DetectionItem();
+        item.setDetectId(detectId);
+        item.setItemConfigId(config.getConfigId());
+        item.setItemDetectContent(config.getConfigDetectContent());
+        complaintDetectInfoMapper.insertItem(item);
+        return config.getConfigDetectContent();
+    }
+
     @Override
     public PagedResult<ComplaintDetectInfo> listComplaintDetect(PageRequest<ComplaintDetectInfo> pageRequest) {
         PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
@@ -129,7 +293,7 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     }
     @Transactional
     @Override
-    public boolean customerConfirm(ComplaintDetectInfo detectInfo) {
+    public boolean customerConfirm(ComplaintDetectInfo detectInfo,Admin admin) {
         ComplaintDetectInfo detect = complaintDetectInfoMapper.getDetectById(detectInfo.getDetectId());
         /*ProcMethod procMethod = procMethodMapper.getProcMethodById(detectInfo.getProcMethodId());*/
         Calendar date = Calendar.getInstance();
@@ -188,6 +352,13 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                         return true;
                     }
                 }
+                //添加客服操作记录
+                TreatmentRecordLog log = new TreatmentRecordLog();
+                log.setDetectId(detectInfo.getDetectId());
+                log.setRecordAdminId(admin.getAdminId());
+                log.setRecordDesc(detectInfo.getDetectCustomerDesc());
+                log.setRecordProcessingResults(detectInfo.getDetectProcessingResults());
+                complaintDetectInfoMapper.addTreatmentRecordLog(log);
              return true;
             }
         }catch (Exception e){
@@ -211,5 +382,70 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         return complaintDetectInfoMapper.listMaterialNumber();
     }
 
+    @Override
+    public List<DetectionConfig> listDetectionConfig(Integer configType) {
+        return complaintDetectInfoMapper.listDetectionConfig(configType);
+    }
+
+    @Override
+    public DetectionConfig getDetectionConfig(Integer configId) {
+        return complaintDetectInfoMapper.getDetectionConfig(configId);
+    }
+
+    @Override
+    public Integer insertItem(DetectionItem detectionItem) {
+        return complaintDetectInfoMapper.insertItem(detectionItem);
+    }
+
+    @Override
+    public List<DetectionItem> listDetectionItem(DetectionItem detectionItem) {
+        return complaintDetectInfoMapper.listDetectionItem(detectionItem);
+    }
+
+    @Override
+    public Integer detectDetectionItem(Integer detectId) {
+        return complaintDetectInfoMapper.detectDetectionItem(detectId);
+    }
+
+    @Override
+    public MaterialNumberInfo getMaterialNumber(Integer materialId) {
+        return complaintDetectInfoMapper.getMaterialNumber(materialId);
+    }
+
+    @Override
+    public Integer addMaterialItem(MaterialItem materialItem) {
+        return complaintDetectInfoMapper.addMaterialItem(materialItem);
+    }
+
+    @Override
+    public List<MaterialItem> listMaterialItem(Integer detectId) {
+        return complaintDetectInfoMapper.listMaterialItem(detectId);
+    }
+
+    @Override
+    public Integer detectMaterialItem(Integer detectId) {
+        return complaintDetectInfoMapper.detectMaterialItem(detectId);
+    }
+
+    @Override
+    public Integer addQcInfo(QcInfo qcInfo) {
+        return complaintDetectInfoMapper.addQcInfo(qcInfo);
+    }
+
+    @Override
+    public List<QcInfo> listQcInfo(Integer detectId) {
+        return complaintDetectInfoMapper.listQcInfo(detectId);
+    }
+
+    @Override
+    public Integer addTreatmentRecordLog(TreatmentRecordLog treatmentRecordLog) {
+        return complaintDetectInfoMapper.addTreatmentRecordLog(treatmentRecordLog);
+    }
+
+    @Override
+    public List<TreatmentRecordLog> listTreatmentRecordLog(Integer detectId) {
+        return complaintDetectInfoMapper.listTreatmentRecordLog(detectId);
+    }
+
 
 }

+ 81 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java

@@ -1,9 +1,6 @@
 package com.iamberry.rst.service.fm.mapper;
 
-import com.iamberry.rst.core.fm.ComplaintDetectImg;
-import com.iamberry.rst.core.fm.ComplaintDetectInfo;
-import com.iamberry.rst.core.fm.DetectionBasis;
-import com.iamberry.rst.core.fm.MaterialNumberInfo;
+import com.iamberry.rst.core.fm.*;
 
 import java.util.List;
 
@@ -70,4 +67,84 @@ public interface ComplaintDetectInfoMapper {
      * @return
      */
     List<MaterialNumberInfo> listMaterialNumber();
+
+    /**
+     * 查询维修配置列表
+     * @return
+     */
+    List<DetectionConfig> listDetectionConfig(Integer configType);
+
+    /**
+     * 查询单个维修配置
+     * @return
+     */
+    DetectionConfig getDetectionConfig(Integer configId);
+
+    /**
+     * 添加检测信息项
+     * @return
+     */
+    Integer insertItem(DetectionItem detectionItem);
+
+    /**
+     * 查询检测项
+     * @return
+     */
+    List<DetectionItem> listDetectionItem(DetectionItem detectionItem);
+
+    /**
+     * 删除检测项
+     * @return
+     */
+    Integer detectDetectionItem(Integer detectId);
+
+    /**
+     * 查询维修配件
+     * @return
+     */
+    MaterialNumberInfo getMaterialNumber(Integer materialId);
+
+    /**
+     * 添加维修配件记录
+     * @return
+     */
+    Integer addMaterialItem(MaterialItem materialItem);
+
+    /**
+     * 查询维修配件记录
+     * @return
+     */
+    List<MaterialItem> listMaterialItem(Integer detectId);
+
+    /**
+     * 删除维修配件记录
+     * @return
+     */
+    Integer detectMaterialItem(Integer detectId);
+
+    /**
+     * 添加qc检测记录
+     * @return
+     */
+    Integer addQcInfo(QcInfo qcInfo);
+
+    /**
+     * 查询qc检测记录
+     * @return
+     */
+    List<QcInfo> listQcInfo(Integer detectId);
+
+    /**
+     * 添加客诉售后处理修改记录
+     * @return
+     */
+    Integer addTreatmentRecordLog(TreatmentRecordLog treatmentRecordLog);
+
+    /**
+     * 查询客诉售后处理修改记录
+     * @return
+     */
+    List<TreatmentRecordLog> listTreatmentRecordLog(Integer detectId);
+
+
 }

+ 102 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml

@@ -408,4 +408,106 @@
     FROM
         tb_rst_fm_material_number
   </select>
+
+  <select id="getMaterialNumber" parameterType="Integer" resultType="MaterialNumberInfo">
+    SELECT
+        *
+    FROM
+        tb_rst_fm_material_number
+        WHERE
+        material_id = #{materialId}
+  </select>
+    <insert id="addMaterialItem" parameterType="MaterialItem">
+        INSERT INTO tb_rst_fm_material_item(material_id,material_name,detect_id) VALUES (#{materialId},#{materialName},#{detectId})
+    </insert>
+    <select id="listMaterialItem" resultType="MaterialItem">
+        SELECT
+        *
+        FROM
+        tb_rst_fm_material_item
+        WHERE detect_id = #{detectId}
+    </select>
+    <delete id="detectMaterialItem" parameterType="Integer">
+        delete FROM
+        tb_rst_fm_material_item
+        where detect_id=#{detectId}
+    </delete>
+  <select id="listDetectionConfig" resultType="DetectionConfig">
+    SELECT
+        *
+    FROM
+        tb_rst_complaint_detection_config
+        WHERE
+        config_type = #{configType}
+  </select>
+
+  <select id="getDetectionConfig" resultType="DetectionConfig">
+    SELECT
+        *
+    FROM
+        tb_rst_complaint_detection_config
+        WHERE
+        config_id = #{configId}
+  </select>
+  <insert id="insertItem" parameterType="DetectionItem">
+      INSERT INTO tb_rst_complaint_detection_item(detect_id,item_detect_content,item_config_id) VALUES (#{detectId},#{itemDetectContent},#{itemConfigId})
+  </insert>
+
+  <select id="listDetectionItem" parameterType="DetectionItem" resultType="DetectionItem">
+    SELECT
+        *
+    FROM
+        tb_rst_complaint_detection_item di
+        LEFT JOIN tb_rst_complaint_detection_config dc on di.item_config_id = dc.config_id
+        WHERE
+        di.detect_id = #{detectId}
+        AND dc.config_type = #{configType}
+  </select>
+  <delete id="detectDetectionItem">
+    delete FROM
+        tb_rst_complaint_detection_item
+        where detect_id=#{detectId}
+  </delete>
+  
+  <insert id="addQcInfo" parameterType="QcInfo">
+    INSERT INTO tb_rst_fm_qc_info (
+        qc_is_through,
+        detect_id,
+        qc_create_time
+    )
+    VALUES
+        (
+            #{qcIsThrough},#{detectId},NOW())
+  </insert>
+  <select id="listQcInfo" parameterType="Integer" resultType="QcInfo">
+    SELECT
+    *
+    FROM
+    tb_rst_fm_qc_info
+    WHERE
+    detect_id = #{detectId}
+  </select>
+
+  <insert id="addTreatmentRecordLog" parameterType="TreatmentRecordLog">
+    INSERT INTO tb_rst_treatment_record_log (
+        record_processing_results,
+        record_desc,
+        record_admin_id,
+        detect_id,
+        record_create_time
+    )
+    VALUES
+        (
+            #{recordProcessingResults},#{recordDesc},#{recordAdminId},#{detectId},NOW())
+  </insert>
+  <select id="listTreatmentRecordLog" parameterType="Integer" resultType="TreatmentRecordLog">
+    SELECT
+    *,
+    sa.admin_name adminName
+    FROM
+    tb_rst_treatment_record_log rl
+    LEFT JOIN tb_rst_sys_admin sa on rl.record_admin_id = sa.admin_id
+    WHERE
+    rl.detect_id = #{detectId}
+  </select>
 </mapper>

+ 157 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -266,6 +266,12 @@ public class AdminDetectController {
         }
         ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
         List<ComplaintDetectImg> imgList = complaintDetectInfoService.listDetectImg(Integer.valueOf(detectId));
+        List<MaterialItem> listMaterialItem = complaintDetectInfoService.listMaterialItem(Integer.valueOf(detectId));
+        List<QcInfo> listQcInfo = complaintDetectInfoService.listQcInfo(Integer.valueOf(detectId));
+        List<TreatmentRecordLog> listTreatmentRecordLog = complaintDetectInfoService.listTreatmentRecordLog(Integer.valueOf(detectId));
+        mv.addObject("listTreatmentRecordLog",listTreatmentRecordLog);
+        mv.addObject("listQcInfo",listQcInfo);
+        mv.addObject("listMaterialItem",listMaterialItem);
         mv.addObject("detectinfo",detectinfo);
         mv.addObject("imgList",imgList);
         return mv;
@@ -286,6 +292,37 @@ public class AdminDetectController {
         }
         ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
         List<ComplaintDetectImg> imgList = complaintDetectInfoService.listDetectImg(Integer.valueOf(detectId));
+        DetectionItem detectionItem = new DetectionItem();
+        detectionItem.setDetectId(Integer.valueOf(detectId));
+
+        //查询维修配置信息
+        List<DetectionConfig> config1 = complaintDetectInfoService.listDetectionConfig(1);
+        List<DetectionConfig> config2 = complaintDetectInfoService.listDetectionConfig(2);
+        List<DetectionConfig> config3 = complaintDetectInfoService.listDetectionConfig(3);
+        List<DetectionConfig> config4 = complaintDetectInfoService.listDetectionConfig(4);
+        List<DetectionConfig> config5 = complaintDetectInfoService.listDetectionConfig(5);
+        mv.addObject("config1",config1);
+        mv.addObject("config2",config2);
+        mv.addObject("config3",config3);
+        mv.addObject("config4",config4);
+        mv.addObject("config5",config5);
+        //查询检测现象
+        detectionItem.setConfigType(1);
+        mv.addObject("detectPhenomenonList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询故障原因
+        detectionItem.setConfigType(2);
+        mv.addObject("detectFailureCauseList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询判定结果
+        detectionItem.setConfigType(3);
+        mv.addObject("detectResultsList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询故障指向
+        detectionItem.setConfigType(4);
+        mv.addObject("detectPointList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询原因分析
+        detectionItem.setConfigType(5);
+        mv.addObject("detectNalysisList",complaintDetectInfoService.listDetectionItem(detectionItem));
+
+
         mv.addObject("detectInfo",detectinfo);
         mv.addObject("imgList",imgList);
         return mv;
@@ -353,6 +390,18 @@ public class AdminDetectController {
             return msg;
         }
         /*String[] componentsImgs = request.getParameterValues("componentsImg");*/
+        String[] configli1 = request.getParameterValues("configli1");
+        String[] configli2 = request.getParameterValues("configli2");
+        String[] configli3 = request.getParameterValues("configli3");
+        String[] configli4 = request.getParameterValues("configli4");
+        String[] configli5 = request.getParameterValues("configli5");
+        String[] configli6 = request.getParameterValues("configli6");
+        detectInfo.setConfigli1(configli1);
+        detectInfo.setConfigli2(configli2);
+        detectInfo.setConfigli3(configli3);
+        detectInfo.setConfigli4(configli4);
+        detectInfo.setConfigli5(configli5);
+        detectInfo.setConfigli6(configli6);
         Integer num = complaintDetectInfoService.updateDetectById(detectInfo);
 
         if (num < 1) {
@@ -366,6 +415,74 @@ public class AdminDetectController {
     }
 
     /**
+     * 修改qc检测信息
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("info:update:info")
+    @ResponseBody
+    @RequestMapping("/update_qc")
+    public ResponseJson updateQC(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){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        Integer num = complaintDetectInfoService.updateDetectQc(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("info:update:info")
+    @ResponseBody
+    @RequestMapping("/update_content")
+    public ResponseJson update_content(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){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        String[] configli6 = request.getParameterValues("configli6");
+        detectInfo.setConfigli6(configli6);
+        Integer num = complaintDetectInfoService.updateDetectContent(detectInfo);
+
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
      * 跳转到查看仓储进度页面
      *
      * @return
@@ -423,6 +540,17 @@ public class AdminDetectController {
             return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        //查询维修配置信息
+        List<DetectionConfig> config1 = complaintDetectInfoService.listDetectionConfig(1);
+        List<DetectionConfig> config2 = complaintDetectInfoService.listDetectionConfig(2);
+        List<DetectionConfig> config3 = complaintDetectInfoService.listDetectionConfig(3);
+        List<DetectionConfig> config4 = complaintDetectInfoService.listDetectionConfig(4);
+        List<DetectionConfig> config5 = complaintDetectInfoService.listDetectionConfig(5);
+        mv.addObject("config1",config1);
+        mv.addObject("config2",config2);
+        mv.addObject("config3",config3);
+        mv.addObject("config4",config4);
+        mv.addObject("config5",config5);
         detectInfo.setDetectDate(new Date());
         mv.addObject("detectId",detectId);
         mv.addObject("detectInfo",detectInfo);
@@ -514,7 +642,16 @@ public class AdminDetectController {
             detectInfo.setDetectDate(format.parse(detectDate));
         }
         String[] componentsImgs = request.getParameterValues("componentsImg");
-
+        String[] configli1 = request.getParameterValues("configli1");
+        String[] configli2 = request.getParameterValues("configli2");
+        String[] configli3 = request.getParameterValues("configli3");
+        String[] configli4 = request.getParameterValues("configli4");
+        String[] configli5 = request.getParameterValues("configli5");
+        detectInfo.setConfigli1(configli1);
+        detectInfo.setConfigli2(configli2);
+        detectInfo.setConfigli3(configli3);
+        detectInfo.setConfigli4(configli4);
+        detectInfo.setConfigli5(configli5);
         Integer num = complaintDetectInfoService.updateDetectById(detectInfo,componentsImgs);
         if (num < 1) {
             msg.setResultCode(500);
@@ -604,7 +741,8 @@ public class AdminDetectController {
             msg.setReturnCode(500);
             return msg;
         }
-        if (!complaintDetectInfoService.customerConfirm(detectInfo)) {
+        Admin admin = AdminUtils.getLoginAdmin();
+        if (!complaintDetectInfoService.customerConfirm(detectInfo,admin)) {
             msg.setResultCode(500);
             msg.setReturnCode(500);
         } else {
@@ -731,7 +869,23 @@ public class AdminDetectController {
             row.createCell(2).setCellValue(detect.getColorName()==null?"":detect.getColorName());
             row.createCell(3).setCellValue(detect.getDetectProduction()==null?"":detect.getDetectProduction());
             row.createCell(4).setCellValue(detect.getDetectFuselageBarcode()==null?"":detect.getDetectFuselageBarcode());
-            row.createCell(5).setCellValue(detect.getSignclosedAddrProvincesName()+"-"+detect.getSignclosedAddrCityName()+"-"+detect.getSignclosedAddrAreaName());
+            StringBuffer area = new StringBuffer(" ");
+            if(detect.getSignclosedAddrProvincesName() == null || detect.getSignclosedAddrProvincesName().equals("")){
+                area.append("");
+            }else{
+                area.append(detect.getSignclosedAddrProvincesName());
+            }
+            if(detect.getSignclosedAddrProvincesName() == null || detect.getSignclosedAddrProvincesName().equals("")){
+                area.append("");
+            }else{
+                area.append("-"+detect.getSignclosedAddrProvincesName());
+            }
+            if(detect.getSignclosedAddrCityName() == null || detect.getSignclosedAddrCityName().equals("")){
+                area.append("");
+            }else{
+                area.append("-"+detect.getSignclosedAddrCityName());
+            }
+            row.createCell(5).setCellValue(area.toString());
             if(detect.getSignclosedDate()==null){
                 row.createCell(6).setCellValue( "");
             }else{

+ 2 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java

@@ -343,7 +343,9 @@ public class AdminSignclosedController {
     public ModelAndView toUpdateSender(HttpServletRequest request,Integer signclosedId) {
         ModelAndView mv = new ModelAndView("cm/signclosed/update_sender");
         ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoService.getSignclosedById(signclosedId);
+        List<LogisticsInfo> logisticsInfoList =  logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
         mv.addObject("signclosedId",signclosedId);
+        mv.addObject("logisticsInfoList",logisticsInfoList);
         mv.addObject("complaintSignclosedInfo",complaintSignclosedInfo);
         return mv;
     }

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

@@ -166,6 +166,7 @@ public class InventoryController {
                         info.setInventoryRecentRecord(sdf.format(new Date())+"良品出库:"+inventoryInfo.getOperationNum()+"件");
                         inventoryLog.setLogType(2);
                         inventoryLog.setLogQualityType(1);
+                        inventoryLog.setLogDesc(sdf.format(new Date())+"良品出库:"+inventoryInfo.getOperationNum()+"件");
                     }else{
                         msg.setResultCode(500);
                         msg.setReturnCode(502);
@@ -177,6 +178,7 @@ public class InventoryController {
                         info.setInventoryRecentRecord(sdf.format(new Date())+"不良品出库:"+inventoryInfo.getOperationNum()+"件");
                         inventoryLog.setLogType(3);
                         inventoryLog.setLogQualityType(2);
+                        inventoryLog.setLogDesc(sdf.format(new Date())+"不良品出库:"+inventoryInfo.getOperationNum()+"件");
                     }else{
                         msg.setResultCode(500);
                         msg.setReturnCode(502);
@@ -193,11 +195,13 @@ public class InventoryController {
                 info.setInventoryRecentRecord(sdf.format(new Date())+"良品入库:"+inventoryInfo.getOperationNum()+"件");
                 inventoryLog.setLogType(1);
                 inventoryLog.setLogQualityType(1);
+                inventoryLog.setLogDesc(sdf.format(new Date())+"良品入库:"+inventoryInfo.getOperationNum()+"件");
             }else{//不良品
                 info.setInventoryDefectiveProductNum(info.getInventoryDefectiveProductNum()+inventoryInfo.getOperationNum());
                 info.setInventoryRecentRecord(sdf.format(new Date())+"不良品入库:"+inventoryInfo.getOperationNum()+"件");
                 inventoryLog.setLogType(3);
                 inventoryLog.setLogQualityType(2);
+                inventoryLog.setLogDesc(sdf.format(new Date())+"不良品入库:"+inventoryInfo.getOperationNum()+"件");
             }
             inventoryLog.setLogOperationType(1);
         }
@@ -212,7 +216,7 @@ public class InventoryController {
             inventoryLog.setLogProductBar(info.getInventoryProductBar());
             inventoryLog.setLogProductName(info.getInventoryProductName());
             inventoryLog.setLogDesc(inventoryInfo.getInventoryDesc());
-            inventoryLog.setLogWarehouseId(inventoryInfo.getInventoryId());
+            inventoryLog.setLogWarehouseId(1);
             inventoryLog.setLogRemainingNum(inventoryInfo.getOperationNum());
             inventoryLogService.insert(inventoryLog);
         }

+ 5 - 0
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -112,6 +112,11 @@
 		<typeAlias type="com.iamberry.rst.core.fm.ComplaintSignclosedImg" alias="ComplaintSignclosedImg"/>
 		<typeAlias type="com.iamberry.rst.core.fm.ComplaintDetectImg" alias="ComplaintDetectImg"/>
 		<typeAlias type="com.iamberry.rst.core.fm.MaterialNumberInfo" alias="MaterialNumberInfo"/>
+		<typeAlias type="com.iamberry.rst.core.fm.DetectionConfig" alias="DetectionConfig"/>
+		<typeAlias type="com.iamberry.rst.core.fm.DetectionItem" alias="DetectionItem"/>
+		<typeAlias type="com.iamberry.rst.core.fm.MaterialItem" alias="MaterialItem"/>
+		<typeAlias type="com.iamberry.rst.core.fm.QcInfo" alias="QcInfo"/>
+		<typeAlias type="com.iamberry.rst.core.fm.TreatmentRecordLog" alias="TreatmentRecordLog"/>
 
 		<typeAlias type="com.iamberry.rst.core.sys.SysConfig" alias="SysConfig"/>
 		<typeAlias type="com.iamberry.rst.core.sys.SystemLogs" alias="SystemLogs"/>

+ 11 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl

@@ -908,6 +908,7 @@
                                 <th>是否可翻新</th>
                                 <th>维修报价</th>
                                 <th>维修内容</th>
+                                <th>QC检测状态</th>
                                 <th>操作</th>
                             </tr>
                             </thead>
@@ -984,6 +985,15 @@
                                     </td>
                                     <td class="text-c" width="100"><#if detect.detectOffer??>${detect.detectOffer/100}<#else>-</#if></td>
                                     <td class="text-c" width="100"><div  title="${detect.detectContent!}">${detect.detectContent!'-'}</div></td>
+                                    <td class="text-c" width="100">
+                                        <#if detect.maintenanceResults??>
+                                            <#if detect.maintenanceResults == 1>
+                                                通过
+                                            <#elseif detect.maintenanceResults == 2>
+                                                不通过
+                                            </#if>
+                                        </#if>
+                                    </td>
                                     <!-- 遍历操作 -->
                                     <td class="td-manage text-c" width="100">
                                         <a onclick="getDetectInfo('${detect.detectId}');">查看详情</a><br>
@@ -2985,6 +2995,7 @@
                             detectStateName = "已报废回收";
                             break
                     }
+                    /*alert(detectStateName);*/
                     $("#detectState"+detectInfo.detectId).html(detectStateName);
                     $("#updateDetect").hide();
                 } else {

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

@@ -68,7 +68,7 @@
         $.ajax({
             cache: true,
             type: "POST",
-            url: "${path}/admin/detect/update",
+            url: "${path}/admin/detect/update_qc",
             data:$('#form-admin-add').serialize(),// 你的formid
             async: false,
             success: function(data){

+ 47 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/complete_maintenance.ftl

@@ -36,6 +36,10 @@
         .col-sm-1{width: 150px;}
         .huanhang{ float:left}
         .my-btn-submit{padding: 10px 20px;width: 130px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px auto 0 auto;display: block;}
+        .my-close{position:absolute;right: 0.5em;top: 0.45em;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(45deg);transform: rotate(45deg);display: inline-block;}
+        .my-close:after{content: "";position: absolute;top: 0;left: 0;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(270deg);transform: rotate(270deg);}
+        .b-close{position: relative; display: inline-block;margin: 2px 0; padding:4px 1em 4px 4px; width: 100px;background: #f0f0f0;border: 1px solid rgba(0,0,0,.1);border-radius: 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;}
+        .close-box{width: 400px;margin-left: 15px;margin-top: -15px;}
     </style>
     <meta name="keywords" content="${path}">
     <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
@@ -47,15 +51,33 @@
                 <label class="form-label col-1 col-sm-1 huanhang" style="text-align: center">维修配件:</label>
                 <div class="formControls col-6 col-sm-6 huanhang" style="">
                     <span class="select-box">
-                        <select class="select" id="materialId" name="materialId" >
+                        <#--<select class="select" id="materialId" name="materialId" >
                             <option value="1" >请选择(可多选)</option>
                             <#list listMaterial as material>
                                 <option value="${material.materialName}" >${material.materialName}</option>
                             </#list>
+                        </select>-->
+                        <select id="configSelect6" name="configSelect6" class="select" style="width: 93%;">
+                            <#if (listMaterial?size > 0)>
+                                    <#list listMaterial as material>
+                                        <option value="${material.materialId!""}">${material.materialName!""}</option>
+                                    </#list>
+                            </#if>
                         </select>
 				    </span>
                 </div>
             </div>
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+                <div class="formControls col-7 col-sm-7 huanhang" id="config6" style="margin: 10px 0px;">
+                    <div class="row">
+                        <ul class="close-box" id="configui6">
+
+                        </ul>
+                    </div>
+
+                </div>
+            </div>
             <div class="row cl" id="" style="">
                 <label class="form-label col-1 col-sm-1 huanhang" style="text-align: center">维修内容:</label>
                 <div class="formControls col-6 col-sm-6 huanhang">
@@ -75,10 +97,31 @@
 </article>
 <script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
 <script type="text/javascript">
-    $("#materialId").change(function(){
+    /*$("#materialId").change(function(){
         $("#detectContent").html($("#detectContent").val()+$(this).val()+";");
-    });
+    });*/
+    function deleteli(obj) {
+        $(obj).parent().remove();
+    }
 
+    $('#configSelect6').change(function() {
+        var name = $("#configSelect6 option:selected").text();
+        var id = $('#configSelect6').val();
+        var bl = true;
+        $("input[name='configli6']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl){
+            $("#configui6").append('<li class="b-close" id="configDetele6">' +
+                    ' <input type="hidden" value="'+id+'" name="configli6">' +name+
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+
+    });
 
     function  add() {
         /*var detectItemDesc = $("#detectItemDesc").val();
@@ -92,7 +135,7 @@
         $.ajax({
             cache: true,
             type: "POST",
-            url: "${path}/admin/detect/update",
+            url: "${path}/admin/detect/update_content",
             data:$('#form-admin-add').serialize(),// 你的formid
             async: false,
             success: function(data){

+ 83 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl

@@ -48,6 +48,10 @@
         .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
         .txt-red{color:red}
         .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .my-close{position:absolute;right: 0.5em;top: 0.45em;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(45deg);transform: rotate(45deg);display: inline-block;}
+        .my-close:after{content: "";position: absolute;top: 0;left: 0;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(270deg);transform: rotate(270deg);}
+        .b-close{position: relative; display: inline-block;margin: 2px 0; padding:4px 1em 4px 4px; width: 100px;background: #f0f0f0;border: 1px solid rgba(0,0,0,.1);border-radius: 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;}
+        .close-box{width: 500px;margin-left: 15px;margin-top: -15px;}
     </style>
     <title>订单详细信息</title>
 </head>
@@ -104,7 +108,7 @@
                 <th width="10">当前状态:</th>
                 <td width="10" style="font-weight: normal;"><span>
                 <#if detectinfo.detectState == 1>
-                            <span class="c-red">待检测机器(${detectinfo.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</span>
+                            <span class="c-red">待检测机器<#if detectinfo.maintenanceCutTime??>(${detectinfo.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
                 </#if>
                         <#if detectinfo.detectState == 30>
                             待用户确认
@@ -291,9 +295,86 @@
                 <th width="10"></th>
                 <td width="10" style="font-weight: normal;"><span></span></td>
             </tr>
+            <tr>
+                <th width="10">维修配件:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if (listMaterialItem?size > 0)>
+                    <#list listMaterialItem as item>
+                        <li class="b-close" >
+                    <input type="hidden" value="">${item.materialName}
+
+                    </li>
+                    </div>
+                    </#list>
+                </#if>
+                </span></td>
+                <td width="10"></td>
+                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span></span></td>
+            </tr>
             </thead>
         </table>
-
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">
+                    QC检测记录
+                </div>
+            </label>
+            <div class="formControls col-10 col-sm-10">
+            </div>
+        </div>
+    <#--<label class="form-label col-2 col-sm-2">购买产品信息:</label>-->
+        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+            <tr class="text-c">
+                <th>是否通过</th>
+                <th>操作时间</th>
+            </tr>
+                    <#if listQcInfo?? &&  (listQcInfo?size > 0) >
+                        <#list listQcInfo as item>
+                            <tr class="text-c">
+                                <td><#if item.qcIsThrough == 1>通过</#if><#if item.qcIsThrough == 2>不通过</#if></td>
+                                <td>${item.qcCreateTime?string("yyyy/MM/dd HH:mm:ss")}</td>
+                            </tr>
+                        </#list>
+                    <#else>
+                        <tr><td class="td-manage text-c" colspan = "2">暂时没有QC操作记录</td></tr>
+                    </#if>
+        </table>
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">
+                    客服操作记录
+                </div>
+            </label>
+            <div class="formControls col-10 col-sm-10">
+            </div>
+        </div>
+    <#--<label class="form-label col-2 col-sm-2">购买产品信息:</label>-->
+        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+            <tr class="text-c">
+                <th>处理结果</th>
+                <th>处理备注</th>
+                <th>操作客服</th>
+                <th>操作时间</th>
+            </tr>
+                    <#if listTreatmentRecordLog?? &&  (listTreatmentRecordLog?size > 0) >
+                        <#list listTreatmentRecordLog as item>
+                            <tr class="text-c">
+                                <td><#if item.recordProcessingResults == 1>付费维修</#if>
+                                    <#if item.recordProcessingResults == 2>免费维修</#if>
+                                    <#if item.recordProcessingResults == 3>退货</#if>
+                                    <#if item.recordProcessingResults == 4>换货</#if>
+                                    <#if item.recordProcessingResults == 5>原机退回</#if>
+                                </td>
+                                <td>${item.recordDesc!''}</td>
+                                <td>${item.adminName!''}</td>
+                                <td>${item.recordCreateTime?string("yyyy/MM/dd HH:mm:ss")}</td>
+                            </tr>
+                        </#list>
+                    <#else>
+                        <tr><td class="td-manage text-c" colspan = "4">暂时没有客服操作记录</td></tr>
+                    </#if>
+        </table>
 
          <#--<button type="button" style="cursor:pointer;height: 35px;margin-top: 10px;"onClick="" class="my-btn-search"><<返回</button>-->
     </form>

Файловите разлики са ограничени, защото са твърде много
+ 54 - 44
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


+ 244 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl

@@ -25,6 +25,10 @@
         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;}
         .huanhang{ float:left}
         .check-box, .radio-box{padding-left: 0;}
+        .my-close{position:absolute;right: 0.5em;top: 0.45em;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(45deg);transform: rotate(45deg);display: inline-block;}
+        .my-close:after{content: "";position: absolute;top: 0;left: 0;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(270deg);transform: rotate(270deg);}
+        .b-close{position: relative; display: inline-block;margin: 2px 0; padding:4px 1em 4px 4px; width: 100px;background: #f0f0f0;border: 1px solid rgba(0,0,0,.1);border-radius: 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;}
+        .close-box{width: 500px;margin-left: 15px;margin-top: -15px;}
     </style>
     <meta name="keywords" content="${path}">
     <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
@@ -99,7 +103,7 @@
         </div>
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">生产月份:</label>
-            <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-left: -4%;margin: 10px 0px 10px -14px;">
+            <div class="formControls col-9 col-sm-9 text-c huanhang" style="margin-left: -4%;margin: 10px 0px 10px -19px;">
                 <input class="my-input" style="width: 90%;" type="text" value="" name="detectProduction" id="detectProduction" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M',dateFmt: 'yyyy-MM'})" placeholder="请选择月份" readonly="readonly"/>
             </div>
         </div>
@@ -115,47 +119,178 @@
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectVersionNumber!''}" name="detectVersionNumber" id="detectVersionNumber"  placeholder="请输入版本号"/>
             </div>
         </div>
-       <div class="input-box" >
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">检测现象:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                <select id="configSelect1" name="configSelect1" class="my-select" style="width: 93%;">
+                    <#if (config1?size > 0)>
+                            <#list config1 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                </select>
+
+            </div>
+        </div>
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" id="config1" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui1">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+       <#--<div class="input-box" >
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测现象:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPhenomenon!''}" name="detectPhenomenon" id="detectPhenomenon"  placeholder="请输入检测现象"/>
             </div>
-        </div>
+        </div>-->
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
-            <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
-                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障原因:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                <select id="configSelect2" name="configSelect2" class="my-select" style="width: 93%;">
+                    <#if (config2?size > 0)>
+                            <#list config2 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                </select>
+
             </div>
         </div>
+
         <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" id="config2" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui2">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <#--<div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障原因:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFailureCause!''}" name="detectFailureCause" id="detectFailureCause"  placeholder="请输入故障原因"/>
             </div>
+        </div>-->
+
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">判定结果:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                <select id="configSelect3" name="configSelect3" class="my-select" style="width: 93%;">
+                    <#if (config3?size > 0)>
+                            <#list config3 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                </select>
+
+            </div>
         </div>
+
         <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" id="config3" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui3">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <#--<div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">判定结果:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectResults!''}" name="detectResults" id="detectResults"  placeholder="请输入判定结果"/>
             </div>
+        </div>-->
+
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障指向:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                <select id="configSelect4" name="configSelect4" class="my-select" style="width: 93%;">
+                    <#if (config4?size > 0)>
+                            <#list config4 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                </select>
+
+            </div>
         </div>
+
         <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" id="config4" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui4">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <#--<div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障指向:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPoint!''}" name="detectPoint" id="detectPoint"  placeholder="请输入故障指向"/>
             </div>
+        </div>-->
+
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">原因分析:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                <select id="configSelect5" name="configSelect5" class="my-select" style="width: 93%;">
+                    <#if (config5?size > 0)>
+                            <#list config5 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                </select>
+
+            </div>
         </div>
+
         <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+            <div class="formControls col-9 col-sm-9 huanhang" id="config5" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui5">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <#--<div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">原因分析:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectNalysis!''}" name="detectNalysis" id="detectNalysis"  placeholder="请输入原因分析"/>
             </div>
+        </div>-->
+        <div class="input-box">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
+            <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
+            <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
+                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
+            </div>
         </div>
     <#--    <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测内容:</label>
@@ -218,6 +353,103 @@
             increaseArea: '20%'
         });
     });
+    function deleteli(obj) {
+        $(obj).parent().remove();
+    }
+
+    $('#configSelect1').change(function() {
+        var name = $("#configSelect1 option:selected").text();
+        var id = $('#configSelect1').val();
+        var bl = true;
+        $("input[name='configli1']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl){
+            $("#configui1").append('<li class="b-close" id="configDetele1">' +
+                    ' <input type="hidden" value="'+id+'" name="configli1">' +name+
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+
+    });
+
+    $('#configSelect2').change(function() {
+        var name = $("#configSelect2 option:selected").text();
+        var id = $('#configSelect2').val();
+        var bl = true;
+        $("input[name='configli2']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl){
+        $("#configui2").append('<li class="b-close" id="configDetele2">' +
+                ' <input type="hidden" value="'+id+'" name="configli2">' +name+
+                '<span class="my-close" onclick="deleteli(this)"></span>' +
+                '</li>');
+        }
+    });
+
+    $('#configSelect3').change(function() {
+        var name = $("#configSelect3 option:selected").text();
+        var id = $('#configSelect3').val();
+        var bl = true;
+        $("input[name='configli3']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl) {
+            $("#configui3").append('<li class="b-close" id="configDetele3">' +
+                    ' <input type="hidden" value="' + id + '" name="configli3">' + name +
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
+    $('#configSelect4').change(function() {
+        var name = $("#configSelect4 option:selected").text();
+        var id = $('#configSelect4').val();
+        var bl = true;
+        $("input[name='configli4']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl) {
+            $("#configui4").append('<li class="b-close" id="configDetele4">' +
+                    ' <input type="hidden" value="' + id + '" name="configli4">' + name +
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
+    $('#configSelect5').change(function() {
+        var name = $("#configSelect5 option:selected").text();
+        var id = $('#configSelect5').val();
+        var bl = true;
+        $("input[name='configli5']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl) {
+            $("#configui5").append('<li class="b-close" id="configDetele5">' +
+                    ' <input type="hidden" value="' + id + '" name="configli5">' + name +
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
+
+
     /***
      * 删除图片
      */

+ 287 - 14
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_detect.ftl

@@ -25,6 +25,10 @@
         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;}
         .huanhang{ float:left}
         .check-box, .radio-box{padding-left: 0;}
+        .my-close{position:absolute;right: 0.5em;top: 0.45em;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(45deg);transform: rotate(45deg);display: inline-block;}
+        .my-close:after{content: "";position: absolute;top: 0;left: 0;width:0.15em;height:1em;background: #333;-webkit-transform: rotate(270deg);transform: rotate(270deg);}
+        .b-close{position: relative; display: inline-block;margin: 2px 0; padding:4px 1em 4px 4px; width: 100px;background: #f0f0f0;border: 1px solid rgba(0,0,0,.1);border-radius: 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;}
+        .close-box{width: 500px;margin-left: 15px;margin-top: -15px;}
     </style>
     <meta name="keywords" content="${path}">
     <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
@@ -115,48 +119,221 @@
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectVersionNumber!''}" name="detectVersionNumber" id="detectVersionNumber"  placeholder="请输入版本号"/>
             </div>
         </div>
-       <div class="input-box" >
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">检测现象:</label>
+                <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                    <select id="configSelect1" name="configSelect1" class="my-select" style="width: 93%;">
+                    <#if (config1?size > 0)>
+                            <#list config1 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                    </select>
+
+                </div>
+            </div>
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+                <div class="formControls col-9 col-sm-9 huanhang" id="config1" style="margin: 10px 0px;">
+                    <div class="row">
+                        <ul class="close-box" id="configui1">
+                            <#if detectPhenomenonList??>
+                                <#if (detectPhenomenonList?size > 0)>
+                                <#list detectPhenomenonList as detectPhenomenon>
+                                    <li class="b-close" id="configDetele1">
+                                        <input type="hidden" value="${detectPhenomenon.itemConfigId!''}" name="configli1">
+                                        ${detectPhenomenon.itemDetectContent!''}
+                                        <span class="my-close" onclick="deleteli(this)"></span>
+                                    </li>
+                                </#list>
+                                </#if>
+                            </#if>
+                        </ul>
+                    </div>
+
+                </div>
+            </div>
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障原因:</label>
+                <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                    <select id="configSelect2" name="configSelect2" class="my-select" style="width: 93%;">
+                    <#if (config2?size > 0)>
+                            <#list config2 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                    </select>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+                <div class="formControls col-9 col-sm-9 huanhang" id="config2" style="margin: 10px 0px;">
+                    <div class="row">
+                        <ul class="close-box" id="configui2">
+                            <#if detectFailureCauseList??>
+                                <#if (detectFailureCauseList?size > 0)>
+                                    <#list detectFailureCauseList as detectFailureCause>
+                                    <li class="b-close" id="configDetele2">
+                                        <input type="hidden" value="${detectFailureCause.itemConfigId!''}" name="configli2">
+                                        ${detectFailureCause.itemDetectContent!''}
+                                        <span class="my-close" onclick="deleteli(this)"></span>
+                                    </li>
+                                    </#list>
+                                </#if>
+                            </#if>
+                        </ul>
+                    </div>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">判定结果:</label>
+                <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                    <select id="configSelect3" name="configSelect3" class="my-select" style="width: 93%;">
+                    <#if (config3?size > 0)>
+                            <#list config3 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                    </select>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+                <div class="formControls col-9 col-sm-9 huanhang" id="config3" style="margin: 10px 0px;">
+                    <div class="row">
+                        <ul class="close-box" id="configui3">
+                            <#if detectResultsList??>
+                                <#if (detectResultsList?size > 0)>
+                                    <#list detectResultsList as detectResults>
+                                    <li class="b-close" id="configDetele3">
+                                        <input type="hidden" value="${detectResults.itemConfigId!''}" name="configli3">
+                                        ${detectResults.itemDetectContent!''}
+                                        <span class="my-close" onclick="deleteli(this)"></span>
+                                    </li>
+                                    </#list>
+                                </#if>
+                            </#if>
+                        </ul>
+                    </div>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障指向:</label>
+                <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                    <select id="configSelect4" name="configSelect4" class="my-select" style="width: 93%;">
+                    <#if (config4?size > 0)>
+                            <#list config4 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                    </select>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+                <div class="formControls col-9 col-sm-9 huanhang" id="config4" style="margin: 10px 0px;">
+                    <div class="row">
+                        <ul class="close-box" id="configui4">
+                                <#if (detectPointList?size > 0)>
+                                    <#list detectPointList as detectPoint>
+                                    <li class="b-close" id="configDetele4">
+                                        <input type="hidden" value="${detectPoint.itemConfigId!''}" name="configli4">
+                                        ${detectPoint.itemDetectContent!''}
+                                        <span class="my-close" onclick="deleteli(this)"></span>
+                                    </li>
+                                    </#list>
+                                </#if>
+                        </ul>
+                    </div>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">原因分析:</label>
+                <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
+                    <select id="configSelect5" name="configSelect5" class="my-select" style="width: 93%;">
+                    <#if (config5?size > 0)>
+                            <#list config5 as config>
+                                <option value="${config.configId!""}">${config.configDetectContent!""}</option>
+                            </#list>
+                    </#if>
+                    </select>
+
+                </div>
+            </div>
+
+            <div class="input-box">
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
+                <div class="formControls col-9 col-sm-9 huanhang" id="config5" style="margin: 10px 0px;">
+                    <div class="row">
+                        <ul class="close-box" id="configui5">
+                                <#if (detectNalysisList?size > 0)>
+                                    <#list detectNalysisList as detectNalysis>
+                                    <li class="b-close" id="configDetele5">
+                                        <input type="hidden" value="${detectNalysis.itemConfigId!''}" name="configli5">
+                                        ${detectNalysis.itemDetectContent!''}
+                                        <span class="my-close" onclick="deleteli(this)"></span>
+                                    </li>
+                                    </#list>
+                                </#if>
+                        </ul>
+                    </div>
+
+                </div>
+            </div>
+       <#--<div class="input-box" >
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测现象:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPhenomenon!''}" name="detectPhenomenon" id="detectPhenomenon"  placeholder="请输入检测现象"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
-            <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
-                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
-            </div>
-        </div>
-        <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障原因:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFailureCause!''}" name="detectFailureCause" id="detectFailureCause"  placeholder="请输入故障原因"/>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">判定结果:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectResults!''}" name="detectResults" id="detectResults"  placeholder="请输入判定结果"/>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障指向:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPoint!''}" name="detectPoint" id="detectPoint"  placeholder="请输入故障指向"/>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">原因分析:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>-->
+                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectNalysis!''}" name="detectNalysis" id="detectNalysis"  placeholder="请输入原因分析"/>
             </div>
-        </div>
+        </div>-->
+            <div class="input-box">
+                <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
+                <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
+                <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
+                    <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
+                </div>
+            </div>
     <#--    <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测内容:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
@@ -225,6 +402,102 @@
             increaseArea: '20%'
         });
     });
+
+    function deleteli(obj) {
+        $(obj).parent().remove();
+    }
+
+    $('#configSelect1').change(function() {
+        var name = $("#configSelect1 option:selected").text();
+        var id = $('#configSelect1').val();
+        var bl = true;
+        $("input[name='configli1']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl){
+            $("#configui1").append('<li class="b-close" id="configDetele1">' +
+                    ' <input type="hidden" value="'+id+'" name="configli1">' +name+
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+
+    });
+
+    $('#configSelect2').change(function() {
+        var name = $("#configSelect2 option:selected").text();
+        var id = $('#configSelect2').val();
+        var bl = true;
+        $("input[name='configli2']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl){
+            $("#configui2").append('<li class="b-close" id="configDetele2">' +
+                    ' <input type="hidden" value="'+id+'" name="configli2">' +name+
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
+    $('#configSelect3').change(function() {
+        var name = $("#configSelect3 option:selected").text();
+        var id = $('#configSelect3').val();
+        var bl = true;
+        $("input[name='configli3']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl) {
+            $("#configui3").append('<li class="b-close" id="configDetele3">' +
+                    ' <input type="hidden" value="' + id + '" name="configli3">' + name +
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
+    $('#configSelect4').change(function() {
+        var name = $("#configSelect4 option:selected").text();
+        var id = $('#configSelect4').val();
+        var bl = true;
+        $("input[name='configli4']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl) {
+            $("#configui4").append('<li class="b-close" id="configDetele4">' +
+                    ' <input type="hidden" value="' + id + '" name="configli4">' + name +
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
+    $('#configSelect5').change(function() {
+        var name = $("#configSelect5 option:selected").text();
+        var id = $('#configSelect5').val();
+        var bl = true;
+        $("input[name='configli5']").each(function(j,item){
+            var s = $(item).val();
+            if(s === id){
+                bl = false;
+            }
+        });
+        if(bl) {
+            $("#configui5").append('<li class="b-close" id="configDetele5">' +
+                    ' <input type="hidden" value="' + id + '" name="configli5">' + name +
+                    '<span class="my-close" onclick="deleteli(this)"></span>' +
+                    '</li>');
+        }
+    });
+
     /***
      * 删除图片
      */

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

@@ -62,10 +62,17 @@
                 </div>
             </div>
             <div class="row cl" style="position: relative;">
-                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>物流信息:</label>
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>物流公司:</label>
                 <div class="formControls col-6 col-sm-6 skin-minimal huanhang">
                         <select name="signclosedLogistics" class="my-select" style="width: 228px;margin-left: 0px;">
                             <option value="">请选择物流公司</option>
+                            <#if logisticsInfoList?? &&  (logisticsInfoList?size > 0) >
+                                <#list logisticsInfoList as logisticsInfo>
+                            <option value="${logisticsInfo.logisticsRstCode!''}"<#if complaintSignclosedInfo.signclosedLogistics??><#if complaintSignclosedInfo.signclosedLogistics == logisticsInfo.logisticsRstCode>selected</#if></#if>>${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
+                                </#list>
+                            </#if>
+<#--
+
                         <#if complaintSignclosedInfo.signclosedLogistics??>
                             <option value="sto" <#if complaintSignclosedInfo.signclosedLogistics == "sto">selected="selected"</#if> >申通快递</option>
                             <option value="yto" <#if complaintSignclosedInfo.signclosedLogistics == "yto">selected="selected"</#if>>圆通快递</option>
@@ -99,13 +106,13 @@
                             <option value="jd">京东快递</option>
                             <option value="01">其他</option>
                             <option value="02">上门送货</option>
-                        </#if>
+                        </#if>-->
                         </select>
                 </div>
             </div>
 
             <div class="row cl" style="position: relative;">
-                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>物流信息:</label>
+                <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>物流单号:</label>
                 <div class="formControls col-6 col-sm-6 skin-minimal huanhang">
                     <input type="text" style="" value="<#if complaintSignclosedInfo.signclosedLogisticsNumber??>${complaintSignclosedInfo.signclosedLogisticsNumber!''}</#if>" class="input-text" placeholder="物流单号" id="signclosedLogisticsNumber" name="signclosedLogisticsNumber">
                 </div>