Explorar o código

Merge branch 'vendor_logistics_v2' into function_vendor_modify

# Conflicts:
#	src/main/webapp/resources/js/vendor/controllers/forstore/vendor_deliveryRule_ctrl.js
hulh %!s(int64=8) %!d(string=hai) anos
pai
achega
fee5ad1f5b

+ 1 - 1
src/main/java/com/uas/platform/b2c/logistics/dao/DistributorSellerDao.java

@@ -20,7 +20,7 @@ public interface DistributorSellerDao extends JpaSpecificationExecutor<Distribut
 	 * 根据企业enuu查询选中配送商
 	 * @return
 	 */
-	List<DistributorSeller> findByEnuuOrderByCreatetimeDesc(Long enuu);
+	List<DistributorSeller> findByEnuuOrderByNumAsc(Long enuu);
 
 	/**
 	 * 根据指定id删除该配送商

+ 14 - 0
src/main/java/com/uas/platform/b2c/logistics/model/DistributorSeller.java

@@ -53,6 +53,12 @@ public class DistributorSeller {
 	@Column(name = "seller_createtime")
 	private Date createtime;
 
+	/**
+	 * 配送商排序
+	 */
+	@Column(name = "seller_num")
+	private Integer num;
+
 	public Long getId() {
 		return id;
 	}
@@ -108,4 +114,12 @@ public class DistributorSeller {
 	public void setCreatetime(Date createtime) {
 		this.createtime = createtime;
 	}
+
+	public Integer getNum() {
+		return num;
+	}
+
+	public void setNum(Integer num) {
+		this.num = num;
+	}
 }

+ 3 - 1
src/main/java/com/uas/platform/b2c/logistics/service/impl/DistributorSellerServiceImpl.java

@@ -27,7 +27,7 @@ public class DistributorSellerServiceImpl implements DistributorSellerService {
 	@Override
 	public List<DistributorSeller> findAllChooseDistributor() {
 		Long enuu = SystemSession.getUser().getEnterprise().getUu();
-		return distributorSellerDao.findByEnuuOrderByCreatetimeDesc(enuu);
+		return distributorSellerDao.findByEnuuOrderByNumAsc(enuu);
 	}
 
 	@Override
@@ -36,6 +36,7 @@ public class DistributorSellerServiceImpl implements DistributorSellerService {
 		Long enuu = SystemSession.getUser().getEnterprise().getUu();
 		Long useruu = SystemSession.getUser().getUserUU();
 		distributorSellerDao.deleteDistributorByEnuu(enuu);//保存前先清空表
+		int num = 1;
 		for (JSONObject object : objects){
 			DistributorSeller distributor = new DistributorSeller();
 			if (object.getString("code") != null){
@@ -48,6 +49,7 @@ public class DistributorSellerServiceImpl implements DistributorSellerService {
 			distributor.setUseruu(useruu);
 			distributor.setEnuu(enuu);
 			distributor.setCreatetime(new Date());
+			distributor.setNum(num++);
 			savaList.add(distributor);
 		}
 		return distributorSellerDao.save(savaList);

+ 3 - 3
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -308,7 +308,7 @@ define(['app/app'], function(app) {
 				var size;
 				if(num == 1) {
 					if ($scope.address.name){
-						size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+						size = $scope.address.name.replace(/[^\x00-\xff]/g,'**').length;
 						if (size > 20) {
 							console.log(size);
 							$scope.userError = true;
@@ -318,7 +318,7 @@ define(['app/app'], function(app) {
 					}
 				} else if(num == 2) {
 					if ($scope.address.tel){
-						size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+						size = $scope.address.tel.replace(/[^\x00-\xff]/g,'**').length;
 						if (size < 8 || size > 11) {
 							$scope.telError = true;
 							return;
@@ -333,7 +333,7 @@ define(['app/app'], function(app) {
 					}
 				} else if(num == 3) {
 					if ($scope.address.detailAddress){
-						size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+						size = $scope.address.detailAddress.replace(/[^\x00-\xff]/g,'**').length;
 						if (size > 60) {
 							$scope.addrError = true;
 							return;

+ 3 - 3
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -809,7 +809,7 @@ define(['app/app'], function(app) {
 			var size;
 			if(num == 1) {
 				if ($scope.address.name){
-					size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+					size = $scope.address.name.replace(/[^\x00-\xff]/g,'**').length;
 					if (size > 20) {
 						$scope.userError = true;
 						return;
@@ -818,7 +818,7 @@ define(['app/app'], function(app) {
 				}
 			} else if(num == 2) {
 				if ($scope.address.tel){
-					size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+					size = $scope.address.tel.replace(/[^\x00-\xff]/g,'**').length;
 					if (size < 8 || size > 11) {
 						$scope.telError = true;
 						return;
@@ -833,7 +833,7 @@ define(['app/app'], function(app) {
 				}
 			} else if(num == 3) {
 				if ($scope.address.detailAddress){
-					size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+					size = $scope.address.detailAddress.replace(/[^\x00-\xff]/g,'**').length;
 					if (size > 60) {
 						$scope.addrError = true;
 						return;

+ 2 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_deliveryRule_ctrl.js

@@ -183,7 +183,7 @@ define([ 'app/app' ], function(app) {
         $scope.repeatError = false;
         $scope.checkRuleNameSize = function () {
             if ($scope.modifyRule.ruleName){
-                var size = $scope.modifyRule.ruleName.replace(/[^x00-xFF]/g,'**').length;
+                var size = $scope.modifyRule.ruleName.replace(/[^\x00-\xff]/g,'**').length;
                 if (size > 50) {
                     $scope.nameError = true;
                 }else {
@@ -587,7 +587,7 @@ define([ 'app/app' ], function(app) {
                                 items: null,
                                 selectedNum : 0,
                                 folded: true
-                            };
+                            }
                             $scope.hmtChild.items = convert(v, $scope.hmtChild);
                             var hmtArr = [];
                             hmtArr.push($scope.hmtChild);
@@ -603,7 +603,6 @@ define([ 'app/app' ], function(app) {
         $scope.chooseAddress = function () {
             $scope.chooseBox = true;
             $scope.tree = $scope.tree ? $scope.tree : new TreeData($scope.cityData);
-            console.log($scope.tree.$data);
             $scope.tree.newInitData($scope.mapArray);
         }
 

+ 3 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js

@@ -739,7 +739,7 @@ define(['app/app'], function(app) {
             var size;
             if(num == 1) {
                 if ($scope.address.name){
-                    size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+                    size = $scope.address.name.replace(/[^\x00-\xff]/g,'**').length;
                     if (size > 20) {
                         $scope.userError = true;
                         return;
@@ -748,7 +748,7 @@ define(['app/app'], function(app) {
                 }
             } else if(num == 2) {
                 if ($scope.address.tel){
-                    size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+                    size = $scope.address.tel.replace(/[^\x00-\xff]/g,'**').length;
                     if (size < 8 || size > 11) {
                         $scope.telError = true;
                         return;
@@ -763,7 +763,7 @@ define(['app/app'], function(app) {
                 }
             } else if(num == 3) {
                 if ($scope.address.detailAddress){
-                    size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+                    size = $scope.address.detailAddress.replace(/[^\x00-\xff]/g,'**').length;
                     if (size > 60) {
                         $scope.addrError = true;
                         return;

+ 4 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_distributor_ctrl.js

@@ -146,13 +146,13 @@ define([ 'app/app' ], function(app) {
         });
 
         var countLength = function (string) {
-            return string.replace(/[^x00-xFF]/g,'**').length;
+            return string.replace(/[^\x00-\xff]/g,'**').length;
         };
 
         $scope.inputContent = function () {
-            for (var i=0; i<$scope.keyword.length;i++){
-                if (countLength($scope.keyword.substr(0, i)) >= 26){
-                    $scope.keyword = $scope.keyword.substr(0, i);
+            for (var i = 1; i<=$scope.keyword.length; i++){
+                if (countLength($scope.keyword.substr(0, i)) > 26){
+                    $scope.keyword = $scope.keyword.substr(0, i-1);
                     break;
                 }
             }

+ 3 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_logistics_ctrl.js

@@ -362,7 +362,7 @@ define(['app/app', 'calendar'], function (app) {
 			var size;
 			if(num == 1) {
 				if ($scope.address.name){
-					size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+					size = $scope.address.name.replace(/[^\x00-\xff]/g,'**').length;
 					if (size > 20) {
 						$scope.userError = true;
 						return;
@@ -371,7 +371,7 @@ define(['app/app', 'calendar'], function (app) {
 				}
 			} else if(num == 2) {
 				if ($scope.address.tel){
-					size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+					size = $scope.address.tel.replace(/[^\x00-\xff]/g,'**').length;
 					if (size < 8 || size > 11) {
 						$scope.telError = true;
 						return;
@@ -386,7 +386,7 @@ define(['app/app', 'calendar'], function (app) {
 				}
 			} else if(num == 3) {
 				if ($scope.address.detailAddress){
-					size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+					size = $scope.address.detailAddress.replace(/[^\x00-\xff]/g,'**').length;
 					if (size > 60) {
 						$scope.addrError = true;
 						return;

+ 26 - 24
src/main/webapp/resources/view/vendor/forstore/vendor_delivery_rule.html

@@ -5,7 +5,7 @@
 		display: inline-block;
 	}
 	.delivery-list .content-header{
-		padding-top: 30px;
+		padding-top: 25px;
 		overflow: hidden;
 	}
 	.delivery-list .content-header span{
@@ -15,13 +15,15 @@
 	}
 	.delivery-list .content-header a{
 		float: right;
-		margin-right: 16px;
+		margin-right: 50px;
 		color: #333;
 		font-size: 14px;
 	}
 	.delivery-list .content-header i{
 		color: #32b500;
 		font-size: 16px;
+		position: relative;
+		top: 1px;
 	}
 	.delivery-list .content-body {
 		width: 1000px;
@@ -319,30 +321,30 @@
 			<div class="rule-content">
 				<!--暂时注释,在以后的开发中在释放出来-->
 				<!--<div class="row check-1">-->
-				<!--<span><strong>*</strong>适用类型</span>-->
-				<!--<label class="check-act">-->
-				<!--<input type="checkbox" id="1" ng-model="orderType.normal"/>-->
-				<!--<label for="1"></label>-->
-				<!--普通订单-->
-				<!--</label>-->
-				<!--<label class="check-act">-->
-				<!--<input type="checkbox" id="2" ng-model="orderType.preSale"/>-->
-				<!--<label for="2"></label>-->
-				<!--预售订单-->
-				<!--</label>-->
-				<!--<label class="check-act">-->
-				<!--<input type="checkbox" id="3" ng-modle="orderType.bill"/>-->
-				<!--<label for="3"></label>-->
-				<!--发票-->
-				<!--</label>-->
-				<!--<span>适用用户</span>-->
-				<!--<select class="select-adder form-control for-people" ng-model="modifyRule.userType">-->
-				<!--<option value="1301">所有用户</option>-->
-				<!--</select>-->
+					<!--<span><strong>*</strong>适用类型</span>-->
+					<!--<label class="check-act">-->
+						<!--<input type="checkbox" id="1" ng-model="orderType.normal"/>-->
+						<!--<label for="1"></label>-->
+						<!--普通订单-->
+					<!--</label>-->
+					<!--<label class="check-act">-->
+						<!--<input type="checkbox" id="2" ng-model="orderType.preSale"/>-->
+						<!--<label for="2"></label>-->
+						<!--预售订单-->
+					<!--</label>-->
+					<!--<label class="check-act">-->
+						<!--<input type="checkbox" id="3" ng-modle="orderType.bill"/>-->
+						<!--<label for="3"></label>-->
+						<!--发票-->
+					<!--</label>-->
+					<!--<span>适用用户</span>-->
+					<!--<select class="select-adder form-control for-people" ng-model="modifyRule.userType">-->
+						<!--<option value="1301">所有用户</option>-->
+					<!--</select>-->
 				<!--</div>-->
 				<div class="row" style="position: relative;">
 					<span><strong>*</strong>适用地区</span>
-					<div class="area-content" ng-if="mapArray.length >0">
+					<div class="area-content" ng-if="mapArray.length >0" style="max-height: 123px; overflow-y: auto;">
 						<span ng-repeat="data in mapArray">
 							<em ng-if="data.mainland">{{data.mainland}}</em>
 							<em ng-if="data.province">{{data.province}}</em>
@@ -993,7 +995,7 @@
 		height: 438px;
 		box-shadow: 2px 5px 8px #dee0e2;
 		position: absolute;
-		top: 120%;
+		top: 115%;
 		left: 487px;
 		background: #fff;
 		z-index: 10000;

+ 17 - 15
src/main/webapp/resources/view/vendor/forstore/vendor_distributor.html

@@ -76,40 +76,42 @@
 		padding-top: 25px;
 	}
 	.title-wrap{
-		height: 40px;
+		width: 100%;
+		margin: 0 auto;
+		margin-bottom: 15px;
 	}
 	.content-title{
-		width: 100px;
-		height: 40px;
 		text-align: center;
 		float: left;
-		margin-left: 25px;
+		margin-left: 23px;
 		font-size: 14px;
 	}
 	.add-btn{
 		width: 100px;
-		height: 40px;
 		text-align: center;
 		float: right;
-		margin-right: 25px;
-		font-size: 13px;
+		margin-right: 50px;
+		font-size: 14px;
 	}
 	.add-btn i{
-		background: white;
-		color: green;
-		margin-right: 5px;
+		color: #32b500;
+		font-size: 16px;
+		position: relative;
+		top: 1px;
 	}
 	.add-btn:hover{
 		cursor: pointer;
 	}
 	.send-list{
-		margin-left: 20px;
-		margin-right: 20px;
-		padding-bottom: 20px;
+		width: 1000px;
+		margin: 0 auto;
+		display: inline-block;
+		margin: 15px 0 0 13px;
+        padding-bottom: 20px;
 	}
 	.send-item{
 		display: inline-block;
-		width: 137px;
+		width: 14.28%;
 		height: 40px;
 		vertical-align: middle;
 		font-size: 14px;
@@ -160,7 +162,7 @@
 		<div class="distributor-content">
 			<div class="title-wrap">
 				<span class="content-title">我的配送商</span>
-				<span class="add-btn"  ng-click="addDistributor()"><i class="fa fa-plus-circle"></i>   设置配送商</span>
+				<span class="add-btn"  ng-click="addDistributor()"><i class="fa fa-plus-circle"></i>&nbsp;设置配送商</span>
 			</div>
 			<ul class="send-list">
 				<li ng-repeat="data in data_list track by $index" class="send-item" ng-mouseenter="hover_distributor($index)" ng-mouseleave="leave_distributor($index)">

+ 10 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_logistics.html

@@ -2,6 +2,15 @@
 	.count .count01 {
 		display: block;
 	}
+	.logistic-content .menu-title{
+		font-size: 14px;
+	}
+	.logistic-content .add-log button i{
+		margin: 0;
+		font-size: 16px;
+		position: relative;
+		top: 1px;
+	}
 </style>
 <!--右侧主体部分-->
 <div class="count user_right fr">
@@ -17,7 +26,7 @@
 		<!--收货地址-->
 		<div class="logistic-content" ng-if="tab=='logistic'">
 			<div class="menu-title row">现有发货地址<span>&nbsp;已保存<em>{{total}}</em>条,还能新增<em>{{canAddTotal-total}}</em>条地址</span></div>
-			<div class="add-log row" ng-if="total < canAddTotal"><button ng-click="editShippingAddress()"><i class="fa fa-plus-square"></i>新增发货地址</button></div>
+			<div class="add-log row" ng-if="total < canAddTotal"><button ng-click="editShippingAddress()"><i class="fa fa-plus-circle"></i>&nbsp;新增发货地址</button></div>
 			<div class="log-tab">
 				<table class="table">
 					<thead>

+ 5 - 3
src/main/webapp/resources/view/vendor/forstore/vendor_take_self.html

@@ -8,11 +8,11 @@
 		background: #fff;
 	}
 	.takeSelf .content-header{
-		padding-top: 35px;
+		padding-top: 25px;
 		overflow: hidden;
 	}
 	.takeSelf .content-header span{
-		padding-left: 45px;
+		padding-left: 23px;
 		font-size: 14px;
 		color: #333;
 	}
@@ -25,6 +25,8 @@
 	.takeSelf .content-header i{
 		color: #32b500;
 		font-size: 16px;
+		position: relative;
+		top: 1px;
 	}
 	.takeSelf .content-body {
 		width: 1000px;
@@ -33,7 +35,7 @@
 	}
 	.takeSelf .content-body table{
 		box-sizing: border-box;
-		margin-top: 20px;
+		margin-top: 15px;
 	}
 	.takeSelf .content-body thead{
 		height: 40px;

+ 1 - 1
src/main/webapp/resources/view/vendor/modal/vendor_distributor_manage.html

@@ -372,7 +372,7 @@
     <div class="dis-manage-middle">
         <input class="dis-manage-middle-input" type="text" placeholder="请输入配送商名称" ng-change="inputContent()" ng-model="keyword" ng-keydown="onKeyDown()" ng-blur="onBlur()" ng-focus="getFocus()">
         <button ng-disabled="!keyword || keyword.length==0" class="btn btn-success" ng-click="addItemInSelected()" type="button">新增</button>
-        <span class="dis-manage-middle-message" ng-if="!containsItem && keyword.length > 0"><i class="fa fa-info-circle"></i>系统无法提供此物流信息,请根据物流单号到相应的官网查询</span>
+        <span class="dis-manage-middle-message" ng-if="!containsItem && keyword.length > 0"><i class="fa fa-info-circle"></i>系统无法提供此物流信息,请根据物流单号到相应的官网查询</span>
         <!--<span class="dis-manage-middle-message" ng-if="companyError && keyword.length > 0">请输入正确的物流公司</span>-->
         <!--<ul id="ulContent">-->
         <!--<li ng-repeat="data in resultList" ng-click="clickItem(data)" ng-class="{'active': $index==selectIndex}">{{data.companyName}}</li>-->