浏览代码

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

liujiankang 6 年之前
父节点
当前提交
ca4dccb38d

+ 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"/>

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

@@ -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
@@ -608,6 +609,8 @@ public class AdminCustomerController {
         customerInfo.setCustomerCommon(null);
         customerInfo.setComplaintDetectList(null);
         StitchAttrUtil.setModelAndView(customerInfo, mv, "/admin/customer/select_customer_list", pagedResult);
+        long y = new Date().getTime();
+        System.out.println("使用时间:"+(y-x));
         return mv;
     }
 
@@ -983,7 +986,6 @@ public class AdminCustomerController {
         }
         Integer flag = 0;
 
-
         Integer customerIsSolve = customerInfo.getCustomerIsSolve();    //处理类型
         String phone = customerInfo.getCustomerTel();       //手机号码
         Integer typeCompany = customerInfo.getTypeCompany();    // 所属商城   1:美国watero; 2:上朵电动牙刷  3:优尼雅净水机

+ 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("----订单号为空--");
 //                }

+ 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 (){

+ 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);