客户和司机工资帐户中的增加和减少结余的按钮点击增加弹窗确认
This commit is contained in:
parent
5c545911c2
commit
d903b7110d
|
|
@ -253,32 +253,42 @@ export default {
|
|||
this.$mk.error("请输入正确的金额");
|
||||
return
|
||||
}
|
||||
// 调用增加结余接口
|
||||
this.$zk.post({
|
||||
url: this.BalanceAdd,
|
||||
data: {
|
||||
id: this.pageOptions.ApiData.id,
|
||||
amount: this.amount,
|
||||
remark: this.remark
|
||||
},
|
||||
loading: "加载中...",
|
||||
useBigInt: true,
|
||||
config: {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
this.$mk.confirm('您确定要增加结余吗?').then(type => {
|
||||
if (type == 'confirm') {
|
||||
// 如果确认增加
|
||||
// 调用增加结余接口
|
||||
this.$zk.post({
|
||||
url: this.BalanceAdd,
|
||||
data: {
|
||||
id: this.pageOptions.ApiData.id,
|
||||
amount: this.amount,
|
||||
remark: this.remark
|
||||
},
|
||||
loading: "加载中...",
|
||||
useBigInt: true,
|
||||
config: {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}
|
||||
}).then(a => {
|
||||
console.log("a", a);
|
||||
// 成功提示 刷新页面
|
||||
this.$mk.success("增加结余成功");
|
||||
// 刷新页面
|
||||
this.initDetailData() // 刷新
|
||||
// 刷新列表
|
||||
this.$refs.ZkTableList.refresh()
|
||||
}).catch((a) => {
|
||||
this.$mk.error(a.msg, "aaa");
|
||||
});
|
||||
}}).catch((a) => { // 失败
|
||||
this.$mk.error(a.data.msg); // 提示错误信息
|
||||
}
|
||||
}
|
||||
}).then(a => {
|
||||
console.log("a", a);
|
||||
// 成功提示 刷新页面
|
||||
this.$mk.success("增加结余成功");
|
||||
// 刷新页面
|
||||
this.initDetailData() // 刷新
|
||||
// 刷新列表
|
||||
this.$refs.ZkTableList.refresh()
|
||||
}).catch((a) => {
|
||||
this.$mk.error(a.msg, "aaa");
|
||||
});
|
||||
);
|
||||
|
||||
|
||||
},
|
||||
reduceBalanceApi() {
|
||||
// 转换 this.amount 为数字
|
||||
|
|
@ -292,7 +302,10 @@ export default {
|
|||
this.$mk.error("请输入正确的金额");
|
||||
return
|
||||
}
|
||||
// 调用减少结余接口
|
||||
this.$mk.confirm('您确定要减少结余吗?').then(type => {
|
||||
if (type == 'confirm') {
|
||||
// 如果确认增加
|
||||
// 调用减少结余接口
|
||||
this.$zk.post({
|
||||
url: this.BalanceReduce,
|
||||
data: {
|
||||
|
|
@ -321,6 +334,11 @@ export default {
|
|||
}).catch((a) => {
|
||||
this.$mk.error(a.msg, "aaa");
|
||||
});
|
||||
}}).catch((a) => { // 失败
|
||||
this.$mk.error(a.data.msg); // 提示错误信息
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue