|
@@ -76,10 +76,10 @@
|
|
|
<template #footer>
|
|
|
<span>
|
|
|
<el-button @click="visible = false">取 消</el-button>
|
|
|
- <el-button v-if="formData.state == 3" type="danger" @click="handleRefuse">确认拒绝打款</el-button>
|
|
|
+ <el-button v-if="formData.state === 3" type="danger" @click="handleRefuse">确认拒绝打款</el-button>
|
|
|
<el-button v-else type="danger" @click="handleRefuse">拒绝打款</el-button>
|
|
|
- <el-button v-if="formData.state == 2" type="primary" @click="handleConfirm">确认打款</el-button>
|
|
|
- <el-button v-else type="primary" @click="handleConfirm">确认用户信息</el-button>
|
|
|
+ <el-button v-if="formData.state === 0" type="primary" @click="handleExamine">确认用户信息</el-button>
|
|
|
+ <el-button v-else-if="formData.state === 2" type="primary" @click="handleConfirm">确认打款</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -101,6 +101,7 @@ export default {
|
|
|
},
|
|
|
visible: false,
|
|
|
formData: {
|
|
|
+ withdrawalId: '',
|
|
|
shopName: '',
|
|
|
shopCode: '',
|
|
|
bankName: '',
|
|
@@ -130,6 +131,7 @@ export default {
|
|
|
},
|
|
|
handleOpen(params = {}) {
|
|
|
this.modalOptions.title = '提现处理'
|
|
|
+ this.formData = Object.assign(this.$options.data().formData, params)
|
|
|
this.visible = true
|
|
|
this.initList()
|
|
|
if (params.withdrawalId) {
|
|
@@ -143,6 +145,7 @@ export default {
|
|
|
try {
|
|
|
const res = await withdrawalGetById({ withdrawalId: id })
|
|
|
this.formData = Object.assign(this.$options.data().formData, res.data, {
|
|
|
+ withdrawalId: res.data.withdrawalId || '',
|
|
|
shopName: res.data.shopName || '',
|
|
|
shopCode: res.data.shopCode || '',
|
|
|
bankName: res.data.bankName || '',
|
|
@@ -187,25 +190,38 @@ export default {
|
|
|
this.$message.warning('请填写理由并确定拒绝打款!!!')
|
|
|
}
|
|
|
},
|
|
|
- // 确认打款
|
|
|
- async handleConfirm() {
|
|
|
- if (this.formData.state == 2) {
|
|
|
- if (!this.formData.type) return this.$message.error('请选择打款方式')
|
|
|
- const res = await withdrawalHandle({
|
|
|
- withdrawalId: this.formData.withdrawalId,
|
|
|
- state: '2',
|
|
|
- audit: 1,
|
|
|
- type: this.formData.type
|
|
|
+ // 确认审核
|
|
|
+ handleExamine() {
|
|
|
+ this.$confirm('确定审核通过吗?')
|
|
|
+ .then(async () => {
|
|
|
+ await withdrawalHandle({
|
|
|
+ withdrawalId: this.formData.withdrawalId,
|
|
|
+ state: '0',
|
|
|
+ audit: 1,
|
|
|
+ type: ''
|
|
|
+ })
|
|
|
+ this.$message.success('操作成功!请再次确认!')
|
|
|
+ this.getInfo(this.formData.withdrawalId)
|
|
|
+ this.$emit('success')
|
|
|
})
|
|
|
- if (res.code == '') {
|
|
|
+ .catch(() => {})
|
|
|
+ },
|
|
|
+ // 确认打款
|
|
|
+ handleConfirm() {
|
|
|
+ this.$confirm('确定打款吗?')
|
|
|
+ .then(async () => {
|
|
|
+ if (!this.formData.type) return this.$message.error('请选择打款方式')
|
|
|
+ await withdrawalHandle({
|
|
|
+ withdrawalId: this.formData.withdrawalId,
|
|
|
+ state: '2',
|
|
|
+ audit: 1,
|
|
|
+ type: this.formData.type
|
|
|
+ })
|
|
|
this.$message.success('打款成功!!!')
|
|
|
- }
|
|
|
- this.visible = false
|
|
|
- this.$emit('success')
|
|
|
- } else {
|
|
|
- this.formData.state = 2
|
|
|
- this.$message.warning('请再次确认!!!')
|
|
|
- }
|
|
|
+ this.visible = false
|
|
|
+ this.$emit('success')
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|