单店面板加入特定时间

This commit is contained in:
aixianling
2024-10-23 09:48:22 +08:00
parent 984da801c8
commit 88b22acf20
3 changed files with 7 additions and 2 deletions

View File

@@ -44,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

@@ -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

@@ -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>