|
|
@@ -114,6 +114,25 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8" v-if="addForm.type == 1">
|
|
|
+ <el-form-item label="场站" prop="productLineId">
|
|
|
+ <el-select
|
|
|
+ v-model="addForm.productLineId"
|
|
|
+ placeholder="请选择场站"
|
|
|
+ filterable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in productLineList"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ @click.native="addForm.productLineName = item.name"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8" v-if="addForm.autoOrder && addForm.type == 0">
|
|
|
<el-form-item label="部门" prop="groupId">
|
|
|
<deptSelect
|
|
|
@@ -676,6 +695,8 @@
|
|
|
createUserName: '',
|
|
|
duration: null,
|
|
|
associatedObject: 2,
|
|
|
+ productLineId: '',
|
|
|
+ productLineName: '',
|
|
|
planType: 1,
|
|
|
executeUsers: [
|
|
|
// {
|
|
|
@@ -706,6 +727,7 @@
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
+ productLineList: [],
|
|
|
visible: false,
|
|
|
title: '新增记录计划配置',
|
|
|
formBaseData,
|
|
|
@@ -1012,6 +1034,7 @@
|
|
|
} else {
|
|
|
// 班组
|
|
|
this.addForm.teamId = this.addForm.executeUsers[0]?.teamId || '';
|
|
|
+ this.teamChange(true);
|
|
|
}
|
|
|
this.tabsValue = this.addForm.children[0]?.ruleId || '';
|
|
|
|
|
|
@@ -1126,6 +1149,9 @@
|
|
|
typeChange() {
|
|
|
this.addForm.groupId = '';
|
|
|
this.addForm.executeIdList = [];
|
|
|
+ this.addForm.productLineName = '';
|
|
|
+ this.productLineList = [];
|
|
|
+ this.addForm.productLineId = '';
|
|
|
},
|
|
|
//选择部门(搜索)
|
|
|
async searchDeptNodeClick(info, data) {
|
|
|
@@ -1482,12 +1508,27 @@
|
|
|
console.log('teamAllList 班组', list);
|
|
|
this.teamAllList = list;
|
|
|
},
|
|
|
- teamChange() {
|
|
|
+ teamChange(init) {
|
|
|
console.log('this.addForm.teamId', this.addForm.teamId);
|
|
|
// 当前班组
|
|
|
const currentTeam = this.teamAllList.find(
|
|
|
(item) => item.id === this.addForm.teamId
|
|
|
);
|
|
|
+ if (!init) {
|
|
|
+ this.addForm.productLineName = '';
|
|
|
+ this.addForm.productLineId = '';
|
|
|
+ }
|
|
|
+ this.productLineList = [];
|
|
|
+ currentTeam.factoryWorkstationVOList.forEach((item) => {
|
|
|
+ if (
|
|
|
+ !this.productLineList.find((p) => p.id === item.productionLineId)
|
|
|
+ ) {
|
|
|
+ this.productLineList.push({
|
|
|
+ name: item.productionLineName,
|
|
|
+ id: item.productionLineId
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
if (currentTeam) {
|
|
|
// 同步执行人
|
|
|
this.addForm.executeUsers = [
|