|
|
@@ -100,6 +100,7 @@
|
|
|
v-model="formData.factoryId"
|
|
|
clearable
|
|
|
class="w100"
|
|
|
+ @change="getTreeData"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in factoryList"
|
|
|
@@ -110,19 +111,24 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :lg="6" :sm="8" :xs="8">
|
|
|
- <el-form-item label="创建时间" prop="time">
|
|
|
- <el-date-picker
|
|
|
- class="w100"
|
|
|
- size="small"
|
|
|
- v-model="formData.time"
|
|
|
- type="daterange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- ></el-date-picker> </el-form-item
|
|
|
- ></el-col> -->
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
+ <el-form-item label="仓库名称" prop="warehouseId">
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ v-model="formData.warehouseId"
|
|
|
+ clearable
|
|
|
+ class="w100"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in warehouseList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col
|
|
|
style="
|
|
|
display: flex;
|
|
|
@@ -295,6 +301,7 @@
|
|
|
sceneState,
|
|
|
codeList: [],
|
|
|
factoryList: [],
|
|
|
+ warehouseList:[],
|
|
|
tableData: [],
|
|
|
formData: {
|
|
|
deptIds: '',
|
|
|
@@ -305,7 +312,8 @@
|
|
|
endTime: '',
|
|
|
status: '',
|
|
|
factoryId: '',
|
|
|
- time: []
|
|
|
+ time: [],
|
|
|
+ warehouseId: ''
|
|
|
// type: 1
|
|
|
},
|
|
|
loading: false,
|
|
|
@@ -454,8 +462,22 @@
|
|
|
mounted() {
|
|
|
this.getTypeList();
|
|
|
this.getFactoryList();
|
|
|
+ this.getTreeData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getTreeData() {
|
|
|
+ this.formData.warehouseId=''
|
|
|
+ try {
|
|
|
+ let res = await storageApi.getWarehouseTrees({
|
|
|
+ factoryId: this.formData.factoryId
|
|
|
+ });
|
|
|
+ if (res?.code === '0') {
|
|
|
+ this.warehouseList = res.data;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取工厂列表
|
|
|
async getFactoryList() {
|
|
|
const res = await warehouseDefinition.getFactoryarea({
|
|
|
@@ -464,6 +486,7 @@
|
|
|
type: 1
|
|
|
});
|
|
|
this.factoryList = res.list;
|
|
|
+
|
|
|
},
|
|
|
// 单击获取id
|
|
|
cellClick(row) {
|