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