Compare commits
5 Commits
1845f6cc9a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ee1bb3b9a | |||
| 2663ca9e73 | |||
|
|
c2743d926e | ||
|
|
4403ec5322 | ||
|
|
9c6248e5df |
@@ -249,3 +249,20 @@ a, .green {
|
|||||||
.AppSubTitle .el-select {
|
.AppSubTitle .el-select {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes flashOpacity {
|
||||||
|
0%, 100% {
|
||||||
|
opacity: 1; /* 完全不透明 */
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0; /* 完全透明 */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 应用动画到元素 */
|
||||||
|
.flash-opacity {
|
||||||
|
.cell > span {
|
||||||
|
animation: flashOpacity 1s infinite; /* 动画名称、持续时间、重复次数 */
|
||||||
|
color: red
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -135,6 +135,10 @@ Vue.component("scrollTable", {
|
|||||||
return h('el-table', {
|
return h('el-table', {
|
||||||
props: {
|
props: {
|
||||||
headerCellClassName: 'tableHeader', cellClassName: 'tableCell', stripe: !0, height: '100%',
|
headerCellClassName: 'tableHeader', cellClassName: 'tableCell', stripe: !0, height: '100%',
|
||||||
|
rowClassName({row}) {
|
||||||
|
const item = columns.find(e => e.flash == 1)
|
||||||
|
return item?.prop && row[item.prop] <= 0 ? 'flash-opacity' : ''
|
||||||
|
},
|
||||||
...config, data: tableData,
|
...config, data: tableData,
|
||||||
}, class: 'scrollTable',
|
}, class: 'scrollTable',
|
||||||
on: {
|
on: {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default {
|
|||||||
{label: "昨日销售数量", prop: "yesterdaySaleNum", width: 70},
|
{label: "昨日销售数量", prop: "yesterdaySaleNum", width: 70},
|
||||||
{label: "上周同天销售数量", prop: "lastWeekSaleNum", width: 70},
|
{label: "上周同天销售数量", prop: "lastWeekSaleNum", width: 70},
|
||||||
{label: "今日销售数量", prop: "saleNum", width: 70},
|
{label: "今日销售数量", prop: "saleNum", width: 70},
|
||||||
{label: "现在库存数量", prop: "stockNum", width: 70},
|
{label: "现在库存数量", prop: "stockNum", width: 70, flash: 1},
|
||||||
{label: "剩余时间预计销售数量", prop: "preSaleNum"},
|
{label: "剩余时间预计销售数量", prop: "preSaleNum"},
|
||||||
// {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
// {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default {
|
|||||||
columns: [
|
columns: [
|
||||||
{label: "重点单品", prop: "goodsName"},
|
{label: "重点单品", prop: "goodsName"},
|
||||||
{label: "销售数量", prop: "saleNum", width: 70},
|
{label: "销售数量", prop: "saleNum", width: 70},
|
||||||
{label: "库存数量", prop: "stockNum", width: 70},
|
{label: "库存数量", prop: "stockNum", width: 70, flash: 1},
|
||||||
{label: "销售目标", prop: "targetSaleNum", width: 70},
|
{label: "销售目标", prop: "targetSaleNum", width: 70},
|
||||||
{label: "销售达成", prop: "saleAchieveRate"},
|
{label: "销售达成", prop: "saleAchieveRate"},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
reset() {
|
||||||
|
$http.post("/data-boot/la/screen/multipleStoreBoard/move").then(res => {
|
||||||
|
if (res?.data) {
|
||||||
|
this.$message.success("已重置")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'form.interval'(v) {
|
'form.interval'(v) {
|
||||||
@@ -41,7 +48,8 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const {dayjs} = window
|
const {dayjs} = window
|
||||||
const hourNum = new Date().getHours()+1, groupCodeList = "", interval = 60000
|
const hourNum = new Date().getHours()+1, groupCodeList = "", interval = 60000
|
||||||
const currentDate = dayjs().subtract(7, 'day').format("YYYYMMDD")
|
// const currentDate = dayjs().subtract(7, 'day').format("YYYYMMDD")
|
||||||
|
const currentDate = dayjs().format("YYYYMMDD")
|
||||||
this.form = {hourNum, groupCodeList, type: "1", changeWay: "1", currentDate, interval}
|
this.form = {hourNum, groupCodeList, type: "1", changeWay: "1", currentDate, interval}
|
||||||
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: "", currentDate, interval})
|
this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: "", currentDate, interval})
|
||||||
}, 500)
|
}, 500)
|
||||||
@@ -52,6 +60,9 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-form class="AppMultipleStoreBoardFilter flex" size="small" label-width="70px">
|
<el-form class="AppMultipleStoreBoardFilter flex" size="small" label-width="70px">
|
||||||
|
<el-form-item label-width="0">
|
||||||
|
<el-button @click="reset">一键归位</el-button>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="品类">
|
<el-form-item label="品类">
|
||||||
<el-select v-model="form.categoryId" @change="v=>$multipleStoreBoard.search.categoryId=v" clearable placeholder="全部">
|
<el-select v-model="form.categoryId" @change="v=>$multipleStoreBoard.search.categoryId=v" clearable placeholder="全部">
|
||||||
<el-option v-for="item in dicts.品类" :key="item.value" :label="item.label" :value="item.value"/>
|
<el-option v-for="item in dicts.品类" :key="item.value" :label="item.label" :value="item.value"/>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default {
|
|||||||
{label: "重点单品", prop: "goodsName"},
|
{label: "重点单品", prop: "goodsName"},
|
||||||
{label: "当日目标", prop: "targetNum", width: 70},
|
{label: "当日目标", prop: "targetNum", width: 70},
|
||||||
{label: "销售数量", prop: "saleNum", width: 70},
|
{label: "销售数量", prop: "saleNum", width: 70},
|
||||||
{label: "库存数量", prop: "stockNum", width: 70},
|
{label: "库存数量", prop: "stockNum", width: 70, flash: 1},
|
||||||
{label: "预计销售数量", prop: "preSaleNum", width: 70},
|
{label: "预计销售数量", prop: "preSaleNum", width: 70},
|
||||||
{label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
{label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
|
function throttle(func, limit = 500) {
|
||||||
|
let timer;
|
||||||
|
return function () {
|
||||||
|
if (timer) {
|
||||||
|
clearTimeout(timer)
|
||||||
|
}
|
||||||
|
timer = setTimeout(func, limit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppStoresTable",
|
name: "AppStoresTable",
|
||||||
label: "多店监控",
|
label: "多店监控",
|
||||||
@@ -26,7 +36,7 @@ export default {
|
|||||||
{label: "昨日销售数量", prop: "yesterdaySaleNum", width: 70},
|
{label: "昨日销售数量", prop: "yesterdaySaleNum", width: 70},
|
||||||
{label: "上周同天销售数量", prop: "lastWeekSaleNum", width: 70},
|
{label: "上周同天销售数量", prop: "lastWeekSaleNum", width: 70},
|
||||||
{label: "今日销售数量", prop: "saleNum", width: 70},
|
{label: "今日销售数量", prop: "saleNum", width: 70},
|
||||||
{label: "现在库存数量", prop: "stockNum", width: 70},
|
{label: "现在库存数量", prop: "stockNum", width: 70, flash: 1},
|
||||||
{label: "剩余时间预计销售数量", prop: "preSaleNum"},
|
{label: "剩余时间预计销售数量", prop: "preSaleNum"},
|
||||||
// {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
// {label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
||||||
],
|
],
|
||||||
@@ -44,7 +54,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
search: v => v.$multipleStoreBoard.search,
|
search: v => {
|
||||||
|
const search = JSON.parse(JSON.stringify(v.$multipleStoreBoard.search))
|
||||||
|
delete search.t
|
||||||
|
return search
|
||||||
|
},
|
||||||
|
refreshTimer: v => v.search.t,
|
||||||
storeList: v => {
|
storeList: v => {
|
||||||
const list = []
|
const list = []
|
||||||
let group = []
|
let group = []
|
||||||
@@ -65,17 +80,22 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
search: {
|
search: {
|
||||||
immediate: true, deep: true, handler(v, old) {
|
immediate: true, deep: true, handler(v) {
|
||||||
if (old) {
|
this.getData().then(() => {
|
||||||
delete v.t
|
|
||||||
old?.t && delete old.t
|
|
||||||
}
|
|
||||||
(old && JSON.stringify(v) == JSON.stringify(old) ? this.refreshData() : this.getData()).then(() => {
|
|
||||||
if (v.interval > 0 && v.changeWay == '1') {
|
if (v.interval > 0 && v.changeWay == '1') {
|
||||||
this.$refs.carousel?.$forceUpdate()
|
this.$refs.carousel?.$forceUpdate()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
refreshTimer() {
|
||||||
|
console.log("刷新")
|
||||||
|
this.refreshData().then(() => {
|
||||||
|
const v = this.search
|
||||||
|
if (v.interval > 0 && v.changeWay == '1') {
|
||||||
|
this.$refs.carousel?.$forceUpdate()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -112,21 +132,27 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStoreKeyGoods() {
|
getStoreKeyGoods() {
|
||||||
return $http.post("/data-boot/la/screen/multipleStoreBoard/storeKeyGoods", {
|
return new Promise(resolve => {
|
||||||
type: "1", ...this.search,
|
throttle(() => $http.post("/data-boot/la/screen/multipleStoreBoard/storeKeyGoods", {
|
||||||
}).then(res => {
|
type: "1", ...this.search,
|
||||||
if (res?.data) {
|
}).then(res => {
|
||||||
this.storeKeyGoods = res.data
|
if (res?.data) {
|
||||||
}
|
this.storeKeyGoods = res.data
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
}))()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCategorySales() {
|
getCategorySales() {
|
||||||
return $http.post("/data-boot/la/screen/multipleStoreBoard/categorySale", {
|
return new Promise(resolve => {
|
||||||
type: "1", ...this.search,
|
throttle(() => $http.post("/data-boot/la/screen/multipleStoreBoard/categorySale", {
|
||||||
}).then(res => {
|
type: "1", ...this.search,
|
||||||
if (res?.data) {
|
}).then(res => {
|
||||||
this.categorySales = res.data
|
if (res?.data) {
|
||||||
}
|
this.categorySales = res.data
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
}))()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gotoDetail(store, i) {
|
gotoDetail(store, i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user