需求变更-4

This commit is contained in:
aixianling
2024-10-22 15:14:10 +08:00
parent 174aede4bc
commit fb8ca4d9e6

View File

@@ -9,20 +9,19 @@ export default {
{label: "课区", prop: "groupName"}, {label: "课区", prop: "groupName"},
{label: "课长", prop: "supervisorName"}, {label: "课长", prop: "supervisorName"},
{label: "门店", prop: "storeName"}, {label: "门店", prop: "storeName"},
{label: "门店现烤净收货额", prop: "bakeNetAmt"}, {label: "昨日门店净收货额", prop: "bakeNetAmt"},
{label: "门店现烤销售", prop: "bakeSaleAmt"}, {label: "昨日现烤销售", prop: "bakeSaleAmt"},
{label: "门店现烤报损", prop: "bakeBsAmt"}, {label: "昨日现烤报损", prop: "bakeBsAmt"},
{label: "门店现烤领用额", prop: "bakeLyAmt"}, {label: "门店现在现烤库存金额", prop: "bakeLyAmt"},
{label: "门店现烤惜食", prop: "bakeXsSaleAmt"}, {label: "现在现烤销售额", prop: "bakeXsSaleAmt"},
], ],
filter: "", filter: "",
options:[],
summary: {} summary: {}
} }
}, },
computed: { computed: {
search: v => v.$marketBoard.search, search: v => v.$marketBoard.search,
list: v => v.tableData.filter(e => !v.filter || e.supervisorName == v.filter) || [],
options: v => [...new Set(v.tableData.map(e => e.supervisorName))],
tableConfig: v => { tableConfig: v => {
return { return {
headerBGC: 'rgba(13, 48, 99, 0.6)', headerBGC: 'rgba(13, 48, 99, 0.6)',
@@ -53,8 +52,8 @@ export default {
methods: { methods: {
getTableData() { getTableData() {
const {$http, $waitFor} = window const {$http, $waitFor} = window
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/storeMonitor", { return $waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/storeMonitor", {
...this.search, limit: 999 ...this.search, limit: 999,groupCodeList: [this.filter].filter(Boolean)
})).then(res => { })).then(res => {
if (res?.data) { if (res?.data) {
this.summary = res.data.total this.summary = res.data.total
@@ -65,22 +64,30 @@ export default {
}, },
watch: { watch: {
search: { search: {
immediate: true, deep: true, handler() { deep: true, handler() {
this.getTableData() this.getTableData()
} }
} }
},
created() {
this.getTableData().then(() => {
this.options = this.tableData.map(e => ({
label: e.supervisorName, value: e.groupCode
}))
})
} }
} }
</script> </script>
<template> <template>
<section class="AppStoreMonitor"> <section class="AppStoreMonitor">
<div class="flex" style="margin-bottom: 22px"> <app-sub-title text="门店运营监控表">
<div class="fill"/> <template #right>
<el-select placeholder="全部" v-model="filter" size="small" clearable class="AppSelect"> <el-select placeholder="全部" v-model="filter" size="small" clearable class="AppSelect" @change="getTableData">
<el-option v-for="(name,i) in options" :key="i" :label="name" :value="name"/> <el-option v-for="(op,i) in options" :key="i" v-bind="op"/>
</el-select> </el-select>
</div> </template>
</app-sub-title>
<scroll-table :table-data="tableData" :columns="columns"/> <scroll-table :table-data="tableData" :columns="columns"/>
<!--<dv-scroll-board :config="tableConfig"/>--> <!--<dv-scroll-board :config="tableConfig"/>-->
<div class="summary flex"> <div class="summary flex">
@@ -98,7 +105,7 @@ export default {
} }
.AppStoreMonitor .dv-scroll-board,.AppStoreMonitor .scrollTable{ .AppStoreMonitor .dv-scroll-board,.AppStoreMonitor .scrollTable{
height: calc(100% - 30px - 55px) !important; height: calc(100% - 80px) !important;
} }
.AppStoreMonitor .el-select { .AppStoreMonitor .el-select {