From 1f4652c5800a0115c36c318a5eac69db67ebbe78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=89=E6=BA=90?= <1976974459@qq.com> Date: Mon, 23 Oct 2023 11:19:10 +0800 Subject: [PATCH] =?UTF-8?q?2023-10-23=20=E8=AE=BE=E5=A4=87=E5=92=8C?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qc/qc.js | 2 + src/views/modules/eam/eamWorkPlanForCheck.vue | 6 +- src/views/modules/qc/FAIResultEntry.vue | 180 ++++++++++++--- src/views/modules/qc/FQCResultEntry.vue | 182 ++++++++++++--- src/views/modules/qc/IPQCResultEntry.vue | 218 +++++++++++++----- src/views/modules/qc/IQCResultEntry.vue | 7 +- src/views/modules/qc/qcPartAttribute.vue | 6 +- 7 files changed, 485 insertions(+), 116 deletions(-) diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index cd5430e..2b7c8d9 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -131,6 +131,8 @@ export const getAllResourceList = data => createAPI(`/pms/qc/getAllResourceList` export const getOrderNoList = data => createAPI(`/pms/qc/getOrderNoList`,'post',data) export const queryController = data => createAPI(`/pms/qc/queryController`,'post',data) export const queryTemplateList = data => createAPI(`/pms/qc/queryTemplateList`,'post',data) +export const getPartInformation = data => createAPI(`/pms/qc/getPartInformation`,'post',data) +export const getSpecialOperationList = data => createAPI(`/pms/qc/getSpecialOperationList`,'post',data) // ===================================== IQC检验 ===================================== export const qcIQCInspectionSearch = data => createAPI(`/pms/qc/qcIQCInspectionSearch`,'post',data) diff --git a/src/views/modules/eam/eamWorkPlanForCheck.vue b/src/views/modules/eam/eamWorkPlanForCheck.vue index 3419e09..acd3313 100644 --- a/src/views/modules/eam/eamWorkPlanForCheck.vue +++ b/src/views/modules/eam/eamWorkPlanForCheck.vue @@ -2051,11 +2051,11 @@ return } this.modalData.objectList = this.dataListSelections - let obj = document.getElementsByName('addWorkOrderRule'); - let s = ''; + let obj = document.getElementsByName('addWorkOrderRule') + let s = '' for (let i = 0; i < obj.length; i++) { if (obj[i].checked) { - s += obj[i].value + ','; + s += obj[i].value + ',' } } s = s.substring(0,s.length-1) diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index fd37dc1..f19f6f5 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -135,10 +135,14 @@ - + 派工单号 + + 派工单号 + + @@ -154,7 +158,7 @@ - + + + 机台 + + - + + + 物料编码 + + @@ -193,7 +205,10 @@ - + + + + @@ -320,7 +335,8 @@ min-width="80" label="子明细"> - - - - - - - - + + @@ -546,6 +560,9 @@ saveFAIInspection, // 新增FAI检验 queryController, // 检查动控 queryTemplateList, // 获取检验模板列表 + getPartInformation, // 获取物料信息 + getSpecialOperationList, // 获取特殊工序列表 + InspectionTypeSearch, // 搜索所有检验类型 } from "@/api/qc/qc.js"; import Chooselist from '@/views/modules/common/Chooselist_eam'; import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'; @@ -621,7 +638,8 @@ sku: '', specialRequirements: '', templateId: '', - templateName: '' + templateName: '', + specialTaskFlag: '' }, // 展示列集 columnList: [ @@ -1205,6 +1223,8 @@ fixed: '', }, ], + checked: false, + typeOptions: [] } }, mounted () { @@ -1215,8 +1235,18 @@ created () { this.getDataList() this.favoriteIsOk() + this.InspectionTypeSearch() }, methods: { + // 查询检验类型 + InspectionTypeSearch(){ + InspectionTypeSearch().then(({data}) => { + if (data.code === 0) { + this.typeOptions = data.rows + } + }) + }, + // 获取基础数据列表S getBaseList (val,type) { this.tagNo = val @@ -1226,6 +1256,14 @@ strVal = this.modalData.seqNo this.$refs.baseList.init(val, strVal) } + if (val === 205) { + strVal = this.modalData.resourceDesc + this.$refs.baseList.init(val, strVal) + } + if (val === 206) { + strVal = this.modalData.partNo + this.$refs.baseList.init(val, strVal) + } }) }, @@ -1239,13 +1277,24 @@ this.getOperationList() this.getPartList() } + if (this.tagNo === 205) { + this.modalData.resourceId = val.resource_id + this.modalData.resourceDesc = val.resource_desc + } + if (this.tagNo === 206) { + this.modalData.partNo = val.part_no + this.modalData.partDesc = val.part_desc + // 获取物料的其他信息 + this.getPartInformation() + } }, - // 获取机台列表 - getResourceList(){ - getResourceList(this.modalData).then(({data}) => { + // 获取物料其它信息 + getPartInformation () { + getPartInformation(this.modalData).then(({data}) => { if (data && data.code === 0) { - this.resourceList = data.rows + this.modalData.spec = data.rows[0].spec + this.modalData.sku = data.rows[0].sku } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1254,6 +1303,24 @@ }) }, + // 获取机台列表 + getResourceList(){ + // 判断是否为特殊任务,特殊任务的机台不随工序改变 + if (this.modalData.specialTaskFlag === 'Y') { + return + } else { + getResourceList(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }, + // 获取工序列表 getOperationList(){ getOperationList(this.modalData).then(({data}) => { @@ -1284,6 +1351,61 @@ }) }, + // 是否新增特殊任务 + changeSpecialTask () { + // 先重置数据 + this.modalData = { + flag: '1', + site: this.$store.state.user.site, + inspectionNo:'', + partNo: '', + partDesc: '', + inspectionTypeNo:'', + inspectionTypeName:'', + inspectorNo:'', + inspectorName:'', + submit_flag:'', + orderNo: '', + operationDesc: '', + operationNo: '', + resourceId: '', + resourceDesc: '', + rollQty: '', + seqNo: '', + batchRollNo: '', + spec: '', + sku: '', + specialRequirements: '', + templateId: '', + templateName: '', + specialTaskFlag: '' + } + // 获取选中框 + let obj = document.getElementsByName('specialTask') + // 判断是否打勾 + if (obj[0].checked) { + let tempData = { + site: this.$store.state.user.site + } + this.modalData.specialTaskFlag = 'Y' + // 获取特殊工序列表 + getSpecialOperationList(tempData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + // 派工单和工单号赋值 + this.modalData.seqNo = '000#1TSGD' + this.modalData.orderNo = '000#1' + } else { + this.modalData.specialTaskFlag = '' + } + }, + // 新增FAI巡检记录 saveData(){ if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { @@ -1382,13 +1504,15 @@ sku: '', specialRequirements: '', templateId: '', - templateName: '' - }; - this.operationList = []; - this.resourceList = []; - this.partList = []; - this.modalDisableFlag = false; - this.modalFlag = true; + templateName: '', + specialTaskFlag: '' + } + this.operationList = [] + this.resourceList = [] + this.partList = [] + this.modalDisableFlag = false + this.modalFlag = true + this.checked = false }, // 获取检验模板列表 @@ -1653,7 +1777,7 @@ // 明细记录信息查询 detailModal(row){ - this.detailData.site = this.$store.state.user.site, + this.detailData.site = this.$store.state.user.site this.detailData.inspectionNo = row.inspectionNo this.detailData.partNo = row.partNo this.detailData.partDesc = row.partDesc @@ -1872,7 +1996,9 @@ this.subDetailData.subDetailValues = this.tableData saveFAISubDetailed(this.subDetailData).then(({data}) => { if (data && data.code === 0) { - this.getDataList() + faiDetailSearch(this.detailData).then(({data}) => { + this.detailList = data.rows + }) this.subDetailFlag = false this.tableData = [] this.$message({ diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue index 7e27691..8ae0e32 100644 --- a/src/views/modules/qc/FQCResultEntry.vue +++ b/src/views/modules/qc/FQCResultEntry.vue @@ -133,10 +133,14 @@ - + 派工单号 + + 派工单号 + + @@ -152,7 +156,7 @@ - + + + 机台 + + - + + + 物料编码 + + @@ -191,7 +203,10 @@ - + + + + @@ -318,7 +333,8 @@ min-width="80" label="子明细"> - - - - - - - - + + @@ -544,6 +558,9 @@ saveFQCInspection, // 新增FQC检验 queryController, // 检查动控 queryTemplateList, // 获取检验模板列表 + getPartInformation, // 获取物料信息 + getSpecialOperationList, // 获取特殊工序列表 + InspectionTypeSearch, // 搜索所有检验类型 } from "@/api/qc/qc.js"; import Chooselist from '@/views/modules/common/Chooselist_eam'; import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'; @@ -617,7 +634,8 @@ sku: '', specialRequirements: '', templateId: '', - templateName: '' + templateName: '', + specialTaskFlag: '' }, // 展示列集 columnList: [ @@ -1201,6 +1219,8 @@ fixed: '', }, ], + checked: false, + typeOptions: [] } }, mounted () { @@ -1211,8 +1231,18 @@ created () { this.getDataList() this.favoriteIsOk() + this.InspectionTypeSearch() }, methods: { + // 查询检验类型 + InspectionTypeSearch(){ + InspectionTypeSearch().then(({data}) => { + if (data.code === 0) { + this.typeOptions = data.rows + } + }) + }, + // 获取基础数据列表S getBaseList (val,type) { this.tagNo = val @@ -1222,6 +1252,14 @@ strVal = this.modalData.seqNo this.$refs.baseList.init(val, strVal) } + if (val === 205) { + strVal = this.modalData.resourceDesc + this.$refs.baseList.init(val, strVal) + } + if (val === 206) { + strVal = this.modalData.partNo + this.$refs.baseList.init(val, strVal) + } }) }, @@ -1235,13 +1273,24 @@ this.getOperationList() this.getPartList() } + if (this.tagNo === 205) { + this.modalData.resourceId = val.resource_id + this.modalData.resourceDesc = val.resource_desc + } + if (this.tagNo === 206) { + this.modalData.partNo = val.part_no + this.modalData.partDesc = val.part_desc + // 获取物料的其他信息 + this.getPartInformation() + } }, - // 获取机台列表 - getResourceList(){ - getResourceList(this.modalData).then(({data}) => { + // 获取物料其它信息 + getPartInformation () { + getPartInformation(this.modalData).then(({data}) => { if (data && data.code === 0) { - this.resourceList = data.rows + this.modalData.spec = data.rows[0].spec + this.modalData.sku = data.rows[0].sku } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1250,6 +1299,24 @@ }) }, + // 获取机台列表 + getResourceList(){ + // 判断是否为特殊任务,特殊任务的机台不随工序改变 + if (this.modalData.specialTaskFlag === 'Y') { + return + } else { + getResourceList(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } + }, + // 获取工序列表 getOperationList(){ getOperationList(this.modalData).then(({data}) => { @@ -1280,6 +1347,61 @@ }) }, + // 是否新增特殊任务 + changeSpecialTask () { + // 先重置数据 + this.modalData = { + flag: '1', + site: this.$store.state.user.site, + inspectionNo:'', + partNo: '', + partDesc: '', + inspectionTypeNo:'', + inspectionTypeName:'', + inspectorNo:'', + inspectorName:'', + submit_flag:'', + orderNo: '', + operationDesc: '', + operationNo: '', + resourceId: '', + resourceDesc: '', + rollQty: '', + seqNo: '', + batchRollNo: '', + spec: '', + sku: '', + specialRequirements: '', + templateId: '', + templateName: '', + specialTaskFlag: '' + } + // 获取选中框 + let obj = document.getElementsByName('specialTask') + // 判断是否打勾 + if (obj[0].checked) { + let tempData = { + site: this.$store.state.user.site + } + this.modalData.specialTaskFlag = 'Y' + // 获取特殊工序列表 + getSpecialOperationList(tempData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + // 派工单和工单号赋值 + this.modalData.seqNo = '000#1TSGD' + this.modalData.orderNo = '000#1' + } else { + this.modalData.specialTaskFlag = '' + } + }, + // 新增FAI巡检记录 saveData(){ if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { @@ -1378,13 +1500,15 @@ sku: '', specialRequirements: '', templateId: '', - templateName: '' - }; - this.operationList = []; - this.resourceList = []; - this.partList = []; - this.modalDisableFlag = false; - this.modalFlag = true; + templateName: '', + specialTaskFlag: '' + } + this.operationList = [] + this.resourceList = [] + this.partList = [] + this.modalDisableFlag = false + this.modalFlag = true + this.checked = false }, // 获取检验模板列表 @@ -1669,8 +1793,8 @@ fqcDetailSearch(this.detailData).then(({data}) => { this.detailList = data.rows }) - this.inspectorSearch(); - this.detailInformationFlag = true; + this.inspectorSearch() + this.detailInformationFlag = true }, // 子明细记录信息查询 @@ -1870,7 +1994,9 @@ this.subDetailData.subDetailValues = this.tableData saveFQCSubDetailed(this.subDetailData).then(({data}) => { if (data && data.code === 0) { - this.getDataList() + fqcDetailSearch(this.detailData).then(({data}) => { + this.detailList = data.rows + }) this.subDetailFlag = false this.tableData = [] this.$message({ diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index 6c78f2f..7e99137 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -143,10 +143,14 @@ - + 派工单号 + + 派工单号 + + @@ -162,7 +166,7 @@ - + + + 机台 + + - - - - - - - - - + + + 物料编码 + + - - - - - - - - @@ -219,14 +215,19 @@ - - - 检验模板 检验模板 + + + + + + + + @@ -341,7 +342,7 @@ :min-width="item.columnWidth" :label="item.columnLabel"> @@ -352,7 +353,8 @@ min-width="80" label="子明细"> - - - - - - - - + + @@ -625,6 +625,9 @@ saveOsInspection, // 新增检验记录 queryController, // 检查动控 queryTemplateList, // 获取检验模板列表 + getPartInformation, // 获取物料信息 + getSpecialOperationList, // 获取特殊工序列表 + InspectionTypeSearch, // 搜索所有检验类型 getOrderNoList // 查询工单列表 } from "@/api/qc/qc.js"; import Chooselist from '@/views/modules/common/Chooselist_eam'; @@ -712,7 +715,8 @@ sku: '', specialRequirements: '', templateId: '', - templateName: '' + templateName: '', + specialTaskFlag: '' }, // 展示列集 columnList: [ @@ -1316,6 +1320,8 @@ fixed: '', }, ], + checked: false, + typeOptions: [] // orderNoData:{ // limit: 10, // page: 1, @@ -1335,8 +1341,18 @@ created () { this.getDataList() this.favoriteIsOk() + this.InspectionTypeSearch() }, methods: { + // 查询检验类型 + InspectionTypeSearch(){ + InspectionTypeSearch().then(({data}) => { + if (data.code === 0) { + this.typeOptions = data.rows + } + }) + }, + selectFlag(){ return true; }, @@ -1456,6 +1472,14 @@ strVal = this.modalData.seqNo this.$refs.baseList.init(val, strVal) } + if (val === 205) { + strVal = this.modalData.resourceDesc + this.$refs.baseList.init(val, strVal) + } + if (val === 206) { + strVal = this.modalData.partNo + this.$refs.baseList.init(val, strVal) + } }) }, @@ -1469,6 +1493,30 @@ this.getOperationList() this.getPartList() } + if (this.tagNo === 205) { + this.modalData.resourceId = val.resource_id + this.modalData.resourceDesc = val.resource_desc + } + if (this.tagNo === 206) { + this.modalData.partNo = val.part_no + this.modalData.partDesc = val.part_desc + // 获取物料的其他信息 + this.getPartInformation() + } + }, + + // 获取物料其它信息 + getPartInformation () { + getPartInformation(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.modalData.spec = data.rows[0].spec + this.modalData.sku = data.rows[0].sku + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) }, // // 工单号改变事件 @@ -1547,15 +1595,20 @@ // 获取机台列表 getResourceList(){ - getResourceList(this.modalData).then(({data}) => { - if (data && data.code === 0) { - this.resourceList = data.rows - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) + // 判断是否为特殊任务,特殊任务的机台不随工序改变 + if (this.modalData.specialTaskFlag === 'Y') { + return + } else { + getResourceList(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.resourceList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, // 获取物料列表 @@ -1618,13 +1671,15 @@ sku: '', specialRequirements: '', templateId: '', - templateName: '' + templateName: '', + specialTaskFlag: '' } this.operationList = [] this.resourceList = [] this.partList = [] this.modalDisableFlag = false this.modalFlag = true + this.checked = false }, // 获取检验模板列表 @@ -1649,6 +1704,61 @@ this.templateModelFlag = false }, + // 是否新增特殊任务 + changeSpecialTask () { + // 先重置数据 + this.modalData = { + flag: '1', + site: this.$store.state.user.site, + inspectionNo:'', + partNo: '', + partDesc: '', + inspectionTypeNo:'', + inspectionTypeName:'', + inspectorNo:'', + inspectorName:'', + submit_flag:'', + orderNo: '', + operationDesc: '', + operationNo: '', + resourceId: '', + resourceDesc: '', + rollQty: '', + seqNo: '', + batchRollNo: '', + spec: '', + sku: '', + specialRequirements: '', + templateId: '', + templateName: '', + specialTaskFlag: '' + } + // 获取选中框 + let obj = document.getElementsByName('specialTask') + // 判断是否打勾 + if (obj[0].checked) { + let tempData = { + site: this.$store.state.user.site + } + this.modalData.specialTaskFlag = 'Y' + // 获取特殊工序列表 + getSpecialOperationList(tempData).then(({data}) => { + if (data && data.code === 0) { + this.operationList = data.rows + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + // 派工单和工单号赋值 + this.modalData.seqNo = '000#1TSGD' + this.modalData.orderNo = '000#1' + } else { + this.modalData.specialTaskFlag = '' + } + }, + // 新增IPQC巡检记录 saveData(){ if (this.modalData.seqNo === '' || this.modalData.seqNo == null) { @@ -1847,7 +1957,7 @@ // 明细记录信息查询 detailModal(row){ - this.detailData.site = this.$store.state.user.site, + this.detailData.site = this.$store.state.user.site this.detailData.inspectionNo = row.inspectionNo this.detailData.partNo = row.partNo this.detailData.partDesc = row.partDesc @@ -1867,18 +1977,18 @@ ipqcDetailSearch(this.detailData).then(({data}) => { this.detailList = data.rows }) - this.inspectorSearch(); - this.detailInformationFlag = true; + this.inspectorSearch() + this.detailInformationFlag = true }, // 子明细记录信息查询 subDetailModal(row){ - this.subDetailData.inspectionNo = row.inspectionNo; - this.subDetailData.itemNo = row.itemNo; - this.subDetailData.itemDesc = row.itemDesc; - this.subDetailData.defaultValue = row.defaultValue; - this.subDetailData.maxValue = row.maxValue; - this.subDetailData.minValue = row.minValue; + this.subDetailData.inspectionNo = row.inspectionNo + this.subDetailData.itemNo = row.itemNo + this.subDetailData.itemDesc = row.itemDesc + this.subDetailData.defaultValue = row.defaultValue + this.subDetailData.maxValue = row.maxValue + this.subDetailData.minValue = row.minValue selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => { this.tableData = data.rows }) @@ -2066,7 +2176,9 @@ this.subDetailData.subDetailValues = this.tableData saveIPQCSubDetailed(this.subDetailData).then(({data}) => { if (data && data.code === 0) { - this.getDataList() + ipqcDetailSearch(this.detailData).then(({data}) => { + this.detailList = data.rows + }) this.subDetailFlag = false this.tableData = [] this.$message({ diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index a6d9ec6..6934272 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -231,7 +231,8 @@ min-width="80" label="子明细"> { if (data && data.code === 0) { - this.getDataList() + iqcDetailSearch(this.detailData).then(({data}) => { + this.detailList = data.rows + }) this.subDetailFlag = false this.tableData = [] this.$message({ diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index 7b9fafc..fa411a4 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -104,7 +104,7 @@ - 物料编码: + 物料编码: @@ -968,7 +968,7 @@ this.tagNo = val this.$nextTick(() => { let strVal = '' - if (val === 1043) { + if (val === 206) { strVal = this.modalData.partNo this.$refs.baseList.init(val, strVal) } @@ -988,7 +988,7 @@ }, /* 列表方法的回调 */ getBaseData (val) { - if (this.tagNo === 1043) { + if (this.tagNo === 206) { this.modalData.partNo = val.part_no this.modalData.partDesc = val.part_desc }