|
|
@@ -11,8 +11,8 @@
|
|
|
<el-form-item>
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
- <el-button type="primary" plain @click="openForm('create')"
|
|
|
- ><Icon icon="ep:plus" />创建业务转账单
|
|
|
+ <el-button type="primary" plain @click="openForm('create')">
|
|
|
+ <Icon icon="ep:plus" />创建示例提现单
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -21,27 +21,35 @@
|
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
|
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true">
|
|
|
- <el-table-column label="订单编号" align="center" prop="id" />
|
|
|
- <el-table-column label="转账类型" align="center" prop="type" width="120">
|
|
|
+ <el-table-column label="提现单编号" align="center" prop="id" width="100" />
|
|
|
+ <el-table-column label="提现标题" align="center" prop="subject" min-width="120" />
|
|
|
+ <el-table-column label="提现类型" align="center" prop="type" min-width="90">
|
|
|
<template #default="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.PAY_TRANSFER_TYPE" :value="scope.row.type" />
|
|
|
+ <el-tag v-if="scope.row.type === 1">支付宝</el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.type === 2">微信支付</el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.type === 3">钱包</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="转账金额" align="center" prop="price">
|
|
|
+ <el-table-column label="提现金额" align="center" prop="price" width="120">
|
|
|
<template #default="scope">
|
|
|
<span>¥{{ (scope.row.price / 100.0).toFixed(2) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="收款人姓名" align="center" prop="userName" width="120" />
|
|
|
- <el-table-column label="支付宝登录账号" align="center" prop="alipayLogonId" width="180" />
|
|
|
- <el-table-column label="微信 openid" align="center" prop="openid" width="120" />
|
|
|
- <el-table-column label="转账状态" align="center" prop="transferStatus">
|
|
|
+ <el-table-column label="收款人姓名" align="center" prop="userName" min-width="150" />
|
|
|
+ <el-table-column label="收款人账号" align="center" prop="userAccount" min-width="250" />
|
|
|
+ <el-table-column label="提现状态" align="center" prop="status" width="100">
|
|
|
<template #default="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.PAY_TRANSFER_STATUS" :value="scope.row.transferStatus" />
|
|
|
+ <el-tag v-if="scope.row.status === 0" type="warning">等待转账</el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 10" type="success">转账成功</el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.status === 20" type="danger">转账失败</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="转账单号" align="center" prop="payTransferId" min-width="120" />
|
|
|
+ <el-table-column label="支付渠道" align="center" prop="transferChannelCode" min-width="180">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :type="DICT_TYPE.PAY_CHANNEL_CODE" :value="scope.row.transferChannelCode" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="转账单号" align="center" prop="payTransferId" />
|
|
|
- <el-table-column label="支付渠道" align="center" prop="payChannelCode" />
|
|
|
<el-table-column
|
|
|
label="转账时间"
|
|
|
align="center"
|
|
|
@@ -49,25 +57,6 @@
|
|
|
:formatter="dateFormatter"
|
|
|
width="180px"
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- width="100"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
- <template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="handleTransfer(scope.row)"
|
|
|
- v-if="scope.row.transferStatus === 0"
|
|
|
- v-hasPermi="['pay:transfer:create']"
|
|
|
- >
|
|
|
- 发起转账
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
<Pagination
|
|
|
@@ -79,19 +68,14 @@
|
|
|
</ContentWrap>
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
- <DemoTransferForm ref="demoFormRef" @success="getList" />
|
|
|
- <CreatePayTransfer ref="payTransferRef" @success="getList" />
|
|
|
+ <DemoWithdrawForm ref="demoFormRef" @success="getList" />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
-import * as DemoTransferApi from '@/api/pay/demo/transfer'
|
|
|
-import * as PayTransferApi from '@/api/pay/transfer'
|
|
|
-import DemoTransferForm from './DemoTransferForm.vue'
|
|
|
-import CreatePayTransfer from '../../transfer/CreatePayTransfer.vue'
|
|
|
+import * as DemoWithdrawApi from '@/api/pay/demo/withdraw'
|
|
|
+import DemoWithdrawForm from './DemoWithdrawForm.vue'
|
|
|
import { DICT_TYPE } from '@/utils/dict'
|
|
|
-const message = useMessage() // 消息弹窗
|
|
|
-const { t } = useI18n() // 国际化
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
@@ -102,22 +86,11 @@ const queryParams = reactive({
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
|
-let payTransfer = {
|
|
|
- appId: undefined,
|
|
|
- merchantTransferId: undefined,
|
|
|
- type: undefined,
|
|
|
- price: undefined,
|
|
|
- subject: undefined,
|
|
|
- userName: undefined,
|
|
|
- alipayLogonId: undefined,
|
|
|
- openid: undefined
|
|
|
-} as PayTransferApi.TransferVO // 传递给转账订单的数据
|
|
|
-
|
|
|
/** 查询列表 */
|
|
|
const getList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const data = await DemoTransferApi.getDemoTransferPage(queryParams)
|
|
|
+ const data = await DemoWithdrawApi.getDemoWithdrawPage(queryParams)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
|
} finally {
|
|
|
@@ -137,21 +110,12 @@ const resetQuery = () => {
|
|
|
handleQuery()
|
|
|
}
|
|
|
|
|
|
-/** 创建业务转账单操作 */
|
|
|
+/** 创建示例提现单操作 */
|
|
|
const demoFormRef = ref()
|
|
|
-const payTransferRef = ref()
|
|
|
const openForm = (type: string) => {
|
|
|
demoFormRef.value.open(type)
|
|
|
}
|
|
|
|
|
|
-/** 发起转账操作 */
|
|
|
-const handleTransfer = (row: any) => {
|
|
|
- payTransfer = { ...row }
|
|
|
- payTransfer.merchantTransferId = row.id.toString()
|
|
|
- payTransfer.subject = '示例转账'
|
|
|
- payTransferRef.value.showPayTransfer(payTransfer)
|
|
|
-}
|
|
|
-
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
getList()
|