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