Commit 21b251a4 by chenwq

```

feat(withdraw): 添加批量驳回功能

- 新增selectedRows和isBatchReject数据属性用于管理批量操作状态
- 实现handleBatchReject方法处理批量驳回逻辑,验证可驳回状态
- 在表格选择时同步更新selectedRows数据
- 批量驳回操作中调用API进行批量驳回请求
- 完善驳回成功后的状态重置和表格刷新逻辑
- 在清空选择时重置相关状态变量
```
1 parent 87cae278
......@@ -238,6 +238,8 @@ export default {
return {
isMore: false,
ids: [],
selectedRows: [],
isBatchReject: false,
batchTagVisible: false,
customTagVisible: false,
statisticsTypeList,
......@@ -1162,6 +1164,7 @@ export default {
}
switch (index) {
case 2:
this.handleBatchReject()
break
case 3:
//批量生成批次
......@@ -1499,6 +1502,7 @@ export default {
},
//获取复选table数据
selectionTable(val) {
this.selectedRows = val
this.ids = val.map(item => item.id)
},
handleTagBind() {
......@@ -1511,9 +1515,21 @@ export default {
handleTagBindSuccess() {
this.batchTagVisible = false
this.ids = []
this.selectedRows = []
this.$refs.withdrawRef.clearMutiSelect()
this.$refs.withdrawRef.refreshTable()
},
handleBatchReject() {
const canReject = this.selectedRows.every(row => row.status == 0 || row.status == 1 || row.status == 6)
if (!canReject) {
this.$message.error('请选择能够驳回的提现记录')
return
}
this.operaForm.select = false
this.isBatchReject = true
this.isRefuse = 2
this.showPassDialog = true
},
//批量审核
handleCheck(row, isRefuse = 0) {
// console.log(row)
......@@ -1622,6 +1638,25 @@ export default {
return
}
this.checkLoading = true
if (this.isBatchReject) {
this.$apis.withdraw
.batchReject({
ids: this.ids,
rejectReason: this.form.remark
})
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
})
.finally(() => {
this.handleReset()
this.clearSelect()
this.checkLoading = false
})
return
}
let { isRefuse } = this,
{ select } = this.operaForm, //true为一键操作
Methods = select ? 'integralAllOut' : this.isRefuse == 2 ? 'integralOut' : 'integralApprove',
......@@ -1651,6 +1686,8 @@ export default {
},
clearSelect() {
this.ids = ''
this.selectedRows = []
this.isBatchReject = false
this.form.remark = ''
this.showPassDialog = false
this.$refs.withdrawRef.clearMutiSelect()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!