Procházet zdrojové kódy

客诉修改功能

wangxiaoming před 7 roky
rodič
revize
da5d70e43e

+ 21 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -51,6 +51,11 @@ public class CustomerInfo  implements Serializable {
     //  问题标题
     private String customerQuestionTitle;
 
+    /*客诉信息本身延伸字段*/
+    //区域,用于修改客诉处理区域选择逻辑
+    private String provinceName;
+    private String cityName;
+
     private String productName;         //客诉产品
     private String complaintClassName;  //客诉类型名称
     private String questionProfile;     //问题回复
@@ -542,4 +547,20 @@ public class CustomerInfo  implements Serializable {
     public void setEndTime(Date endTime) {
         this.endTime = endTime;
     }
+
+    public String getProvinceName() {
+        return provinceName;
+    }
+
+    public void setProvinceName(String provinceName) {
+        this.provinceName = provinceName;
+    }
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public void setCityName(String cityName) {
+        this.cityName = cityName;
+    }
 }

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

@@ -1,11 +1,13 @@
 package com.iamberry.rst.controllers.cm;
 
+import com.iamberry.rst.core.address.City;
 import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.core.order.Product;
 import com.iamberry.rst.core.order.ProductColor;
 import com.iamberry.rst.core.order.ProductType;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
+import com.iamberry.rst.faces.address.AddressService;
 import com.iamberry.rst.faces.cm.*;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.sms.SmsService;
@@ -85,6 +87,9 @@ public class AdminCustomerController {
     private ComplaintSmallClassInfoService complaintSmallClassInfoService;
     @Autowired
     private CustomerCommonService customerCommonService;
+    @Autowired
+    private AddressService addressService;
+
 
 
     /**
@@ -152,6 +157,16 @@ public class AdminCustomerController {
         Integer loginAdminId = AdminUtils.getLoginAdminId();
         //查询客诉基本信息
         CustomerInfo customerInfo = customerService.getCustomerInfo(customerId);
+        /*客诉信息处理-stast*/
+        //对于区域处理
+        if(customerInfo!=null && customerInfo.getCustomerArea() != null){
+//            String[] customerAreaAndCity = customerInfo.getCustomerArea().split("-");
+//            customerInfo.setProvinceName(customerAreaAndCity[0]);
+//            City city
+//            addressService.listCity(customerAreaAndCity[0]);
+//            customerInfo.setCityName(customerAreaAndCity[0]);
+        }
+        /*客诉信息处理-end*/
         CustomerCommon customerCommon = new CustomerCommon();
         if(customerInfo.getCustomerIsSolve() != null){
             switch (customerInfo.getCustomerIsSolve()){   //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货

+ 54 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -369,7 +369,7 @@
                             </tr>
                         </thead>
                         <tbody id="addProduct">
-                            <tr id="showOrder">
+                            <tr id="">
                                 <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
                             </tr>
                         </tbody>
@@ -439,9 +439,59 @@
                             </tr>
                         </thead>
                         <tbody id="back-product">
-                            <tr id="showOrder">
-                                <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
-                            </tr>
+                        <#list productList as product>
+                        <tr>
+                            <td width="80">
+                                <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
+                            </td>
+                            <td style="padding: 0px;text-align: center;">
+                                <table style="height: 100%;">
+                                    <tbody>
+                                        <#list product.colorList as color>
+                                        <tr>
+                                            <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
+                                            ${color.colorName}
+                                            </td>
+                                            <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
+                                                <input type="hidden" class="input-produce-id" value="${product.productId}">
+                                                <input type="hidden" class="input-color-id" value="${color.colorId}">
+                                                <#assign number = ""/>
+                                                <#list customerCommon.sendProdcues as sendProdcues>
+                                                    <#if sendProdcues.colorId == color.colorId >
+                                                        <#assign number = sendProdcues.sendProdcueNumber/>
+                                                    </#if>
+                                                </#list>
+                                                <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                            </td>
+                                        </tr>
+                                        </#list>
+                                    </tbody>
+                                </table>
+                            </td>
+                            <td style="padding: 0px;text-align: center;">
+                                <table style="height: 100%;">
+                                    <tbody>
+                                        <#list product.fittingsList as fittingsInfo>
+                                        <tr>
+                                            <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
+                                            <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
+                                                <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
+                                                <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
+                                                <#assign number = ""/>
+                                                <#list customerCommon.sendFittings as sendFittings>
+                                                    <#if sendFittings.fittingsId == fittingsInfo.fittingsId >
+                                                        <#assign number = sendFittings.sendFittingNumber/>
+                                                    </#if>
+                                                </#list>
+                                                <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                            </td>
+                                        </tr>
+                                        </#list>
+                                    </tbody>
+                                </table>
+                            </td>
+                        </tr>
+                        </#list>
                         </tbody>
                     </table>
                 </div>

+ 27 - 56
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl

@@ -399,71 +399,43 @@
                                             <#list product.colorList as color>
                                                 <tr>
                                                     <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
-                                                        品蓝
+                                                        ${color.colorName}
                                                     </td>
                                                     <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
                                                         <input type="hidden" class="input-produce-id" value="${product.productId}">
                                                         <input type="hidden" class="input-color-id" value="${color.colorId}">
-                                                        <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${color.colorId}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                        <#assign number = ""/>
+                                                         <#list customerCommon.sendProdcues as sendProdcues>
+                                                               <#if sendProdcues.colorId == color.colorId >
+                                                                   <#assign number = sendProdcues.sendProdcueNumber/>
+                                                               </#if>
+                                                         </#list>
+                                                        <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
                                                     </td>
                                                 </tr>
                                             </#list>
-                                            <tr>
-                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
-                                                    品蓝
-                                                </td>
-                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
-                                                    <input type="hidden" class="input-produce-id" value="1">
-                                                    <input type="hidden" class="input-color-id" value="1">
-                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="1" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">品黑</td>
-                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
-                                                    <input type="hidden" class="input-produce-id" value="1">
-                                                    <input type="hidden" class="input-color-id" value="2">
-                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="" placeholder="产品数量" id="color-1-2" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">苹果绿</td>
-                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
-                                                    <input type="hidden" class="input-produce-id" value="1">
-                                                    <input type="hidden" class="input-color-id" value="3">
-                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="" placeholder="产品数量" id="color-1-3" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">西瓜红</td>
-                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
-                                                    <input type="hidden" class="input-produce-id" value="1">
-                                                    <input type="hidden" class="input-color-id" value="4">
-                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="" placeholder="产品数量" id="color-1-4" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                                </td>
-                                            </tr>
                                         </tbody>
                                     </table>
                                 </td>
                                 <td style="padding: 0px;text-align: center;">
                                     <table style="height: 100%;">
                                         <tbody>
-                                        <tr>
-                                            <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">内部配件1</td>
-                                            <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
-                                                <input type="hidden" class="input-produce-id" value="1">
-                                                <input type="hidden" class="input-fittings-id" value="1">
-                                                <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="3" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">内部配件2</td>
-                                            <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
-                                                <input type="hidden" class="input-produce-id" value="1">
-                                                <input type="hidden" class="input-fittings-id" value="2">
-                                                <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="" placeholder="配件数量" id="fittings-1-2" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
-                                            </td>
-                                        </tr>
+                                            <#list product.fittingsList as fittingsInfo>
+                                                <tr>
+                                                    <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">${fittingsInfo.fittingsName}</td>
+                                                    <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
+                                                        <input type="hidden" class="input-produce-id" value="${fittingsInfo.productId}">
+                                                        <input type="hidden" class="input-fittings-id" value="${fittingsInfo.fittingsId}">
+                                                        <#assign number = ""/>
+                                                        <#list customerCommon.sendFittings as sendFittings>
+                                                            <#if sendFittings.fittingsId == fittingsInfo.fittingsId >
+                                                                <#assign number = sendFittings.sendFittingNumber/>
+                                                            </#if>
+                                                        </#list>
+                                                        <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="${number}" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                    </td>
+                                                </tr>
+                                            </#list>
                                         </tbody>
                                     </table>
                                 </td>
@@ -480,9 +452,7 @@
                 <label class="form-label col-1 col-sm-1">TDS收集:</label>
                 <div class="formControls col-2 col-sm-2" style="position: relative;">
                     <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
-                   <#-- <#assign index_num = customerInfo.customerArea?index_of("-") />-->
-                        <#--${customerInfo.customerArea?substring(0,)!'0'}-->
-                    <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" value="" />
+                    <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" value="${index_num}" />
                     <div id="suggest" class="ac_results"></div>
                 </div>
                 <div class="formControls col-2 col-sm-2">
@@ -539,7 +509,8 @@
                             </tr>
                         </thead>
                         <tbody id="back-product">
-                            <tr id="showOrder">
+
+                            <tr id="">
                                 <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
                             </tr>
                         </tbody>