generated from Leo_Ding/web-template
合并代码
This commit is contained in:
parent
fc57a72f6e
commit
320113441d
2
.env.dev
2
.env.dev
@ -12,7 +12,7 @@ VITE_ROUTER_BASE=/
|
|||||||
VITE_ROUTER_HISTORY=hash
|
VITE_ROUTER_HISTORY=hash
|
||||||
|
|
||||||
# api
|
# api
|
||||||
VITE_API_BASIC=http://10.10.1.21:8040
|
VITE_API_BASIC=http://10.10.1.22:8040
|
||||||
VITE_API_HTTP=/api/v1/
|
VITE_API_HTTP=/api/v1/
|
||||||
# storage
|
# storage
|
||||||
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
||||||
@ -3,7 +3,7 @@ export default () => ({
|
|||||||
port: 8080,
|
port: 8080,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://10.10.1.21:8040/api',
|
target: 'http://10.10.1.22:8040/api',
|
||||||
// target: 'http://127.0.0.1:8045/api',
|
// target: 'http://127.0.0.1:8045/api',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace('/api', ''),
|
rewrite: (path) => path.replace('/api', ''),
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import request from '@/utils/request'
|
|||||||
// 获取待审核列表
|
// 获取待审核列表
|
||||||
export const getPageList = (params) => request.basic.get('/api/v1/contractPendingList', params)
|
export const getPageList = (params) => request.basic.get('/api/v1/contractPendingList', params)
|
||||||
// 审核
|
// 审核
|
||||||
export const review = (id) => request.basic.post(`/api/v1/contractPendingList/review`,params)
|
export const review = (params) => request.basic.post(`/api/v1/contractPendingList/review`,params)
|
||||||
//合同详情
|
//合同详情
|
||||||
export const getInfo=(id)=>request.basic.get('/api/v1/contractPendingList/'+id)
|
export const getInfo=(id)=>request.basic.get('/api/v1/contractPendingList/'+id)
|
||||||
// 审核失败列表
|
// 审核失败列表
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export const getPageList = (params) => request.basic.get('/api/v1/mirror', param
|
|||||||
// 新增
|
// 新增
|
||||||
export const addVouchers = (params) => request.basic.post(`/api/v1/mirror`,params)
|
export const addVouchers = (params) => request.basic.post(`/api/v1/mirror`,params)
|
||||||
// 编辑
|
// 编辑
|
||||||
export const editeVouchers = (params) => request.basic.put(`/api/v1/mirror${params.id}`, params)
|
export const editeVouchers = (id,params) => request.basic.put(`/api/v1/mirror/${id}`, params)
|
||||||
// 删除
|
// 删除
|
||||||
export const deleteVouchers = (id) => request.basic.delete('/api/v1/mirror/'+id)
|
export const deleteVouchers = (id) => request.basic.delete('/api/v1/mirror/'+id)
|
||||||
// 获取详情
|
// 获取详情
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export const getPendingList = (params) => request.basic.get('/api/v1/withdrawLis
|
|||||||
// 提现确认
|
// 提现确认
|
||||||
export const pendingUpload = (params) => request.basic.post('/api/v1/withdrawChecked', params)
|
export const pendingUpload = (params) => request.basic.post('/api/v1/withdrawChecked', params)
|
||||||
// 提现失败列表
|
// 提现失败列表
|
||||||
export const getPendingFaildList = (params) => request.basic.post('/api/v1/withdrawErrorList', params)
|
export const getPendingFaildList = (params) => request.basic.get('/api/v1/withdrawErrorList', params)
|
||||||
//提现成功列表
|
//提现成功列表
|
||||||
export const getInvoicingFailedList=(params)=>request.basic.get('/api/v1/withdrawSuccessList',params)
|
export const getInvoicingFailedList=(params)=>request.basic.get('/api/v1/withdrawSuccessList',params)
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export const addVouchers = (params) => request.basic.post(`/api/v1/vouchers`,par
|
|||||||
// 编辑
|
// 编辑
|
||||||
export const editeVouchers = (params) => request.basic.put(`/api/v1/vouchers${params.id}`, params)
|
export const editeVouchers = (params) => request.basic.put(`/api/v1/vouchers${params.id}`, params)
|
||||||
// 删除
|
// 删除
|
||||||
export const deleteVouchers = (id) => request.basic.delete('/api/v1/withdrawList/'+id)
|
export const deleteVouchers = (id) => request.basic.delete('/api/v1/vouchers/'+id)
|
||||||
|
|
||||||
//算力点列表
|
//算力点列表
|
||||||
export const getPointList=(params)=>request.basic.get('/api/v1/points',params)
|
export const getPointList=(params)=>request.basic.get('/api/v1/points',params)
|
||||||
|
|||||||
@ -71,6 +71,36 @@ class DisabledDict extends BaseDict {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//镜像类型
|
||||||
|
class ImgType extends BaseDict{
|
||||||
|
constructor(){
|
||||||
|
super([
|
||||||
|
['USER','用户镜像'],
|
||||||
|
['SYSTEM','系统镜像']
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//计费方式
|
||||||
|
class PayType extends BaseDict{
|
||||||
|
constructor(){
|
||||||
|
super([
|
||||||
|
['PayOnTime','按时付费'],
|
||||||
|
['PayOnDay','按日付费'],
|
||||||
|
['PayOnWeek','按周付费'],
|
||||||
|
['PayOnMonth','按月付费'],
|
||||||
|
['PayOnYear','按年付费'],
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//算力券状态
|
||||||
|
class TicketStatus extends BaseDict{
|
||||||
|
constructor(){
|
||||||
|
super([
|
||||||
|
['ENABLED','启用'],
|
||||||
|
['DISABLED','禁用'],
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
//如何使用:import {payTypeDict} from '@/enums/dict
|
//如何使用:import {payTypeDict} from '@/enums/dict
|
||||||
//获取下拉框列表:payTypeDict.options
|
//获取下拉框列表:payTypeDict.options
|
||||||
//获取label:payTypeDict.getLabel(1)
|
//获取label:payTypeDict.getLabel(1)
|
||||||
@ -79,3 +109,6 @@ export const payStatusDict = new PayStatusDict()
|
|||||||
export const authenticationDict = new AuthenticationDict()
|
export const authenticationDict = new AuthenticationDict()
|
||||||
export const authenticationTypeDict = new AuthenticationTypeDict()
|
export const authenticationTypeDict = new AuthenticationTypeDict()
|
||||||
export const disabledDict = new DisabledDict()
|
export const disabledDict = new DisabledDict()
|
||||||
|
export const imgType =new ImgType()
|
||||||
|
export const payType=new PayType()
|
||||||
|
export const ticketStatus=new TicketStatus()
|
||||||
|
|||||||
@ -6,9 +6,7 @@
|
|||||||
<a-form-item label="金额" name="amount">
|
<a-form-item label="金额" name="amount">
|
||||||
<a-input-number v-model:value="formData.amount" :precision="2" style="width: 100%;"></a-input-number>
|
<a-input-number v-model:value="formData.amount" :precision="2" style="width: 100%;"></a-input-number>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="变更类型" name="changeType">
|
|
||||||
<a-input v-model:value="formData.changeType"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -47,7 +45,6 @@ function handleEdit(record = {}) {
|
|||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '添加余额',
|
title: '添加余额',
|
||||||
})
|
})
|
||||||
formRecord.value.userId = record.userId
|
|
||||||
formData.value = cloneDeep(record)
|
formData.value = cloneDeep(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +58,8 @@ function handleOk() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...formData.value,
|
balanceId:formData.value.id,
|
||||||
|
amount:formData.value.amount,
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -77,7 +75,7 @@ function handleOk() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">添加余额</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">添加余额</x-action-button>
|
||||||
<!-- <x-action-button @click="handleDelete(record)">删除</x-action-button> -->
|
<!-- <x-action-button @click="handleDelete(record)">删除</x-action-button> -->
|
||||||
</template>
|
</template>
|
||||||
@ -53,14 +53,14 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户名', dataIndex: 'username' },
|
{ title: '用户名', dataIndex: 'userName' },
|
||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '变更前', dataIndex: 'balanceBeforeChange' },
|
{ title: '变更前', dataIndex: 'balanceBeforeChange',customRender: ({ text }) => '¥'+text },
|
||||||
{ title: '变更后', dataIndex: 'remainingBalance' },
|
{ title: '变更后', dataIndex: 'remainingBalance',customRender: ({ text }) => '¥'+text },
|
||||||
{ title: '变更量', dataIndex: 'changeValue' },
|
{ title: '变更量', dataIndex: 'changeAmount',customRender: ({ text }) => '¥'+text },
|
||||||
{ title: '变更时间', dataIndex: 'lastChangeTime' },
|
{ title: '变更时间', dataIndex: 'lastChangeTime' },
|
||||||
{ title: '变更类型', dataIndex: 'changeType' },
|
{ title: '变更类型', dataIndex: 'changeType' },
|
||||||
{ title: '操作', dataIndex: 'action' },
|
{ title: '操作', dataIndex: 'action',align:'center' },
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -76,7 +76,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.vouchers
|
const { success, data,total } = await apis.vouchers
|
||||||
.getBalanceList({
|
.getBalanceList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -86,10 +86,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -43,7 +43,6 @@ function handleEdit(record = {}) {
|
|||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '新增算力点',
|
title: '新增算力点',
|
||||||
})
|
})
|
||||||
formRecord.value.userId = record.userId
|
|
||||||
formData.value = cloneDeep(record)
|
formData.value = cloneDeep(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +56,8 @@ function handleOk() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...formData.value,
|
point:formData.value.point,
|
||||||
|
id:formData.value.id
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -73,7 +73,7 @@ function handleOk() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,9 +30,9 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">新增</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">新增</x-action-button>
|
||||||
<x-action-button @click="handleDelete(record)">删除</x-action-button>
|
<!-- <x-action-button @click="handleDelete(record)">删除</x-action-button> -->
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -53,14 +53,14 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户名', dataIndex: 'username' },
|
{ title: '用户名', dataIndex: 'userName' },
|
||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '变更前', dataIndex: 'pointsBeforeChange' },
|
{ title: '变更前', dataIndex: 'pointsBeforeChange' },
|
||||||
{ title: '变更后', dataIndex: 'remainingPoints' },
|
{ title: '变更后', dataIndex: 'remainingPoints' },
|
||||||
{ title: '变更量', dataIndex: 'changeValue' },
|
{ title: '变更量', dataIndex: 'changeValue' },
|
||||||
{ title: '变更时间', dataIndex: 'lastChangeTime' },
|
{ title: '变更时间', dataIndex: 'lastChangeTime' },
|
||||||
{ title: '变更类型', dataIndex: 'changeType' },
|
{ title: '变更类型', dataIndex: 'changeType' },
|
||||||
{ title: '操作', dataIndex: 'action' },
|
{ title: '操作', dataIndex: 'action',align:'center' },
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -76,7 +76,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.vouchers
|
const { success,total, data } = await apis.vouchers
|
||||||
.getPointList({
|
.getPointList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -86,10 +86,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total =total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
@ -115,10 +114,10 @@ function handleDelete({ id }) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
; (async () => {
|
; (async () => {
|
||||||
try {
|
try {
|
||||||
const { code } = await apis.vouchers.deleteVouchers(id).catch(() => {
|
const { success } = await apis.vouchers.deleteVouchers(id).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
resolve()
|
resolve()
|
||||||
message.success('删除成功')
|
message.success('删除成功')
|
||||||
await getPageList()
|
await getPageList()
|
||||||
|
|||||||
@ -13,10 +13,10 @@
|
|||||||
<a-input v-model:value="formData.couponName"></a-input>
|
<a-input v-model:value="formData.couponName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="券面点数" name="faceValue">
|
<a-form-item label="券面点数" name="faceValue">
|
||||||
<a-input v-model:value="formData.faceValue"></a-input>
|
<a-input-number v-model:value="formData.faceValue" style="width: 100%;"></a-input-number>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="可用点数" name="availablePoints">
|
<a-form-item label="可用点数" name="availablePoints">
|
||||||
<a-input v-model:value="formData.availablePoints"></a-input>
|
<a-input-number v-model:value="formData.availablePoints" style="width: 100%;"></a-input-number>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="生效时间" name="effectiveTime">
|
<a-form-item label="生效时间" name="effectiveTime">
|
||||||
<a-date-picker v-model:value="formData.effectiveTime" style="width: 100%;"/>
|
<a-date-picker v-model:value="formData.effectiveTime" style="width: 100%;"/>
|
||||||
@ -26,8 +26,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="状态" name="status">
|
<a-form-item label="状态" name="status">
|
||||||
<a-radio-group v-model:value="formData.status" name="radioGroup">
|
<a-radio-group v-model:value="formData.status" name="radioGroup">
|
||||||
<a-radio value="1">启用</a-radio>
|
<a-radio v-for="item in ticketStatus.options" :value="item.value">{{ item.label }}</a-radio>
|
||||||
<a-radio value="2">停用</a-radio>
|
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
@ -39,7 +38,8 @@
|
|||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import apis from '@/apis'
|
import apis from '@/apis'
|
||||||
import { useForm, useModal } from '@/hooks'
|
import { useForm, useModal } from '@/hooks'
|
||||||
|
import {ticketStatus} from '@/enums/dict'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
const emit = defineEmits(['ok'])
|
const emit = defineEmits(['ok'])
|
||||||
|
|
||||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||||
@ -60,7 +60,7 @@ formRules.value = {
|
|||||||
* 新建
|
* 新建
|
||||||
*/
|
*/
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
formData.value.status = '1'
|
formData.value.status = 'ENABLED'
|
||||||
showModal({
|
showModal({
|
||||||
type: 'create',
|
type: 'create',
|
||||||
title: '新建',
|
title: '新建',
|
||||||
@ -77,6 +77,8 @@ function handleEdit(record = {}) {
|
|||||||
})
|
})
|
||||||
formRecord.value = record
|
formRecord.value = record
|
||||||
formData.value = cloneDeep(record)
|
formData.value = cloneDeep(record)
|
||||||
|
formData.value.effectiveTime=dayjs(record.effectiveTime)
|
||||||
|
formData.value.expiryTime=dayjs(record.expiryTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -90,6 +92,8 @@ function handleOk() {
|
|||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
|
effectiveTime:dayjs(formData.value.effectiveTime).format('YYYY-MM-DD'),
|
||||||
|
expiryTime:dayjs(formData.value.expiryTime).format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -105,7 +109,7 @@ function handleOk() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">编辑</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">编辑</x-action-button>
|
||||||
<x-action-button @click="handleDelete(record)">删除</x-action-button>
|
<x-action-button @click="handleDelete(record)">删除</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
@ -52,20 +52,20 @@ import apis from '@/apis'
|
|||||||
import { config } from '@/config'
|
import { config } from '@/config'
|
||||||
import { usePagination } from '@/hooks'
|
import { usePagination } from '@/hooks'
|
||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
|
import {ticketStatus} from '@/enums/dict'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'listTable',
|
name: 'listTable',
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户名', dataIndex: 'username' },
|
{ title: '用户名', dataIndex: 'userName' },
|
||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '算力券名称', dataIndex: 'couponName' },
|
{ title: '算力券名称', dataIndex: 'couponName' },
|
||||||
{ title: '券面点数', dataIndex: 'faceValue' },
|
{ title: '券面点数', dataIndex: 'faceValue' },
|
||||||
{ title: '可用点数', dataIndex: 'availablePoints' },
|
{ title: '可用点数', dataIndex: 'availablePoints' },
|
||||||
{ title: '生效时间', dataIndex: 'effectiveTime' },
|
{ title: '生效时间', dataIndex: 'effectiveTime' },
|
||||||
{ title: '失效时间', dataIndex: 'expiryTime' },
|
{ title: '失效时间', dataIndex: 'expiryTime' },
|
||||||
{ title: '状态', dataIndex: 'status' },
|
{ title: '状态', dataIndex: 'status',customRender: ({ text }) => ticketStatus.getLabel(text)},
|
||||||
{ title: '操作', dataIndex: 'action' },
|
{ title: '操作', dataIndex: 'action' },
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
@ -82,7 +82,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.vouchers
|
const { success,total, data } = await apis.vouchers
|
||||||
.getPageList({
|
.getPageList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -92,10 +92,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
@ -121,10 +120,10 @@ function handleDelete({ id }) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
; (async () => {
|
; (async () => {
|
||||||
try {
|
try {
|
||||||
const { code } = await apis.vouchers.deleteVouchers(id).catch(() => {
|
const { success } = await apis.vouchers.deleteVouchers(id).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
resolve()
|
resolve()
|
||||||
message.success('删除成功')
|
message.success('删除成功')
|
||||||
await getPageList()
|
await getPageList()
|
||||||
|
|||||||
@ -1,23 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
||||||
:open="modal.open"
|
@ok="handleOk" @cancel="handleCancel">
|
||||||
:title="modal.title"
|
<a-card>
|
||||||
:confirm-loading="modal.confirmLoading"
|
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules">
|
||||||
:after-close="onAfterClose"
|
<a-form-item label="审核" name="checked">
|
||||||
@ok="handleOk"
|
<a-radio-group v-model:value="formData.checked" name="radioGroup">
|
||||||
@cancel="handleCancel">
|
<a-radio :value="true">通过</a-radio>
|
||||||
<a-form
|
<a-radio :value="false">拒绝</a-radio>
|
||||||
ref="formRef"
|
</a-radio-group>
|
||||||
scroll-to-first-error
|
</a-form-item>
|
||||||
:model="formData"
|
<a-form-item label="原因" name="reason">
|
||||||
:rules="formRules"
|
<a-textarea v-model:value="formData.reason"></a-textarea>
|
||||||
:label-col="{ style: { width: '80px' } }">
|
|
||||||
<a-form-item
|
|
||||||
label="标题"
|
|
||||||
name="title">
|
|
||||||
<a-input v-model:value="formData.title"></a-input>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</a-card>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -32,7 +28,7 @@ const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
|||||||
const { formRef, formRules, formRecord, formData, resetForm } = useForm()
|
const { formRef, formRules, formRecord, formData, resetForm } = useForm()
|
||||||
|
|
||||||
formRules.value = {
|
formRules.value = {
|
||||||
title: { required: true, message: '请输入标题' },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,10 +47,10 @@ function handleCreate() {
|
|||||||
function handleEdit(record = {}) {
|
function handleEdit(record = {}) {
|
||||||
showModal({
|
showModal({
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '编辑',
|
title: '审核',
|
||||||
})
|
})
|
||||||
formRecord.value = record
|
formData.value.checked = true
|
||||||
formData.value = cloneDeep(record)
|
formData.value.contractId = record.id
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,10 +60,11 @@ function handleOk() {
|
|||||||
formRef.value
|
formRef.value
|
||||||
.validateFields()
|
.validateFields()
|
||||||
.then(async (values) => {
|
.then(async (values) => {
|
||||||
|
console.log(values)
|
||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...formData.value,
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -77,17 +74,18 @@ function handleOk() {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
result = await apis.common.update(formRecord.value.id, params).catch(() => {
|
result = await apis.contract.review(params).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result?.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
hideLoading()
|
hideLoading()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<a-input v-model:value="searchFormData.contractId"></a-input>
|
<a-input v-model:value="searchFormData.contractId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col class="align-right" v-bind="colSpan">
|
<a-col class="align-left" v-bind="colSpan">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -34,9 +34,9 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="handleReview(record)">审核</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">审核</x-action-button>
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button>
|
<!-- <x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button> -->
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -53,19 +53,17 @@ import { usePagination } from '@/hooks'
|
|||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'listTable',
|
name: 'contract',
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户名', dataIndex: 'username' },
|
{ title: '用户名', dataIndex: 'username' },
|
||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '发票金额', dataIndex: 'invoiceAmount' },
|
{ title: '合同编号', dataIndex: 'contractId' },
|
||||||
{ title: '发票类型', dataIndex: 'invoiceType' },
|
{ title: '合同名称', dataIndex: 'contractName' },
|
||||||
{ title: '状态', dataIndex: 'status' },
|
{ title: '合同类型', dataIndex: 'contractType' },
|
||||||
{ title: '发票编号', dataIndex: 'invoiceNumber' },
|
{ title: '合同内容', dataIndex: 'contractContent' },
|
||||||
{ title: '开票日期', dataIndex: 'issueDate' },
|
{ title: '操作', dataIndex: 'action',width:120,align:'center' },
|
||||||
{ title: '开票方式', dataIndex: 'issueMethod' },
|
|
||||||
{ title: '备注', dataIndex: 'remarks' },
|
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -81,7 +79,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.contract
|
const { success,total, data } = await apis.contract
|
||||||
.getPageList({
|
.getPageList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -91,10 +89,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -77,7 +77,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.contract
|
const { success,total, data } = await apis.contract
|
||||||
.getFaildList({
|
.getFaildList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -87,10 +87,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -34,6 +34,9 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="'contractContent' === column.dataIndex">
|
||||||
|
<a-image :width="100" :height="100" :src="config('http.apiBasic')+record.contractContent" />
|
||||||
|
</template>
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.key">
|
||||||
<x-action-button @click="handleReview(record)">上传合同</x-action-button>
|
<x-action-button @click="handleReview(record)">上传合同</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
@ -50,7 +53,6 @@ import apis from '@/apis'
|
|||||||
import { config } from '@/config'
|
import { config } from '@/config'
|
||||||
import { usePagination } from '@/hooks'
|
import { usePagination } from '@/hooks'
|
||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'listTable',
|
name: 'listTable',
|
||||||
})
|
})
|
||||||
@ -61,7 +63,12 @@ const columns = [
|
|||||||
{ title: '合同编号', dataIndex: 'contractId' },
|
{ title: '合同编号', dataIndex: 'contractId' },
|
||||||
{ title: '合同名称', dataIndex: 'contractName' },
|
{ title: '合同名称', dataIndex: 'contractName' },
|
||||||
{ title: '合同类型', dataIndex: 'contractType' },
|
{ title: '合同类型', dataIndex: 'contractType' },
|
||||||
{ title: '合同内容', dataIndex: 'contractContent' }
|
{
|
||||||
|
title: '合同内容',
|
||||||
|
dataIndex: 'contractContent',
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -77,8 +84,8 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.invoice
|
const { success, total, data } = await apis.contract
|
||||||
.getPendingList({
|
.getinvoiceSuccessList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
...searchFormData.value
|
...searchFormData.value
|
||||||
@ -87,10 +94,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -1,23 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
||||||
:open="modal.open"
|
@ok="handleOk" @cancel="handleCancel">
|
||||||
:title="modal.title"
|
<a-card>
|
||||||
:confirm-loading="modal.confirmLoading"
|
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
||||||
:after-close="onAfterClose"
|
|
||||||
@ok="handleOk"
|
|
||||||
@cancel="handleCancel">
|
|
||||||
<a-form
|
|
||||||
ref="formRef"
|
|
||||||
scroll-to-first-error
|
|
||||||
:model="formData"
|
|
||||||
:rules="formRules"
|
|
||||||
:label-col="{ style: { width: '80px' } }">
|
:label-col="{ style: { width: '80px' } }">
|
||||||
<a-form-item
|
<a-form-item label="上传合同" name="url">
|
||||||
label="标题"
|
<gx-upload v-model="formData.fileList" accept-types=".jpg,.png,.webp" :fileNumber="1" />
|
||||||
name="title">
|
|
||||||
<a-input v-model:value="formData.title"></a-input>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</a-card>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -25,7 +16,8 @@
|
|||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import apis from '@/apis'
|
import apis from '@/apis'
|
||||||
import { useForm, useModal } from '@/hooks'
|
import { useForm, useModal } from '@/hooks'
|
||||||
|
import GxUpload from '@/components/GxUpload/index.vue'
|
||||||
|
import {spliceUrl} from '@/utils/util.js'
|
||||||
const emit = defineEmits(['ok'])
|
const emit = defineEmits(['ok'])
|
||||||
|
|
||||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||||
@ -51,10 +43,10 @@ function handleCreate() {
|
|||||||
function handleEdit(record = {}) {
|
function handleEdit(record = {}) {
|
||||||
showModal({
|
showModal({
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '编辑',
|
title: '上传签章合同',
|
||||||
})
|
})
|
||||||
formRecord.value = record
|
|
||||||
formData.value = cloneDeep(record)
|
formData.value.id = record.id
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,10 +56,16 @@ function handleOk() {
|
|||||||
formRef.value
|
formRef.value
|
||||||
.validateFields()
|
.validateFields()
|
||||||
.then(async (values) => {
|
.then(async (values) => {
|
||||||
|
console.log(formData.value.fileList)
|
||||||
|
if(formData.value.fileList===undefined||formData.value.fileList.length==0){
|
||||||
|
return message.error('请上传签章图片')
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
|
console.log(spliceUrl(formData.value.fileList[0]))
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
id:formData.value.id,
|
||||||
|
url:spliceUrl(formData.value.fileList[0])
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -77,17 +75,18 @@ function handleOk() {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
result = await apis.common.update(formRecord.value.id, params).catch(() => {
|
result = await apis.contract.pendingUpload(params).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result?.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
hideLoading()
|
hideLoading()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -34,8 +34,8 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="handleReview(record)">上传合同</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">上传签章</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -61,7 +61,8 @@ const columns = [
|
|||||||
{ title: '合同编号', dataIndex: 'contractId' },
|
{ title: '合同编号', dataIndex: 'contractId' },
|
||||||
{ title: '合同名称', dataIndex: 'contractName' },
|
{ title: '合同名称', dataIndex: 'contractName' },
|
||||||
{ title: '合同类型', dataIndex: 'contractType' },
|
{ title: '合同类型', dataIndex: 'contractType' },
|
||||||
{ title: '合同内容', dataIndex: 'contractContent' }
|
{ title: '合同内容', dataIndex: 'contractContent' },
|
||||||
|
{title:"操作",dataIndex:'action',width:100}
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -77,8 +78,8 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.contract
|
const { success,total, data } = await apis.contract
|
||||||
.getinvoiceSuccessList({
|
.getPendingList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
...searchFormData.value
|
...searchFormData.value
|
||||||
@ -87,10 +88,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -1,13 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
||||||
@ok="handleOk" @cancel="handleCancel">
|
@ok="handleOk" @cancel="handleCancel">
|
||||||
|
<a-card>
|
||||||
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
||||||
:label-col="{ style: { width: '80px' } }">
|
:label-col="{ style: { width: '80px' } }">
|
||||||
<a-form-item label="镜像名称" name="imageName">
|
<a-form-item label="镜像名称" name="imageName">
|
||||||
<a-input v-model:value="formData.imageName"></a-input>
|
<a-input v-model:value="formData.imageName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="镜像类型" name="imageType">
|
<a-form-item label="镜像类型" name="imageType">
|
||||||
<a-input v-model:value="formData.imageType"></a-input>
|
<a-select v-model:value="formData.imageType" placeholder="请选择类型">
|
||||||
|
<a-select-option v-for="item in imgType.options" :key="item.value" :value="item.value">
|
||||||
|
{{ item.label }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="镜像路径" name="imagePath">
|
<a-form-item label="镜像路径" name="imagePath">
|
||||||
<a-input v-model:value="formData.imagePath"></a-input>
|
<a-input v-model:value="formData.imagePath"></a-input>
|
||||||
@ -22,6 +27,7 @@
|
|||||||
<a-input v-model:value="formData.description"></a-input>
|
<a-input v-model:value="formData.description"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</a-card>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -29,7 +35,8 @@
|
|||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
import apis from '@/apis'
|
import apis from '@/apis'
|
||||||
import { useForm, useModal } from '@/hooks'
|
import { useForm, useModal } from '@/hooks'
|
||||||
|
import { number } from 'echarts'
|
||||||
|
import {imgType} from '@/enums/dict'
|
||||||
const emit = defineEmits(['ok'])
|
const emit = defineEmits(['ok'])
|
||||||
|
|
||||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||||
@ -63,7 +70,8 @@ function handleEdit(record = {}) {
|
|||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
})
|
})
|
||||||
formRecord.value = record
|
console.log(record)
|
||||||
|
// formRecord.value.id = record.id
|
||||||
formData.value = cloneDeep(record)
|
formData.value = cloneDeep(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +85,9 @@ function handleOk() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...formData.value,
|
||||||
|
imageSize: Number(formData.value.imageSize),
|
||||||
|
name:formData.value.imageName
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -87,13 +97,14 @@ function handleOk() {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
result = await apis.images.editeVouchers(formRecord.value.id, params).catch(() => {
|
result = await apis.images.editeVouchers(formData.value.id, params).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
console.log(result)
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (true === result?.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,14 +31,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</x-search-bar>
|
</x-search-bar>
|
||||||
<a-card>
|
<a-card>
|
||||||
<p><a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新增</a-button></p>
|
<!-- <p><a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新增</a-button></p> -->
|
||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">编辑</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">编辑</x-action-button>
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button>
|
<!-- <x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button> -->
|
||||||
<x-action-button @click="handleDelete(record)">删除</x-action-button>
|
<x-action-button @click="handleDelete(record)" style="color: red;">删除</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -53,21 +53,21 @@ import apis from '@/apis'
|
|||||||
import { config } from '@/config'
|
import { config } from '@/config'
|
||||||
import { usePagination } from '@/hooks'
|
import { usePagination } from '@/hooks'
|
||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
|
import {imgType} from '@/enums/dict'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'listTable',
|
name: 'listTable',
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '用户名', dataIndex: 'username' },
|
{ title: '用户名', dataIndex: 'userName', width: 120 },
|
||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone', width: 120 },
|
||||||
{ title: '镜像名称', dataIndex: 'imageName'},
|
{ title: '镜像名称', dataIndex: 'imageName'},
|
||||||
{ title: '镜像类型', dataIndex: 'imageType' },
|
{ title: '镜像类型', dataIndex: 'imageType', width: 120, customRender: ({ text }) => imgType.getLabel(text) || text, },
|
||||||
{ title: '描述', dataIndex: 'description' },
|
|
||||||
{ title: '镜像路径', dataIndex: 'imagePath' },
|
{ title: '镜像路径', dataIndex: 'imagePath' },
|
||||||
{ title: '镜像大小', dataIndex: 'imageSize' },
|
{ title: '镜像大小', dataIndex: 'imageSize',customRender: ({ text }) => text },
|
||||||
{ title: '镜像版本', dataIndex: 'imageVersion' },
|
{ title: '镜像版本', dataIndex: 'imageVersion' },
|
||||||
{ title: '操作', dataIndex: 'action' },
|
{ title: '描述', dataIndex: 'description' },
|
||||||
|
{ title: '操作', dataIndex: 'action',width:130,align:'center' },
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -83,7 +83,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.images
|
const { success, data, total } = await apis.images
|
||||||
.getPageList({
|
.getPageList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -93,10 +93,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
@ -122,10 +121,10 @@ function handleDelete({ id }) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
; (async () => {
|
; (async () => {
|
||||||
try {
|
try {
|
||||||
const { code } = await apis.vouchers.deleteVouchers(id).catch(() => {
|
const { success } = await apis.images.deleteVouchers(id).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
resolve()
|
resolve()
|
||||||
message.success('删除成功')
|
message.success('删除成功')
|
||||||
await getPageList()
|
await getPageList()
|
||||||
|
|||||||
@ -34,12 +34,7 @@
|
|||||||
<!-- <p><a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新增</a-button></p> -->
|
<!-- <p><a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新增</a-button></p> -->
|
||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="'action' === column.key">
|
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">新增</x-action-button>
|
|
||||||
<x-action-button @click="handleDelete(record)">删除</x-action-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
<edit-dialog ref="editDialogRef" @ok="onOk" />
|
<edit-dialog ref="editDialogRef" @ok="onOk" />
|
||||||
@ -52,22 +47,22 @@ import apis from '@/apis'
|
|||||||
import { config } from '@/config'
|
import { config } from '@/config'
|
||||||
import { usePagination } from '@/hooks'
|
import { usePagination } from '@/hooks'
|
||||||
import EditDialog from './components/EditDialog.vue'
|
import EditDialog from './components/EditDialog.vue'
|
||||||
|
import {payType} from '@/enums/dict'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'listTable',
|
name: 'listTable',
|
||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{title:'订单编号',dataIndex:'orderNumber'},
|
{title:'订单编号',dataIndex:'orderNumber'},
|
||||||
{ title: '用户名', dataIndex: 'username' },
|
{ title: '用户名', dataIndex: 'userName' },
|
||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '实例名称', dataIndex: 'caseName' },
|
{ title: '实例名称', dataIndex: 'caseName' },
|
||||||
{ title: '计费方式', dataIndex: 'billingMethod' },
|
{ title: '计费方式', dataIndex: 'billingMethod',customRender: ({ text }) => payType.getLabel(text) || text, },
|
||||||
{ title: '计费开始时间', dataIndex: 'billingStart' },
|
{ title: '计费开始时间', dataIndex: 'billingStart' },
|
||||||
{ title: '计费结束时间', dataIndex: 'billingEnd' },
|
{ title: '计费结束时间', dataIndex: 'billingEnd' },
|
||||||
{ title: '计费时长', dataIndex: 'billingTime' },
|
{ title: '计费时长', dataIndex: 'billingTime' },
|
||||||
{ title: '单价', dataIndex: 'price' },
|
{ title: '单价', dataIndex: 'price' },
|
||||||
{ title: '总费用', dataIndex: 'totalAmount' },
|
{ title: '总费用/元', dataIndex: 'totalAmount',customRender: ({ text }) => '¥'+text, },
|
||||||
{ title: '算力券名称', dataIndex: 'voucherName' },
|
{ title: '算力券名称', dataIndex: 'voucherName' },
|
||||||
{ title: '支付状态', dataIndex: 'payStatus' },
|
{ title: '支付状态', dataIndex: 'payStatus' },
|
||||||
]
|
]
|
||||||
@ -85,7 +80,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.vouchers
|
const { success, data ,total} = await apis.vouchers
|
||||||
.getOrderList({
|
.getOrderList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -95,10 +90,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -1,12 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
||||||
@ok="handleOk" @cancel="handleCancel">
|
@ok="handleOk" @cancel="handleCancel">
|
||||||
|
<a-card>
|
||||||
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
||||||
:label-col="{ style: { width: '80px' } }">
|
:label-col="{ style: { width: '80px' } }">
|
||||||
<a-form-item label="审核" name="checked">
|
<a-form-item label="审核" name="checked">
|
||||||
<a-input v-model:value="formData.checked"></a-input>
|
<a-radio-group v-model:value="formData.checked" name="radioGroup">
|
||||||
|
<a-radio :value="true">通过</a-radio>
|
||||||
|
<a-radio :value="false">拒绝</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item label="原因" name="reason">
|
||||||
|
<a-textarea v-model:value="formData.reason"></a-textarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</a-card>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -42,10 +50,9 @@ function handleEdit(record = {}) {
|
|||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '审核',
|
title: '审核',
|
||||||
})
|
})
|
||||||
formRecord.value.withdrawalOrderId = record.withdrawalOrderId
|
formData.value.checked=true
|
||||||
formData.value = cloneDeep(record)
|
formData.value.withdrawalOrderId = record.withdrawalOrderId
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确定
|
* 确定
|
||||||
*/
|
*/
|
||||||
@ -56,7 +63,7 @@ function handleOk() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const params = {
|
const params = {
|
||||||
...values,
|
...formData.value,
|
||||||
}
|
}
|
||||||
let result = null
|
let result = null
|
||||||
switch (modal.value.type) {
|
switch (modal.value.type) {
|
||||||
@ -72,7 +79,7 @@ function handleOk() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result?.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col class="align-right" v-bind="colSpan">
|
<a-col class="align-left" v-bind="colSpan">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -34,9 +34,9 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="handleReview(record)">审核</x-action-button>
|
<!-- <x-action-button @click="handleReview(record)">审核</x-action-button> -->
|
||||||
<!-- <x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button> -->
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">审核</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -61,7 +61,9 @@ const columns = [
|
|||||||
{ title: '手机号', dataIndex: 'phone' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
||||||
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
||||||
{ title: '银行卡信息', dataIndex: 'bankCardInfo' }
|
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
|
||||||
|
{title:'申请时间',dataIndex:'withdrawalTime'},
|
||||||
|
{title:'操作',dataIndex:'action',align:'center'}
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -77,7 +79,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.review
|
const { success,total, data } = await apis.review
|
||||||
.getPageList({
|
.getPageList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -87,10 +89,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total =total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col class="align-right" v-bind="colSpan">
|
<a-col class="align-left" v-bind="colSpan">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -72,7 +72,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.review
|
const { success, total, data } = await apis.review
|
||||||
.getPendingFaildList({
|
.getPendingFaildList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -82,10 +82,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
<a-modal :open="modal.open" :title="modal.title" :confirm-loading="modal.confirmLoading" :after-close="onAfterClose"
|
||||||
@ok="handleOk" @cancel="handleCancel">
|
@ok="handleOk" @cancel="handleCancel">
|
||||||
|
<a-card>
|
||||||
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
<a-form ref="formRef" scroll-to-first-error :model="formData" :rules="formRules"
|
||||||
:label-col="{ style: { width: '80px' } }">
|
:label-col="{ style: { width: '80px' } }">
|
||||||
<a-form-item label="打款结果" name="checked">
|
<a-form-item label="打款结果" name="checked">
|
||||||
<a-radio-group v-model:value="formData.checked" name="radioGroup">
|
<a-radio-group v-model:value="formData.checked" name="radioGroup">
|
||||||
<a-radio :value="true">打款成功</a-radio>
|
<a-radio :value="true">成功</a-radio>
|
||||||
<a-radio :value="false">打款失败</a-radio>
|
<a-radio :value="false">失败</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="原因" name="reason">
|
<a-form-item label="原因" name="reason">
|
||||||
<a-textarea v-model:value="formData.reason" placeholder="请输入原因" auto-size />
|
<a-textarea v-model:value="formData.reason" placeholder="请输入原因" auto-size />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</a-card>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -48,8 +50,9 @@ function handleEdit(record = {}) {
|
|||||||
type: 'edit',
|
type: 'edit',
|
||||||
title: '提现确认',
|
title: '提现确认',
|
||||||
})
|
})
|
||||||
formRecord.valu.id = record.withdrawalOrderId
|
console.log(1111)
|
||||||
formData.value = cloneDeep(record)
|
formData.value.checked=true
|
||||||
|
formData.value.withdrawalOrderId = record.withdrawalOrderId
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,13 +75,13 @@ function handleOk() {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'edit':
|
case 'edit':
|
||||||
result = await apis.review.pendingUpload(formRecord.value.id, params).catch(() => {
|
result = await apis.review.pendingUpload(params).catch(() => {
|
||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (200 === result?.code) {
|
if (result?.success) {
|
||||||
hideModal()
|
hideModal()
|
||||||
emit('ok')
|
emit('ok')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col class="align-right" v-bind="colSpan">
|
<a-col class="align-left" v-bind="colSpan">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -34,9 +34,9 @@
|
|||||||
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
:size="size" row-key="id" @change="onTableChange">
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.dataIndex">
|
||||||
<x-action-button @click="handleReview(record)">提现确认</x-action-button>
|
<!-- <x-action-button @click="handleReview(record)">提现确认</x-action-button> -->
|
||||||
<!-- <x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button> -->
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">提现确认</x-action-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -62,8 +62,9 @@ const columns = [
|
|||||||
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
||||||
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
||||||
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
|
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
|
||||||
{title:"后台确认时间",dataIndex:'backendConfirmationTime'},
|
{title:"申请时间",dataIndex:'withdrawalTime'},
|
||||||
{title:"操作",dataIndex:'action'}
|
{title:"审核时间",dataIndex:'backendConfirmationTime'},
|
||||||
|
{title:"操作",dataIndex:'action',align:'center'}
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -79,7 +80,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.review
|
const { success, data,total } = await apis.review
|
||||||
.getPendingList({
|
.getPendingList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -89,10 +90,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total = total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col class="align-right" v-bind="colSpan">
|
<a-col class="align-left" v-bind="colSpan">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -62,7 +62,8 @@ const columns = [
|
|||||||
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
||||||
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
||||||
{ title: '拒绝原因', dataIndex: 'reason' },
|
{ title: '拒绝原因', dataIndex: 'reason' },
|
||||||
{ title: '银行卡信息', dataIndex: 'bankCardInfo' }
|
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
|
||||||
|
{title:'申请时间',dataIndex:'withdrawalTime'}
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
@ -78,7 +79,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.review
|
const { success,total, data } = await apis.review
|
||||||
.getFaildList({
|
.getFaildList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -88,10 +89,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total =total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
<a-input v-model:value="searchFormData.withdrawalOrderId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col class="align-right" v-bind="colSpan">
|
<a-col class="align-left" v-bind="colSpan">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button ghost type="primary" @click="handleSearch">
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
@ -62,7 +62,7 @@ const columns = [
|
|||||||
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
|
||||||
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
|
||||||
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
|
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
|
||||||
{title:"后台确认时间",dataIndex:'backendConfirmationTime'},
|
{title:"申请时间",dataIndex:'withdrawalTime'},
|
||||||
{title:"退款完成时间",dataIndex:'finishedTime'},
|
{title:"退款完成时间",dataIndex:'finishedTime'},
|
||||||
]
|
]
|
||||||
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
@ -79,7 +79,7 @@ async function getPageList() {
|
|||||||
try {
|
try {
|
||||||
showLoading()
|
showLoading()
|
||||||
const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
const { code, data } = await apis.review
|
const { success,total, data } = await apis.review
|
||||||
.getInvoicingFailedList({
|
.getInvoicingFailedList({
|
||||||
pageSize,
|
pageSize,
|
||||||
current: current,
|
current: current,
|
||||||
@ -89,10 +89,9 @@ async function getPageList() {
|
|||||||
throw new Error()
|
throw new Error()
|
||||||
})
|
})
|
||||||
hideLoading()
|
hideLoading()
|
||||||
if (config('http.code.success') === code) {
|
if (success) {
|
||||||
const { records, pagination } = data
|
listData.value = data
|
||||||
listData.value = records
|
paginationState.total =total
|
||||||
paginationState.total = pagination.total
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user