Browse Source

Merge branch 'dev' into fix_#3_consignment

huxz 8 years ago
parent
commit
21555bd7d8
21 changed files with 290 additions and 197 deletions
  1. 4 2
      src/main/java/com/uas/platform/b2c/trade/presale/controller/CollectionController.java
  2. 4 0
      src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CollectionServiceImpl.java
  3. 1 0
      src/main/webapp/resources/js/prod/controllers/ComponentCtrl.js
  4. 12 2
      src/main/webapp/resources/js/usercenter/app.js
  5. 63 101
      src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js
  6. 4 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_cart_ctrl.js
  7. 10 0
      src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_order_ctrl.js
  8. 78 37
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js
  9. 14 2
      src/main/webapp/resources/js/vendor/controllers/forstore/purchase_detail.js
  10. 74 37
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js
  11. 0 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_logistics_ctrl.js
  12. 10 0
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js
  13. 2 2
      src/main/webapp/resources/view/prod/modal/edit-invoice-modal.html
  14. 1 1
      src/main/webapp/resources/view/usercenter/forstore/account_manager.html
  15. 1 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_order.html
  16. 3 3
      src/main/webapp/resources/view/usercenter/forstore/order_pay.html
  17. 2 1
      src/main/webapp/resources/view/usercenter/modal/collectModel.html
  18. 2 2
      src/main/webapp/resources/view/vendor/forstore/purchase_detail.html
  19. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_brand_apply_list.html
  20. 3 3
      src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html
  21. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_order.html

+ 4 - 2
src/main/java/com/uas/platform/b2c/trade/presale/controller/CollectionController.java

@@ -157,6 +157,7 @@ public class CollectionController {
 	@RequestMapping(value = "/save", method = RequestMethod.POST)
 	@ApiOperation(value = "保存收藏信息", httpMethod = "POST")
 	public String saveEntity(@ApiParam(required = true, value = "保存的json对象") @RequestBody String str) {
+		String result = "success";
 		if (StringUtils.hasText(str)) {
 			Collection store = FastjsonUtils.fromJson(str, Collection.class);
 			store.setUseruu(SystemSession.getUser().getUserUU());
@@ -167,9 +168,10 @@ public class CollectionController {
 				store.setDissociative(Type.PERSONAL.value());
 			}
 			store.setCreatetime(new Date());
-			collectionService.save(store);
+			result = collectionService.save(store);
 		}
-		return "success";
+		System.out.println("result = " + result);
+		return result;
 	}
 
 }

+ 4 - 0
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CollectionServiceImpl.java

@@ -75,12 +75,16 @@ public class CollectionServiceImpl implements CollectionService {
 
 			if (storeList.size() == 0) {
 				collectionDao.save(store);
+			}else {
+				return "repeat";
 			}
 		} else if (store.getKind() == 2) {
 			List<Collection> storelist = collectionDao.findStoreByUseruuAndEnuuAndKindAndComponentid(
 					SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu(), 2, store.getComponentid());
 			if (storelist.size() == 0) {
 				collectionDao.save(store);
+			}else {
+				return "repeat";
 			}
 		}
 		return "success";

+ 1 - 0
src/main/webapp/resources/js/prod/controllers/ComponentCtrl.js

@@ -364,6 +364,7 @@ define([ 'app/app', 'jquery-summernote' ], function(app) {
 	}]);
 	
 	app.register.controller('CollectModelCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance){
+		$scope.haveAdd = true;
 		$scope.cancel = function() {
 			$modalInstance.dismiss();
 		};

+ 12 - 2
src/main/webapp/resources/js/usercenter/app.js

@@ -557,7 +557,16 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 				$modal.open({
 					 templateUrl : $rootScope.rootPath + '/static/view/usercenter/modal/collectModel.html',
 					 controller : 'CollectModelCtrl',
-					 size : 'sm'
+					 size : 'sm',
+					 resolve : {
+						haveAdd : function(){
+							if (data == "success"){
+								return true;
+							} else{
+								return false;
+							}
+						}
+					 }
 				});
 				$rootScope.componentCount++;
 			}, function(error) {
@@ -567,7 +576,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 			
 	}]);
 	
-	app.controller('CollectModelCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance){
+	app.controller('CollectModelCtrl', ['$scope', '$modalInstance', 'haveAdd', function($scope, $modalInstance, haveAdd){
+		$scope.haveAdd = haveAdd;
 		$scope.cancel = function() {
 			$modalInstance.dismiss();
 		};

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

@@ -278,7 +278,11 @@ define(['app/app'], function(app) {
 						return false;
 					},
 					isModify : function () {
-						return true;
+						if (address){
+							return true;
+						}else {
+							return false;
+						}
 					}
 				}
 			}).result.then(function(address){
@@ -286,133 +290,76 @@ define(['app/app'], function(app) {
 					$scope.loadAddresses();
 				}
 			}, function(){
-				toaster.pop('info', '提示 ' + '您已取消发货地址的编辑');
+				// toaster.pop('info', '提示 ' + '您已取消发货地址的编辑');
 			});
 		};
 
-		$scope.addAddress = function () {
-			$modal.open({
-				templateUrl : $rootScope.rootPath + '/static/view/common/modal/edit_address_modal.html',
-				controller : 'addAddrCtrl',
-				size : 'lg',
-				resolve : {
-					isSendType : function () {
-						return false;
-					},
-					isModify : function () {
-						return false;
-					}
-				}
-			}).result.then(function(address){
-				if (address) {
-					$scope.loadAddresses();
-				}
-			}, function(){
-				toaster.pop('info', '提示 ' + '您已取消发货地址的编辑');
-			});
-		};
-
-		//地址新增模态框
-		app.register.controller('addAddrCtrl', ['$scope', '$modalInstance', 'toaster', '$http', 'ShippingAddress', 'isSendType', 'isModify', function($scope, $modalInstance, toaster, $http, ShippingAddress, isSendType, isModify){
-			$scope.isSendType = isSendType;
-			$scope.isSetTop = false;
-			$scope.isModify = isModify;
-			$http.get('static/js/prod/data/city.json').success(function(data) {
-				$scope.division = data;
-			}).error(function() {
-				toaster.pop('error', '系统错误 ' + '加载城市信息失败');
-			});
-
-			$scope.checkForm = function(name, num) {
-				var size;
-				if(num == 1) {
-					size = document.getElementById("userName").value.length;
-					if (size > 10) {
-						$scope.userError = true;
-						return;
-					}
-					$scope.userError = false;
-				} else if(num == 2) {
-					size = document.getElementById("tel").value.length;
-					if (size > 11) {
-						$scope.telError = true;
-						return;
-					}
-					$scope.telError = false;
-				} else if(num == 3) {
-					size = document.getElementById("addr").value.length;
-					if (size > 30) {
-						$scope.addrError = true;
-						return;
-					}
-					$scope.addrError = false;
-				}
-			};
-
-			$scope.save = function () {
-				var address = $scope.address;
-
-				//拼装地区
-				address.area = address.province + ',' + address.city + ',' + address.district;
-
-
-				// send属性 控制本地址是否是发货地址
-				ShippingAddress.save({isSetTop: $scope.isSetTop, send: $scope.isSendType, isPersonal: !$scope.isSendType}, address, function(data){
-					toaster.pop('success', '成功 ', '保存收货地址成功');
-					$modalInstance.close(data);
-				}, function(){
-					toaster.pop('error', '系统错误 ', '保存收货地址失败');
-				});
-			};
-
-			$scope.cancel = function() {
-				$modalInstance.dismiss();
-			};
-		}]);
-
 		//地址编辑模态框
 		app.register.controller('editAddrCtrl', ['$scope', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', 'isSendType', 'isModify', function($scope, addr, $modalInstance, toaster, $http, ShippingAddress, isSendType, isModify){
-			$scope.isSetTop = addr.num == 1;
+			if (addr){
+				$scope.isSetTop = addr.num == 1;
+			}else {
+				$scope.isSetTop = false;
+			}
 			$scope.isSendType = isSendType;
 			$scope.isModify = isModify;
 
-			$scope.checkForm = function(name, num) {
+			$scope.checkForm = function(num) {
 				var size;
 				if(num == 1) {
-					size = document.getElementById("userName").value.length;
-					if (size > 10) {
-						$scope.userError = true;
-						return;
+					if ($scope.address.name){
+						size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+						if (size > 20) {
+							console.log(size);
+							$scope.userError = true;
+							return;
+						}
+						$scope.userError = false;
 					}
-					$scope.userError = false;
 				} else if(num == 2) {
-					size = document.getElementById("tel").value.length;
-					if (size > 11) {
-						$scope.telError = true;
-						return;
+					if ($scope.address.tel){
+						size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+						if (size < 8 || size > 11) {
+							$scope.telError = true;
+							return;
+						}
+						$scope.telError = false;
+						var telPatt = new RegExp("^[0-9]+$");
+						if (telPatt.test($scope.address.tel)){
+							$scope.telPatternError = false;
+						}else {
+							$scope.telPatternError = true;
+						}
 					}
-					$scope.telError = false;
 				} else if(num == 3) {
-					size = document.getElementById("addr").value.length;
-					if (size > 30) {
-						$scope.addrError = true;
-						return;
+					if ($scope.address.detailAddress){
+						size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+						if (size > 60) {
+							$scope.addrError = true;
+							return;
+						}
+						$scope.addrError = false;
+					}
+				} else if(num == 4) {
+					var emailPatt = new RegExp("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$");
+					if ($scope.address.email.length > 0 && !emailPatt.test($scope.address.email)){
+						$scope.emailPatternError = true;
+					}else {
+						$scope.emailPatternError = false;
 					}
-					$scope.addrError = false;
 				}
 			};
 
 			$http.get('static/js/prod/data/city.json').success(function(data) {
 				$scope.division = data;
 				if(addr && addr.area){
-					$scope.address = addr;
+					// $scope.address = addr;
 					//拼装下拉选择框
 					var arr = addr.area.split(',');
 					addr.province = arr[0];
 					addr.city = arr[1];
 					addr.district = arr[2];
 					$scope.address = addr;
-					$scope.addr = true;
 				}
 			}).error(function() {
 				toaster.pop('error', '系统错误 ' + '加载城市信息失败');
@@ -421,6 +368,21 @@ define(['app/app'], function(app) {
 			$scope.save = function () {
 				var address = $scope.address;
 
+				if (!address){
+					toaster.pop('error', '请补充未填写的信息');
+					return ;
+				}
+				if (!address.name || !address.province || !address.city || !address.district ||
+					!address.detailAddress || !address.tel){
+					toaster.pop('error', '请补充未填写的信息');
+					return ;
+				}
+				if ($scope.userError || $scope.telError || $scope.addrError || $scope.telPatternError ||
+					$scope.emailPatternError){
+					toaster.pop('error', '请修改红色框内的信息');
+					return ;
+				}
+
 				//拼装地区
 				address.area = address.province + ',' + address.city + ',' + address.district;
 

+ 4 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_cart_ctrl.js

@@ -897,6 +897,10 @@ define(["app/app", 'jquery-summernote'], function(app) {
 						}
 					});
 				});
+				if (uuids.length == 0){
+					toaster.pop('info', '你还未选择任何产品');
+					return;
+				}
                 collectionService.saveStores({ }, uuids, function(response){
 					if(response.data == "success"){
                         $scope.collectDelete();

+ 10 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_order_ctrl.js

@@ -239,6 +239,16 @@ define(['app/app'], function (app) {
 			});
 		};
 
+		//取消订单状态码
+		$scope.cancelOrderArray = {
+			602: true,
+			603: true,
+			315: true,
+			604: true,
+			605: true,
+			606: true
+		};
+
 		var getRecommendComps = function (userUU, usedFor, pageable) {
 			Recommendation.getRecommendComps({page: pageable.page, size: pageable.size}, function (data) {
 				$scope.recommendComps = data.content;

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

@@ -445,11 +445,18 @@ define(['app/app'], function(app) {
 			$scope.isnotCheck = true;
 			$modal.open({
 				templateUrl : $rootScope.rootPath + '/static/view/common/modal/edit_address_modal.html',
-				controller : 'editAddrCtrl',
+				controller : 'editAddrPayCtrl',
 				size : 'lg',
 				resolve : {
 					addr : function(){
 						return angular.copy(addr);
+					},
+					isModify : function () {
+						if (addr){
+							return true;
+						}else {
+							return false;
+						}
 					}
 				}
 			}).result.then(function(address){
@@ -563,66 +570,100 @@ define(['app/app'], function(app) {
 	}]);
 
 	//地址编辑模态框
-	app.register.controller('editAddrCtrl', ['$scope', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', function($scope, addr, $modalInstance, toaster, $http, ShippingAddress){
+	app.register.controller('editAddrPayCtrl', ['$scope', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', 'isModify', function($scope, addr, $modalInstance, toaster, $http, ShippingAddress, isModify){
 		if (addr){
 			$scope.isSetTop = addr.num == 1;
 		}else {
 			$scope.isSetTop = false;
 		}
+		$scope.isModify = isModify;
 		$scope.validEmail = function (email) {
 			return /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(email)
         };
-        //验证数据
-        $scope.checkForm = function(name, num) {
-            var size;
-            if(num == 1) {
-                size = document.getElementById("userName").value.length;
-                console.log(size);
-                if (size > 10) {
-                    $scope.userError = true;
-                    return;
-                }
-                $scope.userError = false;
-            } else if(num == 2) {
-                size = document.getElementById("tel").value.length;
-                console.log(size);
-                if (size > 11) {
-                    $scope.telError = true;
-                    return;
-                }
-                $scope.telError = false;
-            } else if(num == 3) {
-                size = document.getElementById("addr").value.length;
-                console.log(size);
-                if (size > 30) {
-                    $scope.addrError = true;
-                    return;
-                }
-                $scope.addrError = false;
-            }
-        };
+
 		$http.get('static/js/prod/data/city.json').success(function(data) {
 			$scope.division = data;
 			if(addr && addr.area){
-				$scope.address = addr;
+				// $scope.address = addr;
 				//拼装下拉选择框
 				var arr = addr.area.split(',');
 				addr.province = arr[0];
 				addr.city = arr[1];
 				addr.district = arr[2];
 				$scope.address = addr;
-				$scope.addr = true;
+				// $scope.addr = true;
 			}
-		}).error(function(e) {
+		}).error(function() {
 			toaster.pop('error', '系统错误 ' + '加载城市信息失败');
 		});
 
+        //验证数据
+		$scope.checkForm = function(num) {
+			var size;
+			if(num == 1) {
+				if ($scope.address.name){
+					size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+					if (size > 20) {
+						$scope.userError = true;
+						return;
+					}
+					$scope.userError = false;
+				}
+			} else if(num == 2) {
+				if ($scope.address.tel){
+					size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+					if (size < 8 || size > 11) {
+						$scope.telError = true;
+						return;
+					}
+					$scope.telError = false;
+					var telPatt = new RegExp("^[0-9]+$");
+					if (telPatt.test($scope.address.tel)){
+						$scope.telPatternError = false;
+					}else {
+						$scope.telPatternError = true;
+					}
+				}
+			} else if(num == 3) {
+				if ($scope.address.detailAddress){
+					size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+					if (size > 60) {
+						$scope.addrError = true;
+						return;
+					}
+					$scope.addrError = false;
+				}
+			} else if(num == 4) {
+				var emailPatt = new RegExp("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$");
+				if ($scope.address.email.length > 0 && !emailPatt.test($scope.address.email)){
+					$scope.emailPatternError = true;
+				}else {
+					$scope.emailPatternError = false;
+				}
+			}
+		};
+
+
+
 		$scope.save = function () {
 			var address = $scope.address;
+
+			if (!address){
+				toaster.pop('error', '请补充未填写的信息');
+				return ;
+			}
+			if (!address.name || !address.province || !address.city || !address.district ||
+				!address.detailAddress || !address.tel){
+				toaster.pop('error', '请补充未填写的信息');
+				return ;
+			}
+			if ($scope.userError || $scope.telError || $scope.addrError || $scope.telPatternError ||
+				$scope.emailPatternError){
+				toaster.pop('error', '请修改红色框内的信息');
+				return ;
+			}
+
 			//拼装地区
-			/**
-			 * TODO 这里没做校验
-			 */
 			var strAres = address.province + ',' + address.city + ',' + address.district;
 			address.area = strAres;
 

+ 14 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/purchase_detail.js

@@ -185,7 +185,19 @@ define(['app/app'], function(app) {
 			});
 		}
 
-		$scope.updateTotal = function () {
+		$scope.updateTotal = function (data) {
+			if (isNaN(data.currentTaxUnitPrice)){
+				data.currentTaxUnitPrice = 0.000001;
+				toaster.pop('warning', '提示', '输入的价格必须是数字');
+				return ;
+			}
+			if (Number(data.currentTaxUnitPrice) <= 0){
+				data.currentTaxUnitPrice = 0.000001;
+			}
+			if (Number(data.currentTaxUnitPrice) > 100000){
+				data.currentTaxUnitPrice = 100000;
+			}
+			data.currentTaxUnitPrice = Number(NumberService.toCeil(data.currentTaxUnitPrice, 6));
 			$scope.purchase.currentTotal = 0;
 			angular.forEach($scope.purchase.purchaseDetails, function (detail) {
 				$scope.purchase.currentTotal += detail.currentTaxUnitPrice * detail.number;
@@ -217,7 +229,7 @@ define(['app/app'], function(app) {
                 var param = { };
                 param.detailid  = $scope.purchase.purchaseDetails[i].detailid;
                 param.modifyingUnitPrice = $scope.purchase.purchaseDetails[i].currentTaxUnitPrice;
-                if($scope.purchase.purchaseDetails[i].currentTaxUnitPrice <= 0.000001){
+                if($scope.purchase.purchaseDetails[i].currentTaxUnitPrice < 0.000001){
                     toaster.pop('info', '金额必须要大于0.000001');
                     return;
                 }

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

@@ -180,7 +180,7 @@ define(['app/app'], function(app) {
             $scope.isnotCheck = true;
             $modal.open({
                 templateUrl : 'static/view/common/modal/edit_address_modal.html',
-                controller : 'editAddrCtrl',
+                controller : 'editAddrDeCtrl',
                 size : 'lg',
                 resolve : {
                     addr : function(){
@@ -206,6 +206,7 @@ define(['app/app'], function(app) {
         var loadAddrs = function() {
             ShippingAddress.getListEnterprise({ship : false}, function(data) {
                 $scope.addresss = data;
+                $scope.total = $scope.addresss.length;
                 $scope.jsonSdAddress = {};
                 if($scope.addresss.length > 0) {
                     $scope.jsonSdAddress = $scope.addresss[0];
@@ -580,42 +581,19 @@ define(['app/app'], function(app) {
     }]);
 
     //地址编辑模态框
-    app.register.controller('editAddrCtrl', ['$scope', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', function($scope, addr, $modalInstance, toaster, $http, ShippingAddress){
-        $scope.isSetTop = false;
+    app.register.controller('editAddrDeCtrl', ['$scope', 'addr', '$modalInstance', 'toaster', '$http', 'ShippingAddress', function($scope, addr, $modalInstance, toaster, $http, ShippingAddress){
+        if (addr){
+            $scope.isSetTop = addr.num == 1;
+            $scope.isModify = true;
+        }else {
+            $scope.isSetTop = false;
+            $scope.isModify = false;
+        }
 
         $scope.isSendType = true;
         //验证数据
         $scope.checkeds = {};
-        //验证数据
-        $scope.checkForm = function(name, num) {
-            var size;
-            if(num == 1) {
-                size = document.getElementById("userName").value.length;
-                console.log(size);
-                if (size > 10) {
-                    $scope.userError = true;
-                    return;
-                }
-                $scope.userError = false;
-            } else if(num == 2) {
-                size = document.getElementById("tel").value.length;
-                console.log(size);
-                if (size > 11) {
-                    $scope.telError = true;
-                    return;
-                }
-                $scope.telError = false;
-            } else if(num == 3) {
-                // size = document.getElementById("addr").value.length;
-                size = $scope.address.detailAddress.length;
-                console.log(size);
-                if (size > 30){
-                    $scope.addrError = true;
-                    return;
-                }
-                $scope.addrError = false;
-            }
-        };
+
         $http.get('static/js/prod/data/city.json').success(function(data) {
             $scope.division = data;
             if(addr){
@@ -628,16 +606,75 @@ define(['app/app'], function(app) {
                 $scope.address = addr;
                 $scope.addr = true;
             }
-        }).error(function(e) {
+        }).error(function() {
             toaster.pop('error', '系统错误 ' + '加载城市信息失败');
         });
 
+        $scope.checkForm = function(num) {
+            var size;
+            if(num == 1) {
+                if ($scope.address.name){
+                    size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
+                    if (size > 20) {
+                        $scope.userError = true;
+                        return;
+                    }
+                    $scope.userError = false;
+                }
+            } else if(num == 2) {
+                if ($scope.address.tel){
+                    size = $scope.address.tel.replace(/[^x00-xFF]/g,'**').length;
+                    if (size < 8 || size > 11) {
+                        $scope.telError = true;
+                        return;
+                    }
+                    $scope.telError = false;
+                    var telPatt = new RegExp("^[0-9]+$");
+                    if (telPatt.test($scope.address.tel)){
+                        $scope.telPatternError = false;
+                    }else {
+                        $scope.telPatternError = true;
+                    }
+                }
+            } else if(num == 3) {
+                if ($scope.address.detailAddress){
+                    size = $scope.address.detailAddress.replace(/[^x00-xFF]/g,'**').length;
+                    if (size > 60) {
+                        $scope.addrError = true;
+                        return;
+                    }
+                    $scope.addrError = false;
+                }
+            } else if(num == 4) {
+                var emailPatt = new RegExp("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$");
+                if ($scope.address.email.length > 0 && !emailPatt.test($scope.address.email)){
+                    $scope.emailPatternError = true;
+                }else {
+                    $scope.emailPatternError = false;
+                }
+            }
+        };
+
+
         $scope.save = function () {
             var address = $scope.address;
+
+            if (!address){
+                toaster.pop('error', '请补充未填写的信息');
+                return ;
+            }
+            if (!address.name || !address.province || !address.city || !address.district ||
+                !address.detailAddress || !address.tel){
+                toaster.pop('error', '请补充未填写的信息');
+                return ;
+            }
+            if ($scope.userError || $scope.telError || $scope.addrError || $scope.telPatternError ||
+                $scope.emailPatternError){
+                toaster.pop('error', '请修改红色框内的信息');
+                return ;
+            }
+
             //拼装地区
-            /**
-             * TODO 这里没做校验
-             */
             var strAres = address.province + ',' + address.city + ',' + address.district;
             address.area = strAres;
 

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

@@ -364,7 +364,6 @@ define(['app/app', 'calendar'], function (app) {
 				if ($scope.address.name){
 					size = $scope.address.name.replace(/[^x00-xFF]/g,'**').length;
 					if (size > 20) {
-						console.log(size);
 						$scope.userError = true;
 						return;
 					}

+ 10 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -853,6 +853,16 @@ define(['app/app'], function (app) {
             $scope.orderTableParams.reload();
         };
 
+        //取消订单状态码
+        $scope.cancelOrderArray = {
+            602: true,
+            603: true,
+            315: true,
+            604: true,
+            605: true,
+            606: true
+        };
+
         //当前页在前段的计算方式
         $scope.frontSegment = function (currentPage, totalElementPages) {
             angular.forEach($scope.pages, function (page) {

+ 2 - 2
src/main/webapp/resources/view/prod/modal/edit-invoice-modal.html

@@ -201,7 +201,7 @@
                             <label for="check-mpy"></label>
                              <span>我已阅读并同意</span>
                      </label>
-                     <a href="help#/nav/19" class="base-line" target="_blank" style=" position: relative;top: -3px;">《发票须知》</a>
+                     <a href="help/helpList/19" class="base-line" target="_blank" style=" position: relative;top: -3px;">《发票须知》</a>
                     </div>
               </div>
               <div class="col-md-offset-3">
@@ -341,7 +341,7 @@
                           <label for="check-mzy"></label>
                           <span>我已阅读并同意</span>
                       </label>
-                      <a href="help#/nav/19">《发票须知》</a>
+                      <a href="help/helpList/19">《发票须知》</a>
                   </div>
               </div>
               <div class="col-md-offset-3">

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/account_manager.html

@@ -161,7 +161,7 @@
 	<!--收货地址-->
 	<div class="logistic-content" ng-if="tab=='logistics'">
 		<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="addAddress()"><i class="fa fa-plus-square"></i>新增收货地址</button></div>
+		<div class="add-log row" ng-if="total < canAddTotal"><button ng-click="modifyAddress()"><i class="fa fa-plus-square"></i>新增收货地址</button></div>
 		<div class="log-tab">
 			<table class="table">
 				<thead>

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

@@ -702,7 +702,7 @@
                                  <div style="display: none;" class="send-button"><a class="send">发送</a></div>
                             </div>
                         </span>
-						<span class="trash" ng-if="order.status == '603'" ng-click="showDeleteOrder(order)"><i class="fa fa-trash"></i></span>
+						<span class="trash" ng-if="cancelOrderArray[order.status]" ng-click="showDeleteOrder(order)"><i class="fa fa-trash"></i></span>
 						<div class="com-del-box" ng-if="order.showDelete">
 							<div class="title">
 								<a ng-click="order.showDelete=false"><i class="fa fa-close fa-lg"></i></a>

+ 3 - 3
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -387,7 +387,7 @@
 			</ul>
 			<div class="f14 notice margin-top-20 margin-bottom-10 text-center" ng-if="sendAddress.length == 0">您还没有添加收货地址信息,请先新增收货地址信息</div>
 			<div class="pay_add">
-				<a class="add_adr fl" ng-click="addShippingAddress()" ng-if="order.status == 501"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;新增地址</a>
+				<a class="add_adr fl" ng-click="addShippingAddress()" ng-if="order.status == 501 && sendAddress.length < 20"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;新增地址</a>
 				<a class="add_adr fr" ng-click="toggleAddress()" ng-if="sendAddress.length/3 > 1"><b ng-if="expand">隐藏地址</b><b ng-if="!expand">显示地址</b></a>
 			</div>
 		</div>
@@ -507,14 +507,14 @@
 								</p>
 							</span>
 							<span>
-                            	<textarea ng-if="order.status==501" placeholder="可填写产品备注!例如物料编号" ng-model="detail.remark"></textarea>
+                            	<textarea ng-if="order.status==501" placeholder="可填写产品备注!例如物料编号" ng-model="detail.remark" maxlength="200"></textarea>
                         		<em ng-if="order.status!=501" ng-bind="detail.remark" style="color: #333; line-height: 20px; display: inline-block; padding-top: 10px;"></em>
 							</span>
 						</dd>
 						<dd class="oder-remark">
 							<span style="width: 100%">
 								<em>订单备注:</em>
-								<input type="text"  class="form-control" placeholder="请填写订单备注" ng-model="remarkList[details[0].storeid]"/>
+								<input type="text"  class="form-control" placeholder="请填写订单备注" ng-model="remarkList[details[0].storeid]" maxlength="200"/>
 							</span>
 						</dd>
 						<dd class="line60">

+ 2 - 1
src/main/webapp/resources/view/usercenter/modal/collectModel.html

@@ -20,7 +20,8 @@
 </style>
 <div>
 	<div class="modal-header">
-		<h3 class="header-text">收藏成功!</h3>
+		<h3 class="header-text" ng-if="haveAdd">收藏成功!</h3>
+		<h3 class="header-text" ng-if="!haveAdd">请勿重复收藏!</h3>
 	</div>
 	<div class="modal-body">
 		<button type="button" ng-click="cancel()" class="btn" style="margin-left:25px;">关&nbsp;&nbsp;闭</button>

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

@@ -357,7 +357,7 @@
 					<dd class="order-company">
 						<span style="white-space: nowrap; width: 100%; text-align: left; line-height: 50px;">
 							<i style="min-width: 315px; display: inline-block">
-								&nbsp;&nbsp;{{purchase.buyername}} <!--<a ng-if="purchase.pu_buyentername" name="{{purchase.id}}" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">|{{purchase.pu_buyentername}}</a>-->
+								&nbsp;&nbsp;{{purchase.buyername}}<i ng-if="purchase.buyentername">&nbsp;&nbsp;|&nbsp;&nbsp;{{purchase.buyentername}}</i> <!--<a ng-if="purchase.pu_buyentername" name="{{purchase.id}}" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)"></a>-->
 							</i>
 							<img src="static/img/common/songguo.png" style="margin-right:0; ">
 							<!--<a name="{{purchase.id}}" href="javascript:void(0)" class="contact_btn" ng-controller="ChatContactCtrl as chat" ng-click="chat.contactWithOther(purchase.buyPhone, purchase.buyerenuu, chat.UserType.ENTERPRISE)">联系买家</a>-->
@@ -386,7 +386,7 @@
 							<em  ng-show="!isChange" ng-bind="detail.taxUnitPrice | formateNumber : 6 | currencySysmbol : detail.currencyName" style="color: #333;"></em>
 							<em ng-show="isChange" class="price-style">
 								<em  ng-bind="'' | currencySysmbol : detail.currencyName"></em>
-								<input ng-model="detail.currentTaxUnitPrice" type="number" ng-change="updateTotal()"/>
+								<input ng-model="detail.currentTaxUnitPrice" type="number" ng-change="updateTotal(detail)"/>
 							</em>
 						</span>
 						<span style="width: 10%;" ng-bind="detail.number">100</span>

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

@@ -80,7 +80,7 @@
                     <tr ng-repeat="brand in $data">
                         <td class="wd01">{{($index + 1)}}</td>
                         <td>{{brand.nameEn}}</td>
-                        <td>{{brand.application}}</td>
+                        <td title="{{brand.application}}">{{brand.application}}</td>
                         <td>{{brand.userModify.userName}}</td>
                         <td>{{brand.lastModifyDate | date: "yyyy-MM-dd HH:mm"}}</td>
                         <td>{{brand.status | status}}</td>

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

@@ -144,7 +144,7 @@
                             <div>
                                 <a ng-if="checkinvoice.status!=404" class="taggle-address edit-address" ng-click="editAddr(jsonSdAddress)"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;编辑</a>
                                 <a ng-if="checkinvoice.status!=404" class="taggle-address" ng-click="taggleAddress(jsonSdAddress)"><i class="fa fa-refresh" aria-hidden="true"></i>&nbsp;切换</a>
-                                <a ng-if="checkinvoice.status!=404" class="taggle-address" ng-click="editAddr()"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;新建</a>
+                                <a ng-if="checkinvoice.status!=404 && total < 20" class="taggle-address" ng-click="editAddr()"><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;新建</a>
                             </div>
                         </span>
                     </li>
@@ -168,8 +168,8 @@
                     </dd>
                     <dd class="oder_l" ng-repeat="detail in checkinvoice.invoiceFPurchaseDetails">
                             <span class="wid01">
-                                <a href="javascript:void(0)"><img ng-src="{{detail.img || 'static/img/store/common/default.png'}}" width="42" height="42"/></a>
-                                <p ng-bind="detail.cmpCode"></p>
+                                <a href="store/{{::detail.storeid}}/{{::detail.batchCode}}"><img ng-src="{{detail.img || 'static/img/store/common/default.png'}}" width="42" height="42"/></a>
+                                <p><a href="store/{{detail.storeid}}/{{::detail.batchCode}}" ng-bind="detail.cmpCode" title="{{detail.cmpCode}}" class="text-more" style="width: 160px;margin-top: 3px;"></a></p>
                             </span>
                         <span  class="wid01" ng-bind="detail.kiName"></span>
                         <span ng-bind="detail.number | number"></span>

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

@@ -772,7 +772,7 @@
 								<a ng-click="print(purchase, 'SALESEND_ADMIN')" title="打印出货单"><i class="fa fa-print fa-lg"></i>打印出货单</a>
 							</div>
 						</span>
-						<span class="trash" ng-if="purchase.status=='603' || purchase.status=='606'" ng-click="showDeletePurchase(purchase)"><i class="fa fa-trash"></i></span>
+						<span class="trash" ng-if="cancelOrderArray[purchase.status]" ng-click="showDeletePurchase(purchase)"><i class="fa fa-trash"></i></span>
 						<div class="com-del-box" ng-if="purchase.showDelete">
 							<div class="title">
 								<a ng-click="purchase.showDelete=false"><i class="fa fa-close fa-lg"></i></a>