diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index 4dd201f..4afd1f8 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -84,6 +84,7 @@ export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescL export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data) export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data) export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data) +export const overLoadSearchPartInfo = data => createAPI(`/pms/qc/overLoadSearchPartInfo`,'post',data) // ===================================== 类别属性设置 ===================================== export const qcFamilyAttributeSearch = data => createAPI(`/pms/qc/qcFamilyAttributeSearch`,'post',data) diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue index 9095683..df0440c 100644 --- a/src/views/modules/qc/IQCResultEntry.vue +++ b/src/views/modules/qc/IQCResultEntry.vue @@ -422,6 +422,121 @@ + + + + 物料编码: + + + + + + + + + 供应商编码: + + + + + + + + 确定 + 关闭 + + + + + + + + + {{ i.sitename }} + + {{ i.buDesc }} + + + + + + + + + + 查询 + + + + + + + + + + 关闭 + + + + + + + + + + + + + + + 查询 + + + + + + + + + + + 关闭 + + + @@ -677,6 +792,7 @@ getIQCItemObjectList, // 查询项目设备 dataAcquisitionByItem, // 根据项目数据采集 cancelApproval, // 取消审核 + overLoadSearchPartInfo, // 查询物料属性信息 } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -693,6 +809,7 @@ import subDetailUpload from "./sub_detail_upload" import QrCode from "../common/QrCode.vue"; import IqcFileTable from "./IQCFileTable.vue"; + import {getManufacturerList, searchPartAttributeDetails} from "../../../api/qc/qc"; export default { components: { IqcFileTable, @@ -1691,6 +1808,28 @@ batchQualifiedQty: '' }, detailInformationFlag: false, + iqcRecordOverFlag: false, + iqcRecordOverFlag2: false, + manufacturerModelFlag: false, + manufacturerData: { + site: '', + manufacturerID: '', + manufacturerName: '' + }, + iqcRecordOverPartNo: '', + iqcRecordOverPartDesc: '', + iqcRecordOverSupplierNo: '', + iqcRecordOverSupplierDesc: '', + iqcRecordOverModal:{ + attributeType: 'A', + userName: this.$store.state.user.name, + page: 1, + limit: 1000, + partNo: '', + partDesc: '' + }, + overLoadPartList: [], + manufacturerList: [], detailList: [], saveInformationData: { site: '', @@ -2638,40 +2777,127 @@ this.$message.warning('请勾选要重载的检验单!') return } - if (this.IQCSelections.every(val => val.state === '待检验' || val.state === '未开始')) { - this.$confirm(`是否重载该 `+ this.IQCSelections.length +` 条检验单?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - let tempData = { - site: '', - submitList: this.IQCSelections - } - iqcRecordOverLoad(tempData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.IQCSelections = [] - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + if (this.IQCSelections.length === 1 && this.IQCSelections[0].buNo == '02-Hardtag' && (this.IQCSelections[0].state=='待检验'|| this.IQCSelections[0].state=='未开始') &&this.IQCSelections[0].partNo.substring(0,1) === '1') { + this.iqcRecordOverPartNo = this.IQCSelections[0].partNo + this.iqcRecordOverPartDesc = this.IQCSelections[0].partDesc + this.iqcRecordOverSupplierNo = this.IQCSelections[0].supplierNo + this.iqcRecordOverSupplierDesc = this.IQCSelections[0].supplierDesc + this.iqcRecordOverFlag = true + } else { + if (this.IQCSelections.every(val => val.state === '待检验' || val.state === '未开始')) { + this.$confirm(`是否重载该 `+ this.IQCSelections.length +` 条检验单?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let tempData = { + site: '', + submitList: this.IQCSelections } + this.overLoadModal2(tempData) + // iqcRecordOverLoad(tempData).then(({data}) => { + // if (data && data.code === 0) { + // this.getDataList() + // this.IQCSelections = [] + // this.$message({ + // message: '操作成功', + // type: 'success', + // duration: 1500, + // onClose: () => {} + // }) + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }) + // } + // }) }) - }) - } else { - this.$message.warning('检验单必须为待检验状态!') - return + } else { + this.$message.warning('检验单必须为待检验状态!') + return + } } - }, - + overLoadModal2(tempData){ + iqcRecordOverLoad(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.IQCSelections = [] + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + overLoadModal3(){ + let IQCSelections = this.IQCSelections + IQCSelections[0].partNo = this.iqcRecordOverPartNo + IQCSelections[0].partDesc = this.iqcRecordOverPartDesc + IQCSelections[0].supplierNo = this.iqcRecordOverSupplierNo + let tempData = { + site: '', + submitList: IQCSelections + } + this.overLoadModal2(tempData) + this.iqcRecordOverFlag = false + }, + overLoadSearchPartInfo(){ + this.iqcRecordOverModal.buDesc = '硬标' + overLoadSearchPartInfo(this.iqcRecordOverModal).then(({data})=>{ + if (data && data.code === 0) { + this.overLoadPartList = data.list + } + }) + this.iqcRecordOverFlag2 = true + }, + // 获取供应商列表 + getManufacturerList () { + this.manufacturerData.site = '3' + getManufacturerList(this.manufacturerData).then(({data}) => { + if (data && data.code === 0) { + this.manufacturerList = data.rows + this.manufacturerModelFlag = true + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + getRowData1(row){ + this.iqcRecordOverPartNo = row.partNo + this.iqcRecordOverPartDesc = row.partDesc + let param = { + site: '3', + buNo: '02-Hardtag', + partNo: this.iqcRecordOverPartNo, + attributeNo: this.iqcRecordOverPartNo, + partDesc: this.iqcRecordOverPartDesc, + inspectionTypeNo: '105', + attributeType: 'A' + } + //查询选择的物料属性 对应的检验模板 供应商信息 + searchPartAttributeDetails(param).then(({data}) => { + console.log(data.rows.length) + if (data.rows.length > 0) { + this.iqcRecordOverSupplierNo = data.rows[0].manufacturerID + this.iqcRecordOverSupplierDesc = data.rows[0].manufacturerName + } + }) + this.iqcRecordOverFlag2 = false + }, + manufacturerClickRow(row){ + this.iqcRecordOverSupplierNo = row.manufacturerID + this.iqcRecordOverSupplierDesc = row.manufacturerName + this.manufacturerModelFlag = false + }, // 审核按钮 submitResult () { let tempData1 = '' // 记录不是待审核状态的单号