|
|
@@ -623,7 +623,9 @@
|
|
|
exeReportWork,
|
|
|
queryQualitySamplContent,
|
|
|
queryQualityTempleContent,
|
|
|
- queryQualityInventory
|
|
|
+ queryQualityInventory,
|
|
|
+ getBadNameList,
|
|
|
+ getBadTypeList
|
|
|
} from '@/api/inspectionWork';
|
|
|
import { getQualityTemplateByIds } from '@/api/produce/workPlan.js';
|
|
|
import { getCodeList } from '@/api/login';
|
|
|
@@ -675,6 +677,11 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 不良品类型列表
|
|
|
+ fileTableList: [],
|
|
|
+ badTypeList: [],
|
|
|
+ // 不良名称列表
|
|
|
+ badNameList: [],
|
|
|
disposeTypeList: {
|
|
|
0: '未处置',
|
|
|
1: '返工',
|
|
|
@@ -1313,6 +1320,8 @@
|
|
|
this.activeNameKK = this.activeName;
|
|
|
this.reload({ qualityWorkerId: this.ids });
|
|
|
let direction = this.$getDirection();
|
|
|
+ this.getBadTypeList();
|
|
|
+ this.getBadNameList();
|
|
|
|
|
|
direction.on('keyup', function (e, val) {
|
|
|
if (e.keyCode == 39) {
|
|
|
@@ -1357,6 +1366,45 @@
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ // 不良类型改变
|
|
|
+ badTypeChange(row) {
|
|
|
+ row.badTypeName = null;
|
|
|
+ // 赋值badTypeName
|
|
|
+ const badType = this.badTypeList.find(
|
|
|
+ (item) => item.id === row.badTypeId
|
|
|
+ );
|
|
|
+ if (badType) {
|
|
|
+ row.badTypeName = badType.name;
|
|
|
+ }
|
|
|
+ this.getBadNameList(row.badTypeId);
|
|
|
+ },
|
|
|
+ // 不良名称改变
|
|
|
+ badNameChange(row) {
|
|
|
+ // 赋值badNameName
|
|
|
+ const badItem = this.badNameList.find(
|
|
|
+ (item) => item.id === row.badNameId
|
|
|
+ );
|
|
|
+ if (badItem) {
|
|
|
+ row.badNameName = badItem.name;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查询不良类型
|
|
|
+ async getBadTypeList() {
|
|
|
+ const res = await getBadTypeList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999
|
|
|
+ });
|
|
|
+ this.badTypeList = res.list;
|
|
|
+ },
|
|
|
+ // 查询不良名称
|
|
|
+ async getBadNameList() {
|
|
|
+ const res = await getBadNameList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 999
|
|
|
+ });
|
|
|
+ this.badNameList = res.list;
|
|
|
+ },
|
|
|
+
|
|
|
getRowKey(row) {
|
|
|
// 优先使用后端 id
|
|
|
if (row.id && row.id !== '') return row.id;
|