|
@@ -1,14 +1,15 @@
|
|
|
<template>
|
|
|
- <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="80"
|
|
|
+ <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="120"
|
|
|
:options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
|
|
|
:operation="operation" :exportList="exportList">
|
|
|
|
|
|
<div slot="moreSearch">
|
|
|
<el-radio-group v-model="status" size="mini" @change="changeType">
|
|
|
<el-radio-button label="">全部</el-radio-button>
|
|
|
- <el-radio-button label="ING">待结算</el-radio-button>
|
|
|
- <el-radio-button label="OVER">已结算</el-radio-button>
|
|
|
- <el-radio-button label="EXCEPTION">结算异常</el-radio-button>
|
|
|
+ <el-radio-button label="WAIT">待结算</el-radio-button>
|
|
|
+ <el-radio-button label="WAIT_ING">可提现</el-radio-button>
|
|
|
+ <el-radio-button label="ING">提现中</el-radio-button>
|
|
|
+ <el-radio-button label="OVER">已提现</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
<br><br>
|
|
|
</div>
|
|
@@ -70,7 +71,7 @@
|
|
|
<td class="bold" align="center">分账单号</td>
|
|
|
<td>{{formData.settlementOrderId}}</td>
|
|
|
<td class="bold" align="center">分账状态</td>
|
|
|
- <td>{{formData.status == 'ING'?'结算中':formData.status == 'OVER'?'已结算':formData.status == 'CANCEL'?'手工取消':formData.status == 'EXCEPTION'?'异常结算':formData.status == 'OFFLINE'?'线下结算':''}}</td>
|
|
|
+ <td>{{formData.status == 'WAIT'?'待结算':formData.status == 'WAIT_ING'?'可提现':formData.status == 'ING'?'提现中':formData.status == 'OVER'?'已提现':''}}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="bold" align="center">微信流水号</td>
|
|
@@ -140,7 +141,8 @@
|
|
|
</el-card>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button size="mini" @click="formDialog = false;formData = {}">取 消</el-button>
|
|
|
- <!-- <el-button size="mini" v-if="formDialogType !== 2" type="primary" @click="formConfirm()">确认结算</el-button> -->
|
|
|
+ <el-button size="mini" v-if="formData.status == 'WAIT'" type="primary" @click="settleAccounts(formData.settlementOrderId)">确认结算</el-button>
|
|
|
+ <el-button size="mini" v-if="formData.status == 'WAIT_ING'" type="primary" @click="withdraw(formData.settlementOrderId)">确认提现</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</template-page>
|
|
@@ -152,14 +154,35 @@ import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
import { downloadFiles } from '@/utils/util'
|
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
|
-import { listPageV2,pageExport, getDetail, refund } from "@/api/auxiliaryFittings/settleAccount";
|
|
|
+import { listPageV2,pageExport, getDetail, refund, settleAccounts, withdraw } from "@/api/auxiliaryFittings/settleAccount";
|
|
|
export default {
|
|
|
components: { TemplatePage, ImageUpload },
|
|
|
mixins: [import_mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
// 事件组合
|
|
|
- optionsEvensGroup: [],
|
|
|
+ optionsEvensGroup: [
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '批量结算',
|
|
|
+ click: ()=>{
|
|
|
+ this.batchSettleAccounts()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '批量提现',
|
|
|
+ click: ()=>{
|
|
|
+ this.batchWithdraw()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ ],
|
|
|
// 表格属性
|
|
|
tableAttributes: {
|
|
|
// 启用勾选列
|
|
@@ -257,10 +280,63 @@ export default {
|
|
|
})
|
|
|
});
|
|
|
}}>退款</el-button>:null}
|
|
|
-
|
|
|
+ {row.status == 'WAIT'? <el-button type="text" onClick={() => {
|
|
|
+ this.settleAccounts(row.settlementOrderId)
|
|
|
+ }}>结算</el-button>:null}
|
|
|
+ {row.status == 'WAIT_ING'? <el-button type="text" onClick={() => {
|
|
|
+ this.withdraw(row.settlementOrderId)
|
|
|
+ }}>提现</el-button>:null}
|
|
|
</div>
|
|
|
)
|
|
|
- }
|
|
|
+ },
|
|
|
+ batchSettleAccounts(){
|
|
|
+ if(this.recordSelected.length == 0){
|
|
|
+ return this.$message.warning('请至少勾选一条数据!');
|
|
|
+ }
|
|
|
+ this.settleAccounts(this.recordSelected.map(item=>{return item.settlementOrderId}).join(','))
|
|
|
+ },
|
|
|
+ settleAccounts(id){
|
|
|
+ this.$confirm(`请确认是否结算选中数据, 是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ settleAccounts({
|
|
|
+ id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({ type: 'success', message: `结算成功!` })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ batchWithdraw(){
|
|
|
+ if(this.recordSelected.length == 0){
|
|
|
+ return this.$message.warning('请至少勾选一条数据!');
|
|
|
+ }
|
|
|
+ this.withdraw(this.recordSelected.map(item=>{return item.settlementOrderId}).join(','))
|
|
|
+ },
|
|
|
+ withdraw(id){
|
|
|
+ this.$confirm(`请确认是否提现选中数据, 是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ withdraw({
|
|
|
+ id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({ type: 'success', message: `提现成功!` })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|