ソースを参照

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

# Conflicts:
#	watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
wangxiaoming 7 年 前
コミット
1e191bbd89

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

@@ -144,7 +144,7 @@ public class CustomerServiceImpl implements CustomerService {
             switch (customerInfo.getCustomerIsSolve()) {  //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
                 case 3: //换新
 
-                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder);    //原订单生成退单
+                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,2);    //原订单生成退单
 
                     map = this.sendEfastOrder(customerCommon,salesOrder);  //换新需要向Efast推送一条换新发货的订单
                     if(map.get("status") == 1){
@@ -160,7 +160,7 @@ public class CustomerServiceImpl implements CustomerService {
                     break;
                 case 4: //维修
 
-                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder);    //原订单生成退单
+                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,2);    //原订单生成退单
 
                     map = this.sendEfastOrder(customerCommon,salesOrder);  //维修需要向Efast推送一条维修发货的订单
                     if(map.get("status") == 1){
@@ -184,12 +184,18 @@ public class CustomerServiceImpl implements CustomerService {
                     }
                     break;
                 case 6: //退货
+
+                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,3);    //原订单生成退单
+
                     complaintSignclosedInfo.setOldEfastId(salesOrder.getSalesOrderId());    //原有订单的Efast的订单编号
                     this.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
                     complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储签收id
                     this.saveComplaintDetectInfo(complaintDetectInfo,customerCommon);   //创建品检
                     break;
                 case 7: //无理由退货
+
+                    isReturn = this.chargebackEfastOrder(customerCommon,salesOrder,3);    //原订单生成退单
+
                     complaintSignclosedInfo.setOldEfastId(salesOrder.getSalesOrderId());    //原有订单的Efast的订单编号
                     this.saveComplaintSignclosedInfo(complaintSignclosedInfo,customerCommon);//创建仓储任务
                     complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储签收id
@@ -253,7 +259,7 @@ public class CustomerServiceImpl implements CustomerService {
 
 
     /**
-     * 初始化
+     * 产品配件初始化
      * @param cc
      */
     private void setName(CustomerCommon cc){
@@ -460,6 +466,7 @@ public class CustomerServiceImpl implements CustomerService {
         map.put("status",status);
         if(oList != null && oList.size() > 0){
             map.put("EfastOrderId",oList.get(0).getOrderId());
+            logger.info("换新,维修 ,补发向Efast 推送订单,订单号为:" + oList.get(0).getOrderId());
         }
         return map;
     }
@@ -568,11 +575,11 @@ public class CustomerServiceImpl implements CustomerService {
      * @throws Exception
      */
     @Transactional
-    boolean chargebackEfastOrder(CustomerCommon customerCommon, SalesOrder salesOrder) throws Exception{
+    boolean chargebackEfastOrder(CustomerCommon customerCommon, SalesOrder salesOrder,Integer status) throws Exception{
 
         SalesOrder order = new SalesOrder();
         order.setSalesId(salesOrder.getSalesId());
-        order.setSalesStatus(8);
+        order.setSalesOrderStatus(status); //换货状态
         Integer flag = salesOrderMapper.updateSalesOrder(order);
 //        if(flag < 0){
 //            throw new Exception("退货失败");

+ 18 - 19
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -192,13 +192,10 @@ public class AdminCustomerController {
         salesOrder.setSalesOpenId("0");
         salesOrder.setSalesAmount(salesAmount);
         salesOrder.setSalesPayMoney(salesAmount);
-        salesOrder.setSalesPayStatus(2);
-        salesOrder.setSalesShippingStatus(5);
-        salesOrder.setSalesStatus(0);
         salesOrder.setSalesOrderStatus(1);
         salesOrder.setSalesCreateTime(new Date());
         //salesOrder.setSalesPayTime(new Date());
-        salesOrder.setSalesShippingFee(0);
+
         salesOrder.setSalesLastMoney(salesAmount);
         salesOrder.setSalesWaitMoney(0);
         salesOrder.setSalesPayMoney(salesAmount);
@@ -208,6 +205,15 @@ public class AdminCustomerController {
         salesOrder.setSalesRemainDeposit(0);
         salesOrder.setSalesType(1);
 
+        salesOrder.setSalesStatus(0);//确认状态:0(未确认)1(确认)2(挂起)3(作废)
+        salesOrder.setSalesShippingStatus(0);    //发货状态: 0(未发货)1(已发货,即已扫描出库)3(备货中)
+        salesOrder.setSalesPayStatus(2);   //已付款
+        salesOrder.setSalesProcessStatus(0);  //单据状态:0(正常单)1(问题单)
+        salesOrder.setSalesIsSend(0);        //0:否 1:是  是否通知配货
+        salesOrder.setSalesIsLocked(0); //是否锁定 0:否 1:是
+        salesOrder.setSalesIsSeparate(0);   //是否缺货  0:否 1:是
+        salesOrder.setSalesShippingFee(0); //邮费
+
         Integer adminId = AdminUtils.getLoginAdminId();
         String orderCode = OrderNoUtil.createOrderCode(adminId);
         salesOrder.setSalesDealCode(orderCode);
@@ -644,43 +650,38 @@ public class AdminCustomerController {
 
         String con = "";
         if(type != null && !"".equals(type)){
-            if( "p".equals(type)){
+            if( "p".equals(type)){ //problem" 问题处理;  mailAddress:邮寄地址;
                 url += "/"+complaintQuestionInfo.getQuestionId();
-
                 switch (typeCompany){
                     case 1:
-                        con = SmsConfig.SEND_PRODUCT_SMS_WATERO;
+                        con = SmsConfig.SEND_PRODUCT_SEND_WATERO;
                         break;
                     case 2:
-                        con = SmsConfig.SEND_PRODUCT_SMS_SHANGDUO;
+                        con = SmsConfig.SEND_PRODUCT_SEND_SHANGDUO;
                         break;
                     case 3:
-                        con = SmsConfig.SEND_PRODUCT_SMS_YULIA;
+                        con = SmsConfig.SEND_PRODUCT_SEND_YULIA;
                         break;
                 }
-
             }else if( "m".equals(type)){
                 complaintQuestionInfo.setQuestionName(null);
                 url += "/5";
-
                 switch (typeCompany){
                     case 1:
-                        con = SmsConfig.SEND_PRODUCT_SEND_WATERO;
+                        con = SmsConfig.SEND_PRODUCT_SMS_WATERO;
                         break;
                     case 2:
-                        con = SmsConfig.SEND_PRODUCT_SEND_SHANGDUO;
+                        con = SmsConfig.SEND_PRODUCT_SMS_SHANGDUO;
                         break;
                     case 3:
-                        con = SmsConfig.SEND_PRODUCT_SEND_YULIA;
+                        con = SmsConfig.SEND_PRODUCT_SMS_YULIA;
                         break;
                 }
             }
         }
 
-        logger.info("发送短信url地址:" + url);
-
-
         String text = MessageFormat.format(con, url);
+        logger.info("给 "+ phone +" 手机用户发送短信:" + text );
         String result = smsService.sendOtherCMS(phone, text);
 
         if("SUCCESS".equals(result)){
@@ -688,8 +689,6 @@ public class AdminCustomerController {
         }else{
             return new ResponseJson(200, "发送短信失败", 200);
         }
-
-
     }
 
     /**

+ 4 - 9
watero-rst-web/src/main/java/com/iamberry/rst/utils/test.java

@@ -1,16 +1,11 @@
 package com.iamberry.rst.utils;
+
 import com.auth0.jwt.internal.org.apache.commons.codec.binary.Base64;
 import com.auth0.jwt.internal.org.apache.commons.codec.binary.StringUtils;
-import net.sf.json.JSONObject;
-import org.apache.kafka.clients.consumer.ConsumerRecord;
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.security.Key;
 
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
+import java.security.Key;
 
 
 public class test {
@@ -27,12 +22,12 @@ public class test {
     }
 
 
-    public static void main(String[] args) throws Exception {
+  /*  public static void main(String[] args) throws Exception {
         ConsumerRecord<String, String> record = new ConsumerRecord<String, String>("4", 1, 1, "data", "{\"data\":\"7uiBfrOFcdy/EDWxcT6SlRwlTPRyTI7CHDtsa5VIbLtWgLCKxE4lMCo+4Njm/FyBhmZ8/vfzF9f8C5g7pKI8TvzaeeNu675pH3s5SP/5/bYUmZ5zICom6p41UxsMJ/+7uLSD3+B3uUc+buxwCELiRMiwsrdhUb4OObWd0tguFZdYQZrXGORTbQkUJIb7fctLuzR6OEBTmiC2H1/xEerFLua2LT4neI4VaHNC1MVW818=\"}");
         String appKey = "5kkyurvvtt58bbuxueee";//填APP KEY
         String secretKey = "rhj6na6u3y6uhy6qrbb3944mg5uqqpbb";//APP SECRET
         String data = decrypt(JSONObject.fromObject(record.value()).getString("data"),
                 secretKey.substring(8, 24));//解析后的真正数据
 System.out.println(data);
-    }
+    }*/
 }

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

@@ -280,16 +280,8 @@
                             <th style="text-align: center;">购买日期</th>
                         </tr>
                         <tr id="showOrder">
-                          <#--  <td>爱贝源-微信商城</td>
-                            <td>1290387806</td>
-                            <td>何小小</td>
-                            <td>1882222888</td>
-                            <td>¥3680</td>
-                            <td>Watero净水机</td>
-                            <td>2017-06-06</td>-->
+                            <td style="text-align: center;" colspan="7">暂未选择订单</td>
                         </tr>
-                        <#--<tr id="showOrderAddress">-->
-                        <#--</tr>-->
                     </table>
                     <input type="hidden" id="companyId" name="companyId" value="" >
                     <input type="hidden" id="storeId" name="storeId" value="" >
@@ -353,29 +345,9 @@
                             </tr>
                         </thead>
                         <tbody id="addProduct">
-                            <#--<tr >
-                                <td>冲奶机</td>
-                                <td>
-                                    <div>
-                                        白色
-                                        <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
-                                    </div>
-                                    <div>
-                                        白色
-                                        <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
-                                    </div>
-                                </td>
-                                <td>
-                                    <div>
-                                        水箱
-                                        <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
-                                    </div>
-                                    <div>
-                                        水箱
-                                        <input type="text" class="input-text" style="width: 40px;text-align: center;" value="1" placeholder="" id="" name="">
-                                    </div>
-                                </td>
-                            </tr>-->
+                            <tr id="showOrder">
+                                <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
+                            </tr>
                         </tbody>
                     </table>
 
@@ -407,8 +379,8 @@
             <div class="row cl" id="TDScollectShow" style="display: none;">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-6 col-sm-6">
-                    TDS收集:<span id="DTS-address"></span>
-                    &nbsp;&nbsp;&nbsp;&nbsp;进水:<span id="DTS-in"></span>PPM   出水:<span id="DTS-out"></span>PPM
+                    <span id="DTS-address"></span>
+                    &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"></span>&nbsp;&nbsp;  <span id="DTS-out"></span>
                 </div>
             </div>
             <div class="row cl" id="sendAddressInfo">
@@ -443,14 +415,16 @@
                         </tr>
                         </thead>
                         <tbody id="back-product">
-
+                            <tr id="showOrder">
+                                <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
 
             </div>
             <div class="row cl">
-                <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>处理描述:</label>
+                <label class="form-label col-1 col-sm-1">处理描述:</label>
                 <div class="formControls col-5 col-sm-5">
                     <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
                     </script>
@@ -461,16 +435,16 @@
                 <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="radio-box">
-                        <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" checked>
+                        <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" >
                         <label for="customer-visit-1">需要回访</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1">
+                        <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1" checked>
                         <label for="customer-visit-2">不需要回访</label>
                     </div>
                 </div>
             </div>
-            <div id="needToVisit">
+            <div id="needToVisit" style="display: none;">
                 <div class="row cl">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访人:</label>
                     <div class="formControls col-2 col-sm-2">
@@ -723,6 +697,9 @@
     /*  寄回地址的id */
     var complaint_questionId = 5;
 
+    /* 用于判断是否第一次初始化省市区-- 只在选择类型为售后时使用 */
+    var isInitAddress = 0;
+
     /*初始化页面参数*/
     $(function () {
         /* 初始化单选框样式 */
@@ -838,6 +815,30 @@
         });
     }
 
+    /*初始化单选框样式*/
+    function initCheckByNode(node){
+        node.iCheck({
+            checkboxClass: 'icheckbox-blue',
+            radioClass: 'iradio-blue',
+            increaseArea: '20%'
+        });
+    }
+
+    /*
+    * type 1:不需要回访  2:需要回访
+    * */
+    function visitByType(type){
+        if(1 == type){  //不需要回访
+            $("#customer-visit-2").prop("checked",true); //不需要回访
+            initCheckByNode($("#customer-visit-2"));
+            $("#needToVisit").css("display","none");
+        }else{
+            $("#customer-visit-1").prop("checked",true); //需要回访
+            initCheckByNode($("#customer-visit-1"));
+            $("#needToVisit").css("display","block");
+        }
+    }
+
     function keyFun(node){
         var c=$(node);
         if(/[^\d]/.test(c.val())){//替换非数字字符
@@ -848,13 +849,14 @@
 
 
     /*初始化客服*/
+    var sysAminList;
     function initSysAdmin() {
-        var sysAminList = getSysAdmin();
+        sysAminList = getSysAdmin();
         var html = "";
         for(var i=0;i<sysAminList.length;i++){
             var adminList = sysAminList[i];
             if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
-                html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
+                html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'(我)</option>';
             }else{
                 html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
             }
@@ -864,13 +866,12 @@
 
     /*初始化回访客服的选择*/
     function initVisitSysAdmin(){
-        var sysAminList = getSysAdmin();
         var html = "";
         var flag = false;
         for(var i=0;i<sysAminList.length;i++){
             var adminList = sysAminList[i];
             if(adminId != null && adminId != "" && adminId != 0 && adminId == adminList.adminId ){
-                html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'</option>';
+                html += '<option value="'+ adminList.adminId +'" selected>'+ adminList.adminName +'(我)</option>';
                 flag = true;
             }else{
                 html += '<option value="'+ adminList.adminId +'">'+ adminList.adminName +'</option>';
@@ -971,13 +972,16 @@
             $("#reissue").hide();
             $("#backGoods").hide();
             $("#noReasonBack").hide();
+
             switch(type)
             {
                 case 1:
                     otherHied();
+                    visitByType(1);
                     break;
                 case 2:
                     otherHied();
+                    visitByType(2);
                     break;
                 default:
                     break;
@@ -988,6 +992,15 @@
             if(msg == null || msg == ""){
                 initComplaintQuestionInfo("m");
             }
+
+            /* 在选择售后类型是,直接初始化省市区,使用isInitAddress 变量来判断 */
+            if(isInitAddress == 0){
+                var proId = setPro(null,2);
+                var cityId = setCity(null,proId,2);
+                setDistrict(null,cityId,2);
+                isInitAddress = 1;
+            }
+
             $("#renewed").show();
             $("#maintain").show();
             $("#reissue").show();
@@ -997,9 +1010,11 @@
             {
                 case 1:
                     otherHied();
+                    visitByType(1);
                     break;
                 case 2:
                     otherHied();
+                    visitByType(2); //需要回访
                     break;
                 case 3: //换新
                     result = isSolve.renewed;
@@ -1017,6 +1032,7 @@
                     $("#sendAddressByPhone").show();
                     $("#updateProduct").show();
                     $("#postageAccount").show();    //邮费转账账户
+                    visitByType(2); //需要回访
                     break;
                 case 4: //维修
                     result = isSolve.maintain;
@@ -1034,6 +1050,7 @@
                     $("#sendAddressByPhone").show();
                     $("#updateProduct").show();
                     $("#postageAccount").show();    //邮费转账账户
+                    visitByType(2); //需要回访
                     break;
                 case 5://补发
                     result = isSolve.reissue;
@@ -1051,6 +1068,7 @@
                     $("#sendAddressByPhone").hide();
                     $("#updateProduct").hide();
                     $("#postageAccount").hide();    //邮费转账账户 -- 隐藏
+                    visitByType(2); //需要回访
                     break;
                 case 6: //退货
                     result = isSolve.backGoods;
@@ -1068,6 +1086,7 @@
                     $("#sendAddressByPhone").show();
                     $("#updateProduct").hide();
                     $("#postageAccount").show();    //邮费转账账户
+                    visitByType(2); //需要回访
                     break;
                 case 7://无理由退货
                     result = isSolve.noReasonBack;
@@ -1085,6 +1104,7 @@
                     $("#sendAddressByPhone").show();
                     $("#updateProduct").hide();
                     $("#postageAccount").show();    //邮费转账账户
+                    visitByType(2); //需要回访
                     break;
                 default:
                     break;
@@ -1452,23 +1472,21 @@
         var selectPro = new Array();
         if(type == 1){
             selectPro = listProvince("",provinceName);
-        }else if(type == 2){
-            selectPro = null;
         }
         if(province!=null){
             var provinceHtml = ''
             for(var i=0;i<province.length;i++){
-                if(selectPro == null || selectPro.length < 1 || selectPro == undefined || typeof (selectPro.length) == "undefined"){
-                    selectPro.push(province[0]);
-                }
-                if(selectPro!= null && province[i].provinceId == selectPro[0].provinceId){
-                    proId = selectPro[0].provinceId;
-                    provinceHtml += '<option value="'+ province[i].provinceId +'" selected>'+ province[i].province +'</option>';
-                }else{
-                    provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
-                }
+                provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
             }
+
             $("#province").html(provinceHtml);
+
+            if(selectPro != null && selectPro.length > 0 ){
+                proId = selectPro[0].provinceId;
+            }else{
+                proId = province[0].provinceId;
+            }
+            $("#province option[value='" + proId + "']").attr("selected","true");
         }
         return proId;
     }
@@ -1483,25 +1501,20 @@
         var selectCity = new Array();
         if(type == 1){
             selectCity = listCity(proId,cityName);
-        }else if(type == 2){
-            selectCity = null;
-            cityId = city[0].cityId;
         }
 
         if(city!=null){
             var cityHtml = ''
-            if(selectCity == null || selectCity.length < 1 || selectCity == undefined || typeof (selectCity.length) == "undefined"){
-                selectCity.push(city[0]);
-            }
             for(var i=0;i<city.length;i++){
-                if(selectCity != null && city[i].cityId == selectCity[0].cityId){
-                    cityId = city[i].cityId;
-                    cityHtml += '<option value="'+ city[i].cityId +'" selected>'+ city[i].city +'</option>';
-                }else{
-                    cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
-                }
+                cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
             }
             $("#city").html(cityHtml);
+            if(selectCity != null && selectCity.length > 0 ){
+                cityId = selectCity[0].cityId;
+            }else{
+                cityId = city[0].cityId;
+            }
+            $("#city option[value='" + cityId + "']").attr("selected","true");
         }
         return cityId;
     }
@@ -1515,22 +1528,20 @@
         var selectDistrict = new Array();
         if(type == 1){
             selectDistrict = listDistrict(cityId,districtName);
-        }else if(type == 2){
-            selectDistrict = null;
         }
         if(district!=null){
             var districtHtml = ''
-            if(selectDistrict == null || selectDistrict.length < 1 || selectDistrict == undefined || typeof (selectDistrict.length) == "undefined"){
-                selectDistrict.push(district[0]);
-            }
             for(var i=0;i<district.length;i++){
-                if(selectDistrict != null && district[i].districtId == selectDistrict[0].districtId){
-                    districtHtml += '<option value="'+ district[i].districtId +'" selected>'+ district[i].district +'</option>';
-                }else{
-                    districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
-                }
+                districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
             }
+            var disId = "";
             $("#district").html(districtHtml);
+            if(selectDistrict != null && selectDistrict.length > 0 ){
+                disId = selectDistrict[0].cityId;
+            }else{
+                disId = district[0].cityId;
+            }
+            $("#city option[value='" + disId + "']").attr("selected","true");
         }
     }
 
@@ -1556,6 +1567,7 @@
         }
         $("#TDSArea").html(html);
         $("#TDSArea").find("option").eq(0).prop("selected",true);
+        setTDSCollect();
     }
 
     /**
@@ -1590,10 +1602,10 @@
                     if(color.colorProductId == product.productId) {
                         colorHtml += '<tr >' +
                                 '         <td width="85" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
-                                '         <td width="15" style="'+ fristInputStyle +'">' +
+                                '         <td width="15" style="'+ fristInputStyle +' padding: 0px;width: 25px;">' +
                                 '             <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
                                 '             <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
-                                '             <input type="text" class="input-text input-color-number number-input" style="width: 100%;" value="'+ number +'" placeholder="产品数量"  id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
+                                '             <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="产品数量"  id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
                                 '         </td>' +
                                 '     </tr>';
                         fristInputStyle = "";
@@ -1614,10 +1626,10 @@
                         var fristInputStyle = "border-top: 1px solid #ddd;";
                         produceFittingsHtml += '<tr >' +
                                 '         <td width="85" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
-                                '         <td width="15" style="'+ fristInputStyle +'">' +
+                                '         <td width="15" style="'+ fristInputStyle +'padding: 0px;width: 25px;">' +
                                 '             <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
                                 '             <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
-                                '             <input type="text" class="input-text input-fittings-number" style="width: 100%;" value="'+ number +'" placeholder="配件数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
+                                '             <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="'+ number +'" placeholder="配件数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
                                 '         </td>' +
                                 '     </tr>';
                         fristInputStyle = "";
@@ -1717,11 +1729,16 @@
     function setTDSCollect(){
         var TDSArea = $("#TDSArea").find("option:selected").text();
         var TDSAddress = TDSCity + '-' + TDSArea;
-        $("#DTS-address").html(TDSAddress);
-
-        $("#DTS-in").html($("#customerInTDS").val());
 
-        $("#DTS-out").html($("#customerOutTDS").val());
+        if(TDSAddress != null && TDSAddress != ""){
+            $("#DTS-address").html("地址:" + TDSAddress);
+            var customerInTDS = $("#customerInTDS").val();
+            var customerOutTDS = $("#customerOutTDS").val()
+            if(customerInTDS != null && customerInTDS != "" && customerOutTDS != null && customerOutTDS != ""){
+                $("#DTS-in").html("进水:" + customerInTDS + " PPM");
+                $("#DTS-out").html("出水:" + customerOutTDS + " PPM");
+            }
+        }
     }
 </script>
 <script>
@@ -1814,10 +1831,6 @@
 
         /*----处理描述- start --*/
         var describeHandleDescText = UE.getEditor('describeHandleDescText').getContent();
-        if(describeContentText == null || describeContentText == ""){
-            layer.msg("未填写处理描述", {icon: 5, time: 3000});
-            return false;
-        }
         $("#describeHandleDesc").val(describeHandleDescText);
         /*----处理描述--end-----*/
 

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

@@ -60,12 +60,12 @@
     <div class="order-list">
         <div class="text-c">
             <form action="" method="post">
-                <div class="row cl">
+                <div class="row cl" style="margin-left: 0px;">
 
                  <#--   <div class="formControls col-1 col-sm-1" style="margin-right: 30px;">
                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name="" onclick="addOrder()">添加订单</button>
                     </div>-->
-                    <div class="formControls col-2 col-sm-2" > <span class="select-box">
+                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" > <span class="select-box">
                         <select name="" class="select" id="companyId">
                              <option value="">销售公司</option>
                             <#if companyInfoList?? &&  (companyInfoList?size > 0) >
@@ -76,15 +76,18 @@
                         </select>
                         </span>
                     </div>
-                    <div class="formControls col-2 col-sm-2" > <span class="select-box">
+                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;"> <span class="select-box">
                         <select name="" class="select" id="storeId">
                         </select>
                         </span>
                     </div>
-                    <div class="formControls col-2 col-sm-2"> <span class="select-box">
+                    <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;"> <span class="select-box">
                         <select name="" class="select" id="storeId">
                             <option value="">所有类型</option>
-                            <option value="0">取消订单</option>
+                            <option value="1">正常</option>
+                            <option value="2">换货</option>
+                            <option value="3">退货</option>
+                            <#--<option value="0">取消订单</option>
                             <option value="1">待支付</option>
                             <option value="2">已支付</option>
                             <option value="3">退款申请中</option>
@@ -98,27 +101,26 @@
                             <option value="11">申请换货中</option>
                             <option value="12">已完成</option>
                             <option value="13">全额付款</option>
-                            <option value="14">定金付款</option>
+                            <option value="14">定金付款</option>-->
                         </select>
                         </span>
                     </div>
-                    <div class="formControls col-2 col-sm-2" >
+                    <div class="formControls col-2 col-sm-2"  style="padding: 0px 10px 0px 0px; width: 110px;">
                         <input type="text" class="input-text" value="" placeholder="订单编号" id="salesId" name="">
                     </div>
-                </div>
 
-                <div class="row cl" style="margin-top: 10px;">
+                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;" >
+                         <input type="text" class="input-text" value="" placeholder="收货人姓名" id="salesAddressName" name="">
+                     </div>
+                     <div class="formControls col-2 col-sm-2" style="padding: 0px 10px 0px 0px; width: 110px;">
+                         <input type="text" class="input-text" value="" placeholder="收货人电话" id="salesAddressTel" name="">
+                     </div>
+                     <div class="formControls col-1 col-sm-1" >
+                         <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+                     </div>
 
-                    <div class="formControls col-2 col-sm-2" >
-                        <input type="text" class="input-text" value="" placeholder="收货人姓名" id="salesAddressName" name="">
-                    </div>
-                    <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text" value="" placeholder="收货人电话" id="salesAddressTel" name="">
-                    </div>
-                    <div class="formControls col-1 col-sm-1">
-                        <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
-                    </div>
                 </div>
+
             </form>
         </div>
 
@@ -139,6 +141,11 @@
                 </thead>
                 <tbody id="orderAll">
 
+                     <tr class="text-c">
+                         <td colspan="9">没有搜索到订单~  <a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a>
+                         </td>
+                     </tr>
+
                 </tbody>
             </table>
         </div>
@@ -256,7 +263,7 @@
         });
 
         /*初始化  搜索订单  */
-        searchOrder();
+        //searchOrder();
 
 
     })
@@ -399,7 +406,7 @@
                 }
                 $("#salesAddressInfo").val(pro + "-" + city + "-" + dis + "-" + addres);
 
-                var itemList = new Array()
+                var itemList = new Array();
                 $("#addProduct").find(".input-color-number").each(function(){
                     var number = $(this).val();
                     if(number != null && number != ""){
@@ -410,6 +417,16 @@
                         itemList.push(salesOrderItem);
                     }
                 })
+//                $("#addProduct").find(".input-color-number").each(function(){
+//                    var number = $(this).val();
+//                    if(number != null && number != ""){
+//                        var salesOrderItem = new Object();
+//                        salesOrderItem.itemProductId = $(this).parent().find(".input-produce-id").val();
+//                        salesOrderItem.itemColorId = $(this).parent().find(".input-color-id").val();
+//                        salesOrderItem.itemNum = number;
+//                        itemList.push(salesOrderItem);
+//                    }
+//                })
                 $("#itemJson").val(JSON.stringify(itemList));
             },
             callback: function (data) {//异步回调函数