feat:记录导出增加部门搜索
This commit is contained in:
1 parent
4941745f96
commit
cbfd0531e5
9 files changed
+150
-123
No files matched your search
@@ -1,25 +1,33 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function pageListDept(query?: Object) {
|
||||
export function pageListDept(query?: any) {
|
||||
return request({
|
||||
url: "/hard/hard-total/page-list-dept",
|
||||
method: "get",
|
||||
params: query,
|
||||
method: "post",
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageListSb(query?: Object) {
|
||||
export function pageListSb(query?: any) {
|
||||
return request({
|
||||
url: "/hard/hard-total/page-list-sb",
|
||||
method: "get",
|
||||
params: query,
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageListCs(query?: Object) {
|
||||
export function pageListCs(query?: any) {
|
||||
return request({
|
||||
url: "/hard/hard-total/page-list-cs",
|
||||
method: "get",
|
||||
params: query,
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
@@ -1,26 +1,38 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function pageCz(obj?: Object) {
|
||||
export function pageCz(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-cz",
|
||||
method: "get",
|
||||
params: obj,
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageXf(obj?: Object) {
|
||||
export function pageXf(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-xf",
|
||||
method: "get",
|
||||
params: obj,
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageTk(obj?: Object) {
|
||||
export function pageTk(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-tk",
|
||||
method: "get",
|
||||
params: obj,
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -222,6 +222,10 @@ export function useTable(options?: BasicTableProps) {
|
||||
return other.downBlobFile(url, query, fileName)
|
||||
}
|
||||
|
||||
const postDownBlobFile = (url: string, data: any, fileName: string) => {
|
||||
return other.postDownBlobFile(url, data, fileName)
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义表格通用样式
|
||||
* @returns css
|
||||
@@ -242,5 +246,6 @@ export function useTable(options?: BasicTableProps) {
|
||||
currentChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
postDownBlobFile,
|
||||
}
|
||||
}
|
||||
+19
-2
@@ -40,8 +40,7 @@ export function setTagsViewNameI18n(item: any) {
|
||||
if (pattern.test(query?.tagsViewName) || pattern.test(params?.tagsViewName)) {
|
||||
// 国际化
|
||||
const urlTagsParams =
|
||||
(query?.tagsViewName && JSON.parse(query?.tagsViewName)) ||
|
||||
(params?.tagsViewName && JSON.parse(params?.tagsViewName))
|
||||
(query?.tagsViewName && JSON.parse(query?.tagsViewName)) || (params?.tagsViewName && JSON.parse(params?.tagsViewName))
|
||||
tagsViewName = urlTagsParams[i18n.global.locale.value]
|
||||
} 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 文件刘处理
|
||||
* @param response 响应结果
|
||||
@@ -375,6 +389,9 @@ const other = {
|
||||
downBlobFile: (url: any, query: any, fileName: string) => {
|
||||
return downBlobFile(url, query, fileName)
|
||||
},
|
||||
postDownBlobFile: (url: any, data: any, fileName: string) => {
|
||||
return postDownBlobFile(url, data, fileName)
|
||||
},
|
||||
toUnderline: (str: string) => {
|
||||
return toUnderline(str)
|
||||
},
|
||||
|
||||
@@ -1,99 +1,87 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<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"
|
||||
<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="status">
|
||||
<dict-select v-model="state.queryForm.status" dict-code="hard_sale_status" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="申请时间" prop="createTimeList">
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</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-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<template #default>
|
||||
<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="status">
|
||||
<dict-select v-model="state.queryForm.status" dict-code="hard_sale_status" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="申请时间" prop="createTimeList">
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</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-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="userAvatar" label="头像">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.userAvatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" />
|
||||
<el-table-column label="支付金额" align="center" prop="practicalTotalPrice">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">
|
||||
{{ displayPrice(row.orderPayPrice) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款金额" align="center">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">
|
||||
{{ displayPrice(row.refundPrice) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款状态" align="center">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="hard_sale_status" :value="row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" width="180px" prop="createTime" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="ShoppingCartFull" text type="primary" @click="shopCarDialogRef.openDialog(row.orderId)">购物车</el-button>
|
||||
<el-button icon="WalletFilled" link type="primary" @click="doRefund(row)"> 退款 </el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardAfterSale_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'hard_hardAfterSale_del'" @click="handleDelete([row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</template>
|
||||
</DraggableDepTree>
|
||||
<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="userAvatar" label="头像">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.userAvatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" />
|
||||
<el-table-column label="支付金额" align="center" prop="practicalTotalPrice">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">
|
||||
{{ displayPrice(row.orderPayPrice) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款金额" align="center">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">
|
||||
{{ displayPrice(row.refundPrice) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款状态" align="center">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="hard_sale_status" :value="row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" width="180px" prop="createTime" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="ShoppingCartFull" text type="primary" @click="shopCarDialogRef.openDialog(row.orderId)">购物车</el-button>
|
||||
<el-button icon="WalletFilled" link type="primary" @click="doRefund(row)"> 退款 </el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardAfterSale_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'hard_hardAfterSale_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>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
<div :class="{ 'color-success': row.walletReduceCount != 0 }">{{ row.walletReduceCount }}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="walletOncePrice" label="单次充值金额" align="center">
|
||||
<template #default="{ row }">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="walletOnceReducePrice" label="单次扣减金额" align="center">
|
||||
<template #default="{ row }">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="orderPayPrice" label="消费金额" align="center">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-primary': row.orderPayPrice != 0 }">{{ displayPrice(row.orderPayPrice) }}</div>
|
||||
@@ -148,11 +145,11 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 导出excel
|
||||
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) => {
|
||||
|
||||
@@ -137,7 +137,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
@@ -169,7 +169,7 @@ const getSummaries = (param: any) => {
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile(
|
||||
postDownBlobFile(
|
||||
"/wallet/wallet-transaction/export-cz",
|
||||
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
|
||||
"walletRecharge.xlsx",
|
||||
|
||||
@@ -152,7 +152,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
@@ -176,7 +176,7 @@ const doRefund = async (row: any) => {
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile(
|
||||
postDownBlobFile(
|
||||
"/wallet/wallet-transaction/export-tk",
|
||||
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
|
||||
"walletRecharge.xlsx",
|
||||
|
||||
@@ -151,7 +151,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
@@ -167,7 +167,7 @@ const resetQuery = () => {
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile(
|
||||
postDownBlobFile(
|
||||
"/wallet/wallet-transaction/export-xf",
|
||||
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
|
||||
"walletRecharge.xlsx",
|
||||
|
||||
Reference in new issue
Block a user