|
|
@@ -198,7 +198,11 @@
|
|
|
:name="item.id"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <term :qualityParam="item.qualityParam" :isDetails="title == '详情'" ref="qualityParamRef"></term>
|
|
|
+ <term
|
|
|
+ :qualityParam="item.qualityParam"
|
|
|
+ :isDetails="title == '详情'"
|
|
|
+ ref="qualityParamRef"
|
|
|
+ ></term>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
@@ -251,7 +255,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { save, update } from '@/api/inspectionWork';
|
|
|
+ import { save, update, getById } from '@/api/inspectionWork';
|
|
|
import { getProduceTaskList } from '@/api/aps';
|
|
|
import EquipmentDialog from './EquipmentDialog.vue';
|
|
|
import ProductionVersion from './ProductionVersion.vue';
|
|
|
@@ -298,9 +302,7 @@
|
|
|
groupName: '',
|
|
|
id: '',
|
|
|
accessory: [],
|
|
|
- qualityMode: '',
|
|
|
-
|
|
|
- tabTaskId: null
|
|
|
+ qualityMode: ''
|
|
|
};
|
|
|
};
|
|
|
return {
|
|
|
@@ -325,7 +327,9 @@
|
|
|
title: null,
|
|
|
loading: false,
|
|
|
produceTaskList: [],
|
|
|
- executorList: ''
|
|
|
+ executorList: '',
|
|
|
+
|
|
|
+ tabTaskId: null
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -334,7 +338,7 @@
|
|
|
open(type, row) {
|
|
|
this.title = type == 'add' ? '新增' : type == 'edit' ? '报工' : '详情';
|
|
|
this.type = type;
|
|
|
- if (this.type != 'add') {
|
|
|
+ if (this.type == 'detail') {
|
|
|
row.accessory = row.accessory || [];
|
|
|
|
|
|
this.form = JSON.parse(JSON.stringify(row));
|
|
|
@@ -343,6 +347,17 @@
|
|
|
this.getUserList({ groupId: this.form.groupId });
|
|
|
}
|
|
|
this.getProduceTaskList();
|
|
|
+ } else if (type == 'edit') {
|
|
|
+ getById(row.id).then((res) => {
|
|
|
+ row.accessory = row.accessory || [];
|
|
|
+
|
|
|
+ this.form = res.data;
|
|
|
+ this.tabTaskId = this.form.categoryParamList[0].id;
|
|
|
+ if (this.form.groupId) {
|
|
|
+ this.getUserList({ groupId: this.form.groupId });
|
|
|
+ }
|
|
|
+ this.getProduceTaskList();
|
|
|
+ });
|
|
|
}
|
|
|
this.visible = true;
|
|
|
},
|