11
This commit is contained in:
1 parent
3fc433ea46
commit
3ff9f841a0
3 files changed
+28
-11
No files matched your search
@@ -154,6 +154,8 @@ const openDialog = (row: any, query: any) => {
|
||||
}
|
||||
if (query && query.hourType) {
|
||||
state.queryForm.hourType = query.hourType
|
||||
} else if (row.hourType) {
|
||||
state.queryForm.hourType = row.hourType
|
||||
}
|
||||
console.log("state.queryForm:", state.queryForm);
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<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"
|
||||
<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="daterange" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -25,7 +25,7 @@
|
||||
<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"
|
||||
row-class-name="success-row" @selection-change="selectionChangHandle" @sort-change="sortChangeHandle"
|
||||
@expand-change="tableExpandChange" default-expand-all>
|
||||
@expand-change="tableExpandChange">
|
||||
<el-table-column type="expand" width="80">
|
||||
<!-- start 时间段 start -->
|
||||
<template #default="{ row }">
|
||||
@@ -34,7 +34,7 @@
|
||||
:header-cell-style="tableStyle.headerCellStyle" :summary-method="getSummaries"
|
||||
:show-summary="true" row-class-name="warning-row">
|
||||
<el-table-column type="index" label="#" width="60" align="center" />
|
||||
<el-table-column prop="userDeptName" align="center" label="部门" width="150" />
|
||||
<el-table-column prop="userDeptName" align="center" label="部门" width="200" />
|
||||
<el-table-column label="用餐时间段" width="150" align="center" prop="hourType">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="daily_menu" :value="row.hourType" />
|
||||
@@ -73,7 +73,7 @@
|
||||
<!-- end 时间段 end -->
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="#" width="60" />
|
||||
<el-table-column label="食堂" align="center" width="150" prop="mchName" />
|
||||
<el-table-column label="食堂" align="center" width="200" prop="mchName" />
|
||||
<el-table-column label="用餐部门数" align="center" width="150" prop="deptCount">
|
||||
<template #default="{ row }">
|
||||
<span class="color-danger"> {{ row.deptCount || 0 }}部门 </span>
|
||||
@@ -150,12 +150,17 @@ onMounted(() => {
|
||||
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
state.loading = true
|
||||
const { data } = await hardTotalApi.listByDept(state.queryForm)
|
||||
if (data && data.length) {
|
||||
state.dataList = data
|
||||
} else {
|
||||
state.dataList = []
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
state.loading = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
</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"
|
||||
@expand-change="tableExpandChange">
|
||||
:show-summary="true" row-class-name="success-row" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle" @expand-change="tableExpandChange">
|
||||
<el-table-column v-if="false" type="selection" width="80" align="center" />
|
||||
|
||||
<el-table-column type="expand" width="50">
|
||||
@@ -43,9 +43,9 @@
|
||||
<div class="ml-[50px] my-2">
|
||||
<el-table :data="getTableChildrenMap(row.uniqueCode)" border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle">
|
||||
:header-cell-style="tableStyle.headerCellStyle" row-class-name="warning-row">
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="userDeptName" align="center" label="部门" width="150" />
|
||||
<el-table-column prop="userDeptName" align="center" label="部门" width="200" />
|
||||
<el-table-column label="用餐时间段" width="100" align="center" prop="hourType">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="daily_menu" :value="row.hourType" />
|
||||
@@ -77,7 +77,7 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column label="用餐时间" align="center" width="150" prop="createTime">
|
||||
<el-table-column label="用餐时间" align="center" width="200" prop="createTime">
|
||||
<template #default="{ row }">
|
||||
<span>{{ parseTime(row.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
@@ -108,7 +108,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed="right" label="操作" width="200">
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="Tickets" text type="primary"
|
||||
@click="productTotalTableRef.openDialog(parseTime(row.createTime, '{y}-{m}-{d}'), row.hourType)">
|
||||
@@ -236,3 +236,13 @@ const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepT
|
||||
getDataList()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user