|
@@ -141,6 +141,23 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="8" style="margin-bottom: 12px">
|
|
|
|
|
+ <el-form-item label="线边仓:" prop="warehouseList">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="warehouseId"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <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 :span="8" style="margin-bottom: 12px">
|
|
<el-col :span="8" style="margin-bottom: 12px">
|
|
|
<el-form-item label="联系方式:" prop="extInfo.phone">
|
|
<el-form-item label="联系方式:" prop="extInfo.phone">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -343,7 +360,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { saveOrUpdate, listWorkshopByParentId } from '@/api/factoryModel';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ saveOrUpdate,
|
|
|
|
|
+ listWorkshopByParentId,
|
|
|
|
|
+ getAllListWarehouse
|
|
|
|
|
+ } from '@/api/factoryModel';
|
|
|
import { getUserPage } from '@/api/system/organization';
|
|
import { getUserPage } from '@/api/system/organization';
|
|
|
import { deepClone } from '@/components/FormGenerator/utils';
|
|
import { deepClone } from '@/components/FormGenerator/utils';
|
|
|
import { cityDataLabel } from 'ele-admin/packages/utils/regions';
|
|
import { cityDataLabel } from 'ele-admin/packages/utils/regions';
|
|
@@ -392,7 +413,8 @@
|
|
|
workMeter: '', // 工作节拍
|
|
workMeter: '', // 工作节拍
|
|
|
workingAbility: '', // 加工能力
|
|
workingAbility: '', // 加工能力
|
|
|
locationDetail: '', // 详细地址
|
|
locationDetail: '', // 详细地址
|
|
|
- location: [] // 省市区
|
|
|
|
|
|
|
+ location: [], // 省市区
|
|
|
|
|
+ warehouseList: []
|
|
|
},
|
|
},
|
|
|
groupId: '',
|
|
groupId: '',
|
|
|
enabled: 1,
|
|
enabled: 1,
|
|
@@ -449,7 +471,9 @@
|
|
|
areaTreeList: [],
|
|
areaTreeList: [],
|
|
|
|
|
|
|
|
factoryList: [],
|
|
factoryList: [],
|
|
|
- workshopPlanList: []
|
|
|
|
|
|
|
+ workshopPlanList: [],
|
|
|
|
|
+ warehouseList: [],
|
|
|
|
|
+ warehouseId: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -469,6 +493,7 @@
|
|
|
created() {
|
|
created() {
|
|
|
this.getBasicAreaList();
|
|
this.getBasicAreaList();
|
|
|
this.getFactoryList();
|
|
this.getFactoryList();
|
|
|
|
|
+ this.getListWarehouse();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getTime() {
|
|
getTime() {
|
|
@@ -529,6 +554,8 @@
|
|
|
if (this.form.extInfo.principalDep) {
|
|
if (this.form.extInfo.principalDep) {
|
|
|
this.getUserPage();
|
|
this.getUserPage();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this.warehouseId = this.form.extInfo.warehouseList.join(',');
|
|
|
} else {
|
|
} else {
|
|
|
this.form = { ...this.defaultForm };
|
|
this.form = { ...this.defaultForm };
|
|
|
const info = {
|
|
const info = {
|
|
@@ -540,6 +567,7 @@
|
|
|
locationDetail: '', // 详细地址
|
|
locationDetail: '', // 详细地址
|
|
|
location: [] // 省市区
|
|
location: [] // 省市区
|
|
|
};
|
|
};
|
|
|
|
|
+ this.warehouseId = '';
|
|
|
this.$set(this.form, 'extInfo', info);
|
|
this.$set(this.form, 'extInfo', info);
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.form.resetFields();
|
|
this.$refs.form.resetFields();
|
|
@@ -577,6 +605,7 @@
|
|
|
delete this.form.id;
|
|
delete this.form.id;
|
|
|
}
|
|
}
|
|
|
let params = deepClone(this.form);
|
|
let params = deepClone(this.form);
|
|
|
|
|
+ params.extInfo.warehouseList = this.warehouseId.split(',');
|
|
|
params.mainFactoryCapacityList =
|
|
params.mainFactoryCapacityList =
|
|
|
params.mainFactoryCapacityList.concat(this.delList);
|
|
params.mainFactoryCapacityList.concat(this.delList);
|
|
|
saveOrUpdate(params)
|
|
saveOrUpdate(params)
|
|
@@ -620,6 +649,12 @@
|
|
|
this.factoryList = list || [];
|
|
this.factoryList = list || [];
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ async getListWarehouse() {
|
|
|
|
|
+ const res = await getAllListWarehouse();
|
|
|
|
|
+
|
|
|
|
|
+ this.warehouseList = res;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
change_factoryId() {
|
|
change_factoryId() {
|
|
|
this.form.workshopPlanId = '';
|
|
this.form.workshopPlanId = '';
|
|
|
this.workshopPlanList = [];
|
|
this.workshopPlanList = [];
|