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://pjcloud.center.takin.cc/
|
||||
# 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 # 正式环境线上
|
||||
|
||||
# 图片访问基础地址
|
||||
@@ -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://pjcloud.center.takin.cc
|
||||
# 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/ # 正式环境线上
|
||||
|
||||
# 代码生成服务地址
|
||||
|
||||
@@ -11,11 +11,15 @@ export function offlinePay(data: any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function pageJoin(query?: Object) {
|
||||
export function pageJoin(query: any) {
|
||||
return request({
|
||||
url: "/hard/hard-order/page-join",
|
||||
method: "get",
|
||||
params: query,
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
<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"
|
||||
:nodeClickable="false"
|
||||
>
|
||||
<DraggableDepTree ref="draggableDepTreeRef" placeholder="请输入部门名称" :show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode" switch-inactive-text="包含" switch-active-text="不包含"
|
||||
:defaultTreeWidth="20" :nodeClickable="false">
|
||||
<template #default>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row>
|
||||
@@ -26,8 +19,8 @@
|
||||
<el-form-item style="width: 300px" label="设备类型" prop="hardTypeCode">
|
||||
<dict-select v-model="state.queryForm.hardTypeCode" dict-code="hard_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="用户部门" prop="deptId">
|
||||
<select-dept v-model="state.queryForm.deptId" />
|
||||
<el-form-item style="width: 300px" label="用户部门" prop="userDeptId">
|
||||
<select-dept v-model="state.queryForm.userDeptId" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="用餐时间段" prop="hourType">
|
||||
<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" />
|
||||
</el-form-item>
|
||||
<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-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-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<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">
|
||||
<el-tab-pane :label="v.label" :name="v.value">
|
||||
<div></div>
|
||||
</el-tab-pane>
|
||||
</div>
|
||||
</el-tabs>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'sys_audit_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10"
|
||||
style="float: right; margin-right: 20px"
|
||||
@queryTable="getDataList"
|
||||
/>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'sys_audit_export'"
|
||||
@exportExcel="exportExcel" class="ml10" style="float: right; margin-right: 20px"
|
||||
@queryTable="getDataList" />
|
||||
</div>
|
||||
<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"
|
||||
:show-summary="false"
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
<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" :show-summary="false" :summary-method="getSummaries">
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column width="200" label="用户">
|
||||
<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" />
|
||||
<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.userMobile }}</span>
|
||||
</div>
|
||||
@@ -209,78 +194,42 @@
|
||||
<el-table-column fixed="right" label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<div class="grid grid-cols-2 justify-evenly">
|
||||
<el-button
|
||||
v-if="row.orderType !== '5'"
|
||||
icon="Printer"
|
||||
text
|
||||
type="primary"
|
||||
@click="print(row)"
|
||||
v-auth="'hard_hardInvoice_admin_print'"
|
||||
>
|
||||
<el-button v-if="row.orderType !== '5'" icon="Printer" text type="primary"
|
||||
@click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
||||
打印发票
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.orderType !== '5'"
|
||||
icon="ShoppingCartFull"
|
||||
text
|
||||
type="primary"
|
||||
@click="shopCarDialogRef.openDialog(row.id)"
|
||||
>
|
||||
<el-button v-if="row.orderType !== '5'" icon="ShoppingCartFull" text type="primary"
|
||||
@click="shopCarDialogRef.openDialog(row.id)">
|
||||
购物车
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="Money"
|
||||
link
|
||||
type="primary"
|
||||
v-if="row.userId && row.userId != '-1'"
|
||||
@click="transactionListRef.openDialog(row.walletId)"
|
||||
>
|
||||
<el-button icon="Money" link type="primary" v-if="row.userId && row.userId != '-1'"
|
||||
@click="transactionListRef.openDialog(row.walletId)">
|
||||
钱包明细
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="InfoFilled"
|
||||
link
|
||||
type="primary"
|
||||
v-auth="'wallet_walletTransaction_update_balance'"
|
||||
@click="doRefund(row)"
|
||||
>
|
||||
<el-button icon="InfoFilled" link type="primary"
|
||||
v-auth="'wallet_walletTransaction_update_balance'" @click="doRefund(row)">
|
||||
订单详情
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardwareOrder_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
<el-button v-if="false" icon="edit-pen" text type="primary"
|
||||
v-auth="'hard_hardwareOrder_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!row.payRefundId && row.orderType !== '5' && !['5', '6', '8'].includes(row.payType)"
|
||||
icon="stamp"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardAfterSale_adminRefund'"
|
||||
@click="adminRefundDailogRef.openDialog(row.id)"
|
||||
>
|
||||
icon="stamp" text type="primary" v-auth="'hard_hardAfterSale_adminRefund'"
|
||||
@click="adminRefundDailogRef.openDialog(row.id)">
|
||||
退款
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardwareOrder_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
>
|
||||
<el-button v-if="false" icon="delete" text type="primary"
|
||||
v-auth="'hard_hardwareOrder_del'" @click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
@@ -355,8 +304,8 @@ const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
state.queryForm.deptId = ""
|
||||
state.queryForm.deptIds = []
|
||||
// state.queryForm.deptId = ""
|
||||
state.queryForm.userDeptIds = []
|
||||
// draggableDepTreeRef.value.resetData()
|
||||
getDataList()
|
||||
}
|
||||
@@ -387,8 +336,8 @@ const print = async (row: any) => {
|
||||
}
|
||||
|
||||
const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: any) => {
|
||||
state.queryForm.deptId = curClickedNode.id
|
||||
state.queryForm.deptIds = checkedTreeNodes.map((item: any) => item.id)
|
||||
// state.queryForm.deptId = curClickedNode.id
|
||||
state.queryForm.userDeptIds = checkedTreeNodes.map((item: any) => item.id)
|
||||
state.queryForm.isInclude = !isDeepTree
|
||||
getDataList()
|
||||
}
|
||||
@@ -437,36 +386,36 @@ const getSummaries = (param: SummaryMethodProps) => {
|
||||
}
|
||||
if (column.property === "paymentInformation") {
|
||||
const priceVNode: VNode[] & string[] = []
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
sums[index] = h("div", { style: {} }, [...priceVNode])
|
||||
} else {
|
||||
sums[index] = ""
|
||||
|
||||
@@ -180,7 +180,7 @@ const printDialogRef = ref()
|
||||
const loading = ref(false)
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
@@ -203,7 +203,7 @@ const doInfo = (row: any) => {
|
||||
|
||||
// 导出excel
|
||||
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