From 319043b5b60a609bb4463d1cb347d65d50f1ab3c Mon Sep 17 00:00:00 2001 From: Kubbo <390378816@qq.com> Date: Sun, 7 Jul 2024 22:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=BA=97=E5=A4=84=E7=90=86=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/inject.js | 1 + src/views/AppCarouselList.vue | 95 +++++++++++++-------------- src/views/AppStoreBoard.vue | 40 ++++++++++++ src/views/AppStoreBoardFilter.vue | 104 ++++++++++++++++++++++++++++++ src/views/AppStoreKeyGoods.vue | 56 ++++++++++++++++ src/views/AppStoresTable.vue | 1 + 6 files changed, 247 insertions(+), 50 deletions(-) create mode 100644 src/views/AppStoreBoard.vue create mode 100644 src/views/AppStoreBoardFilter.vue create mode 100644 src/views/AppStoreKeyGoods.vue diff --git a/src/utils/inject.js b/src/utils/inject.js index e18d376..91da530 100644 --- a/src/utils/inject.js +++ b/src/utils/inject.js @@ -64,6 +64,7 @@ Vue.prototype.$multipleStoreBoard = Vue.observable({ search: {"groupCodeList": [], "hourNum": "", type: "1"} }) Vue.prototype.$storeBoard = Vue.observable({ + query: {}, search: {} }) Vue.component("tableColumn", { diff --git a/src/views/AppCarouselList.vue b/src/views/AppCarouselList.vue index 680a492..1e519e6 100644 --- a/src/views/AppCarouselList.vue +++ b/src/views/AppCarouselList.vue @@ -38,11 +38,6 @@ export default { data() { return { height: '600px', - search: { - type: '1', - storeCode: 'K230QTD081', - hourNum: "18" - }, list: [], cameras: [], storeKeyGoods: [], @@ -50,23 +45,26 @@ export default { columns: { 品类销售情况: [ {label: "品类", prop: "secondCategoryName"}, - {label: "销售额", prop: "currentSaleAmt", width: '70px'}, - {label: "库存金额", prop: "currentStockAmt", width: '80px'}, - {label: "同/环比销售额", prop: "compareSaleAmt", width: '70px'}, - {label: "同/环比库存金额", prop: "compareStockAmt", width: '70px'}, - {label: "前四周日军销售额", prop: "avg4WeekSaleAmt", width: '70px'}, + {label: "销售额", prop: "currentSaleAmt", width: 70}, + {label: "库存金额", prop: "currentStockAmt", width: 80}, + {label: "同/环比销售额", prop: "compareSaleAmt", width: 70}, + {label: "同/环比库存金额", prop: "compareStockAmt", width: 70}, + {label: "前四周日军销售额", prop: "avg4WeekSaleAmt", width: 70}, ], 重点单品情况: [ {label: "重点单品", prop: "name"}, - {label: "当日目标", prop: "targetNum", width: "70px"}, - {label: "销售数量", prop: "saleNum", width: "70px"}, - {label: "库存数量", prop: "stockNum", width: "70px"}, + {label: "当日目标", prop: "targetNum", width: 70}, + {label: "销售数量", prop: "saleNum", width: 70}, + {label: "库存数量", prop: "stockNum", width: 70}, {label: "剩余时间预计销售数量", prop: "preSaleNum"}, {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"}, ] }, } }, + computed: { + search: v => v.$storeBoard.search, + }, methods: { getData() { const {$waitFor, $http} = window @@ -87,10 +85,11 @@ export default { }, getCameras() { return $http.post("/data-boot/la/screen/multipleStoreBoard/storeCamera", { - ...this.search, + // ...this.search, }).then(res => { if (res?.data) { this.cameras = res.data?.records?.filter(e => e.storeCameraVOList?.length > 0) || [] + console.log(this.cameras.map(e=>e.storeName)) } }) }, @@ -100,6 +99,7 @@ export default { }).then(res => { if (res?.data) { this.storeKeyGoods = res.data + this.$storeBoard.storeKeyGoods = res.data } }) }, @@ -112,10 +112,34 @@ export default { } }) }, + getTableData(item, tag) { + const v = this + const datasource = { + 重点单品情况: "keyGoods", + 品类销售情况: "categorySale", + } + return { + headerBGC: 'rgba(13, 48, 99, 0.6)', + oddRowBGC: window.evenRowBGC(), evenRowBGC: "transparent", + header: v.columns[tag].map(e => e.label), + columnWidth: v.columns[tag].map(e => e.width || "0;flex:1;min-width:0;"), + align: v.columns[tag].map(e => e.align || "left"), + data: item[datasource[tag]].map(e => v.columns[tag].map(column => column.custom == 1 ? `