feat:发票导出、订单发票查询
This commit is contained in:
1 parent
52ed054889
commit
8febdfdcb2
4 files changed
+81
-128
No files matched your search
+2
-2
@@ -12,7 +12,7 @@ ENV = 'development'
|
|||||||
# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期
|
# 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://pjcloud.center.takin.cc/
|
||||||
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
|
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
|
||||||
VITE_ADMIN_PROXY_PATH = http://192.168.101.159:9999/ # 邓-本地
|
VITE_ADMIN_PROXY_PATH = http://192.168.101.174:9999/ # 邓-本地
|
||||||
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上
|
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上
|
||||||
|
|
||||||
# 图片访问基础地址
|
# 图片访问基础地址
|
||||||
@@ -20,7 +20,7 @@ VITE_ADMIN_PROXY_PATH = http://192.168.101.159:9999/ # 邓-本地
|
|||||||
# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期
|
# 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://pjcloud.center.takin.cc
|
||||||
# VITE_IMAGE_BASE_PATH = http://localhost:9999
|
# VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||||
VITE_IMAGE_BASE_PATH = http://192.168.101.159:9999 # 邓-本地
|
VITE_IMAGE_BASE_PATH = http://192.168.101.174:9999 # 邓-本地
|
||||||
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
|
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
|
||||||
|
|
||||||
# 代码生成服务地址
|
# 代码生成服务地址
|
||||||
|
|||||||
@@ -11,11 +11,15 @@ export function offlinePay(data: any) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function pageJoin(query?: Object) {
|
export function pageJoin(query: any) {
|
||||||
return request({
|
return request({
|
||||||
url: "/hard/hard-order/page-join",
|
url: "/hard/hard-order/page-join",
|
||||||
method: "get",
|
method: "post",
|
||||||
params: query,
|
params: {
|
||||||
|
current: query.current,
|
||||||
|
size: query.size,
|
||||||
|
},
|
||||||
|
data: query,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
<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
|
<DraggableDepTree ref="draggableDepTreeRef" placeholder="请输入部门名称" :show-expand="true"
|
||||||
ref="draggableDepTreeRef"
|
@getSelectNode="handleGetSelectNode" switch-inactive-text="包含" switch-active-text="不包含"
|
||||||
placeholder="请输入部门名称"
|
:defaultTreeWidth="20" :nodeClickable="false">
|
||||||
:show-expand="true"
|
|
||||||
@getSelectNode="handleGetSelectNode"
|
|
||||||
switch-inactive-text="包含"
|
|
||||||
switch-active-text="不包含"
|
|
||||||
:defaultTreeWidth="20"
|
|
||||||
:nodeClickable="false"
|
|
||||||
>
|
|
||||||
<template #default>
|
<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>
|
<el-row>
|
||||||
@@ -26,8 +19,8 @@
|
|||||||
<el-form-item style="width: 300px" label="设备类型" prop="hardTypeCode">
|
<el-form-item style="width: 300px" label="设备类型" prop="hardTypeCode">
|
||||||
<dict-select v-model="state.queryForm.hardTypeCode" dict-code="hard_type" />
|
<dict-select v-model="state.queryForm.hardTypeCode" dict-code="hard_type" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 300px" label="用户部门" prop="deptId">
|
<el-form-item style="width: 300px" label="用户部门" prop="userDeptId">
|
||||||
<select-dept v-model="state.queryForm.deptId" />
|
<select-dept v-model="state.queryForm.userDeptId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 300px" label="用餐时间段" prop="hourType">
|
<el-form-item style="width: 300px" label="用餐时间段" prop="hourType">
|
||||||
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
|
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
|
||||||
@@ -36,49 +29,41 @@
|
|||||||
<dict-select v-model="state.queryForm.orderStatus" dict-code="hard_order_status" />
|
<dict-select v-model="state.queryForm.orderStatus" dict-code="hard_order_status" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
|
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
|
||||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="datetimerange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
<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-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<el-tabs class="flex-1" v-if="tabList && tabList.length" v-model="activeName" @tab-click="handleClick">
|
<el-tabs class="flex-1" v-if="tabList && tabList.length" v-model="activeName"
|
||||||
|
@tab-click="handleClick">
|
||||||
<div v-for="v in tabList" :key="v.value">
|
<div v-for="v in tabList" :key="v.value">
|
||||||
<el-tab-pane :label="v.label" :name="v.value">
|
<el-tab-pane :label="v.label" :name="v.value">
|
||||||
<div></div>
|
<div></div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</div>
|
</div>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<right-toolbar
|
<right-toolbar v-model:showSearch="showSearch" :export="'sys_audit_export'"
|
||||||
v-model:showSearch="showSearch"
|
@exportExcel="exportExcel" class="ml10" style="float: right; margin-right: 20px"
|
||||||
:export="'sys_audit_export'"
|
@queryTable="getDataList" />
|
||||||
@exportExcel="exportExcel"
|
|
||||||
class="ml10"
|
|
||||||
style="float: right; margin-right: 20px"
|
|
||||||
@queryTable="getDataList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||||
:data="state.dataList"
|
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||||
v-loading="state.loading"
|
@sort-change="sortChangeHandle" :show-summary="false" :summary-method="getSummaries">
|
||||||
border
|
|
||||||
:cell-style="tableStyle.cellStyle"
|
|
||||||
:header-cell-style="tableStyle.headerCellStyle"
|
|
||||||
@selection-change="selectionChangHandle"
|
|
||||||
@sort-change="sortChangeHandle"
|
|
||||||
:show-summary="false"
|
|
||||||
:summary-method="getSummaries"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="60" align="center" />
|
<el-table-column type="selection" width="60" align="center" />
|
||||||
<el-table-column type="index" label="#" width="50" />
|
<el-table-column type="index" label="#" width="50" />
|
||||||
<el-table-column width="200" label="用户">
|
<el-table-column width="200" label="用户">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div v-if="row.userId && row.userId != -1" class="flex flex-row items-center justify-center">
|
<div v-if="row.userId && row.userId != -1"
|
||||||
|
class="flex flex-row items-center justify-center">
|
||||||
<preview-image width="50px" height="50px" :src="row.userAvatar" />
|
<preview-image width="50px" height="50px" :src="row.userAvatar" />
|
||||||
<div class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
<div
|
||||||
|
class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
||||||
<span> {{ row.username }}</span>
|
<span> {{ row.username }}</span>
|
||||||
<span> {{ row.userMobile }}</span>
|
<span> {{ row.userMobile }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -209,78 +194,42 @@
|
|||||||
<el-table-column fixed="right" label="操作" width="200">
|
<el-table-column fixed="right" label="操作" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="grid grid-cols-2 justify-evenly">
|
<div class="grid grid-cols-2 justify-evenly">
|
||||||
<el-button
|
<el-button v-if="row.orderType !== '5'" icon="Printer" text type="primary"
|
||||||
v-if="row.orderType !== '5'"
|
@click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
||||||
icon="Printer"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
@click="print(row)"
|
|
||||||
v-auth="'hard_hardInvoice_admin_print'"
|
|
||||||
>
|
|
||||||
打印发票
|
打印发票
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-if="row.orderType !== '5'" icon="ShoppingCartFull" text type="primary"
|
||||||
v-if="row.orderType !== '5'"
|
@click="shopCarDialogRef.openDialog(row.id)">
|
||||||
icon="ShoppingCartFull"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
@click="shopCarDialogRef.openDialog(row.id)"
|
|
||||||
>
|
|
||||||
购物车
|
购物车
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button icon="Money" link type="primary" v-if="row.userId && row.userId != '-1'"
|
||||||
icon="Money"
|
@click="transactionListRef.openDialog(row.walletId)">
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
v-if="row.userId && row.userId != '-1'"
|
|
||||||
@click="transactionListRef.openDialog(row.walletId)"
|
|
||||||
>
|
|
||||||
钱包明细
|
钱包明细
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button icon="InfoFilled" link type="primary"
|
||||||
icon="InfoFilled"
|
v-auth="'wallet_walletTransaction_update_balance'" @click="doRefund(row)">
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_walletTransaction_update_balance'"
|
|
||||||
@click="doRefund(row)"
|
|
||||||
>
|
|
||||||
订单详情
|
订单详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-if="false" icon="edit-pen" text type="primary"
|
||||||
v-if="false"
|
v-auth="'hard_hardwareOrder_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||||
icon="edit-pen"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
v-auth="'hard_hardwareOrder_edit'"
|
|
||||||
@click="formDialogRef.openDialog(row.id)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!row.payRefundId && row.orderType !== '5' && !['5', '6', '8'].includes(row.payType)"
|
v-if="!row.payRefundId && row.orderType !== '5' && !['5', '6', '8'].includes(row.payType)"
|
||||||
icon="stamp"
|
icon="stamp" text type="primary" v-auth="'hard_hardAfterSale_adminRefund'"
|
||||||
text
|
@click="adminRefundDailogRef.openDialog(row.id)">
|
||||||
type="primary"
|
|
||||||
v-auth="'hard_hardAfterSale_adminRefund'"
|
|
||||||
@click="adminRefundDailogRef.openDialog(row.id)"
|
|
||||||
>
|
|
||||||
退款
|
退款
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-if="false" icon="delete" text type="primary"
|
||||||
v-if="false"
|
v-auth="'hard_hardwareOrder_del'" @click="handleDelete([row.id])">
|
||||||
icon="delete"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
v-auth="'hard_hardwareOrder_del'"
|
|
||||||
@click="handleDelete([row.id])"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</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>
|
</template>
|
||||||
</DraggableDepTree>
|
</DraggableDepTree>
|
||||||
</div>
|
</div>
|
||||||
@@ -355,8 +304,8 @@ const resetQuery = () => {
|
|||||||
queryRef.value?.resetFields()
|
queryRef.value?.resetFields()
|
||||||
// 清空多选
|
// 清空多选
|
||||||
selectObjs.value = []
|
selectObjs.value = []
|
||||||
state.queryForm.deptId = ""
|
// state.queryForm.deptId = ""
|
||||||
state.queryForm.deptIds = []
|
state.queryForm.userDeptIds = []
|
||||||
// draggableDepTreeRef.value.resetData()
|
// draggableDepTreeRef.value.resetData()
|
||||||
getDataList()
|
getDataList()
|
||||||
}
|
}
|
||||||
@@ -387,8 +336,8 @@ const print = async (row: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: any) => {
|
const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: any) => {
|
||||||
state.queryForm.deptId = curClickedNode.id
|
// state.queryForm.deptId = curClickedNode.id
|
||||||
state.queryForm.deptIds = checkedTreeNodes.map((item: any) => item.id)
|
state.queryForm.userDeptIds = checkedTreeNodes.map((item: any) => item.id)
|
||||||
state.queryForm.isInclude = !isDeepTree
|
state.queryForm.isInclude = !isDeepTree
|
||||||
getDataList()
|
getDataList()
|
||||||
}
|
}
|
||||||
@@ -437,36 +386,36 @@ const getSummaries = (param: SummaryMethodProps) => {
|
|||||||
}
|
}
|
||||||
if (column.property === "paymentInformation") {
|
if (column.property === "paymentInformation") {
|
||||||
const priceVNode: VNode[] & string[] = []
|
const priceVNode: VNode[] & string[] = []
|
||||||
;[
|
;[
|
||||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||||
const values = data.map((item) => Number(item[column]))
|
const values = data.map((item) => Number(item[column]))
|
||||||
if (!values.every((value) => Number.isNaN(value))) {
|
if (!values.every((value) => Number.isNaN(value))) {
|
||||||
priceVNode.push(
|
priceVNode.push(
|
||||||
h("div", {}, [
|
h("div", {}, [
|
||||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||||
displayPrice(
|
displayPrice(
|
||||||
values.reduce((prev, curr) => {
|
values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
const value = Number(curr)
|
||||||
if (!Number.isNaN(value)) {
|
if (!Number.isNaN(value)) {
|
||||||
return prev + curr
|
return prev + curr
|
||||||
} else {
|
} else {
|
||||||
return prev
|
return prev
|
||||||
}
|
}
|
||||||
}, 0),
|
}, 0),
|
||||||
"元",
|
"元",
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
)
|
||||||
)
|
} else {
|
||||||
} else {
|
priceVNode.push("NaN")
|
||||||
priceVNode.push("NaN")
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
sums[index] = h("div", { style: {} }, [...priceVNode])
|
sums[index] = h("div", { style: {} }, [...priceVNode])
|
||||||
} else {
|
} else {
|
||||||
sums[index] = ""
|
sums[index] = ""
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ const printDialogRef = ref()
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
// 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 = () => {
|
||||||
@@ -203,7 +203,7 @@ const doInfo = (row: any) => {
|
|||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
downBlobFile("/wallet/walletRechargeInvoice/export", Object.assign(state.queryForm, { ids: selectObjs }), "walletRechargeInvoice.xlsx")
|
postDownBlobFile("/wallet/walletRechargeInvoice/export", Object.assign(state.queryForm), "充值扣款发票申请.xlsx")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选事件
|
// 多选事件
|
||||||
|
|||||||
Reference in new issue
Block a user