diff --git a/public/components/common/chooseResourceStore/chooseResourceStore.js b/public/components/common/chooseResourceStore/chooseResourceStore.js index 6e4db5c7c..6a4840e7c 100644 --- a/public/components/common/chooseResourceStore/chooseResourceStore.js +++ b/public/components/common/chooseResourceStore/chooseResourceStore.js @@ -16,7 +16,8 @@ resourceStoreTypes: [], resourceStoreSonTypes: [], name: '', - resOrderType: '' + resOrderType: '', + isAllocation:false, } }, watch: { // 监视双向绑定的数据数组 @@ -32,7 +33,6 @@ } }, _initMethod: function() { - $that._listStorehouses(); $that._listResourceStoreTypes(); }, _initEvent: function() { @@ -40,6 +40,8 @@ $('#chooseResourceStoreModel').modal('show'); $that.chooseResourceStoreInfo.resOrderType = _param.resOrderType; $that.chooseResourceStoreInfo.shId = _param.shId; + $that.chooseResourceStoreInfo.isAllocation = _param.isAllocation; + $that._listStorehouses(); $that._refreshChooseResourceStoreInfo(); $that._loadAllResourceStoreInfo(1, 10, ''); }); @@ -129,7 +131,7 @@ $that.chooseResourceStoreInfo._currentResourceStoreName = ""; }, _listStorehouses: function(_page, _rows) { - var param = { + let param = { params: { page: 1, row: 100, @@ -138,8 +140,11 @@ communityId: vc.getCurrentCommunity().communityId } }; + if( $that.chooseResourceStoreInfo.isAllocation){ + param.params.communityId = ''; + } //发送get请求 - vc.http.apiGet('resourceStore.listStorehouses', + vc.http.apiGet('/resourceStore.listStorehouses', param, function(json, res) { var _storehouseManageInfo = JSON.parse(json); diff --git a/public/pages/common/allocationStorehouseApply/allocationStorehouseApply.js b/public/pages/common/allocationStorehouseApply/allocationStorehouseApply.js index 55e7f6d23..bf9592c7d 100644 --- a/public/pages/common/allocationStorehouseApply/allocationStorehouseApply.js +++ b/public/pages/common/allocationStorehouseApply/allocationStorehouseApply.js @@ -114,6 +114,7 @@ vc.emit('chooseResourceStore', 'openChooseResourceStoreModel', { resOrderType: '20000', shId: $that.allocationStorehouseApplyInfo.shId, + isAllocation:true }); }, _listAllocationStorehouse: function(_page, _rows) {