|
|
@@ -546,7 +546,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
material.addGoodsOper = false;
|
|
|
});
|
|
|
$scope.goods.editReserve = material.erpReserve;
|
|
|
- if ('ERP' == material.sourceApp) {
|
|
|
+ if ('ERP' == material.sourceApp || material.sourceId) {
|
|
|
angular.forEach(material.goodsArr, function (goods) {
|
|
|
if (goods.status != 612) {
|
|
|
$scope.goods.editReserve = $scope.goods.editReserve - goods.reserve;
|
|
|
@@ -643,7 +643,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
angular.forEach(material.goodsArr, function (g) {
|
|
|
g.edit = false;
|
|
|
});
|
|
|
- if (material.sourceApp == 'ERP') {
|
|
|
+ if (material.sourceApp == 'ERP' || material.sourceId) {
|
|
|
material.averMonthSalePrice = (material && material.price) ? material.price : 0;
|
|
|
}
|
|
|
$scope.$$nonProduct.editGoods = angular.copy(goods);
|
|
|
@@ -1237,7 +1237,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
//第一个自动展开
|
|
|
if (index == 0 && $stateParams.standardParam && ($stateParams.standardParam =='standard' || $stateParams.standardParam =='unstandard')) {
|
|
|
material.selected = true;
|
|
|
- if ('ERP' == material.sourceApp)
|
|
|
+ if ('ERP' == material.sourceApp || material.sourceId)
|
|
|
getProductDetail(material);
|
|
|
}
|
|
|
});
|
|
|
@@ -1674,7 +1674,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
$scope.goods.breakUp = 1 === $scope.goods.breakUp;
|
|
|
$scope.isSelfSupport = 1 === $scope.goods.isSelfSupport;
|
|
|
- if (product.sourceApp == 'ERP') {
|
|
|
+ if (product.sourceApp == 'ERP' || product.sourceId) {
|
|
|
if ($scope.goods.erpReserve < $scope.goods.b2cReserve + $scope.goods.reserve) {
|
|
|
toaster.pop('error', '本次上架数量和已上架数量之和不可超过ERP空闲库存数量');
|
|
|
return;
|
|
|
@@ -1976,7 +1976,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
$scope.goods.editSelfSale = $scope.$$nonProduct.canSelfSale ? 1 : 2;
|
|
|
$scope.expandGoods(material, material.addGoodsOper);
|
|
|
- if ('ERP' == material.sourceApp) {
|
|
|
+ if ('ERP' == material.sourceApp || material.sourceId) {
|
|
|
// 如果是erp上传物料获取物料交易信息
|
|
|
getProductDetail(material);
|
|
|
} else {
|