ソースを参照

客服反馈问题优化

liujiankang 5 年 前
コミット
145e6e8153

+ 10 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/SignclosedProductInfo.java

@@ -17,7 +17,7 @@ public class SignclosedProductInfo implements Serializable {
     private Integer productNum;//产品数量
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
-    private Integer signclosedProductType;//1 产品  2配件
+    private Integer signclosedProductType;
     private Integer signclosedProductId;//关联产品id  (根据产品类型判断)
     private Integer signclosedProductColor;//关联产品颜色id
     private String machineNo;//机器编号
@@ -27,6 +27,7 @@ public class SignclosedProductInfo implements Serializable {
     private String colorBar;//产品sku
     private Integer colorPrice;//产品价格
     private String signclosedLogisticsNumber;//物流单号
+    private String productTypeName;//产品型号名称
 
     public Integer getProductId() {
         return productId;
@@ -155,4 +156,12 @@ public class SignclosedProductInfo implements Serializable {
     public void setSignclosedLogisticsNumber(String signclosedLogisticsNumber) {
         this.signclosedLogisticsNumber = signclosedLogisticsNumber;
     }
+
+    public String getProductTypeName() {
+        return productTypeName;
+    }
+
+    public void setProductTypeName(String productTypeName) {
+        this.productTypeName = productTypeName;
+    }
 }

+ 8 - 6
watero-rst-core/src/main/java/com.iamberry.rst.core/tools/KuaiDi100.java

@@ -439,13 +439,13 @@ public class KuaiDi100 {
     /**
      * 百度快递查询
      * 根据物流单号查询快递信息 state 0在途,1揽收,2疑难,3签收,4退签,5派件,6退回
-     * @param code
+     * @param
      * @return
      */
     public JSONObject selectCourierCompany2(LogisticsInfo logisticsInfo,String num) {
         // 调用百度的接口
-        try {
-            /*String temp = logisticsConversions(code.toLowerCase());*/
+        /*try {
+            *//*String temp = logisticsConversions(code.toLowerCase());*//*
             String baiduURL = "https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?cb=cb&appid=4001&nu="+num+"&com="+logisticsInfo.getLogisticsOnehundredCode();
             String result = HttpClient431Util.doGet2(null, baiduURL,"BAIDUID=E157C876272626E1F7F498C10A6A3F00:FG=1");
             String content = result.substring(7, result.length());
@@ -460,7 +460,7 @@ public class KuaiDi100 {
         }*/
         // 调用快递鸟的接口
         try {
-            String result = selectCourierSF(logisticsInfo.getLogisticsRstCode(), num);
+            String result = selectCourierSF(logisticsInfo.getLogisticsRstCode().toUpperCase(), num);
             JSONObject jn = JSONObject.fromObject(result);
             if (result != null && jn.getInt("State") != 0) {
                 SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -483,6 +483,8 @@ public class KuaiDi100 {
                 msg.put("status","0");
                 msg.put("data",JSONObject.fromObject(data));
                 return JSONObject.fromObject(msg);
+            }else{
+                return jn;
             }
         } catch (Exception e) {
             LoggerFactory.getLogger(KuaiDi100.class).error("", e);
@@ -493,14 +495,14 @@ public class KuaiDi100 {
     /**
      * 百度快递查询签收时间
      * 根据物流单号查询快递信息 state 0在途,1揽收,2疑难,3签收,4退签,5派件,6退回
-     * @param code
+     * @param
      * @return
      */
     public Date selectCourierSignTime(LogisticsInfo logisticsInfo, String num){
         JSONObject json = null;
         for(int i = 0; i < 3; i++){
             json = selectCourierCompany2(logisticsInfo,num);
-            if(json.getString("status").equals("0")){
+            if(json == null || json.getString("State").equals("0")){
                 break;
             }
         }

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

@@ -97,7 +97,7 @@ public class CustomerServiceImpl implements CustomerService {
         QuestionDescribe questionDescribe = new QuestionDescribe();
         questionDescribe.setCustomerId(customerInfo.getCustomerId());
         questionDescribe.setDescribeTitle(customerInfo.getDescribeTitle());  //客诉问题标题
-        questionDescribe.setDescribeContent(customerInfo.getDescribeContent());  //客诉问题描述
+        questionDescribe.setDescribeContent(null);  //客诉问题描述
         questionDescribe.setDescribeHandleDesc(customerInfo.getDescribeHandleDesc());   //处理描述
         flag = questionDescribeMapper.insert(questionDescribe);
         if(flag < 1){
@@ -236,7 +236,7 @@ public class CustomerServiceImpl implements CustomerService {
 //        questionDescribe.setCustomerId(customerInfo.getCustomerId());
         questionDescribe.setDescribeId(customerInfo.getDescribeId());//客诉问题主键
         questionDescribe.setDescribeTitle(customerInfo.getDescribeTitle());  //客诉问题标题
-        questionDescribe.setDescribeContent(customerInfo.getDescribeContent());  //客诉问题描述
+        questionDescribe.setDescribeContent(null);  //客诉问题描述
         questionDescribe.setDescribeHandleDesc(customerInfo.getDescribeHandleDesc());   //处理描述
         flag = questionDescribeMapper.updateByPrimaryKeySelective(questionDescribe);
         if(flag < 1){

+ 4 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java

@@ -652,17 +652,18 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
             LogisticsInfo log = new LogisticsInfo();
             log.setLogisticsRstCode(signclosedInfo.getSignclosedLogistics());
             List<LogisticsInfo> listlog = logisticsInfoService.getLogisticsInfoList(log);
-            Date signTime = kuaidi100.selectCourierSignTime(listlog.get(0),signclosedInfo.getSignclosedLogisticsNumber());
+            /*Date signTime = kuaidi100.selectCourierSignTime(listlog.get(0),signclosedInfo.getSignclosedLogisticsNumber());*/
             SendbackInfo sendbackInfo = new SendbackInfo();
             sendbackInfo.setSendbackId(signclosedInfo.getSendbackId());
             sendbackInfo.setSendbackStatus(3);
             sendbackInfo.setSendbackLogisticsCompany(signclosedInfo.getSignclosedLogistics());
             sendbackInfo.setSendbackLogisticsNo(signclosedInfo.getSignclosedLogisticsNumber());
-            if (signTime != null) {
+            /*if (signTime != null) {
                 sendbackInfo.setSendbackSignTime(signTime);
             }else{
                 sendbackInfo.setSendbackSignTime(new Date());
-            }
+            }*/
+            sendbackInfo.setSendbackSignTime(new Date());
             if(record.getSendbackIsUse() != null){
                 sendbackInfo.setSendbackIsUse(record.getSendbackIsUse());
             }

+ 3 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml

@@ -100,11 +100,13 @@
     sp.signclosed_product_id signclosedProductId,
     sp.signclosed_product_color signclosedProductColor,
     pc.color_name colorName,
-    sp.product_num productNum
+    sp.product_num productNum,
+    pt.type_name productTypeName
     from
     tb_rst_complaint_signclosed_product sp
     LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
     LEFT JOIN tb_rst_product_info pi on pc.color_product_id = pi.product_id
+    LEFT JOIN tb_rst_product_type pt ON pt.type_id = sp.signclosed_product_type
     where sp.signclosed_id = #{signclosedId}
     GROUP BY sp.product_name,pc.color_name
   </select>

+ 30 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -2258,4 +2258,34 @@ public class AdminSalesOrderController {
         return rj;
     }
 
+    /**
+     * 取消通知配货
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping("/cancel_distribution")
+    @RequiresPermissions("salesOrder:distribution:salesOrder")
+    public ResponseJson cancelDistribution(HttpServletRequest request,String id) throws Exception {
+        ResponseJson rj = ResponseJson.getFAILURE();
+        if(id == null || "".equals(id)){
+            return rj;
+        }
+        Integer salesId = Integer.valueOf(id);
+        SalesOrder salesOrder = salesOrderService.getSalesOrderById(salesId);
+        //判断是否是已通知配货状态
+        if(salesOrder.getSalesShippingStatus() == 11){
+            SalesOrder order = new SalesOrder();
+            order.setSalesId(Integer.valueOf(id));
+            order.setSalesShippingStatus(0);
+            order.setSalesOldOrderStatus(11);
+            if(salesOrderService.update(order) > 0){
+                rj = new ResponseJson(200, "修改成功", 200);
+                return rj;
+            }
+        }
+        rj = new ResponseJson(500, "修改失败", 500);
+        return rj;
+    }
 }

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

@@ -222,7 +222,6 @@
                             <th style="text-align: center;" width="60">用户电话</th>
                             <th style="text-align: center;" width="60">处理方式</th>
                             <th style="text-align: center;" width="60">客诉问题</th>
-                            <th style="text-align: center;" width="60">问题简介</th>
                             <th style="text-align: center;" width="60">操作</th>
                         </tr>
                         </thead>
@@ -311,15 +310,15 @@
                 </div>
             </div>
 
-            <div class="row cl">
+            <#--<div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
                 <div class="formControls col-9 col-sm-9">
-                    <input type="hidden" name="questionId" id="questionId" value="">
+
                     <script id="describeContentText" type="text/plain" style="width:100%;height:150px;"></script>
                     <input type="hidden" name="describeContent" id="describeContent" value="">
                 </div>
-            </div>
-
+            </div>-->
+            <input type="hidden" name="questionId" id="questionId" value="">
             <div class="row cl">
             <#--处理描述 - 客诉备注-->
                 <label class="form-label col-1 col-sm-1">问题描述:</label>

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

@@ -289,17 +289,17 @@
                 </div>
             </div>
 
-            <div class="row cl">
+            <#--<div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题回复:</label>
                 <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:100%;height:250px;"></script>
                     </script>
                     <input type="hidden" name="describeContent" id="describeContent" value="">
-                    <input type="hidden" name="describeId" id="describeId" value="">
                 </div>
-            </div>
-
+            </div>-->
+            <input type="hidden" name="questionId" id="questionId" value="${customerInfo.questionId!''}">
+            <input type="hidden" name="describeId" id="describeId" value="">
             <div class="row cl">
             <#--处理描述 - 客诉备注-->
                 <label class="form-label col-1 col-sm-1">问题描述:</label>
@@ -1035,9 +1035,9 @@
                     $("#describeId").val(questionDescribe.describeId);
                     $("#describeHandleDesc").val(questionDescribe.describeHandleDesc);
 
-                    describeContentText.ready(function(){
+                    /*describeContentText.ready(function(){
                         describeContentText.setContent(questionDescribe.describeContent);
-                    });
+                    });*/
                     describeHandleDescText.ready(function(){
                         describeHandleDescText.setContent(questionDescribe.describeHandleDesc);
                     });

+ 5 - 27
watero-rst-web/src/main/webapp/WEB-INF/views/order/excel_to_order_new.ftl

@@ -535,22 +535,23 @@
                 layer.msg('加载失败,请重试!',{icon: 5,time:3000});
             } else {
                     $("#selectStore").html("");
-                    var temp;
+                    var temp = "";
                     for (var i = 0; i < result.returnMsg.values.length; i++) {
                         temp += '<tr class="text-c">'
                              + '<td style=" width: 265px;">' + result.returnMsg.values[i] + '</td>'
                              + '<td style="text-align: left;">'
                              + '<label>'
-                             + '<select class="chosen order_store_select" name="states" id="" style="height: 30px;width: 180px;margin: 0px;">';
+                             + '<select class="chosen order_store_select" name="states" id="statesId'+i+'" style="height: 30px;width: 180px;margin: 0px;">';
                         for (var j = 0; j < result.returnMsg.stores.length; j++) {
                             temp += '<option value="' + result.returnMsg.values[i] + '_' + result.returnMsg.stores[j].storeId + '" >' + result.returnMsg.stores[j].storeName + '</option>'
                         }
                         temp += '</select></label>'
                              + '</td>'
                              + '</tr>';
-
+                        $("#selectStore").append(temp);
+                        $("#statesId"+i).chosen({allow_single_deselect:true});
+                        temp = "";
                     }
-                    $("#selectStore").html(temp);
             }
             layer.close(index);
         });
@@ -764,28 +765,5 @@
         search_contains:false,
         enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
     });
-    chonsens();
-    function chonsens() {
-        $('.chosen').chosen({
-            no_results_text: "没有找到结果!",//搜索无结果时显示的提示
-            search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
-            allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
-            disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
-            disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
-            inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
-            placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
-            width: '227px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
-            max_shown_results: 1000, //下拉框最大显示选项数量
-            display_disabled_options: false,
-            single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
-            case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
-            group_search: false, //选项组是否可搜。此处搜索不可搜
-            include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
-        });
-        $('.chosen2').chosen({
-            search_contains:false,
-            enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
-        });
-    }
 </script>
 </html>

+ 2 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl

@@ -389,6 +389,7 @@
             url: "${path}/admin/customer/select_storeInfo",
             success: function(data){
                 $("#salesStoreId").empty();    //清空下拉框
+                $("#salesStoreId").append("<option  value=''></option>");
                 if (data.returnCode == 200) {
                     for(var i=0;i<data.returnMsg.storeInfoList.length;i++){
                         var storeInfo = data.returnMsg.storeInfoList[i];
@@ -409,7 +410,7 @@
         disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
         disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
         inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
-        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        placeholder_text_single: '选择店铺', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
         width: '260px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
         max_shown_results: 1000, //下拉框最大显示选项数量
         display_disabled_options: false,

+ 30 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -267,6 +267,9 @@
                         <a class="edit_order_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="修改订单" alt="修改订单" onclick="sales_order_update(${order.salesId!''})">
                             <i class="Hui-iconfont">&#xe6df;</i>
                         </a>
+                        <a class="order_cancel_distribution" style="text-decoration:none;display: none" href="javascript:void(0);" title="撤销配货" alt="撤销配货" onclick="cancelDistribution(${order.salesId!''})">
+                            <i class="Hui-iconfont">&#xe66b;</i>
+                        </a>
                         <a class="allocation_logistics_target" style="text-decoration:none;display: none" href="javascript:void(0);" title="分配物流" onclick="distribution_express(${order.salesId!''})">
                             <i class="Hui-iconfont">&#xe669;</i>
                         </a>
@@ -401,12 +404,13 @@
                                tr.find(".manual_ship_target").show();
                                tr.find(".invalid_order_target").show();
                                tr.find(".del_order_target").show();
+                               tr.find(".order_cancel_distribution").show();
                            } else {
                                // 已出库
                                tr.find(".order_details_target").show();
                                tr.find(".invalid_order_target").show();
                            }
-                       } else if (orderStatus == "0") {
+                       }else if (orderStatus == "0") {
                            // 未发货
                            tr.find(".order_details_target").show();
                            tr.find(".allocation_logistics_target").show();
@@ -415,6 +419,7 @@
                            tr.find(".notice_distribution_target").show();
                            tr.find(".del_order_target").show();
                            tr.find(".split_order_target").show();
+                           tr.find(".edit_order_target").show();
                        } else {
                            tr.find(".order_details_target").show();
                            tr.find(".invalid_order_target").show();
@@ -829,6 +834,30 @@ function isConfirm(salesOrderIds,isSplit) {
                 });
             });
         }
+        /**
+         * 撤销通知配货
+         */
+        function cancelDistribution(salesId) {
+                $.ajax({
+                    type:'POST',
+                    url: '${path}/admin/salesOrder/cancel_distribution',
+                    data:{
+                        "id" : salesId
+                    },
+                    dataType: 'json',
+                    success:function(res) {
+                        if(res.resultCode == 200 && res.returnCode == 200){
+                            layer.alert("撤销成功!", function(index){
+                                location.reload();
+                            });
+
+                        }else{
+                            layer.alert("撤销失败!");
+                        }
+                        return false;
+                    }
+                });
+        }
 
         /**
          *跳转到详情页面

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

@@ -30,11 +30,11 @@ $(document).on('click', '.dalog-ask .answer', function() {
 
     var questionId = $(this).find(".quesId").val();
     var title = $(this).find("span").html();
-    var desc = $(this).find("#questionProfile").html();
+    /*var desc = $(this).find("#questionProfile").html();*/
 
     $("#questionId").val(questionId);
     $("#describeTitle").val(title);
-    UE.getEditor('describeContentText').setContent(desc);
+    /*UE.getEditor('describeContentText').setContent(desc);*/
 
     //$("#answer-textarea").text();
     $(".dalog-ask").hide(); //隐藏qa
@@ -140,13 +140,13 @@ var tool = [
 ];
 
 /*问题描述*/
-var describeContentText = UE.getEditor('describeContentText', {
+/*var describeContentText = UE.getEditor('describeContentText', {
     toolbars: [tool],
     autoHeightEnabled: true,
     autoFloatEnabled: true,
-    elementPathEnabled : false,/*去掉元素路径*/
+    elementPathEnabled : false,/!*去掉元素路径*!/
     zIndex : 5
-});
+});*/
 /*处理描述*/
 var describeHandleDescText = UE.getEditor('describeHandleDescText', {
     toolbars: [tool],
@@ -744,7 +744,7 @@ function sendPhone(type,node){
         phone = $("#p-phone").val();
         questionId = $("#questionId").val();
         describeTitle = $("#describeTitle").val();
-        desc = UE.getEditor('describeContentText').getContent();
+        /*desc = UE.getEditor('describeContentText').getContent();*/
         smallClassId = $("#smallClassId").val();
         if(smallClassId == null || smallClassId == "" ){
             layer.close(index);
@@ -761,11 +761,11 @@ function sendPhone(type,node){
             layer.msg("问题标题长度不能高于50个字符!", {icon: 5, time: 3000});
             return false;
         }
-        if(desc == null || desc == ""){
+        /*if(desc == null || desc == ""){
             layer.close(index);
             layer.msg("请填写问题回复!", {icon: 5, time: 3000});
             return false;
-        }
+        }*/
     }else if(type == "m"){
         phone = $("#m-phone").val();
         questionId = complaint_questionId;
@@ -790,8 +790,7 @@ function sendPhone(type,node){
             phone : phone,
             questionId : questionId,
             smallClassId : smallClassId,
-            questionName : describeTitle,
-            questionProfile : desc       //回复内容
+            questionName : describeTitle
         },
         url: url_path + "/admin/customer/send_phone_sms",
         async: true,
@@ -834,7 +833,6 @@ function saveQuestion(type){
 
     questionId = $("#questionId").val();
     describeTitle = $("#describeTitle").val();
-    desc = UE.getEditor('describeContentText').getContent();
     smallClassId = $("#smallClassId").val();
     if((smallClassId == null || smallClassId == "") && (questionId == null || questionId == "") ){
         layer.close(index);
@@ -846,19 +844,13 @@ function saveQuestion(type){
         layer.msg("请填写问题标题!", {icon: 5, time: 3000});
         return false;
     }
-    if(desc == null || desc == ""){
-        layer.close(index);
-        layer.msg("请填写问题回复!", {icon: 5, time: 3000});
-        return false;
-    }
 
     $.ajax({
         type: "POST",
         data: {
             questionId : questionId,
             smallClassId : smallClassId,
-            questionName : describeTitle,
-            questionProfile : desc       //回复内容
+            questionName : describeTitle
         },
         url: url_path + "/admin/complaintQuestion/save_question",
         async: false,
@@ -1277,18 +1269,7 @@ function addCustomerReady(){
         vailErrorMsg($("#questionId"),"未保存QA!");
         return false;
     }
-    var describeContentText = UE.getEditor('describeContentText').getContent();
-    if(describeContentText == null || describeContentText == ""){
-        //layer.msg("未填写问题描述", {icon: 5, time: 3000});
-        vailErrorMsg($("#describeTitle"),"未填写问题描述");
-        return false;
-    }
-    if(describeContentText.length > 3000){
-        vailErrorMsg($("#describeContent"),"问题回复最大支持3000个字符");
-        return false;
-    }
-    $("#describeContent").val(describeContentText);
-    /*----问题描述--end-----*/
+
 
     /*----处理描述- start --*/
     var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
@@ -1442,7 +1423,6 @@ function selectOnCustomer() {
                            ' <td style="text-align: center;">'+onCustomer.customerTel +'</td>' +
                            ' <td style="text-align: center;">'+customerIsSolve +'</td>' +
                            ' <td style="text-align: center;">'+onCustomer.describeTitle +'</td>' +
-                           ' <td style="text-align: center;"><span class="txt2" style="display: inline-block;padding: 2px 4px;font-size: 11.844px;" title="'+onCustomer.describeContent +'" >'+onCustomer.describeContent +'</span></td>' +
                            ' <td style="text-align: center;"><a onclick="admin_update_customer('+onCustomer.customerId +')">继续跟进</a>' +
                            '<br><a onclick="markedSecondary('+onCustomer.customerId +','+onCustomer.customerInitialId +',this)">标记为二次售后</a>' +
                            '<a style="display: none;" onclick="cancelMarkedSecondary('+onCustomer.customerId+','+onCustomer.customerInitialId +',this)">取消二次售后标记</a></td>' +

+ 18 - 7
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -327,13 +327,24 @@ function setSelectCustomer(customerId){
                         if(detet.detectState === 37 ){
                             detectStateName = "原机退回,待发货";
                         }
-                        html += '<tr class="text-c">' +
-                            ' <td><input type="radio" name="detectId" value="'+detet.detectId+'"><label></td>' +
-                            ' <td>'+ cufte(detet.detectNumber) +'</td>' +
-                            ' <td>'+ detectStateName +'</td>' +
-                            ' <td>'+ cufte(detet.productName) +'</td>' +
-                            ' <td>'+ cufte(detet.colorName) +'</td>' +
-                            ' </tr>';
+                        if(i === 0){
+                            html += '<tr class="text-c">' +
+                                ' <td><input type="radio" name="detectId" value="'+detet.detectId+'" checked><label></td>' +
+                                ' <td>'+ cufte(detet.detectNumber) +'</td>' +
+                                ' <td>'+ detectStateName +'</td>' +
+                                ' <td>'+ cufte(detet.productName) +'</td>' +
+                                ' <td>'+ cufte(detet.colorName) +'</td>' +
+                                ' </tr>';
+                        }else{
+                            html += '<tr class="text-c">' +
+                                ' <td><input type="radio" name="detectId" value="'+detet.detectId+'"><label></td>' +
+                                ' <td>'+ cufte(detet.detectNumber) +'</td>' +
+                                ' <td>'+ detectStateName +'</td>' +
+                                ' <td>'+ cufte(detet.productName) +'</td>' +
+                                ' <td>'+ cufte(detet.colorName) +'</td>' +
+                                ' </tr>';
+                        }
+
                     }
                     $("#detect_product").html(html);
                 }