2024-06-28 18:14:48 +08:00
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "AppKeyGoods",
|
|
|
|
|
label: "市场看板-重点单品",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tableData: [],
|
2024-06-29 13:30:06 +08:00
|
|
|
columns: [
|
2024-06-29 13:41:43 +08:00
|
|
|
{label: "重点单品", prop: "goodsCategoryName"},
|
2024-07-05 17:36:16 +08:00
|
|
|
{label: "销售额", prop: "saleNum", width: 70},
|
|
|
|
|
{label: "库存数量", prop: "stockNum", width: 70},
|
2024-07-10 13:55:30 +08:00
|
|
|
{label: "销售目标", prop: "targetSaleNum", width: 70},
|
2024-06-29 13:41:43 +08:00
|
|
|
{label: "销售达成", prop: "saleAchieveRate"},
|
2024-06-28 18:14:48 +08:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-06-29 13:30:06 +08:00
|
|
|
computed: {
|
2024-07-05 17:36:16 +08:00
|
|
|
search: v => v.$marketBoard.search,
|
|
|
|
|
tableConfig: v => {
|
|
|
|
|
return {
|
|
|
|
|
headerBGC: 'rgba(13, 48, 99, 0.6)',
|
|
|
|
|
// headerBGC: '#003B51',
|
|
|
|
|
oddRowBGC: window.evenRowBGC(), evenRowBGC: "transparent",
|
|
|
|
|
header: v.columns.map(e => e.label),
|
|
|
|
|
columnWidth: v.columns.map(e => e.width || "0;flex:1;min-width:0;"),
|
|
|
|
|
align: v.columns.map(e => e.align || "left"),
|
|
|
|
|
data: v.tableData.map(e => v.columns.map(column => e[column.prop])),
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-06-29 13:30:06 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getTableData() {
|
|
|
|
|
const {$http, $waitFor} = window
|
|
|
|
|
$waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/marketKeyGoods", {
|
2024-07-10 13:55:30 +08:00
|
|
|
...this.search, limit: 999
|
2024-06-29 13:30:06 +08:00
|
|
|
})).then(res => {
|
|
|
|
|
if (res?.data) {
|
|
|
|
|
this.tableData = res.data?.records || []
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-07-10 13:55:30 +08:00
|
|
|
watch: {
|
2024-06-29 13:49:52 +08:00
|
|
|
search: {
|
2024-07-10 13:55:30 +08:00
|
|
|
immediate: true, deep: true, handler() {
|
2024-06-29 13:49:52 +08:00
|
|
|
this.getTableData()
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-28 18:14:48 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<section class="AppKeyGoods">
|
2024-07-10 13:55:30 +08:00
|
|
|
<dv-scroll-board :config="tableConfig"/>
|
2024-06-28 18:14:48 +08:00
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.AppKeyGoods {
|
|
|
|
|
color: #fff;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
</style>
|