增加多店的联动

This commit is contained in:
2024-07-08 23:03:11 +08:00
parent 31586c2b00
commit dd04a64368
2 changed files with 7 additions and 3 deletions

View File

@@ -50,6 +50,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($multipleStoreBoard.search, 'compareDate', v)" clearable type="date" value-format="yyyyMMdd"/>
</el-form-item>
<div class="fill"/>
<el-form-item label="课长">
<el-select v-model="form.groupCodeList" @change="v=>$multipleStoreBoard.search.groupCodeList=[v]" clearable placeholder="全部">
@@ -57,7 +60,7 @@ export default {
</el-select>
</el-form-item>
<el-form-item label="时段">
<el-select v-model="form.hourNum" size="small" format="HH:mm" value-format="H" @change="v=>$multipleStoreBoard.search.hourNum=v" clearable placeholder="全部">
<el-select v-model="form.hourNum" size="small" @change="v=>$multipleStoreBoard.search.hourNum=v" clearable placeholder="全部">
<el-option v-for="item in dateOptions" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
@@ -84,7 +87,7 @@ export default {
}
.AppMultipleStoreBoardFilter .el-input {
width: 100%;
width: 100% !important;
}
.AppMultipleStoreBoardFilter .el-form-item__label {

View File

@@ -102,8 +102,9 @@ export default {
methods: {
getData() {
const {$http, $waitFor} = window
const {groupCodeList, type, compareDate} = this.search
console.log("筛选条件:", this.search)
$waitFor($http && this.search.groupCodeList.length > 0).then(() => this.getStores())
$waitFor($http && groupCodeList.length > 0 && (type != 3 || compareDate)).then(() => this.getStores())
.then(codes => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]).then(() => codes))
.then((codes = []) => {
this.stores = codes?.map(storeCode => {