Bladeren bron

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

wangxiaoming 5 jaren geleden
bovenliggende
commit
17b81942c9
18 gewijzigde bestanden met toevoegingen van 1733 en 792 verwijderingen
  1. 35 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java
  2. 17 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java
  3. 63 74
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
  4. 19 32
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java
  5. 12 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java
  6. 61 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml
  7. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml
  8. 200 96
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  9. 155 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/detectController.java
  10. 0 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java
  11. 96 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_config.ftl
  12. 187 7
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/complete_maintenance.ftl
  13. 5 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  14. 268 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_msg.ftl
  15. 0 264
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_msg.html
  16. 253 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_repair_list.ftl
  17. 361 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/perfect_detect.ftl
  18. 0 311
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl

+ 35 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java

@@ -121,15 +121,18 @@ public class ComplaintDetectInfo implements Serializable {
     private Integer state;//查询各状态条数
     private Integer signclosedIsWhetherLess;//是否少件 1是 2否
     private Integer salesmanAdminId;//业务员id
+    private String salesmanAdminName;//业务员姓名
     private String  detectName;//客户姓名
     private String detectTel;//客户电话
     private Integer questionId;//客户问题id
     private Integer methodId;//新增维修 处理方式id
+    private Integer typeId;//新增维修 处理方式类型id
+    private String methodName;//新增维修 处理方式名称
+    private String typeName;//新增维修 处理方式类型名称
     private Integer detectSource;//数据来源1,自动录入2手动添加
     private String questionName;//问题名称
     private String questionProfile;//问题回复
 
-
     public String getQuestionName() {
         return questionName;
     }
@@ -817,4 +820,35 @@ public class ComplaintDetectInfo implements Serializable {
     public void setDetectSource(Integer detectSource) {
         this.detectSource = detectSource;
     }
+
+    public Integer getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(Integer typeId) {
+        this.typeId = typeId;
+    }
+    public String getSalesmanAdminName() {
+        return salesmanAdminName;
+    }
+
+    public void setSalesmanAdminName(String salesmanAdminName) {
+        this.salesmanAdminName = salesmanAdminName;
+    }
+
+    public String getMethodName() {
+        return methodName;
+    }
+
+    public void setMethodName(String methodName) {
+        this.methodName = methodName;
+    }
+
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
 }

+ 17 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java

@@ -213,4 +213,21 @@ public interface ComplaintDetectInfoService {
      * @return
      */
     List<ComplaintDetectInfo> listCompleteCutNotice();
+
+    /**
+     * 完善客户信息
+     * @return
+     */
+    Integer perfectDetect(ComplaintDetectInfo detectInfo);
+
+    /**
+     * 添加维修基础信息
+     * @return
+     */
+    Integer addConfig(DetectionConfig detectionConfig);
+    /**
+     * 添加维修维修配件基础信息
+     * @return
+     */
+    Integer addMaterial(MaterialNumberInfo materialNumberInfo);
 }

+ 63 - 74
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -165,6 +165,46 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                     }
                 }
             }
+            //故障原因
+            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());
+                }
+            }
         }catch (Exception e){
             throw new RuntimeException("修改检测维修内容失败");
         }
@@ -313,46 +353,7 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                 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){
@@ -562,38 +563,14 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         }else{
             date.set(Calendar.DATE, date.get(Calendar.DATE) + 5);
         }
-
-        switch (detectInfo.getDetectState()){
-            case 30:
-                if(detectInfo.getDetectProcessingResults() == 1){//付费维修
-                    detectInfo.setDetectState(31);//同意付费维修
-                    detectInfo.setCompleteCutTime(date.getTime());
-                }
-                if(detectInfo.getDetectProcessingResults() == 3 || detectInfo.getDetectProcessingResults() == 4){//退货、换货
-                    if(detect.getDetectRenovation() == 1){
-                        detectInfo.setDetectState(20);//待翻新
-                    }else{
-                        detectInfo.setDetectState(22);//待报废
-                    }
-                }
-                if(detectInfo.getDetectProcessingResults() == 5){//原机退回
-                    detectInfo.setDetectState(33);//
-                }
-                break;
-            case 34:
-                detectInfo.setDetectState(35);
-                detectInfo.setCompleteCutTime(date.getTime());
-                break;
-            case 38:
                 if(detectInfo.getDetectProcessingResults() == 1){//付费维修
                     detectInfo.setDetectState(31);//同意付费维修
                     detectInfo.setCompleteCutTime(date.getTime());
-                }
-                if(detectInfo.getDetectProcessingResults() == 2){//免费维修
-                    detectInfo.setDetectState(35);//同意免费维修
+                }else if(detectInfo.getDetectProcessingResults() == 2){//免费维修
+                    detectInfo.setDetectState(35);//同意付费维修
                     detectInfo.setCompleteCutTime(date.getTime());
                 }
-                if(detectInfo.getDetectProcessingResults() == 3 || detectInfo.getDetectProcessingResults() == 4){//退货、换货
+                if(detectInfo.getDetectProcessingResults() == 3 || detect.getDetectProcessingResults() == 4){//退货、换货
                     if(detect.getDetectRenovation() == 1){
                         detectInfo.setDetectState(20);//待翻新
                     }else{
@@ -601,19 +578,16 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                     }
                 }
                 if(detectInfo.getDetectProcessingResults() == 5){//原机退回
-                    detectInfo.setDetectState(37);//原机退回
+                    detectInfo.setDetectState(33);//
                 }
-                break;
-        }
-
         try {
             if(complaintDetectInfoMapper.updateDetectById(detectInfo) > 0){
                 //添加业务员操作记录
                 TreatmentRecordLog log = new TreatmentRecordLog();
                 log.setDetectId(detectInfo.getDetectId());
-                log.setRecordAdminId(detectInfo.getSalesmanAdminId());
-                log.setRecordDesc(detectInfo.getDetectCustomerDesc());
-                log.setRecordProcessingResults(detectInfo.getDetectProcessingResults());
+                log.setRecordAdminId(detect.getSalesmanAdminId());
+                log.setRecordDesc(detect.getDetectCustomerDesc());
+                log.setRecordProcessingResults(detect.getDetectProcessingResults());
                 complaintDetectInfoMapper.addTreatmentRecordLog(log);
                 //发送确认短信
                 String results = "";
@@ -790,5 +764,20 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         return complaintDetectInfoMapper.listCompleteCutNotice();
     }
 
+    @Override
+    public Integer perfectDetect(ComplaintDetectInfo detectInfo) {
+        return complaintDetectInfoMapper.updateDetectById(detectInfo);
+    }
+
+    @Override
+    public Integer addConfig(DetectionConfig detectionConfig) {
+        return complaintDetectInfoMapper.addConfig(detectionConfig);
+    }
+
+    @Override
+    public Integer addMaterial(MaterialNumberInfo materialNumberInfo) {
+        return complaintDetectInfoMapper.addMaterial(materialNumberInfo);
+    }
+
 
 }

+ 19 - 32
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java

@@ -86,6 +86,11 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                 num = complaintSignclosedInfoMapper.insert(record);
                 msg = 1;//添加成功
                 signclosedId = record.getSignclosedId();
+
+                //没有匹配上并且销售公司为‘优尼雅’,‘上朵’时不展示到待联系列表,并且生成维修信息,状态为‘待完善客户信息’
+                if(record.getSignclosedCompanyId() == 3 || record.getSignclosedCompanyId() == 4){
+                    addDet(signclosedId,40);
+                }
             }else{
                 //将签收记录改为已签收
                 ComplaintSignclosedInfo complaintSignclosedInfo = sinfoList.get(0);
@@ -124,32 +129,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                             signclosedProductInfo.setSignclosedCreateTime(new Date());
                             signclosedProductInfo.setSignclosedState(2);
                             complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
-                        /*for (int j = 0;j<salesOrderItem.getItemNum();j++){
-
-                            //判断是否需要生成维修记录
-                            *//*if(product.getProductIsDetection() == 1){
-                                //添加待检测信息
-                                //查询签收信息
-                                ComplaintSignclosedInfo signclosedInfo = complaintSignclosedInfoMapper.getSignclosedById(record.getSignclosedId());
-                                ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
-                                detectInfo.setProductId(productColor.getColorProductId());
-                                detectInfo.setProductColorId(salesOrderItem.getItemColorId());
-                                detectInfo.setDetectProductNumber(product.getProductNumber());
-                                detectInfo.setDetectState(1);
-                                detectInfo.setCustomerId(signclosedInfo.getSignclosedCustomerId());
-                                detectInfo.setIsMaintenance(0);
-                                detectInfo.setDetectRenovation(0);
-                                detectInfo.setDetectProcessingResults(0);
-                                try {
-                                    complaintDetectInfoMapper.insert(detectInfo);
-                                }catch (Exception e){
-                                    throw new RuntimeException("------------生成检测信息出错------------");
-                                }
-                            }*//*
-
-                            j++;
-                        }*/
-
                     }
                 }
             }
@@ -165,7 +144,7 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                     }
                 }
             }
-            //关联客诉/判断是否生成客诉信息
+            //关联客诉/判断是否关联客诉信息
             try {
                 addDetect(record,2);
             }catch (Exception e){
@@ -295,6 +274,7 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                                     detectInfo.setDetectRenovation(0);
                                     detectInfo.setDetectProcessingResults(0);
                                     detectInfo.setSignclosedId(infos.getSignclosedId());
+                                    detectInfo.setDetectSource(1);
                                     Calendar date = Calendar.getInstance();
                                     date.setTime(new Date());
                                     boolean fl = false;
@@ -333,8 +313,12 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
         }
         return 1;
     }
-
-    public void addDet(Integer signclosedId){
+    /**
+     * 根据签收id生成维修信息
+     * @param signclosedId 签收id detectState 状态
+     * @return
+     */
+    public void addDet(Integer signclosedId,Integer detectState){
         ComplaintSignclosedInfo sigInfo = complaintSignclosedInfoMapper.getSignclosedById(signclosedId);
         //判断是否需要生成维修记录
         if(sigInfo.getSignclosedProductInfoList().size() > 0) {
@@ -353,12 +337,13 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                             detectInfo.setProductId(productColor.getColorProductId());
                             detectInfo.setProductColorId(productInfo.getSignclosedProductColor());
                             detectInfo.setDetectProductNumber(product.getProductNumber());
-                            detectInfo.setDetectState(1);
+                            detectInfo.setDetectState(detectState);
                             detectInfo.setCustomerId(sigInfo.getSignclosedCustomerId());
                             detectInfo.setIsMaintenance(0);
                             detectInfo.setDetectRenovation(0);
                             detectInfo.setDetectProcessingResults(0);
                             detectInfo.setSignclosedId(sigInfo.getSignclosedId());
+                            detectInfo.setDetectSource(1);
                             Calendar date = Calendar.getInstance();
                             date.setTime(new Date());
                             boolean fl = false;
@@ -375,7 +360,9 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                             }else{
                                 date.set(Calendar.DATE, date.get(Calendar.DATE) + 3);
                             }
-                            detectInfo.setMaintenanceCutTime(date.getTime());
+                            if(detectState != 40){
+                                detectInfo.setMaintenanceCutTime(date.getTime());
+                            }
                             try {
                                 complaintDetectInfoMapper.insert(detectInfo);
                             } catch (Exception e) {
@@ -651,7 +638,7 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
         }
         //关联客诉/判断是否生成客诉信息
         try {
-            addDet(record.getSignclosedId());
+            addDet(record.getSignclosedId(),1);
         }catch (Exception e){
             throw new RuntimeException("------------关联客诉出错------------");
         }

+ 12 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java

@@ -194,4 +194,16 @@ public interface ComplaintDetectInfoMapper {
      * @return
      */
     List<ComplaintDetectInfo> listComplaintDetectByOrderId(ComplaintDetectInfo complaintDetectInfo);
+
+
+    /**
+     * 添加维修基础信息
+     * @return
+     */
+    Integer addConfig(DetectionConfig detectionConfig);
+    /**
+     * 添加维修维修配件基础信息
+     * @return
+     */
+    Integer addMaterial(MaterialNumberInfo MaterialNumberInfo);
 }

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

@@ -68,7 +68,8 @@
       cd.method_id methodId,
       cd.detect_source detectSource,
       cq.question_name questionName,
-      cq.question_profile questionProfile
+      cq.question_profile questionProfile,
+      ssa.admin_name salesmanAdminName
     from tb_rst_complaint_detect cd
     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
@@ -85,6 +86,8 @@
     LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
     LEFT JOIN tb_rst_sys_admin sa on c.admin_id = sa.admin_id
     LEFT JOIN tb_rst_cm_complaint_question cq on cq.question_id = cd.question_id
+    LEFT JOIN tb_rst_sys_admin ssa on cd.salesman_admin_id = ssa.admin_id
+
     where detect_id = #{detectId,jdbcType=INTEGER}
     GROUP BY c.customer_id
   </select>
@@ -162,7 +165,11 @@
     cd.detect_tel detectTel,
     cd.question_id questionId,
     cd.method_id methodId,
-    cd.detect_source detectSource
+    cd.detect_source detectSource,
+    ssa.admin_name salesmanAdminName,
+    cq.question_name questionName,
+    cpms.proc_method_name methodName,
+    cpts.proc_type_name typeName
     from tb_rst_complaint_detect cd
     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
@@ -179,6 +186,10 @@
     LEFT JOIN tb_rst_address_city ac ON cs.signclosed_addr_city = ac.city_id
     LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
     LEFT JOIN tb_rst_sys_admin sa on c.admin_id = sa.admin_id
+    LEFT JOIN tb_rst_cm_complaint_question cq on cq.question_id = cd.question_id
+    LEFT JOIN tb_rst_sys_admin ssa on cd.salesman_admin_id = ssa.admin_id
+    LEFT JOIN tb_rst_cm_proc_method cpms on cd.method_id = cpms.proc_method_id
+    LEFT JOIN tb_rst_cm_proc_type cpts on cpms.proc_type_id = cpts.proc_type_id
     <where>
       <if test="productTypeId != null" >
         AND pt.type_id = #{productTypeId,jdbcType=INTEGER}
@@ -306,6 +317,30 @@
       <if test="maintenanceResults != null and maintenanceResults != ''">
         and cd.maintenance_results = #{maintenanceResults}
       </if>
+      <if test="detectSource != null and detectSource == 1">
+        and cd.detect_state != 40
+      </if>
+      <if test="detectSource != null and detectSource == 2">
+        and cd.detect_source = #{detectSource}
+      </if>
+      <if test="salesmanAdminId != null and salesmanAdminId != ''">
+        and ssa.admin_id = #{salesmanAdminId}
+      </if>
+      <if test="methodId != null and methodId != ''">
+        and cd.method_id = #{methodId}
+      </if>
+      <if test="detectName != null and detectName != ''">
+        and cd.detect_name like CONCAT('%',#{detectName},'%')
+      </if>
+      <if test="detectTel != null and detectTel != ''">
+        and cd.detect_tel like CONCAT('%',#{detectTel},'%')
+      </if>
+      <if test="questionName != null and questionName != ''">
+        and cq.question_name like CONCAT('%',#{questionName},'%')
+      </if>
+      <if test="typeId != null and typeId != ''">
+        and cpts.proc_type_id = #{typeId}
+      </if>
     </where>
       GROUP BY cd.detect_id
       ORDER BY cd.detect_create_time DESC
@@ -439,7 +474,10 @@
         method_id = #{methodId},
       </if>
       <if test="detectSource != null" >
-        detect_source = #{detectSource}
+        detect_source = #{detectSource},
+      </if>
+      <if test="maintenanceCutTime != null" >
+          maintenance_cut_time = #{maintenanceCutTime}
       </if>
     </set>
     where
@@ -841,4 +879,24 @@
         to_days(NOW( ))-to_days(complete_cut_time) = -1
         AND detect_state in(31,35)
   </select>
+  <insert id="addConfig" parameterType="DetectionConfig">
+      INSERT INTO tb_rst_complaint_detection_config (
+        config_detect_content,
+        config_type
+    )
+    VALUES
+        (
+            #{configDetectContent},#{configType}
+        )
+  </insert>
+  <insert id="addMaterial" parameterType="MaterialNumberInfo">
+      INSERT INTO tb_rst_fm_material_number (
+        material_name,
+        material_type
+    )
+    VALUES
+        (
+            #{materialName},#{materialType}
+        )
+  </insert>
 </mapper>

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml

@@ -158,7 +158,7 @@
         AND cs.signclosed_customer_id = #{signclosedCustomerId}
       </if>
       <if test="isBinding != null and isBinding == 1" >
-        AND cs.signclosed_customer_id is NULL
+        AND cs.signclosed_customer_id is NULL AND cs.signclosed_company_id != 3 AND cs.signclosed_company_id != 4
       </if>
       <if test="signclosedIsReceiving != null and signclosedIsReceiving != ''" >
         AND cs.signclosed_is_receiving = #{signclosedIsReceiving}

+ 200 - 96
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -2,6 +2,7 @@ package com.iamberry.rst.controllers.cm;
 
 import com.iamberry.rst.core.cm.CompanyInfo;
 import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
+import com.iamberry.rst.core.cm.ProcType;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.fm.*;
 import com.iamberry.rst.core.order.Product;
@@ -12,6 +13,7 @@ import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.core.tools.LogisticsInfo;
 import com.iamberry.rst.faces.cm.CompanyInfoService;
+import com.iamberry.rst.faces.cm.ProcTypeService;
 import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.faces.fm.AwaitingSignclosedProductInfoService;
 import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
@@ -39,6 +41,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
@@ -71,6 +74,8 @@ public class AdminDetectController {
     private ComplaintQuestionInfoMapper complaintQuestionInfoMapper;
     @Autowired
     private SysMapper sysMapper;
+    @Autowired
+    private ProcTypeService procTypeService;
     /**
      * 跳转到添加检测记录页面
      *
@@ -123,7 +128,7 @@ public class AdminDetectController {
                                          ComplaintDetectInfo detect) throws ParseException {
 
         ModelAndView mv = new ModelAndView("cm/inspection/detect_list");
-
+        detect.setDetectSource(1);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         // 封装请求数据
         PageRequest<ComplaintDetectInfo> pageRequest = new PageRequest<>(detect, pageNO, pageSize, totalNum == 0);
@@ -260,6 +265,14 @@ public class AdminDetectController {
             return mv;
         }
         ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        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("config2",config2);
+        mv.addObject("config3",config3);
+        mv.addObject("config4",config4);
+        mv.addObject("config5",config5);
         List<MaterialNumberInfo> listMaterial = complaintDetectInfoService.listMaterialNumber();
         mv.addObject("detectId",detectId);
         mv.addObject("detectState",detectState);
@@ -315,55 +328,7 @@ public class AdminDetectController {
         return mv;
     }
 
-    /**
-     * 获取检测详情
-     *
-     * @return
-     */
-    @RequiresPermissions("info:update:info")
-    @RequestMapping(value = "/get_detail")
-    public ResponseJson getDetail(HttpServletRequest request) {
-        String detectId = request.getParameter("detectId");
-        ResponseJson msg = new ResponseJson();
-        if(detectId == null || detectId.equals("")){
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-        }
-        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));
-        if(detectinfo.getSalesOrderId() != null){
-            SalesOrder salesOrder = salesOrderService.getSalesOrderByOrderId(detectinfo.getSalesOrderId());
-            msg.addResponseKeyValue("salesOrder",salesOrder);
-        }
-        DetectionItem detectionItem = new DetectionItem();
-        detectionItem.setDetectId(Integer.valueOf(detectId));
-        //查询检测现象
-        detectionItem.setConfigType(1);
-        msg.addResponseKeyValue("detectPhenomenonList",complaintDetectInfoService.listDetectionItem(detectionItem));
-        //查询故障原因
-        detectionItem.setConfigType(2);
-        msg.addResponseKeyValue("detectFailureCauseList",complaintDetectInfoService.listDetectionItem(detectionItem));
-        //查询判定结果
-        detectionItem.setConfigType(3);
-        msg.addResponseKeyValue("detectResultsList",complaintDetectInfoService.listDetectionItem(detectionItem));
-        //查询故障指向
-        detectionItem.setConfigType(4);
-        msg.addResponseKeyValue("detectPointList",complaintDetectInfoService.listDetectionItem(detectionItem));
-        //查询原因分析
-        detectionItem.setConfigType(5);
-        msg.addResponseKeyValue("detectNalysisList",complaintDetectInfoService.listDetectionItem(detectionItem));
-        msg.addResponseKeyValue("listTreatmentRecordLog",listTreatmentRecordLog);
-        msg.addResponseKeyValue("listQcInfo",listQcInfo);
-        msg.addResponseKeyValue("listMaterialItem",listMaterialItem);
-        msg.addResponseKeyValue("detectinfo",detectinfo);
-        msg.addResponseKeyValue("imgList",imgList);
-        msg.setResultCode(200);
-        msg.setReturnCode(200);
-        return msg;
-    }
+
 
     /**
      * 跳转到修改检测页面
@@ -522,6 +487,14 @@ public class AdminDetectController {
             return msg;
         }
         String[] configli6 = request.getParameterValues("configli6");
+        String[] configli2 = request.getParameterValues("configli2");
+        String[] configli3 = request.getParameterValues("configli3");
+        String[] configli4 = request.getParameterValues("configli4");
+        String[] configli5 = request.getParameterValues("configli5");
+        detectInfo.setConfigli2(configli2);
+        detectInfo.setConfigli3(configli3);
+        detectInfo.setConfigli4(configli4);
+        detectInfo.setConfigli5(configli5);
         detectInfo.setConfigli6(configli6);
         if(detectInfo.getDetectState() != null){
             if(detectInfo.getDetectState() == 32 || detectInfo.getDetectState() == 36 ){
@@ -603,15 +576,7 @@ public class AdminDetectController {
         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);
@@ -704,15 +669,7 @@ public class AdminDetectController {
         }
         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);
         detectInfo.setDetectCompletionTime(new Date());
         Integer num = complaintDetectInfoService.updateDetectById(detectInfo,componentsImgs);
         if (num < 1) {
@@ -816,36 +773,7 @@ public class AdminDetectController {
         return msg;
     }
 
-    /**
-     * 业务员确认处理结果
-     * @param request
-     * @return
-     * @throws Exception
-     */
-    @RequiresPermissions("complete:update:complete")
-    @ResponseBody
-    @RequestMapping("/salesman_confirm")
-    public ResponseJson salesmanConfirm(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 || "".equals(detectInfo.getDetectId())){
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-            return msg;
-        }
-        if (!complaintDetectInfoService.salesmanConfirm(detectInfo)) {
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-        } else {
-            msg.setResultCode(200);
-            msg.setReturnCode(200);
-        }
-        return msg;
-    }
+
 
     /**
      * 查询维修信息条数
@@ -1286,5 +1214,181 @@ public class AdminDetectController {
         return msg;
     }*/
 
+    /**
+     * 客诉 - 查询维修处理列表
+     * @param request
+     * @return
+     */
+    @RequiresPermissions("detect:Repair:detect")
+    @RequestMapping("/detect_repair_list")
+    public ModelAndView detectRepairList(HttpServletRequest request,
+                                         @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+                                         @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+                                         @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum,
+                                         ComplaintDetectInfo detect) throws ParseException {
+
+        ModelAndView mv = new ModelAndView("cm/inspection/detect_repair_list");
+        detect.setDetectSource(2);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        // 封装请求数据
+        PageRequest<ComplaintDetectInfo> pageRequest = new PageRequest<>(detect, pageNO, pageSize, totalNum == 0);
+        // 查询订单列表
+        PagedResult<ComplaintDetectInfo> result = complaintDetectInfoService.listComplaintDetect(pageRequest);
+        if (totalNum != 0) {
+            result.setTotal(totalNum);
+        }
+        //获取所有产品类型
+        ProductType productType = new ProductType();
+        List<ProductType> productTypeList = productService.listProductType(productType);
+        mv.addObject("productTypeList",productTypeList);
+        Product product = new Product();
+        List<Product> productList = productService.listProductAndColorAndfittings(product);
+        mv.addObject("productList",productList);
+        //查询业务员
+        Admin admin = new Admin();
+        admin.setAdminDept(15);
+        List<Admin> listAdmin = sysMapper.listAdmin(admin);
+        mv.addObject("listAdmin",listAdmin);
+        ProcType procType = new ProcType();
+        List<ProcType> procTypeList = new ArrayList<>();
+        procType.setProcTypeStatus(1);
+        procTypeList = procTypeService.getProcTypeList(procType);
+        mv.addObject("procTypeList",procTypeList);
+        StitchAttrUtil.getSa().setModelAndView(detect, mv, "/admin/detect/select_detect_list", result);
+        return mv;
+    }
+
+    /**
+     * 跳转到完善客户信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("info:update:info")
+    @RequestMapping(value = "/to_perfect_detect")
+    public ModelAndView toPerfectDetect(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/perfect_detect");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return mv;
+        }
+
+        //查询客诉问题
+        ComplaintQuestionInfo complaintQuestionInfo = new ComplaintQuestionInfo();
+        complaintQuestionInfo.setDetectComplaintType(1);
+        List<ComplaintQuestionInfo> listComplaintQuestionInfo = complaintQuestionInfoMapper.listComplaintQuestionInfo(complaintQuestionInfo);
+        //查询业务员
+        Admin admin = new Admin();
+        admin.setAdminDept(15);
+        List<Admin> listAdmin = sysMapper.listAdmin(admin);
+        ComplaintDetectInfo detectinfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        mv.addObject("listComplaintQuestionInfo",listComplaintQuestionInfo);
+        mv.addObject("listAdmin",listAdmin);
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectinfo",detectinfo);
+        return mv;
+    }
+
+    /**
+     * 完善客户信息
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("info:update:info")
+    @ResponseBody
+    @RequestMapping("/perfect_detect")
+    public ResponseJson perfectDetect(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;
+        }
+        Calendar date = Calendar.getInstance();
+        date.setTime(new Date());
+        boolean fl = false;
+        for (int i = 1 ; i <= 3; i++){
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + i);
+            int week = date.get(Calendar.DAY_OF_WEEK);//1--7的值,对应:星期日,星期一,星期二,星期三....星期六
+            if(week == 1){
+                fl = true;
+            }
+            date.set(Calendar.DATE, date.get(Calendar.DATE) - i);
+        }
+        if(fl){
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + 4);
+        }else{
+            date.set(Calendar.DATE, date.get(Calendar.DATE) + 3);
+        }
+        detectInfo.setMaintenanceCutTime(date.getTime());
+        detectInfo.setDetectState(1);
+        Integer num = complaintDetectInfoService.perfectDetect(detectInfo);
+
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
+     * 跳转到完善客户信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("info:update:info")
+    @RequestMapping(value = "/to_add_config")
+    public ModelAndView toAddConfig(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/add_config");
+        return mv;
+    }
+
+    /**
+     * 添加维修基础信息
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("info:update:info")
+    @ResponseBody
+    @RequestMapping("/add_config")
+    public ResponseJson perfectDetect(HttpServletRequest request) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        String type = request.getParameter("type");
+        String name = request.getParameter("name");
+        if(type == null ||  name == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        int num = 0;
+        if(Integer.valueOf(type) == 6){
+            MaterialNumberInfo materialNumberInfo = new MaterialNumberInfo();
+            materialNumberInfo.setMaterialName(name);
+            materialNumberInfo.setMaterialType(1);
+            num = complaintDetectInfoService.addMaterial(materialNumberInfo);
+        }else{
+            DetectionConfig detectionConfig = new DetectionConfig();
+            detectionConfig.setConfigDetectContent(name);
+            detectionConfig.setConfigType(Integer.valueOf(type));
+            num = complaintDetectInfoService.addConfig(detectionConfig);
+        }
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
 }
 

+ 155 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/detectController.java

@@ -0,0 +1,155 @@
+package com.iamberry.rst.controllers.cm;
+
+import com.iamberry.rst.core.cm.CompanyInfo;
+import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
+import com.iamberry.rst.core.cm.ProcType;
+import com.iamberry.rst.core.cm.SalesOrder;
+import com.iamberry.rst.core.fm.*;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.order.ProductColor;
+import com.iamberry.rst.core.order.ProductType;
+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.core.tools.LogisticsInfo;
+import com.iamberry.rst.faces.cm.CompanyInfoService;
+import com.iamberry.rst.faces.cm.ProcTypeService;
+import com.iamberry.rst.faces.cm.SalesOrderService;
+import com.iamberry.rst.faces.fm.AwaitingSignclosedProductInfoService;
+import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
+import com.iamberry.rst.faces.fm.ComplaintSignclosedInfoService;
+import com.iamberry.rst.faces.fm.ComplaintSignclosedProductInfoService;
+import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.service.cm.mapper.ComplaintQuestionInfoMapper;
+import com.iamberry.rst.service.sys.mapper.SysMapper;
+import com.iamberry.rst.utils.AdminUtils;
+import com.iamberry.rst.utils.GenerateKeyUtil;
+import com.iamberry.rst.utils.StitchAttrUtil;
+import com.iamberry.wechat.tools.ResponseJson;
+import org.apache.poi.hssf.usermodel.*;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by wxm on 2017/8/29.
+ */
+@Controller
+@RequestMapping("/detect")
+public class detectController {
+
+   // private
+    @Autowired
+    private ComplaintDetectInfoService complaintDetectInfoService;
+    @Autowired
+    private SalesOrderService salesOrderService;
+    /**
+     * 跳转到修改确认售后处理方式页面
+     *
+     * @return
+     */
+    @RequestMapping(value = "/to_detect_msg")
+    public ModelAndView toDetectMsg(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/detect_msg");
+        String detectId = request.getParameter("detectId");
+        mv.addObject("detectId",detectId);
+        return mv;
+    }
+
+    /**
+     * 获取检测详情
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/get_detail")
+    public ResponseJson getDetail(HttpServletRequest request) {
+        String detectId = request.getParameter("detectId");
+        ResponseJson msg = new ResponseJson();
+        if(detectId == null || detectId.equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        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));
+        if(detectinfo.getSalesOrderId() != null){
+            SalesOrder salesOrder = salesOrderService.getSalesOrderByOrderId(detectinfo.getSalesOrderId());
+            msg.addResponseKeyValue("salesOrder",salesOrder);
+        }
+        DetectionItem detectionItem = new DetectionItem();
+        detectionItem.setDetectId(Integer.valueOf(detectId));
+        //查询检测现象
+        detectionItem.setConfigType(1);
+        msg.addResponseKeyValue("detectPhenomenonList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询故障原因
+        detectionItem.setConfigType(2);
+        msg.addResponseKeyValue("detectFailureCauseList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询判定结果
+        detectionItem.setConfigType(3);
+        msg.addResponseKeyValue("detectResultsList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询故障指向
+        detectionItem.setConfigType(4);
+        msg.addResponseKeyValue("detectPointList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        //查询原因分析
+        detectionItem.setConfigType(5);
+        msg.addResponseKeyValue("detectNalysisList",complaintDetectInfoService.listDetectionItem(detectionItem));
+        msg.addResponseKeyValue("listTreatmentRecordLog",listTreatmentRecordLog);
+        msg.addResponseKeyValue("listQcInfo",listQcInfo);
+        msg.addResponseKeyValue("listMaterialItem",listMaterialItem);
+        msg.addResponseKeyValue("detectinfo",detectinfo);
+        msg.addResponseKeyValue("imgList",imgList);
+        msg.setResultCode(200);
+        msg.setReturnCode(200);
+        return msg;
+    }
+
+    /**
+     * 业务员确认处理结果
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/salesman_confirm")
+    public ResponseJson salesmanConfirm(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 || "".equals(detectInfo.getDetectId())){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if (!complaintDetectInfoService.salesmanConfirm(detectInfo)) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+}
+

+ 0 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java

@@ -83,8 +83,6 @@ public class MQTask implements InitializingBean {
 	@Autowired
 	private  CompanyInfoService companyInfoService;
 	@Autowired
-	private  CmRelationService cmRelationService;
-	@Autowired
 	private ComplaintDetectInfoService complaintDetectInfoService;
 	@Autowired
 	private  EfastUtil efastUtil;

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

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

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

@@ -47,16 +47,117 @@
 <body>
 <article class="page-container">
     <form class="form form-horizontal" id="form-admin-add">
+
+        <div class="row cl">
+            <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="margin: 10px 0px;">
+                <select id="configSelect2" name="configSelect2" class="chosen" style="width: 43%;">
+                    <option value="">请选择故障原因</option>
+                    <#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-7 col-sm-7 huanhang" id="config2" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui2">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <div class="row cl">
+            <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="margin: 10px 0px;">
+                <select id="configSelect3" name="configSelect3" class="chosen" style="width: 43%;">
+                    <option value="">请选择判定结果</option>
+                    <#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-7 col-sm-7 huanhang" id="config3" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui3">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <div class="row cl">
+            <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="margin: 10px 0px;">
+                <select id="configSelect4" name="configSelect4" class="chosen" style="width: 43%;">
+                    <option value="">请选择故障指向</option>
+                    <#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-7 col-sm-7 huanhang" id="config4" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui4">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
+
+        <div class="row cl">
+            <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="margin: 10px 0px;">
+                <select id="configSelect5" name="configSelect5" class="chosen" style="width: 43%;">
+                    <option value="">请选择原因分析</option>
+                    <#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-7 col-sm-7 huanhang" id="config5" style="margin: 10px 0px;">
+                <div class="row">
+                    <ul class="close-box" id="configui5">
+
+                    </ul>
+                </div>
+
+            </div>
+        </div>
         <div class="row cl">
                 <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="">
-
-                        <#--<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="chosen" style="width: 43%;">
                             <#if (listMaterial?size > 0)>
                                     <#list listMaterial as material>
@@ -104,6 +205,85 @@
         $(obj).parent().remove();
     }
 
+    $('#configSelect2').change(function() {
+        var name = $("#configSelect2 option:selected").text();
+        var id = $('#configSelect2').val();
+        var bl = true;
+        if(id != "") {
+            $("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;
+        if(id != "") {
+            $("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;
+        if(id != "") {
+            $("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;
+        if(id != "") {
+            $("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>');
+            }
+        }
+    });
     $('#configSelect6').change(function() {
         var name = $("#configSelect6 option:selected").text();
         var id = $('#configSelect6').val();

File diff suppressed because it is too large
+ 5 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


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

@@ -0,0 +1,268 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8">
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
+		<meta name="apple-mobile-web-app-capable" content="yes">
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
+		<title></title>
+		<#include "/base/list_base.ftl">
+
+		<style>
+			.Hui-aside{top:60px;padding-top: 0;background-color: #292f36;width:138px;}
+        .container-fluid{padding: 8px 15px;}
+        #Hui-userbar{top:8px;}
+        .Hui-article-box{top:58px;}
+        .navbar{background: #292f36;}
+        .navbar-slogan{font-size: 14px;}
+        .Hui-aside .menu_dropdown dt{border-bottom: 0}
+        .Hui-aside .menu_dropdown dt {color: #fff; background: #292f36;}
+        .Hui-aside .menu_dropdown dt.selected{background: #50a2ea;color:#fff;border-left: 4px solid #1f6eb3;}
+        .Hui-aside .menu_dropdown dt:hover {  color: #f0f0f0 !important;  }
+        .Hui-aside .menu_dropdown dt .Hui-iconfont {  color: #fff;  }
+        .menu_dropdown dt .menu_dropdown-arrow {  color: #fff;  }
+        .Hui-aside .menu_dropdown dd ul{background: #292f36;  }
+        .Hui-aside .menu_dropdown li a{color: #94a0b5;}
+        .Hui-aside .menu_dropdown li.active a{color: #50a2ea;}
+        .acrossTab li{color: #999;}
+        .acrossTab li.active{color:#50a2ea;}
+		table{border: 1px solid rgba(0,0,0,.1);}
+		table th{background: #f7fafd;}
+		table th,table td{border-collapse: collapse;border: 1px solid rgba(0,0,0,.1);text-align: center;padding: 5px 0;}
+		</style>
+	</head>
+	<body>
+		<article class="page-container" style="padding: 10px;">
+		<form action="/" method="post" class="form form-horizontal" id="form">
+			<div class="row cl">
+			    <label class="form-label col-12 col-sm-12"><strong>所属客户:</strong>
+					<span id="detectName"></span>
+				</label>
+			</div>
+			<div class="row cl">
+			    <label class="form-label col-12 col-sm-12"><strong>产品信息:</strong>
+					<span id="productName"></span>
+				</label>
+			</div>
+			<div class="row cl">
+			    <label class="form-label col-12 col-sm-12"><strong>咨询问题:</strong>
+					<span id="questionName"></span>
+				</label>
+			</div>
+			<div class="row cl">
+			    <label class="form-label col-12 col-sm-12"><strong>检测信息:</strong></label>
+			</div>
+			<div class="row cl">
+			    <div class="col-12 col-sm-12">
+					<table>
+						<tr>
+							<th>是否故障</th><td id="isMaintenance" style="width: 50%;">是</td>
+						</tr>
+						<tr>
+							<th>是否可翻新</th><td id="detectRenovation">否</td>
+						</tr>
+						<tr>
+							<th>浮子类型</th><td id="detectFloatType">长</td>
+						</tr>
+						<tr>
+							<th>厚膜类型</th><td id="detectFilmType"></td>
+						</tr>
+						<tr>
+							<th>是否为翻新机</th><td id="detectIsRefurbishing"></td>
+						</tr>
+						<tr>
+							<th>生产月份</th><td id="detectProduction"></td>
+						</tr>
+						<tr>
+							<th>版本号</th><td id="detectVersionNumber"></td>
+						</tr>
+						<tr>
+							<th>检测现象</th><td id="detectPhenomenon"></td>
+						</tr>
+						<tr>
+							<th>维修报价</th><td id="detectOffer"></td>
+						</tr>
+						<tr>
+							<th>备注信息</th><td id="detectDesc"></td>
+						</tr>
+					</table>
+				</div>
+			</div>
+			<div class="row cl">
+			    <label class="form-label col-12 col-sm-12"><strong>当前已检测完成,请确认:</strong></label>
+			</div>
+			<div class="row cl">
+                <div class="formControls col-12 col-sm-12 skin-minimal customerSourceType_text_all">
+                    <div class="radio-box">
+                        <input type="radio" name="detectProcessingResults" value="2" id="radio-1" checked="checked">
+                        <label for="radio-1" class="">免费维修</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" name="detectProcessingResults" value="1" id="radio-2"/>
+                        <label for="radio-2">付费维修</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" name="detectProcessingResults" value="5" id="radio-3"/>
+                        <label for="radio-3" class="">原机退回</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" name="detectProcessingResults" value="4" id="radio-4"/>
+                        <label for="radio-4" class="">换货</label>
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" name="detectProcessingResults" value="3" id="radio-5"/>
+                        <label for="radio-5" class="">退货</label>
+                    </div>
+                </div>
+            </div>
+			<div class="row cl">
+                <div class="col-6 col-sm-6 col-offset-3">
+                    <input type="hidden" id="methodId" value="6">
+                    <button class="btn btn-block btn-primary" type="button" onclick="updateDetect();">确认</button>
+                </div>
+            </div>
+		</form>
+		<p style="font-size: 12px;text-align:center;color: #f00;padding: 15px 0 20px 0;">*确认处理后,系统将不支持再修改,维修部立即开始处理*</p>
+		</article>
+	</body>
+    <script type="text/javascript" src="${path}/common/lib/icheck/jquery.icheck.min.js"></script>
+	<script>
+        var detectId = getParam("detectId");
+            $('.skin-minimal input').iCheck({
+                checkboxClass: 'icheckbox-blue',
+                radioClass: 'iradio-blue',
+                increaseArea: '20%'
+            });
+            getDetect();
+
+
+        $("#radio-1").click(function (){
+            $("#methodId").val(6);
+        });
+        $("#radio-2").click(function (){
+            $("#methodId").val(7);
+        });
+        $("#radio-3").click(function (){
+            $("#methodId").val(44);
+        });
+        $("#radio-4").click(function (){
+            $("#methodId").val(3);
+        });
+        $("#radio-5").click(function (){
+            $("#methodId").val(8);
+        });
+
+        function getDetect() {
+            $.ajax({
+                cache: true,
+                type: "POST",
+                url: "${path}/detect/get_detail",
+                data:{detectId:detectId},// 你的formid
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        var detectinfo = data.returnMsg.detectinfo;
+                        var isMaintenance = "";
+                        if(detectinfo.isMaintenance === 1){
+                            isMaintenance = "有故障";
+                        }else if(detectinfo.isMaintenance === 2){
+                            isMaintenance = "无故障";
+                        }
+                        var detectRenovation = "";
+                        if(detectinfo.detectRenovation === 1){
+                            detectRenovation = "可翻新";
+                        }else if(detectinfo.detectRenovation === 2){
+                            detectRenovation = "不可翻新";
+                        }
+                        var detectFloatType = "";
+                        if(detectinfo.detectFloatType === 1){
+                            detectFloatType = "长";
+                        }else if(detectinfo.detectFloatType === 2){
+                            detectFloatType = "短";
+                        }
+                        var detectFilmType = "";
+                        if(detectinfo.detectFilmType === 1){
+                            detectFilmType = "圆";
+                        }else if(detectinfo.detectFilmType === 2){
+                            detectFilmType = "扁";
+                        }
+                        var detectIsRefurbishing = "";
+                        if(detectinfo.detectIsRefurbishing === 1){
+                            detectIsRefurbishing = "是";
+                        }else if(detectinfo.detectIsRefurbishing === 2){
+                            detectIsRefurbishing = "否";
+                        }
+                        var detectPhenomenon = "";
+                        $(detectinfo.configli1).each(function (){
+                            detectPhenomenon = detectPhenomenon+this.configDetectContent+";";
+                        });
+
+                        $("#detectName").text(detectinfo.detectName+","+detectinfo.detectTel);
+                        $("#productName").text(detectinfo.productName+"("+detectinfo.colorName+")");
+                        $("#questionName").text(detectinfo.questionName);
+                        $("#isMaintenance").text(isMaintenance);
+                        $("#detectRenovation").text(detectRenovation);
+                        $("#detectFloatType").text(detectFloatType);
+                        $("#detectFilmType").text(detectFilmType);
+                        $("#detectIsRefurbishing").text(detectIsRefurbishing);
+                        $("#detectProduction").text(detectinfo.detectProduction);
+                        $("#detectVersionNumber").text(detectinfo.detectVersionNumber);
+                        $("#detectPhenomenon").text(detectinfo.detectPhenomenon);
+                        if(detectinfo.detectOffer != null && detectinfo.detectOffer != ""){
+                            $("#detectOffer").text(detectinfo.detectOffer/100);
+                        }
+                        $("#detectDesc").text(detectinfo.detectDesc);
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    layer.msg('删除失败',{icon: 5,time:1000});
+                }
+            });
+        };
+
+
+        function updateDetect() {
+            var detectProcessingResults = $('input[name="detectProcessingResults"]:checked').val();//处理结果
+            //查询处理方式
+            var methodId = $("#methodId").val();//处理结果
+
+
+
+            $.ajax({
+                cache: true,
+                type: "POST",
+                url: "${path}/detect/salesman_confirm",
+                data:{ "detectId": detectId,
+                    "detectProcessingResults": detectProcessingResults,// 你的formid
+                    "methodId": methodId},
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        layer.alert("提交成功!", function() {
+                            location.reload();
+                        });
+                    }else {
+                        layer.alert("提交失败!");
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    layer.msg('删除失败',{icon: 5,time:1000});
+                }
+            });
+        };
+
+
+
+        function getParam(paramName) {
+            paramValue = "", isFound = !1;
+            if(this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
+                arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
+                while(i < arrSource.length && !isFound) {
+                    arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
+                }
+            }
+            return paramValue == "" && (paramValue = null), paramValue
+        };
+
+	</script>
+</html>

File diff suppressed because it is too large
+ 0 - 264
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_msg.html


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

@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title></title>
+<#include "/base/list_base.ftl">
+    <style>
+        /**{padding: 0;margin: 0;}*/
+        .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 25px;margin-right: 5px;}
+        /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
+        .my-select{border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 20px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(${path}/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;}
+        .my-btn-search{border: 1px solid #50a2ea;padding: 1px 25px;background-color: #fff;color: #50a2ea;height: 32px;}
+        .barcodeImg{margin:10px 0px}
+        .table-bg thead th{background-color: #f7fafd;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .txt2{
+            width:60px;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+        }
+
+        html,body
+        {
+            margin: 0;
+            padding: 0;
+        }
+        *{
+            box-sizing: border-box;
+            -moz-box-sizing: border-box;
+        }
+        .page
+        {
+            width: 21cm;
+            min-height: 29.7cm;
+            padding:1cm 0;
+            margin: 1cm auto;
+            border: 0;
+            background: white;
+        }
+        @page
+        {
+            size: A4;
+            margin: 0;
+        }
+        @media print
+        {
+            .page
+            {
+                margin: 0;
+                border: initial;
+                border-radius: initial;
+                width: initial;
+                min-height: initial;
+                box-shadow: initial;
+                background: initial;
+                page-break-after: always;
+            }
+        }
+        .table2 .text-column-3{height: 1.5cm;max-height: 1.5cm; text-align: left;text-indent: 0;padding:0.3rem .3rem .3rem 1.2rem;}
+        .page .print-date{padding: 0 1cm 0.5cm 1cm;text-align: left;font-size: 0.75rem;}
+        .yulia-logo{width: 2.5cm;padding:0;vertical-align: middle;float: left;}
+        .yulia-name{margin: 0 auto;padding: 0 0 0.5cm 0;text-align: center;position: relative;font-weight: bold;font-size: 1rem;letter-spacing: 1rem;}
+        .yulia-name .before{position: absolute;left: 0;width: 3cm;height: 0;border: 1px solid #000;top: 0.5625rem;}
+        .yulia-name .after{position: absolute;right: 0;width: 3cm;height: 0.125rem;border: 1px solid #000;top: 0.5625rem;}
+        .table2 {margin:0 0 0.5cm 1cm;width: 19cm;border: 1px solid #000;border-collapse: collapse;text-align: left;}
+        .table2 th{font-size: 0.875rem;font-weight: 500;}
+        .table2 thead tr th,
+        .table2 tbody tr td {font-size: 0.75rem;padding:0.5rem 0;text-indent: 1.2rem; color: #333;border: 1px solid #000;border-collapse: collapse;background-color: #fff;height: 0.88cm;}
+        pre>a u{color: #50a2ea;}
+        pre>a span{color: #f00;}
+    </style>
+</head>
+<body>
+<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+    <span class="c-gray en">/</span> RST管理
+    <span class="c-gray en">/</span> 维修列表
+    <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="page-container">
+
+    <div class="text-c">
+        <form name="form1" action="${path}/admin/detect/detect_repair_list" method="post" style="border: 1px solid rgba(0,0,0,.1);background: #fff;padding: 10px;border-radius: 5px;text-align: left;">
+            <div style="height: 10px;display: block;">&nbsp;</div>
+            <select id="salesmanAdminId" name="salesmanAdminId" class="my-select" style="width: 120px;">
+                <option value="" >业务员</option>
+                <#if (listAdmin?size > 0)>
+                    <#list listAdmin as info>
+                         <option value="${info.adminId!""}" <#if salesmanAdminId??><#if salesmanAdminId = info.adminId>selected</#if></#if>>${info.adminName!""}</option>
+                    </#list>
+                </#if>
+            </select>
+            <select class="my-select" name="typeId" id="typeId" style="width: 120px;">
+
+                <#if (procTypeList?size > 0)>
+                    <#list procTypeList as info>
+                        <#if info.procTypeId = 2 || info.procTypeId = 3 || info.procTypeId = 4>
+                            <option value="${info.procTypeId!""}" <#if typeId??><#if typeId = info.procTypeId>selected</#if></#if>>${info.procTypeName!""}</option>
+                        </#if>
+                    </#list>
+                </#if>
+            </select>
+            <input class="my-input" style="width: 120px;height: 29px;" type="text" name="detectName" id="detectName" value="${detectName!}" placeholder="客户姓名"/>
+            <input class="my-input" style="width: 120px;height: 29px;" type="text" name="detectTel" id="detectTel" value="${detectTel!}" placeholder="客户电话"/>
+            <input class="my-input" style="width: 120px;height: 29px;" type="text" name="questionName" id="questionName" value="${questionName!}" placeholder="客诉问题"/>
+            <button style="cursor:pointer;" type="submit" class="my-btn-search">查询</button>&nbsp;&nbsp;
+        </form>
+
+    </div>
+    <div class="mt-20">
+        <table class="table table-border table-bordered table-bg table-hover table-sort">
+            <thead>
+            <tr class="text-c">
+                <#--<th width="100">客诉编号</th>-->
+                <th width="100">所属业务员</th>
+                <th width="100">维修编号</th>
+                <th width="100">客户信息</th>
+                <th width="100">客户问题</th>
+                <th width="100">机器信息</th>
+                <th width="100">维修状态</th>
+                <th width="100">检测日期</th>
+                <th width="120">操作</th>
+            </tr>
+            </thead>
+            <tbody id="listid">
+            <#if (page.dataList?size > 0)>
+                <#list page.dataList as detect>
+                <tr>
+                    <#--<td class="text-c" width="100">${detect.customerId!}</td>-->
+                    <td class="text-c" width="100">${detect.salesmanAdminName!''}</td>
+                    <td class="text-c" width="100">${detect.detectNumber!''}</td>
+                    <td class="text-c" width="100">${detect.detectName!''}<br>${detect.detectTel!''}</td>
+                    <td class="text-c" width="100">${detect.questionName!''}</td>
+                    <td class="text-c" width="100">${detect.productName!'暂无产品'}(${detect.colorName!'暂无颜色'})</td>
+                    <td class="text-c" width="100">
+                        <#if detect.detectState == 1>
+                            <span class="c-red">待检测机器<#if detect.maintenanceCutTime??>(${detect.maintenanceCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
+                        </#if>
+                        <#if detect.detectState == 30>
+                            <span class="c-red">待确认</span>
+                        </#if>
+                        <#if detect.detectState == 31>
+                            <span class="c-red">待维修<#if detect.completeCutTime??>(${detect.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
+                        </#if>
+                        <#if detect.detectState == 32>
+                            <span class="c-success">维修完成</span>
+                        </#if>
+                        <#if detect.detectState == 33>
+                            <span class="c-success">用户不维修(原机退回)</span>
+                        </#if>
+                        <#if detect.detectState == 34>
+                            <span class="c-red">待确认</span>
+                        </#if>
+                        <#if detect.detectState == 35>
+                            <span class="c-red">待维修<#if detect.completeCutTime??>(${detect.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
+                        </#if>
+                        <#if detect.detectState == 36>
+                            <span class="c-success">维修完成</span>
+                        </#if>
+                        <#if detect.detectState == 37>
+                            机器无故障,原机退回
+                        </#if>
+                        <#if detect.detectState == 38>
+                            <span class="c-red">机器故障,待确认</span>
+                        </#if>
+                        <#if detect.detectState == 20>
+                            待翻新入库
+                        </#if>
+                        <#if detect.detectState == 21>
+                        <span class="c-success">已翻新</span>
+                        </#if>
+                        <#if detect.detectState == 22>
+                            不能翻新,待报废
+                        </#if>
+                        <#if detect.detectState == 23>
+                            <span class="c-success">已报废回收</span>
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">${(detect.detectDate?string("yyyy-MM-dd"))!'-'}</td>
+                    <!-- 遍历操作 -->
+                    <td class="td-manage text-c" width="120">
+                            <#if detect.detectState == 30 || detect.detectState == 34|| detect.detectState == 38>
+                                <a style="text-decoration:none" href="javascript:;" title="确认处理"
+                                   onclick="add_remark('确认处理','${path}/detect/to_detect_msg?detectId=${detect.detectId!''}','570','750');">
+                                    <i class="Hui-iconfont">确认处理</i>
+                                </a><br>
+                            </#if>
+                            <#if detect.detectState == 40>
+                                <a style="text-decoration:none" href="javascript:;" title="完善客户信息"
+                                   onclick="add_remark('完善客户信息','${path}/admin/detect/to_perfect_detect?detectId=${detect.detectId!''}','570','450');">
+                                    <i class="Hui-iconfont">完善客户信息</i>
+                                </a><br>
+                            </#if>
+                    </td>
+                </tr>
+                </#list>
+            <#else >
+            <tr><td class="td-manage text-c" colspan = "18">暂时没有维修信息</td></tr>
+            </#if>
+            </tbody>
+        </table>
+    </div>
+
+</div>
+<div style="padding-top: 10px;"></div>
+<#include "/base/page_util.ftl">
+<script type="text/javascript" src="https://s.iamberry.com/js/LodopFuncs_v_5_0.js"></script>
+<script type="text/javascript" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
+<script type="text/javascript">
+    procType();
+    function procType(){
+        var procTypeId;
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/proc/type",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var html = '<option value="" >业务员</option>';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.list.length;i++){
+                            listInfo = data.returnMsg.list[i];
+                            if(i == 1 ){
+                                procTypeId = listInfo.procTypeId;
+                            }
+                            if(listInfo.procTypeId === 2 || listInfo.procTypeId === 3 || listInfo.procTypeId === 4 ){
+                                html += '<option value="'+ listInfo.procTypeId +'">'+ listInfo.procTypeName +'</option>';
+                            }
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("[name='typeId']").html(html);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+    function add_remark(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+</script>
+</body>
+</html>

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

@@ -0,0 +1,361 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>完善客户信息 - H-ui.filter v2.4</title>
+    <style>
+        .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
+        .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
+        .tit-2{position: relative;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
+        .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select {
+            border: 1px solid rgba(0,0,0,.1);
+            padding: 6px 50px 6px 15px;
+            height: 34px;
+            -webkit-appearance: none;
+            appearance: none;
+            background: url(/common/images/pts/select-11.png) right center no-repeat;
+            background-size: auto 100%;
+        }
+        .check-box, .radio-box{padding-left: 0;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .huanhang{ float:left}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="row cl">
+            <label class="form-label col-3">
+                <div class="tit-2">检测信息</div>
+            </label>
+            <div class="formControls col-9">
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-3 col-sm-3" style="padding-right: 10px;"><span class="c-red">*</span>所属公司:</label>
+            <div class="formControls col-9 col-sm-9" style="padding-left: 5px;">
+            <#if companyInfoList?? &&  (companyInfoList?size > 0) >
+                <#list companyInfoList as companyInfo>
+                    <div class="radio-box">
+                        <input type="radio"  name="companyId" <#if companyInfo_index == 0>checked="checked"</#if>value="${companyInfo.companyId!''}" datatype="*" nullmsg="请选择所属公司!">
+                        <label for="tel-1">${companyInfo.companyName!''}</label>
+                    </div>
+                </#list>
+            </#if>
+            </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-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
+                <input class="my-input" type="text" style="width:510px;"  name="customerId" id="customerId" placeholder="请输入客诉编号,如没有请留空"/>
+            </div>
+        </div>-->
+    <div class="input-box">
+        <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客户问题:</label>
+        <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
+            <select id="questionId" name="questionId" class="chosen" style="width: 93%;">
+                <option value="">请选择客户问题</option>
+                    <#if (listComplaintQuestionInfo?size > 0)>
+                        <#list listComplaintQuestionInfo as info>
+                                <option value="${info.questionId!""}">${info.questionName!""}</option>
+                        </#list>
+                    </#if>
+            </select>
+        </div>
+    </div>
+    <div class="input-box">
+        <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>业务员:</label>
+        <div class="formControls col-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
+            <select id="salesmanAdminId" name="salesmanAdminId" class="chosen" style="width: 93%;">
+                <option value="">请选择业务员</option>
+                    <#if (listAdmin?size > 0)>
+                        <#list listAdmin as info>
+                                <option value="${info.adminId!""}">${info.adminName!""}</option>
+                        </#list>
+                    </#if>
+            </select>
+        </div>
+    </div>
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>客户信息:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <input class="my-input" type="text"  name="detectName" id="detectName" placeholder="请输入客户姓名或昵称" style="width: 146px;"/>
+
+                <input class="my-input" type="text"  name="detectTel" id="detectTel" placeholder="请输入客户电话或手机号码" style="width: 146px;"/>
+            </div>
+        </div>
+        <div class="input-box" id="updateDetect_3">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>处理方式:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+
+                <select class="my-select" id="procTypeId" name="procTypeId"  style="width: 158px;">
+                </select>
+                <select class="my-select" id="procMethodId" name="methodId"  style="width: 158px;">
+                </select>
+            </div>
+        </div>
+        <div class="input-box">
+            <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>检测产品:</label>
+            <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
+                <select id="productId" name="productId" class="my-select" style="width: 158px;">
+                    <#if (productList?size > 0)>
+                            <#list productList as product>
+                                <option value="${product.productId!""}">${product.productName!""}</option>
+                            </#list>
+                    </#if>
+                </select>
+
+                <select id="productColorId" name="productColorId" class="my-select" style="width: 158px;">
+                    <#if (productColorList?size > 0)>
+                        <#list productColorList as productColor>
+                            <option value="${productColor.colorId!""}">${productColor.colorName!""}</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-xs-9 col-sm-9">
+                <div class="radio-box">
+                    <textarea rows="3" style="width: 410px;margin-left: -15px;margin-top: 8px;" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请输入备注!"></textarea>
+                </div>
+            </div>
+        </div>
+        <div class="input-box" style="margin-left: 30%">
+            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+            <button type="button" class="my-btn-submit" onclick="update();" style="margin-top: 50px;">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+    /**
+     * 客诉处理方式回显 state
+     */
+    procType();
+
+    $("#procTypeId").change(function (){
+        var procTypeId = parseInt($(this).val());
+        procMethod(procTypeId);
+    });
+    function procType(){
+        var procTypeId;
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/proc/type",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var html = '';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.list.length;i++){
+                            listInfo = data.returnMsg.list[i];
+                            if(i == 1 ){
+                                procTypeId = listInfo.procTypeId;
+                            }
+                            if(listInfo.procTypeId === 2 || listInfo.procTypeId === 3 || listInfo.procTypeId === 4 ){
+                                html += '<option value="'+ listInfo.procTypeId +'">'+ listInfo.procTypeName +'</option>';
+                            }
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("[name='procTypeId']").html(html);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+        procMethod(procTypeId);
+    }
+    function procMethod(procTypeId){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"procTypeId":procTypeId},
+            url: "${path}/admin/proc/method",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var html = '';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.list.length;i++){
+                            listInfo = data.returnMsg.list[i];
+                            html += '<option value="'+ listInfo.procMethodId +'">'+ listInfo.procMethodName +'</option>';
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("#procMethodId").html(html);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+    /**
+     * 客诉处理方式回显 end
+     */
+
+
+    function inputSelect(){
+        var input_select=$("#content").val();
+        var option_length=$("#contentlist option").length;
+        var option_id='';
+        for(var i=0;i<option_length;i++){
+            var option_value=$("#contentlist option").eq(i).attr('data-value');
+            if(input_select==option_value){
+                option_id=$("#contentlist option").eq(i).attr('data-id')
+                break;
+            }
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/getDetectionBasis",
+            data:{basisId:option_id},
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    if(data.returnMsg.detectionBasis != null){
+                        $("#detectItemPhenomenon").val(data.returnMsg.detectionBasis.basisPhenomenon);
+                        $("#detectItemClassification").val(data.returnMsg.detectionBasis.basisClassification);
+                        $("#detectItemFailureCause").val(data.returnMsg.detectionBasis.basisFailureCause);
+                        $("#detectItemResults").val(data.returnMsg.detectionBasis.basisResults);
+                        $("#detectItemPoint").val(data.returnMsg.detectionBasis.basisPoint);
+                        $("#detectItemNalysis").val(data.returnMsg.detectionBasis.basisNalysis);
+                        $("#detectItemContent").val(data.returnMsg.detectionBasis.basisContent);
+                    }
+                }
+
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('添加错误',{icon: 5,time:1000});
+            }
+        });
+    };
+
+        //查询产品颜色信息
+    $('#productId').change(function(){
+        getProduct($(this).children('option:selected').val())
+    })
+    function  getProduct(productId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/product/get_product",
+            data:{colorProductId:productId},// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    $("#productColorId").empty();
+                    if(data.returnMsg.productColorList.length > 0){
+                        for(var i=0;i<data.returnMsg.productColorList.length;i++){
+                            var productColor = data.returnMsg.productColorList[i];
+                            $("#productColorId").append('<option value='+productColor.colorId+'>'+productColor.colorName+'</option>');
+                        }
+                    }
+
+                }
+
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('添加错误',{icon: 5,time:1000});
+            }
+        });
+    }
+        
+    function  update() {
+        var questionId = $("#questionId").val();
+        if( questionId == null || questionId == "" ){
+            layer.msg('请选择客户问题',{icon: 5,time:1000});
+            return;
+        }
+        var salesmanAdminId = $("#salesmanAdminId").val();
+        if( salesmanAdminId == null || salesmanAdminId == "" ){
+            layer.msg('请选择业务员',{icon: 5,time:1000});
+            return;
+        }
+        var detectName = $("#detectName").val();
+        if( detectName == null || detectName == "" ){
+            layer.msg('请输入客户名称',{icon: 5,time:1000});
+            return;
+        }
+        var detectTel = $("#detectTel").val();
+        if( detectTel == null || detectTel == "" ){
+            layer.msg('请输入客户电话',{icon: 5,time:1000});
+            return;
+        }
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/perfect_detect",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('操作成功',{icon: 1,time:1000},function () {
+                        location.replace(location.href);
+                        window.location.href= "${path}/admin/detect/detect_repair_list";
+
+                    });
+                } else {
+                    layer.msg('操作失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('操作错误',{icon: 5,time:1000});
+            }
+        });
+    }
+
+
+    $('.chosen').chosen({
+        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '320px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        max_shown_results: 1000, //下拉框最大显示选项数量
+        display_disabled_options: false,
+        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+        group_search: false, //选项组是否可搜。此处搜索不可搜
+        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+    });
+    $('.chosen2').chosen({
+        search_contains:false,
+        enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
+    });
+</script>
+</body>
+</html>

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

@@ -144,167 +144,7 @@
 
             </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;">
-                &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="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="chosen" style="width: 93%;">
-                    <option value="">请选择故障原因</option>
-                    <#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;">
-                &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="chosen" style="width: 93%;">
-                    <option value="">请选择判定结果</option>
-                    <#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;">
-                &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="chosen" style="width: 93%;">
-                    <option value="">请选择故障指向</option>
-                    <#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;">
-                &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="chosen" style="width: 93%;">
-                    <option value="">请选择原因分析</option>
-                    <#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;">
-                &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;">
-            &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>&ndash;&gt;
-                <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;">
-                &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectContent" id="detectContent" class="my-textarea" placeholder="请输入检测内容">${detectInfo.detectContent!''}</textarea>&ndash;&gt;
-                <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectContent!''}" name="detectContent" id="detectContent"  placeholder="请输入检测内容"/>
-
-            </div>
-        </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;">
@@ -382,89 +222,6 @@
         }
 
     });
-
-    $('#configSelect2').change(function() {
-        var name = $("#configSelect2 option:selected").text();
-        var id = $('#configSelect2').val();
-        var bl = true;
-        if(id != "") {
-            $("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;
-        if(id != "") {
-            $("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;
-        if(id != "") {
-            $("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;
-        if(id != "") {
-            $("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>');
-            }
-        }
-    });
-
-
-
     /***
      * 删除图片
      */
@@ -503,74 +260,6 @@
     }
 
     function  add() {
-        /*var detectPhenomenon = $("#detectPhenomenon").val();
-        if( detectPhenomenon == null || detectPhenomenon == "" ){
-            layer.msg('请输入检测现象',{icon: 5,time:1000});
-            return;
-        }
-        if( detectPhenomenon.length > 300 ){
-            layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
-            return;
-        }
-        var detectClassification = $("#detectClassification").val();
-        if( detectClassification == null || detectClassification == "" ){
-            layer.msg('请输入故障分类',{icon: 5,time:1000});
-            return;
-        }
-        if( detectClassification.length > 50 ){
-            layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
-            return;
-        }
-        var detectFailureCause = $("#detectFailureCause").val();
-        if( detectFailureCause == null || detectFailureCause == "" ){
-            layer.msg('请输入故障原因',{icon: 5,time:1000});
-            return;
-        }
-        if( detectFailureCause.length > 100 ){
-            layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
-            return;
-        }
-
-        var detectResults = $("#detectResults").val();
-        if( detectResults == null || detectResults == "" ){
-            layer.msg('请输入判定结果',{icon: 5,time:1000});
-            return;
-        }
-        if( detectResults.length > 100 ){
-            layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
-            return;
-        }
-
-        var detectPoint = $("#detectPoint").val();
-        if( detectPoint == null || detectPoint == "" ){
-            layer.msg('请输入故障指向',{icon: 5,time:1000});
-            return;
-        }
-        if( detectPoint.length > 100 ){
-            layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
-            return;
-        }
-
-        var detectNalysis = $("#detectNalysis").val();
-        if( detectNalysis == null || detectNalysis == "" ){
-            layer.msg('请输入原因分析',{icon: 5,time:1000});
-            return;
-        }
-        if( detectNalysis.length > 100 ){
-            layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
-            return;
-        }
-
-        var detectContent = $("#detectContent").val();
-        if( detectContent == null || detectContent == "" ){
-            layer.msg('请输入维修内容',{icon: 5,time:1000});
-            return;
-        }
-        if( detectContent.length > 300 ){
-            layer.msg('维修内容长度不得大于150个字符',{icon: 5,time:1000});
-            return;
-        }*/
-
         var detect_Offer = $("#detect_Offer").val();
         if(detect_Offer != null && detect_Offer != ""){
             $("#detectOffer").val(detect_Offer * 100)