提现转账
This commit is contained in:
parent
5dfef8cf5c
commit
7aefc64b10
44
src/api/ss/apiBill.js
Normal file
44
src/api/ss/apiBill.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询API收费订单列表
|
||||
export function listApiBill(query) {
|
||||
return request({
|
||||
url: '/ss/apiBill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询API收费订单详细
|
||||
export function getApiBill(billId) {
|
||||
return request({
|
||||
url: '/ss/apiBill/' + billId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增API收费订单
|
||||
export function addApiBill(data) {
|
||||
return request({
|
||||
url: '/ss/apiBill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改API收费订单
|
||||
export function updateApiBill(data) {
|
||||
return request({
|
||||
url: '/ss/apiBill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除API收费订单
|
||||
export function delApiBill(billId) {
|
||||
return request({
|
||||
url: '/ss/apiBill/' + billId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
52
src/api/ss/transfer.js
Normal file
52
src/api/ss/transfer.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询转账列表
|
||||
export function listTransfer(query) {
|
||||
return request({
|
||||
url: '/ss/transfer/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询转账详细
|
||||
export function getTransfer(batchId) {
|
||||
return request({
|
||||
url: '/ss/transfer/' + batchId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增转账
|
||||
export function addTransfer(data) {
|
||||
return request({
|
||||
url: '/ss/transfer',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改转账
|
||||
export function updateTransfer(data) {
|
||||
return request({
|
||||
url: '/ss/transfer',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除转账
|
||||
export function delTransfer(batchId) {
|
||||
return request({
|
||||
url: '/ss/transfer/' + batchId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新转账结果
|
||||
export function refreshTransferStatus(batchId) {
|
||||
return request({
|
||||
url: `/ss/transfer/${batchId}/refresh`,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
44
src/api/ss/transferDetail.js
Normal file
44
src/api/ss/transferDetail.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询转账明细列表
|
||||
export function listTransferDetail(query) {
|
||||
return request({
|
||||
url: '/ss/transferDetail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询转账明细详细
|
||||
export function getTransferDetail(detailId) {
|
||||
return request({
|
||||
url: '/ss/transferDetail/' + detailId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增转账明细
|
||||
export function addTransferDetail(data) {
|
||||
return request({
|
||||
url: '/ss/transferDetail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改转账明细
|
||||
export function updateTransferDetail(data) {
|
||||
return request({
|
||||
url: '/ss/transferDetail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除转账明细
|
||||
export function delTransferDetail(detailId) {
|
||||
return request({
|
||||
url: '/ss/transferDetail/' + detailId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
1
src/assets/icons/svg/transfer.svg
Normal file
1
src/assets/icons/svg/transfer.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg t="1723449635892" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6561" width="64" height="64"><path d="M545.3824 468.1984v79.2576h125.1584c16.6656 0 31.2832 14.592 31.2832 31.2832s-14.592 31.3088-31.2832 31.3088h-125.184v141.824c0 16.6912-14.592 31.3088-31.2576 31.3088-16.6912 0-31.3088-14.592-31.3088-31.3088v-141.824H357.632c-16.6656 0-31.2832-14.592-31.2832-31.3088 0-16.6656 14.592-31.2832 31.2832-31.2832h125.184V468.224h-125.184c-16.6656 0-31.2832-14.592-31.2832-31.2832s14.592-31.3088 31.2832-31.3088h81.3568l-75.0848-75.0848a30.2336 30.2336 0 0 1 0-43.8016 30.2336 30.2336 0 0 1 43.8016 0l98.048 98.048c4.1728 4.1728 6.2464 8.3456 8.3456 14.592 2.0736-4.1728 4.1472-8.3456 8.32-12.5184L622.592 286.72a30.2336 30.2336 0 0 1 43.776 0 30.2336 30.2336 0 0 1 0 43.8016l-75.0848 75.0848h81.3568c16.6912 0 31.2832 14.592 31.2832 31.3088 0 16.6912-14.592 31.2832-31.2832 31.2832h-127.232z m346.2656-8.3456c-45.9008-29.184-52.1472-35.456-52.1472-35.456-27.136-20.864-22.9632-45.9008 10.4192-56.32l114.7392-35.456s6.2464 6.2464 20.8384 64.6656c14.592 58.3936 14.592 100.096 14.592 100.096 2.0992 22.9632-12.4928 31.3088-31.2832 16.7168 0 0-52.1472-39.6544-77.1584-54.2464zM111.5136 591.2576c47.9744 27.136 60.4928 37.5552 60.4928 37.5552 29.184 18.7648 27.1104 41.728-6.272 54.2464l-112.64 35.456s-8.3456-8.3456-25.0368-64.6656c-16.6912-56.32-16.6912-104.2944-16.6912-104.2944-2.0736-22.9632 12.544-29.2096 29.2096-14.592 0 0 47.9744 41.7024 70.912 56.32zM17.6384 426.496c0-2.0736 2.0736-22.9376 8.3456-22.9376H23.8848h2.0992c2.0736-10.4192 14.592-16.6912 25.0368-12.5184 0 0 2.0736 4.1728 14.592 2.0992 12.5184-2.0992 43.8016-20.864 43.8016-20.864 10.4192-6.272 16.6912 0 12.5184 10.4192l-8.3456 33.3824c-2.0736 10.4192-14.592 20.864-25.0368 20.864H30.1568c-12.544 0-14.592-6.272-12.544-10.4448 0 0 0 2.0992 0 0z m878.1824 200.2688c2.0736-4.1728 0-2.0992 0 0 2.0736-12.544 12.5184-22.9632 25.0112-22.9632h56.32c10.4448 0 16.6912 8.3456 14.592 18.7904l-12.4928 37.5296c-6.272 12.544-16.6912 18.7904-29.184 18.7904l-48-6.272c-10.4192-2.0736-16.6912-10.4192-14.592-22.9376 0 0 8.3456-18.7904 8.3456-22.9376z m-869.8368 14.592C80.2048 858.2656 274.176 1018.88 505.728 1018.88c206.5152 0 383.8208-129.3312 458.9312-310.784 8.32-20.864 16.6656-43.8272 22.9376-66.7648h-91.776c-52.1472 166.8608-206.5152 287.8464-390.0672 287.8464S165.7344 808.192 113.5872 641.3312H25.984zM19.712 420.224a636.928 636.928 0 0 1 14.592-60.4928C99.0208 157.3888 284.672 11.392 505.7792 11.392c225.28 0 417.1776 154.368 475.5712 365.0304 4.1728 14.592 8.3456 29.184 10.4448 43.776h-91.776C856.1664 238.7712 695.552 105.2672 503.6544 105.2672c-191.8976 0-354.6112 133.504-396.3136 314.9824H19.712z m525.6704 47.9744v79.2576h125.1584c16.6656 0 31.2832 14.592 31.2832 31.2832s-14.592 31.3088-31.2832 31.3088h-125.184v141.824c0 16.6912-14.592 31.3088-31.2576 31.3088-16.6912 0-31.3088-14.592-31.3088-31.3088v-141.824H357.632c-16.6656 0-31.2832-14.592-31.2832-31.3088 0-16.6656 14.592-31.2832 31.2832-31.2832h125.184V468.224h-125.184c-16.6656 0-31.2832-14.592-31.2832-31.2832s14.592-31.2832 31.2832-31.2832h81.3568l-75.0848-75.1104a30.2336 30.2336 0 0 1 0-43.776 30.2336 30.2336 0 0 1 43.776 0l98.048 98.0224c4.1984 4.1728 6.272 8.3456 8.3712 14.592 2.0736-4.1728 4.1472-8.3456 8.32-12.5184l100.1472-100.096a30.2336 30.2336 0 0 1 43.776 0 30.2336 30.2336 0 0 1 0 43.776l-75.0848 75.1104h81.3568c16.6912 0 31.2832 14.592 31.2832 31.2832s-14.592 31.2832-31.2832 31.2832h-127.232z m346.2656-8.3456c-45.9008-29.184-52.1472-35.456-52.1472-35.456-27.136-20.864-22.9632-45.9008 10.4192-56.32l114.7392-35.456s6.2464 6.2464 20.8384 64.6656c14.592 58.3936 14.592 100.096 14.592 100.096 2.0992 22.9632-12.4928 31.3088-31.2832 16.7168 0 0-52.1472-39.6544-77.1584-54.2464zM111.5136 591.2576c47.9744 27.136 60.4928 37.5552 60.4928 37.5552 29.184 18.7648 27.1104 41.728-6.272 54.2464l-112.64 35.456s-8.3456-8.3456-25.0368-64.6656c-16.6912-56.32-16.6912-104.2944-16.6912-104.2944-2.0736-22.9632 12.544-29.2096 29.2096-14.592 0 0 47.9744 41.7024 70.912 56.32zM17.6384 426.496c0-2.0736 2.0736-22.9376 8.3456-22.9376H23.8848h2.0992c2.0736-10.4192 14.592-16.6912 25.0368-12.5184 0 0 2.0736 4.1728 14.592 2.0992 12.5184-2.0992 43.8016-20.864 43.8016-20.864 10.4192-6.272 16.6912 0 12.5184 10.4192l-8.3456 33.3824c-2.0736 10.4192-14.592 20.864-25.0368 20.864H30.1568c-12.544 0-14.592-6.272-12.544-10.4448 0 0 0 2.0992 0 0z m878.1824 200.2688c2.0736-4.1728 0-2.0992 0 0 2.0736-12.544 12.5184-22.9632 25.0112-22.9632h56.32c10.4448 0 16.6912 8.3456 14.592 18.7904l-12.4928 37.5296c-6.272 12.544-16.6912 18.7904-29.184 18.7904l-48-6.272c-10.4192-2.0736-16.6912-10.4192-14.592-22.9376 0 0 8.3456-18.7648 8.3456-22.9376z" p-id="6562"></path></svg>
|
After Width: | Height: | Size: 4.6 KiB |
35
src/components/Business/Transfer/TransferLink.vue
Normal file
35
src/components/Business/Transfer/TransferLink.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<base-link
|
||||
:type="type"
|
||||
:id="id"
|
||||
:text="text"
|
||||
:path="path"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseLink from '@/components/Business/BaseLink.vue'
|
||||
|
||||
export default {
|
||||
components: { BaseLink },
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "link"
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
path() {
|
||||
return `/money/transfer/${this.id}`
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,8 +1,12 @@
|
|||
// 视图
|
||||
import { exp } from 'qrcode/lib/core/galois-field'
|
||||
|
||||
export const views = {
|
||||
user: 'user', // 用户
|
||||
device: 'device', // 设备
|
||||
store: 'store', // 店铺
|
||||
transfer: 'transfer', // 转账
|
||||
withdraw: 'withdraw', // 提现
|
||||
}
|
||||
|
||||
// 收款账户类型
|
||||
|
@ -52,3 +56,21 @@ export const ApiPriceType = {
|
|||
unit: "次"
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* 转账业务类型
|
||||
*/
|
||||
export const TransferBstType = {
|
||||
WITHDRAW: "1", // 提现
|
||||
}
|
||||
|
||||
/**
|
||||
* 转账状态
|
||||
*/
|
||||
export const TransferStatus = {
|
||||
WAIT_TRANSFER: "1", // 待转账
|
||||
TRANSFER_ING: "2", // 转账中
|
||||
TRANSFER_SUCCESS: "3", // 已转账
|
||||
TRANSFER_PART_SUCCESS: "4", // 部分成功
|
||||
TRANSFER_FAIL: "5", // 转账失败
|
||||
}
|
||||
|
|
495
src/views/ss/apiBill/index.vue
Normal file
495
src/views/ss/apiBill/index.vue
Normal file
|
@ -0,0 +1,495 @@
|
|||
<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="订单ID" prop="billId">
|
||||
<el-input
|
||||
v-model="queryParams.billId"
|
||||
placeholder="请输入订单ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="billNo">
|
||||
<el-input
|
||||
v-model="queryParams.billNo"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户ID" prop="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入用户ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="秘钥ID" prop="accessId">
|
||||
<el-input
|
||||
v-model="queryParams.accessId"
|
||||
placeholder="请输入秘钥ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准ID" prop="apiId">
|
||||
<el-input
|
||||
v-model="queryParams.apiId"
|
||||
placeholder="请输入API收费标准ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.api_bill_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付成功的支付订单ID" prop="payId">
|
||||
<el-input
|
||||
v-model="queryParams.payId"
|
||||
placeholder="请输入支付成功的支付订单ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准类型" prop="apiType">
|
||||
<el-select v-model="queryParams.apiType" placeholder="请选择API收费标准类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.api_price_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准名称" prop="apiName">
|
||||
<el-input
|
||||
v-model="queryParams.apiName"
|
||||
placeholder="请输入API收费标准名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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:apiBill: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:apiBill: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:apiBill: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:apiBill:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="apiBillList" @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"
|
||||
>
|
||||
<template slot-scope="d">
|
||||
<template v-if="column.key === 'billId'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'status'">
|
||||
<dict-tag :options="dict.type.api_bill_status" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'apiType'">
|
||||
<dict-tag :options="dict.type.api_price_type" :value="d.row[column.key]"/>
|
||||
</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:apiBill:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['ss:apiBill: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改API收费订单对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="订单编号" prop="billNo">
|
||||
<el-input v-model="form.billNo" placeholder="请输入订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户ID" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="秘钥ID" prop="accessId">
|
||||
<el-input v-model="form.accessId" placeholder="请输入秘钥ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准ID" prop="apiId">
|
||||
<el-input v-model="form.apiId" placeholder="请输入API收费标准ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入订单金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.api_bill_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单超时时间" prop="expireTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.expireTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择订单超时时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付成功的支付订单ID" prop="payId">
|
||||
<el-input v-model="form.payId" placeholder="请输入支付成功的支付订单ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准类型" prop="apiType">
|
||||
<el-select v-model="form.apiType" placeholder="请选择API收费标准类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.api_price_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准" prop="apiNum">
|
||||
<el-input v-model="form.apiNum" placeholder="请输入API收费标准" />
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准名称" prop="apiName">
|
||||
<el-input v-model="form.apiName" placeholder="请输入API收费标准名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准描述" prop="apiDescription">
|
||||
<el-input v-model="form.apiDescription" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="API收费标准单价" prop="apiPrice">
|
||||
<el-input v-model="form.apiPrice" placeholder="请输入API收费标准单价" />
|
||||
</el-form-item>
|
||||
</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 { listApiBill, getApiBill, delApiBill, addApiBill, updateApiBill } from "@/api/ss/apiBill";
|
||||
import { $showColumns } from '@/utils/mixins';
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "createTime",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "ApiBill",
|
||||
mixins: [$showColumns],
|
||||
dicts: ['api_price_type', 'api_bill_status'],
|
||||
data() {
|
||||
return {
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'billId', visible: true, label: '订单ID', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'billNo', visible: true, label: '订单编号', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'userId', visible: true, label: '用户ID', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'accessId', visible: true, label: '秘钥ID', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'apiId', visible: true, label: 'API收费标准ID', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'amount', visible: true, label: '订单金额(元)', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'expireTime', visible: true, label: '订单超时时间', minWidth: "120", sortable: false, overflow: false, align: 'center'},
|
||||
{key: 'payId', visible: true, label: '支付成功的支付订单ID', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'apiType', visible: true, label: 'API收费标准类型', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'apiNum', visible: true, label: 'API收费标准', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'apiName', visible: true, label: 'API收费标准名称', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'apiDescription', visible: true, label: 'API收费标准描述', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
{key: 'apiPrice', visible: true, label: 'API收费标准单价', minWidth: null, sortable: true, overflow: false, align: 'center'},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// API收费订单表格数据
|
||||
apiBillList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
billId: null,
|
||||
billNo: null,
|
||||
userId: null,
|
||||
accessId: null,
|
||||
apiId: null,
|
||||
status: null,
|
||||
payId: null,
|
||||
apiType: null,
|
||||
apiName: null,
|
||||
apiDescription: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
billNo: [
|
||||
{ required: true, message: "订单编号不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户ID不能为空", trigger: "blur" }
|
||||
],
|
||||
accessId: [
|
||||
{ required: true, message: "秘钥ID不能为空", trigger: "blur" }
|
||||
],
|
||||
apiId: [
|
||||
{ required: true, message: "API收费标准ID不能为空", trigger: "blur" }
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: "订单金额不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
||||
],
|
||||
expireTime: [
|
||||
{ required: true, message: "订单超时时间不能为空", trigger: "blur" }
|
||||
],
|
||||
apiType: [
|
||||
{ required: true, message: "API收费标准类型不能为空", trigger: "change" }
|
||||
],
|
||||
apiNum: [
|
||||
{ required: true, message: "API收费标准不能为空", trigger: "blur" }
|
||||
],
|
||||
apiName: [
|
||||
{ required: true, message: "API收费标准名称不能为空", trigger: "blur" }
|
||||
],
|
||||
apiDescription: [
|
||||
{ required: true, message: "API收费标准描述不能为空", trigger: "blur" }
|
||||
],
|
||||
apiPrice: [
|
||||
{ required: true, message: "API收费标准单价不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
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();
|
||||
},
|
||||
/** 查询API收费订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listApiBill(this.queryParams).then(response => {
|
||||
this.apiBillList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
billId: null,
|
||||
billNo: null,
|
||||
userId: null,
|
||||
accessId: null,
|
||||
apiId: null,
|
||||
amount: null,
|
||||
status: null,
|
||||
expireTime: null,
|
||||
payId: null,
|
||||
apiType: null,
|
||||
apiNum: null,
|
||||
apiName: null,
|
||||
apiDescription: null,
|
||||
apiPrice: null,
|
||||
createTime: 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.billId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加API收费订单";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const billId = row.billId || this.ids
|
||||
getApiBill(billId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改API收费订单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.billId != null) {
|
||||
updateApiBill(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addApiBill(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const billIds = row.billId || this.ids;
|
||||
this.$modal.confirm('是否确认删除API收费订单编号为"' + billIds + '"的数据项?').then(function() {
|
||||
return delApiBill(billIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('ss/apiBill/export', {
|
||||
...this.queryParams
|
||||
}, `apiBill_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -123,6 +123,9 @@
|
|||
<template v-else-if="column.key === 'picture'">
|
||||
<image-preview :src="d.row.picture" :width="32" :height="32"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'minAmount' || column.key === 'maxAmount'">
|
||||
{{d.row[column.key] | money}} 元
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
|
@ -158,9 +161,9 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改提现渠道对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<form-col :span="span" label="图片" prop="picture">
|
||||
<form-col :span="span * 2" label="图片" prop="picture">
|
||||
<image-upload v-model="form.picture" :limit="1"/>
|
||||
</form-col>
|
||||
<form-col :span="span" label="渠道名称" prop="name">
|
||||
|
@ -176,7 +179,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</form-col>
|
||||
<form-col :span="span" label="服务费收取方式" label-width="9em" prop="serviceType">
|
||||
<form-col :span="span * 2" 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>
|
||||
|
@ -193,8 +196,15 @@
|
|||
<template #suffix>%</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="是否启用" prop="enabled">
|
||||
<el-switch v-model="form.enabled" />
|
||||
<form-col :span="span" label="单笔最低" prop="minAmount">
|
||||
<el-input v-model.number="form.minAmount" placeholder="请输入单笔最低提现金额" :min="0" type="number">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
<form-col :span="span" label="单笔最高" prop="maxAmount">
|
||||
<el-input v-model.number="form.maxAmount" placeholder="请输入单笔最高提现金额" :min="0" type="number">
|
||||
<template #suffix>元</template>
|
||||
</el-input>
|
||||
</form-col>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -222,7 +232,7 @@ export default {
|
|||
dicts: ['account_type', 'withdraw_service_type'],
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
span: 12,
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'channelId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
|
||||
|
@ -233,6 +243,8 @@ export default {
|
|||
{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},
|
||||
{key: 'minAmount', visible: true, label: '单笔最低', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'maxAmount', visible: true, label: '单笔最高', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
|
|
73
src/views/ss/transfer/detail.vue
Normal file
73
src/views/ss/transfer/detail.vue
Normal file
|
@ -0,0 +1,73 @@
|
|||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<template v-if="detail != null">
|
||||
<el-card class="box-card" header="转账详情">
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="转账单编号">{{ detail.batchNo | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="转账账户类型">
|
||||
<dict-tag :options="dict.type.account_type" :value="detail.accountType" size="mini"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="业务类型">
|
||||
<dict-tag :options="dict.type.transfer_bst_type" :value="detail.bstType" size="mini"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<dict-tag :options="dict.type.transfer_status" :value="detail.status" size="mini"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="名称">{{ detail.batchName | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ detail.batchRemark | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="总金额">{{ detail.totalAmount | money | defaultValue}} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="关闭原因">{{ detail.closeReason | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ detail.createTime | defaultValue}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="转账明细" lazy>
|
||||
<transfer-detail v-if="detail.batchId != null" :query="{transferId: detail.batchId}" :view="views.transfer"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</template>
|
||||
<el-empty v-else description="转账单不存在或已被删除"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { getTransfer } from '@/api/ss/transfer'
|
||||
import TransferDetail from '@/views/ss/transferDetail/index.vue'
|
||||
import { views } from '@/utils/constants'
|
||||
|
||||
export default {
|
||||
name: "Transfer/:batchId",
|
||||
computed: {
|
||||
views() {
|
||||
return views
|
||||
}
|
||||
},
|
||||
components: { TransferDetail },
|
||||
dicts: ['transfer_status', 'transfer_bst_type', 'account_type'],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
detail: {},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.id = this.$route.params.batchId;
|
||||
this.getDetail();
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.loading = true;
|
||||
getTransfer(this.id).then(res => {
|
||||
this.detail = res.data;
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
402
src/views/ss/transfer/index.vue
Normal file
402
src/views/ss/transfer/index.vue
Normal file
|
@ -0,0 +1,402 @@
|
|||
<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="batchNo">
|
||||
<el-input
|
||||
v-model="queryParams.batchNo"
|
||||
placeholder="请输入转账单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bstType" v-if="notHasView(views.withdraw)">
|
||||
<el-select v-model="queryParams.bstType" placeholder="请选择业务类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.transfer_bst_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.transfer_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次名称" prop="batchName">
|
||||
<el-input
|
||||
v-model="queryParams.batchName"
|
||||
placeholder="请输入批次名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次备注" prop="batchRemark">
|
||||
<el-input
|
||||
v-model="queryParams.batchRemark"
|
||||
placeholder="请输入批次备注"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="关闭原因" prop="closeReason">
|
||||
<el-input
|
||||
v-model="queryParams.closeReason"
|
||||
placeholder="请输入关闭原因"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ss:transfer:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="transferList" @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 === 'batchId'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'bstType'">
|
||||
<dict-tag :options="dict.type.transfer_bst_type" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'status'">
|
||||
<dict-tag :options="dict.type.transfer_status" :value="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 === 'totalAmount'">
|
||||
{{d.row.totalAmount | money}} 元
|
||||
</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" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['ss:transfer:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh"
|
||||
@click="handleRefresh(scope.row)"
|
||||
v-show="canRefresh(scope.row)"
|
||||
v-hasPermi="['ss:transfer:refresh']"
|
||||
>刷新结果</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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listTransfer,
|
||||
getTransfer,
|
||||
delTransfer,
|
||||
addTransfer,
|
||||
updateTransfer,
|
||||
refreshTransferStatus
|
||||
} from '@/api/ss/transfer'
|
||||
import { $showColumns, $view } from '@/utils/mixins'
|
||||
import { TransferStatus } from '@/utils/constants'
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "createTime",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "Transfer",
|
||||
mixins: [$showColumns, $view],
|
||||
dicts: ['transfer_status', 'transfer_bst_type', 'account_type'],
|
||||
props: {
|
||||
query: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 允许刷新结果的状态
|
||||
canRefresh() {
|
||||
return (row) => {
|
||||
return row.status === TransferStatus.TRANSFER_ING;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'batchId', visible: false, label: '转账ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'batchNo', visible: true, label: '转账单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
||||
{key: 'accountType', visible: true, label: '转账账户类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'bstType', visible: true, label: '业务类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'bstId', visible: false, label: '业务编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'batchName', visible: true, label: '名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'batchRemark', visible: true, label: '备注', minWidth: "200", sortable: true, overflow: true, align: 'center', width: null},
|
||||
{key: 'totalAmount', visible: true, label: '总金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'closeReason', visible: true, label: '关闭原因', minWidth: "100", sortable: true, overflow: true, align: 'center', width: null},
|
||||
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "180"},
|
||||
],
|
||||
// 排序方式
|
||||
orderSorts: ['ascending', 'descending', null],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 转账表格数据
|
||||
transferList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
batchId: null,
|
||||
batchNo: null,
|
||||
accountType: null,
|
||||
bstType: null,
|
||||
bstId: null,
|
||||
status: null,
|
||||
batchName: null,
|
||||
batchRemark: null,
|
||||
totalAmount: null,
|
||||
closeReason: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
batchNo: [
|
||||
{ required: true, message: "批次单号不能为空", trigger: "blur" }
|
||||
],
|
||||
accountType: [
|
||||
{ required: true, message: "转账账户类型不能为空", trigger: "change" }
|
||||
],
|
||||
bstType: [
|
||||
{ required: true, message: "业务类型不能为空", trigger: "change" }
|
||||
],
|
||||
bstId: [
|
||||
{ required: true, message: "业务ID不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
||||
],
|
||||
batchName: [
|
||||
{ required: true, message: "批次名称不能为空", trigger: "blur" }
|
||||
],
|
||||
batchRemark: [
|
||||
{ required: true, message: "批次备注不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
totalAmount: [
|
||||
{ required: true, message: "批次总金额不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
...this.query
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleRefresh(row) {
|
||||
this.loading = true;
|
||||
refreshTransferStatus(row.batchId).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success("刷新成功");
|
||||
}
|
||||
}).finally(() => {
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
handleView(row) {
|
||||
this.$router.push(`/money/transfer/${row.batchId}`);
|
||||
},
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
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;
|
||||
listTransfer(this.queryParams).then(response => {
|
||||
this.transferList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
batchId: null,
|
||||
batchNo: null,
|
||||
accountType: null,
|
||||
bstType: null,
|
||||
bstId: null,
|
||||
status: null,
|
||||
batchName: null,
|
||||
batchRemark: null,
|
||||
createTime: null,
|
||||
totalAmount: null,
|
||||
closeReason: 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.batchId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加转账";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const batchId = row.batchId || this.ids
|
||||
getTransfer(batchId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改转账";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.batchId != null) {
|
||||
updateTransfer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTransfer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const batchIds = row.batchId || this.ids;
|
||||
this.$modal.confirm('是否确认删除转账编号为"' + batchIds + '"的数据项?').then(function() {
|
||||
return delTransfer(batchIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('ss/transfer/export', {
|
||||
...this.queryParams
|
||||
}, `transfer_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
349
src/views/ss/transferDetail/index.vue
Normal file
349
src/views/ss/transferDetail/index.vue
Normal file
|
@ -0,0 +1,349 @@
|
|||
<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="detailNo">
|
||||
<el-input
|
||||
v-model="queryParams.detailNo"
|
||||
placeholder="请输入转账明细单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="转账编号" prop="transferBatchNo" v-if="notHasView(views.transfer)">
|
||||
<el-input
|
||||
v-model="queryParams.transferBatchNo"
|
||||
placeholder="请输入转账批次ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择明细状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.transfer_detail_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="转账备注" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入转账备注"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户账号" prop="accountNo">
|
||||
<el-input
|
||||
v-model="queryParams.accountNo"
|
||||
placeholder="请输入收款用户账号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入收款用户姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="失败原因" prop="failReason">
|
||||
<el-input
|
||||
v-model="queryParams.failReason"
|
||||
placeholder="请输入失败原因"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ss:transferDetail:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="transferDetailList" @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 === 'detailId'">
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
<template v-else-if="column.key === 'status'">
|
||||
<dict-tag :options="dict.type.transfer_detail_status" :value="d.row[column.key]"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'transferBatchNo'">
|
||||
<transfer-link :id="d.row.transferId" :text="d.row.transferBatchNo"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'amount'">
|
||||
{{d.row.amount | money}} 元
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTransferDetail, getTransferDetail, delTransferDetail, addTransferDetail, updateTransferDetail } from "@/api/ss/transferDetail";
|
||||
import { $showColumns, $view } from '@/utils/mixins'
|
||||
import TransferLink from '@/components/Business/Transfer/TransferLink.vue'
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
prop: "createTime",
|
||||
order: "descending"
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "TransferDetail",
|
||||
components: { TransferLink },
|
||||
mixins: [$showColumns, $view],
|
||||
dicts: ['transfer_detail_status'],
|
||||
props: {
|
||||
query: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 字段列表
|
||||
columns: [
|
||||
{key: 'detailId', visible: false, label: '明细ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'detailNo', visible: true, label: '明细单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'transferBatchNo', visible: true, label: '转账编号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'status', visible: true, label: '明细状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'amount', visible: true, label: '转账金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'remark', visible: true, label: '转账备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'accountNo', visible: true, label: '收款用户账号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'userName', visible: true, label: '收款用户姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||
{key: 'failReason', 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,
|
||||
// 转账明细表格数据
|
||||
transferDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultSort,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order,
|
||||
detailId: null,
|
||||
detailNo: null,
|
||||
transferId: null,
|
||||
status: null,
|
||||
amount: null,
|
||||
remark: null,
|
||||
accountNo: null,
|
||||
userName: null,
|
||||
failReason: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
detailNo: [
|
||||
{ required: true, message: "转账明细单号不能为空", trigger: "blur" }
|
||||
],
|
||||
transferId: [
|
||||
{ required: true, message: "转账批次ID不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "明细状态不能为空", trigger: "change" }
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: "转账金额不能为空", trigger: "blur" }
|
||||
],
|
||||
remark: [
|
||||
{ required: true, message: "转账备注不能为空", trigger: "blur" }
|
||||
],
|
||||
accountNo: [
|
||||
{ required: true, message: "收款用户账号不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
...this.query
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
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;
|
||||
listTransferDetail(this.queryParams).then(response => {
|
||||
this.transferDetailList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
detailId: null,
|
||||
detailNo: null,
|
||||
transferId: null,
|
||||
status: null,
|
||||
amount: null,
|
||||
remark: null,
|
||||
accountNo: null,
|
||||
userName: null,
|
||||
createTime: null,
|
||||
failReason: 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.detailId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加转账明细";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const detailId = row.detailId || this.ids
|
||||
getTransferDetail(detailId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改转账明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.detailId != null) {
|
||||
updateTransferDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTransferDetail(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const detailIds = row.detailId || this.ids;
|
||||
this.$modal.confirm('是否确认删除转账明细编号为"' + detailIds + '"的数据项?').then(function() {
|
||||
return delTransferDetail(detailIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('ss/transferDetail/export', {
|
||||
...this.queryParams
|
||||
}, `transferDetail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,66 +1,103 @@
|
|||
<template>
|
||||
<div style="padding: 2em 1em;" v-loading="loading">
|
||||
<el-descriptions title="申请信息" :column="2">
|
||||
<el-descriptions-item label="提现单号">{{detail.billNo | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<dict-tag :value="detail.status" :options="dict.type.withdraw_status" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请用户">
|
||||
<user-link :id="detail.userId" :name="detail.userName"/>
|
||||
</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"/>-->
|
||||
{{detail.channelName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="提现金额">{{detail.money | money | defaultValue}} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="到账金额"><span style="color: red">{{detail.arrivalAmount | money | defaultValue}} 元</span></el-descriptions-item>
|
||||
<el-descriptions-item label="余额">{{detail.afterBalance | money | defaultValue}} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="服务费">{{detail.serviceCharge | money | defaultValue}} 元</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="isApproving ? 12 : 24">
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="isApproving ? 24 : 12">
|
||||
<el-card class="card-box" header="申请信息">
|
||||
<el-descriptions :column="2">
|
||||
<el-descriptions-item label="提现单号">{{detail.billNo | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请用户">
|
||||
<user-link :id="detail.userId" :name="detail.userName"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{detail.createTime | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="提现方式">
|
||||
{{detail.channelName}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
||||
<el-descriptions title="审核信息" :column="2" style="margin-top: 1em;" v-if="detail.status !== '11'" >
|
||||
<el-descriptions-item label="打款方式">
|
||||
<dict-tag :value="detail.withdrawType" :options="dict.type.withdraw_type" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="到账时间">{{detail.payTime | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户线下收款码">
|
||||
<image-preview :src="detail.offlineImage" :width="100" :height="100"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="线下支付凭证">
|
||||
<image-preview :src="detail.payPicture" :width="100" :height="100"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="4">{{detail.remark | defaultValue}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-else v-hasPermi="['system:bill:approval']">
|
||||
<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-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-card class="card-box">
|
||||
<el-row type="flex">
|
||||
<el-statistic title="提现金额" :value="detail.money" suffix="元" :precision="2"/>
|
||||
<el-statistic title="到账金额" suffix="元">
|
||||
<template #formatter>
|
||||
<span style="color: rgba(255,9,0,0.74)">{{detail.arrivalAmount | money}}</span>
|
||||
</template>
|
||||
</el-statistic>
|
||||
<el-statistic title="余额" :value="detail.afterBalance" suffix="元" :precision="2"/>
|
||||
<el-statistic title="服务费" :value="detail.serviceCharge" suffix="元" :precision="2"/>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="!isApproving" :span="12">
|
||||
<el-card class="card-box" header="审核信息" >
|
||||
<el-descriptions :column="2" >
|
||||
<el-descriptions-item label="提现状态">
|
||||
<dict-tag :value="detail.status" :options="dict.type.withdraw_status" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="打款方式">
|
||||
<dict-tag :value="detail.withdrawType" :options="dict.type.withdraw_type" size="small"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="到账时间">{{detail.payTime | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核意见" :span="4">{{detail.remark | defaultValue}}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户线下收款码">
|
||||
<image-preview :src="detail.offlineImage" :width="80" :height="80"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="线下支付凭证">
|
||||
<image-preview :src="detail.payPicture" :width="80" :height="80"/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<template v-if="detail.withdrawType === '2'">
|
||||
<form-col :span="12" label="用户收款码" label-width="7em" prop="offlineImage">
|
||||
<image-upload v-model="detail.offlineImage" />
|
||||
</form-col>
|
||||
<form-col :span="12" label="支付凭证" prop="payPicture">
|
||||
<image-upload v-model="detail.payPicture"/>
|
||||
</form-col>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-form-item label-width="0">
|
||||
<el-input v-model="detail.remark" type="textarea" placeholder="请输入审核意见" maxlength="500" :rows="5" show-word-limit/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" style="justify-content: flex-end">
|
||||
<el-button type="success" @click="pass" v-hasPermi="['system:bill:approval']" icon="el-icon-check">通过并打款</el-button>
|
||||
<el-button type="danger" @click="reject" v-hasPermi="['system:bill:approval']" icon="el-icon-close">驳回</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-card class="card-box" v-if="!isApproving">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="转账信息" lazy>
|
||||
<transfer v-if="detail.billId != null" :query="{bstId: detail.billId, bstType: TransferBstType.WITHDRAW}" :view="views.withdraw"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col v-show="isApproving" v-hasPermi="['system:bill:approval']" :span="12">
|
||||
<el-card class="card-box" header="审核">
|
||||
<el-form ref="form" :model="detail" :rules="approvalRules" label-width="6em">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="提现状态" prop="status" >
|
||||
<dict-tag :value="detail.status" :options="dict.type.withdraw_status" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="打款方式" prop="withdrawType">
|
||||
<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" />
|
||||
</form-col>
|
||||
<form-col :span="12" label="支付凭证" prop="payPicture">
|
||||
<image-upload v-model="detail.payPicture"/>
|
||||
</form-col>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-form-item label-width="0">
|
||||
<el-input v-model="detail.remark" type="textarea" placeholder="请输入审核意见" maxlength="500" :rows="5" show-word-limit/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" style="justify-content: flex-end">
|
||||
<el-button type="success" @click="pass" v-hasPermi="['system:bill:approval']" icon="el-icon-check">通过并打款</el-button>
|
||||
<el-button type="danger" @click="reject" v-hasPermi="['system:bill:approval']" icon="el-icon-close">驳回</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -68,22 +105,29 @@
|
|||
|
||||
<script>
|
||||
import { getWithdraw, passWithDrawBill, rejectWithDrawBill } from '@/api/system/withdraw'
|
||||
import { AccountType, WithdrawType } from '@/utils/constants'
|
||||
import { AccountType, TransferBstType, views, WithdrawType } from '@/utils/constants'
|
||||
import { getUserAccountByType } from '@/api/ss/account'
|
||||
import UserLink from '@/components/Business/SmUser/UserLink.vue'
|
||||
import Transfer from '@/views/ss/transfer/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'WithdrawDetail',
|
||||
components: { UserLink },
|
||||
dicts: ['channel_type','withdraw_status', 'withdraw_type'],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: null,
|
||||
name: 'Withdraw/:billId',
|
||||
computed: {
|
||||
views() {
|
||||
return views
|
||||
},
|
||||
TransferBstType() {
|
||||
return TransferBstType
|
||||
},
|
||||
isApproving() {
|
||||
return this.detail.status === '11'
|
||||
}
|
||||
},
|
||||
components: { Transfer, UserLink },
|
||||
dicts: ['channel_type','withdraw_status', 'withdraw_type'],
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
loading: false,
|
||||
detail: {},
|
||||
suitUsingType: ['info', 'warning', 'success', 'danger'],
|
||||
|
@ -99,17 +143,8 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
id(nv, ov) {
|
||||
console.log("id", nv)
|
||||
if (nv == null) {
|
||||
this.detail = {}
|
||||
} else {
|
||||
this.getDetail(nv);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.id = this.$route.params.billId;
|
||||
this.getDetail(this.id);
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -154,15 +154,15 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-drawer
|
||||
:with-header="false"
|
||||
:visible.sync="showDetail"
|
||||
direction="rtl"
|
||||
size="800px"
|
||||
destroy-on-close
|
||||
>
|
||||
<withdraw-detail :id="row.billId"/>
|
||||
</el-drawer>
|
||||
<!-- <el-drawer-->
|
||||
<!-- :with-header="false"-->
|
||||
<!-- :visible.sync="showDetail"-->
|
||||
<!-- direction="rtl"-->
|
||||
<!-- size="800px"-->
|
||||
<!-- destroy-on-close-->
|
||||
<!-- >-->
|
||||
<!-- <withdraw-detail :id="row.billId"/>-->
|
||||
<!-- </el-drawer>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -237,34 +237,7 @@ export default {
|
|||
methods: {
|
||||
// 查看详情
|
||||
handleView(row) {
|
||||
this.row = row;
|
||||
this.showDetail = true;
|
||||
},
|
||||
// 处理打款
|
||||
handlePay(row) {
|
||||
if (row == null || row.billId == null) {
|
||||
return this.$message.error("请选择一行后继续");
|
||||
}
|
||||
this.$confirm("确定打款吗?", "打款", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
payWithDrawBill(row.billId).then(res => {
|
||||
if (res.code !== 200) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message.success("操作成功,正在打款");
|
||||
this.getList();
|
||||
})
|
||||
})
|
||||
},
|
||||
// 处理审核
|
||||
handleApproval(row) {
|
||||
getWithdraw(row.billId).then(response => {
|
||||
this.approvalForm = response.data;
|
||||
this.openApproval = true;
|
||||
});
|
||||
this.$router.push(`/money/withdraw/${row.billId}`)
|
||||
},
|
||||
/** 查询充值记录列表 */
|
||||
getList() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user