|
@@ -0,0 +1,177 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="default-main ba-table-box">
|
|
|
|
|
+ <!-- 表格顶部菜单 -->
|
|
|
|
|
+ <TableHeader :buttons="['refresh', 'columnDisplay', 'comSearch']"></TableHeader>
|
|
|
|
|
+ <!-- 表格 -->
|
|
|
|
|
+ <!-- 要使用`el-table`组件原有的属性,直接加在Table标签上即可 -->
|
|
|
|
|
+ <Table ref="tableRef"></Table>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import { ref, reactive, provide, computed, onMounted } from 'vue'
|
|
|
|
|
+import baTableClass from '/@/utils/baTable'
|
|
|
|
|
+import Table from '/@/components/table/index.vue'
|
|
|
|
|
+import TableHeader from '/@/components/table/header/index.vue'
|
|
|
|
|
+import { baTableApi } from '/@/api/common'
|
|
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
|
|
+
|
|
|
|
|
+defineOptions({
|
|
|
|
|
+ name: 'order/withdrawal',
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const { t } = useI18n()
|
|
|
|
|
+
|
|
|
|
|
+const baTable = new baTableClass(
|
|
|
|
|
+ new baTableApi('/admin/order.Withdrawal/'),
|
|
|
|
|
+ {
|
|
|
|
|
+ column: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '编号',
|
|
|
|
|
+ prop: 'id',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ width: 70,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '提现单号',
|
|
|
|
|
+ prop: 'withdrawal_no',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 160,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '申请人',
|
|
|
|
|
+ prop: 'name',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '提现金额',
|
|
|
|
|
+ prop: 'amount',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '当前账号剩余金额',
|
|
|
|
|
+ prop: 'current_balance',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 160,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '提现方式',
|
|
|
|
|
+ prop: 'withdrawal_method',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ replaceValue: {
|
|
|
|
|
+ '微信': '微信',
|
|
|
|
|
+ '支付宝': '支付宝',
|
|
|
|
|
+ '银行卡': '银行卡',
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ prop: 'status',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ render: 'tag',
|
|
|
|
|
+ custom: {
|
|
|
|
|
+ '待审核': 'warning',
|
|
|
|
|
+ '已通过': 'success',
|
|
|
|
|
+ '已拒绝': 'danger',
|
|
|
|
|
+ '已取消': 'info',
|
|
|
|
|
+ },
|
|
|
|
|
+ replaceValue: {
|
|
|
|
|
+ '待审核': '待审核',
|
|
|
|
|
+ '已通过': '已通过',
|
|
|
|
|
+ '已拒绝': '已拒绝',
|
|
|
|
|
+ '已取消': '已取消',
|
|
|
|
|
+ },
|
|
|
|
|
+ minWidth: 100,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '创建时间',
|
|
|
|
|
+ prop: 'create_time',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 170,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '审核时间',
|
|
|
|
|
+ prop: 'audit_time',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 170,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '备注',
|
|
|
|
|
+ prop: 'audit_remark',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '操作',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ width: '180',
|
|
|
|
|
+ render: 'slot',
|
|
|
|
|
+ slotName: 'operate',
|
|
|
|
|
+ operator: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ dblClickNotEditColumn: [undefined,],
|
|
|
|
|
+ filter: {
|
|
|
|
|
+ limit: 20,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ defaultItems: {
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+)
|
|
|
|
|
+
|
|
|
|
|
+// 重写getComSearchData方法,将create_time的RANGE值转换为start_time和end_time
|
|
|
|
|
+const originalGetComSearchData = baTable.getComSearchData
|
|
|
|
|
+baTable.getComSearchData = () => {
|
|
|
|
|
+ const comSearchData = originalGetComSearchData.call(baTable)
|
|
|
|
|
+
|
|
|
|
|
+ // 查找create_time的RANGE搜索
|
|
|
|
|
+ const createTimeIndex = comSearchData.findIndex((item: any) => item.field === 'create_time' && item.operator === 'RANGE')
|
|
|
|
|
+ if (createTimeIndex !== -1) {
|
|
|
|
|
+ const createTimeItem = comSearchData[createTimeIndex]
|
|
|
|
|
+ if (createTimeItem.val && typeof createTimeItem.val === 'string') {
|
|
|
|
|
+ const [startTime, endTime] = createTimeItem.val.split(',')
|
|
|
|
|
+ // 移除create_time的搜索项
|
|
|
|
|
+ comSearchData.splice(createTimeIndex, 1)
|
|
|
|
|
+ // 添加start_time和end_time的搜索项
|
|
|
|
|
+ if (startTime) {
|
|
|
|
|
+ comSearchData.push({
|
|
|
|
|
+ field: 'start_time',
|
|
|
|
|
+ val: startTime.trim(),
|
|
|
|
|
+ operator: '>=',
|
|
|
|
|
+ render: 'datetime',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ if (endTime) {
|
|
|
|
|
+ comSearchData.push({
|
|
|
|
|
+ field: 'end_time',
|
|
|
|
|
+ val: endTime.trim(),
|
|
|
|
|
+ operator: '<=',
|
|
|
|
|
+ render: 'datetime',
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return comSearchData
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+baTable.mount()
|
|
|
|
|
+baTable.getIndex()
|
|
|
|
|
+provide('baTable', baTable)
|
|
|
|
|
+
|
|
|
|
|
+// 搜索
|
|
|
|
|
+const seachList = () => {
|
|
|
|
|
+ baTable.table.filter!.page = 1
|
|
|
|
|
+ baTable.table.loading = true
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+
|
|
|
|
|
+</style>
|