Просмотр исходного кода

Merge remote-tracking branch 'origin/dev' into bug

hulh 8 лет назад
Родитель
Сommit
c4a2c5ef2b

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/order/status/PurchaseStatus.java

@@ -34,7 +34,7 @@ public enum PurchaseStatus {
 	/**
 	 * {@code unavailable 售后中}
 	 */
-	TOBEREVIEWED("toBeReviewed","404-503-520");
+	TOBEREVIEWED("toBeReviewed","404-503");
 
 	/**
 	 * 状态名称

+ 11 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_order_ctrl.js

@@ -351,7 +351,7 @@ define(['app/app'], function (app) {
 		};
 
 		// 选择查找日期
-		$scope.onDateCondition = function(){
+		$scope.onDateCondition = function(isStart){
 			if(typeof $scope.startDate == 'undefined' || typeof $scope.endDate == 'undefined'){
 				alert("日期格式错误,请重新输入!");
 				$scope.startDate = null;
@@ -362,6 +362,16 @@ define(['app/app'], function (app) {
 				$scope.endDate = $scope.endDate.toString().replace(/[0-9]{2}:[0-9]{2}:[0-9]{2}/g, '23:59:59');//;'23.59';//DateUtil.yyyyMmDd($scope.endDate.getTime() + 86399000);
 				$scope.endDate = new Date(formatDateTime(new Date($scope.endDate.toString())));
 			}
+			if ($scope.endDate !== null && $scope.startDate>$scope.endDate){
+				if (isStart){
+					alert("开始日期大于结束日期,请重新输入!");
+					$scope.startDate = null;
+				} else {
+					alert("开始日期大于结束日期,请重新输入!");
+					$scope.endDate = null;
+				}
+				return;
+			}
 			$scope.param.startDate = $scope.startDate ? $scope.startDate.getTime() : null;
 			$scope.param.endDate = $scope.endDate ? $scope.endDate.getTime()  : null;
 

+ 13 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -120,7 +120,7 @@ define(['app/app'], function (app) {
                     state = '602-603-315-604-605-606';
                     break;
                 case 'toBeReviewed':
-                    state = '404-503-520';
+                    state = '404-503';
                     break;
                 //下面的状态栏新增的状态
                 case 'tobepay':
@@ -576,6 +576,18 @@ define(['app/app'], function (app) {
                 $scope.endDate = $scope.endDate.toString().replace(/[0-9]{2}:[0-9]{2}:[0-9]{2}/g, '23:59:59');//;'23.59';//DateUtil.yyyyMmDd($scope.endDate.getTime() + 86399000);
                 $scope.endDate = new Date(formatDateTime(new Date($scope.endDate.toString())));
             }
+            $scope.vaildDate(false);
+        };
+        $scope.vaildDate = function (isStart) {
+            if ($scope.endDate !== null && $scope.startDate>$scope.endDate){
+                if (isStart){
+                    alert("开始日期大于结束日期,请重新输入!");
+                    $scope.startDate = null;
+                } else {
+                    alert("开始日期大于结束日期,请重新输入!");
+                    $scope.endDate = null;
+                }
+            }
         };
         var formatDateTime = function (date) {
             var y = date.getFullYear();

+ 2 - 2
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -601,7 +601,7 @@
 							   max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"
 							   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                                ng-click="openDatePicker($event, condition, 'startDateOpen',1)"
-							   ng-change="onDateCondition()"/>
+							   ng-change="onDateCondition(true)"/>
 							<button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>
 					</div>
 
@@ -614,7 +614,7 @@
 								 min-date="startDate" current-text="今天" clear-text="清除" close-text="关闭"
 								 datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
                                  ng-click="openDatePicker($event, condition, 'endDateOpen',2)"
-								 ng-change="onDateCondition()"/>
+								 ng-change="onDateCondition(false)"/>
 								<button class="open" ng-click="openDatePicker($event, condition, 'endDateOpen')"></button>
 						</div>
 				</div>

+ 2 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -666,6 +666,7 @@
 						   max-date="endDate" current-text="今天" clear-text="清除" close-text="关闭"
                                ng-click="openDatePicker($event, condition, 'startDateOpen',1)"
 						   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+							   ng-change="vaildDate(true)"
 						/>
 						<button class="open" ng-click="openDatePicker($event, condition, 'startDateOpen')"></button>
 					</div>
@@ -724,7 +725,7 @@
 							<a ng-if=" status == 'all'" ng-click="setChildStatus('502-406','待发货')" title="">待发货</a>
 							<a ng-if="status == 'inbound' || status == 'all' || status == 'toBeReviewed'" ng-click="setChildStatus('404','待买家收货')" title="">待买家收货</a>
 							<a ng-if="status == 'tobepaid' || status == 'all' || status == 'toBeReviewed'" ng-click="setChildStatus('514','待商城付款')" title="">待商城付款</a>
-							<a ng-if="status == 'completed' || status == 'tobepaid' || status == 'all' || status == 'toBeReviewed'" ng-click="setChildStatus('520','交易完成')" title="">交易完成</a>
+							<a ng-if="status == 'completed' || status == 'tobepaid' || status == 'all'" ng-click="setChildStatus('520','交易完成')" title="">交易完成</a>
 							<a ng-if="status == 'completed' || status == 'all'" ng-click="setChildStatus('606','交易关闭')" title="">交易关闭</a>
 							<a ng-if=" status == 'all'" ng-click="setChildStatus('602-603-315-604-605-606','已取消')" title=""> 已取消</a>
 							<a ng-if="status == 'inbound' || status == 'all' || status == 'tobepaid'" ng-click="setChildStatus('606','售后中')" title="">售后中</a>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html

@@ -699,7 +699,7 @@
 				<span>电&nbsp;&nbsp;&nbsp;&nbsp;话<strong class="text-inverse">*</strong></span>
 			</div>
 			<div class="col-md-10 custom_col">
-				<input type="text" class="form-control" style="border-radius: inherit;" title="enTel" ng-model="sampleStore.enterprise.enTel" maxlength="20"/>
+				<input type="text" class="form-control" style="border-radius: inherit;" title="enTel"  ng-pattern="/^(\d){8,12}$/" ng-model="sampleStore.enterprise.enTel" maxlength="12"/>
 			</div>
 		</div>
 		<div class="row com_row" style="margin-top: 10px;">
@@ -707,7 +707,7 @@
 				<span>传&nbsp;&nbsp;&nbsp;&nbsp;真<strong class="text-inverse">*</strong></span>
 			</div>
 			<div class="col-md-10 custom_col">
-				<input type="text" class="form-control" style="border-radius: inherit;" title="enFax" ng-model="sampleStore.enterprise.enFax" maxlength="20"/>
+				<input type="text" class="form-control" style="border-radius: inherit;" title="enFax" ng-pattern="/^[\d-]{0,20}$/" ng-model="sampleStore.enterprise.enFax" maxlength="20"/>
 			</div>
 		</div>
 	</div><!-- 店铺基础信息输入 end -->