From 345724c31168352d06db760fbb8f9327a68446bc Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 14 Dec 2023 15:14:43 +0800 Subject: [PATCH] =?UTF-8?q?2023-12-14=20=E6=A3=80=E9=AA=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=89=A9=E6=96=99=E9=BB=98=E8=AE=A4=E4=B8=8D=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E3=80=81=E6=A3=80=E9=AA=8C=E6=A8=A1=E7=89=88=E5=8A=A0?= =?UTF-8?q?=E4=B8=AA=E5=BF=85=E5=A1=AB=E7=9A=84=E6=A0=87=E8=AE=B0=E3=80=81?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1=E6=96=B0=E5=A2=9E=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A8=A1=E7=89=88=E7=9A=84=E6=97=B6=E5=80=99=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A0=B9=E6=8D=AE=E8=8F=9C=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E7=B1=BB=E5=9E=8B=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/qc/FAIResultEntry.vue | 48 ++++++++++++++++++------ src/views/modules/qc/FQCResultEntry.vue | 48 ++++++++++++++++++------ src/views/modules/qc/IPQCResultEntry.vue | 48 ++++++++++++++++++------ 3 files changed, 108 insertions(+), 36 deletions(-) diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index 527a4e5..518810b 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -232,7 +232,7 @@ - + 检验模板 检验模板 @@ -1628,6 +1628,13 @@ message: ' ', trigger: 'change' } + ], + templateId: [ + { + required: true, + message: ' ', + trigger: 'change' + } ] }, resourceList: [], @@ -1890,6 +1897,12 @@ inspectionTypeSearch(tempData).then(({data}) => { if (data.code === 0) { this.typeOptions = data.rows + this.typeOptions.forEach(val => { + if (val.inspectionTypeName.includes('FAI')) { + this.templateData.inspectionTypeNo = val.inspectionTypeNo + this.templateData.inspectionTypeName = val.inspectionTypeName + } + }) } }) }, @@ -2070,7 +2083,7 @@ }, // 新增FAI巡检记录 - saveData(){ + saveData () { if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { this.$message.warning('请选择派工单!') return @@ -2202,16 +2215,21 @@ // 获取物料列表 queryPartList () { // 查询所有物料 - queryPartList(this.partData).then(({data}) => { - if (data && data.code === 0) { - this.partList = data.rows - this.partModelFlag = true - }else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '') { + this.partList = [] + this.partModelFlag = true + } else { + queryPartList(this.partData).then(({data}) => { + if (data && data.code === 0) { + this.partList = data.rows + this.partModelFlag = true + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, // 选中检验模板 @@ -2227,6 +2245,12 @@ this.modalData.partDesc = row.partDesc this.modalData.sku = row.sku this.modalData.spec = row.spec + this.partData = { + site: this.$store.state.user.site, + partNo: '', + partDesc: '', + sku: '' + } this.partModelFlag = false }, diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index d2a70bd..a615c1e 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -230,7 +230,7 @@ - + 检验模板 检验模板 @@ -1627,6 +1627,13 @@ message: ' ', trigger: 'change' } + ], + templateId: [ + { + required: true, + message: ' ', + trigger: 'change' + } ] }, resourceList: [], @@ -1889,6 +1896,12 @@ inspectionTypeSearch(tempData).then(({data}) => { if (data.code === 0) { this.typeOptions = data.rows + this.typeOptions.forEach(val => { + if (val.inspectionTypeName.includes('FQC')) { + this.templateData.inspectionTypeNo = val.inspectionTypeNo + this.templateData.inspectionTypeName = val.inspectionTypeName + } + }) } }) }, @@ -2069,7 +2082,7 @@ }, // 新增FAI巡检记录 - saveData(){ + saveData () { if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { this.$message.warning('请选择派工单!') return @@ -2201,16 +2214,21 @@ // 获取物料列表 queryPartList () { // 查询所有物料 - queryPartList(this.partData).then(({data}) => { - if (data && data.code === 0) { - this.partList = data.rows - this.partModelFlag = true - }else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '') { + this.partList = [] + this.partModelFlag = true + } else { + queryPartList(this.partData).then(({data}) => { + if (data && data.code === 0) { + this.partList = data.rows + this.partModelFlag = true + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, // 选中检验模板 @@ -2226,6 +2244,12 @@ this.modalData.partDesc = row.partDesc this.modalData.sku = row.sku this.modalData.spec = row.spec + this.partData = { + site: this.$store.state.user.site, + partNo: '', + partDesc: '', + sku: '' + } this.partModelFlag = false }, diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index 4f5f9c8..c981381 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -259,7 +259,7 @@ - + 检验模板 检验模板 @@ -1675,6 +1675,13 @@ message: ' ', trigger: 'change' } + ], + templateId: [ + { + required: true, + message: ' ', + trigger: 'change' + } ] }, batchHandleAddModalFlag: false, @@ -1936,6 +1943,12 @@ inspectionTypeSearch(tempData).then(({data}) => { if (data.code === 0) { this.typeOptions = data.rows + this.typeOptions.forEach(val => { + if (val.inspectionTypeName.includes('IPQC')) { + this.templateData.inspectionTypeNo = val.inspectionTypeNo + this.templateData.inspectionTypeName = val.inspectionTypeName + } + }) } }) }, @@ -2254,16 +2267,21 @@ // 获取物料列表 queryPartList () { // 查询所有物料 - queryPartList(this.partData).then(({data}) => { - if (data && data.code === 0) { - this.partList = data.rows - this.partModelFlag = true - }else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '') { + this.partList = [] + this.partModelFlag = true + } else { + queryPartList(this.partData).then(({data}) => { + if (data && data.code === 0) { + this.partList = data.rows + this.partModelFlag = true + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, // 选中检验模板 @@ -2279,6 +2297,12 @@ this.modalData.partDesc = row.partDesc this.modalData.sku = row.sku this.modalData.spec = row.spec + this.partData = { + site: this.$store.state.user.site, + partNo: '', + partDesc: '', + sku: '' + } this.partModelFlag = false }, @@ -2342,7 +2366,7 @@ }, // 新增IPQC巡检记录 - saveData(){ + saveData () { if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { this.$message.warning('请选择派工单!') return