Pārlūkot izejas kodu

客诉列表寄回状态修改

liujiankang 6 gadi atpakaļ
vecāks
revīzija
4568257822

+ 16 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -528,6 +528,22 @@ public class AdminCustomerController {
     public ModelAndView toCustomerInfo(HttpServletRequest request) throws Exception {
         ModelAndView mv = new ModelAndView("cm/customer/custome_detail");
         String customerId = request.getParameter("customerId");
+        CmRelation cmRelation = new CmRelation();
+        cmRelation.setCustomerId(Integer.valueOf(customerId));
+        cmRelation = customerService.getCmRelationInfo(cmRelation);
+        ProcMethod procMethod = customerService.getProcMethod(cmRelation.getProcMethodId());
+        List<LogisticsInfo>logisticsInfoList =  logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
+        List<PostageInfo> listPostageInfo = customerService.listPostageInfo(cmRelation.getRelationId());
+        List<SendbackInfo> listSendbackInfo = customerService.listSendbackInfo(cmRelation.getRelationId());
+        //查询寄回产品
+        ClosedProdcue record = new ClosedProdcue();
+        record.setRelationId(cmRelation.getRelationId());
+        List <ClosedProdcue> listClosedProdcue = customerService.listclosedProdcue(record);
+        mv.addObject("listClosedProdcue",listClosedProdcue);
+        mv.addObject("listSendbackInfo",listSendbackInfo);
+        mv.addObject("logisticsInfoList",logisticsInfoList);
+        mv.addObject("listPostageInfo", listPostageInfo);
+        mv.addObject("procMethod", procMethod);
         mv.addObject("customerId", customerId);
         return mv;
     }

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

@@ -831,7 +831,7 @@ public class AdminOrderController {
                 row.add(salesOrder.getCompanyName() == null ? null:salesOrder.getCompanyName());
                 row.add(salesOrder.getStoreName() == null ? null:salesOrder.getStoreName());
                 row.add(salesOrder.getSalesDeliverTime() == null ? null:formatter.format(salesOrder.getSalesDeliverTime()));
-                row.add(salesOrder.getSalesDistributionTime() == null ? null:formatter.format(salesOrder.getSalesDistributionTime()));
+                row.add(salesOrder.getSalesDistributionTime() == null ? formatter.format(salesOrder.getSalesSendTime()):formatter.format(salesOrder.getSalesDistributionTime()));
                 row.add(salesOrder.getProcMethodName() == null ? null:salesOrder.getProcMethodName());
                 countexts.add(row);
             }

+ 6 - 6
watero-rst-web/src/main/resources/dev-jdbc.properties

@@ -1,8 +1,8 @@
 jdbc.driver=com.mysql.jdbc.Driver
 ##### \uFFFD\uFFFD\u02BD\uFFFD\uFFFD\uFFFD\uFFFD ####
-jdbc.url=jdbc:mysql://iamberry.mysql.rds.aliyuncs.com/rst?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
-jdbc.username=watero_rst
-jdbc.password=watero_RST
+#jdbc.url=jdbc:mysql://iamberry.mysql.rds.aliyuncs.com/rst?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
+#jdbc.username=watero_rst
+#jdbc.password=watero_RST
 ##### \uFFFD\uFFFD\u02BD\uFFFD\uFFFD\uFFFD\uFFFD end #####
 
 #\u6D4B\u8BD5
@@ -10,9 +10,9 @@ jdbc.password=watero_RST
 #jdbc.username=rst_test
 #jdbc.password=RST_test
 
-#jdbc.url=jdbc:mysql://iamberry.mysql.rds.aliyuncs.com/rst_test_2?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
-#jdbc.username=rst_test
-#jdbc.password=RST_test
+jdbc.url=jdbc:mysql://iamberry.mysql.rds.aliyuncs.com/rst_test_2?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull
+jdbc.username=rst_test
+jdbc.password=RST_test
 
 ### \uFFFD\uFFFD\uFFFD\u053B\uFFFD\uFFFD\uFFFD
 #jdbc.url=jdbc:mysql://192.168.1.254/rst_test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull

+ 334 - 12
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_detail.ftl

@@ -48,6 +48,11 @@
         .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
         .txt-red{color:red}
         .thString {font-weight: normal;}
+        .clearfix:after{content:"\20";display:block;height:0;clear:both;visibility:hidden}.clearfix{zoom:1}
+        .tabBar {border-bottom: 2px solid #222}
+        .tabBar span {background-color: #e8e8e8;cursor: pointer;display: inline-block;float: left;font-weight: bold;height: 30px;line-height: 30px;padding: 0 15px}
+        .tabBar span.current{background-color: #222;color: #fff}
+        .tabCon {display: none}
     </style>
     <title>客诉基本信息</title>
 </head>
@@ -193,20 +198,10 @@
                     处理结果(<span id="customerIsSolve" style="color: red"></span>)
                     <span id="postage" style="color: red"></span>
                 </th>
-                <#--<th width="40" style="font-weight: normal;">
-                    <div class="row cl">
-                        <label class="form-label col-1 col-sm-1"></label>
-                        <div class="formControls col-10 col-sm-10">
-                            <ul class="time-line-list">
-
-                            </ul>
-                        </div>
-                    </div>
-                </th>-->
             </tr>
             </thead>
         </table>
-        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+        <#--<table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
             <thead>
             <tr>
                 <th width="10">寄回产品:</th>
@@ -230,7 +225,233 @@
                 <td width="10" style="font-weight: normal;"></td>
             </tr>
             </thead>
-        </table>
+        </table>-->
+
+        <div id="tab_demo" class="HuiTab">
+            <div class="tabBar clearfix">
+            <#if procMethod.procMethodIsBack == 1>
+                <span>寄回信息</span>
+                <span>邮费信息</span>
+            </#if>
+            <#if procMethod.procMethodIsSend == 1>
+                <span>寄送信息</span>
+            </#if>
+            <#--<#if procMethod.procMethodIsBack == 1>
+                <span>工厂检查信息</span>
+                <span>工厂返修进度</span>
+            </#if>-->
+            </div>
+            <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
+                <div class="row cl">
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered" >
+                            <thead>
+                            <tr>
+                                <th>物流公司</th>
+                                <th>物流单号</th>
+                                <th>寄回人信息</th>
+                                <th>状态</th>
+                                <th>产品</th>
+                            </tr>
+                            </thead>
+                            <tbody id="SendbackbodyId">
+                            <#if listSendbackInfo?? &&  (listSendbackInfo?size > 0) >
+                                <#list listSendbackInfo as sendbackInfo>
+                                <tr id="deleteSendbackId${(sendbackInfo.sendbackId)!''}">
+                                    <td>${(sendbackInfo.sendbackLogisticsName)!''}</td>
+                                    <td>${(sendbackInfo.sendbackLogisticsNo)!''}</td>
+                                    <td>${(sendbackInfo.sendbackName)!''}<br>${(sendbackInfo.sendbackTel)!''}</td>
+                                    <td>
+                                        <#if sendbackInfo.sendbackStatus == 1>未配送</#if>
+                                        <#if sendbackInfo.sendbackStatus == 2>配送中</#if>
+                                        <#if sendbackInfo.sendbackStatus == 3>已签收</#if>
+                                    </td>
+                                    <td>
+                                        <#if sendbackInfo.listSendbackItem?? &&  (sendbackInfo.listSendbackItem?size > 0) >
+                                            <#list sendbackInfo.listSendbackItem as sendbackItem>
+                                            ${sendbackItem.sendbackProductName}(${sendbackItem.sendbackColorName})* ${sendbackItem.sendbackProdcueNumber}<br>
+                                            </#list>
+                                        </#if>
+                                    </td>
+                                </tr>
+                                </#list>
+                            <#else>
+                            <tr id="colspanSendbackId"><td colspan="7" class="td-manage text-c" >暂时没有寄回信息,请添加!</td></tr>
+                            </#if>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+            <div <#if procMethod.procMethodIsBack == 1>class="tabCon"</#if> style="display: none;">
+
+                <div class="row cl" id="postageInformation">
+                    <div class="formControls col-10 col-sm-10">
+                        <table class="table table-border table-bg table-bordered" >
+                            <thead>
+                            <tr>
+                                <th>邮费id</th>
+                                <th>邮费金额</th>
+                                <th>支付宝姓名</th>
+                                <th>支付宝账号</th>
+                                <th>状态</th>
+                                <th>备注</th>
+                            </tr>
+                            </thead>
+                            <tbody id="trbodyId">
+                            <#if listPostageInfo?? &&  (listPostageInfo?size > 0) >
+                                <#list listPostageInfo as postageInfo>
+                                <tr id="deleteId${(postageInfo.postageId)!''}">
+                                    <td>${(postageInfo.postageId)!''}</td>
+                                    <td>${(postageInfo.postageAmount)!''}</td>
+                                    <td>${(postageInfo.postageAlipayName)!''}</td>
+                                    <td>${(postageInfo.postageAlipay)!''}</td>
+                                    <#if postageInfo.postageStatus??>
+                                        <#if postageInfo.postageStatus == 0><td>未申请</td></#if>
+                                        <#if postageInfo.postageStatus == 1><td>未申请</td></#if>
+                                        <#if postageInfo.postageStatus == 2><td>已申请(待转账)</td></#if>
+                                        <#if postageInfo.postageStatus == 3><td>已转账</td></#if>
+                                        <#if postageInfo.postageStatus == 4><td>未知</td></#if>
+                                    <#else>
+                                        <td></td>
+                                    </#if>
+                                    <td>${postageInfo.postageDesc!''}</td>
+                                </tr>
+                                </#list>
+                            <#else>
+                            <tr id="colspanId"><td colspan="7" class="td-manage text-c" >暂时没有邮费信息!</td></tr>
+                            </#if>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+            <div <#if procMethod.procMethodIsSend == 1>class="tabCon"</#if>style="display: none;">
+                <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
+                    <thead>
+                    <tr>
+                        <th width="20">是否寄出:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <div class="radio-box">
+                                <input type="radio" id="tel-10" name="relationSendStatus" value="1" seleType="sendInformation">
+                                <label for="tel-10">未寄出</label>
+                            </div>
+                            <div class="radio-box">
+                                <input type="radio" id="tel-11" name="relationSendStatus" value="2" seleType="sendInformation">
+                                <label for="tel-11">已寄出</label>
+                            </div>
+                            <div class="radio-box">
+                                <input type="radio" id="tel-12" name="relationSendStatus" value="3" seleType="sendInformation">
+                                <label for="tel-12">已收货</label>
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">Efast订单号:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationBackEfastOrderId"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">收件人姓名:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationSendName"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">收件人手机号:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationSendTel"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">省市县:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <div style="width: 188px;display: inline-block;margin-right: 20px;">
+                                <span class="select-box" style="padding-right: 0px;">
+                                    <select name="provinceNumber" id="provinceNumber" class="select" seleType="sendInformation"></select>
+                                </span>
+                            </div>
+                            <div style="width: 188px;display: inline-block;margin-right: 20px;">
+                                <span class="select-box" style="padding-right: 0px;">
+                                    <select name="cityNumber" id="cityNumber" class="select" seleType="sendInformation"></select>
+                                </span>
+                            </div>
+                            <div style="width: 189px;display: inline-block;">
+                                <span class="select-box" style="padding-right: 0px;">
+                                    <select name="areaNumber" id="areaNumber" class="select" seleType="sendInformation"></select>
+                                    <input type="hidden" id="merge_address" name="merge_address" seleType="sendInformation">
+                                </span>
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">详细地址:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationSendAddress"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">寄出信息:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <div style="width: 300px;display: inline-block;margin-right: 10px;">
+                                <span class="select-box">
+                                    <select name="relationSendLogisticsCompany" id="relationSendLogisticsCompany" class="select" seleType="sendInformation">
+                                        <#if logisticsInfoList?? &&  (logisticsInfoList?size > 0) >
+                                            <#list logisticsInfoList as logisticsInfo>
+                                                <option value="${logisticsInfo.logisticsRstCode!''}">${logisticsInfo.logisticsName!''}(${logisticsInfo.logisticsRstCode!''})</option>
+                                            </#list>
+                                        </#if>
+                                    </select>
+                                </span>
+                            </div>
+                            <span id="relationSendLogisticsNo"></span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="10">寄出备注:</th>
+                        <td width="10" style="font-weight: normal;">
+                            <span id="relationDesc"></span>
+                        </td>
+                    </tr>
+                    </thead>
+                </table>
+                <div class="row cl">
+                    <div class="formControls col-2 col-sm-2">
+                    </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>
+            </div>
+        </#if>-->
+        </div>
 
     </form>
     </div>
@@ -248,6 +469,9 @@
 <script type="text/javascript" charset="utf-8" src="${path}/common/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
 <script type="text/javascript">
     $(function(){
+        $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});
+    $(function(){
+        get_cmRelation_info();
         $('.skin-minimal input').iCheck({
             checkboxClass: 'icheckbox-blue',
             radioClass: 'iradio-blue',
@@ -668,6 +892,104 @@
         }
     }
 
+
+    /*获取换新信息*/
+    function get_cmRelation_info() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":${customerId}},
+            url: "${path}/admin/customer/get_cmRelation_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var relation = data.returnMsg.cmRelation;
+                    console.log(relation);
+                    getProvince('provinceNumber');
+                    getCity('cityNumber',relation.provinceNumber);
+                    getDistrict('areaNumber',relation.cityNumber);
+                    $("#relationSendLogisticsCompany option[value='" + relation.relationSendLogisticsCompany + "']").attr("selected","true");
+
+                    $("#provinceNumber option[value='" + relation.provinceNumber + "']").attr("selected","true");
+                    $("#cityNumber option[value='" + relation.cityNumber + "']").attr("selected","true");
+                    $("#areaNumber option[value='" + relation.areaNumber + "']").attr("selected","true");
+                    $('input[name="relationSendStatus"]').each(function(){
+                        if (this.value == relation.relationSendStatus) {
+                            $(this).iCheck('check');
+                        }
+                    });
+                    $('#relationBackEfastOrderId').html(relation.relationBackEfastOrderId);
+                    $('#relationSendName').html(relation.relationSendName);
+                    $('#relationSendTel').html(relation.relationSendTel);
+                    $('#relationSendAddress').html(relation.relationSendAddress);
+                    $('#relationSendLogisticsNo').html(relation.relationSendLogisticsNo);
+                    $('#relationDesc').html(relation.relationDesc);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+
+    /**
+     * 获取省
+     */
+    function getProvince(provinceNum) {
+        var province = listProvince();
+        if(province!=null){
+            var provinceHtml = '';
+            for(var i=0;i<province.length;i++){
+                provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
+            }
+            $('#'+provinceNum).append(provinceHtml);
+        }
+    }
+
+    /**
+     * 获取市
+     */
+    function getCity(cityNum,provineceId) {
+        var city = listCity(provineceId,'');
+        if(city!=null){
+            var cityHtml = '';
+            for(var i=0;i<city.length;i++){
+                cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
+            }
+            $('#'+cityNum).append(cityHtml);
+        }
+    }
+
+    /**
+     * 获取区
+     */
+    function getDistrict(districtNum,cityId) {
+        var district = listDistrict(cityId,'');
+        if(district!=null){
+            var districtHtml = '';
+            for(var i=0;i<district.length;i++){
+                districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
+            }
+            $('#'+districtNum).append(districtHtml);
+        }
+    }
+
+    /*监听市选择事件*/
+    $(document).on('change', '#cityNumber', function() {
+        var city = $("#cityNumber").val();
+        $('#areaNumber option').remove();
+        getDistrict('areaNumber',city);
+    });
+
+    /*监听省选择事件*/
+    $(document).on('change', '#provinceNumber', function() {
+        var proId = $("#provinceNumber").val();
+        $('#cityNumber option').remove();
+        getCity('cityNumber',proId);
+        var cityId = $("#cityNumber").val();
+        $('#areaNumber option').remove();
+        getDistrict('areaNumber',cityId);
+    });
 </script>
 </body>
 </html>