Commit 44f10de9 by zhangxw

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

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