Pārlūkot izejas kodu

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

wangxiang 6 gadi atpakaļ
vecāks
revīzija
2005ea374b
24 mainītis faili ar 543 papildinājumiem un 78 dzēšanām
  1. 5 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  2. 352 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  3. 4 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  4. 8 3
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  5. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  6. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminPostageController.java
  7. 5 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSalesOrderController.java
  8. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java
  9. 3 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AppComplaintQuestionInfoController.java
  10. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/ComplaintMaintenanceController.java
  11. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/customer/CustomerBasicController.java
  12. 6 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/MallOrderController.java
  13. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachinePartsController.java
  14. 2 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsBatchController.java
  15. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsBomController.java
  16. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsEmployeeController.java
  17. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsSupplierController.java
  18. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminSoftwareVersionController.java
  19. 47 25
      watero-rst-web/src/main/java/com/iamberry/rst/utils/StitchAttrUtil.java
  20. 31 11
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl
  21. 11 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  22. 30 10
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl
  23. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/salesOrder/sales_order_list.ftl
  24. 27 10
      watero-rst-web/src/main/webapp/common/js/customer/customer.js

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

@@ -137,6 +137,10 @@ public class CustomerServiceImpl implements CustomerService {
                     so.setSalesIds(salesIds);
                     orderList = salesOrderMapper.listSalesOrder(so);
                     logger.info("-----------添加客诉-查询订单--------------");
+                    if(orderList == null || orderList.size() < 1){
+                        logger.info("-----------添加客诉-订单为空-请重新添加订单 --------------");
+                        throw new RuntimeException("添加客诉-订单为空-请重新添加订单");
+                    }
                 }
             }
 
@@ -223,8 +227,6 @@ public class CustomerServiceImpl implements CustomerService {
             customerCommon.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储id
 
 
-
-
             /*将公共的对象 转换换新/维修/退款等*/
             Object object = CustomerCommonUtil.getRelation(customerInfo.getCustomerIsSolve(), customerCommon);
 
@@ -1295,6 +1297,7 @@ public class CustomerServiceImpl implements CustomerService {
     @Override
     public PagedResult<CustomerInfo> listCustomer(int pageNO, int pageSize, CustomerInfo customerInfo, boolean isTotalNum) {
         PageHelper.startPage(pageNO, pageSize, isTotalNum);
+
         //查询客诉列表
         List<CustomerInfo> customerList = customerInfoMapper.listCustomer(customerInfo);
 

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

@@ -233,6 +233,358 @@
 
     ORDER BY c.customer_id desc
   </select>
+  <!--<select id="listCustomer" parameterType="CustomerInfo" resultMap="customerMap">
+    SELECT
+    c.customer_id,
+    c.customer_counsel_type,
+    c.customer_area,
+    c.customer_in_TDS,
+    c.customer_out_TDS,
+    c.customer_is_solve,
+    c.customer_is_visit,
+    c.customer_create_time,
+    c.customer_desc,
+    c.customer_out_damaged,
+    c.customer_secondary_customer,
+    c.customer_last_id,
+    c.customer_initial_id,
+    c.customer_name,
+    c.customer_tel,
+    c.customer_wechat_name,
+    c.customer_source_type,
+    c.customer_source,
+    ct.complaint_class_name,
+    csc.small_class_name,
+    t.type_name,
+    a.admin_name,
+    qd.describe_title,
+    qd.describe_handle_desc,
+    qd.describe_content,
+    sc.company_name,
+    si.store_name,
+    v.visit_status,
+    v.visit_complete_date,
+    v.visit_name,
+    v.visit_tel,
+    v.visit_date,
+    v.visit_time_select,
+    v.visit_complete_name,
+    v.visit_complete_tel,
+    sa.admin_name AS visitDesignatedAdminName,
+    cq.question_profile,
+    cc.relationBackStatus AS backStatus,
+    cc.relationSendStatus AS sendStatus,
+    cc.relationSendLogisticsNo AS sendLogisticsNo,
+    cc.relationSendLogisticsCompany AS sendLogisticsCompany,
+    cc.relationBackLogisticsNo AS backLogisticsNo,
+    cc.relationBackLogisticsCompany AS backLogisticsCompany,
+    oi.sales_pay_time AS salesTime
+    FROM
+    tb_rst_customer_info c
+    LEFT JOIN (
+    SELECT
+    '3' AS customerIsSolve,
+    renewed_id AS relationId,
+    customer_id AS customerId,
+    tb_rst_relation_order.sales_id AS orderId,
+    signclosed_id AS signclosedId,
+    renewed_back_efast_order_id AS relationBackEfastOrderId,
+    renewed_back_name AS relationBackName,
+    renewed_back_tel AS relationBackTel,
+    renewed_back_status AS relationBackStatus,
+    renewed_back_logistics_company AS relationBackLogisticsCompany,
+    renewed_back_logistics_no AS relationBackLogisticsNo,
+    renewed_back_postage AS relationBackPostage,
+    renewed_back_machine_no AS relationBackMachineNo,
+    renewed_send_status AS relationSendStatus,
+    renewed_send_name AS relationSendName,
+    renewed_send_tel AS relationSendTel,
+    province_number AS provinceNumber,
+    city_number AS cityNumber,
+    area_number AS areaNumber,
+    renewed_send_merge_address AS relationSendMergeAddress,
+    renewed_send_address AS relationSendAddress,
+    renewed_send_logistics_company AS relationSendLogisticsCompany,
+    renewed_send_logistics_no AS relationSendLogisticsNo,
+    renewed_desc AS relationDesc,
+    renewed_state AS relationState,
+    renewed_alipay AS relationAlipay,
+    renewed_is_transfer AS relationIsTransfer,
+    renewed_alipay_name AS relationAlipayName,
+    renewed_back_receipt_date AS relationBackReceiptDate
+    FROM
+    tb_rst_renewed
+    LEFT JOIN tb_rst_relation_order ON tb_rst_relation_order.relation_id = tb_rst_renewed.renewed_id
+    WHERE
+    tb_rst_relation_order.relation_type = '3'
+    UNION ALL
+    SELECT
+    '4' AS customerIsSolve,
+    repair_id AS relationId,
+    customer_id AS customerId,
+    tb_rst_relation_order.sales_id AS orderId,
+    signclosed_id AS signclosedId,
+    repair_back_efast_order_id AS relationBackEfastOrderId,
+    repair_back_name AS relationBackName,
+    repair_back_tel AS relationBackTel,
+    repair_back_status AS relationBackStatus,
+    repair_back_logistics_company AS relationBackLogisticsCompany,
+    repair_back_logistics_no AS relationBackLogisticsNo,
+    repair_back_postage AS relationBackPostage,
+    repair_back_machine_no AS relationBackMachineNo,
+    repair_send_status AS relationSendStatus,
+    repair_send_name AS relationSendName,
+    repair_send_tel AS relationSendTel,
+    province_number AS provinceNumber,
+    city_number AS cityNumber,
+    area_number AS areaNumber,
+    repair_send_merge_address AS relationSendMergeAddress,
+    repair_send_address AS relationSendAddress,
+    repair_send_logistics_company AS relationSendLogisticsCompany,
+    repair_send_logistics_no AS relationSendLogisticsNo,
+    repair_desc AS relationDesc,
+    repair_state AS relationState,
+    repair_alipay AS relationAlipay,
+    repair_is_transfer AS relationIsTransfer,
+    repair_alipay_name AS relationAlipayName,
+    repair_back_receipt_date AS relationBackReceiptDate
+    FROM
+    tb_rst_repair
+    LEFT JOIN tb_rst_relation_order ON tb_rst_relation_order.relation_id = tb_rst_repair.repair_id
+    WHERE
+    tb_rst_relation_order.relation_type = '4'
+    UNION ALL
+    SELECT
+    '5' AS customerIsSolve,
+    reissue_id AS relationId,
+    customer_id AS customerId,
+    tb_rst_relation_order.sales_id AS orderId,
+    NULL AS signclosedId,
+    reissue_back_efast_order_id AS relationBackEfastOrderId,
+    NULL AS relationBackName,
+    NULL AS relationBackTel,
+    NULL AS relationBackStatus,
+    NULL AS relationBackLogisticsCompany,
+    NULL AS relationBackLogisticsNo,
+    NULL AS relationBackPostage,
+    NULL AS relationBackMachineNo,
+    reissue_send_status AS relationSendStatus,
+    reissue_send_name AS relationSendName,
+    reissue_send_tel AS relationSendTel,
+    province_number AS provinceNumber,
+    city_number AS cityNumber,
+    area_number AS areaNumber,
+    reissue_send_merge_address AS relationSendMergeAddress,
+    reissue_send_address AS relationSendAddress,
+    reissue_send_logistics_company AS relationSendLogisticsCompany,
+    reissue_send_logistics_no AS relationSendLogisticsNo,
+    reissue_desc AS relationDesc,
+    reissue_state AS relationState,
+    NULL AS relationAlipay,
+    NULL AS relationIsTransfer,
+    NULL AS relationAlipayName,
+    NULL AS relationBackReceiptDate
+    FROM
+    tb_rst_reissue
+    LEFT JOIN tb_rst_relation_order ON tb_rst_relation_order.relation_id = tb_rst_reissue.reissue_id
+    WHERE
+    tb_rst_relation_order.relation_type = '5'
+    UNION ALL
+    SELECT
+    '6' AS customerIsSolve,
+    back_goods_id AS relationId,
+    customer_id AS customerId,
+    tb_rst_relation_order.sales_id AS orderId,
+    signclosed_id AS signclosedId,
+    NULL AS relationBackEfastOrderId,
+    back_goods_back_name AS relationBackName,
+    back_goods_back_tel AS relationBackTel,
+    back_goods_back_status AS relationBackStatus,
+    back_goods_back_logistics_company AS relationBackLogisticsCompany,
+    back_goods_back_logistics_no AS relationBackLogisticsNo,
+    back_goods_back_postage AS relationBackPostage,
+    back_goods_back_machine_no AS relationBackMachineNo,
+    NULL AS relationSendStatus,
+    NULL AS relationSendName,
+    NULL AS relationSendTel,
+    NULL AS provinceNumber,
+    NULL AS cityNumber,
+    NULL AS areaNumber,
+    NULL AS relationSendMergeAddress,
+    NULL AS relationSendAddress,
+    NULL AS relationSendLogisticsCompany,
+    NULL AS relationSendLogisticsNo,
+    back_goods_desc AS relationDesc,
+    back_goods_state AS relationState,
+    back_goods_alipay AS relationAlipay,
+    back_goods_is_transfer AS relationIsTransfer,
+    back_goods_alipay_name AS relationAlipayName,
+    back_goods_back_receipt_date AS relationBackReceiptDate
+    FROM
+    tb_rst_back_goods
+    LEFT JOIN tb_rst_relation_order ON tb_rst_relation_order.relation_id = tb_rst_back_goods.back_goods_id
+    WHERE
+    tb_rst_relation_order.relation_type = '6'
+    UNION ALL
+    SELECT
+    '7' AS customerIsSolve,
+    noreason_back_id AS relationId,
+    customer_id AS customerId,
+    tb_rst_relation_order.sales_id AS orderId,
+    signclosed_id AS signclosedId,
+    NULL AS relationBackEfastOrderId,
+    noreason_back_back_name AS relationBackName,
+    noreason_back_back_tel AS relationBackTel,
+    noreason_back_back_status AS relationBackStatus,
+    noreason_back_back_logistics_company AS relationBackLogisticsCompany,
+    noreason_back_back_logistics_no AS relationBackLogisticsNo,
+    noreason_back_back_postage AS relationBackPostage,
+    noreason_back_back_machine_no AS relationBackMachineNo,
+    NULL AS relationSendStatus,
+    NULL AS relationSendName,
+    NULL AS relationSendTel,
+    NULL AS provinceNumber,
+    NULL AS cityNumber,
+    NULL AS areaNumber,
+    NULL AS relationSendMergeAddress,
+    NULL AS relationSendAddress,
+    NULL AS relationSendLogisticsCompany,
+    NULL AS relationSendLogisticsNo,
+    noreason_back_desc AS relationDesc,
+    noreason_back_state AS relationState,
+    noreason_back_alipay AS relationAlipay,
+    noreason_back_is_transfer AS relationIsTransfer,
+    noreason_back_alipay_name AS relationAlipayName,
+    noreason_back_receipt_date AS relationBackReceiptDate
+    FROM
+    tb_rst_noreason_back
+    LEFT JOIN tb_rst_relation_order ON tb_rst_relation_order.relation_id = tb_rst_noreason_back.noreason_back_id
+    WHERE
+    tb_rst_relation_order.relation_type = '7'
+    ) cc ON cc.customerId = c.customer_id
+    LEFT JOIN tb_rst_visit v ON v.customer_id = c.customer_id
+    LEFT JOIN tb_rst_sales_order_info oi ON cc.orderId = oi.sales_id
+    LEFT JOIN tb_rst_question_describe qd ON c.customer_id = qd.customer_id
+    LEFT JOIN tb_rst_complaint_question cq ON c.question_id = cq.question_id
+    LEFT JOIN tb_rst_complaint_small_class csc ON csc.small_class_id = cq.small_class_id
+    LEFT JOIN tb_rst_complaint_type ct ON ct.complaint_id = csc.complaint_id
+    LEFT JOIN tb_rst_sales_company sc ON c.company_id = sc.company_id
+    LEFT JOIN tb_rst_store_info si ON c.store_id = si.store_id
+    LEFT JOIN tb_rst_product_type t ON c.type_id = t.type_id
+    LEFT JOIN tb_rst_sys_admin a ON c.admin_id = a.admin_id
+    LEFT JOIN tb_rst_sys_admin sa ON v.designated_admin_id = sa.admin_id
+    <where>
+      <if test="customerName != null and customerName != ''">
+        c.customer_name like CONCAT('%',#{customerName},'%')
+        OR
+        c.customer_wechat_name like CONCAT('%',#{customerName},'%')
+      </if>
+      <if test="customerIsSolve != null">
+        AND c.customer_is_solve = #{customerIsSolve}
+      </if>
+      <if test="customerTel != null and customerTel != ''">
+        and c.customer_tel like CONCAT('%',#{customerTel},'%')
+      </if>
+      <if test="describeTitle != null and describeTitle != ''">
+        and d.describe_title like CONCAT('%',#{describeTitle},'%')
+      </if>
+      <if test="questionId != null and questionId != ''">
+        and c.question_id  = #{questionId}
+      </if>
+      <if test="customerSourceType != null and customerSourceType != ''">
+        and c.customer_source_type = #{customerSourceType}
+      </if>
+      <if test="complaintId != null and complaintId != ''">
+        and ct.complaint_id = #{complaintId}
+      </if>
+      <if test="smallClassId != null and smallClassId != ''">
+        and s.small_class_id = #{smallClassId}
+      </if>
+      <if test="customerIsVisit != null and customerIsVisit != ''">
+        and c.customer_is_visit = #{customerIsVisit}
+      </if>
+      <if test="adminId != null and adminId != ''">
+        and c.admin_id = #{adminId}
+      </if>
+      <if test="customerId != null and customerId != ''">
+        and c.customer_id = #{customerId}
+      </if>
+      <if test="typeId != null and typeId != ''">
+        and c.type_id = #{typeId}
+      </if>
+      <if test="visitDesignatedAdminId != null">
+        and v.designated_admin_id = #{visitDesignatedAdminId}
+      </if>
+      <if test="startTime != null">
+        and c.customer_create_time &gt; #{startTime}
+      </if>
+      <if test="endTime != null">
+        and c.customer_create_time &lt; #{endTime}
+      </if>
+      <if test="sendLogisticsNo != null and sendLogisticsNo != ''">
+        and c.customer_id in (
+        SELECT customer_id
+        FROM tb_rst_renewed trr
+        WHERE renewed_send_logistics_no = #{sendLogisticsNo} OR renewed_back_logistics_no = #{sendLogisticsNo}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_repair
+        WHERE repair_send_logistics_no =#{sendLogisticsNo} OR repair_back_logistics_no = #{sendLogisticsNo}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_reissue
+        WHERE reissue_send_logistics_no = #{sendLogisticsNo}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_back_goods
+        WHERE back_goods_back_logistics_no = #{sendLogisticsNo}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_noreason_back
+        WHERE noreason_back_back_logistics_no = #{sendLogisticsNo}
+        )
+      </if>
+      <if test="backStatus != null and backStatus != ''">
+        and c.customer_id in (
+        SELECT customer_id
+        FROM tb_rst_renewed trr
+        WHERE renewed_back_status = #{backStatus}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_repair
+        WHERE repair_back_status =#{backStatus}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_back_goods
+        WHERE back_goods_back_status = #{backStatus}
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_noreason_back
+        WHERE noreason_back_back_status = #{backStatus}
+        )
+      </if>
+      <if test="backStatus == 1">
+        and c.customer_id in (
+        SELECT customer_id
+        FROM tb_rst_renewed trr
+        WHERE DATEDIFF(NOW(), renewed_create_time) &gt; 3
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_repair
+        WHERE DATEDIFF(NOW(), repair_create_time) &gt; 3
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_back_goods
+        WHERE DATEDIFF(NOW(), back_goods_create_time) &gt; 3
+        UNION ALL
+        SELECT customer_id
+        FROM tb_rst_noreason_back
+        WHERE DATEDIFF(NOW(), noreason_back_create_time) &gt; 3
+        )
+      </if>
+    </where>
+    ORDER BY c.customer_id desc
+  </select>-->
 
   <resultMap id="customerMap" type="CustomerInfo">
     <id column="customer_id" property="customerId"/>

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

@@ -70,7 +70,7 @@
         AND sales_shipping_status = #{isDeliverGoods}
       </if>
       <if test="salesStatus !=null and salesStatus !=''">
-        AND sales_status = #{salesStatus}
+        AND sales_status = #{salesStatus}listOrderExcel
       </if>
       <if test="salesOrderStatus !=null and salesOrderStatus !=''">
         AND sales_order_status = #{salesOrderStatus}
@@ -485,6 +485,9 @@
       <if test="salesPostFirm != null" >
         sales_post_firm = #{salesPostFirm,jdbcType=VARCHAR},
       </if>
+      <if test="salesShippingStatus != null" >
+        sales_shipping_status = #{salesShippingStatus}
+      </if>
     </set>
     where sales_deal_code = #{salesDealCode}
   </update>

+ 8 - 3
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -125,7 +125,7 @@ public class AdminCustomerController {
 //        //获取产品集合,用于页面选择产品
 //        List<Produce> list = produceService.getProduceList();
 //        mv.addObject("produceList", list);
-//       StitchAttrUtil.setModelAndView(customer, mv, "/admin/bom/_bom_list", pagedResult);
+//        StitchAttrUtil.getSa().setModelAndView(customer, mv, "/admin/bom/_bom_list", pagedResult);
         return mv;
     }
 
@@ -569,6 +569,7 @@ public class AdminCustomerController {
                                            @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
                                            @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                            @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
+       long x = new Date().getTime();
         ModelAndView mv = new ModelAndView("cm/customer/custome_list");
         if(customerInfo.getAdminId() == null && isFirst == 1){
             //获取登录员工id
@@ -607,7 +608,12 @@ public class AdminCustomerController {
         customerInfo.setVisit(null);
         customerInfo.setCustomerCommon(null);
         customerInfo.setComplaintDetectList(null);
-        StitchAttrUtil.setModelAndView(customerInfo, mv, "/admin/customer/select_customer_list", pagedResult);
+
+        StitchAttrUtil sa = StitchAttrUtil.getSa();
+        sa.addDatePro("yyyy-MM-dd","startTime","endTime");
+        sa.setModelAndView(customerInfo, mv, "/admin/customer/select_customer_list", pagedResult);
+        long y = new Date().getTime();
+        System.out.println("使用时间:"+(y-x));
         return mv;
     }
 
@@ -983,7 +989,6 @@ public class AdminCustomerController {
         }
         Integer flag = 0;
 
-
         Integer customerIsSolve = customerInfo.getCustomerIsSolve();    //处理类型
         String phone = customerInfo.getCustomerTel();       //手机号码
         Integer typeCompany = customerInfo.getTypeCompany();    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机

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

@@ -146,7 +146,7 @@ public class AdminDetectController {
 //        mv.addObject("page", result);
 //        mv.addObject("url", url.toString());
 
-        StitchAttrUtil.setModelAndView(detectInfo, mv, "/admin/detect/select_detect_list", result);
+         StitchAttrUtil.getSa().setModelAndView(detectInfo, mv, "/admin/detect/select_detect_list", result);
         return mv;
     }
 

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

@@ -99,7 +99,7 @@ public class AdminPostageController {
 
         getManager(loginAdmin,pagedResult);
 
-        StitchAttrUtil.setModelAndView(postage, mv, "/admin/postage/postage_list", pagedResult);
+         StitchAttrUtil.getSa().setModelAndView(postage, mv, "/admin/postage/postage_list", pagedResult);
         return mv;
     }
 

+ 5 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSalesOrderController.java

@@ -88,7 +88,11 @@ public class AdminSalesOrderController {
         }
         List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
         salesOrder.setSalesOrderItemList(null);
-        StitchAttrUtil.setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
+
+        StitchAttrUtil.getSa()
+                .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
+                .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
+
         mv.addObject("listStoreInfo",listStoreInfo);
         return mv;
     }

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

@@ -99,7 +99,7 @@ public class AdminSignclosedController {
        /* url.append("&pageTotal=").append(total).append("&pageNO=");
         mv.addObject("page", result);
         mv.addObject("url", url.toString());*/
-        StitchAttrUtil.setModelAndView(signclosedInfo, mv, "/admin/signclosed/select_signclosed_list", result);
+         StitchAttrUtil.getSa().setModelAndView(signclosedInfo, mv, "/admin/signclosed/select_signclosed_list", result);
         return mv;
     }
 

+ 3 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AppComplaintQuestionInfoController.java

@@ -196,6 +196,7 @@ public class AppComplaintQuestionInfoController {
 //    public ResponseJson processCustomerOrder(HttpServletRequest request){
 //        ResponseJson msg = new ResponseJson();
 //        List<String> orderId = new ArrayList<>();
+//        StringBuffer delOrderId = new StringBuffer();
 //        List<SalesOrder> salesOrderList = salesOrderService.listSalesOrder(new SalesOrder());
 //        for (int i=0;i<salesOrderList.size();i++){
 //            SalesOrder so = salesOrderList.get(i);
@@ -205,7 +206,9 @@ public class AppComplaintQuestionInfoController {
 //            if(salesOrderItemList == null || salesOrderItemList.size() < 1){
 //                if(so.getSalesOrderId() != null && !"".equals(so.getSalesOrderId()) ){
 //                    orderId.add(so.getSalesOrderId());
+//                    delOrderId.append(so.getSalesOrderId());
 //                    salesOrderService.delOrder(so.getSalesOrderId());
+//                    System.out.println("------------------------订单无订单项-订单id为:"+ so.getSalesOrderId() +"-----------------------");
 //                }else{
 //                    System.out.println("----订单号为空--");
 //                }

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

@@ -70,7 +70,7 @@ public class ComplaintMaintenanceController {
             total = pageTotal;
             result.setPages(total);
         }
-        StitchAttrUtil.setModelAndView(complaintMaintenanceInfo, mv, "/admin/maintenance/select_maintenance_list", result);
+         StitchAttrUtil.getSa().setModelAndView(complaintMaintenanceInfo, mv, "/admin/maintenance/select_maintenance_list", result);
         return mv;
     }
 

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/customer/CustomerBasicController.java

@@ -80,7 +80,7 @@ public class CustomerBasicController {
             result.setTotal(totalNum);
         }
         mv.addObject("adminId",adminId);
-        StitchAttrUtil.setModelAndView(customerBasicInfo, mv, "/admin/customerBasic/listCustomerBasic", result);
+         StitchAttrUtil.getSa().setModelAndView(customerBasicInfo, mv, "/admin/customerBasic/listCustomerBasic", result);
         return mv;
     }
 

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

@@ -1,6 +1,7 @@
 package com.iamberry.rst.controllers.order;
 
 import com.alibaba.fastjson.JSON;
+import com.iamberry.rst.controllers.sys.SysController;
 import com.iamberry.rst.core.cm.FittingsInfo;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.cm.SalesOrderItem;
@@ -14,6 +15,8 @@ import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.OrderNoUtil;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,6 +33,7 @@ import java.util.*;
 @Controller
 @RequestMapping("/mallorder")
 public class MallOrderController {
+    private static Logger logger = LoggerFactory.getLogger(SysController.class);
     @Autowired
     private SalesOrderService salesOrderService;
     @Autowired
@@ -41,6 +45,7 @@ public class MallOrderController {
     @ResponseBody
     public JSONObject addOrder(HttpServletRequest request){
         String info =  request.getParameter("info");
+        logger.info("接受到商城推送订单="+info);
         Map<String,Object> map = new HashMap<String,Object>();
         Map requstMap = (Map) JSON.parse(info);
         if(requstMap == null || requstMap.size() == 0){
@@ -183,7 +188,7 @@ public class MallOrderController {
         }catch (Exception e){
             map.put("msg","parameter null");
             map.put("oder_sn",new Date().getTime());
-            return null;
+            return map;
         }
 
         //添加订单数据

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachinePartsController.java

@@ -256,7 +256,7 @@ public class AdminMachinePartsController {
         List<PtsSupplier> listSupplier = machineSupplierService.listMachineSupplier();
         mv.addObject("listSupplier", listSupplier);
 
-        StitchAttrUtil.setModelAndView(ptsComponents, mv, "/admin/machineParts/_parts_list", pagedResult);
+         StitchAttrUtil.getSa().setModelAndView(ptsComponents, mv, "/admin/machineParts/_parts_list", pagedResult);
         return mv;
     }
 

+ 2 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsBatchController.java

@@ -66,7 +66,8 @@ public class AdminPtsBatchController {
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
-        StitchAttrUtil.setModelAndView(ptsBatch, mv, "/admin/batch/_batch_list", pagedResult);
+
+        StitchAttrUtil.getSa().setModelAndView(ptsBatch, mv, "/admin/batch/_batch_list", pagedResult);;
 
         //获取产品集合,用于页面选择产品
         List<Produce> list = produceService.getProduceList();

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsBomController.java

@@ -74,7 +74,7 @@ public class AdminPtsBomController {
         List<Produce> list = produceService.getProduceList();
         mv.addObject("produceList", list);
 
-        StitchAttrUtil.setModelAndView(ptsBom, mv, "/admin/bom/_bom_list", pagedResult);
+         StitchAttrUtil.getSa().setModelAndView(ptsBom, mv, "/admin/bom/_bom_list", pagedResult);
         return mv;
     }
 

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsEmployeeController.java

@@ -74,7 +74,7 @@ public class AdminPtsEmployeeController {
             pagedResult.setTotal(totalNum);
         }
 
-        StitchAttrUtil.setModelAndView(employee, mv, "/admin/employee/_employee_list", pagedResult);
+         StitchAttrUtil.getSa().setModelAndView(employee, mv, "/admin/employee/_employee_list", pagedResult);
         return mv;
     }
 

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminPtsSupplierController.java

@@ -51,7 +51,7 @@ public class AdminPtsSupplierController {
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
         }
-        StitchAttrUtil.setModelAndView(ptsSupplier, mv, "/admin/supplier/_supplier_list", pagedResult);
+         StitchAttrUtil.getSa().setModelAndView(ptsSupplier, mv, "/admin/supplier/_supplier_list", pagedResult);
         return mv;
     }
 

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminSoftwareVersionController.java

@@ -53,7 +53,7 @@ public class AdminSoftwareVersionController {
             pagedResult.setTotal(totalNum);
         }
         mv.addObject("produceList", produceList);
-        StitchAttrUtil.setModelAndView(ptsMachineVersion, mv, "/admin/softwareVersion/_software_version_list", pagedResult);
+         StitchAttrUtil.getSa().setModelAndView(ptsMachineVersion, mv, "/admin/softwareVersion/_software_version_list", pagedResult);
         return mv;
     }
 

+ 47 - 25
watero-rst-web/src/main/java/com/iamberry/rst/utils/StitchAttrUtil.java

@@ -4,28 +4,41 @@ import com.iamberry.rst.core.page.PagedResult;
 import org.springframework.web.servlet.ModelAndView;
 
 import java.lang.reflect.Field;
-import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
+/**
+ * 解决rst列表参数拼接问题
+ */
 public class StitchAttrUtil {
 
+    public static StitchAttrUtil getSa(){
+        return new StitchAttrUtil();
+    }
+
+    private StitchAttrUtil(){
+        propertySet = new HashSet<String>(Arrays.asList(noProperty));
+        timeDateSet = new HashSet<String>(Arrays.asList(timeDate));
+    };
+
     /**
      * 组装参数时,会过滤以下参数
      * 推荐使用:addNoPro(),添加过滤
      */
-    public final static String timeDate[] = {
-            "startDate",
-            "endDate"
-    };
-    public static Set<String> timeDateSet = new HashSet<String>(Arrays.asList(timeDate));
-
-    public final static String noProperty[] = {
+    private final  String timeDate[] = {};
+    /**
+     * 控制时间参数格式
+     * 推荐使用:addDatePro(),添加过滤
+     */
+    private final String noProperty[] = {
             "serialVersionUID",
             "awaitingSignclosedProductInfoList",
             "signclosedProductInfoList"
     };
-    public static Set<String> propertySet = new HashSet<String>(Arrays.asList(noProperty));
+
+    private SimpleDateFormat sdf = null;
+    private Set<String> propertySet;
+    private Set<String> timeDateSet;
 
     /**
      * 组装ModelAndView
@@ -35,7 +48,7 @@ public class StitchAttrUtil {
      * @param pagedResult
      * @throws IllegalAccessException
      */
-    public static void setModelAndView(Object object, ModelAndView modelAndView, String url, PagedResult<?> pagedResult) {
+    public void setModelAndView(Object object, ModelAndView modelAndView, String url, PagedResult<?> pagedResult) {
         StringBuilder sb = new StringBuilder(url);
 
         if(pagedResult.getTotal() != 0) {
@@ -44,10 +57,10 @@ public class StitchAttrUtil {
 
         sb.append("?pageSize=" + pagedResult.getPageSize());
         sb.append("&totalNum=" + pagedResult.getTotal() );
-        StitchAttrUtil.setUrlByObj(sb,object);
+        this.setUrlByObj(sb,object);
         sb.append("&&pageNO=");
 
-        Map<String, Object> map = StitchAttrUtil.getObjToMap(object);
+        Map<String, Object> map = this.getObjToMap(object);
         modelAndView.addAllObjects(map);
 
         modelAndView.addObject("page", pagedResult);
@@ -63,7 +76,7 @@ public class StitchAttrUtil {
      * @return
      * @throws IllegalAccessException
      */
-    public static Map<String, Object> getObjToMap(Object object) {
+    public Map<String, Object> getObjToMap(Object object) {
         Map<String, Object> map = new HashMap<>();
         Class<?> clazz = object.getClass();
         for (Field field : clazz.getDeclaredFields()) {
@@ -87,7 +100,7 @@ public class StitchAttrUtil {
      * @param object
      * @throws IllegalAccessException
      */
-    public static void setUrlByObj(StringBuilder sb,Object object){
+    public void setUrlByObj(StringBuilder sb,Object object){
         Class<?> clazz = object.getClass();
         for (Field field : clazz.getDeclaredFields()) {
             field.setAccessible(true);
@@ -98,16 +111,9 @@ public class StitchAttrUtil {
             }catch (IllegalAccessException e){
             }
             if (value != null && !propertySet.contains(fieldName)) {
-                if(timeDateSet.contains(fieldName)){
-                    //Date currentTime = new Date();
-                    SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-                    String dateString = formatter.format(value);
-                    //ParsePosition pos = new ParsePosition(8);
-                    //Date currentTime = formatter.parse(dateString, pos);
-                    sb.append("&"+fieldName+ "=" + dateString);
-                }else{
-                    sb.append("&"+fieldName+ "=" + value.toString());
-                }
+                if(timeDateSet.contains(fieldName))
+                    value = sdf.format(value);
+                sb.append("&"+fieldName+ "=" + value.toString());
             }
         }
     }
@@ -116,11 +122,27 @@ public class StitchAttrUtil {
      * 添加组装时被过滤的属性名称
      * @param pros
      */
-    public static void addNoPro(String...pros){
+    public StitchAttrUtil addNoPro(String...pros){
         for(String pro : pros){
             if(pro != null && !"".equals(pro))
                 propertySet.add(pro);
         }
+        return this;
     }
 
+    /**
+     * 添加时间参数格式
+     * @param fom   //"yyyy-MM-dd HH:mm:ss"
+     * @param pros
+     */
+    public StitchAttrUtil addDatePro(String fom,String...pros){
+        sdf = new SimpleDateFormat(fom);
+        for(String pro : pros){
+            if(pro != null && !"".equals(pro))
+                timeDateSet.add(pro);
+        }
+        return this;
+    }
+
+
 }

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

@@ -94,7 +94,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-10 col-sm-10 skin-minimal">
+                <div class="formControls col-10 col-sm-10 skin-minimal customerSourceType_text_all">
                     <div class="radio-box">
                         <input type="radio" id="tel-1" name="customerSourceType" value="1" >
                         <label for="tel-1">400电话</label>
@@ -104,11 +104,31 @@
                         <label for="tel-2">微信公众号</label>
                     </div>
                     <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;">
+                    </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;">
+                    </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;">
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-7" name="customerSourceType" value="7" >
+                        <label for="tel-7">有赞</label>
+                    </div>
+                    <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; display: none;" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
-                        <input type="hidden" value="" placeholder="" id="customerSource" name="customerSource">
+                        <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">
@@ -859,14 +879,14 @@
         initProcessResult(3);
 
         /*监听来源入口选择事件*/
-        $("input[name='customerSourceType']").change(function (){
-            var type = parseInt($(this).val());
-            if(type == 3){
-                $("#customerSourceOld").show();
-            }else{
-                $("#customerSourceOld").hide();
-            }
-        })
+//        $("input[name='customerSourceType']").change(function (){
+//            var type = parseInt($(this).val());
+//            if(type == 3){
+//                $("#customerSourceOld").show();
+//            }else{
+//                $("#customerSourceOld").hide();
+//            }
+//        })
 
         /*监听客诉类型选择事件*/
         $("input[name='customerCounselType']").change(function (){

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

@@ -65,6 +65,7 @@
                 <option value="2" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 2 >selected="selected"</#if></#if>>微信公众号</option>
                 <option value="3" <#if customerInfo.customerSourceType??><#if customerInfo.customerSourceType == 3 >selected="selected"</#if></#if>>其他</option>
             </select>
+
             <select class="my-select" name="typeId" id="typeId" style="height: 36px;width: 120px;margin: 0px;padding: 12px 10px 6px 15px;margin-bottom: 10px;">
                 <option value ="">客诉产品</option>
                 <#if typeList?? &&  (typeList?size > 0) >
@@ -166,9 +167,18 @@
                                     400电话
                                 <#elseif customer.customerSourceType == 2>
                                     微信公众号
+                                <#elseif customer.customerSourceType == 4>
+                                    QQ群
+                                <#elseif customer.customerSourceType == 5>
+                                    微信群
+                                <#elseif customer.customerSourceType == 6>
+                                    个人微信
+                                <#elseif customer.customerSourceType == 7>
+                                    有赞
                                 <#elseif customer.customerSourceType == 3>
-                                    ${customer.customerSource!''}
+
                                 </#if>
+                                 - ${customer.customerSource!''}
                             </td>
                             <td>${customer.typeName!''}</td>
                             <#--<td>${customer.complaintClassName!''}</td>-->

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

@@ -103,11 +103,31 @@
                         <label for="tel-2">微信公众号</label>
                     </div>
                     <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;">
+                    </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;">
+                    </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;">
+                    </div>
+                    <div class="radio-box">
+                        <input type="radio" id="tel-7" name="customerSourceType" value="7" <#if customerInfo.customerSourceType == 7 >checked</#if>>
+                        <label for="tel-7">有赞</label>
+                    </div>
+                    <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" 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="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"  >
                 </div>
             </div>
             <div class="row cl">
@@ -995,14 +1015,14 @@
 
 
         /*监听来源入口选择事件*/
-        $("input[name='customerSourceType']").change(function (){
-            var type = parseInt($(this).val());
-            if(type == 3){
-                $("#customerSourceOld").show();
-            }else{
-                $("#customerSourceOld").hide();
-            }
-        })
+//        $("input[name='customerSourceType']").change(function (){
+//            var type = parseInt($(this).val());
+//            if(type == 3){
+//                $("#customerSourceOld").show();
+//            }else{
+//                $("#customerSourceOld").hide();
+//            }
+//        })
 
         /*监听客诉类型选择事件*/
         $("input[name='customerCounselType']").change(function (){

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/salesOrder/sales_order_list.ftl

@@ -395,10 +395,10 @@
     $('#order_excel').click(function (e) {
        var isHaveImport = $("#isHaveImport").val();
        var isDeliverGoods = $("#isDeliverGoods").val();
-       var storeName = $("#efastStoreName").val();
+       var salesStoreId = $("#salesStoreId").val();
        var startDate = $("#startDate").val();
        var endDate = $("#endDate").val();
-        window.location="${path}/admin/salesOrder/download_efast_order?isHaveImport="+isHaveImport+"&isDeliverGoods="+isDeliverGoods+"&storeName="+storeName+"&startDate="+startDate+"&endDate="+endDate;
+        window.location="${path}/admin/salesOrder/download_efast_order?isHaveImport="+isHaveImport+"&isDeliverGoods="+isDeliverGoods+"&salesStoreId="+salesStoreId+"&startDate="+startDate+"&endDate="+endDate;
     })
 
 </script>

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

@@ -1657,11 +1657,23 @@ $(function(){
 
 /* 添加客诉的准备 */
 function addCustomerReady(){
-    //保存AQ
-    saveQuestion(2);
+    //保存QA
+    //saveQuestion(2);
+
+    var QAId = $("#questionId").val();
+    if(QAId == null || QAId == "" || typeof (QAId) == "undefined"){
+        return false;
+    }
 
     /* 是否需要添加订单,赋值 */
     $("#isNeedSelectOrder").val(isNeedSelectOrder);
+    if(isNeedSelectOrder == 1){
+        var post_ids = $("#ids").val();
+        if(post_ids == null || post_ids == ""){
+            layer.msg("请重新选择订单", {icon: 5, time: 3000});
+            phoneFlag = false;
+        }
+    }
 
     /* 录入电话号码和姓名到客诉基本信息里面  */
     /*if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 5 || allCustomerType == 6 || allCustomerType == 7){
@@ -1690,16 +1702,21 @@ function addCustomerReady(){
 
     /*验证来源入口*/
     var customerSourceType = $("input:radio[name='customerSourceType']:checked").val();
-    if(customerSourceType == 3){
-        var customerSourceOld = $("#customerSourceOld").val();
-        if(customerSourceOld == null || customerSourceOld == "" || typeof(customerSourceOld)=="undefined"){
-            vailErrorMsg($("#customerSourceOld"),"未填写来源入口");
-            return false;
-        }else{
-            $("#customerSource").val(customerSourceOld);
-        }
+    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();
+    //     if(customerSourceOld == null || customerSourceOld == "" || typeof(customerSourceOld)=="undefined"){
+    //         vailErrorMsg($("#customerSourceOld"),"未填写来源入口");
+    //         return false;
+    //     }else{
+    //         $("#customerSource").val(customerSourceOld);
+    //     }
+    // }
+
     /*根据产品类型,获取来源商城*/
     var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
     $("#typeCompany").val(typeCompany);