Merge branch 'master' of http://124.223.211.244:8418/zianxin/biz-pc-cloud
This commit is contained in:
commit
92c5680ed7
10 files changed
+312
-261
No files matched your search
@@ -1,23 +0,0 @@
|
||||
# port 端口号
|
||||
VITE_PORT = 8888
|
||||
|
||||
#浏览器自动打开
|
||||
VITE_OPEN = true
|
||||
|
||||
# 本地环境
|
||||
ENV = 'development'
|
||||
|
||||
# ADMIN 服务地址
|
||||
VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上
|
||||
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
|
||||
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
|
||||
# VITE_ADMIN_PROXY_PATH = http://192.168.101.29:9999/ # 邓-本地
|
||||
|
||||
# 图片访问基础地址
|
||||
VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
|
||||
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
|
||||
# VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||
# VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
|
||||
|
||||
# 代码生成服务地址
|
||||
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
|
||||
@@ -1,39 +0,0 @@
|
||||
module.exports = {
|
||||
// 一行最多多少个字符
|
||||
printWidth: 150,
|
||||
// 指定每个缩进级别的空格数
|
||||
tabWidth: 2,
|
||||
// 使用制表符而不是空格缩进行
|
||||
useTabs: true,
|
||||
// 在语句末尾打印分号
|
||||
semi: true,
|
||||
// 使用单引号而不是双引号
|
||||
singleQuote: true,
|
||||
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
||||
quoteProps: 'as-needed',
|
||||
// 在JSX中使用单引号而不是双引号
|
||||
jsxSingleQuote: false,
|
||||
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
||||
trailingComma: 'es5',
|
||||
// 在对象文字中的括号之间打印空格
|
||||
bracketSpacing: true,
|
||||
// jsx 标签的反尖括号需要换行
|
||||
jsxBracketSameLine: false,
|
||||
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
||||
arrowParens: 'always',
|
||||
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
||||
rangeStart: 0,
|
||||
rangeEnd: Infinity,
|
||||
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
||||
requirePragma: false,
|
||||
// 不需要自动在文件开头插入 @prettier
|
||||
insertPragma: false,
|
||||
// 使用默认的折行标准 always\never\preserve
|
||||
proseWrap: 'preserve',
|
||||
// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
||||
htmlWhitespaceSensitivity: 'css',
|
||||
// Vue文件脚本和样式标签缩进
|
||||
vueIndentScriptAndStyle: false,
|
||||
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
||||
endOfLine: 'lf',
|
||||
};
|
||||
@@ -8,6 +8,14 @@ export function apply(query?: Object) {
|
||||
})
|
||||
}
|
||||
|
||||
export function comparePageJoin(obj?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-recharge-apply/compare-page-join",
|
||||
method: "get",
|
||||
params: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageJoin(query?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-recharge-apply/page-join",
|
||||
|
||||
@@ -1,81 +1,80 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function pageCz(obj?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/page-cz',
|
||||
method: 'get',
|
||||
params: obj
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-cz",
|
||||
method: "get",
|
||||
params: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageXf(obj?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/page-xf',
|
||||
method: 'get',
|
||||
params: obj
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-xf",
|
||||
method: "get",
|
||||
params: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageTk(obj?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/page-tk',
|
||||
method: 'get',
|
||||
params: obj
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-tk",
|
||||
method: "get",
|
||||
params: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function updateBalance(obj?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/update-balance',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/update-balance",
|
||||
method: "put",
|
||||
data: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page",
|
||||
method: "get",
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageJoin(query?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/page-join',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-join",
|
||||
method: "get",
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction",
|
||||
method: "post",
|
||||
data: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/" + id,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction",
|
||||
method: "delete",
|
||||
data: ids,
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/wallet/wallet-transaction',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction",
|
||||
method: "put",
|
||||
data: obj,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ const dataRules = ref({
|
||||
packageNum: [{ required: true, message: '内装数量不能为空', trigger: 'blur' }],
|
||||
// purchasePrice: [{ required: true, message: '进价不能为空', trigger: 'blur' }],
|
||||
retailPrice: [{ required: true, message: '零售价不能为空', trigger: 'blur' }],
|
||||
promotionPrice: [{ required: true, message: '促销价不能为空', trigger: 'blur' }],
|
||||
// promotionPrice: [{ required: true, message: '促销价不能为空', trigger: 'blur' }],
|
||||
});
|
||||
|
||||
// 打开弹窗
|
||||
|
||||
@@ -75,12 +75,10 @@
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
|
||||
<el-button icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<el-button icon="Promotion" text type="primary" v-auth="'admin_walletStride_del'" @click="doInfo(row)">
|
||||
查看审批
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="delete"
|
||||
|
||||
@@ -1,89 +1,125 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="申请人" prop="userIds">
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="饭卡卡号" prop="cardNumber">
|
||||
<el-input v-model="state.queryForm.cardNumber" placeholder="饭卡卡号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="申请人" prop="userIds">
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="饭卡卡号" prop="cardNumber">
|
||||
<el-input v-model="state.queryForm.cardNumber" placeholder="饭卡卡号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button
|
||||
icon="folder-add"
|
||||
type="primary"
|
||||
class="ml10"
|
||||
@click="formDialogRef.openDialog()"
|
||||
v-auth="'wallet_walletFreeze_add'"
|
||||
>
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'wallet_walletFreeze_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_walletFreeze_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="deptName" label="部门" />
|
||||
<el-table-column prop="freeStatus" label="是否冻结">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="yes_no_type" :value="row.freeStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="processStatus" label="审核状态">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="check_status" :value="row.processStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.processStatus != 1" icon="Promotion" text type="primary" @click="doInfo(row)">
|
||||
查看审批
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletFreeze_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletFreeze_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'wallet_walletFreeze_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'wallet_walletFreeze_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'wallet_walletFreeze_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right;"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="deptName" label="部门" />
|
||||
<el-table-column prop="freeStatus" label="是否冻结">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="yes_no_type" :value="row.freeStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="processStatus" label="审核状态">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="check_status" :value="row.processStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_walletFreeze_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletFreeze_del'"
|
||||
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
</div>
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemWalletFreeze">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { getObj, addObj, putObj, fetchList, pageJoin } from '/@/api/wallet/wallet-freeze'
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { getObj, addObj, putObj, fetchList, pageJoin } from "/@/api/wallet/wallet-freeze"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
const { push } = useRouter()
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
const { check_status, yes_no_type } = useDict('check_status', 'yes_no_type');
|
||||
const { check_status, yes_no_type } = useDict("check_status", "yes_no_type")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -94,54 +130,52 @@ const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: pageJoin
|
||||
queryForm: {},
|
||||
pageList: pageJoin,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const {
|
||||
getDataList,
|
||||
currentChangeHandle,
|
||||
sizeChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
tableStyle
|
||||
} = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
||||
useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
|
||||
const doInfo = (row: any) => {
|
||||
push({ path: "/flow/task/started", query: { id: row.id } })
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/wallet/walletFreeze/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletFreeze.xlsx')
|
||||
downBlobFile("/wallet/walletFreeze/export", Object.assign(state.queryForm, { ids: selectObjs }), "walletFreeze.xlsx")
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm('此操作将永久删除');
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await useMessageBox().confirm("此操作将永久删除")
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await delObjs(ids);
|
||||
getDataList();
|
||||
useMessage().success('删除成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
try {
|
||||
await delObjs(ids)
|
||||
getDataList()
|
||||
useMessage().success("删除成功")
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -95,8 +95,8 @@
|
||||
@click="doInfo(row)"
|
||||
>数据</el-button
|
||||
>
|
||||
<!-- v-if="!row.processId" -->
|
||||
<el-button
|
||||
v-if="!row.processId"
|
||||
icon="Connection"
|
||||
text
|
||||
type="primary"
|
||||
@@ -105,6 +105,7 @@
|
||||
>申请</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="!row.processId"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
@@ -113,6 +114,7 @@
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
|
||||
@@ -1,46 +1,120 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<right-toolbar class="ml10 mr20" style="float: right;" :search="false" @queryTable="getDataList" />
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @sort-change="sortChangeHandle">
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="username" label="用户" show-overflow-tooltip />
|
||||
<el-table-column prop="userAvatar" label="头像" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.userAvatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" show-overflow-tooltip />
|
||||
<el-table-column prop="username" label="操作金额" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<right-toolbar class="ml10 mr20" style="float: right" :search="false" @queryTable="getDataList" />
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="data.list" v-loading="state.loading" border :header-cell-style="tableStyle.headerCellStyle">
|
||||
<el-table-column type="index" label="#" align="center" width="40" />
|
||||
<el-table-column prop="username" label="用户" align="center" />
|
||||
<el-table-column prop="userAvatar" label="头像" align="center">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.userAvatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" label="手机号" align="center" />
|
||||
<el-table-column prop="username" label="操作金额" align="center">
|
||||
<template #default="{ row }">
|
||||
<div class="color-success">{{ displayPrice(row.currentImport_price) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot v-if="data.tableList && data.tableList.length">
|
||||
<el-table-column v-for="(v, i) in data.tableList" :key="i" align="center">
|
||||
<template #header>
|
||||
<div>
|
||||
{{ data.tableListStr[i] }}
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row }">
|
||||
<div class="change">
|
||||
<div v-if="row[`${v}_price`] >= 0" class="change_price">{{ displayPrice(row[`${v}_price`]) }}</div>
|
||||
<div v-else class="change_price">{{ displayPrice(row[`${v}_price`]) }}</div>
|
||||
<div class="change_text">
|
||||
<div v-if="row[`${v}_transaction_price`]">
|
||||
<span>对比上月</span>
|
||||
<span :class="[row[`${v}_transaction_price`] >= 0 ? 'success' : 'error']" style="margin-left: 5px">
|
||||
{{ displayPrice(row[`${v}_transaction_price`]) }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="row[`${v}_transaction_percent`]">
|
||||
<span>对比上月</span>
|
||||
<span :class="[row[`${v}_transaction_price`] >= 0 ? 'success' : 'error']" style="margin-left: 5px">
|
||||
{{ row[`${v}_transaction_percent`] }}%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</slot>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="preview-excel">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
import * as walletRechargeApplyApi from "/@/api/wallet/wallet-recharge-apply";
|
||||
import * as walletRechargeApplyApi from "/@/api/wallet/wallet-recharge-apply"
|
||||
|
||||
const { query } = useRoute()
|
||||
|
||||
// 定义变量内容
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: walletRechargeApplyApi.pageJoin
|
||||
onMounted(async () => {
|
||||
const id = query.id as unknown as any
|
||||
state.queryForm.id = id
|
||||
getList()
|
||||
})
|
||||
|
||||
const state = reactive<any>({
|
||||
createdIsNeed: false,
|
||||
queryForm: {},
|
||||
pagination: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
},
|
||||
pageList: walletRechargeApplyApi.comparePageJoin,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
const { tableStyle } = useTable(state)
|
||||
|
||||
const data = reactive<any>({
|
||||
list: [],
|
||||
total: 0,
|
||||
tableList: [],
|
||||
tableListStr: [],
|
||||
})
|
||||
|
||||
const sizeChangeHandle = (e: any) => {
|
||||
state.pagination.size = e
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
const currentChangeHandle = (e: any) => {
|
||||
state.pagination.current = e
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
state.loading = true
|
||||
try {
|
||||
const { data: pageData } = await walletRechargeApplyApi.comparePageJoin(state.queryForm)
|
||||
data.list = pageData.page.records
|
||||
data.total = pageData.page.total
|
||||
data.tableList = pageData.tableList
|
||||
data.tableListStr = pageData.tableListStr
|
||||
state.pagination.total = pageData.page.total
|
||||
} finally {
|
||||
state.loading = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -86,12 +86,10 @@
|
||||
@click="handleDelete([row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
|
||||
<el-button icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<el-button icon="Promotion" text type="primary" v-auth="'admin_walletStride_del'" @click="doInfo(row)">
|
||||
查看审批
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
Reference in new issue
Block a user