|
@@ -10,7 +10,6 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.storage_tab = $stateParams.storage_tab? $stateParams.storage_tab : 'inBound';
|
|
$scope.storage_tab = $stateParams.storage_tab? $stateParams.storage_tab : 'inBound';
|
|
|
$scope.countData = 10;
|
|
$scope.countData = 10;
|
|
|
$scope.userInfo = $rootScope.userInfo || {}
|
|
$scope.userInfo = $rootScope.userInfo || {}
|
|
|
- $stateParams.ids ? $scope.hasIds = true : $scope.hasIds = false;
|
|
|
|
|
console.log($stateParams)
|
|
console.log($stateParams)
|
|
|
|
|
|
|
|
//数字的正则表达式
|
|
//数字的正则表达式
|
|
@@ -99,7 +98,7 @@ define([ 'app/app' ], function(app) {
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
for (var i = 0; i< $scope.countData; i++) {
|
|
for (var i = 0; i< $scope.countData; i++) {
|
|
|
- $scope.otherData.push({qty: '', id: i, price: '', key: '', show: false, productId: ''})
|
|
|
|
|
|
|
+ $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -269,17 +268,17 @@ define([ 'app/app' ], function(app) {
|
|
|
type.pbranden = key.pbranden;
|
|
type.pbranden = key.pbranden;
|
|
|
type.kind = key.kind;
|
|
type.kind = key.kind;
|
|
|
type.spec = key.spec;
|
|
type.spec = key.spec;
|
|
|
- type.productId = key.id;
|
|
|
|
|
|
|
+ type.id = key.id;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
$scope.addOneTable = function (type) {
|
|
$scope.addOneTable = function (type) {
|
|
|
if(type === 'clear') {
|
|
if(type === 'clear') {
|
|
|
initOtherData()
|
|
initOtherData()
|
|
|
} else if(type === 'one') {
|
|
} else if(type === 'one') {
|
|
|
- $scope.otherData.push({qty: '', id: i, price: '', key: '', show: false, productId: ''});
|
|
|
|
|
|
|
+ $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true});
|
|
|
} else if(type === 'ten') {
|
|
} else if(type === 'ten') {
|
|
|
for (var i = 0; i< 10; i++) {
|
|
for (var i = 0; i< 10; i++) {
|
|
|
- $scope.otherData.push({qty: '', id: i, price: '', key: '', show: false, productId: ''})
|
|
|
|
|
|
|
+ $scope.otherData.push({qty: '', id: '', price: '', key: '', show: false, newId: true})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -297,8 +296,8 @@ define([ 'app/app' ], function(app) {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
angular.forEach($scope.otherData, function(val) {
|
|
angular.forEach($scope.otherData, function(val) {
|
|
|
- if(val.productId) {
|
|
|
|
|
- $scope.othenParam.detail.push({productId: val.productId, qty: 323, price: 4234})
|
|
|
|
|
|
|
+ if(val.id) {
|
|
|
|
|
+ $scope.othenParam.detail.push({productId: val.id, qty: 323, price: 4234})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
Goods.saveOtherProductData({storage_tab: $scope.storage_tab, enName: $scope.othenParam.enName}, $scope.othenParam.detail, function(data) {
|
|
Goods.saveOtherProductData({storage_tab: $scope.storage_tab, enName: $scope.othenParam.enName}, $scope.othenParam.detail, function(data) {
|