diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index a407b70..04fd0bd 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -38,14 +38,8 @@ export const masterInformationSearch = data => createAPI(`/pms/qc/masterInformat export const saveMasterInformationValue = data => createAPI(`/pms/qc/saveMasterInformationValue`,'post',data) export const searchModelTree = data => createAPI(`/pms/qc/searchModelTree`,'post',data) export const detailInformationSearch = data => createAPI(`/pms/qc/detailInformationSearch`,'post',data) -export const saveDetailInformation = data => createAPI(`/pms/qc/saveDetailInformation`,'post',data) -export const qcInspectionInformationDelete = data => createAPI(`/pms/qc/qcInspectionInformationDelete`,'post',data) -export const saveSubmitResult = data => createAPI(`/pms/qc/saveSubmitResult`,'post',data) export const checkCompleted = data => createAPI(`/pms/qc/checkCompleted`,'post',data) export const selectModelByPartNo = data => createAPI(`/pms/qc/selectModelByPartNo`,'post',data) -export const subDetailInformationSave = data => createAPI(`/pms/qc/subDetailInformationSave`,'post',data) -export const selectSubDetailInformation = data => createAPI(`/pms/qc/selectSubDetailInformation`,'post',data) -export const checkOutIsSubmit = data => createAPI(`/pms/qc/checkOutIsSubmit`,'post',data) export const workOrderSearch = data => createAPI(`/pms/qc/workOrderSearch`,'post',data) export const selectInformationByWorkOrderNo = data => createAPI(`/pms/qc/selectInformationByWorkOrderNo`,'post',data) export const checkSubDetailValue = data => createAPI(`/pms/qc/checkSubDetailValue`,'post',data) @@ -123,3 +117,24 @@ export const uploadFamilyAttributeExcel = data => createAPI(`/pms/qc/uploadFamil // ===================================== FAI检验 ===================================== export const qcFAIInspectionSearch = data => createAPI(`/pms/qc/qcFAIInspectionSearch`,'post',data) export const faiDetailSearch = data => createAPI(`/pms/qc/faiDetailSearch`,'post',data) +export const faiRecordDelete = data => createAPI(`/pms/qc/faiRecordDelete`,'post',data) +export const saveFAIDetailedRecord = data => createAPI(`/pms/qc/saveFAIDetailedRecord`,'post',data) +export const saveFAISubmitResult = data => createAPI(`/pms/qc/saveFAISubmitResult`,'post',data) +export const saveFAISubDetailed = data => createAPI(`/pms/qc/saveFAISubDetailed`,'post',data) +export const selectFAISubDetailedRecord = data => createAPI(`/pms/qc/selectFAISubDetailedRecord`,'post',data) +export const checkFAIIsSubmit = data => createAPI(`/pms/qc/checkFAIIsSubmit`,'post',data) + +// ===================================== IPQC检验 ===================================== +export const qcIPQCInspectionSearch = data => createAPI(`/pms/qc/qcIPQCInspectionSearch`,'post',data) +export const ipqcDetailSearch = data => createAPI(`/pms/qc/ipqcDetailSearch`,'post',data) +export const ipqcRecordDelete = data => createAPI(`/pms/qc/ipqcRecordDelete`,'post',data) +export const saveIPQCDetailedRecord = data => createAPI(`/pms/qc/saveIPQCDetailedRecord`,'post',data) +export const saveIPQCSubmitResult = data => createAPI(`/pms/qc/saveIPQCSubmitResult`,'post',data) +export const saveIPQCSubDetailed = data => createAPI(`/pms/qc/saveIPQCSubDetailed`,'post',data) +export const selectIPQCSubDetailedRecord = data => createAPI(`/pms/qc/selectIPQCSubDetailedRecord`,'post',data) + + + + + + diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue index c2349a9..71368a7 100644 --- a/src/views/modules/qc/FAIResultEntry.vue +++ b/src/views/modules/qc/FAIResultEntry.vue @@ -8,6 +8,24 @@ + + + + + + + + + + + + + + + + + + @@ -26,7 +44,6 @@ 清空 查询 - 新增 @@ -91,67 +109,82 @@ layout="total, sizes, prev, pager, next, jumper"> - - - - - - - - - - - 质检员 - + + + + + - - + + - - - - - + + - - + + - - + + + - - - - - + + + + + + + + + + + - - + + + - - + + + + + + + + + - - - - 保存 - 关闭 - - - - - - - - + + + + + + + + + + + + + + + + 上传文件 -
+ label="子明细"> - + min-width="80" + label="不合格数量"> - + label="项目检验结论"> @@ -221,50 +250,34 @@ - - - - - - - - - - - - - + + - 保存 - 关闭 + 确认 + 关闭 - 添加 删除 -
- - @@ -290,36 +339,38 @@ import { qcFAIInspectionSearch, // 查询FAI的检验记录 faiDetailSearch, // 查询FAI的检验明细 + inspectorSearch, // 查询检验员 + faiRecordDelete, // 删除检验记录 + saveFAIDetailedRecord, // 新增明细信息 + saveFAISubmitResult, // 审核 + saveFAISubDetailed, // 新增子明细信息 + selectFAISubDetailedRecord, // 子明细记录信息查询 - qcInspectionInformationSearch, // 检验记录查询 - qcInspectionInformationSave, // 新增检验记录 - qcInspectionInformationDelete, // 删除检验记录 - detailInformationSearch, // 查询明细信息 - modalCodeBlur, // 模板信息 - saveDetailInformation, // 新增明细信息 - saveSubmitResult, // 保存检验结果 - checkCompleted, // 判断主信息和明细信息是否已填写 - selectModelByPartNo, // 物料编码失去焦点事件 - subDetailInformationSave, // 新增子明细信息 - selectSubDetailInformation, - checkOutIsSubmit, // 检查是否已提交 - selectInformationByWorkOrderNo, // 工单号失去焦点事件 + checkFAIIsSubmit, // 检查是否已提交 checkSubDetailValue // 检查子明细中的实测值是否在规定范围 - } from "@/api/qc/qc.js" - import Chooselist from '@/views/modules/common/Chooselist_eam' - import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' + } from "@/api/qc/qc.js"; + import Chooselist from '@/views/modules/common/Chooselist_eam'; + import {getFileContentList} from '@/api/eam/eam_object_list.js'; + import {deleteObjectFile} from '@/api/eam/eam.js'; + import qcFAIUploadFile from "./qc_FAI_upload_file"; + import axios from 'axios' + import Vue from 'vue' + /*上传文件的組件*/ export default { components: { - Chooselist + Chooselist, + qcFAIUploadFile }, watch: { }, data () { return { + inspectionNo: '', + fileFlag: false, + fileContentList: [], // 是否收藏 favorite: false, - // 导出 start exportData: [], exportName: "FAI检验录入" + this.dayjs().format('YYYYMMDDHHmmss'), @@ -327,19 +378,21 @@ exportFooter: [], exportList:[], // 导出 end - checkCompletedData:{ inspectionNo: '' }, submitData:{ - site:'', + site: this.$store.state.user.site, inspectionNo: '', - isQualified: '', - isQualifiedChinese: '', + submit_flag: '', + inspectionResult: '', }, tagNo:'', searchData: { site: this.$store.state.user.site, + inspectionNo: '', + state: '', + inspectionResult: '', orderNo: '', operationDesc: '', startDate: '', @@ -347,11 +400,6 @@ page: 1, limit: 10, }, - workOrderData: { - site: this.$store.state.user.site, - // page: 1, - // limit: 10, - }, pageIndex: 1, pageSize: 100, totalPage: 0, @@ -359,37 +407,22 @@ dataList: [], dataListLoading: false, dataListSelections: [], - inspectionRecordsFlag: false, - modalDisableFlag: false, - submitFlag: false, + examineFlag: false, modalData: { flag:'', - functionType:'', site: this.$store.state.user.site, inspectionNo:'', - workOrderNumber: '', - workOrderQuantity: '', - reelNumber: '', partNo: '', - rollingQuantity: '', - sampleQuantity: '', - detailCodeNo:'', - detailCodeDesc:'', + partDesc: '', inspectionTypeNo:'102', inspectionTypeName:'FAI', inspectorNo:'', inspectorName:'', - isQualified:'', - isQualifiedChinese:'' + submit_flag:'', }, // 展示列集 columnList: [ { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TableSite', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'inspectionNo', headerAlign: "center", align: "left", @@ -400,14 +433,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePlanID', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'state', headerAlign: "center", align: "left", @@ -418,14 +445,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePlanDesc', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'inspectionResult', headerAlign: "center", align: "left", @@ -436,14 +457,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePlanDesc', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'taskDate', headerAlign: "center", align: "left", @@ -454,32 +469,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePlanDesc', - tableId: "301005Table", - tableName: "检验记录表", - columnProp: 'inspectionTypeNo', - headerAlign: "center", - align: "left", - columnLabel: '检验类型', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100, - }, - { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePlanDesc', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'inspectionCycle', headerAlign: "center", align: "left", @@ -490,14 +481,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePlanDesc', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'orderNo', headerAlign: "center", align: "left", @@ -508,14 +493,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TableObjectID', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'operationDesc', headerAlign: "center", align: "left", @@ -526,14 +505,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'resourceDesc', headerAlign: "center", align: "left", @@ -544,14 +517,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'partNo', headerAlign: "center", align: "left", @@ -562,14 +529,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'partDesc', headerAlign: "center", align: "left", @@ -580,14 +541,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'rollQty', headerAlign: "center", align: "left", @@ -598,14 +553,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'samplingQty', headerAlign: "center", align: "left", @@ -616,14 +565,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'disposalMeasures', headerAlign: "center", align: "left", @@ -634,14 +577,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'disposalRemark', headerAlign: "center", align: "left", @@ -652,14 +589,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'inspectorDate', headerAlign: "center", align: "left", @@ -670,14 +601,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'inspectorNo', headerAlign: "center", align: "left", @@ -688,14 +613,8 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005TablePropertiesCode', - tableId: "301005Table", - tableName: "检验记录表", columnProp: 'inspectionRemark', headerAlign: "center", align: "left", @@ -706,273 +625,235 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100, }, ], //项目清单 - addDetailModalFlag:false, detailData:{ site: this.$store.state.user.site, inspectionNo:'', partNo:'', partDesc:'', rollQty:'', + samplingQty: '', + unqualifiedQty: 0, unqualifiedQuantity:'', disposalMeasures:'', disposalRemark: '', inspectionResult: '', inspectorNo: '', inspectionRemark: '', + submitFlag: '', }, - masterInformationFlag:false, detailInformationFlag:false, - masterList: [], detailList:[], saveInformationData:{ + site: this.$store.state.user.site, inspectionNo:'', + disposalMeasures: '', + disposalRemark: '', + inspectorNo: '', + inspectionRemark: '', itemList:[], }, - masterColumnList: [ + detailColumnList: [ { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table2EamPropertiesItemID', - tableId: "301005Table2", - tableName: "主记录信息表", - columnProp: 'informationNo', + columnProp: 'itemDesc', headerAlign: "center", align: "left", - columnLabel: '主信息编码', + columnLabel: '检验项目', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 90, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table2EamPropertiesItemDesc', - tableId: "301005Table2", - tableName: "主记录信息表", - columnProp: 'informationName', + columnProp: 'samplingLevelDesc', headerAlign: "center", align: "left", - columnLabel: '主信息名称', + columnLabel: '检验水平', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 90, - } - ], - detailColumnList: [ + }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemID', - tableId: "301005Table3", - tableName: "明细信息表", - columnProp: 'itemNo', + columnProp: 'samplingProgrammeDesc', headerAlign: "center", align: "left", - columnLabel: '项目编码', + columnLabel: '检验方案', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 90, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", - columnProp: 'itemDesc', + columnProp: 'objectDesc', headerAlign: "center", align: "left", - columnLabel: '项目名称', + columnLabel: '检测仪器', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 90, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", - columnProp: 'valueType', + columnProp: 'aql', headerAlign: "center", align: "left", - columnLabel: '项目类型', + columnLabel: 'AQL', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 50, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", - columnProp: 'methodName', + columnProp: 'ac', headerAlign: "center", align: "left", - columnLabel: '方法名称', + columnLabel: 'AC', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 90, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", - columnProp: 'methodRemark', + columnProp: 're', headerAlign: "center", align: "left", - columnLabel: '方法描述', + columnLabel: 'RE', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 90, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", columnProp: 'defaultValue', headerAlign: "center", align: "left", - columnLabel: '默认值', + columnLabel: '标准值', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 50, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", columnProp: 'maxValue', headerAlign: "center", align: "left", - columnLabel: '最大值', + columnLabel: '上限值', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 50, }, { - userId: this.$store.state.user.name, - functionId: 301005, - serialNumber: '301005Table3EamPropertiesItemDesc', - tableId: "301005Table3", - tableName: "明细信息表", columnProp: 'minValue', headerAlign: "center", align: "left", - columnLabel: '最小值', + columnLabel: '下限值', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 50, - } + }, + { + columnProp: 'valueType', + headerAlign: "center", + align: "left", + columnLabel: '检测值类型', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], + fileColumnList: [ + { + columnProp: 'fileName', + headerAlign: "center", + align: "left", + columnLabel: '文件名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + columnProp: 'createdBy', + headerAlign: "center", + align: 'left', + columnLabel: '上传人', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: false + }, + { + columnProp: 'createDate', + headerAlign: "center", + align: 'left', + columnLabel: '上传时间', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: false + }, + { + columnProp: 'orderRef3', + headerAlign: "center", + align: 'left', + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: true, + sortLv: 0, + status: true, + fixed: false + }, ], - itemModalData:{ - site:'', - planID:'', - flag:'', - itemNo:'', - itemDesc:'', - valueTypeDb:'', - defaultValue:'', - valueChooseFlag:'', - createdBy:this.$store.state.user.name, - maxValue:'', - minValue:'', - itemRemark:'', - itemType:'A', - }, - itemModalFlag:false, - itemModalDisableFlag:false, - - itemFlag:'text', - chooseModalFlag:false, - chooseModalData:{ - site:'', - planID:'', - itemNo: '', - itemDesc: '', - itemType:'A', - valueTypeDb:'', - }, - chooseTableData:[], - itemData:{ - site:'', - planID:'', - itemNo:'', - valueNo:'', - availableValue:'', - itemType:'A', - createdBy: this.$store.state.user.name - }, - itemAddModalFlag:false, - // 子明细数据对象 tableData: [], checkedDetail: [], - showEdit: [], //控制显示及隐藏 - subDetailFlag: false, subDetailData: { + site: this.$store.state.user.site, inspectionNo: '', itemNo: '', itemDesc: '', - methodName: '', - methodRemark: '', defaultValue: '', maxValue: '', minValue: '', subDetailValues:[] - } + }, + options: [], } }, mounted () { @@ -985,10 +866,103 @@ this.favoriteIsOk() }, methods: { + //刷新派设备文档的列表 + getFileContentData(row) { + let currentData = { + orderRef2: row.inspectionNo + }; + getFileContentList(currentData).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code == 200) { + this.fileContentList = data.rows; + } else { + this.fileContentList = []; + } + }) + this.fileFlag = true; + }, + /*新增文件的modal*/ + addUploadFileModal(){ + let currentData = { + site: this.$store.state.user.site, + createBy: this.$store.state.user.name, + inspectionNo: this.detailData.inspectionNo, + remark: '', + }; + //打开组件 去做新增业务 + this.$nextTick(() => { + this.$refs.qcFAIUploadFile.init(currentData); + }) + }, + downloadFile(row){ + axios.get('/proxyApi/pms/eamObject/downLoadObjectFile/' + row.id, { + responseType: 'blob', + headers: { + 'Content-Type': 'application/json', + 'token': Vue.cookie.get('token') + } + }).then(({data}) => { + // 不限制文件下载类型 + const blob = new Blob([data], {type: "application/octet-stream"}) + // 下载文件名称 + const fileName = row.fileName + // a标签下载 + const linkNode = document.createElement('a') + // a标签的download属性规定下载文件的名称 + linkNode.download = fileName + linkNode.style.display = 'none' + // 生成一个Blob URL + linkNode.href = URL.createObjectURL(blob) + document.body.appendChild(linkNode) + // 模拟在按钮上的一次鼠标单击 + linkNode.click() + // 释放URL 对象 + URL.revokeObjectURL(linkNode.href) + document.body.removeChild(linkNode) + }) + }, + // 删除文件 + deleteFile(row){ + this.$confirm('确定要删除此文件?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteObjectFile(row).then(({data}) => { + if (data && data.code == 0) { + this.getFileContentData(row); + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + + // 查询检验类型 + inspectorSearch(){ + inspectorSearch().then(({data}) => { + if (data.code === 0) { + this.options = data.rows + } + }) + }, // 清空搜索栏 doEmpty(){ this.searchData = { site: this.$store.state.user.site, + inspectionNo: '', + state: '', + inspectionResult: '', orderNo: '', operationDesc: '', startDate: '', @@ -997,48 +971,6 @@ limit: 10, } }, - - // 获取基础数据列表S - getBaseList (val,type) { - this.tagNo = val - this.$nextTick(() => { - let strVal = '' - if (val === 1037) { - strVal = this.modalData.detailCodeNo - this.$refs.baseList.init(val, strVal) - } - if (val === 1040) { - strVal = this.modalData.inspectorNo - this.$refs.baseList.init(val, strVal) - } - }) - }, - /* 列表方法的回调 */ - getBaseData (val) { - if (this.tagNo === 1037) { - this.modalData.detailCodeNo = val.code_no - this.modalData.detailCodeDesc = val.code_desc - } - if (this.tagNo === 1040) { - this.modalData.inspectorNo = val.inspector_no - this.modalData.inspectorName = val.inspector_name - } - }, - - modalCodeBlur(){ - let inData={ - functionType:'E', - codeNo:this.modalData.masterCodeNo - } - modalCodeBlur(inData).then(({data}) => { - if(data.rows.length > 0){ - this.modalData.masterCodeDesc = data.rows[0].codeDesc - }else { - this.modalData.masterCodeDesc = '' - } - }) - }, - // 获取主信息数据列表 getDataList () { this.searchData.limit = this.pageSize @@ -1053,7 +985,6 @@ this.dataListLoading = false }) }, - // 每页数 sizeChangeHandle (val) { this.pageSize = val @@ -1069,27 +1000,6 @@ selectionChangeHandle (val) { this.dataListSelections = val }, - // 新增检验记录 - addInspectionRecords(){ - this.modalData={ - flag:'1', - site: this.$store.state.user.site, - inspectionNo: '', - workOrderNumber: '', - workOrderQuantity: '', - reelNumber: '', - partNo: '', - rollingQuantity: '', - sampleQuantity: '', - subDetailCodeNo:'', - inspectionTypeNo:'102', - inspectorNo:'', - isQualified:'' - }; - this.modalDisableFlag = false; - this.inspectionRecordsFlag = true; - }, - // 删除检验记录 deleteModal (row) { this.$confirm(`是否删除这条检验记录?`, '提示', { @@ -1097,7 +1007,7 @@ cancelButtonText: '取消', type: 'warning' }).then(() => { - qcInspectionInformationDelete(row).then(({data}) => { + faiRecordDelete(row).then(({data}) => { if (data && data.code ==0) { this.getDataList() this.$message({ @@ -1116,68 +1026,36 @@ }).catch(() => { }) }, - - // 新增检验记录 - saveData(){ - if (this.modalData.detailCodeNo == '' || this.modalData.detailCodeNo == null) { - this.$alert('该工单的物料和分类模板不存在,请维护!', '错误', { - confirmButtonText: '确定' - }) - return false - } - if (this.modalData.inspectorNo == '' || this.modalData.inspectorNo == null) { - this.$alert('请选择质检员!', '错误', { - confirmButtonText: '确定' - }) - return false - } - if (this.modalData.reelNumber == '' || this.modalData.reelNumber == null) { - this.$alert('请填写卷号!', '错误', { - confirmButtonText: '确定' - }) - return false - } - if (this.modalData.rollingQuantity == '' || this.modalData.rollingQuantity == null) { - this.$alert('请填写收卷数量!', '错误', { + Transfer(){ + if (this.detailData.inspectionResult == '' || this.detailData.inspectionResult == null) { + this.$alert('请选择检验结论!', '错误', { confirmButtonText: '确定' }) return false } - if (this.modalData.sampleQuantity == '' || this.modalData.sampleQuantity == null) { - this.$alert('请填写首件取样数量!', '错误', { + if (this.detailData.inspectorNo == '' || this.detailData.inspectorNo == null) { + this.$alert('请选择检验员!', '错误', { confirmButtonText: '确定' }) return false } - if(this.modalData.flag == '1'){ - this.modalData.isQualified = 'D' - this.modalData.isQualifiedChinese = '待提交' - qcInspectionInformationSave(this.modalData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.inspectionRecordsFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - } - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) - } - }, - - Transfer(){ + // if (this.detailData.inspectionResult == 'Y' && (this.detailData.disposalMeasures == '特采' || this.detailData.disposalMeasures == '拒收')) { + // this.$alert('合格不予处置措施,请查看!', '错误', { + // confirmButtonText: '确定' + // }) + // return false + // } for (let i = 0; i < this.detailList.length; i++) { + if(this.detailList[i].itemResult == '' || this.detailList[i].itemResult == null){ + this.$alert(this.detailList[i].itemDesc+'是否合格未确认!', '错误', { + confirmButtonText: '确定' + }) + return false + } if(this.detailList[i].valueTypeDb == 'N') { checkSubDetailValue(this.detailList[i]).then(({data}) => { - if (data.flag == 2 && this.detailList[i].isQualified == 'Y') { - this.$confirm(this.detailList[i].itemDesc + '子明细中实测值不在合格范围!是否保存为合格', '提示', { + if (data.flag == 2 && this.detailList[i].itemResult == 'Y') { + this.$confirm(this.detailList[i].itemDesc + ' 中实测值不在合格范围!是否保存为合格?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' @@ -1186,46 +1064,23 @@ }).then(() => { return false }) + }else { + this.saveDetailInformation() } }) } } }, - // 新增明细信息 - async saveDetailInformation(){ - for (let i = 0; i < this.detailList.length; i++) { - if(this.detailList[i].isQualified == '' || this.detailList[i].isQualified == null){ - this.$alert(this.detailList[i].itemDesc+'是否合格未确认!', '错误', { - confirmButtonText: '确定' - }) - return false - } - if(this.detailList[i].valueTypeDb == 'N' && this.detailList[i].numberValue != '' && this.detailList[i].numberValue != null){ - if(this.detailList[i].minValue != null && this.detailList[i].minValue > this.detailList[i].numberValue && this.detailList[i].isQualified == 'Y'){ - await this.$confirm(this.detailList[i].itemDesc+'实测值小于最小值!是否保存为合格', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - }).then(() =>{ - return false - }) - } - if(this.detailList[i].minValue != null && this.detailList[i].maxValue < this.detailList[i].numberValue && this.detailList[i].isQualified == 'Y'){ - await this.$confirm(this.detailList[i].itemDesc+'实测值大于最大值!是否保存为合格', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - }).then(() =>{ - return false - }) - } - } - } + saveDetailInformation(){ + this.saveInformationData.inspectionNo = this.detailData.inspectionNo + this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures + this.saveInformationData.disposalRemark = this.detailData.disposalRemark + this.saveInformationData.inspectorNo = this.detailData.inspectorNo + this.saveInformationData.inspectionResult = this.detailData.inspectionResult + this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) - saveDetailInformation(this.saveInformationData.itemList).then(({data}) => { + saveFAIDetailedRecord(this.saveInformationData).then(({data}) => { if (data && data.code == '0') { this.getDataList() this.detailInformationFlag = false @@ -1246,85 +1101,81 @@ // 明细记录信息查询 detailModal(row){ + this.detailData.site = this.$store.state.user.site, + this.detailData.inspectionNo = row.inspectionNo this.detailData.partNo = row.partNo this.detailData.partDesc = row.partDesc this.detailData.rollQty = row.rollQty this.detailData.samplingQty = row.samplingQty + this.detailData.unqualifiedQty = row.unqualifiedQty + this.detailData.unqualifiedQuantity = row.unqualifiedQuantity + this.detailData.submitFlag = row.submitFlag + this.detailData.disposalMeasures = row.disposalMeasures + this.detailData.disposalRemark = row.disposalRemark + this.detailData.inspectionResult = row.inspectionResult + this.detailData.inspectorNo = row.inspectorNo + this.detailData.inspectionRemark = row.inspectionRemark faiDetailSearch(this.detailData).then(({data}) => { this.detailList = data.rows }) + this.inspectorSearch(); this.detailInformationFlag = true; }, - // 子明细记录信息查询 subDetailModal(row){ this.subDetailData.inspectionNo = row.inspectionNo; this.subDetailData.itemNo = row.itemNo; this.subDetailData.itemDesc = row.itemDesc; - this.subDetailData.methodName = row.methodName; - this.subDetailData.methodRemark = row.methodRemark; this.subDetailData.defaultValue = row.defaultValue; this.subDetailData.maxValue = row.maxValue; this.subDetailData.minValue = row.minValue; - selectSubDetailInformation(this.subDetailData).then(({data}) => { + selectFAISubDetailedRecord(this.subDetailData).then(({data}) => { this.tableData = data.rows }) this.subDetailFlag = true; }, - // 提交按钮 submitResult(row){ + if (row.inspectionResult == '不合格' && (row.disposalMeasures == '' || row.disposalMeasures == null)){ + this.$alert('处置措施未选择!', '错误', { + confirmButtonText: '确定' + }) + return false + } this.submitData.site = row.site - this.submitData.inspectionNo = row.inspectionNo; - this.checkCompletedData.inspectionNo = row.inspectionNo; - // 判断主信息和明细信息是否已填写 - checkCompleted(this.checkCompletedData).then(({data}) =>{ - if (data && data.code == '1') { - this.submitFlag = true; - }else { - this.$alert(data.msg, '错误!', { - confirmButtonText: '确定' - }) - } - }) + this.submitData.inspectionNo = row.inspectionNo + this.submitData.inspectionResult = row.inspectionResult + this.examineFlag = true; }, - // 保存提交结果 saveSubmitResult(){ - if (this.submitData.isQualified == '' || this.submitData.isQualified == null){ - this.$alert('请选择是否合格!', '错误', { - confirmButtonText: '确定' + this.$confirm( '是否将该记录保存为 ' + this.submitData.inspectionResult + '?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + saveFAISubmitResult(this.submitData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.examineFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } }) - return false - } - if (this.submitData.isQualified == 'Y'){ - this.submitData.isQualifiedChinese = '合格' - } - if (this.submitData.isQualified == 'N'){ - this.submitData.isQualifiedChinese = '不合格' - } - saveSubmitResult(this.submitData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.submitFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - } - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } + }).then(() => { + return false }) }, - - // 子明细方法 - //表格的新增 rowClassName({ row, rowIndex }) { row.xh = rowIndex + 1; @@ -1335,7 +1186,7 @@ }, //点击新增更多 handleAddBtn(td) { - checkOutIsSubmit(td).then(({data}) => { + checkFAIIsSubmit(td).then(({data}) => { if (data.flag != 1) { let obj = {}; obj.subDetailValue = ""; @@ -1350,7 +1201,7 @@ }, //删除 handleDeleteBtn(td) { - checkOutIsSubmit(td).then(({data}) => { + checkFAIIsSubmit(td).then(({data}) => { if (data.flag != 1) { if (this.checkedDetail.length == 0) { this.$alert("请先选择要删除的数据", "提示", { @@ -1394,23 +1245,11 @@ } }) - - }, - //红色五角星提示 - starAdd(obj) { - if (obj.columnIndex === 2 || obj.columnIndex === 3) { - return "star"; - } - }, - //点击编辑 - showUpdate(index, row) { - this.showEdit[index] = true; - this.$set(this.showEdit, index, true); //这里要用$set方法,否则页面状态不更新 }, + // 新增子明细记录 saveSubDetailResult(){ - //this.modalData.detailCodeNo = JSON.parse(JSON.stringify(this.modalData.detailCodeNo[1])) this.subDetailData.subDetailValues = this.tableData - subDetailInformationSave(this.subDetailData).then(({data}) => { + saveFAISubDetailed(this.subDetailData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.subDetailFlag = false @@ -1430,33 +1269,6 @@ }) }, - // 工单号失去焦点事件 - workOrderBlur(){ - let inData = { - site: this.modalData.site, - workOrderNumber: this.modalData.workOrderNumber - } - selectInformationByWorkOrderNo(inData).then(({data}) => { - if(data.rows.length > 0){ - this.modalData.partNo = data.rows[0].partNo - this.modalData.workOrderQuantity = data.rows[0].lotSize - selectModelByPartNo(this.modalData).then(({data}) => { - if(data.rows != null){ - this.modalData.detailCodeNo = data.rows[0].codeNo - this.modalData.detailCodeDesc = data.rows[0].detailCodeDesc - this.detailData.functionType = data.rows[0].functionType - }else { - this.modalData.detailCodeNo = '' - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) - }else { - this.modalData.partNo = '' - } - }) - }, // 校验用户是否收藏 favoriteIsOk() { @@ -1507,7 +1319,7 @@ async createExportData() { this.searchData.limit = -1 this.searchData.page = 1 - await qcInspectionInformationSearch(this.searchData).then(({data}) => { + await qcFAIInspectionSearch(this.searchData).then(({data}) => { this.exportList= data.page.list; }) @@ -1541,5 +1353,4 @@ diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue new file mode 100644 index 0000000..a08a39e --- /dev/null +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -0,0 +1,1356 @@ + + + + + diff --git a/src/views/modules/qc/qc_FAI_upload_file.vue b/src/views/modules/qc/qc_FAI_upload_file.vue new file mode 100644 index 0000000..899cfbb --- /dev/null +++ b/src/views/modules/qc/qc_FAI_upload_file.vue @@ -0,0 +1,135 @@ + + + +