liujiankang 6 лет назад
Родитель
Сommit
ae59d82cc7

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

@@ -163,6 +163,7 @@ public class CustomerInfo  implements Serializable {
     private String customerProvinceId;    //省
     private String customerCityId;    //市
     private String customerDistrictId;    //区
+    private String customerSendAddress;    //详细地址
     private List<PostageInfo> postageInfoList;    //邮费集合
     private List<SendbackInfo> sendbackInfoList;    //寄回信息集合
     private List<SalesOrder> salesOrderList;    //寄出产品订单集合
@@ -844,4 +845,12 @@ public class CustomerInfo  implements Serializable {
     public void setSalesOrderList(List<SalesOrder> salesOrderList) {
         this.salesOrderList = salesOrderList;
     }
+
+    public String getCustomerSendAddress() {
+        return customerSendAddress;
+    }
+
+    public void setCustomerSendAddress(String customerSendAddress) {
+        this.customerSendAddress = customerSendAddress;
+    }
 }

+ 8 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -1108,6 +1108,14 @@ public class CustomerServiceImpl implements CustomerService {
         sendrecord.setRelationId(cmRelation.getRelationId());
         customerCommon.setSendProdcues(sendProdcueMapper.listSendProdcue(sendrecord));
         map.put("customerCommon",customerCommon);
+        if(customerCommon.getSendProdcues().size() > 0){
+            StringBuffer colorIds = new StringBuffer("");
+            for(SendProdcue sendProdcue : customerCommon.getSendProdcues()){
+                colorIds.append(sendProdcue.getColorId() + "_");
+            }
+            map.put("colorIds",colorIds);
+        }
+
         return map;
     }
 

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

@@ -294,7 +294,8 @@
     cc.procMethodIsSend as procMethodIsSend,
     cc.provinceNumber as customerProvinceId,
     cc.cityNumber as customerCityId,
-    cc.areaNumber as customerDistrictId
+    cc.areaNumber as customerDistrictId,
+    cc.relationSendAddress as customerSendAddress
     FROM
     tb_rst_cm_customer_info c
     LEFT JOIN (
@@ -322,7 +323,8 @@
     tb_rst_cm_proc_method.proc_method_is_send AS procMethodIsSend,
     tb_rst_cm_relation.province_number AS provinceNumber,
     tb_rst_cm_relation.city_number AS cityNumber,
-    tb_rst_cm_relation.area_number AS areaNumber
+    tb_rst_cm_relation.area_number AS areaNumber,
+    tb_rst_cm_relation.relation_send_address AS relationSendAddress
     FROM
     tb_rst_cm_relation
     LEFT JOIN tb_rst_cm_proc_method ON tb_rst_cm_proc_method.proc_method_id = tb_rst_cm_relation.proc_method_id
@@ -514,6 +516,7 @@
       tb_rst_sales_order_info
     WHERE
       sales_customer_id = #{customerId}
+      ORDER BY sales_id desc
   </select>
 
   <insert id="insert" parameterType="CustomerInfo"  useGeneratedKeys="true"  keyProperty="customerId">
@@ -781,7 +784,7 @@ sa.admin_name AS adminName,
 csi.sendback_logistics_company AS relationBackLogisticsCompany,
 csi.sendback_logistics_no AS relationBackLogisticsNo,
 csi.sendback_sign_time AS relationBackReceiptDate,
-cr.relation_send_status AS relationBackStatus,
+csi.sendback_status AS relationBackStatus,
 cr.relation_send_logistics_company AS relationSendLogisticsCompany,
 cr.relation_send_logistics_no AS relationSendLogisticsNo,
 cr.relation_factory_costs AS relationFactoryCosts,
@@ -801,7 +804,6 @@ LEFT JOIN tb_rst_cm_relation cr ON cr.customer_id = c.customer_id
 LEFT JOIN tb_rst_cm_proc_method cpm ON cpm.proc_method_id = cr.proc_method_id
 LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
 LEFT JOIN tb_rst_cm_sendback_info csi ON csi.relation_id = cr.relation_id
-where si.store_id = 23
 </select>
   <!-- 退换货统计sql start -->
   <!-- 总销量 -->

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

@@ -475,6 +475,14 @@ public class AdminCustomerController {
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
+        //查询寄出状态
+        if(pagedResult.getDataList().size() > 0){
+            for(CustomerInfo info : pagedResult.getDataList()){
+                if(info.getSalesOrderList().size() > 0){
+                    info.setSendStatus(info.getSalesOrderList().get(0).getSalesStatus());
+                }
+            }
+        }
         ProductType productType = new ProductType();
         //查询产品类型集合
         List<ProductType> typeList = productService.listProductType(productType);
@@ -577,6 +585,7 @@ public class AdminCustomerController {
         rj.addResponseKeyValue("customerCommon", map.get("customerCommon"));
         rj.addResponseKeyValue("customer", map.get("customer"));
         rj.addResponseKeyValue("orderList", map.get("orderList"));
+        rj.addResponseKeyValue("colorIds", map.get("colorIds"));
         return rj;
     }
 
@@ -1278,9 +1287,14 @@ public class AdminCustomerController {
         if (cmRelation == null) {
             return new ResponseJson(500, "该客诉没有售后信息!", 500);
         } else {
-
+            //查询寄出状态
+            SalesOrder salesOrder = new SalesOrder();
+            salesOrder.setSalesCustomerId(Integer.valueOf(customerId));
+            List<SalesOrder> salesOrderList = salesOrderService.salesOrderListAndItem(salesOrder);
+            cmRelation.setRelationSendStatus(salesOrderList.get(0).getSalesStatus());
             ResponseJson rj = new ResponseJson(200, "查询成功", 200);
             rj.addResponseKeyValue("cmRelation", cmRelation);
+
             return rj;
         }
     }

+ 5 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -287,11 +287,11 @@
                                                     <#if customer.procMethodIsBack == 1 && customer.procMethodIsSend == 1>,</#if>
                                                     <#if customer.sendStatus?? && customer.procMethodIsSend == 1>
                                                         <#if customer.sendStatus == 1>
-                                                            未寄送
-                                                        <#elseif customer.sendStatus == 2>
-                                                            已寄送
-                                                        <#elseif customer.sendStatus == 3>
-                                                            已
+                                                            已发货
+                                                        <#elseif customer.sendStatus == 0>
+                                                            未发货
+                                                        <#elseif customer.sendStatus == 11>
+                                                            已通知配
                                                         </#if>
                                                     </#if>
                                                 </font>

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

@@ -1918,13 +1918,13 @@
                     if(relation.procMethodIsSend == 1) {
                         switch (relation.relationSendStatus) {
                             case 1:
-                                relationSchedule += '未寄送';
+                                relationSchedule += '已发货';
                                 break;
-                            case 2:
-                                relationSchedule += '已寄送';
+                            case 0:
+                                relationSchedule += '未发货';
                                 break;
-                            case 3:
-                                relationSchedule += '已货';
+                            case 11:
+                                relationSchedule += '已通知配货';
                                 break;
                         }
                     }

+ 5 - 1
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -127,7 +127,8 @@ function setSelectCustomer(customerId){
                 $("#salesCustomerIdHtml").html("已经选择客诉记录:"+customer.customerId);
                 $("#salesCustomerId").val(customer.customerId);
                 sc.setCompanyId(customer.companyId);
-                sc.setStoreId(customer.storeId);
+                $("#salesStoreId").val(customer.storeId);
+                $("#store_1").val(customer.storeName);
                 /*设置用户姓名、电话*/
                 $("#salesAddressName").val(customer.customerName);
                 $("#salesAddressTel").val(customer.customerTel);
@@ -141,6 +142,9 @@ function setSelectCustomer(customerId){
                 $("#salesPayTime").val(salesTIme + time);
                 // sc.setUlcById(0,1,11);
                  ulc.setUlcById(0,customer.customerProvinceId,customer.customerCityId,customer.customerDistrictId);
+                $("#addressDesc").html(customer.customerSendAddress);
+                $("#salesAddressInfo").val(customer.customerSendAddress);
+                setSelectProduct(data.returnMsg.colorIds);
             }else{
             }
             $("#salesCustomer").show();