This commit is contained in:
weiwei committed 2025-08-01 11:08:52 +08:00
commit 0c66f2b465
6 files changed
+115 -183

No files matched your search

+2 -2
View File
@@ -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/ # 正式环境线上
# 代码生成服务地址
+7 -3
View File
@@ -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,17 +1,9 @@
<template>
<el-dialog title="菜品统计" width="70%" v-model="visible" :close-on-click-modal="false" draggable>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList"> </el-form>
<el-table
:data="state.dataList"
v-loading="state.loading"
border
:cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle"
:summary-method="getSummaries"
:show-summary="true"
@selection-change="selectionChangHandle"
@sort-change="sortChangeHandle"
>
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle" :summary-method="getSummaries" :show-summary="true"
@selection-change="selectionChangHandle" @sort-change="sortChangeHandle">
<el-table-column label="用餐时间" align="center" prop="createTime">
<template #default="{ row }">
<span>{{ parseTime(row.createTime, "{y}-{m}-{d}") }}</span>
+25 -41
View File
@@ -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>
@@ -18,41 +11,30 @@
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
</el-form-item>
<el-form-item style="width: 250px" label="食堂" prop="merchantId">
<select-mch v-model="state.queryForm.merchantId" :apiParams="{ parentIsNull: false, types: '1' }" />
<select-mch v-model="state.queryForm.merchantId"
:apiParams="{ parentIsNull: false, types: '1' }" />
</el-form-item>
<el-form-item style="width: 450px" label="创建时间" prop="createTimeList">
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD" type="daterange" />
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD"
type="daterange" />
</el-form-item>
<el-form-item>
<el-button icon="Search" type="primary" @click="doSearch">{{ $t("common.queryBtn") }}</el-button>
<el-button icon="Search" type="primary" @click="doSearch">{{ $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%">
<right-toolbar
:search="false"
v-model:showSearch="showSearch"
:export="'wallet_walletTransaction_export'"
@exportExcel="exportExcel"
class="ml10 mr20"
style="float: right"
@queryTable="getDataList"
></right-toolbar>
<right-toolbar :search="false" v-model:showSearch="showSearch"
:export="'wallet_walletTransaction_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"
:summary-method="getSummaries"
:show-summary="true"
@selection-change="selectionChangHandle"
@sort-change="sortChangeHandle"
>
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle" :summary-method="getSummaries"
:show-summary="true" @selection-change="selectionChangHandle" @sort-change="sortChangeHandle">
<el-table-column type="selection" width="80" align="center" />
<el-table-column type="index" label="#" width="50" />
<el-table-column label="用餐时间" align="center" prop="createTime">
@@ -65,6 +47,11 @@
<dict-tag :options="daily_menu" :value="row.hourType" />
</template>
</el-table-column>
<el-table-column label="交易人数" align="center" prop="payUserCount">
<template #default="{ row }">
<span class="color-primary"> {{ row.payUserCount || 0 }}次 </span>
</template>
</el-table-column>
<el-table-column label="交易次数" align="center" prop="timeCount">
<template #default="{ row }">
<span class="color-primary"> {{ row.timeCount || 0 }}次 </span>
@@ -83,18 +70,15 @@
<el-table-column fixed="right" label="操作" width="200">
<template #default="{ row }">
<el-button
icon="Tickets"
text
type="primary"
@click="productTotalTableRef.openDialog(parseTime(row.createTime, '{y}-{m}-{d}'), row.hourType)"
>
<el-button icon="Tickets" text type="primary"
@click="productTotalTableRef.openDialog(parseTime(row.createTime, '{y}-{m}-{d}'), row.hourType)">
菜品详情
</el-button>
</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>
@@ -138,7 +122,7 @@ const exportExcel = () => {
const getSummaries = (param: any) => {
const { columns, data } = param
const totalColumns = ["timeCount", "payCount", "totalPrice"]
const totalColumns = ["payUserCount", "timeCount", "payCount", "totalPrice"]
const totalRow = Array.from({ length: columns.length })
totalRow[0] = "合计"
columns.forEach((i: any, index: number) => {
+76 -124
View File
@@ -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>
@@ -20,14 +13,14 @@
<el-form-item style="width: 300px" label="商户类型" prop="merchantType">
<dict-select v-model="state.queryForm.merchantType" dict-code="merchant_type" />
</el-form-item>
<el-form-item style="width: 300px" label="商户" prop="mchIds">
<select-mch v-model="state.queryForm.mchIds" :apiParams="{ parentIsNull: false }" />
<el-form-item style="width: 300px" label="商户" prop="merchantId">
<select-mch v-model="state.queryForm.merchantId" :apiParams="{ parentIsNull: false }" />
</el-form-item>
<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>
@@ -328,9 +277,12 @@ const transactionListRef = ref()
const adminRefundDailogRef = ref()
const tabList = ref<any>([{}])
const activeName = ref(null)
const draggableDepTreeRef = ref()
// 搜索变量
const queryRef = ref()
const showSearch = ref(true)
// 多选变量
const selectObjs = ref([]) as any
const multiple = ref(true)
@@ -355,9 +307,9 @@ const resetQuery = () => {
queryRef.value?.resetFields()
// 清空多选
selectObjs.value = []
state.queryForm.deptId = ""
state.queryForm.deptIds = []
// draggableDepTreeRef.value.resetData()
// state.queryForm.deptId = ""
state.queryForm.userDeptIds = []
draggableDepTreeRef.value.resetData()
getDataList()
}
@@ -387,8 +339,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 +389,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")
}
// 多选事件