Przeglądaj źródła

售后流程优化

liujiankang 6 lat temu
rodzic
commit
366488dace

+ 15 - 46
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -1730,67 +1730,36 @@ public class CustomerServiceImpl implements CustomerService {
         List<SendbackItem> sendbackItemLists = new ArrayList<>();
         //查询所属公司
         CmRelation cmRelation = cmRelationMapper.getCmRelationById(sendbackInfo.getRelationId());
+        /*添加待签收记录 2019年4月11日18:09:34 state*/
+        ComplaintSignclosedInfo signclosedInfo = new ComplaintSignclosedInfo();
+        signclosedInfo.setSignclosedLogistics(sendbackInfo.getSendbackLogisticsCompany());
+        signclosedInfo.setSignclosedLogisticsNumber(sendbackInfo.getSendbackLogisticsNo());
+        signclosedInfo.setSignclosedSendName(sendbackInfo.getSendbackName());
+        signclosedInfo.setSignclosedSendTel(sendbackInfo.getSendbackTel());
+        signclosedInfo.setSendbackId(sendbackInfo.getSendbackId());
+        signclosedInfo.setSignclosedIsReceiving(1); //未签收
+        signclosedInfo.setSignclosedCompanyId(cmRelation.getCompanyId());
+        signclosedInfo.setSignclosedCustomerId(cmRelation.getCustomerId());
+        if(complaintSignclosedInfoMapper.insert(signclosedInfo) < 1){
+            throw new RuntimeException("添加签收记录失败");
+        }
         for (SendbackItem info : sendbackItemList){
             info.setSendbackId(sendbackInfo.getSendbackId());
             if(info.getSendbackProdcueNumber() > 0){
                 sendbackItemLists.add(info);
             }
-
-            /*添加待签收记录 2019年4月11日18:09:34 state*/
-            ComplaintSignclosedInfo signclosedInfo = new ComplaintSignclosedInfo();
             ProductColor productColor = productMapper.getProduceColor(info.getSendbackColorId());
             Product product = productMapper.getProduce(productColor.getColorProductId());
             SignclosedProductInfo signclosedProductInfo = new SignclosedProductInfo();
-            signclosedInfo.setSignclosedLogistics(sendbackInfo.getSendbackLogisticsCompany());
-            signclosedInfo.setSignclosedLogisticsNumber(sendbackInfo.getSendbackLogisticsNo());
-            signclosedInfo.setSignclosedSendName(sendbackInfo.getSendbackName());
-            signclosedInfo.setSignclosedSendTel(sendbackInfo.getSendbackTel());
-            signclosedInfo.setSendbackId(sendbackInfo.getSendbackId());
-            if(sendbackInfo.getSendbackStatus() < 3){
-                signclosedInfo.setSignclosedIsReceiving(1); //未签收
-                signclosedProductInfo.setSignclosedState(1);
-            }else{
-                signclosedInfo.setSignclosedIsReceiving(2);//已签收
-                signclosedProductInfo.setSignclosedState(2);
-                signclosedInfo.setSignclosedDate(sendbackInfo.getSendbackSignTime());
-            }
-            signclosedInfo.setSignclosedCompanyId(cmRelation.getCompanyId());
-            signclosedInfo.setSignclosedCustomerId(cmRelation.getCustomerId());
             //添加待签收产品
+            signclosedProductInfo.setSignclosedState(1);
             signclosedProductInfo.setProductName(productColor.getProductName());
             signclosedProductInfo.setProductNum(info.getSendbackProdcueNumber());
             signclosedProductInfo.setSignclosedProductId(info.getSendbackProductId());
             signclosedProductInfo.setSignclosedProductColor(info.getSendbackColorId());
             signclosedProductInfo.setSignclosedProductType(productColor.getProductType());
-            for(int i = 0;i< info.getSendbackProdcueNumber();i++){
-                if(complaintSignclosedInfoMapper.insert(signclosedInfo) < 1){
-                    throw new RuntimeException("添加签收记录失败");
-                }
-                signclosedProductInfo.setSignclosedId(signclosedInfo.getSignclosedId());
-                signclosedProductInfo.setProductNum(1);
+            signclosedProductInfo.setSignclosedId(signclosedInfo.getSignclosedId());
                 complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
-                /*//判断是否需要生成维修记录
-                if(sendbackInfo.getSendbackStatus() == 3){
-                    if(product.getProductIsDetection() == 1){
-                        //添加待检测信息
-                        //查询签收信息
-                        ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
-                        detectInfo.setProductId(productColor.getColorProductId());
-                        detectInfo.setProductColorId(info.getSendbackColorId());
-                        detectInfo.setDetectProductNumber(product.getProductNumber());
-                        detectInfo.setDetectState(1);
-                        detectInfo.setCustomerId(cmRelation.getCustomerId());
-                        detectInfo.setIsMaintenance(0);
-                        detectInfo.setDetectRenovation(0);
-                        detectInfo.setDetectProcessingResults(0);
-                        try {
-                            complaintDetectInfoMapper.insert(detectInfo);
-                        }catch (Exception e){
-                            throw new RuntimeException("------------生成检测信息出错------------");
-                        }
-                    }
-                }*/
-            }
             /*添加待签收记录 2019年4月11日18:09:34 end*/
 
         }

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

@@ -94,7 +94,7 @@
     sp.signclosed_product_id signclosedProductId,
     sp.signclosed_product_color signclosedProductColor,
     pc.color_name colorName,
-    count(1) productNum
+    sp.product_num productNum
     from
     tb_rst_complaint_signclosed_product sp
     LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
@@ -132,14 +132,15 @@
     ap.province signclosedAddrProvincesName,
     ac.city signclosedAddrCityName,
     ad.district signclosedAddrAreaName,
-    qd.describe_title customerIdDescribe
-
+    qd.describe_title customerIdDescribe,
+    li.logistics_name signclosedLogisticsName
     FROM
     tb_rst_complaint_signclosed cs
     LEFT JOIN tb_rst_address_province ap ON cs.signclosed_addr_provinces = ap.province_id
     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_cm_question_describe qd on cs.signclosed_customer_id = qd.customer_id
+    LEFT JOIN tb_rst_logistics_info li on cs.signclosed_logistics = li.logistics_rst_code
 
     <where>
       <if test="signclosedSendName != null and signclosedSendName != ''" >

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

@@ -57,8 +57,8 @@
 
         <#if procMethod.procMethodIsBack == 1>
                     <span>收费信息</span>
-                    <span>维修信息</span>
                     <span>签收信息</span>
+                    <span>维修信息</span>
                     <#--<span>工厂检查信息</span>
                     <span>工厂返修进度</span>-->
         </#if>
@@ -353,7 +353,7 @@
 
                 </div>
             </div>-->
-            <div class="row cl" id="postageInformation">s
+            <div class="row cl" id="postageInformation">
                 <#--<div class="formControls col-2 col-sm-2 text-r">
                     <strong>邮费信息</strong>
                 </div>-->
@@ -527,14 +527,14 @@
                 </div>
             </div>
              </div>
+                 <div class="row cl">
+                     <div class="formControls col-2 col-sm-2">
+                     </div>
+                     <div class="formControls col-8 col-sm-8 text-c">
+                         <button onClick="update_relation_info(2);" class="btn btn-primary" type="button">确认修改</button>
+                     </div>
+                 </div>
              </div>
-            <div class="row cl">
-                <div class="formControls col-2 col-sm-2">
-                </div>
-                <div class="formControls col-8 col-sm-8 text-c">
-                    <button onClick="update_relation_info(2);" class="btn btn-primary" type="button">确认修改</button>
-                </div>
-            </div>
         </div>
 
         <div <#if procMethod.procMethodIsSend == 1>class="tabCon"</#if>style="display: none;">
@@ -785,6 +785,111 @@
                 </div>
             </div>
         <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
+                <div class="row cl" id="signclosedDiv">
+                    <div class="formControls col-12 col-sm-12">
+                        <table class="table table-border table-bordered table-bg table-hover table-sort">
+                            <thead>
+                            <tr class="text-c">
+                                <th width="90">物流状态</th>
+                                <th width="160">物流</th>
+                                <th width="100">寄件人信息</th>
+                                <th width="250">签收产品</th>
+                                <th width="150">签收日期</th>
+                                <th width="150">签收图片</th>
+                                <th width="100">备注</th>
+                            </tr>
+                            </thead>
+                            <tbody id="listid">
+                            <#if (signclosedList?size > 0)>
+                                <#list signclosedList as signclosed>
+                                <tr>
+                                    <td class="text-c" width="100">
+                                        <#if signclosed.signclosedIsReceiving??>
+                                            <#if signclosed.signclosedIsReceiving == 1>
+                                                待签收
+                                            <#elseif signclosed.signclosedIsReceiving == 2>
+                                                已签收
+                                            </#if>
+                                        </#if>
+                                    </td>
+                                    <td class="text-c" width="160">
+                                        <#if signclosed.signclosedLogisticsName??>
+                                            ${signclosed.signclosedLogisticsName!}
+                                            -
+                                        </#if>
+                                        ${signclosed.signclosedLogisticsNumber!}</td>
+                                    <td class="text-c" width="100">${signclosed.signclosedSendName!}<br>${signclosed.signclosedSendTel!}</td>
+                                    <td style="text-align: left;" width="100">
+                                        <div>
+                                            <#if signclosed.signclosedProductInfoList??>
+                                                <#if (signclosed.signclosedProductInfoList?size > 0)>
+                                                    <#list signclosed.signclosedProductInfoList as info>
+                                                    <#--<#if info.signclosedProductType == 1 >
+                                                        <span class="label label-success radius" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                                                    <#else >-->
+                                                        <span class="label label-success radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
+                                                    <#--</#if>-->
+                                                    </#list>
+                                                <#else >
+                                                    暂无数据!
+                                                </#if>
+                                            <#else >
+                                                暂无数据!
+                                            </#if>
+                                        </div>
+                                    </td>
+                                <#--<td class="text-c" width="100">${signclosed.signclosedCustomerDesc!}</td>-->
+                                    <td class="text-c" width="100">${(signclosed.signclosedDate?string("yyyy-MM-dd"))!''}</td>
+                                    <td class="text-c" width="100">
+                                        <#if (signclosed.signclosedImgInfoList?size > 0)>
+                                            <#list signclosed.signclosedImgInfoList as signclosedImgInfo>
+                                                <img src="${signclosedImgInfo.imgUrl!}" style="widows: 50px;height: 50px;">
+                                            </#list>
+                                        </#if>
+
+                                    </td>
+                                    <td class="text-c" width="100">${signclosed.signclosedDesc!}</td>
+                                </tr>
+                                </#list>
+                            <#else >
+                            <tr><td class="td-manage text-c" colspan = "14">暂时没有签收信息</td></tr>
+                            </#if>
+                            </tbody>
+                        </table>
+                    </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-12 col-sm-12">
+                                <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-12 col-sm-12">
+                                <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>
+                    </div>
+            </#if>-->
+            </div>
+        <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
                 <div class="row cl" id="detectDiv">
                     <div class="formControls col-12 col-sm-12">
                         <table class="table table-border table-bg table-bordered" >
@@ -1065,113 +1170,6 @@
                     </div>
             </div>
         </div>
-        <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if>style="display: none;">
-                <div class="row cl" id="signclosedDiv">
-                    <div class="formControls col-12 col-sm-12">
-                        <table class="table table-border table-bordered table-bg table-hover table-sort">
-                            <thead>
-                            <tr class="text-c">
-                                <th width="90">物流状态</th>
-                                <th width="160">物流</th>
-                                <th width="100">寄件人姓名</th>
-                                <th width="100">寄件人电话</th>
-                                <th width="250">签收产品</th>
-                                <th width="150">签收日期</th>
-                                <th width="150">签收图片</th>
-                                <th width="100">备注</th>
-                            </tr>
-                            </thead>
-                            <tbody id="listid">
-                            <#if (signclosedList?size > 0)>
-                                <#list signclosedList as signclosed>
-                                <tr>
-                                    <td class="text-c" width="100">
-                                        <#if signclosed.signclosedIsReceiving??>
-                                            <#if signclosed.signclosedIsReceiving == 1>
-                                                待签收
-                                            <#elseif signclosed.signclosedIsReceiving == 2>
-                                                已签收
-                                            </#if>
-                                        </#if>
-                                    </td>
-                                    <td class="text-c" width="160">
-                                        <#if signclosed.signclosedLogistics??>
-                                        ${signclosed.signclosedLogistics!}
-                                            -
-                                        </#if>
-                                    ${signclosed.signclosedLogisticsNumber!}</td>
-                                    <td class="text-c" width="100">${signclosed.signclosedSendName!}</td>
-                                    <td class="text-c" width="180">${signclosed.signclosedSendTel!}</td>
-                                    <td style="text-align: left;" width="100">
-                                        <div>
-                                            <#if signclosed.signclosedProductInfoList??>
-                                                <#if (signclosed.signclosedProductInfoList?size > 0)>
-                                                    <#list signclosed.signclosedProductInfoList as info>
-                                                    <#--<#if info.signclosedProductType == 1 >
-                                                        <span class="label label-success radius" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
-                                                    <#else >-->
-                                                        <span class="label label-success radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
-                                                    <#--</#if>-->
-                                                    </#list>
-                                                <#else >
-                                                    暂无数据!
-                                                </#if>
-                                            <#else >
-                                                暂无数据!
-                                            </#if>
-                                        </div>
-                                    </td>
-                                <#--<td class="text-c" width="100">${signclosed.signclosedCustomerDesc!}</td>-->
-                                    <td class="text-c" width="100">${(signclosed.signclosedDate?string("yyyy-MM-dd"))!''}</td>
-                                    <td class="text-c" width="100">
-                                        <#if (signclosed.signclosedImgInfoList?size > 0)>
-                                            <#list signclosed.signclosedImgInfoList as signclosedImgInfo>
-                                                <img src="${signclosedImgInfo.imgUrl!}" style="widows: 50px;height: 50px;">
-                                            </#list>
-                                        </#if>
-
-                                    </td>
-                                    <td class="text-c" width="100">${signclosed.signclosedDesc!}</td>
-                                </tr>
-                                </#list>
-                            <#else >
-                            <tr><td class="td-manage text-c" colspan = "14">暂时没有签收信息</td></tr>
-                            </#if>
-                            </tbody>
-                        </table>
-                    </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-12 col-sm-12">
-                    <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-12 col-sm-12">
-                    <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>
-        </div>
-</#if>-->
-        </div>
         <input type="hidden" id="customerId" name="customerId" value="${customerId!''}" seleType="primary">
     </form>
 </article>

Plik diff jest za duży
+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


+ 9 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl

@@ -217,7 +217,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="90" height="80">
@@ -255,6 +255,14 @@
 <script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/ajaxfileupload.js"></script>
 <script type="text/javascript">
 
+    var date = new Date();
+    var newyear = date.getFullYear();
+    var newmonth = date.getMonth() + 1;
+    var day = date.getDate();
+    newmonth = (newmonth<10 ? "0"+newmonth:newmonth);
+    var newdate = newyear+ "-"+newmonth + "-" + day;
+    $("#signclosed_date").val(newdate);
+
     /*初始化单选框样式*/
     $(function(){
         $('.skin-minimal input').iCheck({

+ 3 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/customer/save_customer_info.ftl

@@ -227,11 +227,11 @@
             </div>
             <label class="form-label col-2 col-sm-2" style="width:110px;"><span class="c-red">*</span>供货价格:</label>
             <div class="formControls col-2 col-sm-2" style="width:130px;padding:0 0;margin-right: 15px;">
-                <span class="select-box">
+                <#--<span class="select-box">
                     <select name="supplyPrice" id="supplyPrice" class="select">
                     </select>
-                </span>
-                <#--<input type="text" class="input-text"  style="width:120px;margin-right: 0px;margin-bottom: 10px;"  placeholder="手动填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice">-->
+                </span>-->
+                <input type="text" class="input-text"  style="width:130px;"  placeholder="手动填写供货价格" name="supplyPrice" id="supplyPrice">
             </div>
             <div class="formControls col-2 col-sm-2" style="width:80px;padding:0 0;margin-right: 15px;">
                 <input type="text" class="input-text"  style="width:80px;margin-right: 0px;"  placeholder="手动填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice" onkeyup='this.value=this.value.replace(/\D/gi,"")'>