mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
前段 将费用项修改 cmd模式 方便 二开 让代码开发起来更加简单
This commit is contained in:
parent
290d871aa1
commit
a74e57c603
@ -241,12 +241,13 @@
|
|||||||
$('#addFeeConfigModel').modal('hide');
|
$('#addFeeConfigModel').modal('hide');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
vc.http.post('addFeeConfig', 'save', JSON.stringify(vc.component.addFeeConfigInfo), {
|
vc.http.apiPost('/feeConfig.saveFeeConfig', JSON.stringify(vc.component.addFeeConfigInfo), {
|
||||||
emulateJSON: true
|
emulateJSON: true
|
||||||
},
|
},
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
if (res.status == 200) {
|
let _json = JSON.parse(json)
|
||||||
|
if (_json.code == 0) {
|
||||||
//关闭model
|
//关闭model
|
||||||
$('#addFeeConfigModel').modal('hide');
|
$('#addFeeConfigModel').modal('hide');
|
||||||
vc.component.clearAddFeeConfigInfo();
|
vc.component.clearAddFeeConfigInfo();
|
||||||
@ -254,6 +255,7 @@
|
|||||||
vc.toast("添加成功");
|
vc.toast("添加成功");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
vc.toast(_json.msg)
|
||||||
},
|
},
|
||||||
function(errInfo, error) {
|
function(errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
|
|||||||
@ -3,8 +3,7 @@
|
|||||||
data: {
|
data: {
|
||||||
deleteFeeConfigInfo: {}
|
deleteFeeConfigInfo: {}
|
||||||
},
|
},
|
||||||
_initMethod: function () {
|
_initMethod: function() {},
|
||||||
},
|
|
||||||
_initEvent: function() {
|
_initEvent: function() {
|
||||||
vc.on('deleteFeeConfig', 'openDeleteFeeConfigModal', function(_params) {
|
vc.on('deleteFeeConfig', 'openDeleteFeeConfigModal', function(_params) {
|
||||||
vc.component.deleteFeeConfigInfo = _params;
|
vc.component.deleteFeeConfigInfo = _params;
|
||||||
@ -14,22 +13,22 @@
|
|||||||
methods: {
|
methods: {
|
||||||
deleteFeeConfig: function() {
|
deleteFeeConfig: function() {
|
||||||
vc.component.deleteFeeConfigInfo.communityId = vc.getCurrentCommunity().communityId;
|
vc.component.deleteFeeConfigInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||||
vc.http.post(
|
vc.http.apiPost(
|
||||||
'deleteFeeConfig',
|
'/feeConfig.deleteFeeConfig',
|
||||||
'delete',
|
JSON.stringify(vc.component.deleteFeeConfigInfo), {
|
||||||
JSON.stringify(vc.component.deleteFeeConfigInfo),
|
|
||||||
{
|
|
||||||
emulateJSON: true
|
emulateJSON: true
|
||||||
},
|
},
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
if (res.status == 200) {
|
let _json = JSON.parse(json)
|
||||||
|
if (_json.code == 0) {
|
||||||
//关闭model
|
//关闭model
|
||||||
$('#deleteFeeConfigModel').modal('hide');
|
$('#deleteFeeConfigModel').modal('hide');
|
||||||
vc.emit('feeConfigManage', 'listFeeConfig', {});
|
vc.emit('feeConfigManage', 'listFeeConfig', {});
|
||||||
vc.toast("删除成功");
|
vc.toast("删除成功");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
vc.toast(_json.msg)
|
||||||
},
|
},
|
||||||
function(errInfo, error) {
|
function(errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
|
|||||||
@ -236,18 +236,20 @@
|
|||||||
vc.toast(vc.validate.errInfo);
|
vc.toast(vc.validate.errInfo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
vc.http.post('editFeeConfig', 'update', JSON.stringify(vc.component.editFeeConfigInfo), {
|
vc.http.apiPost('/feeConfig.updateFeeConfig', JSON.stringify(vc.component.editFeeConfigInfo), {
|
||||||
emulateJSON: true
|
emulateJSON: true
|
||||||
},
|
},
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
if (res.status == 200) {
|
let _json = JSON.parse(json);
|
||||||
|
if (_json.code == 0) {
|
||||||
//关闭model
|
//关闭model
|
||||||
$('#editFeeConfigModel').modal('hide');
|
$('#editFeeConfigModel').modal('hide');
|
||||||
vc.emit('feeConfigManage', 'listFeeConfig', {});
|
vc.emit('feeConfigManage', 'listFeeConfig', {});
|
||||||
vc.toast("修改成功");
|
vc.toast("修改成功");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
vc.toast(_json.msg)
|
||||||
},
|
},
|
||||||
function(errInfo, error) {
|
function(errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
|
|||||||
@ -75,7 +75,7 @@
|
|||||||
//费用项ID选框去空
|
//费用项ID选框去空
|
||||||
param.params.configId = param.params.configId.trim();
|
param.params.configId = param.params.configId.trim();
|
||||||
//发送get请求
|
//发送get请求
|
||||||
vc.http.get('feeConfigManage', 'list', param,
|
vc.http.apiGet('/feeConfig.listFeeConfigs', param,
|
||||||
function(json, res) {
|
function(json, res) {
|
||||||
var _feeConfigManageInfo = JSON.parse(json);
|
var _feeConfigManageInfo = JSON.parse(json);
|
||||||
vc.component.feeConfigManageInfo.total = _feeConfigManageInfo.total;
|
vc.component.feeConfigManageInfo.total = _feeConfigManageInfo.total;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user