mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化删除功能
This commit is contained in:
parent
91e16e65f1
commit
a64c6b79e3
@ -1,46 +1,44 @@
|
||||
(function (vc, vm) {
|
||||
(function(vc, vm) {
|
||||
vc.extends({
|
||||
data: {
|
||||
deleteStorehouseManageInfo: {}
|
||||
},
|
||||
_initMethod: function () {
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('deleteStorehouseManage', 'openDeleteStorehouseManageModal', function (_params) {
|
||||
_initMethod: function() {},
|
||||
_initEvent: function() {
|
||||
vc.on('deleteStorehouseManage', 'openDeleteStorehouseManageModal', function(_params) {
|
||||
vc.component.deleteStorehouseManageInfo = _params;
|
||||
$('#deleteStorehouseManageModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteStorehouseManage: function () {
|
||||
deleteStorehouseManage: function() {
|
||||
vc.component.deleteStorehouseManageInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//发送get请求
|
||||
vc.http.apiPost('resourceStore.deleteAllocationStorehouse',
|
||||
JSON.stringify(vc.component.deleteStorehouseManageInfo),
|
||||
{
|
||||
JSON.stringify(vc.component.deleteStorehouseManageInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (_json.status == 200) {
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteStorehouseManageModel').modal('hide');
|
||||
vc.emit('allocationStorehouseManage', 'listAllocationStorehouse', {});
|
||||
vc.toast(_json.msg);
|
||||
return;
|
||||
}else{
|
||||
} else {
|
||||
vc.toast(_json.msg);
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
closeDeleteStorehouseManageModel: function () {
|
||||
closeDeleteStorehouseManageModel: function() {
|
||||
$('#deleteStorehouseManageModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc, window.vc.component);
|
||||
})(window.vc, window.vc.component);
|
||||
Loading…
Reference in New Issue
Block a user