Jelajahi Sumber

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

# Conflicts:
#	watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
wangxiaoming 7 tahun lalu
induk
melakukan
7e58b29d29

+ 12 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -64,6 +64,9 @@ public class CustomerInfo  implements Serializable {
     private Integer backStatus;         //寄回状态
     private Integer sendStatus;         //寄送状态
 
+    /*关联客诉产品类型*/
+    private Integer typeCompany;    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机
+
     /*  客诉问题关联qa查询表  */
     private Integer complaintId;        //客诉类型id
     private String smallClassName;      //客诉小类名称
@@ -82,7 +85,7 @@ public class CustomerInfo  implements Serializable {
     private Integer visitTimeSelect;    //回访时间选择  1: 9:00-12:00  2: 12:00-14:00   3: 14:00-18:00
     private String visitCompleteName;   //回访联系人
     private String visitCompleteTel;    //回访完成时的电话
-    private Integer visitAdminId; //回访提醒人
+    private Integer visitAdminId; //回访提醒人  //指定客服id
 
     /*  问题表 */
     private String describeContent;     //客诉问题描述
@@ -478,4 +481,12 @@ public class CustomerInfo  implements Serializable {
     public void setIsAddOrder(Integer isAddOrder) {
         this.isAddOrder = isAddOrder;
     }
+
+    public Integer getTypeCompany() {
+        return typeCompany;
+    }
+
+    public void setTypeCompany(Integer typeCompany) {
+        this.typeCompany = typeCompany;
+    }
 }

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java

@@ -49,7 +49,7 @@ public class SalesOrder implements Serializable {
     private Integer salesCompanyId;         //销售公司id
     private Integer salesType;              //订单类型
     private String salesDealCode;           //交易号
-    private Integer salesOrderStatus;       //订单状态
+    private Integer salesOrderStatus;       //订单状态 订单状态:1:正常 2:换货 3:退货
     private Integer salesShippingStatus;    //发货状态
     private Integer salesPayStatus;         //付款状态
     private Integer salesProcessStatus;     //单据状态

+ 1 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Visit.java

@@ -17,7 +17,7 @@ public class Visit implements Serializable {
     private Integer adminId;
     //提醒人
     private String adminName;
-    //指定人Id
+    //指定人客服Id
     private Integer designatedAdminId;
     //指定人名称
     private String designatedAdminName;

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

@@ -97,13 +97,14 @@ public class CustomerServiceImpl implements CustomerService {
         questionDescribe.setDescribeHandleDesc(customerInfo.getDescribeHandleDesc());   //处理描述
         flag = questionDescribeMapper.insert(questionDescribe);
         if(flag < 1){
-            throw new RuntimeException("添加客诉失败");
+            throw new RuntimeException("添加客诉问题失败");
         }
 
         if ("2".equals(customerInfo.getCustomerIsVisit())) {
             Visit visit = new Visit();
             visit.setCustomerId(customerInfo.getCustomerId());
-            visit.setAdminId(customerInfo.getVisitAdminId());
+            visit.setAdminId(customerInfo.getAdminId());
+            visit.setDesignatedAdminId(customerInfo.getVisitAdminId());
             visit.setVisitName(customerInfo.getVisitName());
             visit.setVisitTel(customerInfo.getVisitTel());
             visit.setVisitDate(customerInfo.getVisitDate());
@@ -111,7 +112,7 @@ public class CustomerServiceImpl implements CustomerService {
             visit.setVisitStatus(1);    //回访状态
             flag = visitMapper.addVisitInfo(visit);
             if(flag < 1){
-                throw new RuntimeException("添加客诉失败");
+                throw new RuntimeException("添加客诉回访失败");
             }
         }
 
@@ -276,7 +277,7 @@ public class CustomerServiceImpl implements CustomerService {
             cc.getSendFittings().get(i).setFittingsId(fittingsInfo.getFittingsId());
         }
         for (int i=0;i<cc.getClosedProdcues().size();i++) {
-            Product product = productMapper.getProductById(cc.getSendProdcues().get(i).getProductId());
+            Product product = productMapper.getProduce(cc.getSendProdcues().get(i).getProductId());
             cc.getClosedProdcues().get(i).setClosedProductName(product.getProductName());
             cc.getClosedProdcues().get(i).setProductType(product.getProductType());
             cc.getClosedProdcues().get(i).setProductNumber(product.getProductNumber());
@@ -467,7 +468,9 @@ public class CustomerServiceImpl implements CustomerService {
         map.put("status",status);
         if(oList != null && oList.size() > 0){
             map.put("EfastOrderId",oList.get(0).getOrderId());
-            logger.info("换新,维修 ,补发向Efast 推送订单,订单号为:" + oList.get(0).getOrderId());
+            logger.info("换新,维修 ,补发向Efast 推送订单成功,订单号为:" + oList.get(0).getOrderId());
+        }else{
+            logger.info("换新,维修 ,补发向Efast 推送订单,推送失败");
         }
         return map;
     }
@@ -482,7 +485,7 @@ public class CustomerServiceImpl implements CustomerService {
         //添加订单数据
         int orderNum = salesOrderMapper.addSalesOrder(salesOrder);
         if (orderNum <= 0) {
-            throw new RuntimeException("添加订单失败");
+            throw new RuntimeException("系统添加订单失败");
         }
         for (SalesOrderItem item : salesOrder.getSalesOrderItemList()) {
             item.setItemOrderId(salesOrder.getSalesId());
@@ -490,7 +493,7 @@ public class CustomerServiceImpl implements CustomerService {
         //批量添加订单项数据
         int itemNum = salesOrderMapper.addOrderItemList(salesOrder.getSalesOrderItemList());
         if (itemNum <= 0) {
-            throw new RuntimeException("添加订单项失败");
+            throw new RuntimeException("系统添加订单项失败");
         }
 
         Map<String,Object> map = new HashMap<String,Object>();
@@ -601,7 +604,7 @@ public class CustomerServiceImpl implements CustomerService {
         order.setSalesOrderStatus(status); //换货状态
         Integer flag = salesOrderMapper.updateSalesOrder(order);
         if(flag < 0){
-            throw new RuntimeException("生成退单失败");
+            throw new RuntimeException("系统生成退单失败");
         }
         EfastOrder efastOrder = new EfastOrder();
         List<EfastOrderItem> itemList = new ArrayList<>();
@@ -625,20 +628,24 @@ public class CustomerServiceImpl implements CustomerService {
         try{
             jsonObject = efastOrderService.returnOrderFormEfast(efastOrder);
             logger.info("------将原订单生成退货订单返回数据:" + jsonObject + "------");
-            if(jsonObject != null){
-                JSONObject  respData = JSONObject.fromObject(jsonObject.get("resp_data"));
-                if(respData != null ){
-                    String returnSn =  respData.getString("return_sn");
-                    if(returnSn != null || !"".equals(returnSn)){
+            fg = true;
+            /*if(jsonObject != null){
+                Object obj;
+                obj = jsonObject.get("return_sn");
+                if(obj != null && !"".equals(obj)){
+                    fg = true;
+                }else{
+                    obj = jsonObject.get("msg");
+                    if("系统订单 已作废".equals(obj)){
                         fg = true;
                     }
                 }
-            }
+            }*/
         }catch (Exception e){
             logger.info("------将原订单生成退货订单报错------");
         }
         if(!fg){
-            throw new RuntimeException("生成退单失败");
+            throw new RuntimeException("Efast生成退单失败");
         }
     }
 

+ 3 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml

@@ -62,6 +62,9 @@
       <if test="salesStatus !=null and salesStatus !=''">
         AND sales_status = #{salesStatus}
       </if>
+      <if test="salesOrderStatus !=null and salesOrderStatus !=''">
+        AND sales_order_status = #{salesOrderStatus}
+      </if>
       <if test="salesStoreId !=null and salesStoreId !=''">
         AND sales_store_id = #{salesStoreId}
       </if>

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/util/SmsConfig.java

@@ -49,6 +49,13 @@ public class SmsConfig {
     /* 发送发货提醒  -- 优尼雅 */
     public static String RELATION_SEND_YULIA="";
 
+    /* 添加客诉成功提醒  -- 美国watero */
+    public static String ADD_CUSTOMER_SUCCESS_WATERO="";
+    /* 添加客诉成功提醒  -- 上朵 */
+    public static String ADD_CUSTOMER_SUCCESS_SHANGDUO="";
+    /* 添加客诉成功提醒  -- 优尼雅 */
+    public static String ADD_CUSTOMER_SUCCESS_YULIA="";
+
 
 
 
@@ -81,6 +88,9 @@ public class SmsConfig {
             RELATION_SEND_WATERO=pro.getProperty("RELATION_SEND_WATERO");
             RELATION_SEND_SHANGDUO=pro.getProperty("RELATION_SEND_SHANGDUO");
             RELATION_SEND_YULIA=pro.getProperty("RELATION_SEND_YULIA");
+            ADD_CUSTOMER_SUCCESS_WATERO=pro.getProperty("ADD_CUSTOMER_SUCCESS_WATERO");
+            ADD_CUSTOMER_SUCCESS_SHANGDUO=pro.getProperty("ADD_CUSTOMER_SUCCESS_SHANGDUO");
+            ADD_CUSTOMER_SUCCESS_YULIA=pro.getProperty("ADD_CUSTOMER_SUCCESS_YULIA");
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 116 - 46
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1,7 +1,9 @@
 package com.iamberry.rst.controllers.cm;
 
 import com.iamberry.rst.core.cm.*;
-import com.iamberry.rst.core.order.*;
+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.cm.*;
@@ -9,7 +11,6 @@ import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.sms.SmsService;
 import com.iamberry.rst.faces.sys.SysService;
-import com.iamberry.rst.service.cm.mapper.SalesOrderMapper;
 import com.iamberry.rst.util.SmsConfig;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.OrderNoUtil;
@@ -28,9 +29,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
+
 import javax.servlet.http.HttpServletRequest;
 import java.text.MessageFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Created by wxm
@@ -79,7 +84,6 @@ public class AdminCustomerController {
     private SmsService smsService;
 
 
-
     private Object lock = new Object();
 
 
@@ -162,17 +166,17 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:add:customer")
     @RequestMapping(value = "/add_order_info")
-    public ResponseJson addOrderInfo(HttpServletRequest request,SalesOrder salesOrder,String itemJson)throws Exception {
+    public ResponseJson addOrderInfo(HttpServletRequest request, SalesOrder salesOrder, String itemJson) throws Exception {
 
         List<SalesOrderItem> list = new ArrayList<>();
         JSONArray jsonArray = JSONArray.fromObject(itemJson);
         list = (List) JSONArray.toCollection(jsonArray, SalesOrderItem.class);
 
-        Integer salesAmount  = 0;
+        Integer salesAmount = 0;
 
-        for(int i=0;i<list.size();i++){
+        for (int i = 0; i < list.size(); i++) {
             SalesOrderItem salesOrderItem = list.get(i);
-            if(salesOrderItem.getItemIsSource() == 1){ //产品来源 1:产品颜色表,2:配件表
+            if (salesOrderItem.getItemIsSource() == 1) { //产品来源 1:产品颜色表,2:配件表
                 Product product = productService.getProductById(salesOrderItem.getItemProductId());
                 ProductColor productColor = productService.getProduceColor(salesOrderItem.getItemProductId());
                 salesOrderItem.setItemProductType(product.getProductType());
@@ -184,9 +188,9 @@ public class AdminCustomerController {
                 salesOrderItem.setItemProductDiscount(productColor.getColorDiscount());
                 salesOrderItem.setItemIsSource(1);
                 salesAmount += productColor.getColorDiscount();
-            }else if(salesOrderItem.getItemIsSource() == 2){
+            } else if (salesOrderItem.getItemIsSource() == 2) {
                 Product product = productService.getProductById(salesOrderItem.getItemProductId());
-                FittingsInfo fittingsInfo = fittingsInfoService.getFittingsById( salesOrderItem.getItemColorId());
+                FittingsInfo fittingsInfo = fittingsInfoService.getFittingsById(salesOrderItem.getItemColorId());
                 salesOrderItem.setItemProductType(product.getProductType());
                 salesOrderItem.setItemProductName(product.getProductName());
                 salesOrderItem.setItemProductColor(fittingsInfo.getFittingsName());
@@ -231,14 +235,18 @@ public class AdminCustomerController {
         //salesOrder = salesOrderService.addOrderAndIteminfo(salesOrder,list);
         salesOrder.setSalesOrderItemList(list);
 
-        Map<String,Object>  map = customerService.sendEfastOrder(salesOrder);
-        if(map.get("status") == 1){
-            salesOrder.setSalesOrderId((String) map.get("EfastOrderId"));
-        }else{
-            return new ResponseJson(500, "添加订单失败!", 500);
+        try {
+            Map<String, Object> map = customerService.sendEfastOrder(salesOrder);
+            if (map.get("status") == 1) {
+                salesOrder.setSalesOrderId((String) map.get("EfastOrderId"));
+            } else {
+                return new ResponseJson(500, "添加订单失败!", 500);
+            }
+        } catch (RuntimeException e) {
+            return new ResponseJson(500, e.getMessage(), 500);
         }
 
-        Integer orderId =salesOrder.getSalesId();
+        Integer orderId = salesOrder.getSalesId();
         ResponseJson rj = new ResponseJson(200, "添加成功", 200);
         rj.addResponseKeyValue("orderId", orderId);
         return rj;
@@ -332,7 +340,7 @@ public class AdminCustomerController {
 
         //获取登录人id
         Integer loginAdminId = AdminUtils.getLoginAdminId();
-        mv.addObject("loginAdminId",loginAdminId);
+        mv.addObject("loginAdminId", loginAdminId);
         mv.addObject("typeList", typeList);
         mv.addObject("complaintTypeList", complaintTypeList);
         mv.addObject("adminList", adminList);
@@ -402,7 +410,7 @@ public class AdminCustomerController {
         List<Admin> adminList = sysService.listSelectAdmin(admin);
         //获取登录人id
         Integer loginAdminId = AdminUtils.getLoginAdminId();
-        mv.addObject("loginAdminId",loginAdminId);
+        mv.addObject("loginAdminId", loginAdminId);
         mv.addObject("customerId", customerId);
         mv.addObject("adminList", adminList);
         return mv;
@@ -579,10 +587,14 @@ public class AdminCustomerController {
                                     String sendProdcuesJson, String sendFittingsJson, String closedProdcuesJson, String closedFittingsJson) throws Exception {
         Integer flag = 0;
         JSONArray jsonArray;
-        List<SendProdcue> sendProdcueList ;
-        List<SendFitting> sendFittingList ;
-        List<ClosedProdcue> closedProdcueList ;
-        List<ClosedFitting> closedFittingList ;
+        List<SendProdcue> sendProdcueList;
+        List<SendFitting> sendFittingList;
+        List<ClosedProdcue> closedProdcueList;
+        List<ClosedFitting> closedFittingList;
+
+        Integer customerIsSolve = customerInfo.getCustomerIsSolve();    //处理类型
+        String phone = customerInfo.getCustomerTel();       //手机号码
+        Integer typeCompany = customerInfo.getTypeCompany();    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机
 
         jsonArray = JSONArray.fromObject(sendProdcuesJson);
         sendProdcueList = (List) JSONArray.toCollection(jsonArray, SendProdcue.class);
@@ -603,22 +615,69 @@ public class AdminCustomerController {
 
         customerInfo.setCustomerCommon(customerCommon);
         String orderId = "";
-        if(customerInfo.getCustomerIsSolve() == 3  || customerInfo.getCustomerIsSolve() == 4 || customerInfo.getCustomerIsSolve() == 5 ){
+        if (customerInfo.getCustomerIsSolve() == 3 || customerInfo.getCustomerIsSolve() == 4 || customerInfo.getCustomerIsSolve() == 5) {
             Integer adminId = AdminUtils.getLoginAdminId();
             orderId = OrderNoUtil.createOrderCode(adminId);
         }
         customerInfo.setTransactionNumber(orderId);
 
-        try{
+        try {
             flag = customerService.saveCustomerInfo(customerInfo, salesOrder);
-        }catch (RuntimeException e){
+        } catch (RuntimeException e) {
             return new ResponseJson(500, e.getMessage(), 500);
         }
         if (flag < 1) {
             return new ResponseJson(500, "添加客诉失败!", 500);
-        } else {
-            return new ResponseJson(200, "添加客诉成功!", 200);
         }
+
+        //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
+        if (customerIsSolve == 3 || customerIsSolve == 4 || customerIsSolve == 5 || customerIsSolve == 6 || customerIsSolve == 7) {
+            String solveMsg = "";
+            switch (customerIsSolve) {
+                case 3:
+                    solveMsg = "为您更换新机";
+                    break;
+                case 4:
+                    solveMsg = "为您维修机器";
+                    break;
+                case 5:
+                    solveMsg = "为您补发产品";
+                    break;
+                case 6:
+                    solveMsg = "为您办理退货";
+                    break;
+                case 7:
+                    solveMsg = "为您办理退货";
+                    break;
+            }
+
+            String addCustomerSuccessMsg = "";
+            String typeMsg = "";
+            switch (typeCompany) {
+                case 1:
+                    addCustomerSuccessMsg = SmsConfig.ADD_CUSTOMER_SUCCESS_WATERO;
+                    typeMsg = "美国WaterO售后";
+                    break;
+                case 2:
+                    addCustomerSuccessMsg = SmsConfig.ADD_CUSTOMER_SUCCESS_SHANGDUO;
+                    typeMsg = "上朵售后";
+                    break;
+                case 3:
+                    addCustomerSuccessMsg = SmsConfig.ADD_CUSTOMER_SUCCESS_YULIA;
+                    typeMsg = "YULIA售后";
+                    break;
+            }
+
+            Object [] msg = new Object[]{solveMsg,typeMsg};
+            String text = MessageFormat.format(addCustomerSuccessMsg, msg);
+            logger.info("添加客诉成功后,给 "+ phone +" 手机用户发送短信:" + text );
+            String result = smsService.sendOtherCMS(phone, text);
+
+            if (!"SUCCESS".equals(result)) {
+                return new ResponseJson(500, "添加客诉发送短信失败,失败原因:" + result, 500);
+            }
+        }
+        return new ResponseJson(200, "添加客诉成功!", 200);
     }
 
     /**
@@ -644,29 +703,29 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:add:customer")
     @RequestMapping("/send_phone_sms")
-    public ResponseJson sendPhoneSms(HttpServletRequest request,String type,String phone,Integer typeCompany,ComplaintQuestionInfo complaintQuestionInfo) throws Exception {
+    public ResponseJson sendPhoneSms(HttpServletRequest request, String type, String phone, Integer typeCompany, ComplaintQuestionInfo complaintQuestionInfo) throws Exception {
         String url = NameUtils.getConfig("website");
         Integer flag = 1;
 
-        if(typeCompany == null || typeCompany == 0){
+        if (typeCompany == null || typeCompany == 0) {
             return new ResponseJson(500, "未获取到产品类型!", 500);
         }
         String con = "";
-        if(type != null && !"".equals(type)){
-            if( "p".equals(type)){ //problem" 问题处理;  mailAddress:邮寄地址;
-                if(complaintQuestionInfo.getQuestionId() == null || "".equals(complaintQuestionInfo.getQuestionId())){
+        if (type != null && !"".equals(type)) {
+            if ("p".equals(type)) { //problem" 问题处理;  mailAddress:邮寄地址;
+                if (complaintQuestionInfo.getQuestionId() == null || "".equals(complaintQuestionInfo.getQuestionId())) {
                     complaintQuestionInfo.setQuestionState(1);
                     complaintQuestionInfo.setQuestionIsQcDetect(0);
-                    complaintQuestionInfo =  complaintQuestionInfoService.insertBackInfo(complaintQuestionInfo);
-                }else{
+                    complaintQuestionInfo = complaintQuestionInfoService.insertBackInfo(complaintQuestionInfo);
+                } else {
                     complaintQuestionInfo.setSmallClassId(null);    //不能修改小类类型
-                    flag =  complaintQuestionInfoService.updateQuestionById(complaintQuestionInfo);
+                    flag = complaintQuestionInfoService.updateQuestionById(complaintQuestionInfo);
                     if (flag < 1) {
                         return new ResponseJson(500, "问题修改失败!", 500);
                     }
                 }
-                url += "/"+complaintQuestionInfo.getQuestionId();
-                switch (typeCompany){
+                url += "/" + complaintQuestionInfo.getQuestionId();
+                switch (typeCompany) {
                     case 1:
                         con = SmsConfig.SEND_PRODUCT_SEND_WATERO;
                         break;
@@ -677,15 +736,15 @@ public class AdminCustomerController {
                         con = SmsConfig.SEND_PRODUCT_SEND_YULIA;
                         break;
                 }
-            }else if( "m".equals(type)){
+            } else if ("m".equals(type)) {
 
-                if(complaintQuestionInfo.getQuestionId() == null){
+                if (complaintQuestionInfo.getQuestionId() == null) {
                     return new ResponseJson(500, "未获取到邮寄信息!", 500);
                 }
                 complaintQuestionInfo.setQuestionName(null);
                 complaintQuestionInfo.setSmallClassId(null);
                 url += "/5";
-                switch (typeCompany){
+                switch (typeCompany) {
                     case 1:
                         con = SmsConfig.SEND_PRODUCT_SMS_WATERO;
                         break;
@@ -700,18 +759,19 @@ public class AdminCustomerController {
         }
 
         String text = MessageFormat.format(con, url);
-        logger.info("给 "+ phone +" 手机用户发送短信:" + text );
+        logger.info("给 " + phone + " 手机用户发送短信:" + text);
         String result = smsService.sendOtherCMS(phone, text);
 
-        if("SUCCESS".equals(result)){
-            return new ResponseJson(200, "发送短信成功", 200);
-        }else{
+        if ("SUCCESS".equals(result)) {
+            return new ResponseJson(200, "发送短信成功!", 200);
+        } else {
             return new ResponseJson(500, "发送短信失败,失败原因:" + result, 500);
         }
     }
 
     /**
      * 进入回访完成页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -753,6 +813,7 @@ public class AdminCustomerController {
 
     /**
      * 进入回访信息详情
+     *
      * @param request
      * @return
      * @throws Exception
@@ -795,6 +856,7 @@ public class AdminCustomerController {
 
     /**
      * 进入问题描述页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -837,6 +899,7 @@ public class AdminCustomerController {
 
     /**
      * 进入修改换新页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -916,6 +979,7 @@ public class AdminCustomerController {
 
     /**
      * 进入修改维修页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -1008,7 +1072,7 @@ public class AdminCustomerController {
         }*/
 
         //修改维修信息
-        int num = repairService.updateRepairInfo(repair,closedProducts,closedFittings);
+        int num = repairService.updateRepairInfo(repair, closedProducts, closedFittings);
         if (num > 0) {
             return new ResponseJson(200, "修改成功!", 200);
         } else {
@@ -1018,6 +1082,7 @@ public class AdminCustomerController {
 
     /**
      * 进入修改退货页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -1090,6 +1155,7 @@ public class AdminCustomerController {
 
     /**
      * 进入修改补寄页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -1105,6 +1171,7 @@ public class AdminCustomerController {
 
     /**
      * 进入修改补寄信息页面
+     *
      * @param request
      * @return
      */
@@ -1171,6 +1238,7 @@ public class AdminCustomerController {
 
     /**
      * 进入修改退货页面
+     *
      * @param request
      * @return
      * @throws Exception
@@ -1186,6 +1254,7 @@ public class AdminCustomerController {
 
     /**
      * 获取无理由退货信息
+     *
      * @param request
      * @return
      * @throws Exception
@@ -1242,6 +1311,7 @@ public class AdminCustomerController {
 
     /**
      * 同步百胜订单
+     *
      * @return
      * @throws Exception
      */
@@ -1251,7 +1321,7 @@ public class AdminCustomerController {
     public ResponseJson syncEfastOrder() throws Exception {
         int pageNo = 1;
         int pageSize = 20;
-        boolean flag = false;	//控制是否还需要获取百胜订单信息
+        boolean flag = false;    //控制是否还需要获取百胜订单信息
         String date = "";
         synchronized (lock) {
             //根据时间排序查询订单信息

+ 4 - 0
watero-rst-web/src/main/resources/platform.properties

@@ -51,6 +51,10 @@ RELATION_SEND_WATERO=\u3010\u7F8E\u56FDWaterO\u3011\u5C0A\u656C\u7684\u5BA2\u623
 RELATION_SEND_SHANGDUO=\u3010\u4E0A\u6735\u5FAE\u5546\u57CE\u3011\u5C0A\u656C\u7684\u5BA2\u6237\uFF0C\u60A8\u7533\u8BF7\u7684{0}\u5DF2\u5904\u7406\u53D1\u8D27\uFF0C\u7269\u6D41\u4FE1\u606F\uFF1A{1}\u3002
 RELATION_SEND_YULIA=\u3010YULIA\u51C0\u6C34\u673A\u3011\u5C0A\u656C\u7684\u5BA2\u6237\uFF0C\u60A8\u7533\u8BF7\u7684{0}\u5DF2\u5904\u7406\u53D1\u8D27\uFF0C\u7269\u6D41\u4FE1\u606F\uFF1A{1}\u3002
 
+ADD_CUSTOMER_SUCCESS_WATERO=\u3010\u7f8e\u56fd\u0057\u0061\u0074\u0065\u0072\u004f\u3011\u5c0a\u656c\u7684\u5ba2\u6237\u60a8\u597d\uff0c\u5df2\u6536\u5230\u60a8\u7684\u552e\u540e\u7533\u8bf7\uff0c\u6211\u4eec\u6b63\u79ef\u6781\u5904\u7406\uff0c\u5904\u7406\u65b9\u5f0f\u4e3a\uff1a{0}\uff0c\u795d\u60a8\u751f\u6d3b\u6109\u5feb\uff08{1}\uff09
+ADD_CUSTOMER_SUCCESS_SHANGDUO=\u3010\u4e0a\u6735\u5fae\u5546\u57ce\u3011\u5c0a\u656c\u7684\u5ba2\u6237\u60a8\u597d\uff0c\u5df2\u6536\u5230\u60a8\u7684\u552e\u540e\u7533\u8bf7\uff0c\u6211\u4eec\u6b63\u79ef\u6781\u5904\u7406\uff0c\u5904\u7406\u65b9\u5f0f\u4e3a\uff1a{0}\uff0c\u795d\u60a8\u751f\u6d3b\u6109\u5feb\uff08{1}\uff09
+ADD_CUSTOMER_SUCCESS_YULIA=\u3010\u0059\u0055\u004c\u0049\u0041\u51c0\u6c34\u673a\u3011\u5c0a\u656c\u7684\u5ba2\u6237\u60a8\u597d\uff0c\u5df2\u6536\u5230\u60a8\u7684\u552e\u540e\u7533\u8bf7\uff0c\u6211\u4eec\u6b63\u79ef\u6781\u5904\u7406\uff0c\u5904\u7406\u65b9\u5f0f\u4e3a\uff1a{0}\uff0c\u795d\u60a8\u751f\u6d3b\u6109\u5feb\uff08{1}\uff09
+
 #---SMS end---#
 #weixin
 # pubNo

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

@@ -102,7 +102,7 @@
                     <div class="radio-box">
                         <input type="radio" id="tel-3" name="customerSourceType" value="3">
                         <label for="tel-3">其他</label>
-                        <input type="text" style="width: 321px;margin-left: 10px;" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
+                        <input type="text" style="width: 321px;margin-left: 10px; display: none;" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
                         <input type="hidden" value="" placeholder="" id="customerSource" name="customerSource">
                     </div>
                 </div>
@@ -123,6 +123,7 @@
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
+                <input type="hidden" id="typeCompany" name="typeCompany" value="">
                 <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
                     <#--<div class="radio-box">
                         <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
@@ -139,6 +140,7 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>客诉问题:</label>
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">
 				<select name="complaintId" class="select">
+                    <option value="">请选择问题分类</option>
 					<#--<option value="0">使用操作</option>-->
 					<#--<option value="1">使用操作</option>-->
 				</select>
@@ -146,6 +148,7 @@
                 </div>
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">
 				<select name="smallClassId" id="smallClassId" class="select">
+                    <option value="">请选择问题分类</option>
 					<#--<option value="0">使用操作制水出水</option>
 					<option value="1">使用操作制水出水</option>-->
 				</select>
@@ -161,6 +164,7 @@
                     <div class="tag">
                         <em></em>
                         <strong>相关QA</strong>
+                        <a href="javascript:void(0)" style="margin-left: 200px;" onclick="closeQA()">关闭</a>
                         <ul id="question">
                             <#--<li class="ask">1、净水机面板操作不灵敏,是怎么回事?</li>
                             <li class="answer">答:<span>4净水机面板操作不灵敏,是怎么回事。1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?1、净水机面板操作不灵敏,是怎么回事?</span></li>-->
@@ -192,7 +196,7 @@
                     <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="p-phone" name="">
                 </div>
                 <div class="formControls col-2 col-sm-2" style="width: 10%">
-                    <input type="button" class="btn btn-primary" value="发短信用户" onclick="sendPhone('p','p-msg');">
+                    <input type="button" class="btn btn-primary" value="发短信用户" onclick="sendPhone('p','p-msg');">
                 </div>
                 <div class="formControls col-2 col-sm-2" style="width: 10%">
                     <input type="button" class="btn btn-primary" value="保存QA" onclick="saveQuestion();">
@@ -291,8 +295,14 @@
                     <input type="hidden" id="orderId" name="salesId" value="" >
                 </div>
             </div>
-            <div class="row cl" id="recipientInfo" style="display: none;">
+
+            <div class="row cl" id="recipientInfoTitle" style="display: none;">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>收件信息:</label>
+                <div class="formControls col-8 col-sm-8">请先选择订单,系统自动填充姓名,电话和地址信息。</div>
+            </div>
+
+            <div class="row cl" id="recipientInfo" style="display: none;">
+                <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2">
                     <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="s1-20" errormsg="联系人格式不正确!" >
                 </div>
@@ -300,7 +310,7 @@
                     <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
                 </div>
                 <div class="formControls col-2 col-sm-2"  id="postageAccount">
-                    <input type="text" class="input-text" value="" placeholder="邮费转账账户" id="relationAlipay" name="relationAlipay" errormsg="邮费转账账户!">
+                    <input type="text" class="input-text" value="" placeholder="邮费转账 支付宝账户" id="relationAlipay" name="relationAlipay" errormsg="邮费转账账户!">
                 </div>
             </div>
             <div class="row cl" id="recipientAddress" style="display: none;">
@@ -361,22 +371,22 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>TDS收集:</label>
                 <div class="formControls col-2 col-sm-2" style="position: relative;">
                     <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
-                    <input style="width: 140px;" placeholder="" class="input-text my-search-input" type="text" name="arrcity" id="arrcity" />
+                    <input style="width: 140px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
                     <div id="suggest" class="ac_results"></div>
                 </div>
                 <div class="formControls col-2 col-sm-2">
 				<span class="select-box">
                     <select name="" class="select" id="TDSArea" name="TDSArea">
-
+                        <option value="">请搜索城市</option>
                     </select>
 				</span>
                 </div>
                 <input type="hidden" name="customerArea" id="customerArea">
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="进水TDS数值" id="customerInTDS" name="customerInTDS" onkeyup="keyFun($(this))" onpaste="keyFun($(this))">
+                    <input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
                 </div>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="出水TDS数值" id="customerOutTDS" name="customerOutTDS" onkeyup="keyFun($(this))" onpaste="keyFun($(this))">
+                    <input type="text" class="input-text" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
                 </div>
             </div>
             <div class="row cl" id="TDScollectShow" style="display: none;">
@@ -399,7 +409,7 @@
                     <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="m-phone" name="">
                 </div>
                 <div class="formControls col-2 col-sm-2" style="width: 10%">
-                    <input type="button" class="btn btn-primary" value="发短信用户" onclick="sendPhone('m','m-msg');">
+                    <input type="button" class="btn btn-primary" value="发短信用户" onclick="sendPhone('m','m-msg');">
                 </div>
                 <div class="formControls col-2 col-sm-2 msg-phone">
                     <div id="m-msg" style="color: #e00"></div>
@@ -656,19 +666,22 @@
         toolbars: [tool],
         autoHeightEnabled: true,
         autoFloatEnabled: true,
+        elementPathEnabled : false,/*去掉元素路径*/
         zIndex : 5
     });
     /*处理描述*/
     var describeHandleDescText = UE.getEditor('describeHandleDescText', {
         toolbars: [tool],
         autoHeightEnabled: true,
-        autoFloatEnabled: true
+        autoFloatEnabled: true,
+        elementPathEnabled : false  /*去掉元素路径*/
     });
     /*邮寄地址*/
     var sendAddressSms = UE.getEditor('sendAddressSms', {
         toolbars: [tool],
         autoHeightEnabled: true,
-        autoFloatEnabled: true
+        autoFloatEnabled: true,
+        elementPathEnabled : false  /*去掉元素路径*/
     });
 
     sendAddressSms.ready(function() {
@@ -724,6 +737,16 @@
         /*初始化选择处理结果 -- type : 1 :已解决  2:未解决  3:换新  4:维修  5:补发   6:退货  7:无理由退货 */
         initProcessResult(1);
 
+        /*监听来源入口选择事件*/
+        $("input[name='customerSourceType']").change(function (){
+            var type = parseInt($(this).val());
+            if(type == 3){
+                $("#customerSourceOld").show();
+            }else{
+                $("#customerSourceOld").hide();
+            }
+        })
+
         /*监听客诉类型选择事件*/
         $("input[name='customerCounselType']").change(function (){
             allCustomerInfoType = parseInt($(this).val());
@@ -805,6 +828,7 @@
 
     })
 
+    /*用于初始化回访信息的展示*/
     function initVisitEvent(){
         $("input[name='customerIsVisit']").change(function (){
             if($(this).val() == 2){
@@ -815,6 +839,11 @@
         })
     }
 
+    /*关闭qa*/
+    function closeQA(){
+        $(".dalog-ask").hide(); //隐藏qa
+    }
+
     /*初始化单选框样式*/
     function initCheck(){
         $('.skin-minimal input').iCheck({
@@ -1030,6 +1059,7 @@
                     $("#orderHead").show();
                     $("#order").show();
                     $("#recipientInfo").show();
+                    $("#recipientInfoTitle").show();
                     $("#recipientAddress").show();
                     $("#recipientAddressText").show();
                     $("#renewedProduct").show();
@@ -1048,6 +1078,7 @@
                     $("#orderHead").show();
                     $("#order").show();
                     $("#recipientInfo").show();
+                    $("#recipientInfoTitle").show();
                     $("#recipientAddress").show();
                     $("#recipientAddressText").show();
                     $("#renewedProduct").show();
@@ -1066,6 +1097,7 @@
                     $("#orderHead").show();
                     $("#order").show();
                     $("#recipientInfo").show();
+                    $("#recipientInfoTitle").show();
                     $("#recipientAddress").show();
                     $("#recipientAddressText").show();
                     $("#renewedProduct").show();
@@ -1084,6 +1116,7 @@
                     $("#orderHead").show();
                     $("#order").show();
                     $("#recipientInfo").show();
+                    $("#recipientInfoTitle").show();
                     $("#recipientAddress").show();
                     $("#recipientAddressText").show();
                     $("#renewedProduct").show();
@@ -1102,6 +1135,7 @@
                     $("#orderHead").show();
                     $("#order").show();
                     $("#recipientInfo").show();
+                    $("#recipientInfoTitle").show();
                     $("#recipientAddress").show();
                     $("#recipientAddressText").show();
                     $("#renewedProduct").show();
@@ -1131,6 +1165,7 @@
         $("#orderHead").hide();
         $("#order").hide();
         $("#recipientInfo").hide();
+        $("#recipientInfoTitle").hide();
         $("#recipientAddress").hide();
         $("#recipientAddressText").hide();
         $("#renewedProduct").hide();
@@ -1244,7 +1279,7 @@
                                     '<li class="answer" style="height: 65px;overflow: hidden;">答:<span>'+ complaintQuestion.questionProfile +'</span><input class="quesId" type="hidden" value="'+ complaintQuestion.questionId +'"></li>';
                         }
                     }else{
-                        html = '';
+                        html = '<span style="font-size: 12px; margin-top: 10px; display: block;">未搜索到QA信息,请更换关键字或者直接录入到系统!</span>';
                     }
                     $("#question").html(html);
                     $(".dalog-ask").show();
@@ -1286,12 +1321,17 @@
             smallClassId = $("#smallClassId").val();
             if(smallClassId == null || smallClassId == "" ){
                 layer.close(index);
-                layer.msg("请选择问题分类", {icon: 5, time: 3000});
+                layer.msg("请选择问题分类!", {icon: 5, time: 3000});
+                return false;
+            }
+            if(describeTitle==null || describeTitle == ""){
+                layer.close(index);
+                layer.msg("请填写问题标题!", {icon: 5, time: 3000});
                 return false;
             }
-            if(desc == null || desc == "" || describeTitle==null || describeTitle == ""){
+            if(desc == null || desc == ""){
                 layer.close(index);
-                layer.msg("信息不全,无法发送短信", {icon: 5, time: 3000});
+                layer.msg("请填写问题内容!", {icon: 5, time: 3000});
                 return false;
             }
         }else if(type == "m"){
@@ -1299,21 +1339,21 @@
             questionId = complaint_questionId;
             desc = UE.getEditor('sendAddressSms').getContent();
 
-            if(desc == null || desc == "" || questionId==null || questionId == ""){
+            if(desc == null || desc == ""){
                 layer.close(index);
-                layer.msg("信息不全,无法发送短信", {icon: 5, time: 3000});
+                layer.msg("请填写邮寄信息内容!", {icon: 5, time: 3000});
                 return false;
             }
         }else{
             layer.close(index);
-            layer.msg("发送报错", {icon: 5, time: 3000});
+            layer.msg("发送报错", {icon: 5, time: 3000});
             return false;
         }
 
         var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
         if(!reg.test(phone)){
             layer.close(index);
-            layer.msg("手机号码格式不正确", {icon: 5, time: 3000});
+            layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
             return false;
         }
 
@@ -1348,9 +1388,9 @@
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){
                 if(type == "p"){
-                    $("#p-msg").html("发送短信失败");
+                    $("#p-msg").html("发送短信失败!");
                 }else  if(type == "m"){
-                    $("#m-msg").html("发送短信失败");
+                    $("#m-msg").html("发送短信失败!");
                 }
                 layer.close(index);
             }
@@ -1373,17 +1413,17 @@
         smallClassId = $("#smallClassId").val();
         if((smallClassId == null || smallClassId == "") && (questionId == null || questionId == "") ){
             layer.close(index);
-            layer.msg("请选择问题分类", {icon: 5, time: 3000});
+            layer.msg("请选择问题分类!", {icon: 5, time: 3000});
             return false;
         }
         if(describeTitle==null || describeTitle == ""){
             layer.close(index);
-            layer.msg("请填写问题标题", {icon: 5, time: 3000});
+            layer.msg("请填写问题标题!", {icon: 5, time: 3000});
             return false;
         }
         if(desc == null || desc == ""){
             layer.close(index);
-            layer.msg("请填写问题内容", {icon: 5, time: 3000});
+            layer.msg("请填写问题内容!", {icon: 5, time: 3000});
             return false;
         }
 
@@ -1861,16 +1901,9 @@
                             location.href = "${path}/admin/customer/select_customer_list";
                         } else {
                             layer.close(index);
-                            layer.msg(data.resultMsg, {icon: 5, time: 3000});
                         }
-                        return ;
                     });
                 }
-            },
-            ajaxurl:function (data) {
-                if (data) {
-
-                }
             }
         });
     })
@@ -1878,6 +1911,7 @@
     /* 添加客诉的准备 */
     function addCustomerReady(){
 
+        /*验证来源入口*/
         var customerSourceType = $("input:radio[name='customerSourceType']:checked").val();
         if(customerSourceType == 3){
             var customerSourceOld = $("#customerSourceOld").val();
@@ -1891,6 +1925,10 @@
             }
         }
 
+        /*根据产品类型,获取来源商城*/
+        var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
+        $("#typeCompany").val(typeCompany);
+
         /*----TDS收集模块--start-----*/
         var valicity = $(".ac_result_tip").html();
         if(valicity == null || valicity == "" || typeof(valicity)=="undefined"){

+ 22 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl

@@ -52,6 +52,8 @@
             height: 35px;
             line-height: 35px;
         }
+        .select-order{text-decoration:none;color: #32A3D8;}
+        .select-order:hover{text-decoration:underline;}
     </style>
 </head>
 <body>
@@ -82,7 +84,7 @@
                         </span>
                     </div>
                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;"> <span class="select-box">
-                        <select name="" class="select" id="storeId">
+                        <select name="salesOrderStatus" class="select" id="salesOrderStatus">
                             <option value="">所有类型</option>
                             <option value="1">正常</option>
                             <option value="2">换货</option>
@@ -116,9 +118,14 @@
                          <input type="text" class="input-text" value="" placeholder="收货人电话" id="salesAddressTel" name="">
                      </div>
                      <div class="formControls col-1 col-sm-1" >
-                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name="">搜索</button>
+                     </div>
+
+                     <div class="formControls col-1 col-sm-1" >
+                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" onclick="addOrder()"> 添加订单</button>
                      </div>
 
+                     <#--<a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a>-->
                 </div>
 
             </form>
@@ -128,9 +135,10 @@
             <table class="table table-border table-bordered table-bg table-hover table-sort">
                 <thead>
                 <tr class="text-c">
-                    <th width="50">渠道商</th>
-                    <th width="60">订单编号</th>
-                    <th width="100">收货人姓名</th>
+                    <th width="50">销售公司</th>
+                    <th width="50">店铺名称</th>
+                    <th width="100">订单编号<span style="font-weight: normal;float: left;display: block;width: 100%;">(Efast交易号)</span></th>
+                    <th width="60">收货人姓名</th>
                     <th width="80">收货人电话</th>
                     <th width="80">订单金额</th>
                     <th width="80">购买产品</th>
@@ -142,7 +150,7 @@
                 <tbody id="orderAll">
 
                      <tr class="text-c">
-                         <td colspan="9">没有搜索到订单~  <a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a>
+                         <td colspan="10">请输入搜索条件,搜索订单~
                          </td>
                      </tr>
 
@@ -306,7 +314,7 @@
 
         var salesCompanyId = convertUndefinedToEmpty($("#companyId").val());
         var salesStoreId = convertUndefinedToEmpty($("#storeId").val());
-        var salesStatus = convertUndefinedToEmpty($("#salesStatus").val());
+        var salesOrderStatus = convertUndefinedToEmpty($("#salesOrderStatus").val());
         var salesId = convertUndefinedToEmpty($("#salesId").val());
         var salesAddressName =convertUndefinedToEmpty($("#salesAddressName").val());
         var salesAddressTel = convertUndefinedToEmpty($("#salesAddressTel").val());
@@ -315,7 +323,7 @@
             data: {
                 salesCompanyId : salesCompanyId,
                 salesStoreId : salesStoreId,
-                salesStatus : salesStatus,
+                salesOrderStatus : salesOrderStatus,
                 salesId : salesId,
                 salesAddressName : salesAddressName,
                 salesAddressTel : salesAddressTel
@@ -332,29 +340,25 @@
                         var salesOrderItem = salesOrder.salesOrderItemList
                         for(var j=0;j<salesOrderItem.length;j++){
                             var item = salesOrderItem[j].itemProductName + "*" + salesOrderItem[j].itemNum;
-                            if(j==0){
-                                productsHtml += item
-                            }else{
-                                productsHtml += '<br>'+ item
-                            }
+                                productsHtml += '<span class="label label-success radius">' + item + '</span>';
                         }
                         var time = formatDate(new Date(salesOrder.salesCreateTime),"yyyy-MM-dd");
                         html += '<tr class="text-c">' +
-                                ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'-'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
-                                ' <td>'+ salesOrder.salesId +'</td>' +
+                                ' <td>'+ convertUndefinedToEmpty(salesOrder.companyName) +'</td>' +
+                                ' <td>'+ convertUndefinedToEmpty(salesOrder.storeName) +'</td>' +
+                                ' <td>'+ salesOrder.salesDealCode +'</td>' +
                                 ' <td>'+ salesOrder.salesAddressName +'</td>' +
                                 ' <td>'+ salesOrder.salesAddressTel +'</td>' +
                                 ' <td>'+ salesOrder.salesAmount/100 +'</td>' +
                                 ' <td>'+ productsHtml +'</td>' +
                                 ' <td>'+ time +'</td>' +
                                 ' <td>'+ salesOrder.salesAddressInfo +'</td>' +
-                                ' <td><a style="text-decoration:none" href="javascript:void(0);" title="选择订单" onclick="selectOrderInfo('+ salesOrder.salesId +')" >选择订单</a></td>' +
+                                ' <td><a style="" class="select-order" href="javascript:void(0);" title="选择订单" onclick="selectOrderInfo('+ salesOrder.salesId +')" >选择订单</a></td>' +
                                 ' </tr>';
                     }
                 }else{
-                    html = "";
+                    html = '<tr class="text-c"><td colspan="10">没有搜索到订单,请点击“添加订单”按钮,添加订单。</td></tr>';
                 }
-                html += '<tr class="text-c"><td colspan="9">没有搜索到订单~  <a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a></td></tr>';
                 $("#orderAll").html(html);
                 layer.close(index);
             },

+ 2 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order.ftl

@@ -86,6 +86,8 @@
                             <option value="21">凯叔</option>
                             <option value="22">上海-崔玉涛育学园</option>
                             <option value="23">简二家</option>
+                            <option value="24">科学育儿</option>
+                            <option value="25">美康辰</option>
                         </select>
                     </label>
                 </td>

+ 12 - 2
watero-rst-web/src/main/webapp/common/js/common/common.js

@@ -144,12 +144,22 @@ function listDistrict(cityId,districtName){
 /**
  * 获取当前节点,将当前节点的val值除了数字其他的删掉
  * @param node
+ * @param maxNumber  最大值
+ * @param minNumber  最小值
  */
-function keyFun(node){
+function keyFun(node,maxNumber,minNumber){
     var c=$(node);
     var temp_amount=c.val().replace(/[^\d]/g,'');
-    $(node).val(Number(temp_amount));
+    var number  = Number(temp_amount)
+    if(maxNumber!= null && maxNumber!= "" && number > maxNumber){
+        number = maxNumber;
+    }
+    if(minNumber!= null && minNumber!= "" && number < minNumber){
+        number = minNumber;
+    }
+    $(node).val(number);
 }
+
 // var c=$(node);
 // if(/[^\d]/.test(c.val())){//替换非数字字符
 //     var temp_amount=c.val().replace(/[^\d]/g,'');