Ver código fonte

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

# Conflicts:
#	watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java
liujiankang 6 anos atrás
pai
commit
2bf0743bf0

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

@@ -50,6 +50,10 @@ public class ComplaintDetectInfo implements Serializable {
     private String procMethodName;//处理方式名称
     private String procTypeName;//处理方式类型名
 
+    private Date customerCreateTime;//确认时间(客诉创建时间)
+    private Date salesPayTime;//购买时间
+    private Date signclosedDate;//签收时间
+
     public Integer getDetectId() {
         return detectId;
     }
@@ -305,4 +309,28 @@ public class ComplaintDetectInfo implements Serializable {
     public void setProcTypeId(Integer procTypeId) {
         this.procTypeId = procTypeId;
     }
+
+    public Date getCustomerCreateTime() {
+        return customerCreateTime;
+    }
+
+    public void setCustomerCreateTime(Date customerCreateTime) {
+        this.customerCreateTime = customerCreateTime;
+    }
+
+    public Date getSalesPayTime() {
+        return salesPayTime;
+    }
+
+    public void setSalesPayTime(Date salesPayTime) {
+        this.salesPayTime = salesPayTime;
+    }
+
+    public Date getSignclosedDate() {
+        return signclosedDate;
+    }
+
+    public void setSignclosedDate(Date signclosedDate) {
+        this.signclosedDate = signclosedDate;
+    }
 }

+ 8 - 2
watero-rst-core/src/main/java/com.iamberry.rst.core/order/ProductColor.java

@@ -49,8 +49,6 @@ public class ProductColor implements Serializable {
 
     private Integer colorIsMachine; //是否是水机 1:水机 2;其它产品
 
-    private Integer colorIsDetection; //是否需要售后检测 1 需要 2不需要
-
     public String getProductName() {
         return productName;
     }
@@ -179,6 +177,14 @@ public class ProductColor implements Serializable {
         this.colorAbbreviation = colorAbbreviation;
     }
 
+    public String getColorJdProductId() {
+        return colorJdProductId;
+    }
+
+    public void setColorJdProductId(String colorJdProductId) {
+        this.colorJdProductId = colorJdProductId;
+    }
+
     @Override
     public String toString() {
         return "ProductColor{" +

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

@@ -70,4 +70,10 @@ public interface ComplaintDetectInfoService {
      * @return
      */
     boolean customerConfirm(ComplaintDetectInfo detectInfo);
+
+    /**
+     * 查询检测图片
+     * @return
+     */
+    List<ComplaintDetectImg> listDetectImg(Integer detectId);
 }

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

@@ -180,5 +180,10 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         return false;
     }
 
+    @Override
+    public List<ComplaintDetectImg> listDetectImg(Integer detectId) {
+        return complaintDetectInfoMapper.listDetectImg(detectId);
+    }
+
 
 }

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

@@ -51,4 +51,10 @@ public interface ComplaintDetectInfoMapper {
      * @return
      */
     int addDetectImg(ComplaintDetectImg complaintDetectImg);
+
+    /**
+     * 查询检测图片
+     * @return
+     */
+    List<ComplaintDetectImg> listDetectImg(Integer detectId);
 }

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

@@ -5,11 +5,11 @@
   <select id="getDetectById" resultType="ComplaintDetectInfo" parameterType="java.lang.Integer" >
     select
       detect_id detectId,
-      product_id productId,
+      cd.product_id productId,
       product_color_id productColorId,
       detect_product_number detectProductNumber,
       detect_state detectState,
-      customer_id customerId,
+      cd.customer_id customerId,
       detect_phenomenon detectPhenomenon,
       detect_classification detectClassification,
       detect_failure_cause detectFailureCause,
@@ -17,7 +17,6 @@
       detect_point detectPoint,
       detect_nalysis detectNalysis,
       detect_content detectContent,
-      customer_id customerId,
       is_maintenance isMaintenance,
       detect_desc detectDesc,
       detect_date detectDate,
@@ -25,8 +24,18 @@
       detect_update_time detectUpdateTime,
       detect_offer detectOffer,
       detect_renovation detectRenovation,
-      detect_processing_results detectProcessingResults
-    from tb_rst_complaint_detect
+      detect_processing_results detectProcessingResults,
+      pi.product_name productName,
+      ci.color_name colorName,
+      cci.customer_create_time customerCreateTime,
+	  oi.sales_pay_time salesPayTime,
+	  cs.signclosed_date signclosedDate
+    from tb_rst_complaint_detect cd
+    LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
+    LEFT JOIN tb_rst_product_color ci on cd.product_color_id = ci.color_id
+    LEFT JOIN tb_rst_cm_customer_info cci on cci.customer_id = cd.customer_id
+    LEFT JOIN tb_rst_sales_order_info oi on oi.sales_customer_id = cci.customer_id
+    LEFT JOIN tb_rst_complaint_signclosed cs on cs.signclosed_customer_id = cd.customer_id
     where detect_id = #{detectId,jdbcType=INTEGER}
   </select>
   <select id="listComplaintDetect" resultType="ComplaintDetectInfo" parameterType="ComplaintDetectInfo" >
@@ -248,4 +257,9 @@
   <insert id="addDetectImg" parameterType="ComplaintDetectImg" >
     INSERT INTO tb_rst_complaint_detect_img( detect_id,detect_img_url) VALUES (#{detectId},#{detectImgUrl})
   </insert>
+
+  <select id="listDetectImg" parameterType="Integer" resultType="ComplaintDetectImg">
+    select * from tb_rst_complaint_detect_img
+    where detect_id = #{detectId}
+  </select>
 </mapper>

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

@@ -295,6 +295,36 @@ public class AdminDetectController {
         mv.addObject("detectInfo",detectInfo);
         return mv;
     }
+    /**
+     * 查询单个检测信息
+     *
+     * @return
+     */
+
+    @RequiresPermissions("complete:update:complete")
+    @ResponseBody
+    @RequestMapping(value = "/get_detect")
+    public ResponseJson getDetect(HttpServletRequest request,Integer detectId) {
+        ResponseJson msg = new ResponseJson();
+        if(detectId == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getDetectById(detectId);
+        if(detectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }else {
+            List<ComplaintDetectImg> detectImg = complaintDetectInfoService.listDetectImg(detectId);
+            msg.addResponseKeyValue("detectImg",detectImg);
+            msg.addResponseKeyValue("detectInfo",detectInfo);
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+            return msg;
+        }
+    }
 
     /**
      * 跳转到查看客服录入客诉信息页面

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

@@ -222,6 +222,7 @@ public class AdminSignclosedController {
         List<CompanyInfo> companyInfoList =  companyInfoService.listCompanyInfo(new CompanyInfo());
         mv.addObject("companyInfoList",companyInfoList);
         ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoService.getSignclosedById(signclosedId);
+        complaintSignclosedInfo.setSignclosedDate(new Date());
         mv.addObject("complaintSignclosedInfo",complaintSignclosedInfo);
         return mv;
     }

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

@@ -866,10 +866,10 @@
                                     <td class="text-c" width="100"><div  title="${detect.detectContent!}">${detect.detectContent!'-'}</div></td>
                                     <!-- 遍历操作 -->
                                     <td class="td-manage text-c" width="100">
-                                        <a onclick="getDetectInfo(${(detect.detectId)!});">查看详情</a><br>
-                                        <#--<#if detect.detectState() == 30 || detect.detectState() == 35 || detect.detectState() == 38>-->
+                                        <a onclick="getDetectInfo('${detect.detectId}');">查看详情</a><br>
+                                        <#if detect.detectState == 30 || detect.detectState == 34 || detect.detectState == 38>
                                             <a onclick="to_updateDetectInfo('${(detect.detectId)!}','${(detect.detectState)!}');">维修处理</a>
-                                        <#--</#if>-->
+                                        </#if>
                                     </td>
                                 </tr>
                                 </#list>
@@ -959,37 +959,103 @@
                         </div>
                     </div>
             </div>
-<#--<#if procMethod.procMethodIsBack == 1>
-        <div class="tabCon">
-            <div class="row cl" style="margin-left: -70px;">
-                <div class="formControls col-2 col-sm-2 text-r">
-                    <strong>QC进度</strong>
-                </div>
-                <div class="formControls col-10 col-sm-10">
-                    <table class="table table-border table-bg table-bordered">
-                        <tbody class="text-c" id="detect_table"><tr>
-                            <th>工厂检测现象</th><th>故障分类</th><th>故障原因</th><th>判定结果</th><th>故障指向</th><th>原因分析</th><th>生产维修</th>
-                        </tr>
-                        </tbody></table>
-                </div>
-            </div>
-        </div>
-        <div class="tabCon">
-            <div class="row cl" style="margin-left: -70px;">
-                <div class="formControls col-2 col-sm-2 text-r">
-                    <strong>返修进度</strong>
-                </div>
-                <div class="formControls col-10 col-sm-10">
-                    <table class="table table-border table-bg table-bordered">
-                        <tbody class="text-c" id="maintenance_table"><tr>
-                            <th>是否可返修</th><th>返修内容</th><th>返修日期</th>
-                        </tr>
-                        </tbody></table>
-                </div>
+                <div class="row cl" id="getDetect" style="display: none;">
+                    <div class="formControls col-10 col-sm-10">
+                            <div class="row cl" >
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>检测ID:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectIdDiv">
+
+                                </div>
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>当前状态:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectStateDIV">
+
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>维修产品:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="productTypeNameDIV">
+
+                                </div>
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>维修价格:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectOfferDIV">
+
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>是否故障:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="isMaintenanceDiv">
+
+                                </div>
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>可否翻新:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectRenovationDiv">
+
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>检测现象:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectPhenomenonDiv">
+
+                                </div>
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>故障分类:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectClassificationDiv">
+
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>原因分析:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectNalysisDiv">
+
+                                </div>
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>故障指向:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectPointDiv">
+
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>维修备注:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectDescDiv">
+
+                                </div>
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>维修内容:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4" id="detectContentDiv">
+
+                                </div>
+                            </div>
+                            <div class="row cl">
+                                <div class="formControls col-2 col-sm-2 text-r">
+                                    <strong>附件内容:</strong>
+                                </div>
+                                <div class="formControls col-4 col-sm-4"  id="imgDiv">
+                                       <img href="">
+                                </div>
+                            </div>
+                    </div>
             </div>
         </div>
-</#if>-->
-        </div>
         <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
                 <div class="row cl" id="signclosedDiv">
                     <div class="formControls col-10 col-sm-10">
@@ -2602,6 +2668,131 @@
         parent.to_add_order(customerId);
         parent.layer.close(parent.layer.getFrameIndex(window.name));
     }
+    /**
+     * 查询维修详情
+     */
+    function getDetectInfo(detectId){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"detectId" : detectId},
+            url: "${path}/admin/detect/get_detect",
+            async: false,
+            success: function(data){
+                console.log(data)
+                if (data.returnCode == 200) {
+                    var detectInfo = data.returnMsg.detectInfo;
+                    var detectImg = data.returnMsg.detectImg;
+                    var detectStateName;
+                    switch (detectInfo.detectState){
+                        case 1:
+                            detectStateName = "待检测机器";
+                            break
+                        case 30:
+                            detectStateName = "待用户确认";
+                            break
+                        case 31:
+                            detectStateName = "用户同意维修(待维修)";
+                            break
+                        case 32:
+                            detectStateName = "维修完成";
+                            break
+                        case 33:
+                            detectStateName = "用户不维修(原机退回)";
+                            break
+                        case 34:
+                            detectStateName = "待客服确认维修";
+                            break
+                        case 35:
+                            detectStateName = "客服确认维修,(待维修)";
+                            break
+                        case 36:
+                            detectStateName = "维修完成";
+                            break
+                        case 37:
+                            detectStateName = "机器无故障,原机退回";
+                            break
+                        case 38:
+                            detectStateName = "机器故障,待用户确认";
+                            break
+                        case 20:
+                            detectStateName = "待翻新入库";
+                            break
+                        case 21:
+                            detectStateName = "已翻新入库";
+                            break
+                        case 22:
+                            detectStateName = "不能翻新,待报废";
+                            break
+                        case 23:
+                            detectStateName = "已报废回收";
+                            break
+                    }
+                    var isMaintenanceName;
+                    if(detectInfo.isMaintenance === "1"){
+                        isMaintenanceName = "有故障";
+                    }
+                    if(detectInfo.isMaintenance === "2"){
+                        isMaintenanceName = "无故障";
+                    }
+                    var detectRenovationName;
+                    if(detectInfo.detectRenovation === "1"){
+                        detectRenovationName = "可翻新";
+                    }
+                    if(detectInfo.detectRenovation === "2"){
+                        detectRenovationName = "不可翻新";
+                    }
+                    var detectOfferName;
+                    if(detectInfo.detectOffer != null && detectInfo.detectOffer != ""){
+                        detectOfferName = detectInfo.detectOffer/100;
+                        detectOfferName = detectOfferName+"元";
+                    }else{
+                        detectOfferName = "0元";
+                    }
+                    $("#detectIdDiv").html("");
+                    $("#detectStateDIV").html("");
+                    $("#productTypeNameDIV").html("");
+                    $("#detectOfferDIV").html("");
+                    $("#isMaintenanceDiv").html("");
+                    $("#detectRenovationDiv").html("");
+                    $("#detectPhenomenonDiv").html("");
+                    $("#detectClassificationDiv").html("");
+                    $("#detectNalysisDiv").html("");
+                    $("#detectPointDiv").html("");
+                    $("#detectDescDiv").html("");
+                    $("#detectContentDiv").html("");
+                    $("#imgDiv").html();
+
+
+                    $("#detectIdDiv").html(detectInfo.detectId);
+                    $("#detectStateDIV").html(detectStateName);
+                    $("#productTypeNameDIV").html(detectInfo.productName+"("+detectInfo.colorName+")");
+                    $("#detectOfferDIV").html(detectOfferName);
+                    $("#isMaintenanceDiv").html(isMaintenanceName);
+                    $("#detectRenovationDiv").html(detectRenovationName);
+                    $("#detectPhenomenonDiv").html(detectInfo.detectPhenomenon);
+                    $("#detectClassificationDiv").html(detectInfo.detectClassification);
+                    $("#detectNalysisDiv").html(detectInfo.detectNalysis);
+                    $("#detectPointDiv").html(detectInfo.detectPoint);
+                    $("#detectDescDiv").html(detectInfo.detectDesc);
+                    $("#detectContentDiv").html(detectInfo.detectContent);
+                    var imgs = "";
+                    $.each(detectImg,function (i,value) {
+                        imgs += '<img href="'+value.detectImgUrl+'">';
+                    })
+                    $("#imgDiv").html(imgs);
+                    $("#getDetect").show();
+                } else {
+                    layer.msg("查询失败!",{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg("操作失败!",{icon: 5,time:1000});
+            }
+        })
+
+
+    }
 
     /**
      * 打开维修处理

Diferenças do arquivo suprimidas por serem muito extensas
+ 150 - 8
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


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

@@ -81,7 +81,7 @@
             <div class="row cl">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收日期:</label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" style="" value=""  class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>
+                    <input type="text" style="" value="${(complaintSignclosedInfo.signclosedDate?string("yyyy-MM-dd"))!''}"  class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>
                     <#--<input type="text" style="" value="${complaintSignclosedInfo.signclosedDate?string("yyyy-MM-dd")!''}"  class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>-->
                 </div>
             </div>
@@ -158,7 +158,7 @@
             </div>
 
             <div class="row cl">
-                <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>签收图片:</label>
+                <label class="form-label col-xs-3 col-sm-3">签收图片:</label>
                 <div class="formControls col-xs-2 col-sm-2" id="fileDiv" style="width: 17%;width: 100px;height: 100px;">
                     <input type="file" name="file" id="fileid" style="opacity: 0; position: absolute; width: 90px;height: 80px;">
                     <img alt="介绍图" src="${path}/common/images/pts/addparts.jpg" id="partsImg" width="90px;" height="80px;">
@@ -445,11 +445,69 @@
     }
 
     /**
-     * 打开商品列表
+     * 添加产品
      */
     function add_product() {
         layer_show("商品列表", "${path}/admin/salesOrder/to_add_product","1000","500");
     }
+
+    /**
+     * 选择商品回调
+     * @param colorIds
+     */
+    function setSelectProduct(colorIds){
+        var index = layer.load(1, {
+            shade: [0.5,'#fff'] //0.1透明度的白色背景
+        });
+
+        $("#all_add_product").show();
+
+        var colorIdArray = colorIds.split("_");
+        for(var i=0;i<colorIdArray.length;i++){
+            var colorId = colorIdArray[i];
+            if(colorId == ""){
+                break;
+            }
+
+            var flag = true;
+            $("#add_product").find("tr").each(function (){
+                var colId = $(this).find(".color_id").eq(0).val();
+                if(colId == colorId){
+                    flag  = false;
+                }
+            })
+            if(!flag){
+                continue;
+            }
+            $.ajax({
+                type: "POST",
+                data: { colorId : colorId},
+                url: "${path}/admin/product/get_product",
+                success: function(data){
+                    var html = "";
+                    if (data.returnCode == 200 && data.returnMsg.productColorList.length > 0 ) {
+                        for(var i=0;i<data.returnMsg.productColorList.length;i++){
+                            var productColor = data.returnMsg.productColorList[i];
+                            html += '<tr class="text-c">' +
+                                    '<input type="hidden" class="color_id" id="" value="'+ productColor.colorId +'" >' +
+                                    ' <td>'+ cufte(productColor.productName) +'</td>' +
+                                    ' <td>'+ cufte(productColor.colorName) +'</td>' +
+                                    ' <td>'+ cufte(productColor.colorPrice)/100 +'</td>' +
+                                    ' <td><input type="text" class="input-text input-number item-num"  style="width: 100%;border: none;text-align: center;" name="" id="" placeholder="产品数量" value="1" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>' +
+                                    ' <td><a href="javascript:void(0)" class="del_product all_down" onclick="delProduct($(this))" >删除</a></td>' +
+                                    ' </tr>';
+                        }
+                    }else{
+                        html = '<tr class="text-c"><td colspan="12">没有搜索到商品,请重试!</td></tr>';
+                    }
+                    $("#add_product").append(html);
+                    /*计算价格*/
+                    calculatePrice();
+                }
+            });
+        }
+        layer.close(index);
+    }
 </script>
 <!--/请在上方写此页面业务相关的脚本-->
 </body>