|
|
@@ -38,6 +38,18 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
* @type {number}
|
|
|
*/
|
|
|
$scope.maxReserve = 999999999;
|
|
|
+
|
|
|
+ $scope.packageArray = ["请选择", "Bulk-散装", "Reel-卷装", "Tape/Reel-编带", "Tray-盘装",
|
|
|
+ "Tube-管装", "盒装", "袋装", "罐装", "瓶装", "桶装", "箱装"];
|
|
|
+
|
|
|
+ $scope.showText = function (item) {
|
|
|
+ $scope.goods.editPackaging = item;
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.showClickText = function (goods, item) {
|
|
|
+ goods.editPackaging = item;
|
|
|
+ };
|
|
|
+
|
|
|
/**
|
|
|
* 最小包装量的最大值
|
|
|
*/
|
|
|
@@ -1284,27 +1296,27 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
toaster.pop('warning', '提示', '标签信息超过了20个字符');
|
|
|
return result;
|
|
|
}
|
|
|
- if (!goods.editPackaging) {
|
|
|
+ if (!goods.editPackaging || goods.editPackaging == '请选择') {
|
|
|
goods.editPackagingInvalid = true;
|
|
|
- toaster.pop('warning', '提示', '请填写包装方式');
|
|
|
- return result;
|
|
|
- }
|
|
|
- if (!pattern.test(goods.editPackaging)) {
|
|
|
- goods.editPackagingInvalid = true;
|
|
|
- toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
|
|
|
- return result;
|
|
|
- }
|
|
|
- if (goods.editPackaging.length > 10) {
|
|
|
- goods.editPackagingInvalid = true;
|
|
|
- toaster.pop('warning', '提示', '包装方式不能超过10个字符');
|
|
|
+ toaster.pop('warning', '提示', '请选择包装方式');
|
|
|
return result;
|
|
|
}
|
|
|
+ // if (!pattern.test(goods.editPackaging)) {
|
|
|
+ // goods.editPackagingInvalid = true;
|
|
|
+ // toaster.pop('warning', '提示', '包装方式仅能包含中文和英文字符');
|
|
|
+ // return result;
|
|
|
+ // }
|
|
|
+ // if (goods.editPackaging.length > 10) {
|
|
|
+ // goods.editPackagingInvalid = true;
|
|
|
+ // toaster.pop('warning', '提示', '包装方式不能超过10个字符');
|
|
|
+ // return result;
|
|
|
+ // }
|
|
|
if (!goods.editProduceDate) {
|
|
|
goods.editProduceDateInvalid = true;
|
|
|
toaster.pop('warning', '提示', '请填写生产日期');
|
|
|
return result;
|
|
|
}
|
|
|
- if (goods.editProduceDate.length > 11) {
|
|
|
+ if (goods.editProduceDate.length > 12) {
|
|
|
goods.editProduceDateInvalid = true;
|
|
|
toaster.pop('warning', '提示', '生产日期不能超过12个字符');
|
|
|
return result;
|
|
|
@@ -1450,31 +1462,31 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
$scope.compareNum = function(min, max, type, goods) {
|
|
|
if(!min) {
|
|
|
goods.editMinDeliveryinValid = true;
|
|
|
- toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
|
+ toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
|
|
|
return false;
|
|
|
}else if(!max) {
|
|
|
goods.editMaxDeliveryinValid = true;
|
|
|
- toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
|
+ toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
|
|
|
return false;
|
|
|
}
|
|
|
if(!$scope.isInt.test(min)) {
|
|
|
goods.editMinDeliveryinValid = true;
|
|
|
- toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
|
+ toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
|
|
|
return false;
|
|
|
}
|
|
|
if(!$scope.isInt.test(max)) {
|
|
|
goods.editMaxDeliveryinValid = true;
|
|
|
- toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
|
+ toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
|
|
|
return false;
|
|
|
}
|
|
|
- if(min < 1 || min > 31) {
|
|
|
+ if(min < 1 || min > 999) {
|
|
|
goods.editMinDeliveryinValid = true;
|
|
|
- toaster.pop('warning', '提示', '交期只能填写1-31之间的值');
|
|
|
+ toaster.pop('warning', '提示', '交期只能填写1-999之间的值');
|
|
|
return false;
|
|
|
}
|
|
|
- if(max < 1 || max > 31) {
|
|
|
+ if(max < 1 || max > 999) {
|
|
|
goods.editMaxDeliveryinValid = true;
|
|
|
- toaster.pop('warning', '提示', '交期的时间必须是1-31之内');
|
|
|
+ toaster.pop('warning', '提示', '交期的时间必须是1-999之内');
|
|
|
return false;
|
|
|
}
|
|
|
if(Number(min) > Number(max)) {
|
|
|
@@ -1630,6 +1642,12 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
},
|
|
|
tipModal : function() {
|
|
|
return true;
|
|
|
+ },
|
|
|
+ success : function () {
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ uuid: function () {
|
|
|
+ return null;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -2519,7 +2537,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
if(!$scope.isInt.test(min)) {
|
|
|
if(!$scope.$$nonProduct.enterSaveButton) {
|
|
|
- toaster.pop('warning', '提示', '交期请输入1-31的整数');
|
|
|
+ toaster.pop('warning', '提示', '交期请输入1-999的整数');
|
|
|
goods.editMinDeliveryinValid = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -2535,7 +2553,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
if(!$scope.isInt.test(max)) {
|
|
|
if(!$scope.$$nonProduct.enterSaveButton) {
|
|
|
- toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
|
+ toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
|
|
|
goods.editMaxDeliveryinValid = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -2543,14 +2561,14 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- if(day > 31 || day < 1) {
|
|
|
+ if(day > 999 || day < 1) {
|
|
|
if(!$scope.$$nonProduct.enterSaveButton) {
|
|
|
if(isMin) {
|
|
|
goods.editMinDeliveryinValid = true;
|
|
|
}else {
|
|
|
goods.editMaxDeliveryinValid = true;
|
|
|
}
|
|
|
- toaster.pop('warning', '提示', '交期的值必须在1-31天');
|
|
|
+ toaster.pop('warning', '提示', '交期的值必须在1-999天');
|
|
|
}
|
|
|
return ;
|
|
|
}
|