Commit 44f10de9 by zhangxw

退款审核添加重复审批拦截

1 parent 8d6f9791
......@@ -501,11 +501,15 @@ Page({
let { infoData } = this.data
if (type == 1) {
// 审核通过
if (this.data.auditFlag || infoData.beforeStatus != 6 || infoData.afterStatus != 7) return
this.setData({auditFlag: true})
wx.$util.showLoading()
auditRefundAllpyAPI({
applyCode: infoData.applyCode,
auditStatus: 1,
id: infoData.id
}).then(res => {
wx.$util.hideLoading()
let { code, message } = res
if (code == 0) {
wx.showToast({
......@@ -524,9 +528,12 @@ Page({
}
}, 300)
} else {
this.setData({auditFlag: false})
wx.$util.showToast(message)
}
})
}).ctach(() => {
wx.$util.hideLoading()
})
} else {
// 审核不通过
this.setData({
......@@ -549,15 +556,17 @@ Page({
confirmRepeal() {
let { disapprovalReason, repealStatus, infoData } = this.data
if (repealStatus) return
if (repealStatus || infoData.beforeStatus != 6 || infoData.afterStatus != 7) return
if (!disapprovalReason) return wx.$util.showToast('审核不通过原因不能为空')
this.setData({ repealStatus: true })
wx.$util.showLoading()
auditRefundAllpyAPI({
applyCode: infoData.applyCode,
auditStatus: 2,
remark: disapprovalReason,
id: infoData.id
}).then(res => {
wx.$util.hideLoading()
let { code, message } = res
if (code == 0) {
wx.showToast({
......@@ -580,7 +589,9 @@ Page({
this.setData({ repealStatus: false })
wx.$util.showToast(message)
}
})
}).catch(() => {
wx.$util.hideLoading()
})
},
cancelRepeal() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!