Compare commits

...

20 Commits

Author SHA1 Message Date
1b28903621 还原 2024-11-02 11:50:30 +08:00
39a8df2ea3 调整缩放的问题 2024-11-02 11:48:44 +08:00
aixianling
7aab2ccdf4 调整一下默认时段 2024-10-29 17:30:04 +08:00
aixianling
7b259f24db 调整一下,避免呗遮挡 2024-10-29 17:05:48 +08:00
aixianling
af296ebf51 解决初始化下拉选项的问题 2024-10-23 10:53:15 +08:00
aixianling
398b3e799c 需求变更,增加默认时段合计 2024-10-23 10:44:40 +08:00
aixianling
e6253c9ac8 优化渲染顺序 2024-10-23 10:42:53 +08:00
aixianling
88b22acf20 单店面板加入特定时间 2024-10-23 09:48:22 +08:00
aixianling
984da801c8 优化调整 2024-10-23 09:44:53 +08:00
aixianling
055c6a4579 需求变更-5 优化体验 2024-10-22 17:18:41 +08:00
aixianling
106ef3032c 需求变更-4:字段重新对 2024-10-22 16:46:01 +08:00
aixianling
1c8a98eacd 需求变更-5 2024-10-22 16:37:18 +08:00
aixianling
72510dbdc1 需求变更-9 2024-10-22 16:03:37 +08:00
aixianling
1874e145f6 需求变更-8 2024-10-22 15:56:49 +08:00
aixianling
d5c52c0098 需求变更-7 2024-10-22 15:50:39 +08:00
aixianling
197dc4bcdb 需求变更-6 2024-10-22 15:36:53 +08:00
aixianling
aaf651b8ba 需求变更-6 2024-10-22 15:36:46 +08:00
aixianling
fb8ca4d9e6 需求变更-4 2024-10-22 15:14:10 +08:00
aixianling
174aede4bc 需求变更-3 2024-10-22 14:52:47 +08:00
aixianling
7bd7174966 需求变更-1 2024-10-22 10:54:10 +08:00
18 changed files with 302 additions and 217 deletions

View File

@@ -22,7 +22,8 @@ html, body, #app {
.pb-10 {
padding-bottom: 10px;
}
.mb-10{
.mb-10 {
margin-bottom: 10px;
}
@@ -43,7 +44,10 @@ export default {
const targetHeight = 1080;
const ratio = targetWidth / targetHeight;
const element = this.$el.querySelector('.components');
const {width: originalWidth, height: originalHeight} = element.getBoundingClientRect();
if (!element) return
let {width: originalWidth, height: originalHeight} = this.$el.getBoundingClientRect();
originalWidth = originalWidth - 200
console.log("当前面板大小:", originalWidth, originalHeight)
const ratioHeight = originalWidth / ratio;
let scale
if (ratioHeight < originalHeight) {
@@ -51,7 +55,6 @@ export default {
} else {
scale = originalHeight / targetHeight;
}
element.style.transform = `scale(${scale})`;
element.style.width = '1920px'
element.style.height = '1080px'
@@ -60,6 +63,10 @@ export default {
},
mounted() {
this.scaleByAspect()
window.addEventListener('resize', this.scaleByAspect)
},
beforeDestroy() {
window.removeEventListener('resize', this.scaleByAspect)
}
}
</script>

View File

@@ -1,245 +1,251 @@
#app {
font-weight: normal;
font-weight: normal;
}
a, .green {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
}
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
}
.AppSelect .el-input__inner {
background: linear-gradient(180deg, rgba(12, 53, 111, 0) 0%, #0C356F 100%);
border: 1px solid #1760AE;
border-radius: 0;
color: #fff;
background: linear-gradient(180deg, rgba(12, 53, 111, 0) 0%, #0C356F 100%);
border: 1px solid #1760AE;
border-radius: 0;
color: #fff;
}
.el-table:before, .el-table:after {
background: transparent;
background: transparent;
}
.el-table .gutter {
background-color: transparent !important;
border-color: transparent !important;
background-color: transparent !important;
border-color: transparent !important;
}
.flex {
display: flex;
display: flex;
}
.fill {
flex: 1;
min-height: 0;
min-width: 0;
flex: 1;
min-height: 0;
min-width: 0;
}
.pointer {
cursor: pointer;
cursor: pointer;
}
.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
display: grid;
grid-template-columns: repeat(4, 1fr);
}
.mb-8 {
margin-bottom: 8px;
margin-bottom: 8px;
}
.mr-8 {
margin-right: 8px;
margin-right: 8px;
}
.dv-scroll-board {
overflow: hidden;
overflow: hidden;
}
.dv-scroll-board .header {
align-items: center;
padding: 6px 0;
align-items: center;
padding: 6px 0;
}
.dv-scroll-board .header-item, .tableHead .item {
height: initial !important;
line-height: 17px !important;
font-weight: bold;
height: initial !important;
line-height: 17px !important;
font-weight: bold;
}
.dv-scroll-board .ceil {
padding: 6px 10px !important;
padding: 6px 10px !important;
}
.dv-scroll-board .row-item {
overflow: hidden;
overflow: hidden;
}
.dv-scroll-board .ceil, .dv-scroll-board .header-item {
text-wrap: unset !important;
word-break: break-all;
font-size: 12px;
line-height: 17px
text-wrap: unset !important;
word-break: break-all;
font-size: 12px;
line-height: 17px
}
.summary {
height: 30px;
align-items: center;
color: #66FFFF;
background-image: linear-gradient(90deg, rgba(1, 196, 236, 0.5) 0%, rgba(1, 196, 236, 0.01) 100%);
height: 30px;
align-items: center;
color: #66FFFF;
background-image: linear-gradient(90deg, rgba(1, 196, 236, 0.5) 0%, rgba(1, 196, 236, 0.01) 100%) !important;
background-size: 100% 100% !important;
}
.tableHead {
height: 30px;
align-items: center;
background-color: rgba(13, 48, 99, 0.6);
height: 30px;
align-items: center;
background-color: rgba(13, 48, 99, 0.6);
}
.summary .item, .tableHead .item {
font-size: 12px;
font-weight: bold;
padding: 0 6px;
align-items: center;
box-sizing: border-box;
line-height: 17px;
flex-shrink: 0;
font-size: 12px;
font-weight: bold;
padding: 0 6px;
align-items: center;
box-sizing: border-box;
line-height: 17px;
flex-shrink: 0;
}
.summary .tableCell {
color: #66FFFF !important;
}
.summary .item {
white-space: wrap;
word-break: break-all;
white-space: wrap;
word-break: break-all;
}
.dialogTable {
position: fixed !important;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 600px !important;
height: 300px;
z-index: 9999;
background-color: #07193D;
box-shadow: #66FFFF 0 0 20px;
position: fixed !important;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 600px !important;
height: 300px;
z-index: 9999;
background-color: #07193D;
box-shadow: #66FFFF 0 0 20px;
}
.scrollTable {
color: #fff;
box-sizing: border-box;
background: transparent !important;
border-color: transparent;
color: #fff;
box-sizing: border-box;
background: transparent !important;
border-color: transparent;
}
.scrollTable .tableHeader {
background: rgba(13, 48, 99, 0.6) !important;
color: #fff;
border-color: transparent !important;
background: rgba(13, 48, 99, 0.6) !important;
color: #fff;
border-color: transparent !important;
}
.scrollTable tr {
background-color: transparent !important;
background-color: transparent !important;
}
.scrollTable .el-table__footer-wrapper tr {
background: linear-gradient(90deg, rgba(1, 196, 236, 0.5) 0%, rgba(1, 196, 236, 0.01) 100%);
background: linear-gradient(90deg, rgba(1, 196, 236, 0.5) 0%, rgba(1, 196, 236, 0.01) 100%);
}
.scrollTable .el-table__footer-wrapper .is-leaf {
color: #66FFFF;
background: transparent;
border-color: transparent;
color: #66FFFF;
background: transparent;
border-color: transparent;
}
.scrollTable:before {
background: transparent !important;
background: transparent !important;
}
.scrollTable .el-table__cell.gutter, .scrollTable [name=gutter] {
display: none;
display: none;
}
.scrollTable .simplebar-scrollbar:before {
background: #ddd;
background: #ddd;
}
.scrollTable .el-table__body {
width: 100% !important;
width: 100% !important;
}
.scrollTable .el-table__body-wrapper {
overflow-x: hidden !important;
overflow-x: hidden !important;
}
.scrollTable .tableCell {
color: #fff;
border-color: transparent !important;
color: #fff;
border-color: transparent !important;
}
.scrollTable .cell {
text-wrap: unset !important;
word-break: break-all;
font-size: 12px;
padding-left: 6px !important;
padding-right: 6px !important;
text-wrap: unset !important;
word-break: break-all;
font-size: 12px;
padding-left: 6px !important;
padding-right: 6px !important;
}
.scrollTable .el-table__cell {
padding: 3px 0 !important;
padding: 3px 0 !important;
}
.scrollTable tr.el-table__row--striped {
--odd-bg: #09265B;
background-color: #081F48;
background-image: linear-gradient(
-45deg, var(--odd-bg) 0, var(--odd-bg) 10%, transparent 10%, transparent 50%,
var(--odd-bg) 50%, var(--odd-bg) 60%, transparent 60%, transparent);
background-size: 10px 10px;
--odd-bg: #09265B;
background-color: #081F48;
background-image: linear-gradient(
-45deg, var(--odd-bg) 0, var(--odd-bg) 10%, transparent 10%, transparent 50%,
var(--odd-bg) 50%, var(--odd-bg) 60%, transparent 60%, transparent);
background-size: 10px 10px;
}
.scrollTable tr.el-table__row--striped .tableCell {
background-color: transparent !important;
background-color: transparent !important;
}
.scrollTable tr:hover > .tableCell {
background-color: rgba(255, 255, 255, .1) !important;
background-color: rgba(255, 255, 255, .1) !important;
}
.AppSubTitle {
height: 48px;
padding: 8px 0 8px 38px;
margin-bottom: 24px;
box-sizing: border-box;
line-height: 32px;
background-image: url("http://10.0.97.209/img/kengee/kengee4.png");
background-repeat: no-repeat;
background-size: 100% 100%;
color: #fff;
max-width: 400px;
display: flex;
align-items: center;
gap: 16px;
position: relative;
height: 48px;
padding: 8px 0 8px 38px;
margin-bottom: 12px;
box-sizing: border-box;
line-height: 32px;
background-image: url("http://10.0.97.209/img/kengee/kengee4.png");
background-repeat: no-repeat;
background-size: 400px 100%;
color: #fff;
max-width: 100%;
min-width: 400px;
display: flex;
align-items: center;
gap: 16px;
position: relative;
}
.AppSubTitle span {
font-size: 12px;
color: #215A8E;
font-size: 12px;
color: #215A8E;
}
.AppSubTitle > .right {
position: absolute;
right: -30px;
top: 50%;
transform: translateY(-50%);
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.AppSubTitle .el-select {
width: 120px;
width: 120px;
}

View File

@@ -2,7 +2,7 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const ctx = import.meta.glob('../views/App*.vue', {eager: true})
const ctx = import.meta.glob('../views/**/App*.vue', {eager: true})
const routes = [{path: '/', name: 'home'}]
Object.values(ctx).map(file => {
if (file.default) {

View File

@@ -65,6 +65,7 @@ window.evenRowBGC = (color = "#09265B") => `transparent;background-image: linear
Vue.prototype.$marketBoard = Vue.observable({
screenId: '5b1849ac-4fc3-451a-844c-3362b47341ef',
goodsCategoryId: "",
search: {"groupCodeList": [], "currentDate": "20240701", "compareDate": "20240630", "hourNum": "18"}
})
Vue.prototype.$multipleStoreBoard = Vue.observable({
@@ -146,12 +147,13 @@ Vue.component("scrollTable", {
},
methods: {
initScroll() {
const {SimpleBar} = window
const dom = this.$el.querySelector('.el-table__body-wrapper')
this.scroll = new SimpleBar(dom)
dom.addEventListener('mouseover', this.stopAutoScroll)
// dom.addEventListener('mouseout', this.autoScroll)
// this.scroll.refresh();
const {SimpleBar, $waitFor} = window
$waitFor(this.$el.querySelector('.el-table__body-wrapper')).then(dom => {
this.scroll = new SimpleBar(dom)
dom.addEventListener('mouseover', this.stopAutoScroll)
// dom.addEventListener('mouseout', this.autoScroll)
// this.scroll.refresh();
})
},
autoScroll() {
if (this.timer) clearInterval(this.timer)
@@ -165,7 +167,8 @@ Vue.component("scrollTable", {
}, 60)
},
stopAutoScroll() {
this.$el.querySelector('.simplebar-vertical').style.display = 'block'
const {$waitFor} = window
$waitFor(this.$el.querySelector('.simplebar-vertical')).then(dom => dom.style.display = 'block')
if (this.timer) clearInterval(this.timer)
}
},

View File

@@ -20,11 +20,12 @@ export default {
],
重点单品情况: [
{label: "重点单品", prop: "goodsName"},
{label: "当日目标", prop: "targetNum", width: 70},
{label: "销售数量", prop: "saleNum", width: 70},
{label: "库存数量", prop: "stockNum", width: 70},
{label: "昨日销售数量", prop: "yesterdaySaleNum", width: 70},
{label: "上周同天销售数量", prop: "lastWeekSaleNum", width: 70},
{label: "今日销售数量", prop: "saleNum", width: 70},
{label: "现在库存数量", prop: "stockNum", width: 70},
{label: "剩余时间预计销售数量", prop: "preSaleNum"},
{label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
// {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
],
周边库存情况: [
{label: "门店名称", prop: "storeName"},
@@ -43,8 +44,9 @@ export default {
methods: {
getData() {
const {$waitFor, $http} = window
const {type, compareDate} = this.search
console.log("筛选条件:", this.search)
$waitFor($http).then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]))
$waitFor($http && (type != 3 || compareDate)).then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]))
.then(() => {
this.list = [
{label: "西点柜", value: "104"},

View File

@@ -16,13 +16,16 @@ export default {
{label: "西点销售额", prop: "westSaleAmt", width: 60, align: 'right', headerAlign: 'left'},
{label: "现烤销售额", prop: "bakeSaleAmt", width: 60, align: 'right', headerAlign: 'left'},
{label: "现烤损货比", prop: "lossAmtRate", width: 60, align: 'right', headerAlign: 'left'},
{label: "环比(目标完成比)", prop: "targetRate", align: 'right', headerAlign: 'left'},
{label: "环比(目标完成比)", prop: "targetRate", align: 'center', headerAlign: 'left'},
],
summary: {}
summary: {},
filter: "",
options: []
}
},
computed: {
search: v => v.$marketBoard.search,
dicts: v => window.$dicts || {},
tableConfig: v => {
return {
headerBGC: 'rgba(13, 48, 99, 0.6)',
@@ -52,20 +55,29 @@ export default {
methods: {
getTableData() {
const {$http, $waitFor} = window
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/groupMonitor", {
...this.search, limit: 999
return $waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/groupMonitor", {
...this.search, limit: 999, groupCodeList: [this.filter].filter(Boolean)
})).then(res => {
if (res?.data) {
this.summary = res.data.total
this.tableData = res.data?.page?.records || []
}
})
},
getOptions() {
const ops = {}
this.tableData.forEach(e => {
ops[e.groupCode] = e.groupName
})
return Object.entries(ops).map(([key, value]) => ({label: value, value: key}))
}
},
watch: {
search: {
immediate: true, deep: true, handler() {
this.getTableData()
this.getTableData().then(() => {
if (this.options.length == 0) this.options = this.getOptions()
})
}
}
}
@@ -75,6 +87,13 @@ export default {
<template>
<section class="AppGroupMonitorTable">
<!--<dv-scroll-board :config="tableConfig"/>-->
<app-sub-title text="课区运营监控表">
<template #right>
<el-select placeholder="全部" v-model="filter" size="small" clearable class="AppSelect" @change="getTableData">
<el-option v-for="(op,i) in options" :key="i" v-bind="op"/>
</el-select>
</template>
</app-sub-title>
<scroll-table :table-data="tableData" :columns="columns"/>
<div class="summary flex">
<div class="item" v-for="(col,i) in summaryRow" :key="i" v-text="col.value" :style="col.style"/>
@@ -89,6 +108,10 @@ export default {
}
.AppGroupMonitorTable .dv-scroll-board, .AppGroupMonitorTable .scrollTable {
height: calc(100% - 30px) !important;
height: calc(100% - 80px) !important;
}
.AppGroupMonitorTable .el-select {
width: 140px !important;
}
</style>

View File

@@ -1,4 +1,5 @@
<script>
const sort = [108, 109, 104, 101, 102, 103, 106, 107, 105].map(e => `${e}`)
export default {
name: "AppHourCount",
label: "市场看板-全门店时段合计",
@@ -73,7 +74,7 @@ export default {
...this.search, limit: 999
})).then(res => {
if (res?.data) {
this.tableData = res.data?.page?.records || []
this.tableData = res.data?.page?.records?.sort((a, b) => sort.indexOf(a.categoryId) - sort.indexOf(b.categoryId)) || []
this.summary = res.data?.total
}
})
@@ -109,7 +110,7 @@ export default {
min-width: 480px;
}
.AppHourCount .dv-scroll-board,.AppHourCount .scrollTable{
height: calc(100% - 60px);
.AppHourCount .dv-scroll-board, .AppHourCount .scrollTable {
height: calc(100% - 50px) !important;
}
</style>

View File

@@ -1,4 +1,5 @@
<script>
const getHourRange = hour => `${hour.padStart(2, '0')}:00-${`${Number(hour) + 1}`.padStart(2, '0')}:00`
export default {
name: "AppHourSale",
label: "市场看板-全门店时段销售",
@@ -85,29 +86,30 @@ export default {
methods: {
getTableData() {
const {$http, $waitFor} = window
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/hourSale", {
return $waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/hourSale", {
...this.search, limit: 999
})).then(res => {
if (res?.data) {
this.summary = res.data.total
this.tableData = res.data?.page?.records?.map(e => ({...e, hour: `${e.hour.padStart(2, '0')}:00-${`${Number(e.hour) + 1}`.padStart(2, '0')}:00`})) || []
return this.tableData = res.data?.page?.records?.map(e => ({...e, hour: getHourRange(e.hour), index: e.hour})).sort((a, b) => a.index - b.index) || []
}
})
},
handleSta({hour}) {
this.handleMouseout()
const rowIndex = this.tableData.findIndex(e => e.hour == hour)
const v = this
const summary = {
compareSaleAmt: 0, compareValidOrderNum: 0, currentSaleAmt: 0, currentValidOrderNum: 0, saleGrowthRate: 0
}
console.log(rowIndex)
v.tableData.forEach((e, i) => {
if (i <= rowIndex) {
summary.compareSaleAmt += Number(e.compareSaleAmt || 0)
summary.compareValidOrderNum += Number(e.compareValidOrderNum || 0)
summary.currentSaleAmt += Number(e.currentSaleAmt || 0)
summary.currentValidOrderNum += Number(e.currentValidOrderNum || 0)
summary.saleGrowthRate += Number(e.saleGrowthRate.replace("%", "") || 0)
const {currentSaleAmt, compareSaleAmt} = summary
summary.saleGrowthRate = Number((currentSaleAmt - compareSaleAmt) / compareSaleAmt * 100 || 0)
}
if (i == rowIndex) {
summary.compareSaleAmt = summary.compareSaleAmt.toFixed(2)
@@ -117,46 +119,68 @@ export default {
summary.saleGrowthRate = summary.saleGrowthRate.toFixed(2) + "%"
}
})
this.hourSummary = v.tableColumns.map((column, i) => {
const isNumber = v => /^-?\d+(\.\d+)?%?$/.test(v)
const style = {textAlign: column.align}
if (column.width > 0) {
style.width = `${column.width}px`
} else {
style.flex = 1
style.minWidth = 0
}
return {
style,
value: isNumber(summary[column.prop]) ? summary[column.prop] :
i == 0 ? "时段合计" : ""
}
const summaryRow = {}
v.tableColumns.forEach(({prop}, i) => {
summaryRow[prop] = i == 0 ? "时段合计" : (summary[prop] || '')
})
this.hourSummaryStyle.display = "flex"
v.tableData.splice(rowIndex + 1, 0, summaryRow)
// this.hourSummary = v.tableColumns.map((column, i) => {
// const isNumber = v => /^-?\d+(\.\d+)?%?$/.test(v)
// const style = {textAlign: column.align}
// if (column.width > 0) {
// style.width = `${column.width}px`
// } else {
// style.flex = 1
// style.minWidth = 0
// }
// return {
// style,
// value: isNumber(summary[column.prop]) ? summary[column.prop] :
// i == 0 ? "时段合计" : ""
// }
// })
// this.hourSummaryStyle.display = "flex"
},
handleMouseOver(evt) {
const getTop = e => e.offsetParent ? getTop(e.offsetParent) + e.offsetTop : e.offsetTop
const top = getTop(this.$el)
// this.$set(this.hourSummaryStyle, "top", (evt.clientY - top + 10) + "px")
handleRowStyle({row}) {
if (row.hour == '时段合计') return 'summary'
return ''
},
handleMouseout() {
// this.hourSummaryStyle = {display: 'none'}
const i = this.tableData.findIndex(e => e.hour == '时段合计')
if (i == -1) return;
this.tableData.splice(i, 1)
},
initHourSta() {
const {dayjs} = window
const hour = getHourRange(`${dayjs().hour()}`)
this.handleSta({hour})
}
},
watch: {
search: {
immediate: true, deep: true, handler() {
this.getTableData()
this.getTableData().then(() => this.initHourSta())
}
}
},
mounted() {
document.addEventListener('click', evt => {
if (!this.$el.contains(evt.target)) {
this.initHourSta()
}
})
}
}
</script>
<template>
<section class="AppHourSale" @mousemove="handleMouseOver">
<scroll-table :table-data="tableData" :columns="columns" @click="handleSta" @mouseout.native="hourSummaryStyle={display:'none'}"/>
<section class="AppHourSale">
<scroll-table :table-data="tableData" :columns="columns" @click="handleSta" @click.native.stop :config="{rowClassName:handleRowStyle}"/>
<!--<dv-scroll-board :config="tableConfig" @mouseover="handleSta" @mouseout.native="hourSummaryStyle={display:'none'}"/>-->
<div class="summary flex hourSummary" :style="hourSummaryStyle">
<div class="item" v-for="(col,i) in hourSummary" :key="i" v-text="col.value" :style="col.style"/>
</div>
<!-- <div class="summary flex hourSummary" :style="hourSummaryStyle">-->
<!-- <div class="item" v-for="(col,i) in hourSummary" :key="i" v-text="col.value" :style="col.style"/>-->
<!-- </div>-->
<div class="summary flex">
<div class="item" v-for="(col,i) in summaryRow" :key="i" v-text="col.value" :style="col.style"/>
</div>

View File

@@ -1,9 +1,6 @@
<script>
import AppSubTitle from "@/views/AppSubTitle.vue";
export default {
name: "AppKeyGoods",
components: {AppSubTitle},
label: "市场看板-重点单品",
data() {
return {
@@ -37,7 +34,7 @@ export default {
getTableData() {
const {$http, $waitFor} = window
const {goodsCategoryId} = this
$waitFor($http).then(() => $http.post("/data-boot/ca/screen/scStoreKeyGoods/list", {
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/marketKeyGoods", {
...this.search, limit: 999, goodsCategoryId
})).then(res => {
if (res?.data) {
@@ -75,4 +72,7 @@ export default {
color: #fff;
box-sizing: border-box;
}
.AppKeyGoods .dv-scroll-board, .AppKeyGoods .scrollTable {
height: calc(100% - 60px) !important;
}
</style>

View File

@@ -24,7 +24,7 @@ export default {
setTimeout(() => {
const compareDate = dayjs().subtract(7, "day").format("YYYYMMDD"),
currentDate = dayjs().format("YYYYMMDD"),
hourNum = new Date().getHours(),
hourNum = new Date().getHours()+1,
groupCodeList = ""
this.form = {compareDate, currentDate, hourNum, groupCodeList}
this.$set(this.$marketBoard, 'search', {compareDate, currentDate, hourNum, groupCodeList: []})

View File

@@ -40,8 +40,8 @@ export default {
this.getOptions().then(() => {
setTimeout(() => {
const {dayjs} = window
const hourNum = new Date().getHours(), groupCodeList = "", interval = 60000
const currentDate = dayjs().format("YYYYMMDD")
const hourNum = new Date().getHours()+1, groupCodeList = "", interval = 60000
const currentDate = dayjs().subtract(7, 'day').format("YYYYMMDD")
this.form = {hourNum, groupCodeList, type: "1", changeWay: "1", currentDate, interval}
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: "", currentDate, interval})
}, 500)

View File

@@ -31,7 +31,8 @@ export default {
methods: {
getData() {
const {$http, $waitFor} = window
$waitFor($http).then(() => $http.post('/data-boot/la/screen/singleStoreBoard/overview', {...this.search}).then(res => {
const {type, compareDate} = this.search
$waitFor($http&& (type != 3 || compareDate)).then(() => $http.post('/data-boot/la/screen/singleStoreBoard/overview', {...this.search}).then(res => {
if (res?.data) {
this.info = res.data
}

View File

@@ -26,7 +26,7 @@ export default {
this.getOptions().then(() => {
setTimeout(() => {
const {dayjs} = window
const hourNum = new Date().getHours(),
const hourNum = new Date().getHours()+1,
storeCode = this.$storeBoard.search.storeCode || this.options?.[0].storeCode
const currentDate = dayjs().format("YYYYMMDD")
this.form = {hourNum, storeCode, type: "1", currentDate}
@@ -49,6 +49,9 @@ export default {
<el-option v-for="item in dicts.类型" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="特定日期" v-if="form.type==3">
<el-date-picker v-model="form.compareDate" @change="v=>$set($storeBoard.search, 'compareDate', v)" clearable type="date" value-format="yyyyMMdd"/>
</el-form-item>
<div class="fill" v-text="storeName"/>
<el-form-item label="门店">
<el-select v-model="form.storeCode" @change="v=>$storeBoard.search.storeCode=v" clearable placeholder="全部" class="storeSelect" filterable>

View File

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

View File

@@ -14,19 +14,21 @@ export default {
columns: {
品类销售情况: [
{label: "品类", prop: "secondCategoryName"},
{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: "currentSaleAmt"},
{label: "库存金额", prop: "currentStockAmt"},
// {label: "同/环比销售额", prop: "compareSaleAmt", width: 70},
// {label: "同/环比库存金额", prop: "compareStockAmt", width: 70},
// {label: "前四周日均销售额", prop: "avg4WeekSaleAmt", width: 70},
],
重点单品情况: [
{label: "重点单品", prop: "name"},
{label: "当日目标", prop: "targetNum", width: 70},
{label: "销售数量", prop: "saleNum", width: 70},
{label: "库存数量", prop: "stockNum", width: 70},
// {label: "当日目标", prop: "targetNum", width: 70},
{label: "昨日销售数量", prop: "yesterdaySaleNum", width: 70},
{label: "上周同天销售数量", prop: "lastWeekSaleNum", width: 70},
{label: "今日销售数量", prop: "saleNum", width: 70},
{label: "现在库存数量", prop: "stockNum", width: 70},
{label: "剩余时间预计销售数量", prop: "preSaleNum"},
{label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
// {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
],
周边库存情况: [
{label: "门店名称", prop: "storeName"},
@@ -75,7 +77,7 @@ export default {
methods: {
getData() {
const {$http, $waitFor} = window
const {groupCodeList, type, compareDate} = this.search
const {type, compareDate} = this.search
console.log("筛选条件:", this.search)
return $waitFor($http && (type != 3 || compareDate)).then(() => this.getStores())
.then(codes => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]).then(() => codes))

View File

@@ -12,32 +12,35 @@ import AppHourCount from "@/views/AppHourCount.vue";
export default {
name: "AppMarketBoard",
label: "市场看板",
components: { AppHourCount, AppHourSale, AppStoreMonitor, AppGroupMonitorTable, AppKeyGoods, AppSalesPerformance, AppMap, AppNavbar, AppMarketBoardFilter}
components: {AppHourCount, AppHourSale, AppStoreMonitor, AppGroupMonitorTable, AppKeyGoods, AppSalesPerformance, AppMap, AppNavbar, AppMarketBoardFilter}
}
</script>
<template>
<section class="AppMarketBoard">
<app-navbar class="mb-10"/>
<app-market-board-filter/>
<div class="flex" style="gap:20px">
<div class="fill">
<div class="flex gap">
<div style="width: 430px;">
<app-sub-title/>
<app-sales-performance style="margin-bottom: 20px"/>
<app-key-goods/>
<app-sales-performance style="margin-bottom: 10px"/>
<app-key-goods style="height: 208px"/>
</div>
<div class="fill">
<app-market-board-filter/>
<app-map style="height: calc(100% - 50px)"/>
</div>
<app-map class="fill"/>
</div>
<div class="flex gap">
<div class="flex gap" style="height: 394px">
<app-group-monitor-table class="fill"/>
<app-store-monitor class="fill"/>
</div>
</div>
<div style="width: 480px;">
<app-hour-sale/>
<app-hour-count/>
<app-sub-title text="全门店时段销售"/>
<app-hour-sale style="height: 600px"/>
<app-hour-count style="height: 260px"/>
</div>
</div>
</section>
@@ -48,7 +51,8 @@ export default {
width: 100%;
height: 100%;
}
.gap{
.gap {
gap: 20px;
}
</style>

View File

@@ -12,7 +12,7 @@ export default {
<template>
<section class="AppMultipleStoreBoard">
<app-navbar/>
<app-navbar class="mb-10"/>
<app-multiple-store-board-filter/>
<app-stores-table class="fill"/>
</section>