优化戴拿

This commit is contained in:
Your Name 2023-09-18 00:04:38 +08:00
parent b76061257e
commit e40c831971
2 changed files with 10 additions and 4 deletions

View File

@ -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);

View File

@ -114,6 +114,7 @@
vc.emit('chooseResourceStore', 'openChooseResourceStoreModel', {
resOrderType: '20000',
shId: $that.allocationStorehouseApplyInfo.shId,
isAllocation:true
});
},
_listAllocationStorehouse: function(_page, _rows) {