|
@@ -116,16 +116,18 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8" style="margin-bottom: 22px">
|
|
<el-col :span="8" style="margin-bottom: 22px">
|
|
|
- <el-form-item label="工作中心:" prop="workCenterIds">
|
|
|
|
|
|
|
+ <el-form-item label="工作中心:" prop="workCenterId">
|
|
|
<div class="location-warp">
|
|
<div class="location-warp">
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="form.workCenterIds"
|
|
|
|
|
|
|
+ v-model="form.workCenterId"
|
|
|
clearable
|
|
clearable
|
|
|
filterable
|
|
filterable
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in options.workCenterIds"
|
|
|
|
|
|
|
+ v-for="item in options.workCenterList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
@@ -213,6 +215,7 @@
|
|
|
userIds: '',
|
|
userIds: '',
|
|
|
userNumber: '',
|
|
userNumber: '',
|
|
|
workshopPlanId: null,
|
|
workshopPlanId: null,
|
|
|
|
|
+ workCenterId: null,
|
|
|
workCenterIds: [],
|
|
workCenterIds: [],
|
|
|
workshopId: [],
|
|
workshopId: [],
|
|
|
factoryId: '',
|
|
factoryId: '',
|
|
@@ -250,7 +253,7 @@
|
|
|
{ required: true, message: '请输入', trigger: 'change' }
|
|
{ required: true, message: '请输入', trigger: 'change' }
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- workCenterIds: [
|
|
|
|
|
|
|
+ workCenterId: [
|
|
|
{ required: true, message: '请选择工作中心', trigger: 'change' }
|
|
{ required: true, message: '请选择工作中心', trigger: 'change' }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
@@ -260,7 +263,7 @@
|
|
|
options: {
|
|
options: {
|
|
|
workshopId: [],
|
|
workshopId: [],
|
|
|
productionLineId: [],
|
|
productionLineId: [],
|
|
|
- workCenterIds: []
|
|
|
|
|
|
|
+ workCenterList: []
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
versionList: [],
|
|
versionList: [],
|
|
@@ -295,6 +298,8 @@
|
|
|
if (row[key]) {
|
|
if (row[key]) {
|
|
|
this.form[key] = row[key];
|
|
this.form[key] = row[key];
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this.form.workCenterId =this.form.workCenterIds[0];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 人员反显
|
|
// 人员反显
|
|
@@ -339,8 +344,10 @@
|
|
|
par.deleteUserIds = this.deleteUserIds;
|
|
par.deleteUserIds = this.deleteUserIds;
|
|
|
par.leaderUserId = this.$refs.userTable.getTwi();
|
|
par.leaderUserId = this.$refs.userTable.getTwi();
|
|
|
par.userNumber = par.userIds.length;
|
|
par.userNumber = par.userIds.length;
|
|
|
|
|
+ this.form.workCenterIds = [ this.form.workCenterId ];
|
|
|
if (this.type == 'add') {
|
|
if (this.type == 'add') {
|
|
|
delete par.id;
|
|
delete par.id;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
const saveOrUpdate = this.type == 'add' ? saveteam : updateteam;
|
|
const saveOrUpdate = this.type == 'add' ? saveteam : updateteam;
|
|
|
saveOrUpdate(par)
|
|
saveOrUpdate(par)
|
|
@@ -390,8 +397,9 @@
|
|
|
this.options.productionLineId = [];
|
|
this.options.productionLineId = [];
|
|
|
|
|
|
|
|
this.getlistCf();
|
|
this.getlistCf();
|
|
|
- this.form.workCenterIds = '';
|
|
|
|
|
- this.options.workCenterIds = [];
|
|
|
|
|
|
|
+ this.form.workCenterId = null
|
|
|
|
|
+ this.form.workCenterIds = [];
|
|
|
|
|
+ this.options.workCenterList = [];
|
|
|
|
|
|
|
|
this.getlistByProductionLineId();
|
|
this.getlistByProductionLineId();
|
|
|
},
|
|
},
|
|
@@ -434,7 +442,7 @@
|
|
|
return work
|
|
return work
|
|
|
.list({ pageNum: 1, size: -1, factoryId: this.form.factoryId })
|
|
.list({ pageNum: 1, size: -1, factoryId: this.form.factoryId })
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- this.options.workCenterIds = res.list.map((n) => {
|
|
|
|
|
|
|
+ this.options.workCenterList = res.list.map((n) => {
|
|
|
return {
|
|
return {
|
|
|
value: n.id,
|
|
value: n.id,
|
|
|
label: n.name
|
|
label: n.name
|