提现渠道优化

This commit is contained in:
墨大叔 2024-08-02 17:56:16 +08:00
parent a608d89064
commit fcb7b97af5
7 changed files with 522 additions and 108 deletions

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询提现渠道列表
export function listChannelWithdraw(query) {
return request({
url: '/ss/channelWithdraw/list',
method: 'get',
params: query
})
}
// 查询提现渠道详细
export function getChannelWithdraw(channelId) {
return request({
url: '/ss/channelWithdraw/' + channelId,
method: 'get'
})
}
// 新增提现渠道
export function addChannelWithdraw(data) {
return request({
url: '/ss/channelWithdraw',
method: 'post',
data: data
})
}
// 修改提现渠道
export function updateChannelWithdraw(data) {
return request({
url: '/ss/channelWithdraw',
method: 'put',
data: data
})
}
// 删除提现渠道
export function delChannelWithdraw(channelId) {
return request({
url: '/ss/channelWithdraw/' + channelId,
method: 'delete'
})
}

View File

@ -1,23 +1,23 @@
import request from '@/utils/request'
// 查询充值记录列表
export function listBill(query) {
// 查询提现列表
export function listWithdraw(query) {
return request({
url: '/system/bill/list',
url: '/ss/withdraw/list',
method: 'get',
params: query
})
}
// 查询充值记录详细
export function getBill(billId) {
// 查询提现详细
export function getWithdraw(billId) {
return request({
url: '/system/bill/' + billId,
url: '/ss/withdraw/' + billId,
method: 'get'
})
}
// 新增充值记录
// 新增提现
export function addBill(data) {
return request({
url: '/system/bill',
@ -26,7 +26,7 @@ export function addBill(data) {
})
}
// 修改充值记录
// 修改提现
export function updateBill(data) {
return request({
url: '/system/bill',
@ -35,8 +35,8 @@ export function updateBill(data) {
})
}
// 删除充值记录
export function delBill(billId) {
// 删除提现
export function delWithdraw(billId) {
return request({
url: '/system/bill/' + billId,
method: 'delete'

View File

@ -139,8 +139,8 @@
<script>
import {
getBill,
delBill,
getWithdraw,
delWithdraw,
addBill,
updateBill
} from "@/api/system/withdraw";
@ -254,7 +254,7 @@ export default {
handleUpdate(row) {
this.reset();
const billId = row.billId || this.ids
getBill(billId).then(response => {
getWithdraw(billId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改充值记录";
@ -284,7 +284,7 @@ export default {
handleDelete(row) {
const billIds = row.billId || this.ids;
this.$modal.confirm('是否确认删除充值记录编号为"' + billIds + '"的数据项?').then(function() {
return delBill(billIds);
return delWithdraw(billIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");

View File

@ -0,0 +1,412 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="渠道名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入渠道名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="账户类型" prop="accountType">
<el-select v-model="queryParams.accountType" placeholder="请选择对应账户类型" clearable>
<el-option
v-for="dict in dict.type.account_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="服务费收取类型" prop="serviceType" label-width="8em">
<el-select v-model="queryParams.serviceType" placeholder="请选择服务费收取类型" clearable>
<el-option
v-for="dict in dict.type.withdraw_service_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="enabled">
<el-radio-group v-model="queryParams.enabled">
<el-radio-button :label="true"></el-radio-button>
<el-radio-button :label="false"></el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['ss:channelWithdraw:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['ss:channelWithdraw:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['ss:channelWithdraw:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['ss:channelWithdraw:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="channelWithdrawList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<template v-for="column of showColumns">
<el-table-column
:key="column.key"
:label="column.label"
:prop="column.key"
:align="column.align"
:min-width="column.minWidth"
:sort-orders="orderSorts"
:sortable="column.sortable"
:show-overflow-tooltip="column.overflow"
:width="column.width"
>
<template slot-scope="d">
<template v-if="column.key === 'channelId'">
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'accountType'">
<dict-tag :options="dict.type.account_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'enabled'">
<el-switch v-model="d.row.enabled" @change="(nv ) =>{onChangeEnabled(d.row, nv)}"/>
</template>
<template v-else-if="column.key === 'serviceType'">
<dict-tag :options="dict.type.withdraw_service_type" :value="d.row.serviceType"/>
</template>
<template v-else-if="column.key === 'serviceRate'">
{{d.row.serviceRate | money}} {{withdrawServiceUnit(d.row.serviceType)}}
</template>
<template v-else-if="column.key === 'costRate'">
{{d.row.costRate | money}} %
</template>
<template v-else-if="column.key === 'picture'">
<image-preview :src="d.row.picture" :width="32" :height="32"/>
</template>
<template v-else>
{{d.row[column.key]}}
</template>
</template>
</el-table-column>
</template>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['ss:channelWithdraw:edit']"
>修改</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['ss:channelWithdraw:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改提现渠道对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<form-col :span="span" label="图片" prop="picture">
<image-upload v-model="form.picture" :limit="1"/>
</form-col>
<form-col :span="span" label="渠道名称" prop="name">
<el-input v-model="form.name" placeholder="请输入渠道名称" />
</form-col>
<form-col :span="span" label="账户类型" prop="accountType">
<el-select v-model="form.accountType" style="width: 100%">
<el-option
v-for="dict in dict.type.account_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</form-col>
<form-col :span="span" label="服务费收取方式" label-width="9em" prop="serviceType">
<el-radio-group v-model="form.serviceType">
<el-radio v-for="dict in dict.type.withdraw_service_type" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</form-col>
<form-col :span="span" label="服务费" prop="serviceRate">
<el-input v-model.number="form.serviceRate" :min="0" type="number">
<template #suffix>
{{withdrawServiceUnit(form.withdrawType)}}
</template>
</el-input>
</form-col>
<form-col :span="span" label="渠道成本" prop="costRate">
<el-input v-model.number="form.costRate" placeholder="请输入充值成本率" :min="0" type="number">
<template #suffix>%</template>
</el-input>
</form-col>
<form-col :span="span" label="是否启用" prop="enabled">
<el-switch v-model="form.enabled" />
</form-col>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listChannelWithdraw, getChannelWithdraw, delChannelWithdraw, addChannelWithdraw, updateChannelWithdraw } from "@/api/ss/channelWithdraw";
import { $showColumns, $withdrawServiceType } from '@/utils/mixins'
import { updateBill } from '@/api/system/withdraw'
//
const defaultSort = {
prop: "channelId",
order: "descending"
}
export default {
name: "ChannelWithdraw",
mixins: [$showColumns, $withdrawServiceType],
dicts: ['account_type', 'withdraw_service_type'],
data() {
return {
span: 24,
//
columns: [
{key: 'channelId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'name', visible: true, label: '渠道名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'picture', visible: true, label: '图片', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
{key: 'enabled', visible: true, label: '是否启用', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'accountType', visible: true, label: '对应账户类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'serviceType', visible: true, label: '服务费收取类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'serviceRate', visible: true, label: '服务费', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'costRate', visible: true, label: '渠道成本', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
channelWithdrawList: [],
//
title: "",
//
open: false,
defaultSort,
//
queryParams: {
pageNum: 1,
pageSize: 10,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
channelId: null,
name: null,
accountType: null,
serviceType: null,
enabled: null,
},
//
form: {},
//
rules: {
name: [
{ required: true, message: "渠道名称不能为空", trigger: "blur" }
],
accountType: [
{ required: true, message: "对应账户类型不能为空", trigger: "change" }
],
serviceType: [
{ required: true, message: "服务费收取类型不能为空", trigger: "change" }
],
serviceRate: [
{ required: true, message: "服务费不能为空", trigger: "blur" }
],
enabled: [
{ required: true, message: "是否启用不能为空", trigger: "blur" }
],
costRate: [
{ required: true, message: "渠道成本不允许为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
onChangeEnabled(row, enabled) {
updateChannelWithdraw({channelId: row.channelId, enabled: enabled}).catch(() => {
row.enabled = !enabled;
})
},
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {
this.queryParams.orderByColumn = defaultSort.prop;
this.queryParams.isAsc = defaultSort.order;
} else {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
}
this.getList();
},
/** 查询提现渠道列表 */
getList() {
this.loading = true;
listChannelWithdraw(this.queryParams).then(response => {
this.channelWithdrawList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
channelId: null,
name: null,
accountType: null,
serviceType: null,
serviceRate: null,
enabled: null,
costRate: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.channelId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加提现渠道";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const channelId = row.channelId || this.ids
getChannelWithdraw(channelId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改提现渠道";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.channelId != null) {
updateChannelWithdraw(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addChannelWithdraw(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const channelIds = row.channelId || this.ids;
this.$modal.confirm('是否确认删除提现渠道编号为"' + channelIds + '"的数据项?').then(function() {
return delChannelWithdraw(channelIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('ss/channelWithdraw/export', {
...this.queryParams
}, `channelWithdraw_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -63,38 +63,27 @@
<el-table v-loading="loading" :data="channelList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="channelId" width="80"/>
<el-table-column label="渠道名称" align="center" prop="name"/>
<el-table-column label="图片" align="center" prop="picture" width="100">
<image-preview slot-scope="d" :src="d.row.picture" :width="32" :height="32"/>
</el-table-column>
<el-table-column label="启用充值" align="center" prop="enabled">
<el-table-column label="是否启用" align="center" prop="enabled">
<template slot-scope="d">
<el-switch v-model="d.row.enabled" @change="(nv) => {onChangeEnabled(d.row, nv)}"/>
</template>
</el-table-column>
<el-table-column label="设备服务费" align="center" prop="serviceRate">
<el-table-column label="服务费收取类型" align="center" prop="serviceType">
<dict-tag slot-scope="d" :options="dict.type.service_type" :value="d.row.serviceType"/>
</el-table-column>
<el-table-column label="服务费" align="center" prop="serviceRate">
<template slot-scope="d">
<dict-tag :options="dict.type.service_type" :value="d.row.serviceType"/>
{{d.row.serviceRate | money}} {{serviceUnit(d.row.serviceType)}}
</template>
</el-table-column>
<el-table-column label="充值成本率" align="center" prop="costRate">
<el-table-column label="渠道成本" align="center" prop="costRate">
<template slot-scope="d">{{d.row.costRate | money}} %</template>
</el-table-column>
<el-table-column label="启用提现" align="center" prop="withdrawEnabled">
<template slot-scope="d">
<el-switch v-model="d.row.withdrawEnabled" @change="(nv) => {onChangeWithdrawEnabled(d.row, nv)}"/>
</template>
</el-table-column>
<el-table-column label="提现服务费" align="center" prop="withdrawServiceRate">
<template slot-scope="d">
<dict-tag :options="dict.type.withdraw_service_type" :value="d.row.withdrawServiceType"/>
{{d.row.withdrawServiceRate | money}} {{withdrawServiceUnit(d.row.withdrawServiceType)}}
</template>
</el-table-column>
<el-table-column label="提现成本率" align="center" prop="withdrawCostRate">
<template slot-scope="d">{{d.row.withdrawCostRate | money}} %</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -132,44 +121,24 @@
<form-col :span="span" label="图片" prop="picture">
<image-upload v-model="form.picture" :limit="1"/>
</form-col>
<form-col :span="span" label="启用充值" prop="enabled">
<form-col :span="span" label="是否启用" prop="enabled">
<el-switch v-model="form.enabled" />
</form-col>
<form-col :span="span" label="设备服务费" prop="serviceRate">
<form-col :span="span" label="服务费收取方式" prop="serviceType" label-width="9em">
<el-radio-group v-model="form.serviceType">
<el-radio v-for="dict in dict.type.service_type" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</form-col>
<form-col :span="span" label="服务费" prop="serviceRate">
<el-input v-model.number="form.serviceRate" :min="0" type="number">
<template #prepend>
<el-select v-model="form.serviceType" style="width: 10em">
<el-option v-for="dict in dict.type.service_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</template>
<template #append>
<template #suffix>
{{serviceUnit(form.serviceType)}}
</template>
</el-input>
</form-col>
<form-col :span="span" label="充值成本率" prop="costRate">
<form-col :span="span" label="渠道成本" prop="costRate">
<el-input v-model.number="form.costRate" placeholder="请输入充值成本率" :min="0">
<template #append>%</template>
</el-input>
</form-col>
<form-col :span="span" label="启用提现" prop="withdrawEnabled">
<el-switch v-model="form.withdrawEnabled" />
</form-col>
<form-col :span="span" label="提现服务费" prop="withdrawServiceRate">
<el-input v-model.number="form.withdrawServiceRate" :min="0" type="number">
<template #prepend>
<el-select v-model="form.withdrawServiceType" style="width: 10em">
<el-option v-for="dict in dict.type.withdraw_service_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</template>
<template #append>
{{withdrawServiceUnit(form.withdrawServiceType)}}
</template>
</el-input>
</form-col>
<form-col :span="span" label="提现成本率" prop="withdrawCostRate">
<el-input v-model.number="form.withdrawCostRate" placeholder="请输入充值成本率" :min="0">
<template #append>%</template>
<template #suffix>%</template>
</el-input>
</form-col>
</el-form>
@ -227,24 +196,17 @@ export default {
{required: true, message: '渠道名称不能为空', target: 'blur'}
],
enabled: [
{required: true, type: 'boolean', message: '充值是否启用不能为空', target: 'blur'}
{required: true, type: 'boolean', message: '是否启用不能为空', target: 'blur'}
],
serviceRate: [
{required: true, type: 'number', message: '设备服务费不能为空', target: 'blur'}
{required: true, type: 'number', message: '服务费不能为空', target: 'blur'}
],
costRate: [
{required: true, type: 'number', message: '充值成本不能为空', target: 'blur'}
{required: true, type: 'number', message: '成本不能为空', target: 'blur'}
],
withdrawEnabled: [
{required: true, type: 'boolean', message: '提现是否启用不能为空', target: 'blur'}
],
withdrawServiceRate: [
{required: true, type: 'number', message: '提现服务费率不能为空', target: 'blur'}
],
withdrawCostRate: [
{required: true, type: 'number', message: '提现成本率不能为空', target: 'blur'}
serviceType: [
{required: true, message: '服务费收取方式不能为空', target: 'blur'}
]
}
};
},

View File

@ -7,7 +7,8 @@
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{detail.createTime | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="提现方式">
<dict-tag :value="detail.channelId" :options="dict.type.channel_type" size="small"/>
<!-- <dict-tag :value="detail.channelId" :options="dict.type.channel_type" size="small"/>-->
{{detail.channelName}}
</el-descriptions-item>
<el-descriptions-item label="提现金额">{{detail.money | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="到账金额">{{detail.arrivalAmount | money | defaultValue}} </el-descriptions-item>
@ -29,19 +30,19 @@
<el-descriptions-item label="审核意见" :span="4">{{detail.remark | defaultValue}}</el-descriptions-item>
</el-descriptions>
<template v-else v-hasPermi="['system:bill:approval']">
<h3>审核</h3>
<div class="el-descriptions__title" style="margin: 2em 0 1em;">审核</div>
<el-form ref="form" :model="detail" :rules="approvalRules" label-width="6em">
<el-row>
<el-col :span="24">
<el-form-item label="打款方式" prop="withdrawType">
<el-select v-model="detail.withdrawType" style="width: 100%" @change="onChangeWithdrawType">
<el-option v-for="dict in dict.type.withdraw_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
<el-radio-group v-model="detail.withdrawType" @change="onChangeWithdrawType">
<el-radio v-for="dict in dict.type.withdraw_type" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<template v-if="detail.withdrawType === '2'">
<form-col :span="12" label="用户收款码" label-width="7em" prop="offlineImage">
<image-upload v-model="detail.offlineImage"/>
<image-upload v-model="detail.offlineImage" />
</form-col>
<form-col :span="12" label="支付凭证" prop="payPicture">
<image-upload v-model="detail.payPicture"/>
@ -63,8 +64,7 @@
</template>
<script>
import { getBill } from '@/api/system/recharge'
import { passWithDrawBill, rejectWithDrawBill } from '@/api/system/withdraw'
import { getWithdraw, passWithDrawBill, rejectWithDrawBill } from '@/api/system/withdraw'
import { AccountType, WithdrawType } from '@/utils/constants'
import { getUserAccountByType } from '@/api/ss/account'
@ -124,7 +124,7 @@ export default {
},
getDetail(id) {
this.loading = true;
getBill(id).then(res => {
getWithdraw(id).then(res => {
this.detail = res.data;
}).finally(() => {
this.loading = false;

View File

@ -105,10 +105,10 @@
</el-table-column>
<el-table-column label="时间" align="center" prop="createTime" width="180"/>
<el-table-column label="到账时间" align="center" prop="payTime" width="180"/>
<el-table-column label="提现方式" align="center">
<template slot-scope="d">
<dict-tag :value="d.row.channelId" :options="dict.type.channel_type"/>
</template>
<el-table-column label="提现方式" align="center" prop="channelName">
<!-- <template slot-scope="d">-->
<!-- <dict-tag :value="d.row.channelId" :options="dict.type.channel_type"/>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="打款方式" align="center">
<template slot-scope="d">
@ -131,15 +131,15 @@
@click="handleView(scope.row)"
v-hasPermi="['system:bill:query']"
>详情</el-button>
<el-button
size="mini"
style="padding-left: 1em; padding-right: 1em;"
type="warning"
icon="el-icon-coin"
v-show="scope.row.status === '12'"
@click="handlePay(scope.row)"
v-hasPermi="['system:bill:pay']"
>打款</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- style="padding-left: 1em; padding-right: 1em;"-->
<!-- type="warning"-->
<!-- icon="el-icon-coin"-->
<!-- v-show="scope.row.status === '12'"-->
<!-- @click="handlePay(scope.row)"-->
<!-- v-hasPermi="['system:bill:pay']"-->
<!-- >打款</el-button>-->
</template>
</el-table-column>
</el-table>
@ -166,18 +166,14 @@
<script>
import {
listBill,
getBill,
delBill,
listWithdraw,
getWithdraw,
delWithdraw,
addBill,
updateBill,
passWithDrawBill,
rejectWithDrawBill, payWithDrawBill
updateBill, payWithDrawBill
} from "@/api/system/withdraw";
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import WithdrawDetail from '@/views/system/withdraw/detail.vue'
import { AccountType, WithdrawType } from '@/utils/constants'
import { getUserAccountByType } from '@/api/ss/account'
export default {
name: "Bill",
@ -257,7 +253,7 @@ export default {
},
//
handleApproval(row) {
getBill(row.billId).then(response => {
getWithdraw(row.billId).then(response => {
this.approvalForm = response.data;
this.openApproval = true;
});
@ -265,7 +261,7 @@ export default {
/** 查询充值记录列表 */
getList() {
this.loading = true;
listBill(this.queryParams).then(response => {
listWithdraw(this.queryParams).then(response => {
this.billList = response.rows;
this.total = response.total;
this.loading = false;
@ -318,7 +314,7 @@ export default {
handleUpdate(row) {
this.reset();
const billId = row.billId || this.ids
getBill(billId).then(response => {
getWithdraw(billId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改充值记录";
@ -348,7 +344,7 @@ export default {
handleDelete(row) {
const billIds = row.billId || this.ids;
this.$modal.confirm('是否确认删除充值记录编号为"' + billIds + '"的数据项?').then(function() {
return delBill(billIds);
return delWithdraw(billIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");