|
|
@@ -1676,42 +1676,68 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
* 获取物料交易信息
|
|
|
* @param product
|
|
|
*/
|
|
|
- function showShelfArea(product) {
|
|
|
- ComponentActive.getComponentListByUuid({ uuids: product.cmpUuId}, function (components) {
|
|
|
- if (components.length > 0) {
|
|
|
- var component = components[0];
|
|
|
- angular.forEach($scope.currenctMaterial, function (product) {
|
|
|
- delete product.selected;
|
|
|
- });
|
|
|
- $scope.goods = { isBreakUp: 1, isSelfSupport: 1, prices: [{}] };
|
|
|
- $scope.goods.prices = [];
|
|
|
- $scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve});
|
|
|
- $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
|
|
|
- product.img = component.img || null;
|
|
|
- if ('ERP' == product.sourceApp) {// 如果是erp上传物料获取物料交易信息
|
|
|
- getProductDetail(product);
|
|
|
- } else {
|
|
|
- product.selected = true;
|
|
|
- }
|
|
|
- } else {
|
|
|
- $scope.goods = { editBreakUp: false, editSelfSale: 2};
|
|
|
- if($scope.store.enType === 'HK') {
|
|
|
- $scope.goods.currencyName = 'USD';
|
|
|
- }else {
|
|
|
- $scope.goods.currencyName = 'RMB';
|
|
|
- }
|
|
|
- // 先保存产品id,方便去获取tag是否重复
|
|
|
- $scope.goods.productid = material.id;
|
|
|
- $scope.goods.prodNum = material.prodNum;
|
|
|
- $scope.goods.editPrices = [];
|
|
|
- $scope.goods.editPrices.push({start : $scope.minReserve, end : $scope.maxReserve});
|
|
|
- // $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
|
|
|
- material.selected = true;
|
|
|
- }
|
|
|
- }, function (error) {
|
|
|
- toaster.pop('error', '当前产品对应的器件[' + product.cmpUuId + ']已失效');
|
|
|
- console.log(error);
|
|
|
+ function showShelfArea(material) {
|
|
|
+ // ComponentActive.getComponentListByUuid({ uuids: material.cmpUuId}, function (components) {
|
|
|
+ // if (components.length > 0) {
|
|
|
+ // var component = components[0];
|
|
|
+ // angular.forEach($scope.currenctMaterial, function (product) {
|
|
|
+ // delete product.selected;
|
|
|
+ // });
|
|
|
+ // $scope.goods = { isBreakUp: 1, isSelfSupport: 1, prices: [{}] };
|
|
|
+ // $scope.goods.prices = [];
|
|
|
+ // $scope.goods.prices.push({start : $scope.minReserve, end : $scope.maxReserve});
|
|
|
+ // $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
|
|
|
+ // material.img = component.img || null;
|
|
|
+ // if ('ERP' == product.sourceApp) {// 如果是erp上传物料获取物料交易信息
|
|
|
+ // getProductDetail(product);
|
|
|
+ // } else {
|
|
|
+ // product.selected = true;
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // $scope.goods = { editBreakUp: false, editSelfSale: 2};
|
|
|
+ // if($scope.store.enType === 'HK') {
|
|
|
+ // $scope.goods.currencyName = 'USD';
|
|
|
+ // }else {
|
|
|
+ // $scope.goods.currencyName = 'RMB';
|
|
|
+ // }
|
|
|
+ // // 先保存产品id,方便去获取tag是否重复
|
|
|
+ // $scope.goods.productid = material.id;
|
|
|
+ // $scope.goods.prodNum = material.prodNum;
|
|
|
+ // $scope.goods.editPrices = [];
|
|
|
+ // $scope.goods.editPrices.push({start : $scope.minReserve, end : $scope.maxReserve});
|
|
|
+ // // $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
|
|
|
+ // material.selected = true;
|
|
|
+ // }
|
|
|
+ // }, function (error) {
|
|
|
+ // toaster.pop('error', '当前产品对应的器件[' + material.cmpUuId + ']已失效');
|
|
|
+ // console.log(error);
|
|
|
+ // });
|
|
|
+
|
|
|
+ angular.forEach($scope.currenctMaterial, function (material) {
|
|
|
+ delete material.selected;
|
|
|
+ material.exPandOper = false;
|
|
|
+ material.addGoodsOper = false;
|
|
|
});
|
|
|
+ material.addGoodsOper = true;
|
|
|
+ material.exPandOper = true;
|
|
|
+ $scope.expandGoods(material, material.addGoodsOper);
|
|
|
+ if ('ERP' == material.sourceApp) {// 如果是erp上传物料获取物料交易信息
|
|
|
+ getProductDetail(material);
|
|
|
+ } else {
|
|
|
+ $scope.goods = { editBreakUp: false, editSelfSale: 2};
|
|
|
+ if($scope.store.enType === 'HK') {
|
|
|
+ $scope.goods.currencyName = 'USD';
|
|
|
+ }else {
|
|
|
+ $scope.goods.currencyName = 'RMB';
|
|
|
+ }
|
|
|
+ // 先保存产品id,方便去获取tag是否重复
|
|
|
+ $scope.goods.productid = material.id;
|
|
|
+ $scope.goods.prodNum = material.prodNum;
|
|
|
+ $scope.goods.editPrices = [];
|
|
|
+ $scope.goods.editPrices.push({start : $scope.minReserve, end : $scope.maxReserve});
|
|
|
+ // $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
|
|
|
+ material.selected = true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|