|
|
@@ -83,6 +83,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
|
|
|
// 品牌change事件
|
|
|
$scope.onBrandChange = function(brand, index) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
$scope.objError.pbranden = false
|
|
|
if (index === undefined) {
|
|
|
if (brand === '') {
|
|
|
@@ -118,6 +119,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
}
|
|
|
|
|
|
$scope.RegulKindBlur = function() {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
$scope.objError.kind = false
|
|
|
}
|
|
|
|
|
|
@@ -127,11 +129,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
* @param name 品牌名称
|
|
|
*/
|
|
|
$scope.RegulonBrandBlur = function(name) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
// setTimeout(function() {
|
|
|
if (name === '') {
|
|
|
$scope.Regul.BrandList = []
|
|
|
} else {
|
|
|
- $scope.Regul.pbranden = $scope.Regul.BrandList.value && $scope.Regul.BrandList.value[0].nameEn || name
|
|
|
+ $scope.Regul.pbranden = $scope.Regul.BrandList && $scope.Regul.BrandList.value && $scope.Regul.BrandList.value[0].nameEn || name
|
|
|
$scope.Regul.BrandList = []
|
|
|
}
|
|
|
// }, 300)
|
|
|
@@ -143,6 +146,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
}
|
|
|
|
|
|
$scope.setBrand = function(brand, index) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
if (index === undefined) {
|
|
|
$scope.Regul.pbranden = brand
|
|
|
$scope.Regul.BrandList = []
|
|
|
@@ -167,6 +171,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
;
|
|
|
|
|
|
$scope.onCodeChange = function(code, index) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
$scope.objError.pcmpcode = false
|
|
|
if (index === undefined) {
|
|
|
if (code === '') {
|
|
|
@@ -187,22 +192,25 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
* @param name 型号名称
|
|
|
*/
|
|
|
$scope.RegulonCodeBlur = function(name) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
if (name === '') {
|
|
|
$scope.Regul.CodeList = []
|
|
|
} else {
|
|
|
$scope.Regul.pcmpcode = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pcmpcode || name
|
|
|
- $scope.Regul.CodeList = []
|
|
|
$scope.Regul.pbranden = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.pbranden
|
|
|
$scope.Regul.spec = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.spec
|
|
|
$scope.Regul.kind = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].pbranden || $scope.Regul.kind
|
|
|
+ $scope.Regul.CodeList = []
|
|
|
}
|
|
|
}
|
|
|
$scope.setCode = function(code, index) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
$scope.Regul.pcmpcode = code.pcmpcode
|
|
|
- $scope.Regul.CodeList = []
|
|
|
+
|
|
|
$scope.Regul.pbranden = code.pbranden
|
|
|
$scope.Regul.spec = code.spec
|
|
|
$scope.Regul.kind = code.kind
|
|
|
+ $scope.Regul.CodeList = []
|
|
|
}
|
|
|
|
|
|
var countLength = function(string) {
|
|
|
@@ -239,6 +247,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
}
|
|
|
|
|
|
$scope.setPriceMinPackAmount = function(num) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
if (num && num.indexOf('.') > -1) {
|
|
|
toaster.pop('warning', '提示', '最小包装数不能存在小数点')
|
|
|
$scope.Regul.minPackQty = 1
|
|
|
@@ -249,6 +258,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
}
|
|
|
|
|
|
$scope.setReserve = function(num) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
if (num && num.indexOf('.') > -1) {
|
|
|
toaster.pop('warning', '提示', '库存数量不能存在小数点')
|
|
|
$scope.Regul.reserve = 1
|
|
|
@@ -259,11 +269,13 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
}
|
|
|
|
|
|
$scope.setOnePrice = function(num) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
$scope.Regul.OnePrice = num
|
|
|
$scope.objError.OnePrice = false
|
|
|
}
|
|
|
// 修改规格书
|
|
|
$scope.onUploadSuccess = function(data) {
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
$scope.Regul.Regulpic = data.path;
|
|
|
$scope.Regul.Ischange = true
|
|
|
};
|
|
|
@@ -308,6 +320,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
toaster.pop('warning', '提示', '最小包装数未编辑导致无法上架');
|
|
|
return
|
|
|
}
|
|
|
+ $rootScope.singleEntryInfo = true
|
|
|
if (!$scope.Regul.breakUp && $scope.Regul.minBuyQty !== $scope.Regul.minPackQty) {
|
|
|
if ($scope.Regul.minBuyQty % $scope.Regul.minPackQty !== 0) {
|
|
|
$scope.Regul.minBuyQty = $scope.Regul.minPackQty
|