Browse Source

增加店铺

wangxiaoming 7 years ago
parent
commit
bd343e5fdb
17 changed files with 738 additions and 228 deletions
  1. 191 115
      iamberry-wechat-web/src/main/webapp/WEB-INF/views/wechat/vip_center.html
  2. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java
  3. 4 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/QuestionDescribe.java
  4. 44 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerCommonService.java
  5. 7 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/QuestionDescribeService.java
  6. 80 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerCommonServiceImpl.java
  7. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/QuestionDescribeServiceImpl.java
  8. 13 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintQuestionInfoMapper.xml
  9. 22 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  10. 6 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/questionDescribeMapper.xml
  11. 12 12
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  12. 16 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/visitMapper.xml
  13. 88 8
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  14. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl
  15. 236 77
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl
  16. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/batch/add_batch.ftl
  17. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/batch/update_batch.ftl

+ 191 - 115
iamberry-wechat-web/src/main/webapp/WEB-INF/views/wechat/vip_center.html

@@ -1,140 +1,216 @@
 <!DOCTYPE html>
 <html>
 	<head>
-		<meta charset="UTF-8">
-		<title></title>
+		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
 		<meta name="apple-mobile-web-app-capable" content="yes">
 		<meta name="apple-mobile-web-app-status-bar-style" content="black">
-		<link rel="stylesheet" type="text/css" href="http://static.iamberry.com/css/mui.min.css?v=2016101701" />
-		<link rel="stylesheet" type="text/css" href="http://static.iamberry.com/css/shop/iconfont.css?v=2016101701" />
-		<link rel="stylesheet" type="text/css" href="http://static.iamberry.com/css/shop/style.css?v=2016101701" />
-		<link rel="stylesheet" type="text/css" href="http://static.iamberry.com/css/shop/vip_center.css?v=2016101701" />
+		<title>我的</title>
+		<link rel="stylesheet" type="text/css" href="//s.iamberry.com/wechat/aiberle/css/mui.min.css?v=20180105" />
+		<link rel="stylesheet" type="text/css" href="//s.iamberry.com/wechat/aiberle/css/iconfont.css?v=20180105" />
+		<link rel="stylesheet" type="text/css" href="//s.iamberry.com/wechat/aiberle/css/main.css?v=20180105" />
+		<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
+
 		<script>
 			// 屏蔽分享
 			window.hiddenAllWechatMenu = true;
 		</script>
 	</head>
 	<body>
-	<div class="loading-bg">
-			<div class="mui-loading">
-				<div class="mui-spinner">
+	<footer class="mui-bar mui-bar-tab">
+		<a class="mui-tab-item" href="#tabbar">
+			<span class="iconfont icon-shouye"></span>
+			<span class="mui-tab-label">首页</span>
+		</a>
+		<a class="mui-tab-item" href="#tabbar-with-chat">
+			<span class="iconfont icon-gouwuche"></span>
+			<span class="mui-tab-label">购物车</span>
+		</a>
+		<a class="mui-tab-item" href="#tabbar-with-contact">
+			<span class="iconfont icon-dingdan"></span>
+			<span class="mui-tab-label">订单</span>
+		</a>
+		<a class="mui-tab-item mui-active" href="#tabbar-with-map">
+			<span class="iconfont icon-wode"></span>
+			<span class="mui-tab-label">我的</span>
+		</a>
+	</footer>
+	<div class="mui-content">
+		<div style="position: relative;">
+			<img width="100%" src="//s.iamberry.com/wechat/aiberle/images/top-1.png" />
+			<div style="position: absolute;left: 0; top: 45%;-webkit-transform: translateY(-50%);width: 100%;text-align: center;">
+				<div class="user-head">
+					<img id="headDiv" src="" />
 				</div>
-				&nbsp;&nbsp;加载中...
+				<div id="userNickname">微微一笑倾城</div>
 			</div>
 		</div>
-	<nav class="mui-bar mui-bar-tab" id="footer-bar">
-			<a class="mui-tab-item" >
-				<div class="iconfont icon-home"></div>
-				<span class="mui-tab-label">首页</span>
-			</a>
-			<a class="mui-tab-item">
-				<div class="iconfont icon-gouwuche"><span class="mui-badge">0</span></div>
-				<span class="mui-tab-label">购物车</span>
-			</a>
-			<a class="mui-tab-item">
-				<div class="iconfont icon-dingdan"></div>
-				<span class="mui-tab-label">我的订单</span>
-			</a>
-			<a class="mui-tab-item mui-active">
-				<div class="iconfont icon-vip"></div>
-				<span class="mui-tab-label">会员中心</span>
-			</a>
-	</nav>
-	<div class="mui-content">
-				<div class="vip-tt">
-				<!-- <img src="/iamberry/common/shop/images/member_photo-bg_2.png"> -->
-				<div class="tx bg-orange" id="headDiv">
-					<img src="http://static.iamberry.com/images/shop/logo_head.png" id="userHead">
+		<div style="padding:0;background: #fff;margin-bottom: 8px;">
+			<div id="menu-nav" class="mui-segmented-control">
+				<a class="mui-control-item">
+					<div class="iconfont icon-quanbao"></div>
+					券包
+				</a>
+				<a class="mui-control-item">
+					<div class="iconfont icon-zhibaoqia"></div>
+					质保卡
+				</a>
+				<a class="mui-control-item">
+					<div class="iconfont icon-dingdan"></div>
+					订单
+				</a>
+			</div>
+		</div>
+		<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed my-center-no">
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5 table-middle">
+						<span class="iconfont icon-zhinan"></span>产品指南
+					</div>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<span class="mui-icon mui-icon-arrowright"></span>
+					</div>
 				</div>
-				<div class="nikname">
-					<div>
-						<span id="userNickname">爱贝源<img class="vip_icon" src="http://static.iamberry.com/images/shop/dl_icon.png" /></span>
+			</li>
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5">
+						<span class="iconfont icon-liucheng"></span>售后流程
 					</div>
-					<div>
-						<span class="go_daili_2wm"  id="2WM">立即分享二维码 ></span> 
-						<span class="btn_share to-up-img">我要分享</span>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<span class="mui-icon mui-icon-arrowright"></span>
 					</div>
 				</div>
-			</div>
-			<div style="padding:0;background: #fff;margin-bottom: 8px;">
-				<div id="menu-nav" class="mui-segmented-control">
-					<a class="mui-control-item go_cash_log">
-						<div class="iconfont icon-orderyue"></div>
-						余额
-					</a>
-					<a class="mui-control-item go_daili_order_list">
-						<div class="iconfont icon-orderjiangli"></div>
-						待奖励
-					</a>
-					<a class="mui-control-item go_couponList">
-						<div class="iconfont icon-orderyouhui"></div>
-						优惠券
-					</a>
-					<a class="mui-control-item go_gwc">
-						<div class="iconfont icon-ordercart"></div>
-						购物车
-					</a>
+			</li>
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5">
+						<span class="iconfont icon-wenda"></span>常见问答
+					</div>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<span class="mui-icon mui-icon-arrowright"></span>
+					</div>
 				</div>
-			</div>
-			<ul class="mui-table-view my-view-order">
-				<li class="mui-table-view-cell">
-					<a class="mui-navigate-right go_pay_count">
-						我的订单
-					</a>
-				</li>
-			</ul>
-			<div style="padding:0;background: #fff;margin-bottom: 8px;">
-				<div id="menu-order" class="mui-segmented-control">
-					<a class="mui-control-item go_pay_count">
-						<div class="iconfont icon-daifukuan"></div>
-						待付款
-					</a>
-					<a class="mui-control-item go_deliver_count">
-						<div class="iconfont icon-daifahuo"></div>
-						待发货
-					</a>
-					<a class="mui-control-item go_delivered_count">
-						<div class="iconfont icon-yifahuo"></div>
-						已发货
-					</a>
-					<a class="mui-control-item go_all_count">
-						<div class="iconfont icon-alldingdan"></div>
-						全部订单
-					</a>
+			</li>
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5">
+						<span class="iconfont icon-dianhua"></span>客服电话
+					</div>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<a href="tel:400-1234-123">400-1234-123</a> <span class="mui-icon mui-icon-arrowright"></span>
+					</div>
 				</div>
-			</div>
-			<ul class="mui-table-view mui-grid-view mui-grid-9" id="my-grid-8">
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-xiaxian"></span>
-		                    <div class="mui-media-body">我的萌友</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-liwu"></span>
-		                    <div class="mui-media-body">最萌礼物</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-renwu"></span>
-		                    <div class="mui-media-body">奖励任务</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-wheel"></span>
-		                    <div class="mui-media-body">我的奖品</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-naifen"></span>
-		                    <div class="mui-media-body">奶粉信息</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-shouhou"></span>
-		                    <div class="mui-media-body">售后服务</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-kefu"></span>
-		                    <div class="mui-media-body">客服电话</div></a></li>
-		            <li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3"><a>
-		                    <span class="iconfont icon-order"></span>
-		                    <div class="mui-media-body">常见问答</div></a></li>
-		    </ul>			
+			</li>
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5">
+						<span class="iconfont icon-dansheng"></span>Aiberle诞生
+					</div>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<span class="mui-icon mui-icon-arrowright"></span>
+					</div>
+				</div>
+			</li>
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5">
+						<span class="iconfont icon-linian"></span>Aiberle故事
+					</div>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<span class="mui-icon mui-icon-arrowright"></span>
+					</div>
+				</div>
+			</li>
+			<li class="mui-table-view-cell">
+				<div class="mui-table">
+					<div class="mui-table-cell mui-col-xs-5">
+						<span class="iconfont icon-shiming"></span>Aiberle历程
+					</div>
+					<div class="mui-table-cell mui-col-xs-5 mui-text-right">
+						<span class="mui-icon mui-icon-arrowright"></span>
+					</div>
+				</div>
+			</li>
+		</ul>
+		<br />
+	</div>
+
+	<!-- 加载ing -->
+	<div class="loading covers">
+		<div class="loading-bj"></div>
+		<p>加载中...</p>
 	</div>
-	<script src="http://static.iamberry.com/js/mui.min.js?v=2016101701"></script>
-	<script src="http://static.iamberry.com/js/jquery-2.1.1.min.js"></script>
-	<script src="http://static.iamberry.com/js/shop/main.js?v=2016101701"></script>
+	<!-- 加载ing END -->
+	<script src="//s.iamberry.com/wechat/aiberle/js/mui.min.js"></script>
+	<script src="//s.iamberry.com/wechat/aiberle/js/jquery-2.1.1.min.js"></script>
+	<script src="//s.iamberry.com/wechat/aiberle/js/main.js"></script>
+	<script>
+        mui.ready(function() {
+            $(".loading").hide().css("opacity", "0");
+        });
+        $(document).on('tap', '.my-btn-cancel', function() {
+            $(this).hide();
+            $('#search-hot').hide();
+            $('#search').autocompleter("close");
+            $(".autocompleter-list").empty().css("height","auto");
+            $('.autocompleter-hint').removeClass('autocompleter-hint-show').empty();
+            $(".icon-caidan").show();
+        });
+        $(document).on('tap', '.icon-caidan', function() {
+            $("#menu").css("height",$(window).height());
+            $("#menu>li").addClass("active");
+        });
+        $(document).on('tap', '.icon-guanbi', function() {
+            $("#menu>li").removeClass("active");
+            $("#menu").css("height","0px");
+        });
+	</script>
+	<!--<script src="http://static.iamberry.com/js/mui.min.js?v=2016101701"></script>-->
+	<!--<script src="http://static.iamberry.com/js/jquery-2.1.1.min.js"></script>-->
+	<!--<script src="http://static.iamberry.com/js/shop/main.js?v=2016101701"></script>-->
 	<script src="http://static.iamberry.com/js/shop/wechat-utils-1.0.js"></script>
-	<script src="http://static.iamberry.com/js/shop/vip_center.js?v=2016101701"></script>
+	<!--<script src="http://static.iamberry.com/js/shop/vip_center.js"></script>-->
+
+	<script>
+        mui.ready(function(){
+            mui.ajax( base_path + '/wechat/agent/member?dates=' + new Date().getTime(),{
+                dataType:'json',
+                type:'post',
+                timeout:15000,
+                success:function(dt){
+                    var data = dt.data;
+                    //console.log(dt)
+                    if(dt.status){
+//                        userIdentity = data.userIdentity;
+                        if(data.userHead != null  && typeof(data.userHead)!="undefined" && data.userHead != ''){
+                            //var imgObj = $("<img src='" + data.userHead + "?" + new Date().getTime() + "'/>");
+                            $("#headDiv").attr("src",data.userHead);
+                        }
+                        if(data.userNickname != null  && typeof(data.userNickname)!="undefined" && data.userNickname != ''){
+                            $("#userNickname").html(decodeURI(data.userNickname));
+                        }
+//                        $("#userNickname").append('<img class="vip_icon" src="http://static.iamberry.com/images/shop/dl_icon.png" />');
+//                        document.querySelector('.loading-bg').style.display='none';
+
+
+                    }else{
+//                        var btnArray = ['否', '是'];
+//                        mui.confirm(dt.message, '爱贝源-提示', btnArray, function(e) {
+//                            if (e.index == 1) {
+//                                location.reload(true);
+//                            }
+//                        });
+                    }
+                },
+                error:function(xhr,type,errorThrown){
+                    //异常处理;
+                    errorfn(xhr);
+                }
+            });
+		})
+
+//
+	</script>
 	</body>
 </html>

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

@@ -81,6 +81,8 @@ public class CustomerCommon implements Serializable {
     private Integer detectState;
     //外部交易号
     private String transactionNumber;
+    //  处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
+    private Integer customerIsSolve;
 
     public Integer getDetectState() {
         return detectState;
@@ -362,6 +364,14 @@ public class CustomerCommon implements Serializable {
         this.transactionNumber = transactionNumber;
     }
 
+    public Integer getCustomerIsSolve() {
+        return customerIsSolve;
+    }
+
+    public void setCustomerIsSolve(Integer customerIsSolve) {
+        this.customerIsSolve = customerIsSolve;
+    }
+
     /**
      * @param type 处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
      * @return

+ 4 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/QuestionDescribe.java

@@ -15,7 +15,10 @@ public class QuestionDescribe implements Serializable {
     //   客诉主键  ,
     private Integer customerId;
 
-    //处理描述:用于新建客诉的时候的处理描述----> 客服备注 --> 问题描述
+    /**
+     * 处理描述:用于新建客诉的时候的处理描述----> 客服备注 --> 问题描述
+     * 问题描述详情,内部使用,不会对外公布。
+     */
     private String describeHandleDesc;
 
     private String describeTitle;   //客诉标题

+ 44 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerCommonService.java

@@ -0,0 +1,44 @@
+package com.iamberry.rst.faces.cm;
+
+import com.iamberry.rst.core.cm.*;
+
+import java.util.List;
+
+public interface CustomerCommonService {
+    /**
+     * 获取寄回配件
+     * @param closedFitting
+     * @return
+     */
+    List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting);
+
+    /**
+     * 获取寄回产品
+     * @param closedProdcue
+     * @return
+     */
+    List<ClosedProdcue> listClosedProdcue(ClosedProdcue closedProdcue);
+
+    /**
+     * 获取寄送产品
+     * @param sendProdcue
+     * @return
+     */
+    List<SendProdcue> listSendProdcue(SendProdcue sendProdcue);
+
+    /**
+     * 获取寄送配件
+     * @param sendFitting
+     * @return
+     */
+    List<SendFitting> listSendFitting(SendFitting sendFitting);
+
+    /**
+     * 获取寄送寄回的产品和配件
+     * @param customerCommon
+     * @return
+     */
+    CustomerCommon getListProduceAndFitting(CustomerCommon customerCommon);
+
+
+}

+ 7 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/QuestionDescribeService.java

@@ -10,6 +10,13 @@ import java.util.List;
 public interface QuestionDescribeService {
 
     /**
+     * 根据id查询问题描述
+     * @param describeId
+     * @return
+     */
+    QuestionDescribe getQuestionDescribe(Integer describeId);
+
+    /**
      * 查询问题集合
      * @param record
      * @return

+ 80 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerCommonServiceImpl.java

@@ -0,0 +1,80 @@
+package com.iamberry.rst.service.cm;
+
+import com.iamberry.rst.core.cm.*;
+import com.iamberry.rst.faces.cm.CustomerCommonService;
+import com.iamberry.rst.service.cm.mapper.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class CustomerCommonServiceImpl implements CustomerCommonService {
+
+    @Autowired
+    private CustomerCommonService customerCommonService;
+    @Autowired
+    private RepairMapper repairMapper;
+    @Autowired
+    private BackGoodsMapper backGoodsMapper;
+    @Autowired
+    private NoreasonBackMapper noreasonBackMapper;
+    @Autowired
+    private ReissueMapper reissueMapper;
+    @Autowired
+    private RenewedMapper renewedMapper;
+    @Autowired
+    private ClosedFittingMapper closedFittingMapper;
+    @Autowired
+    private ClosedProdcueMapper closedProdcueMapper;
+    @Autowired
+    private SendProdcueMapper sendProdcueMapper;
+    @Autowired
+    private SendFittingMapper sendFittingMapper;
+
+
+    @Override
+    public List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting) {
+        return closedFittingMapper.listClosedFitting(closedFitting);
+    }
+
+    @Override
+    public List<ClosedProdcue> listClosedProdcue(ClosedProdcue closedProdcue) {
+        return closedProdcueMapper.listclosedProdcue(closedProdcue);
+    }
+
+    @Override
+    public List<SendProdcue> listSendProdcue(SendProdcue sendProdcue) {
+        return sendProdcueMapper.listSendProdcue(sendProdcue);
+    }
+
+    @Override
+    public List<SendFitting> listSendFitting(SendFitting sendFitting) {
+        return sendFittingMapper.listSendFitting(sendFitting);
+    }
+
+    @Override
+    public CustomerCommon getListProduceAndFitting(CustomerCommon customerCommon) {
+        ClosedFitting closedFitting = new ClosedFitting();
+        closedFitting.setClosedFittingType(customerCommon.getCustomerIsSolve());
+        closedFitting.setRelationId(customerCommon.getRelationId());
+        customerCommon.setClosedFittings(customerCommonService.listClosedFitting(closedFitting));
+
+        ClosedProdcue closedProdcue = new ClosedProdcue();
+        closedProdcue.setClosedProdcueType(customerCommon.getCustomerIsSolve());
+        closedProdcue.setRelationId(customerCommon.getRelationId());
+        customerCommon.setClosedProdcues(customerCommonService.listClosedProdcue(closedProdcue));
+
+        SendProdcue sendProdcue = new SendProdcue();
+        sendProdcue.setSendProduceType(customerCommon.getCustomerIsSolve());
+        sendProdcue.setRelationId(customerCommon.getRelationId());
+        customerCommon.setSendProdcues(customerCommonService.listSendProdcue(sendProdcue));
+
+        SendFitting sendFitting = new SendFitting();
+        sendFitting.setSendFittingType(customerCommon.getCustomerIsSolve());
+        sendFitting.setRelationId(customerCommon.getRelationId());
+        customerCommon.setSendFittings(customerCommonService.listSendFitting(sendFitting));
+
+        return customerCommon;
+    }
+}

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/QuestionDescribeServiceImpl.java

@@ -18,6 +18,11 @@ public class QuestionDescribeServiceImpl implements QuestionDescribeService {
     private QuestionDescribeMapper questionDescribeMapper;
 
     @Override
+    public QuestionDescribe getQuestionDescribe(Integer describeId) {
+        return questionDescribeMapper.selectByPrimaryKey(describeId);
+    }
+
+    @Override
     public List<QuestionDescribe> listQuestionDescribe(QuestionDescribe record) {
         return questionDescribeMapper.listQuestionDescribe(record);
     }

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

@@ -24,10 +24,19 @@
   </sql>
   <select id="getQuestionById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from tb_rst_complaint_question
+        t.question_id,
+        t.small_class_id,
+        t.question_name,
+        t.question_profile,
+        t.question_state,
+        t.question_is_qc_detect,
+        t.question_resolved_num,
+        t.question_not_solved_num,
+        t.question_create_time,
+        t.question_update_time,
+        sc.complaint_id
+    from tb_rst_complaint_question t
+    LEFT JOIN tb_rst_complaint_small_class sc ON  t.small_class_id = sc.small_class_id
     where question_id = #{questionId,jdbcType=INTEGER}
   </select>
 

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

@@ -29,10 +29,29 @@
   <!-- 根据id获取客诉信息 -->
   <select id="getCustomerInfo" resultType="CustomerInfo" parameterType="java.lang.Integer" >
     select 
-    <include refid="Base_Column_List" />
-    from tb_rst_customer_info
-    where customer_id = #{customerId,jdbcType=INTEGER}
+      t.customer_id,
+      t.admin_id,
+      t.question_id,
+      t.company_id,
+      t.store_id,
+      t.customer_source_type,
+      t.customer_source,
+      t.customer_counsel_type,
+      t.type_id,
+      t.customer_name,
+      t.customer_tel,
+      t.customer_is_solve,
+      t.customer_is_visit,
+      t.customer_in_TDS,
+      t.customer_out_TDS,
+      t.customer_area,
+      t.customer_create_time,
+      t.customer_update_time,
+      t.customer_question_title
+    from tb_rst_customer_info t
+    where t.customer_id = #{customerId,jdbcType=INTEGER}
   </select>
+
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from tb_rst_customer_info
     where customer_id = #{customerId,jdbcType=INTEGER}

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

@@ -7,7 +7,12 @@
     <result column="customer_id" property="customerId" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    describe_id, describe_content, customer_id
+      describe_id,
+      describe_content,
+      customer_id,
+      describe_title,
+      describe_handle_desc,
+      describe_create_time
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 

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

@@ -33,20 +33,23 @@
     <result column="sales_type" property="salesType" jdbcType="INTEGER" />
   </resultMap>
   <sql id="salesOrderInfo" >
-    sales_id, sales_orderId, sales_openId, sales_discount_money, sales_pledge_money, 
-    sales_remain_deposit, sales_status, sales_send_type, sales_send_time, sales_sales_time, 
-    sales_post_num, sales_post_firm, sales_address_info, sales_address_tel, sales_address_name, 
-    sales_amount, sales_pay_money, sales_pay_type, sales_wait_money, sales_last_money, 
-    sales_shipping_fee, sales_pay_time, sales_create_time, sales_admin_remark, sales_user_remark, 
-    sales_pay_number, sales_store_id, sales_company_id, sales_type
+        sales_id,sales_orderId,sales_openId,sales_discount_money,sales_pledge_money,sales_remain_deposit,
+        sales_send_type,sales_send_time,sales_sales_time,sales_post_num,sales_post_firm,sales_address_info,sales_address_tel,
+        sales_address_name,sales_amount,sales_pay_money,sales_pay_type,sales_wait_money,sales_last_money,sales_shipping_fee,sales_pay_time,
+        sales_create_time,sales_admin_remark,sales_user_remark,sales_pay_number,sales_store_id,sales_company_id,sales_type,sales_deal_code,sales_order_status,
+        sales_status,sales_shipping_status,sales_pay_status,sales_process_status,sales_is_send,sales_is_locked,sales_is_separate
   </sql>
 
   <!-- 根据id查询订单信息 -->
   <select id="getSalesOrderById" resultType="SalesOrder" parameterType="java.lang.Integer" >
     select 
-      *
-    from tb_rst_sales_order_info
-    where sales_id = #{salesId,jdbcType=INTEGER}
+      	t.*,
+      	trsc.company_name companyName,
+        trsi.store_name  storeName
+    from tb_rst_sales_order_info t
+    LEFT JOIN tb_rst_sales_company trsc ON t.sales_company_id = trsc.company_id
+    LEFT JOIN tb_rst_store_info trsi ON t.sales_store_id = trsi.store_id
+    where sales_id = #{salesId}
   </select>
 
   <!-- 订单集合 -->
@@ -83,9 +86,6 @@
       <if test="salesAddressName !=null and salesAddressName !=''">
         AND sales_address_name like CONCAT('%',#{salesAddressName},'%')
       </if>
-      <if test="salesCreateTime != null and salesCreateTime != ''">
-        AND sales_create_time <![CDATA[>=]]> #{salesCreateTime}
-      </if>
       <if test="startDate != null and startDate != ''">
         AND sales_create_time <![CDATA[>=]]> #{startDate}
       </if>

+ 16 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/visitMapper.xml

@@ -18,9 +18,22 @@
     <result column="visit_update_time" property="visitUpdateTime" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
-    visit_id, customer_id, admin_id, visit_name, visit_tel, visit_date, visit_time_select, 
-    visit_status, visit_complete_date, visit_complete_name, visit_complete_tel, visit_complete_remark, 
-    visit_create_time, visit_update_time
+      visit_id,
+      customer_id,
+      admin_id,
+      designated_admin_id,
+      visit_name,
+      visit_tel,
+      visit_date,
+      visit_time_select,
+      visit_status,
+      visit_complete_date,
+      visit_complete_name,
+      visit_complete_tel,
+      visit_complete_remark,
+      visit_complete_sex,
+      visit_create_time,
+      visit_update_time
   </sql>
   <select id="getVisit" resultMap="BaseResultMap" parameterType="Visit" >
     select 

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

@@ -81,6 +81,10 @@ public class AdminCustomerController {
     private SmsService smsService;
     @Autowired
     private ComplaintSignclosedInfoService complaintSignclosedInfoService;
+    @Autowired
+    private ComplaintSmallClassInfoService complaintSmallClassInfoService;
+    @Autowired
+    private CustomerCommonService customerCommonService;
 
 
     /**
@@ -148,37 +152,68 @@ public class AdminCustomerController {
         Integer loginAdminId = AdminUtils.getLoginAdminId();
         //查询客诉基本信息
         CustomerInfo customerInfo = customerService.getCustomerInfo(customerId);
+        CustomerCommon customerCommon = new CustomerCommon();
         if(customerInfo.getCustomerIsSolve() != null){
-            CustomerCommon customerCommon = new CustomerCommon();
             switch (customerInfo.getCustomerIsSolve()){   //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
                 case 3://获取换新
                     Renewed renewed = new Renewed();
                     renewed.setCustomerId(customerInfo.getCustomerId());
                     renewed = renewedService.getRenewed(renewed);
-                    customerCommon.getCustomerCommon(3,renewed);
+                    customerCommon = customerCommon.getCustomerCommon(3,renewed);
                     break;
                 case 4://维修
                     Repair repair = new Repair();
                     repair.setCustomerId(customerInfo.getCustomerId());
                     repair = repairService.getRepair(repair);
-                    customerCommon.getCustomerCommon(4,repair);
+                    customerCommon = customerCommon.getCustomerCommon(4,repair);
+                    break;
                 case 5:
                     Reissue reissue = new  Reissue();
                     reissue.setCustomerId(customerInfo.getCustomerId());
                     reissue = reissueService.getReissue(reissue);
-                    customerCommon.getCustomerCommon(5,reissue);
+                    customerCommon = customerCommon.getCustomerCommon(5,reissue);
+                    break;
                 case 6:
                     BackGoods backGoods = new  BackGoods();
                     backGoods.setCustomerId(customerInfo.getCustomerId());
                     backGoods = backGoodsService.getBackGoods(backGoods);
-                    customerCommon.getCustomerCommon(6,backGoods);
+                    customerCommon = customerCommon.getCustomerCommon(6,backGoods);
+                    break;
                 case 7:
                     NoreasonBack noreasonBack = new  NoreasonBack();
                     noreasonBack.setCustomerId(customerInfo.getCustomerId());
                     noreasonBack = noreasonBackService.getNoreasonBack(noreasonBack);
-                    customerCommon.getCustomerCommon(7,noreasonBack);
+                    customerCommon = customerCommon.getCustomerCommon(7,noreasonBack);
+                    break;
             }
+
+            /*查询所有需要寄入寄出的产品*/
+            customerCommon.setCustomerIsSolve(customerInfo.getCustomerIsSolve());
+            customerCommon = customerCommonService.getListProduceAndFitting(customerCommon);
             mv.addObject("customerCommon", customerCommon);
+
+            /*查询所有的产品,颜色和配件信息*/
+            List<Product> productList = productService.listProduce(new Product());
+            for(Product product : productList){
+                ProductColor productColor = new ProductColor();
+                productColor.setColorProductId(product.getProductId());
+                List<ProductColor>  productColorList = productService.listProduceColor(productColor);
+                product.setColorList(productColorList);
+
+                FittingsInfo fittingsInfo = new FittingsInfo();
+                fittingsInfo.setProductId(product.getProductId());
+                List<FittingsInfo> fittingsInfoList = fittingsInfoService.listFittings(fittingsInfo);
+                product.setFittingsList(fittingsInfoList);
+            }
+            mv.addObject("productList", productList);
+
+            /*查询订单信息*/
+            SalesOrder salesOrder = salesOrderService.getSalesOrderById(customerCommon.getOrderId());
+            SalesOrderItem salesOrderItem = new SalesOrderItem();
+            salesOrderItem.setItemOrderId(salesOrder.getSalesId());
+            List<SalesOrderItem> salesOrderItemList = salesOrderService.listSalesOrderItem(salesOrderItem);
+            salesOrder.setSalesOrderItemList(salesOrderItemList);
+            mv.addObject("salesOrder", salesOrder);
         }
         if ("2".equals(customerInfo.getCustomerIsVisit())){ //1:不需要回访  2:需要回访
             Visit visit = new Visit();
@@ -187,15 +222,53 @@ public class AdminCustomerController {
             mv.addObject("visit", visit);
         }
 
+        //查询关联问题
+        ComplaintQuestionInfo complaintQuestionInfo = complaintQuestionInfoService.getQuestionById(customerInfo.getQuestionId());
+        //查询问题小类
+        ComplaintSmallClassInfo complaintSmallClassInfo = new ComplaintSmallClassInfo();
+        complaintSmallClassInfo.setComplaintId(complaintQuestionInfo.getComplaintId());
+        List<ComplaintSmallClassInfo> complaintSmallClassInfoList = complaintSmallClassInfoService.listComplaintSmallClassInfo(complaintSmallClassInfo);
+        //查询问题大类
+        ComplaintTypeInfo complaintTypeInfo = new ComplaintTypeInfo();
+        List<ComplaintTypeInfo> complaintTypeInfoList = complaintTypeInfoService.listComplaintTypeInfo(complaintTypeInfo);
+
+
+        mv.addObject("customerInfo", customerInfo);
         mv.addObject("typeList", typeList);
         mv.addObject("complaintTypeList", complaintTypeList);
         mv.addObject("complaintTypeList", complaintTypeList);
         mv.addObject("adminList", adminList);
         mv.addObject("loginAdminId", loginAdminId);
+        mv.addObject("complaintQuestionInfo", complaintQuestionInfo);
+        mv.addObject("complaintSmallClassInfoList", complaintSmallClassInfoList);
+        mv.addObject("complaintTypeInfoList", complaintTypeInfoList);
+        //mv.addObject("questionDescribe", questionDescribe);
         return mv;
     }
 
     /**
+     * 查询问题描述
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:add:customer")
+    @RequestMapping(value = "/select_question_describe")
+    public ResponseJson selectQuestionDescribe(HttpServletRequest request, Integer customerId) throws Exception {
+        if(customerId == null || customerId == 0){
+            return new ResponseJson(500, "未获取到问题描述", 500);
+        }
+        //查询问题描述表
+        QuestionDescribe questionDescribe = new QuestionDescribe();
+        questionDescribe.setCustomerId(customerId);
+        questionDescribe = questionDescribeService.listQuestionDescribe(questionDescribe).get(0);
+
+        ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+        rj.addResponseKeyValue("questionDescribe", questionDescribe);
+        return rj;
+    }
+
+
+    /**
      * 搜索订单列表弹出框
      *
      * @return
@@ -349,8 +422,15 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:add:customer")
     @RequestMapping(value = "/select_salesOrder")
-    public ResponseJson listOrder(HttpServletRequest request, SalesOrder salesOrder) {
-        List<SalesOrder> salesOrderList = salesOrderService.listSalesOrder(salesOrder);
+    public ResponseJson listOrder(HttpServletRequest request, SalesOrder salesOrder,
+                @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) {
+
+        //分页获取订单信息
+        PagedResult<SalesOrder> pagedResult = salesOrderService.listSalesOrderPage(pageNO, pageSize, salesOrder, totalNum == 0);
+
+        List<SalesOrder> salesOrderList = pagedResult.getDataList();
 
         for (SalesOrder order : salesOrderList) {
             SalesOrderItem salesOrderItem = new SalesOrderItem();

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

@@ -465,7 +465,7 @@
                 <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">
-                        <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="s1-20" errormsg="回访人姓名格式不正确!" >
+                        <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="回访人姓名格式不正确!" >
                     </div>
                     <div class="formControls col-2 col-sm-2">
                         <input type="text" class="input-text associated-phone" value="" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">

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

@@ -69,11 +69,11 @@
     <div class="pd-20 cl">
         <form action="${path}/admin/customer/save_customer" method="post" class="form form-horizontal" id="form-customer-add"  onkeydown="if(event.keyCode==13)return false;">
 
+            <input type="hidden" id="customerId" name="customerId" value="${customerInfo.customerId!''}">
             <input type="hidden" id="customerName" name="customerName" value="">
             <input type="hidden" id="customerTel" name="customerTel" value="">
 
             <div class="row cl">
-
                 <label class="form-label col-3">
                     <div class="tit-2">客诉基本信息</div>
                 </label>
@@ -84,6 +84,9 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>跟进客服:</label>
                 <div class="formControls col-4 col-sm-4"> <span class="select-box" style=" width: 625px;">
                     <select name="adminId" id="adminId" class="select">
+                        <#list adminList as admin>
+                            <option value ="${admin.adminId!}" <#if customerInfo.adminId??><#if customerInfo.adminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
+                        </#list>
                     </select>
 				</span>
                 </div>
@@ -92,18 +95,18 @@
                 <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="tel-1" name="customerSourceType" value="1" >
+                        <input type="radio" id="tel-1" name="customerSourceType" value="1" <#if customerInfo.customerSourceType == 1 >checked</#if>>
                         <label for="tel-1">400电话</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="tel-2" name="customerSourceType" value="2" checked>
+                        <input type="radio" id="tel-2" name="customerSourceType" value="2" <#if customerInfo.customerSourceType == 2 >checked</#if>>
                         <label for="tel-2">微信公众号</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="tel-3" name="customerSourceType" value="3">
+                        <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; display: none;" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
-                        <input type="hidden" value="" placeholder="" id="customerSource" name="customerSource">
+                        <input type="text" style="width: 321px;margin-left: 10px; <#if customerInfo.customerSourceType != 3 >display: none;</#if>" class="input-text" value="" placeholder="" id="customerSourceOld" name="customerSourceOld" placeholder="">
+                        <input type="hidden" value="${customerInfo.customerSource!''}" placeholder="" id="customerSource" name="customerSource"  >
                     </div>
                 </div>
             </div>
@@ -111,11 +114,11 @@
                 <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" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1"  >
+                        <input type="radio" class="customerCounselType" id="customer-type-1" name="customerCounselType" value="1"  <#if customerInfo.customerCounselType == 1 >checked</#if>>
                         <label for="customer-type-1">售前咨询</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2"  checked>
+                        <input type="radio" class="customerCounselType" id="customer-type-2" name="customerCounselType" value="2"  <#if customerInfo.customerCounselType == 2 >checked</#if>>
                         <label for="customer-type-2">售后咨询</label>
                     </div>
                 </div>
@@ -125,14 +128,12 @@
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>产品类型:</label>
                 <input type="hidden" id="typeCompany" name="typeCompany" value="">
                 <div class="formControls col-10 col-sm-10 skin-minimal" id="produceTypeHtml">
-                    <#--<div class="radio-box">
-                        <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
-                        <label for="tel-3">净水机</label>
-                    </div>
-                    <div class="radio-box">
-                        <input type="radio" id="tel-3" name="produceType" datatype="*" nullmsg="请选择产品类型!">
-                        <label for="tel-4">冲奶机</label>
-                    </div>-->
+                    <#list typeList as type>
+                        <div class="radio-box">
+                            <input type="radio" id="produceType-${type_index}" name="produceType" value="${type.typeId!''}" <#if customerInfo.typeId == type.typeId>checked</#if> >
+                            <label for="produceType-${type_index}">${type.typeName!''}</label>
+                        </div>
+                    </#list>
                 </div>
             </div>
 
@@ -141,16 +142,18 @@
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">
 				<select name="complaintId" class="select">
                     <option value="">请选择问题分类</option>
-					<#--<option value="0">使用操作</option>-->
-					<#--<option value="1">使用操作</option>-->
+                    <#list complaintTypeInfoList as complaintTypeInfo>
+                        <option value="${complaintTypeInfo.complaintId}" <#if complaintQuestionInfo.complaintId == complaintTypeInfo.complaintId>selected="selected"</#if> >${complaintTypeInfo.complaintClassName}</option>
+                    </#list>
 				</select>
 				</span>
                 </div>
                 <div class="formControls col-2 col-sm-2"> <span class="select-box">
 				<select name="smallClassId" id="smallClassId" class="select">
                     <option value="">请选择问题分类</option>
-					<#--<option value="0">使用操作制水出水</option>
-					<option value="1">使用操作制水出水</option>-->
+                    <#list complaintSmallClassInfoList as complaintSmallClassInfo>
+                        <option value="${complaintSmallClassInfo.smallClassId}" <#if complaintQuestionInfo.smallClassId == complaintSmallClassInfo.smallClassId>selected="selected"</#if>>${complaintSmallClassInfo.smallClassName}</option>
+                    </#list>
 				</select>
 				</span>
                 </div>
@@ -177,7 +180,7 @@
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>问题标题:</label>
                 <div class="formControls col-5 col-sm-5">
-                    <input type="text" class="input-text" style="width: 625px;" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" >
+                    <input type="text" class="input-text" style="width: 625px;" name="describeTitle" id="describeTitle" datatype="*1-50" errormsg="问题标题不正确!" value="" >
                 </div>
             </div>
 
@@ -188,7 +191,7 @@
                     <span>问题描述详情,内部使用,不会对外公布。</span>
                     <script id="describeHandleDescText" type="text/plain" style="width:983px;height:250px;"></script>
                     </script>
-                    <input type="hidden" id="describeHandleDesc" name="describeHandleDesc">
+                    <input type="hidden" id="describeHandleDesc" name="describeHandleDesc" value="">
                 </div>
             </div>
 
@@ -204,7 +207,7 @@
             <div class="row cl">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text associated-phone" value="" placeholder="请输入手机号" id="p-phone" name="">
+                    <input type="text" class="input-text associated-phone" value="${customerInfo.customerTel!''}" placeholder="请输入手机号" id="p-phone" name="">
                 </div>
                 <div class="formControls col-2 col-sm-2" style="width: 10%">
                     <input type="button" class="btn btn-primary" value="发送问题回复给用户" onclick="sendPhone('p','p-msg');">
@@ -235,31 +238,31 @@
                 <label class="form-label col-1 col-sm-1">处理类型:</label>
                 <div class="formControls col-10 col-sm-10 skin-minimal">
                     <div class="radio-box" id="solved">
-                        <input type="radio" id="customer-process-1" value="1" name="customerIsSolve" >
+                        <input type="radio" id="customer-process-1" value="1" name="customerIsSolve"  <#if customerInfo.customerIsSolve == 1 >checked</#if> >
                         <label for="customer-process-1">已解决</label>
                     </div>
                     <div class="radio-box" id="noSolved">
-                        <input type="radio" id="customer-process-2" value="2" name="customerIsSolve">
+                        <input type="radio" id="customer-process-2" value="2" name="customerIsSolve" <#if customerInfo.customerIsSolve == 2 >checked</#if> >
                         <label for="customer-process-2">未解决</label>
                     </div>
                     <div class="radio-box" id="renewed" style="display: none">
-                        <input type="radio" id="customer-process-3" value="3" name="customerIsSolve" checked>
+                        <input type="radio" id="customer-process-3" value="3" name="customerIsSolve" <#if customerInfo.customerIsSolve == 3 >checked</#if> >
                         <label for="customer-process-3">换新</label>
                     </div>
                     <div class="radio-box" id="maintain" style="display: none">
-                        <input type="radio" id="customer-process-4" value="4" name="customerIsSolve" >
+                        <input type="radio" id="customer-process-4" value="4" name="customerIsSolve" <#if customerInfo.customerIsSolve == 4 >checked</#if> >
                         <label for="customer-process-4">维修</label>
                     </div>
                     <div class="radio-box" id="reissue" style="display: none">
-                        <input type="radio" id="customer-process-5" value="5" name="customerIsSolve">
+                        <input type="radio" id="customer-process-5" value="5" name="customerIsSolve" <#if customerInfo.customerIsSolve == 5 >checked</#if> >
                         <label for="customer-process-5">补发</label>
                     </div>
                     <div class="radio-box" id="backGoods" style="display: none">
-                        <input type="radio" id="customer-process-6" value="6" name="customerIsSolve">
+                        <input type="radio" id="customer-process-6" value="6" name="customerIsSolve" <#if customerInfo.customerIsSolve == 6 >checked</#if> >
                         <label for="customer-process-6">退货</label>
                     </div>
                     <div class="radio-box" id="noReasonBack" style="display: none">
-                        <input type="radio" id="customer-process-7" value="7" name="customerIsSolve">
+                        <input type="radio" id="customer-process-7" value="7" name="customerIsSolve" <#if customerInfo.customerIsSolve == 7 >checked</#if> >
                         <label for="customer-process-7">无理由退货</label>
                     </div>
                 </div>
@@ -281,7 +284,8 @@
             <div class="row cl" id="orderHead" style="display: none;">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>订单信息:</label>
                 <div class="formControls col-1 col-sm-1">
-                    <button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>
+
+                    <#--<button type="button" class="btn btn-primary" id="selectOrder">搜索订单</button>-->
                 </div>
             </div>
             <div class="row cl" id="order" style="display: none;">
@@ -289,8 +293,10 @@
                 <div class="formControls col-9 col-sm-9 text-c">
                     <table class="table table-border table-bg table-bordered">
                         <tr>
-                            <th style="text-align: center;">销售</th>
-                            <th style="text-align: center;">订单号</th>
+                            <th style="text-align: center;">销售公司</th>
+                            <th style="text-align: center;">店铺名称</th>
+                            <th style="text-align: center;">Efast订单号</th>
+                            <th style="text-align: center;">交易号</th>
                             <th style="text-align: center;">姓名</th>
                             <th style="text-align: center;">电话</th>
                             <th style="text-align: center;">订单金额</th>
@@ -298,12 +304,24 @@
                             <th style="text-align: center;">购买日期</th>
                         </tr>
                         <tr id="showOrder">
-                            <td style="text-align: center;" colspan="7">暂未选择订单</td>
+                            <td style="text-align: center;">${salesOrder.companyName}</td>
+                            <td style="text-align: center;">${salesOrder.storeName}</td>
+                            <td style="text-align: center;">${salesOrder.salesOrderId}</td>
+                            <td style="text-align: center;">${salesOrder.salesDealCode}</td>
+                            <td style="text-align: center;">${salesOrder.salesAddressName}</td>
+                            <td style="text-align: center;">${salesOrder.salesAddressTel}</td>
+                            <td style="text-align: center;">${salesOrder.salesPayMoney}</td>
+                            <td style="text-align: center;">
+                                <#list salesOrder.salesOrderItemList as salesOrderItem>
+                                    ${salesOrderItem.itemProductName}* ${salesOrderItem.itemNum}<br>
+                                </#list>
+                            </td>
+                            <td style="text-align: center;">${(salesOrder.salesPayTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                         </tr>
                     </table>
-                    <input type="hidden" id="companyId" name="companyId" value="" >
-                    <input type="hidden" id="storeId" name="storeId" value="" >
-                    <input type="hidden" id="orderId" name="salesId" value="" >
+                    <input type="hidden" id="companyId" name="companyId" value="${salesOrder.salesCompanyId}" >
+                    <input type="hidden" id="storeId" name="storeId" value="${salesOrder.salesStoreId}" >
+                    <input type="hidden" id="orderId" name="salesId" value="${salesOrder.salesId}" >
                 </div>
             </div>
 
@@ -315,13 +333,13 @@
             <div class="row cl" id="recipientInfo" style="display: none;">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="联系人格式不正确!" >
+                    <input type="text" class="input-text" value="${customerCommon.relationBackName}" placeholder="填写收件人姓名" id="sendName" name="relationSendName" datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="联系人格式不正确!" >
                 </div>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
+                    <input type="text" class="input-text" value="${customerCommon.relationBackTel}" placeholder="填写收件人手机号" id="sendTel" name="relationSendTel" datatype="m" errormsg="联系人电话格式不正确!">
                 </div>
                 <div class="formControls col-2 col-sm-2"  id="postageAccount">
-                    <input type="text" class="input-text" value="" placeholder="邮费转账 支付宝账户" id="relationAlipay" name="relationAlipay" errormsg="邮费转账账户!">
+                    <input type="text" class="input-text" value="${customerCommon.relationAlipay!''}" placeholder="邮费转账 支付宝账户" id="relationAlipay" name="relationAlipay" errormsg="邮费转账账户!">
                 </div>
             </div>
             <div class="row cl" id="recipientAddress" style="display: none;">
@@ -330,6 +348,7 @@
                 <div class="formControls col-2 col-sm-2">
                     <span class="select-box">
                          <select id="province" class="select" name="provinceNumber">
+
                          </select>
                      </span>
                 </div>
@@ -352,7 +371,7 @@
             <div class="row cl" id="recipientAddressText" style="display: none;">
                 <label class="form-label col-1 col-sm-1"></label>
                 <div class="formControls col-5 col-sm-5">
-                    <textarea name="relationSendAddress" id="sendAddress" cols="" rows="2" datatype="*" errormsg="收货地址不正确!" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)"></textarea>
+                    <textarea name="relationSendAddress" id="sendAddress" cols="" rows="2" datatype="*" errormsg="收货地址不正确!" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)">${customerCommon.relationSendAddress!''}</textarea>
                     <span id="addrssMsg"></span>
                 </div>
             </div>
@@ -369,9 +388,88 @@
                             </tr>
                         </thead>
                         <tbody id="addProduct">
-                            <tr id="showOrder">
-                                <td style="text-align: center;" colspan="3">请选择订单之后再选择产品</td>
+                        <#list productList as product>
+                            <tr>
+                                <td width="80">
+                                    <input type="hidden" value="${product.productId}"><span>${product.productName}</span>
+                                </td>
+                                <td style="padding: 0px;text-align: center;">
+                                    <table style="height: 100%;">
+                                        <tbody>
+                                            <#list product.colorList as color>
+                                                <tr>
+                                                    <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
+                                                        品蓝
+                                                    </td>
+                                                    <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
+                                                        <input type="hidden" class="input-produce-id" value="${product.productId}">
+                                                        <input type="hidden" class="input-color-id" value="${color.colorId}">
+                                                        <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="${color.colorId}" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                    </td>
+                                                </tr>
+                                            </#list>
+                                            <tr>
+                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">
+                                                    品蓝
+                                                </td>
+                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
+                                                    <input type="hidden" class="input-produce-id" value="1">
+                                                    <input type="hidden" class="input-color-id" value="1">
+                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="1" placeholder="产品数量" id="color-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">品黑</td>
+                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
+                                                    <input type="hidden" class="input-produce-id" value="1">
+                                                    <input type="hidden" class="input-color-id" value="2">
+                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="" placeholder="产品数量" id="color-1-2" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">苹果绿</td>
+                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
+                                                    <input type="hidden" class="input-produce-id" value="1">
+                                                    <input type="hidden" class="input-color-id" value="3">
+                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="" placeholder="产品数量" id="color-1-3" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td width="55" style="border-left: none;text-align: center;border-top: 1px solid #ddd;">西瓜红</td>
+                                                <td width="45" style="border-top: 1px solid #ddd; padding: 0px;width: 25px;">
+                                                    <input type="hidden" class="input-produce-id" value="1">
+                                                    <input type="hidden" class="input-color-id" value="4">
+                                                    <input type="text" class="input-text input-color-number number-input" style="width: 100%;border: none;text-align: center;" value="" placeholder="产品数量" id="color-1-4" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                                </td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                </td>
+                                <td style="padding: 0px;text-align: center;">
+                                    <table style="height: 100%;">
+                                        <tbody>
+                                        <tr>
+                                            <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">内部配件1</td>
+                                            <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
+                                                <input type="hidden" class="input-produce-id" value="1">
+                                                <input type="hidden" class="input-fittings-id" value="1">
+                                                <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="3" placeholder="配件数量" id="fittings-1-1" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td width="55" style="border-left: none;text-align: center; border-top: 1px solid #ddd;">内部配件2</td>
+                                            <td width="45" style="border-top: 1px solid #ddd;padding: 0px;width: 25px;">
+                                                <input type="hidden" class="input-produce-id" value="1">
+                                                <input type="hidden" class="input-fittings-id" value="2">
+                                                <input type="text" class="input-text input-fittings-number" style="width: 100%;border: none;text-align: center;" value="" placeholder="配件数量" id="fittings-1-2" name="" onkeyup="keyFun($(this),999)" onpaste="keyFun($(this),999)">
+                                            </td>
+                                        </tr>
+                                        </tbody>
+                                    </table>
+                                </td>
                             </tr>
+                        </#list>
+
                         </tbody>
                     </table>
 
@@ -382,7 +480,9 @@
                 <label class="form-label col-1 col-sm-1">TDS收集:</label>
                 <div class="formControls col-2 col-sm-2" style="position: relative;">
                     <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
-                    <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
+                   <#-- <#assign index_num = customerInfo.customerArea?index_of("-") />-->
+                        <#--${customerInfo.customerArea?substring(0,)!'0'}-->
+                    <input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" value="" />
                     <div id="suggest" class="ac_results"></div>
                 </div>
                 <div class="formControls col-2 col-sm-2">
@@ -394,10 +494,10 @@
                 </div>
                 <input type="hidden" name="customerArea" id="customerArea">
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
+                    <input type="text" class="input-text" value="${customerInfo.customerInTDS!'0'}" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
                 </div>
                 <div class="formControls col-2 col-sm-2">
-                    <input type="text" class="input-text" value="" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
+                    <input type="text" class="input-text" value="${customerInfo.customerOutTDS!'0'}" placeholder="出水TDS数值,最大999" id="customerOutTDS" name="customerOutTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
                 </div>
             </div>
             <div class="row cl" id="TDScollectShow" style="display: none;">
@@ -452,44 +552,51 @@
                 <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" >
+                        <input type="radio" id="customer-visit-1" name="customerIsVisit" value="2" <#if customerInfo.customerIsVisit == '2' >checked</#if> >
                         <label for="customer-visit-1">需要回访</label>
                     </div>
                     <div class="radio-box">
-                        <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1" checked>
+                        <input type="radio" id="customer-visit-2" name="customerIsVisit"  value="1" <#if customerInfo.customerIsVisit == '1' >checked</#if> >
                         <label for="customer-visit-2">不需要回访</label>
                     </div>
                 </div>
             </div>
-            <div id="needToVisit" style="display: none;">
+            <div id="needToVisit" style="<#if customerInfo.customerIsVisit == '1' >display: none;</#if>">
+                <#if visit??>
+                    <#assign visitName = visit.visitName/>
+                    <#assign customerTel = visit.visitTel/>
+                    <#assign visitDate = visit.visitDate/>
+                    <#assign visitTimeSelect = visit.visitTimeSelect/>
+                    <#assign designatedAdminId = visit.designatedAdminId/>
+                </#if>
                 <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">
-                        <input type="text" class="input-text" value="" placeholder="填写回访人姓名" id="" name="visitName"  datatype="s1-20" errormsg="回访人姓名格式不正确!" >
+                        <input type="text" class="input-text" value="${visitName!''}" placeholder="填写回访人姓名" id="" name="visitName"   datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="回访人姓名格式不正确!" >
                     </div>
                     <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text associated-phone" value="" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
+                        <input type="text" class="input-text associated-phone" value="${customerTel!''}" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
                     </div>
                 </div>
                 <div class="row cl">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访日期:</label>
                     <div class="formControls col-2 col-sm-2">
-                        <input type="text" placeholder="请选择回访日期" id="datemin"  name="visitDate" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly">
+                        <input type="text" placeholder="请选择回访日期" id="datemin"  name="visitDate" value="${(visitDate?string("yyyy-MM-dd"))!''}" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',minDate:'%y-%M-%d'})"  readonly="readonly">
                     </div>
                 </div>
                 <div class="row cl">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>回访时间:</label>
                     <div class="formControls col-10 col-sm-10 skin-minimal">
                         <div class="radio-box">
-                            <input type="radio" id="visit-time-1" name="visitTimeSelect" value="1" checked>
+                            <input type="radio" id="visit-time-1" name="visitTimeSelect" value="1" <#if visitTimeSelect?? && visitTimeSelect== 1 >checked</#if> >
                             <label for="visit-time-1">09:00-12:00</label>
                         </div>
                         <div class="radio-box">
-                            <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2">
+                            <input type="radio" id="visit-time-2" name="visitTimeSelect" value="2" <#if visitTimeSelect?? && visitTimeSelect == 2 >checked</#if> >
                             <label for="visit-time-2">12:00-14:00</label>
                         </div>
                         <div class="radio-box">
-                            <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3">
+                            <input type="radio" id="visit-time-3" name="visitTimeSelect" value="3" <#if visitTimeSelect?? && visitTimeSelect == 3 >checked</#if>  >
                             <label for="visit-time-3">14:00-18:00</label>
                         </div>
                     </div>
@@ -498,7 +605,9 @@
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>提醒人:</label>
                     <div class="formControls col-4 col-sm-4"> <span class="select-box">
                     <select class="select" id="visitAdminId" name="visitAdminId">
-
+                        <#list adminList as admin>
+                            <option value ="${admin.adminId!}" <#if designatedAdminId??><#if designatedAdminId == admin.adminId >selected="selected"</#if></#if>>${admin.adminName!}</option>
+                        </#list>
                     </select>
                     </span>
                     </div>
@@ -693,6 +802,7 @@
         elementPathEnabled : false  /*去掉元素路径*/
     });
 
+    //是否已经初始化过邮寄信息
     var isInitSendAddressSms = false;
 
     sendAddressSms.ready(function() {
@@ -723,21 +833,24 @@
         noReasonBack : [["退回产品","退回产品颜色","退回产品配件"],[]]
     }
 
+    /*是否是修改页面*/
+    var isUpdate = true;
+
     /*个人id*/
     var adminId = 0;
 
     /* 咨询类型  1:售前咨询  2:售后咨询  3:其他  */
-    var allCustomerInfoType;
+    var allCustomerInfoType = ${customerInfo.customerCounselType};
 
     /*全局标识当前状态  type : 1 :已解决  2:未解决  3:换新  4:维修  5:补发   6:退货  7:无理由退货*/
-    var allCustomerType = 1;
+    var allCustomerType = ${customerInfo.customerIsSolve};
     var allCustomerTypeName = ["已解决","未解决","换新","维修","补发","退货","无理由退货"];
 
     /*  寄回地址的id */
     var complaint_questionId = 5;
 
     /* 用于判断是否第一次初始化省市区-- 只在选择类型为售后时使用 */
-    var isInitAddress = 0;
+    var isInitAddress = ${customerInfo.customerIsSolve!''};
 
     /*初始化页面参数*/
     $(function () {
@@ -745,19 +858,23 @@
         //initCheck();
 
         /*初始化产品类型 --  客诉头部的产品类型单选 */
-        initProduceType();
+        //initProduceType();
 
         /*初始化问题分类*/
-        initComplaintTypeInfo();
+        //initComplaintTypeInfo();
 
         /*初始化客服*/
-        initSysAdmin();
+        ///initSysAdmin();
 
         /*初始化回访客服*/
-        initVisitSysAdmin();
+        //initVisitSysAdmin();
+
+        /*初始化问题描述*/
+        initQuestionDescribe();
 
         /*初始化选择处理结果 -- type : 1 :已解决  2:未解决  3:换新  4:维修  5:补发   6:退货  7:无理由退货 */
-        initProcessResult(3);
+        initProcessResult(allCustomerType);
+
 
         /*监听来源入口选择事件*/
         $("input[name='customerSourceType']").change(function (){
@@ -859,14 +976,43 @@
     /*用于初始化回访信息的展示*/
     function initVisitEvent(){
         $("input[name='customerIsVisit']").change(function (){
-            if($(this).val() == 2){
-                $("#needToVisit").css("display","block");
-            }else{
-                $("#needToVisit").css("display","none");
+            if(!isUpdate){
+                if($(this).val() == 2){
+                    $("#needToVisit").css("display","block");
+                }else{
+                    $("#needToVisit").css("display","none");
+                }
             }
         })
     }
 
+    /**
+     * 初始化问题描述
+     */
+    function initQuestionDescribe(){
+        $.ajax({
+            type: "POST",
+            data: {
+                customerId : "${customerInfo.customerId!''}"
+            },
+            url: "${path}/admin/customer/select_question_describe",
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var questionDescribe = data.returnMsg.questionDescribe;
+                    $("#describeTitle").val(questionDescribe.describeTitle);
+                    describeContentText.addListener("ready", function () {
+                        describeContentText.setContent(questionDescribe.describeContent);
+                    });
+                    describeHandleDescText.addListener("ready", function () {
+                        describeHandleDescText.setContent(questionDescribe.describeHandleDesc);
+                    });
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+
     /*关闭qa*/
     function closeQA(){
         $(".dalog-ask").hide(); //隐藏qa
@@ -894,12 +1040,14 @@
     * type 1:不需要回访  2:需要回访
     * */
     function visitByType(type){
-        if(1 == type){  //不需要回访
-            $("#customer-visit-2").iCheck('check');  //设置不需要回访
-            $("#needToVisit").css("display","none");
-        }else{
-            $("#customer-visit-1").iCheck('check');  //设置需要回访
-            $("#needToVisit").css("display","block");
+        if(!isUpdate){
+            if(1 == type){  //不需要回访
+                $("#customer-visit-2").iCheck('check');  //设置不需要回访
+                $("#needToVisit").css("display","none");
+            }else{
+                $("#customer-visit-1").iCheck('check');  //设置需要回访
+                $("#needToVisit").css("display","block");
+            }
         }
         initVisitEvent();
     }
@@ -1058,10 +1206,21 @@
             }
 
             /* 在选择售后类型是,直接初始化省市区,使用isInitAddress 变量来判断 */
-            if(isInitAddress == 0){
-                var proId = setPro(null,2);
-                var cityId = setCity(null,proId,2);
+            if(isInitAddress == 1 || isInitAddress == 2){
+//                var proId = setPro(null,2);
+//                var cityId = setCity(null,proId,2);
+//                setDistrict(null,cityId,2);
+//                isInitAddress = 1;
+            }else if(isInitAddress == 3 || isInitAddress == 4 ||  isInitAddress == 5 ||  isInitAddress == 6 ||  isInitAddress == 7){
+                setPro(null,2);  //创建省
+                var proId = ${customerCommon.provinceNumber};
+                $("#province option[value='"+ proId +"']").attr("selected","true"); //设置省
+                setCity(null,proId,2);
+                var cityId = ${customerCommon.cityNumber};
+                $("#city option[value='" + cityId + "']").attr("selected","true"); //设置市
                 setDistrict(null,cityId,2);
+                var disId = ${customerCommon.areaNumber};
+                $("#district option[value='" + disId + "']").attr("selected","true"); //设置地区
                 isInitAddress = 1;
             }
 

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/batch/add_batch.ftl

@@ -46,7 +46,7 @@
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>批次编号:</label>
             <div class="formControls col-xs-8 col-sm-9">
-				<input type="text" class="input-text" value="" id="batchNo" name="batchNo" placeholder="请输入1-20位的批次编号,支持字母、数字" datatype="/^[a-zA-Z0-9]{1,20}$/" errormsg="请输入1-20位的批次编号,支持字母、数字!">
+				<input type="text" class="input-text" value="" id="batchNo" name="batchNo" placeholder="请输入1-20位的批次编号,支持字母、数字" datatype="/^[a-zA-Z0-9-_]{1,20}$/" errormsg="请输入1-20位的批次编号,支持字母、数字!">
             </div>
         </div>
 
@@ -82,7 +82,7 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3">软件版本:</label>
+            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>软件版本:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <span class="select-box">
 				    <select class="select" size="1" name="batchSoftwareVersionId" id="batchSoftwareVersionId"  >

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/batch/update_batch.ftl

@@ -47,7 +47,7 @@
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>批次编号:</label>
             <div class="formControls col-xs-8 col-sm-9">
-				<input type="text" class="input-text" value="${ptsBatch.batchNo}" id="batchNo" name="batchNo" placeholder="请输入1-20位的批次编号,支持字母、数字" datatype="/^[a-zA-Z0-9]{1,20}$/" errormsg="请输入1-20位的批次编号,支持字母、数字!">
+				<input type="text" class="input-text" value="${ptsBatch.batchNo}" id="batchNo" name="batchNo" placeholder="请输入1-20位的批次编号,支持字母、数字" datatype="/^[a-zA-Z0-9-_]{1,20}$/" errormsg="请输入1-20位的批次编号,支持字母、数字!">
             </div>
         </div>