优化删除功能

This commit is contained in:
java110 2022-03-28 18:34:50 +08:00
parent 91e16e65f1
commit a64c6b79e3

View File

@ -3,8 +3,7 @@
data: { data: {
deleteStorehouseManageInfo: {} deleteStorehouseManageInfo: {}
}, },
_initMethod: function () { _initMethod: function() {},
},
_initEvent: function() { _initEvent: function() {
vc.on('deleteStorehouseManage', 'openDeleteStorehouseManageModal', function(_params) { vc.on('deleteStorehouseManage', 'openDeleteStorehouseManageModal', function(_params) {
vc.component.deleteStorehouseManageInfo = _params; vc.component.deleteStorehouseManageInfo = _params;
@ -16,14 +15,13 @@
vc.component.deleteStorehouseManageInfo.communityId = vc.getCurrentCommunity().communityId; vc.component.deleteStorehouseManageInfo.communityId = vc.getCurrentCommunity().communityId;
//发送get请求 //发送get请求
vc.http.apiPost('resourceStore.deleteAllocationStorehouse', vc.http.apiPost('resourceStore.deleteAllocationStorehouse',
JSON.stringify(vc.component.deleteStorehouseManageInfo), JSON.stringify(vc.component.deleteStorehouseManageInfo), {
{
emulateJSON: true emulateJSON: true
}, },
function(json, res) { function(json, res) {
let _json = JSON.parse(json); let _json = JSON.parse(json);
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0); //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (_json.status == 200) { if (_json.code == 0) {
//关闭model //关闭model
$('#deleteStorehouseManageModel').modal('hide'); $('#deleteStorehouseManageModel').modal('hide');
vc.emit('allocationStorehouseManage', 'listAllocationStorehouse', {}); vc.emit('allocationStorehouseManage', 'listAllocationStorehouse', {});