feat:记录导出增加部门搜索

This commit is contained in:
dzc committed 2025-02-19 15:19:39 +08:00
1 parent 4941745f96
commit cbfd0531e5
9 files changed
+70 -43

No files matched your search

+17 -9
View File
@@ -1,25 +1,33 @@
import request from "/@/utils/request" import request from "/@/utils/request"
export function pageListDept(query?: Object) { export function pageListDept(query?: any) {
return request({ return request({
url: "/hard/hard-total/page-list-dept", url: "/hard/hard-total/page-list-dept",
method: "get", method: "post",
params: query, data: query,
}) })
} }
export function pageListSb(query?: Object) { export function pageListSb(query?: any) {
return request({ return request({
url: "/hard/hard-total/page-list-sb", url: "/hard/hard-total/page-list-sb",
method: "get", method: "post",
params: query, params: {
current: query.current,
size: query.size,
},
data: query,
}) })
} }
export function pageListCs(query?: Object) { export function pageListCs(query?: any) {
return request({ return request({
url: "/hard/hard-total/page-list-cs", url: "/hard/hard-total/page-list-cs",
method: "get", method: "post",
params: query, params: {
current: query.current,
size: query.size,
},
data: query,
}) })
} }
+21 -9
View File
@@ -1,26 +1,38 @@
import request from "/@/utils/request" import request from "/@/utils/request"
export function pageCz(obj?: Object) { export function pageCz(query?: any) {
return request({ return request({
url: "/wallet/wallet-transaction/page-cz", url: "/wallet/wallet-transaction/page-cz",
method: "get", method: "post",
params: obj, params: {
current: query.current,
size: query.size,
},
data: query,
}) })
} }
export function pageXf(obj?: Object) { export function pageXf(query?: any) {
return request({ return request({
url: "/wallet/wallet-transaction/page-xf", url: "/wallet/wallet-transaction/page-xf",
method: "get", method: "post",
params: obj, params: {
current: query.current,
size: query.size,
},
data: query,
}) })
} }
export function pageTk(obj?: Object) { export function pageTk(query?: any) {
return request({ return request({
url: "/wallet/wallet-transaction/page-tk", url: "/wallet/wallet-transaction/page-tk",
method: "get", method: "post",
params: obj, params: {
current: query.current,
size: query.size,
},
data: query,
}) })
} }
+5
View File
@@ -222,6 +222,10 @@ export function useTable(options?: BasicTableProps) {
return other.downBlobFile(url, query, fileName) return other.downBlobFile(url, query, fileName)
} }
const postDownBlobFile = (url: string, data: any, fileName: string) => {
return other.postDownBlobFile(url, data, fileName)
}
/** /**
* 定义表格通用样式 * 定义表格通用样式
* @returns css * @returns css
@@ -242,5 +246,6 @@ export function useTable(options?: BasicTableProps) {
currentChangeHandle, currentChangeHandle,
sortChangeHandle, sortChangeHandle,
downBlobFile, downBlobFile,
postDownBlobFile,
} }
} }
+19 -2
View File
@@ -40,8 +40,7 @@ export function setTagsViewNameI18n(item: any) {
if (pattern.test(query?.tagsViewName) || pattern.test(params?.tagsViewName)) { if (pattern.test(query?.tagsViewName) || pattern.test(params?.tagsViewName)) {
// 国际化 // 国际化
const urlTagsParams = const urlTagsParams =
(query?.tagsViewName && JSON.parse(query?.tagsViewName)) || (query?.tagsViewName && JSON.parse(query?.tagsViewName)) || (params?.tagsViewName && JSON.parse(params?.tagsViewName))
(params?.tagsViewName && JSON.parse(params?.tagsViewName))
tagsViewName = urlTagsParams[i18n.global.locale.value] tagsViewName = urlTagsParams[i18n.global.locale.value]
} else { } else {
// 非国际化 // 非国际化
@@ -267,6 +266,21 @@ export function downBlobFile(url: any, query: any, fileName: string) {
}) })
} }
export function postDownBlobFile(url: any, data: any, fileName: string) {
return request({
url: url,
method: "post",
responseType: "blob",
params: {
current: data?.current ?? 1,
size: data?.size ?? 99999,
},
data,
}).then((response) => {
handleBlobFile(response, fileName)
})
}
/** /**
* blob 文件刘处理 * blob 文件刘处理
* @param response 响应结果 * @param response 响应结果
@@ -375,6 +389,9 @@ const other = {
downBlobFile: (url: any, query: any, fileName: string) => { downBlobFile: (url: any, query: any, fileName: string) => {
return downBlobFile(url, query, fileName) return downBlobFile(url, query, fileName)
}, },
postDownBlobFile: (url: any, data: any, fileName: string) => {
return postDownBlobFile(url, data, fileName)
},
toUnderline: (str: string) => { toUnderline: (str: string) => {
return toUnderline(str) return toUnderline(str)
}, },
-12
View File
@@ -1,16 +1,6 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<DraggableDepTree
ref="draggableDepTreeRef"
placeholder="请输入部门名称"
:show-expand="true"
@getSelectNode="handleGetSelectNode"
switch-inactive-text="当前部门"
switch-active-text="当前部门及子部门"
:defaultTreeWidth="20"
>
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> <el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="4"> <el-col :span="4">
@@ -92,8 +82,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" /> <pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</DraggableDepTree>
</div> </div>
<!-- 编辑、新增 --> <!-- 编辑、新增 -->
+2 -5
View File
@@ -73,7 +73,6 @@
<div :class="{ 'color-success': row.walletReduceCount != 0 }">{{ row.walletReduceCount }}次</div> <div :class="{ 'color-success': row.walletReduceCount != 0 }">{{ row.walletReduceCount }}次</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="walletOncePrice" label="单次充值金额" align="center"> <el-table-column prop="walletOncePrice" label="单次充值金额" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div :class="{ 'color-success': row.walletOncePrice != 0 }">{{ displayPrice(row.walletOncePrice) }}</div> <div :class="{ 'color-success': row.walletOncePrice != 0 }">{{ displayPrice(row.walletOncePrice) }}</div>
@@ -84,7 +83,6 @@
<div :class="{ 'color-success': row.walletOnceCount != 0 }">{{ row.walletOnceCount }}次</div> <div :class="{ 'color-success': row.walletOnceCount != 0 }">{{ row.walletOnceCount }}次</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="walletOnceReducePrice" label="单次扣减金额" align="center"> <el-table-column prop="walletOnceReducePrice" label="单次扣减金额" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div :class="{ 'color-success': row.walletOnceReducePrice != 0 }">{{ displayPrice(row.walletOnceReducePrice) }}</div> <div :class="{ 'color-success': row.walletOnceReducePrice != 0 }">{{ displayPrice(row.walletOnceReducePrice) }}</div>
@@ -95,7 +93,6 @@
<div :class="{ 'color-success': row.walletOnceReduceCount != 0 }">{{ row.walletOnceReduceCount }}次</div> <div :class="{ 'color-success': row.walletOnceReduceCount != 0 }">{{ row.walletOnceReduceCount }}次</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderPayPrice" label="消费金额" align="center"> <el-table-column prop="orderPayPrice" label="消费金额" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div :class="{ 'color-primary': row.orderPayPrice != 0 }">{{ displayPrice(row.orderPayPrice) }}</div> <div :class="{ 'color-primary': row.orderPayPrice != 0 }">{{ displayPrice(row.orderPayPrice) }}</div>
@@ -148,11 +145,11 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state) const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
// 导出excel // 导出excel
const exportExcel = () => { const exportExcel = () => {
downBlobFile("/hard/hard-total/export-dept", Object.assign(state.queryForm), "部门交易记录导出.xlsx") postDownBlobFile("/hard/hard-total/export-dept", Object.assign(state.queryForm), "部门交易记录导出.xlsx")
} }
const getSummaries = (param: any) => { const getSummaries = (param: any) => {
+2 -2
View File
@@ -137,7 +137,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state) const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -169,7 +169,7 @@ const getSummaries = (param: any) => {
// 导出excel // 导出excel
const exportExcel = () => { const exportExcel = () => {
downBlobFile( postDownBlobFile(
"/wallet/wallet-transaction/export-cz", "/wallet/wallet-transaction/export-cz",
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }), Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
"walletRecharge.xlsx", "walletRecharge.xlsx",
+2 -2
View File
@@ -152,7 +152,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state) const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -176,7 +176,7 @@ const doRefund = async (row: any) => {
// 导出excel // 导出excel
const exportExcel = () => { const exportExcel = () => {
downBlobFile( postDownBlobFile(
"/wallet/wallet-transaction/export-tk", "/wallet/wallet-transaction/export-tk",
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }), Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
"walletRecharge.xlsx", "walletRecharge.xlsx",
+2 -2
View File
@@ -151,7 +151,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
}) })
// table hook // table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state) const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
// 清空搜索条件 // 清空搜索条件
const resetQuery = () => { const resetQuery = () => {
@@ -167,7 +167,7 @@ const resetQuery = () => {
// 导出excel // 导出excel
const exportExcel = () => { const exportExcel = () => {
downBlobFile( postDownBlobFile(
"/wallet/wallet-transaction/export-xf", "/wallet/wallet-transaction/export-xf",
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }), Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
"walletRecharge.xlsx", "walletRecharge.xlsx",