Bläddra i källkod

售后流程优化

liujiankang 6 år sedan
förälder
incheckning
a61bc28595

+ 4 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml

@@ -302,7 +302,10 @@
     cs.beMaintenance as beMaintenance,
     cs.beRefurbished as beRefurbished,
     cs.beScrapped as beScrapped,
-    cs.beContact as beContact
+    cs.beContact as beContact,
+    cs.completeMaintenanceNum as completeMaintenanceNum,
+    cs.beenScrappedNum as beenScrappedNum,
+    cs.beenRenovatedNum as beenRenovatedNum
     FROM
     tb_rst_cm_customer_info c
     LEFT JOIN (

+ 33 - 23
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -44,31 +44,41 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     @Override
     public int updateDetectById(ComplaintDetectInfo record,String[] imgs) {
         //判断售后流程
-        CmRelation cmRelation = new CmRelation();
-        cmRelation.setCustomerId(record.getCustomerId());
-        cmRelation = customerInfoMapper.getCmRelationInfo(cmRelation);
-        ProcMethod procMethod = procMethodMapper.getProcMethodById(cmRelation.getProcMethodId());
-        switch (cmRelation.getProcTypeId()){
-            case 3://维修
-                if(procMethod.getProcMethodIsCharge() == 0){//待定
-                    if(record.getIsMaintenance() == 1){
-                        record.setDetectState(38);//机器故障,待用户确认
-                    }else if(record.getIsMaintenance() == 2){
-                        record.setDetectState(37);//机器无故障,原机退回
+
+        if(record.getCustomerId() == null){
+            if(record.getDetectRenovation() == 1){
+                record.setDetectState(20);//待翻新入库
+            }else{
+                record.setDetectState(22);//不能翻新,待报废
+            }
+        }else{
+            CmRelation cmRelation = new CmRelation();
+            cmRelation.setCustomerId(record.getCustomerId());
+            cmRelation = customerInfoMapper.getCmRelationInfo(cmRelation);
+            ProcMethod procMethod = procMethodMapper.getProcMethodById(cmRelation.getProcMethodId());
+            switch (cmRelation.getProcTypeId()){
+                case 3://维修
+                    if(procMethod.getProcMethodIsCharge() == 0){//待定
+                        if(record.getIsMaintenance() == 1){
+                            record.setDetectState(38);//机器故障,待用户确认
+                        }else if(record.getIsMaintenance() == 2){
+                            record.setDetectState(37);//机器无故障,原机退回
+                        }
+                    }else if(procMethod.getProcMethodIsCharge() == 1){//付费
+                        record.setDetectState(30);//待用户确认
+                    }else if(procMethod.getProcMethodIsCharge() == 2){//免费
+                        record.setDetectState(34);//待客服确认维修
                     }
-                }else if(procMethod.getProcMethodIsCharge() == 1){//付费
-                    record.setDetectState(30);//待用户确认
-                }else if(procMethod.getProcMethodIsCharge() == 2){//免费
-                    record.setDetectState(34);//待客服确认维修
-                }
-            break;
-            default:
-                if(record.getDetectRenovation() == 1){//是否可翻新 1可翻新 2不可翻新
-                    record.setDetectState(20);//待翻新入库
-                }else if(record.getDetectRenovation() == 2){
-                    record.setDetectState(22);//不能翻新,待报废
-                }
+                    break;
+                default:
+                    if(record.getDetectRenovation() == 1){//是否可翻新 1可翻新 2不可翻新
+                        record.setDetectState(20);//待翻新入库
+                    }else if(record.getDetectRenovation() == 2){
+                        record.setDetectState(22);//不能翻新,待报废
+                    }
+            }
         }
+
         try {
             if(complaintDetectInfoMapper.updateDetectById(record) > 0){
                 if(imgs != null){

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

@@ -306,6 +306,7 @@ public class AdminDetectController {
             return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getDetectById(Integer.valueOf(detectId));
+        detectInfo.setDetectDate(new Date());
         mv.addObject("detectId",detectId);
         mv.addObject("detectInfo",detectInfo);
         return mv;

+ 3 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -674,7 +674,9 @@ public class AdminSalesOrderController {
         String orderItemString
     ) throws Exception {
 
-
+        if(salesOrder.getSalesStoreId() == null){
+            return  new ResponseJson(500, "添加订单失败,失败原因:未选择店铺", 500);
+        }
         if(salesOrder.getSalesAddressTel() != null && !"".equals(salesOrder.getSalesAddressTel())){
             salesOrder.setSalesAddressTel(salesOrder.getSalesAddressTel().trim());
         }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 8 - 8
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


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

@@ -59,49 +59,49 @@
             </div>
         </div>
        <div class="input-box" >
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测现象:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测现象:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="请输入工厂的检测现象">${detectInfo.detectPhenomenon!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPhenomenon!''}" name="detectPhenomenon" id="detectPhenomenon"  placeholder="请输入检测现象"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障分类:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障原因:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障原因:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="请输入故障原因">${detectInfo.detectFailureCause!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectFailureCause!''}" name="detectFailureCause" id="detectFailureCause"  placeholder="请输入故障原因"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>判定结果:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">判定结果:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="请输入判定结果">${detectInfo.detectResults!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectResults!''}" name="detectResults" id="detectResults"  placeholder="请输入判定结果"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障指向:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障指向:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="请输入故障指向">${detectInfo.detectPoint!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectPoint!''}" name="detectPoint" id="detectPoint"  placeholder="请输入故障指向"/>
             </div>
         </div>
         <div class="input-box">
-            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>原因分析:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">原因分析:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectNalysis" id="detectNalysis" class="my-textarea" placeholder="请输入原因分析">${detectInfo.detectNalysis!''}</textarea>-->
                 <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;"><span class="c-red">*</span>检测内容:</label>
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测内容:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
                 <#--<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectContent" id="detectContent" class="my-textarea" placeholder="请输入检测内容">${detectInfo.detectContent!''}</textarea>-->
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectContent!''}" name="detectContent" id="detectContent"  placeholder="请输入检测内容"/>
@@ -199,7 +199,7 @@
     }
 
     function  add() {
-        var detectPhenomenon = $("#detectPhenomenon").val();
+        /*var detectPhenomenon = $("#detectPhenomenon").val();
         if( detectPhenomenon == null || detectPhenomenon == "" ){
             layer.msg('请输入检测现象',{icon: 5,time:1000});
             return;
@@ -265,7 +265,7 @@
         if( detectContent.length > 300 ){
             layer.msg('维修内容长度不得大于150个字符',{icon: 5,time:1000});
             return;
-        }
+        }*/
 
         var detect_Offer = $("#detect_Offer").val();
         if(detect_Offer != null && detect_Offer != ""){

+ 11 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl

@@ -112,7 +112,7 @@
                     </span>
                     </div>-->
                     <div class="formControls col-2 col-sm-2">
-                        <input id="store_1" name="maktMaktx" class="input-text" list="datalist_1" value="" placeholder="输入店铺关键字或双击" datatype="*1-20" errormsg="请选择销售店铺!" />
+                        <input id="store_1" name="maktMaktx" class="input-text" list="datalist_1" value="" placeholder="输入店铺关键字或双击" datatype="*1-20"  />
                             <datalist class="select init_store" id="datalist_1">
 
                             </datalist>
@@ -276,7 +276,16 @@
 
 
 <script type="text/javascript">
-
+    var date = new Date();
+    var newyear = date.getFullYear();
+    var newmonth = date.getMonth() + 1;
+    var day = date.getDate();
+    var hours = date.getHours(); //获取当前小时数(0-23)
+    var minutes = date.getMinutes(); //获取当前分钟数(0-59)
+    var seconds = date.getSeconds(); //获取当前秒数(0-59)
+    newmonth = (newmonth<10 ? "0"+newmonth:newmonth);
+    var newdate = newyear+ "-"+newmonth + "-" + day +" "+hours+":"+minutes+":"+seconds;
+    $("#salesPayTime").val(newdate);
     var salesCustomerId = "${salesOrder.salesCustomerId!''}";
 
     $('.skin-minimal input').iCheck({