新增销售小时字段并更新相关视图逻辑
This commit is contained in:
@@ -66,6 +66,7 @@ window.evenRowBGC = (color = "#09265B") => `transparent;background-image: linear
|
|||||||
Vue.prototype.$marketBoard = Vue.observable({
|
Vue.prototype.$marketBoard = Vue.observable({
|
||||||
screenId: '5b1849ac-4fc3-451a-844c-3362b47341ef',
|
screenId: '5b1849ac-4fc3-451a-844c-3362b47341ef',
|
||||||
thirdGoods: {},
|
thirdGoods: {},
|
||||||
|
saleHour: undefined,
|
||||||
search: {"groupCodeList": [], "currentDate": "20240701", "compareDate": "20240630", "hourNum": "18"}
|
search: {"groupCodeList": [], "currentDate": "20240701", "compareDate": "20240630", "hourNum": "18"}
|
||||||
})
|
})
|
||||||
Vue.prototype.$multipleStoreBoard = Vue.observable({
|
Vue.prototype.$multipleStoreBoard = Vue.observable({
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
search: v => v.$marketBoard.search,
|
search: v => v.$marketBoard.search,
|
||||||
|
saleHour: v => v.$marketBoard.saleHour,
|
||||||
columns: v => {
|
columns: v => {
|
||||||
return [
|
return [
|
||||||
{label: '品类', prop: "categoryName", width: 100},
|
{label: '品类', prop: "categoryName", width: 100},
|
||||||
@@ -70,8 +71,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getTableData() {
|
getTableData() {
|
||||||
const {$http, $waitFor} = window
|
const {$http, $waitFor} = window
|
||||||
|
const {saleHour: hourNum} = this
|
||||||
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/hourCount", {
|
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/hourCount", {
|
||||||
...this.search, limit: 999
|
...this.search, limit: 999, hourNum
|
||||||
})).then(res => {
|
})).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.tableData = res.data?.page?.records?.sort((a, b) => sort.indexOf(a.categoryId) - sort.indexOf(b.categoryId)) || []
|
this.tableData = res.data?.page?.records?.sort((a, b) => sort.indexOf(a.categoryId) - sort.indexOf(b.categoryId)) || []
|
||||||
@@ -85,6 +87,9 @@ export default {
|
|||||||
immediate: true, deep: true, handler() {
|
immediate: true, deep: true, handler() {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
saleHour() {
|
||||||
|
this.getTableData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ export default {
|
|||||||
},
|
},
|
||||||
handleSta({hour}) {
|
handleSta({hour}) {
|
||||||
this.handleMouseout()
|
this.handleMouseout()
|
||||||
|
const hourNum = Number(hour?.substring(0, 2) || -1)
|
||||||
|
this.$set(this.$marketBoard, 'saleHour', hourNum < this.search.hourNum ? hourNum : undefined)
|
||||||
const rowIndex = this.tableData.findIndex(e => e.hour == hour)
|
const rowIndex = this.tableData.findIndex(e => e.hour == hour)
|
||||||
const v = this
|
const v = this
|
||||||
const summary = {
|
const summary = {
|
||||||
|
|||||||
Reference in New Issue
Block a user