瀏覽代碼

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

# Conflicts:
#	watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
liujiankang 5 年之前
父節點
當前提交
8752454c9e

+ 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);
 }

+ 15 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -762,5 +762,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);
+    }
+
 
 }

+ 17 - 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){
@@ -334,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) {
@@ -354,7 +337,7 @@ 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);
@@ -377,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) {
@@ -653,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);
 }

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

@@ -317,7 +317,10 @@
       <if test="maintenanceResults != null and maintenanceResults != ''">
         and cd.maintenance_results = #{maintenanceResults}
       </if>
-      <if test="detectSource != null and detectSource != ''">
+      <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 != ''">
@@ -471,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
@@ -873,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}

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

@@ -128,6 +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);
@@ -1257,5 +1258,137 @@ public class AdminDetectController {
         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;
+    }
 }
 

+ 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>

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

@@ -48,7 +48,7 @@
 <article class="page-container">
     <form class="form form-horizontal" id="form-admin-add">
 
-        <div class="input-box">
+        <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%;">
@@ -75,7 +75,7 @@
             </div>
         </div>
 
-        <div class="input-box">
+        <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%;">
@@ -102,7 +102,7 @@
             </div>
         </div>
 
-        <div class="input-box">
+        <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%;">
@@ -129,7 +129,7 @@
             </div>
         </div>
 
-        <div class="input-box">
+        <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%;">

文件差異過大導致無法顯示
+ 1 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


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

@@ -192,6 +192,12 @@
                                     <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>

+ 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>