浏览代码

订单中心开发

wangxiaoming 6 年之前
父节点
当前提交
5bde1aca01
共有 16 个文件被更改,包括 219 次插入155 次删除
  1. 8 8
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java
  2. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/RelationOrder.java
  3. 33 31
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java
  4. 6 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerCommonServiceImpl.java
  5. 2 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  6. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/backGoodsMapper.xml
  7. 6 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerCommonMapper.xml
  8. 2 9
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  9. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/noreasonBackMapper.xml
  10. 6 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/relationOrderMapper.xml
  11. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml
  12. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml
  13. 80 50
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AppComplaintQuestionInfoController.java
  14. 24 18
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl
  15. 28 19
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl
  16. 10 10
      watero-rst-web/src/main/webapp/common/js/customer/customer.js

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

@@ -61,7 +61,7 @@ public class CustomerInfo  implements Serializable {
     private String customerSecondaryCustomer;
 
     //是否需要品检
-    private Integer isQuality;//1.需要品检2不需要品检
+//    private Integer isQuality;//1.需要品检2不需要品检        -- 删除
 
     //工厂id
     private Integer factoryId;
@@ -697,13 +697,13 @@ public class CustomerInfo  implements Serializable {
         this.customerInitialId = customerInitialId;
     }
 
-    public Integer getIsQuality() {
-        return isQuality;
-    }
-
-    public void setIsQuality(Integer isQuality) {
-        this.isQuality = isQuality;
-    }
+//    public Integer getIsQuality() {
+//        return isQuality;
+//    }
+//
+//    public void setIsQuality(Integer isQuality) {
+//        this.isQuality = isQuality;
+//    }
 
     public Integer getFactoryId() {
         return factoryId;

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/RelationOrder.java

@@ -16,6 +16,8 @@ public class RelationOrder  implements  Serializable{
     private Integer relationId;
     //订单号'
     private Integer salesId;
+    //客诉id
+    private Integer relationCustomerId;
 
     public Integer getRelationOrderId(){
         return relationOrderId;
@@ -48,4 +50,12 @@ public class RelationOrder  implements  Serializable{
     public void setSalesId(Integer  salesId){
         this.salesId=salesId;
     }
+
+    public Integer getRelationCustomerId() {
+        return relationCustomerId;
+    }
+
+    public void setRelationCustomerId(Integer relationCustomerId) {
+        this.relationCustomerId = relationCustomerId;
+    }
 }

+ 33 - 31
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java

@@ -121,37 +121,39 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
             if(msg != 1){
                 return 0;
             }
-            if(customerInfo.getIsQuality() != null){
-                if(customerInfo.getIsQuality() == 1){//需要品检
-                    //根据客诉id查询是否已存在品检信息
-                    ComplaintDetectInfo complaintDetectInfo = new ComplaintDetectInfo();
-                    if(complaintDetectInfoMapper.getDetectByCustomerId(customerInfo.getCustomerId()) == null){
-                        complaintDetectInfo.setCustomerId(customerInfo.getCustomerId());
-                        complaintDetectInfo.setSignclosedId(record.getSignclosedId());
-                        complaintDetectInfo.setDetectCreateTime(new Date());
-                        Integer msg2 = complaintDetectInfoMapper.insert(complaintDetectInfo);
-                        if(msg2 != 1){
-                            return 0;
-                        }
-                    }
-                    //添加品检项
-                    /*List<SignclosedProductInfo> listProductInfo = complaintSignclosedInfoMapper.listSignclosedById(record.getSignclosedId());
-                    List<ComplaintDetectItem> listDetectItem = new ArrayList<>();
-                    for(SignclosedProductInfo productInfo : listProductInfo){
-                        ComplaintDetectItem detectItem = new ComplaintDetectItem();
-                        detectItem.setDetectId(complaintDetectInfo.getDetectId());
-                        detectItem.setDetectItemCreateTime(new Date());
-                        detectItem.setProductId(productInfo.getProductId());
-                        detectItem.setDetectProductNumber(productInfo.getProductNumber());
-                        detectItem.setDetectItemState(1);
-                        listDetectItem.add(detectItem);
-                    }
-                    Integer msg3 =  complaintDetectInfoMapper.insertItemList(listDetectItem);
-                    if(msg3 != 1){
-                        return 0;
-                    }*/
-                }
-            }
+
+//            if(customerInfo.getIsQuality() != null){
+//                if(customerInfo.getIsQuality() == 1){//需要品检
+//                    //根据客诉id查询是否已存在品检信息
+//                    ComplaintDetectInfo complaintDetectInfo = new ComplaintDetectInfo();
+//                    if(complaintDetectInfoMapper.getDetectByCustomerId(customerInfo.getCustomerId()) == null){
+//                        complaintDetectInfo.setCustomerId(customerInfo.getCustomerId());
+//                        complaintDetectInfo.setSignclosedId(record.getSignclosedId());
+//                        complaintDetectInfo.setDetectCreateTime(new Date());
+//                        Integer msg2 = complaintDetectInfoMapper.insert(complaintDetectInfo);
+//                        if(msg2 != 1){
+//                            return 0;
+//                        }
+//                    }
+//                    //添加品检项
+//                    /*List<SignclosedProductInfo> listProductInfo = complaintSignclosedInfoMapper.listSignclosedById(record.getSignclosedId());
+//                    List<ComplaintDetectItem> listDetectItem = new ArrayList<>();
+//                    for(SignclosedProductInfo productInfo : listProductInfo){
+//                        ComplaintDetectItem detectItem = new ComplaintDetectItem();
+//                        detectItem.setDetectId(complaintDetectInfo.getDetectId());
+//                        detectItem.setDetectItemCreateTime(new Date());
+//                        detectItem.setProductId(productInfo.getProductId());
+//                        detectItem.setDetectProductNumber(productInfo.getProductNumber());
+//                        detectItem.setDetectItemState(1);
+//                        listDetectItem.add(detectItem);
+//                    }
+//                    Integer msg3 =  complaintDetectInfoMapper.insertItemList(listDetectItem);
+//                    if(msg3 != 1){
+//                        return 0;
+//                    }*/
+//                }
+//            }
+
         }
         return 1;
     }

+ 6 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerCommonServiceImpl.java

@@ -83,10 +83,12 @@ public class CustomerCommonServiceImpl implements CustomerCommonService {
             List<SalesOrder> orderList = new ArrayList<>();
             for (RelationOrder ro : relationOrderList) {
                 SalesOrder salesOrder = salesOrderMapper.getSalesOrderById(ro.getSalesId());
-                SalesOrderItem salesOrderItem = new SalesOrderItem();
-                salesOrderItem.setItemOrderId(salesOrder.getSalesId());
-                salesOrder.setSalesOrderItemList(salesOrderMapper.listSalesOrderItem(salesOrderItem));
-                orderList.add(salesOrder);
+                if(salesOrder != null ){
+                    SalesOrderItem salesOrderItem = new SalesOrderItem();
+                    salesOrderItem.setItemOrderId(salesOrder.getSalesId());
+                    salesOrder.setSalesOrderItemList(salesOrderMapper.listSalesOrderItem(salesOrderItem));
+                    orderList.add(salesOrder);
+                }
             }
             c.setSalesOrderList(orderList);
         }

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

@@ -275,6 +275,7 @@ public class CustomerServiceImpl implements CustomerService {
                 ro.setRelationType(customerInfo.getCustomerIsSolve());
                 ro.setRelationId(relationId);
                 ro.setSalesId(sor.getSalesId());
+                ro.setRelationCustomerId(customerInfo.getCustomerId());
                 relationOrderList.add(ro);
             }
             if(relationOrderList != null && relationOrderList.size() > 0){
@@ -523,6 +524,7 @@ public class CustomerServiceImpl implements CustomerService {
                 ro.setRelationType(customerInfo.getCustomerIsSolve());
                 ro.setRelationId(relationId);
                 ro.setSalesId(sor.getSalesId());
+                ro.setRelationCustomerId(customerInfo.getCustomerId());
                 relationOrderList.add(ro);
             }
             if(relationOrderList != null && relationOrderList.size() > 0){

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/backGoodsMapper.xml

@@ -105,7 +105,7 @@
     <result column="back_goods_create_time" property="backGoodsCreateTime"/>
     <result column="back_goods_update_time" property="backGoodsUpdateTime"/>
     <result column="back_goods_back_receipt_date" property="backGoodsBackReceiptDate"/>
-    <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
+    <!--<collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>-->
   </resultMap>
 
   <select id="listComplaintDetect" parameterType="Integer" resultType="ComplaintDetectInfo">

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

@@ -177,6 +177,12 @@
             <if test="adminId != null and adminId != ''">
                 and c.admin_id = #{adminId}
             </if>
+            <if test="customerIsSolve != null and customerIsSolve != ''">
+                and cc.customerIsSolve = #{customerIsSolve}
+            </if>
+            <if test="relationId != null and relationId != ''">
+                and cc.relationId = #{relationId}
+            </if>
         </where>
   </select>
 

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

@@ -23,13 +23,12 @@
     <result column="customer_desc" property="customerDesc" jdbcType="VARCHAR" />
     <result column="customer_out_damaged" property="customerOutDamaged" jdbcType="INTEGER" />
     <result column="customer_secondary_customer" property="customerSecondaryCustomer" jdbcType="INTEGER" />
-    <result column="is_quality" property="isQuality" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     customer_id, admin_id, question_id, company_id, store_id, customer_source_type, customer_source, 
     customer_counsel_type, customer_name, customer_tel,customer_wechat_name, customer_is_solve, customer_is_visit,
     customer_in_TDS, customer_out_TDS, customer_area, customer_create_time, customer_update_time,customer_desc,
-    customer_out_damaged,customer_secondary_customer,is_quality
+    customer_out_damaged,customer_secondary_customer
   </sql>
 
   <!-- 根据id获取客诉信息 -->
@@ -59,8 +58,7 @@
       t.customer_out_damaged,
       t.customer_secondary_customer,
       t.customer_last_id,
-      t.customer_initial_id,
-      t.is_quality
+      t.customer_initial_id
     from tb_rst_customer_info t
     where t.customer_id = #{customerId,jdbcType=INTEGER}
   </select>
@@ -255,7 +253,6 @@
     c.customer_wechat_name,
     c.customer_source_type,
     c.customer_source,
-    c.is_quality,
     ct.complaint_class_name,
     csc.small_class_name,
     t.type_name,
@@ -542,7 +539,6 @@
     <result column="question_profile" property="questionProfile"/>
     <result column="describe_handle_desc" property="describeHandleDesc"/>
     <result column="describe_content" property="describeContent"/>
-    <result column="is_quality" property="isQuality"/>
     <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
   </resultMap>
 
@@ -648,9 +644,6 @@
       <if test="factoryId != null" >
         factory_id = #{factoryId}
       </if>
-      <if test="isQuality != null" >
-        is_quality = #{isQuality}
-      </if>
     </set>
     where customer_id = #{customerId}
   </update>

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/noreasonBackMapper.xml

@@ -107,7 +107,7 @@
     <result column="noreason_back_update_time" property="noreasonBackUpdateTime" jdbcType="TIMESTAMP" />
     <result column="noreason_back_alipay_name" property="noreasonBackAlipayName" jdbcType="VARCHAR" />
     <result column="noreason_back_receipt_date" property="noreasonBackReceiptDate" jdbcType="TIMESTAMP" />
-    <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
+    <!--<collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>-->
   </resultMap>
 
   <select id="listComplaintDetect" parameterType="Integer" resultType="ComplaintDetectInfo">

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

@@ -43,6 +43,7 @@
         tb_rst_relation_order
         (
         relation_order_id,
+        relation_customer_id,
         relation_type,
         relation_id,
         sales_id
@@ -50,6 +51,7 @@
         values
         (
         #{relationOrderId},
+        #{relationCustomerId},
         #{relationType},
         #{relationId},
         #{salesId}
@@ -59,8 +61,8 @@
         update
         tb_rst_relation_order
         <set >
-            <if test="relationOrderId != null ">
-                relation_order_id = #{relationOrderId},
+            <if test="relationCustomerId != null ">
+                relation_customer_id = #{relationCustomerId},
             </if >
             <if test="relationType != null ">
                 relation_type = #{relationType},
@@ -92,6 +94,7 @@
         tb_rst_relation_order
         (
         relation_order_id,
+        relation_customer_id,
         relation_type,
         relation_id,
         sales_id
@@ -100,6 +103,7 @@
         <foreach collection="list" item="node" index="index" separator="," open="" close="">
             (
             #{node.relationOrderId},
+            #{node.relationCustomerId},
             #{node.relationType},
             #{node.relationId},
             #{node.salesId}

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml

@@ -120,7 +120,7 @@
     <result column="renewed_create_time" property="renewedCreateTime"/>
     <result column="renewed_update_time" property="renewedUpdateTime"/>
     <result column="renewed_back_receipt_date" property="renewedBackReceiptDate"/>
-    <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
+    <!--<collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>-->
   </resultMap>
 
   <select id="listComplaintDetect" parameterType="Integer" resultType="ComplaintDetectInfo">

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml

@@ -152,7 +152,7 @@
     <result column="repair_back_receipt_date" property="repairBackReceiptDate"/>
     <result column="repair_factory_costs" property="repairFactoryCosts"/>
     <result column="repair_customer_costs " property="repairCustomerCosts"/>
-    <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
+    <!--<collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>-->
   </resultMap>
 
   <select id="listComplaintDetect" parameterType="Integer" resultType="ComplaintDetectInfo">

+ 80 - 50
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AppComplaintQuestionInfoController.java

@@ -57,6 +57,7 @@ public class AppComplaintQuestionInfoController {
     @Autowired
     private FittingsInfoMapper fittingsInfoMapper;
 
+
     /**
      * 进入客诉问题描述
      *
@@ -253,59 +254,88 @@ public class AppComplaintQuestionInfoController {
  * @param request
  * @return
  */
+//    @ResponseBody
+//    @RequestMapping(value = "/synOrder")
+//    public ResponseJson synCustomerOrder(HttpServletRequest request){
+//        ResponseJson msg = new ResponseJson();
+//            List<SalesOrder> salesOrderList = salesOrderService.listSalesOrder(new SalesOrder());
+//            for (int i=0;i<salesOrderList.size();i++){
+//                SalesOrder so = salesOrderList.get(i);
+//                SalesOrderItem soi = new SalesOrderItem();
+//                soi.setItemOrderId(so.getSalesId());
+//            List<SalesOrderItem> salesOrderItemList = salesOrderService.listSalesOrderItem(soi);
+//            if(salesOrderItemList != null && salesOrderItemList.size() > 1){
+//               if(so.getSalesDealCode() != null && !"".equals(so.getSalesDealCode()) ){
+//                   //获取订单详情
+//                   JSONObject orderInfo = null;
+//                   try{
+//                       orderInfo = efastOrderService.getOrderFormEfast(so.getSalesDealCode());
+//                   }catch (Exception e){
+//                       logger.info("获取订单失败;异常编号:505;失败原因:"+ e.getMessage() +"--获取失败交易号:" + so.getSalesDealCode()+"订单id"+so.getSalesId());
+//                   }
+//                   if (orderInfo == null) {
+//                       logger.info("1获取订单失败;异常编号:--获取失败交易号:" + so.getSalesDealCode()+"订单id"+so.getSalesId());
+//                       continue;
+//                   }
+//                   if (!orderInfo.has("orders")) {
+//                       logger.info("2获取订单失败;异常编号:--获取失败交易号:" + so.getSalesDealCode()+"订单id"+so.getSalesId());
+//                       continue;
+//                   }
+//                   //获取订单项集合
+//                   JSONArray itemArray = null;
+//                   try{
+//                       itemArray = orderInfo.getJSONArray("orders");
+//                   }catch (Exception e){
+//                       e.printStackTrace();
+//                       logger.info("1解析订单项失败"+so.getSalesId());
+//                   }
+//                   if (itemArray == null || itemArray.size() == 0) {
+//                       logger.info("2解析订单项失败"+so.getSalesId());
+//                       continue;
+//                   }
+//                   for (int j = 0;j < itemArray.size();j++) {
+//                       JSONObject itemJson = itemArray.getJSONObject(j);
+//                       SalesOrderItem item = new SalesOrderItem();
+//                       item.setItemColorBar(itemJson.getString("goods_sn"));//商品69码
+//                       item.setItemNum(itemJson.getInt("goods_number"));//商品数量
+//                       item.setItemOrderId(so.getSalesId());
+//                       salesOrderService.updateOrderItem(item);
+//                   }
+//                }else{
+//                   logger.info("----交易号为空--订单id为"+so.getSalesId());
+//                }
+//            }
+//        }
+//
+//        return msg;
+//    }
+
+    /**
+     * 订单关联表,新增客诉id
+     * @param request
+     * @return
+     */
     @ResponseBody
-    @RequestMapping(value = "/synOrder")
-    public ResponseJson synCustomerOrder(HttpServletRequest request){
+    @RequestMapping(value = "/synRelatedOrder")
+    public ResponseJson synRelatedOrder(HttpServletRequest request){
         ResponseJson msg = new ResponseJson();
-            List<SalesOrder> salesOrderList = salesOrderService.listSalesOrder(new SalesOrder());
-            for (int i=0;i<salesOrderList.size();i++){
-                SalesOrder so = salesOrderList.get(i);
-                SalesOrderItem soi = new SalesOrderItem();
-                soi.setItemOrderId(so.getSalesId());
-            List<SalesOrderItem> salesOrderItemList = salesOrderService.listSalesOrderItem(soi);
-            if(salesOrderItemList != null && salesOrderItemList.size() > 1){
-               if(so.getSalesDealCode() != null && !"".equals(so.getSalesDealCode()) ){
-                   //获取订单详情
-                   JSONObject orderInfo = null;
-                   try{
-                       orderInfo = efastOrderService.getOrderFormEfast(so.getSalesDealCode());
-                   }catch (Exception e){
-                       logger.info("获取订单失败;异常编号:505;失败原因:"+ e.getMessage() +"--获取失败交易号:" + so.getSalesDealCode()+"订单id"+so.getSalesId());
-                   }
-                   if (orderInfo == null) {
-                       logger.info("1获取订单失败;异常编号:--获取失败交易号:" + so.getSalesDealCode()+"订单id"+so.getSalesId());
-                       continue;
-                   }
-                   if (!orderInfo.has("orders")) {
-                       logger.info("2获取订单失败;异常编号:--获取失败交易号:" + so.getSalesDealCode()+"订单id"+so.getSalesId());
-                       continue;
-                   }
-                   //获取订单项集合
-                   JSONArray itemArray = null;
-                   try{
-                       itemArray = orderInfo.getJSONArray("orders");
-                   }catch (Exception e){
-                       e.printStackTrace();
-                       logger.info("1解析订单项失败"+so.getSalesId());
-                   }
-                   if (itemArray == null || itemArray.size() == 0) {
-                       logger.info("2解析订单项失败"+so.getSalesId());
-                       continue;
-                   }
-                   for (int j = 0;j < itemArray.size();j++) {
-                       JSONObject itemJson = itemArray.getJSONObject(j);
-                       SalesOrderItem item = new SalesOrderItem();
-                       item.setItemColorBar(itemJson.getString("goods_sn"));//商品69码
-                       item.setItemNum(itemJson.getInt("goods_number"));//商品数量
-                       item.setItemOrderId(so.getSalesId());
-                       salesOrderService.updateOrderItem(item);
-                   }
-                }else{
-                   logger.info("----交易号为空--订单id为"+so.getSalesId());
-                }
-            }
-        }
+        List<RelationOrder>  relationOrderList = relationOrderService.getRelationOrderList(new RelationOrder());
+        for (int i=0;i<relationOrderList.size();i++) {
+            RelationOrder ro = relationOrderList.get(i);
+            CustomerCommon customerCommon = new CustomerCommon();
+            customerCommon.setRelationId(ro.getRelationId());
+            customerCommon.setCustomerIsSolve(ro.getRelationType());  //customerIsSolve
+            List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
 
+            RelationOrder newRo = new RelationOrder();
+            newRo.setRelationOrderId(ro.getRelationOrderId());
+            newRo.setRelationCustomerId(customerCommonList.get(0).getCustomerId());
+            relationOrderService.update(newRo);
+        }
+        logger.info("----交易号为空--订单id为"+1);
         return msg;
     }
+
+
+
 }

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

@@ -53,13 +53,14 @@
         .msg-phone{height: 35px;line-height: 35px;}
 
         /*用于邮寄信息的css*/
-        .youxi_xinxi{width: 980px}
+        .youxi_xinxi{}
         .txt2{
             width:80px;
             overflow: hidden;
             white-space: nowrap;
             text-overflow: ellipsis;
         }
+        .col-sm-1{width: 150px;}
     </style>
     <title>添加客诉 - 客诉管理 - RST</title>
 </head>
@@ -86,7 +87,7 @@
             </div>
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
-                <div class="formControls col-4 col-sm-4"> <span class="select-box" style=" width: 625px;">
+                <div class="formControls col-4 col-sm-4"> <span class="select-box" >
                     <select name="adminId" id="adminId" class="select">
                     </select>
 				</span>
@@ -106,17 +107,17 @@
                     <div class="radio-box">
                         <input type="radio" id="tel-4" name="customerSourceType" value="4" >
                         <label for="tel-4">QQ群</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_4"  value="" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_4"  value="" style="width: 100px;">-->
                     </div>
                     <div class="radio-box">
                         <input type="radio" id="tel-5" name="customerSourceType" value="5" >
                         <label for="tel-5">微信群</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_5" value="" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_5" value="" style="width: 100px;">-->
                     </div>
                     <div class="radio-box">
                         <input type="radio" id="tel-6" name="customerSourceType" value="6" >
                         <label for="tel-6">个人微信</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_6" value="" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_6" value="" style="width: 100px;">-->
                     </div>
                     <div class="radio-box">
                         <input type="radio" id="tel-7" name="customerSourceType" value="7" >
@@ -125,10 +126,15 @@
                     <div class="radio-box">
                         <input type="radio" id="tel-3" name="customerSourceType" value="3">
                         <label for="tel-3">其他</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_3" value="" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_3" value="" style="width: 100px;">-->
                     </div>
                     <#--<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>
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1">来源描述:</label>
+                <div class="formControls col-4 col-sm-4 skin-minimal customerSourceType_text_all">
+                    <input type="text" class="input-text trim_input" value="" placeholder="来源入口描述" id="customerSource" name="customerSource">
                 </div>
             </div>
             <div class="row cl">
@@ -258,7 +264,7 @@
                 </div>
                 <div class="formControls col-2 col-sm-2">
                     <div class="clearfix">
-                        <input type="text" placeholder="搜索关键词" class="input-text  ac_input trim_input" name="questionIdMsg" value="" id="search_text" autocomplete="off" style="width:60%"><button type="button" class="btn btn-primary" id="search_button">搜索</button>
+                        <input type="text" placeholder="搜索关键词" class="input-text  ac_input trim_input" name="questionIdMsg" value="" id="search_text" autocomplete="off" style="width:66%"><button type="button" style="width: 32%;" class="btn btn-primary"  id="search_button">搜索</button>
                     </div>
                 </div>
 
@@ -278,16 +284,16 @@
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题标题:</label>
-                <div class="formControls col-5 col-sm-5">
-                    <input type="text" class="input-text trim_input" style="width: 625px;" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" >
+                <div class="formControls col-6 col-sm-6">
+                    <input type="text" class="input-text trim_input"  name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" >
                 </div>
             </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
-                <div class="formControls col-5 col-sm-5">
+                <div class="formControls col-9 col-sm-9">
                     <input type="hidden" name="questionId" id="questionId" value="">
-                    <script id="describeContentText" type="text/plain" style="width:983px;height:250px;"></script>
+                    <script id="describeContentText" type="text/plain" style="width:100%;height:250px;"></script>
                     </script>
                     <input type="hidden" name="describeContent" id="describeContent" value="">
                 </div>
@@ -296,9 +302,9 @@
             <div class="row cl">
             <#--处理描述 - 客诉备注-->
                 <label class="form-label col-1 col-sm-1">问题描述:</label>
-                <div class="formControls col-5 col-sm-5">
+                <div class="formControls col-9 col-sm-9">
                     <span>问题描述详情,内部使用,不会对外公布。</span>
-                    <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
+                    <script id="describeHandleDescText" type="text/plain" style="width:100%;height:250px;"></script>
                     </script>
                     <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
                 </div>
@@ -538,7 +544,7 @@
             </div>
             <div class="row cl" id="sendAddressInfo">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
-                <div class="formControls col-5 col-sm-5" style="height: 240px" id="sendAddressSmsHtml">
+                <div class="formControls col-9 col-sm-9" style="height: 240px" id="sendAddressSmsHtml">
                    <#-- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
                     </script>-->
                 </div>
@@ -557,9 +563,9 @@
                 </div>
             </div>
              <div class="row cl" id="customerDescDiv">
-                 <label class="form-label col-1 col-sm-1">备注:</label>
-                 <div class="col-5 col-sm-5">
-                     <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 100px;"></textarea>
+                 <label class="form-label col-1 col-sm-1">备注信息:</label>
+                 <div class="col-9 col-sm-9">
+                     <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 80px;"></textarea>
                  </div>
               </div>
             <div class="row cl" id="updateProduct" style="display: none;">

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

@@ -53,7 +53,8 @@
         .msg-phone{height: 35px;line-height: 35px; }
 
         /*用于邮寄信息的css*/
-        .youxi_xinxi{width: 980px}
+        .youxi_xinxi{}
+        .col-sm-1{width: 150px;}
     </style>
     <title>修改客诉 - 客诉管理 - RST</title>
 </head>
@@ -105,17 +106,17 @@
                     <div class="radio-box">
                         <input type="radio" id="tel-4" name="customerSourceType" value="4" <#if customerInfo.customerSourceType == 4 >checked</#if>>
                         <label for="tel-4">QQ群</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_4"  value="<#if customerInfo.customerSourceType == 4 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_4"  value="<#if customerInfo.customerSourceType == 4 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">-->
                     </div>
                     <div class="radio-box">
                         <input type="radio" id="tel-5" name="customerSourceType" value="5" <#if customerInfo.customerSourceType == 5 >checked</#if>>
                         <label for="tel-5">微信群</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_5" value="<#if customerInfo.customerSourceType == 5 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_5" value="<#if customerInfo.customerSourceType == 5 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">-->
                     </div>
                     <div class="radio-box">
                         <input type="radio" id="tel-6" name="customerSourceType" value="6" <#if customerInfo.customerSourceType == 6 >checked</#if>>
                         <label for="tel-6">个人微信</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_6" value="<#if customerInfo.customerSourceType == 6 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_6" value="<#if customerInfo.customerSourceType == 6 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">-->
                     </div>
                     <div class="radio-box">
                         <input type="radio" id="tel-7" name="customerSourceType" value="7" <#if customerInfo.customerSourceType == 7 >checked</#if>>
@@ -124,12 +125,20 @@
                     <div class="radio-box">
                         <input type="radio" id="tel-3" name="customerSourceType" value="3" <#if customerInfo.customerSourceType == 3 >checked</#if>>
                         <label for="tel-3">其他</label>
-                        <input type="text" class="input-text trim_input customerSourceType_text_3" value="<#if customerInfo.customerSourceType == 3 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">
+                        <#--<input type="text" class="input-text trim_input customerSourceType_text_3" value="<#if customerInfo.customerSourceType == 3 >${customerInfo.customerSource!''}</#if>" style="width: 100px;">-->
                     </div>
                         <#--<input type="text" style="width: 321px;margin-left: 10px; <#if customerInfo.customerSourceType != 3 >display: none;</#if>" class="input-text" value="${customerInfo.customerSource!''}" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">-->
-                        <input type="hidden" value="" placeholder="" id="customerSource" name="customerSource"  >
+                        <#--<input type="hidden" value="" placeholder="" id="customerSource" name="customerSource"  >-->
                 </div>
             </div>
+
+            <div class="row cl">
+                <label class="form-label col-1 col-sm-1">来源描述:</label>
+                <div class="formControls col-4 col-sm-4 skin-minimal customerSourceType_text_all">
+                    <input type="text" class="input-text trim_input" value="${customerInfo.customerSource!''}" placeholder="来源入口描述" id="customerSource" name="customerSource">
+                </div>
+            </div>
+
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>咨询类型:</label>
                 <div class="formControls col-10 col-sm-10 skin-minimal">
@@ -149,7 +158,7 @@
                 <input type="hidden" id="typeCompany" name="typeCompany" value="">
                 <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
                     <#list typeList as type>
-                        <div class="radio-box">
+                        <div class="radio-box" style="width: 180px;">
                             <input type="radio" id="produceType-${type_index}" name="typeId" typeCompany="${type.typeCompany}"  value="${type.typeId!''}" <#if customerInfo.typeId == type.typeId>checked</#if> >
                             <label for="produceType-${type_index}">${type.typeName!''}</label>
                         </div>
@@ -235,7 +244,7 @@
                 </div>
                 <div class="formControls col-2 col-sm-2">
                     <div class="clearfix">
-                        <input type="text" placeholder="搜索关键词" class="input-text  ac_input" name="questionIdMsg" value="" id="search_text" autocomplete="off" style="width:60%"><button type="button" class="btn btn-primary" id="search_button">搜索</button>
+                        <input type="text" placeholder="搜索关键词" class="input-text  ac_input" name="questionIdMsg" value="" id="search_text" autocomplete="off" style="width:66%"><button type="button" class="btn btn-primary" style="width: 32%;"  id="search_button">搜索</button>
                     </div>
                 </div>
 
@@ -255,16 +264,16 @@
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题标题:</label>
-                <div class="formControls col-5 col-sm-5">
-                    <input type="text" class="input-text" style="width: 625px;" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" value="" >
+                <div class="formControls col-6 col-sm-6">
+                    <input type="text" class="input-text" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" value="" >
                 </div>
             </div>
 
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
-                <div class="formControls col-5 col-sm-5">
+                <div class="formControls col-9 col-sm-9">
                     <input type="hidden" name="questionId" id="questionId" value="${customerInfo.questionId!''}">
-                    <script id="describeContentText" type="text/plain" style="width:983px;height:250px;"></script>
+                    <script id="describeContentText" type="text/plain" style="width:100%;height:250px;"></script>
                     </script>
                     <input type="hidden" name="describeContent" id="describeContent" value="">
                     <input type="hidden" name="describeId" id="describeId" value="">
@@ -274,9 +283,9 @@
             <div class="row cl">
             <#--处理描述 - 客诉备注-->
                 <label class="form-label col-1 col-sm-1">问题描述:</label>
-                <div class="formControls col-5 col-sm-5">
+                <div class="formControls col-9 col-sm-9">
                     <span>问题描述详情,内部使用,不会对外公布。</span>
-                    <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
+                    <script id="describeHandleDescText" type="text/plain" style="width:100%;height:250px;"></script>
                     </script>
                     <input type="hidden" id="describeHandleDesc" name="describeHandleDesc" value="">
                 </div>
@@ -493,13 +502,13 @@
                                             ${closedProdcues.closedColorName!""}
                                         </td>
                                         <td style="text-align: center;">
-                                            ${closedProdcues.closedProdcueNumber!""}
+                                            <input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="${closedProdcues.closedProdcueNumber!"0"}"  placeholder="产品数量" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)">
                                         </td>
                                         <td style="text-align: center;">
                                             <input type="hidden" class="input-produce-id" value="${closedProdcues.productId}">
                                             <input type="hidden" class="input-fc-id" value="${closedProdcues.colorId}">
                                             <input type="hidden" class="input-69code" value="${closedProdcues.colorBar}">
-                                            <input type="text" class="input-text input-number" style="width: 100%;border: none;text-align: center;" value="${closedProdcues.closedProdcueMachineNo!""}" placeholder="机器编号" name="" id="item-${closedProdcues.productId}-${closedProdcues.colorId}" number="${closedProdcues.closedProdcueNumber}"  itemIsSource="1"  onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >
+                                            <input type="text" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="${closedProdcues.closedProdcueMachineNo!""}" placeholder="机器编号" name="" id="item-${closedProdcues.productId}-${closedProdcues.colorId}" number="${closedProdcues.closedProdcueNumber}"  itemIsSource="1"  onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >
                                         </td>
                                 </tr>
                                 </#list>
@@ -667,7 +676,7 @@
 
             <div class="row cl" id="sendAddressInfo">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
-                <div class="formControls col-5 col-sm-5" style="height: 250px" id="sendAddressSmsHtml">
+                <div class="formControls col-9 col-sm-9" style="height: 250px" id="sendAddressSmsHtml">
                 <#-- <script id="sendAddressSms" type="text/plain" style="width:983px;height:200px;"></script>
                     </script>-->
                 </div>
@@ -685,8 +694,8 @@
                 </div>
             </div>
              <div class="row cl" id="customerDescDiv">
-                 <label class="form-label col-1 col-sm-1">备注:</label>
-                    <div class="col-5 col-sm-5">
+                 <label class="form-label col-1 col-sm-1">备注信息:</label>
+                    <div class="col-9 col-sm-9">
                   <textarea type="text" placeholder="" id="customerDesc" name="customerDesc" style="width: 100%;height: 100px;">${customerInfo.customerDesc!''}</textarea>
                     </div>
               </div>

+ 10 - 10
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -364,7 +364,7 @@ function initProduceType(){
                 var check = "checked";
                 for(var i=0;i<data.returnMsg.productTypeList.length;i++){
                     var produce = data.returnMsg.productTypeList[i];
-                    html += ' <div class="radio-box">' +
+                    html += ' <div class="radio-box"  style="width: 180px;">' +
                         '<input type="radio" class="single_loading"  id="produce-type-'+ i +'" name="typeId" typeCompany="'+ produce.typeCompany +'"  datatype="*" value="'+ produce.typeId +'"  '+ check +' nullmsg="请选择产品类型!" >' +
                         ' <label for="produce-type-'+ i +'">'+ produce.typeName +'</label>' +
                         ' </div>';
@@ -1401,13 +1401,13 @@ function setProduce(orderItemList) {
         colorHtml += '<tr >'
             + '<td style="text-align: center;" >' + item.itemProductName + '</td>'
             + '<td style="text-align: center;" >' + item.itemProductColor + '</td>'
-            + '<td style="text-align: center;" >' + item.itemNum + '</td>'
+            + '<td style="text-align: center;"><input type="text" style="width: 100%;border: none;text-align: center;" class="input-text input-number input-itemNum" value="' + item.itemNum + '"  placeholder="产品数量" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>'
             + '<td style="text-align: center;" >'
             + '<input type="hidden" class="input-produce-id" value="' + item.itemProductId + '">'
             + '<input type="hidden" class="input-fc-id" value="' + item.itemColorId +'">'
             + '<input type="hidden" class="input-69code" value="' + item.itemColorBar +'">'
             +  fiHtml
-            + '<input type="'+ fiHidden +'" class="input-text input-number" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + item.itemProductId + '-' + item.itemColorId +'" number="'+ item.itemNum +'"  itemIsSource="'+ item.itemIsSource +'"  onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
+            + '<input type="'+ fiHidden +'" class="input-text input-number input-code" style="width: 100%;border: none;text-align: center;" value="" placeholder="机器编号" name="" id="item-' + item.itemProductId + '-' + item.itemColorId +'" number="'+ item.itemNum +'"  itemIsSource="'+ item.itemIsSource +'"  onkeyup="keyFunString($(this),30)" onpaste="keyFunString($(this),30)" >'
             + '</td>'
             + '</tr>';
     }
@@ -1706,11 +1706,11 @@ function addCustomerReady(){
     }
 
     /*验证来源入口*/
-    var customerSourceType = $("input:radio[name='customerSourceType']:checked").val();
-    var ty_text = $(".customerSourceType_text_"+customerSourceType).val();
-    if(ty_text != null && ty_text != "" && typeof(ty_text) != "undefined" ){
-        $("#customerSource").val(ty_text);
-    }
+    // var customerSourceType = $("input:radio[name='customerSourceType']:checked").val();
+    // var ty_text = $(".customerSourceType_text_"+customerSourceType).val();
+    // if(ty_text != null && ty_text != "" && typeof(ty_text) != "undefined" ){
+    //     $("#customerSource").val(ty_text);
+    // }
 
     // if(customerSourceType == 3){
     //     var customerSourceOld = $("#customerSourceOld").val();
@@ -1790,9 +1790,9 @@ function addCustomerReady(){
         var closedProdcues = new Array();         //获取寄回,寄出直接复制寄回
         var closedFittings = new Array();         //获取寄回,寄出直接复制寄回
 
-        $("#addProduct").find(".input-number").each(function () {
+        $("#addProduct").find(".input-code").each(function () {
             var machineNo = $(this).val();    //机器编号
-            var number = $(this).attr("number");    //机器编号
+            var number = $(this).parents("tr").find(".input-itemNum").eq(0).val();    //数量
             var itemIsSource = $(this).attr("itemissource");    //是否为配件  1:产品颜色表,2:配件表
             if (number != null && number != "" && number != 0) {
                 var product = new Object();