From 320113441dc3771c7d49d861cdc8ed73d2dfa52b Mon Sep 17 00:00:00 2001
From: Leo_Ding <2405260743@qq.com>
Date: Wed, 28 Jan 2026 18:32:56 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.dev | 2 +-
config/useServer.js | 2 +-
src/apis/modules/contract.js | 2 +-
src/apis/modules/images.js | 2 +-
src/apis/modules/review.js | 2 +-
src/apis/modules/vouchers.js | 2 +-
src/enums/dict.js | 33 ++++++++++
src/views/balance/components/EditDialog.vue | 10 ++-
src/views/balance/index.vue | 21 +++----
.../pointsList/components/EditDialog.vue | 6 +-
.../computingPoints/pointsList/index.vue | 21 +++----
.../ticketList/components/EditDialog.vue | 18 +++---
.../computingTicket/ticketList/index.vue | 21 +++----
.../components/EditDialog.vue | 50 +++++++--------
.../contract/contractPendingList/index.vue | 31 +++++----
.../contract/rejectContractList/index.vue | 9 ++-
src/views/contract/sealedtrueList/index.vue | 26 +++++---
.../signatureList/components/EditDialog.vue | 45 +++++++------
src/views/contract/signatureList/index.vue | 18 +++---
.../img/imgList/components/EditDialog.vue | 63 +++++++++++--------
src/views/img/imgList/index.vue | 43 +++++++------
src/views/order/orderList/index.vue | 24 +++----
.../components/EditDialog.vue | 29 +++++----
.../withdrawal/pendingReviewList/index.vue | 21 ++++---
.../withdrawal/withdrawErrorList/index.vue | 17 +++--
.../withdrawList/components/EditDialog.vue | 35 ++++++-----
src/views/withdrawal/withdrawList/index.vue | 22 +++----
.../withdrawal/withdrawRejectList/index.vue | 14 ++---
.../withdrawal/withdrawSuccessList/index.vue | 13 ++--
29 files changed, 323 insertions(+), 279 deletions(-)
diff --git a/.env.dev b/.env.dev
index c832c8c..ca8a5d2 100644
--- a/.env.dev
+++ b/.env.dev
@@ -12,7 +12,7 @@ VITE_ROUTER_BASE=/
VITE_ROUTER_HISTORY=hash
# api
-VITE_API_BASIC=http://10.10.1.21:8040
+VITE_API_BASIC=http://10.10.1.22:8040
VITE_API_HTTP=/api/v1/
# storage
VITE_STORAGE_NAMESPACE = gin-admin_local_
\ No newline at end of file
diff --git a/config/useServer.js b/config/useServer.js
index cf0d325..8896964 100644
--- a/config/useServer.js
+++ b/config/useServer.js
@@ -3,7 +3,7 @@ export default () => ({
port: 8080,
proxy: {
'/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',
changeOrigin: true,
rewrite: (path) => path.replace('/api', ''),
diff --git a/src/apis/modules/contract.js b/src/apis/modules/contract.js
index faee93e..ceb61f7 100644
--- a/src/apis/modules/contract.js
+++ b/src/apis/modules/contract.js
@@ -5,7 +5,7 @@ import request from '@/utils/request'
// 获取待审核列表
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)
// 审核失败列表
diff --git a/src/apis/modules/images.js b/src/apis/modules/images.js
index 49a764d..e955f45 100644
--- a/src/apis/modules/images.js
+++ b/src/apis/modules/images.js
@@ -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 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)
// 获取详情
diff --git a/src/apis/modules/review.js b/src/apis/modules/review.js
index f085468..78f043c 100644
--- a/src/apis/modules/review.js
+++ b/src/apis/modules/review.js
@@ -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 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)
diff --git a/src/apis/modules/vouchers.js b/src/apis/modules/vouchers.js
index 35ba7f3..939f0c5 100644
--- a/src/apis/modules/vouchers.js
+++ b/src/apis/modules/vouchers.js
@@ -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 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)
diff --git a/src/enums/dict.js b/src/enums/dict.js
index 22d0e86..c0da555 100644
--- a/src/enums/dict.js
+++ b/src/enums/dict.js
@@ -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
//获取下拉框列表:payTypeDict.options
//获取label:payTypeDict.getLabel(1)
@@ -79,3 +109,6 @@ export const payStatusDict = new PayStatusDict()
export const authenticationDict = new AuthenticationDict()
export const authenticationTypeDict = new AuthenticationTypeDict()
export const disabledDict = new DisabledDict()
+export const imgType =new ImgType()
+export const payType=new PayType()
+export const ticketStatus=new TicketStatus()
diff --git a/src/views/balance/components/EditDialog.vue b/src/views/balance/components/EditDialog.vue
index e738037..f0435d8 100644
--- a/src/views/balance/components/EditDialog.vue
+++ b/src/views/balance/components/EditDialog.vue
@@ -6,9 +6,7 @@
-
-
-
+
@@ -47,7 +45,6 @@ function handleEdit(record = {}) {
type: 'edit',
title: '添加余额',
})
- formRecord.value.userId = record.userId
formData.value = cloneDeep(record)
}
@@ -61,7 +58,8 @@ function handleOk() {
try {
showLoading()
const params = {
- ...formData.value,
+ balanceId:formData.value.id,
+ amount:formData.value.amount,
}
let result = null
switch (modal.value.type) {
@@ -77,7 +75,7 @@ function handleOk() {
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/balance/index.vue b/src/views/balance/index.vue
index 53d071c..588e4b0 100644
--- a/src/views/balance/index.vue
+++ b/src/views/balance/index.vue
@@ -30,7 +30,7 @@
-
+
添加余额
@@ -53,14 +53,14 @@ defineOptions({
})
const columns = [
- { title: '用户名', dataIndex: 'username' },
+ { title: '用户名', dataIndex: 'userName' },
{ title: '手机号', dataIndex: 'phone' },
- { title: '变更前', dataIndex: 'balanceBeforeChange' },
- { title: '变更后', dataIndex: 'remainingBalance' },
- { title: '变更量', dataIndex: 'changeValue' },
+ { title: '变更前', dataIndex: 'balanceBeforeChange',customRender: ({ text }) => '¥'+text },
+ { title: '变更后', dataIndex: 'remainingBalance',customRender: ({ text }) => '¥'+text },
+ { title: '变更量', dataIndex: 'changeAmount',customRender: ({ text }) => '¥'+text },
{ title: '变更时间', dataIndex: 'lastChangeTime' },
{ title: '变更类型', dataIndex: 'changeType' },
- { title: '操作', dataIndex: 'action' },
+ { title: '操作', dataIndex: 'action',align:'center' },
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
const editDialogRef = ref()
@@ -76,7 +76,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.vouchers
+ const { success, data,total } = await apis.vouchers
.getBalanceList({
pageSize,
current: current,
@@ -86,10 +86,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/computingPoints/pointsList/components/EditDialog.vue b/src/views/computingPoints/pointsList/components/EditDialog.vue
index 3a18104..acae26e 100644
--- a/src/views/computingPoints/pointsList/components/EditDialog.vue
+++ b/src/views/computingPoints/pointsList/components/EditDialog.vue
@@ -43,7 +43,6 @@ function handleEdit(record = {}) {
type: 'edit',
title: '新增算力点',
})
- formRecord.value.userId = record.userId
formData.value = cloneDeep(record)
}
@@ -57,7 +56,8 @@ function handleOk() {
try {
showLoading()
const params = {
- ...formData.value,
+ point:formData.value.point,
+ id:formData.value.id
}
let result = null
switch (modal.value.type) {
@@ -73,7 +73,7 @@ function handleOk() {
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/computingPoints/pointsList/index.vue b/src/views/computingPoints/pointsList/index.vue
index b4514fb..4df0530 100644
--- a/src/views/computingPoints/pointsList/index.vue
+++ b/src/views/computingPoints/pointsList/index.vue
@@ -30,9 +30,9 @@
-
+
新增
- 删除
+
@@ -53,14 +53,14 @@ defineOptions({
})
const columns = [
- { title: '用户名', dataIndex: 'username' },
+ { title: '用户名', dataIndex: 'userName' },
{ title: '手机号', dataIndex: 'phone' },
{ title: '变更前', dataIndex: 'pointsBeforeChange' },
{ title: '变更后', dataIndex: 'remainingPoints' },
{ title: '变更量', dataIndex: 'changeValue' },
{ title: '变更时间', dataIndex: 'lastChangeTime' },
{ title: '变更类型', dataIndex: 'changeType' },
- { title: '操作', dataIndex: 'action' },
+ { title: '操作', dataIndex: 'action',align:'center' },
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
const editDialogRef = ref()
@@ -76,7 +76,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.vouchers
+ const { success,total, data } = await apis.vouchers
.getPointList({
pageSize,
current: current,
@@ -86,10 +86,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total =total
}
} catch (error) {
hideLoading()
@@ -115,10 +114,10 @@ function handleDelete({ id }) {
return new Promise((resolve, reject) => {
; (async () => {
try {
- const { code } = await apis.vouchers.deleteVouchers(id).catch(() => {
+ const { success } = await apis.vouchers.deleteVouchers(id).catch(() => {
throw new Error()
})
- if (config('http.code.success') === code) {
+ if (success) {
resolve()
message.success('删除成功')
await getPageList()
diff --git a/src/views/computingTicket/ticketList/components/EditDialog.vue b/src/views/computingTicket/ticketList/components/EditDialog.vue
index a4e08b0..eead783 100644
--- a/src/views/computingTicket/ticketList/components/EditDialog.vue
+++ b/src/views/computingTicket/ticketList/components/EditDialog.vue
@@ -13,10 +13,10 @@
-
+
-
+
@@ -26,8 +26,7 @@
- 启用
- 停用
+ {{ item.label }}
@@ -39,7 +38,8 @@
import { cloneDeep } from 'lodash-es'
import apis from '@/apis'
import { useForm, useModal } from '@/hooks'
-
+import {ticketStatus} from '@/enums/dict'
+import dayjs from 'dayjs'
const emit = defineEmits(['ok'])
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
@@ -60,7 +60,7 @@ formRules.value = {
* 新建
*/
function handleCreate() {
- formData.value.status = '1'
+ formData.value.status = 'ENABLED'
showModal({
type: 'create',
title: '新建',
@@ -77,6 +77,8 @@ function handleEdit(record = {}) {
})
formRecord.value = record
formData.value = cloneDeep(record)
+ formData.value.effectiveTime=dayjs(record.effectiveTime)
+ formData.value.expiryTime=dayjs(record.expiryTime)
}
/**
@@ -90,6 +92,8 @@ function handleOk() {
showLoading()
const params = {
...formData.value,
+ effectiveTime:dayjs(formData.value.effectiveTime).format('YYYY-MM-DD'),
+ expiryTime:dayjs(formData.value.expiryTime).format('YYYY-MM-DD')
}
let result = null
switch (modal.value.type) {
@@ -105,7 +109,7 @@ function handleOk() {
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/computingTicket/ticketList/index.vue b/src/views/computingTicket/ticketList/index.vue
index 9e55f9c..9415ff5 100644
--- a/src/views/computingTicket/ticketList/index.vue
+++ b/src/views/computingTicket/ticketList/index.vue
@@ -35,7 +35,7 @@
-
+
编辑
删除
@@ -52,20 +52,20 @@ import apis from '@/apis'
import { config } from '@/config'
import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
-
+import {ticketStatus} from '@/enums/dict'
defineOptions({
name: 'listTable',
})
const columns = [
- { title: '用户名', dataIndex: 'username' },
+ { title: '用户名', dataIndex: 'userName' },
{ title: '手机号', dataIndex: 'phone' },
{ title: '算力券名称', dataIndex: 'couponName' },
{ title: '券面点数', dataIndex: 'faceValue' },
{ title: '可用点数', dataIndex: 'availablePoints' },
{ title: '生效时间', dataIndex: 'effectiveTime' },
{ title: '失效时间', dataIndex: 'expiryTime' },
- { title: '状态', dataIndex: 'status' },
+ { title: '状态', dataIndex: 'status',customRender: ({ text }) => ticketStatus.getLabel(text)},
{ title: '操作', dataIndex: 'action' },
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
@@ -82,7 +82,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.vouchers
+ const { success,total, data } = await apis.vouchers
.getPageList({
pageSize,
current: current,
@@ -92,10 +92,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
@@ -121,10 +120,10 @@ function handleDelete({ id }) {
return new Promise((resolve, reject) => {
; (async () => {
try {
- const { code } = await apis.vouchers.deleteVouchers(id).catch(() => {
+ const { success } = await apis.vouchers.deleteVouchers(id).catch(() => {
throw new Error()
})
- if (config('http.code.success') === code) {
+ if (success) {
resolve()
message.success('删除成功')
await getPageList()
diff --git a/src/views/contract/contractPendingList/components/EditDialog.vue b/src/views/contract/contractPendingList/components/EditDialog.vue
index 51f7a3a..33eba55 100644
--- a/src/views/contract/contractPendingList/components/EditDialog.vue
+++ b/src/views/contract/contractPendingList/components/EditDialog.vue
@@ -1,23 +1,19 @@
-
-
-
-
-
-
+
+
+
+
+
+ 通过
+ 拒绝
+
+
+
+
+
+
+
@@ -32,7 +28,7 @@ const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRef, formRules, formRecord, formData, resetForm } = useForm()
formRules.value = {
- title: { required: true, message: '请输入标题' },
+
}
/**
@@ -51,10 +47,10 @@ function handleCreate() {
function handleEdit(record = {}) {
showModal({
type: 'edit',
- title: '编辑',
+ title: '审核',
})
- formRecord.value = record
- formData.value = cloneDeep(record)
+ formData.value.checked = true
+ formData.value.contractId = record.id
}
/**
@@ -64,10 +60,11 @@ function handleOk() {
formRef.value
.validateFields()
.then(async (values) => {
+ console.log(values)
try {
showLoading()
const params = {
- ...values,
+ ...formData.value,
}
let result = null
switch (modal.value.type) {
@@ -77,17 +74,18 @@ function handleOk() {
})
break
case 'edit':
- result = await apis.common.update(formRecord.value.id, params).catch(() => {
+ result = await apis.contract.review(params).catch(() => {
throw new Error()
})
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result?.success) {
hideModal()
emit('ok')
}
} catch (error) {
+ console.log(error)
hideLoading()
}
})
diff --git a/src/views/contract/contractPendingList/index.vue b/src/views/contract/contractPendingList/index.vue
index ec22949..772e319 100644
--- a/src/views/contract/contractPendingList/index.vue
+++ b/src/views/contract/contractPendingList/index.vue
@@ -18,7 +18,7 @@
-
+
{{ $t('button.reset') }}
@@ -34,9 +34,9 @@
-
- 审核
- 详情
+
+ 审核
+
@@ -53,19 +53,17 @@ import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
defineOptions({
- name: 'listTable',
+ name: 'contract',
})
const columns = [
{ title: '用户名', dataIndex: 'username' },
{ title: '手机号', dataIndex: 'phone' },
- { title: '发票金额', dataIndex: 'invoiceAmount' },
- { title: '发票类型', dataIndex: 'invoiceType' },
- { title: '状态', dataIndex: 'status' },
- { title: '发票编号', dataIndex: 'invoiceNumber' },
- { title: '开票日期', dataIndex: 'issueDate' },
- { title: '开票方式', dataIndex: 'issueMethod' },
- { title: '备注', dataIndex: 'remarks' },
+ { title: '合同编号', dataIndex: 'contractId' },
+ { title: '合同名称', dataIndex: 'contractName' },
+ { title: '合同类型', dataIndex: 'contractType' },
+ { title: '合同内容', dataIndex: 'contractContent' },
+ { title: '操作', dataIndex: 'action',width:120,align:'center' },
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
const editDialogRef = ref()
@@ -81,7 +79,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.contract
+ const { success,total, data } = await apis.contract
.getPageList({
pageSize,
current: current,
@@ -91,10 +89,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/contract/rejectContractList/index.vue b/src/views/contract/rejectContractList/index.vue
index d83148b..7e16b36 100644
--- a/src/views/contract/rejectContractList/index.vue
+++ b/src/views/contract/rejectContractList/index.vue
@@ -77,7 +77,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.contract
+ const { success,total, data } = await apis.contract
.getFaildList({
pageSize,
current: current,
@@ -87,10 +87,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/contract/sealedtrueList/index.vue b/src/views/contract/sealedtrueList/index.vue
index 20a4f35..04b9e07 100644
--- a/src/views/contract/sealedtrueList/index.vue
+++ b/src/views/contract/sealedtrueList/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -34,6 +34,9 @@
+
+
+
上传合同
@@ -50,7 +53,6 @@ import apis from '@/apis'
import { config } from '@/config'
import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
-
defineOptions({
name: 'listTable',
})
@@ -61,9 +63,14 @@ const columns = [
{ title: '合同编号', dataIndex: 'contractId' },
{ title: '合同名称', dataIndex: 'contractName' },
{ 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 searchBarExpand = ref(false)
const size = ref('default')
@@ -77,8 +84,8 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.invoice
- .getPendingList({
+ const { success, total, data } = await apis.contract
+ .getinvoiceSuccessList({
pageSize,
current: current,
...searchFormData.value
@@ -87,10 +94,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/contract/signatureList/components/EditDialog.vue b/src/views/contract/signatureList/components/EditDialog.vue
index 51f7a3a..8941c46 100644
--- a/src/views/contract/signatureList/components/EditDialog.vue
+++ b/src/views/contract/signatureList/components/EditDialog.vue
@@ -1,23 +1,14 @@
-
-
+
+
-
-
+
+
+
@@ -25,7 +16,8 @@
import { cloneDeep } from 'lodash-es'
import apis from '@/apis'
import { useForm, useModal } from '@/hooks'
-
+import GxUpload from '@/components/GxUpload/index.vue'
+import {spliceUrl} from '@/utils/util.js'
const emit = defineEmits(['ok'])
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
@@ -51,10 +43,10 @@ function handleCreate() {
function handleEdit(record = {}) {
showModal({
type: 'edit',
- title: '编辑',
+ title: '上传签章合同',
})
- formRecord.value = record
- formData.value = cloneDeep(record)
+
+ formData.value.id = record.id
}
/**
@@ -64,10 +56,16 @@ function handleOk() {
formRef.value
.validateFields()
.then(async (values) => {
+ console.log(formData.value.fileList)
+ if(formData.value.fileList===undefined||formData.value.fileList.length==0){
+ return message.error('请上传签章图片')
+ }
try {
showLoading()
+ console.log(spliceUrl(formData.value.fileList[0]))
const params = {
- ...values,
+ id:formData.value.id,
+ url:spliceUrl(formData.value.fileList[0])
}
let result = null
switch (modal.value.type) {
@@ -77,17 +75,18 @@ function handleOk() {
})
break
case 'edit':
- result = await apis.common.update(formRecord.value.id, params).catch(() => {
+ result = await apis.contract.pendingUpload(params).catch(() => {
throw new Error()
})
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result?.success) {
hideModal()
emit('ok')
}
} catch (error) {
+ console.log(error)
hideLoading()
}
})
diff --git a/src/views/contract/signatureList/index.vue b/src/views/contract/signatureList/index.vue
index a10d640..0d09870 100644
--- a/src/views/contract/signatureList/index.vue
+++ b/src/views/contract/signatureList/index.vue
@@ -34,8 +34,8 @@
-
- 上传合同
+
+ 上传签章
@@ -61,7 +61,8 @@ const columns = [
{ title: '合同编号', dataIndex: 'contractId' },
{ title: '合同名称', dataIndex: 'contractName' },
{ title: '合同类型', dataIndex: 'contractType' },
- { title: '合同内容', dataIndex: 'contractContent' }
+ { title: '合同内容', dataIndex: 'contractContent' },
+ {title:"操作",dataIndex:'action',width:100}
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
const editDialogRef = ref()
@@ -77,8 +78,8 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.contract
- .getinvoiceSuccessList({
+ const { success,total, data } = await apis.contract
+ .getPendingList({
pageSize,
current: current,
...searchFormData.value
@@ -87,10 +88,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/img/imgList/components/EditDialog.vue b/src/views/img/imgList/components/EditDialog.vue
index ce78f10..a5555a9 100644
--- a/src/views/img/imgList/components/EditDialog.vue
+++ b/src/views/img/imgList/components/EditDialog.vue
@@ -1,27 +1,33 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -29,7 +35,8 @@
import { cloneDeep } from 'lodash-es'
import apis from '@/apis'
import { useForm, useModal } from '@/hooks'
-
+import { number } from 'echarts'
+import {imgType} from '@/enums/dict'
const emit = defineEmits(['ok'])
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
@@ -63,7 +70,8 @@ function handleEdit(record = {}) {
type: 'edit',
title: '编辑',
})
- formRecord.value = record
+ console.log(record)
+ // formRecord.value.id = record.id
formData.value = cloneDeep(record)
}
@@ -77,7 +85,9 @@ function handleOk() {
try {
showLoading()
const params = {
- ...values,
+ ...formData.value,
+ imageSize: Number(formData.value.imageSize),
+ name:formData.value.imageName
}
let result = null
switch (modal.value.type) {
@@ -87,13 +97,14 @@ function handleOk() {
})
break
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()
})
break
}
+ console.log(result)
hideLoading()
- if (200 === result?.code) {
+ if (true === result?.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/img/imgList/index.vue b/src/views/img/imgList/index.vue
index e3bb4de..30e23b2 100644
--- a/src/views/img/imgList/index.vue
+++ b/src/views/img/imgList/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -13,7 +13,7 @@
-
+
@@ -31,14 +31,14 @@
- 新增
+
-
+
编辑
- 详情
- 删除
+
+ 删除
@@ -53,23 +53,23 @@ import apis from '@/apis'
import { config } from '@/config'
import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
-
+import {imgType} from '@/enums/dict'
defineOptions({
name: 'listTable',
})
const columns = [
- { title: '用户名', dataIndex: 'username' },
- { title: '手机号', dataIndex: 'phone' },
- { title: '镜像名称', dataIndex: 'imageName' },
- { title: '镜像类型', dataIndex: 'imageType' },
- { title: '描述', dataIndex: 'description' },
+ { title: '用户名', dataIndex: 'userName', width: 120 },
+ { title: '手机号', dataIndex: 'phone', width: 120 },
+ { title: '镜像名称', dataIndex: 'imageName'},
+ { title: '镜像类型', dataIndex: 'imageType', width: 120, customRender: ({ text }) => imgType.getLabel(text) || text, },
{ title: '镜像路径', dataIndex: 'imagePath' },
- { title: '镜像大小', dataIndex: 'imageSize' },
+ { title: '镜像大小', dataIndex: 'imageSize',customRender: ({ text }) => text },
{ 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 searchBarExpand = ref(false)
const size = ref('default')
@@ -83,7 +83,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.images
+ const { success, data, total } = await apis.images
.getPageList({
pageSize,
current: current,
@@ -93,10 +93,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
@@ -122,10 +121,10 @@ function handleDelete({ id }) {
return new Promise((resolve, reject) => {
; (async () => {
try {
- const { code } = await apis.vouchers.deleteVouchers(id).catch(() => {
+ const { success } = await apis.images.deleteVouchers(id).catch(() => {
throw new Error()
})
- if (config('http.code.success') === code) {
+ if (success) {
resolve()
message.success('删除成功')
await getPageList()
diff --git a/src/views/order/orderList/index.vue b/src/views/order/orderList/index.vue
index 34f514d..bdad324 100644
--- a/src/views/order/orderList/index.vue
+++ b/src/views/order/orderList/index.vue
@@ -34,12 +34,7 @@
-
-
- 新增
- 删除
-
-
+
@@ -52,22 +47,22 @@ import apis from '@/apis'
import { config } from '@/config'
import { usePagination } from '@/hooks'
import EditDialog from './components/EditDialog.vue'
-
+import {payType} from '@/enums/dict'
defineOptions({
name: 'listTable',
})
const columns = [
{title:'订单编号',dataIndex:'orderNumber'},
- { title: '用户名', dataIndex: 'username' },
+ { title: '用户名', dataIndex: 'userName' },
{ title: '手机号', dataIndex: 'phone' },
{ title: '实例名称', dataIndex: 'caseName' },
- { title: '计费方式', dataIndex: 'billingMethod' },
+ { title: '计费方式', dataIndex: 'billingMethod',customRender: ({ text }) => payType.getLabel(text) || text, },
{ title: '计费开始时间', dataIndex: 'billingStart' },
{ title: '计费结束时间', dataIndex: 'billingEnd' },
{ title: '计费时长', dataIndex: 'billingTime' },
{ title: '单价', dataIndex: 'price' },
- { title: '总费用', dataIndex: 'totalAmount' },
+ { title: '总费用/元', dataIndex: 'totalAmount',customRender: ({ text }) => '¥'+text, },
{ title: '算力券名称', dataIndex: 'voucherName' },
{ title: '支付状态', dataIndex: 'payStatus' },
]
@@ -85,7 +80,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.vouchers
+ const { success, data ,total} = await apis.vouchers
.getOrderList({
pageSize,
current: current,
@@ -95,10 +90,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/withdrawal/pendingReviewList/components/EditDialog.vue b/src/views/withdrawal/pendingReviewList/components/EditDialog.vue
index 811b40e..45d4504 100644
--- a/src/views/withdrawal/pendingReviewList/components/EditDialog.vue
+++ b/src/views/withdrawal/pendingReviewList/components/EditDialog.vue
@@ -1,12 +1,20 @@
-
-
-
-
-
+
+
+
+
+ 通过
+ 拒绝
+
+
+
+
+
+
+
@@ -42,10 +50,9 @@ function handleEdit(record = {}) {
type: 'edit',
title: '审核',
})
- formRecord.value.withdrawalOrderId = record.withdrawalOrderId
- formData.value = cloneDeep(record)
+ formData.value.checked=true
+ formData.value.withdrawalOrderId = record.withdrawalOrderId
}
-
/**
* 确定
*/
@@ -56,7 +63,7 @@ function handleOk() {
try {
showLoading()
const params = {
- ...values,
+ ...formData.value,
}
let result = null
switch (modal.value.type) {
@@ -72,7 +79,7 @@ function handleOk() {
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result?.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/withdrawal/pendingReviewList/index.vue b/src/views/withdrawal/pendingReviewList/index.vue
index 8b3a905..a23b28f 100644
--- a/src/views/withdrawal/pendingReviewList/index.vue
+++ b/src/views/withdrawal/pendingReviewList/index.vue
@@ -18,7 +18,7 @@
-
+
{{ $t('button.reset') }}
@@ -34,9 +34,9 @@
-
- 审核
-
+
+
+ 审核
@@ -61,7 +61,9 @@ const columns = [
{ title: '手机号', dataIndex: 'phone' },
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
{ 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 editDialogRef = ref()
@@ -77,7 +79,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.review
+ const { success,total, data } = await apis.review
.getPageList({
pageSize,
current: current,
@@ -87,10 +89,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total =total
}
} catch (error) {
hideLoading()
diff --git a/src/views/withdrawal/withdrawErrorList/index.vue b/src/views/withdrawal/withdrawErrorList/index.vue
index 5b7bf16..f3a6ed3 100644
--- a/src/views/withdrawal/withdrawErrorList/index.vue
+++ b/src/views/withdrawal/withdrawErrorList/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -18,7 +18,7 @@
-
+
{{ $t('button.reset') }}
@@ -56,9 +56,9 @@ const columns = [
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
- {title:"失败原因",dataIndex:'reason'},
+ { title: "失败原因", dataIndex: 'reason' },
]
-const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
+const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
const editDialogRef = ref()
const searchBarExpand = ref(false)
const size = ref('default')
@@ -72,7 +72,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.review
+ const { success, total, data } = await apis.review
.getPendingFaildList({
pageSize,
current: current,
@@ -82,10 +82,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/withdrawal/withdrawList/components/EditDialog.vue b/src/views/withdrawal/withdrawList/components/EditDialog.vue
index 714137b..f0914c5 100644
--- a/src/views/withdrawal/withdrawList/components/EditDialog.vue
+++ b/src/views/withdrawal/withdrawList/components/EditDialog.vue
@@ -1,18 +1,20 @@
-
-
-
- 打款成功
- 打款失败
-
-
-
-
-
-
+
+
+
+
+ 成功
+ 失败
+
+
+
+
+
+
+
@@ -48,8 +50,9 @@ function handleEdit(record = {}) {
type: 'edit',
title: '提现确认',
})
- formRecord.valu.id = record.withdrawalOrderId
- formData.value = cloneDeep(record)
+ console.log(1111)
+ formData.value.checked=true
+ formData.value.withdrawalOrderId = record.withdrawalOrderId
}
/**
@@ -72,13 +75,13 @@ function handleOk() {
})
break
case 'edit':
- result = await apis.review.pendingUpload(formRecord.value.id, params).catch(() => {
+ result = await apis.review.pendingUpload(params).catch(() => {
throw new Error()
})
break
}
hideLoading()
- if (200 === result?.code) {
+ if (result?.success) {
hideModal()
emit('ok')
}
diff --git a/src/views/withdrawal/withdrawList/index.vue b/src/views/withdrawal/withdrawList/index.vue
index 875d0e2..fb3d467 100644
--- a/src/views/withdrawal/withdrawList/index.vue
+++ b/src/views/withdrawal/withdrawList/index.vue
@@ -18,7 +18,7 @@
-
+
{{ $t('button.reset') }}
@@ -34,9 +34,9 @@
-
- 提现确认
-
+
+
+ 提现确认
@@ -62,8 +62,9 @@ const columns = [
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
- {title:"后台确认时间",dataIndex:'backendConfirmationTime'},
- {title:"操作",dataIndex:'action'}
+ {title:"申请时间",dataIndex:'withdrawalTime'},
+ {title:"审核时间",dataIndex:'backendConfirmationTime'},
+ {title:"操作",dataIndex:'action',align:'center'}
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
const editDialogRef = ref()
@@ -79,7 +80,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.review
+ const { success, data,total } = await apis.review
.getPendingList({
pageSize,
current: current,
@@ -89,10 +90,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total = total
}
} catch (error) {
hideLoading()
diff --git a/src/views/withdrawal/withdrawRejectList/index.vue b/src/views/withdrawal/withdrawRejectList/index.vue
index 79be5f6..3a0b8c7 100644
--- a/src/views/withdrawal/withdrawRejectList/index.vue
+++ b/src/views/withdrawal/withdrawRejectList/index.vue
@@ -18,7 +18,7 @@
-
+
{{ $t('button.reset') }}
@@ -62,7 +62,8 @@ const columns = [
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
{ title: '拒绝原因', dataIndex: 'reason' },
- { title: '银行卡信息', dataIndex: 'bankCardInfo' }
+ { title: '银行卡信息', dataIndex: 'bankCardInfo' },
+ {title:'申请时间',dataIndex:'withdrawalTime'}
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } = usePagination()
const editDialogRef = ref()
@@ -78,7 +79,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.review
+ const { success,total, data } = await apis.review
.getFaildList({
pageSize,
current: current,
@@ -88,10 +89,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total =total
}
} catch (error) {
hideLoading()
diff --git a/src/views/withdrawal/withdrawSuccessList/index.vue b/src/views/withdrawal/withdrawSuccessList/index.vue
index e29b0c3..063b379 100644
--- a/src/views/withdrawal/withdrawSuccessList/index.vue
+++ b/src/views/withdrawal/withdrawSuccessList/index.vue
@@ -18,7 +18,7 @@
-
+
{{ $t('button.reset') }}
@@ -62,7 +62,7 @@ const columns = [
{ title: '提现编号', dataIndex: 'withdrawalOrderId' },
{ title: '提现金额', dataIndex: 'withdrawalAmount' },
{ title: '银行卡信息', dataIndex: 'bankCardInfo' },
- {title:"后台确认时间",dataIndex:'backendConfirmationTime'},
+ {title:"申请时间",dataIndex:'withdrawalTime'},
{title:"退款完成时间",dataIndex:'finishedTime'},
]
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
@@ -79,7 +79,7 @@ async function getPageList() {
try {
showLoading()
const { pageSize, current } = paginationState
- const { code, data } = await apis.review
+ const { success,total, data } = await apis.review
.getInvoicingFailedList({
pageSize,
current: current,
@@ -89,10 +89,9 @@ async function getPageList() {
throw new Error()
})
hideLoading()
- if (config('http.code.success') === code) {
- const { records, pagination } = data
- listData.value = records
- paginationState.total = pagination.total
+ if (success) {
+ listData.value = data
+ paginationState.total =total
}
} catch (error) {
hideLoading()