|
@@ -17,6 +17,7 @@
|
|
|
v-model="params.factoryId"
|
|
v-model="params.factoryId"
|
|
|
clearable
|
|
clearable
|
|
|
class="w100"
|
|
class="w100"
|
|
|
|
|
+ @change="onFactoryChange"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in factoryList"
|
|
v-for="item in factoryList"
|
|
@@ -211,7 +212,6 @@
|
|
|
dimension: '2',
|
|
dimension: '2',
|
|
|
keyWord: '',
|
|
keyWord: '',
|
|
|
colorKey: '',
|
|
colorKey: '',
|
|
|
- factoryId: '',
|
|
|
|
|
color: ''
|
|
color: ''
|
|
|
};
|
|
};
|
|
|
return {
|
|
return {
|
|
@@ -239,7 +239,7 @@
|
|
|
label: '未质检'
|
|
label: '未质检'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- warehouseList: [],
|
|
|
|
|
|
|
+ allWarehouseList: [],
|
|
|
dimension: '1',
|
|
dimension: '1',
|
|
|
factoryList: []
|
|
factoryList: []
|
|
|
};
|
|
};
|
|
@@ -263,6 +263,14 @@
|
|
|
// 是否开启响应式布局
|
|
// 是否开启响应式布局
|
|
|
styleResponsive() {
|
|
styleResponsive() {
|
|
|
return this.$store.state.theme.styleResponsive;
|
|
return this.$store.state.theme.styleResponsive;
|
|
|
|
|
+ },
|
|
|
|
|
+ warehouseList() {
|
|
|
|
|
+ if (!this.params.factoryId) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ return this.allWarehouseList.filter(
|
|
|
|
|
+ (item) => item.factoryId === this.params.factoryId
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -282,7 +290,11 @@
|
|
|
//搜索数据源
|
|
//搜索数据源
|
|
|
async getArguInfo() {
|
|
async getArguInfo() {
|
|
|
const { data } = await getWarehouseList();
|
|
const { data } = await getWarehouseList();
|
|
|
- this.warehouseList = data;
|
|
|
|
|
|
|
+ this.allWarehouseList = data;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 切换工厂时从已加载的仓库列表中过滤
|
|
|
|
|
+ async onFactoryChange(factoryId) {
|
|
|
|
|
+ this.params.warehouseId = '';
|
|
|
},
|
|
},
|
|
|
/* 搜索 */
|
|
/* 搜索 */
|
|
|
search() {
|
|
search() {
|