diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index b526f75..8918e45 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -148,6 +148,7 @@ export const deleteUserDefaultOperation = data => createAPI(`/pms/pqc/deleteUser export const getHuanXianSysUserList = data => createAPI(`/pms/pqc/getHuanXianSysUserList`,'post',data) export const getAllUserList = data => createAPI(`/pms/pqc/getAllUserList`,'post',data) export const queryResourceList2 = data => createAPI(`/pms/pqc/queryResourceList2`,'post',data) +export const querySopNum = data => createAPI(`/pms/pqc/querySopNum`,'post',data) // ===================================== IPQC检验 ===================================== export const qcIPQCInspectionSearch = data => createAPI(`/pms/qc/qcIPQCInspectionSearch`,'post',data) diff --git a/src/views/modules/qc/PQCResultEntry.vue b/src/views/modules/qc/PQCResultEntry.vue index 2f45a1b..9a33bde 100644 --- a/src/views/modules/qc/PQCResultEntry.vue +++ b/src/views/modules/qc/PQCResultEntry.vue @@ -286,6 +286,21 @@ + + + + + {{ i.sitename }} + + {{ i.buDesc }} + + + + - - - - - - - - - - - 物料编码 @@ -315,6 +319,14 @@ + + + + + + + + @@ -331,8 +343,19 @@ + + + + + + + + + 查询SOP编号 + 预览SOP + - + @@ -395,6 +418,20 @@ 关闭 + + + + + + 关闭 + + @@ -1025,6 +1062,7 @@ import { queryEamObjectlist,//查询机台对应的设备 queryUserDefaultOperationListByUsername,//查询用户是否有默认工序设置 getHuanXianSysUserList,//获取所有用户列表 + querySopNum,//查询Sop编码 } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -1041,6 +1079,7 @@ import subDetailUpload from "./sub_detail_upload" import QrCode from "../common/QrCode.vue"; import IqcFileTable from "./IQCFileTable.vue"; import {format} from "nightwatch/lib/util/utils"; +import {searchPartAttributeDetails} from "../../../api/qc/qc"; /*上传文件的組件*/ export default { components: { @@ -1060,30 +1099,30 @@ export default { } return this.tableData.slice(start,end) }, - returntemplateId(){ - let a = this.modalData.operationDesc - let list = this.operationList - for (let i = 0; i < list.length; i++) { - let data = list[i]; - if (data.code==a){ - this.modalData.templateId = data.template - return data.template - } - } - return '' - }, - returntemplateDesc(){ - let a = this.modalData.operationDesc - let list = this.operationList - for (let i = 0; i < list.length; i++) { - let data = list[i]; - if (data.code==a){ - this.modalData.templateDesc = data.templateDesc - return data.templateDesc - } - } - return '' - }, + // returntemplateId(){ + // let a = this.modalData.operationDesc + // let list = this.operationList + // for (let i = 0; i < list.length; i++) { + // let data = list[i]; + // if (data.code==a){ + // this.modalData.templateId = data.template + // return data.template + // } + // } + // return '' + // }, + // returntemplateDesc(){ + // let a = this.modalData.operationDesc + // let list = this.operationList + // for (let i = 0; i < list.length; i++) { + // let data = list[i]; + // if (data.code==a){ + // this.modalData.templateDesc = data.templateDesc + // return data.templateDesc + // } + // } + // return '' + // }, returnBU(){ let a = this.modalData.operationDesc let list = this.operationList @@ -1192,7 +1231,9 @@ export default { height: 200, dataList: [], dataListSelections: [], - partFlag:false, + partFlag: false, + pdfDialogVisible: false, + pdfUrl: '', partModalData:{}, modalData: { flag: '', @@ -1225,7 +1266,8 @@ export default { rollNo: '', umId: '', umName: '', - sjzs: '' + sjzs: '', + sopType: 'SOP-ST', }, partColomn:[ { @@ -3110,6 +3152,33 @@ export default { }) } }, + querySopNum(){ + let param = { + partNo: this.modalData.partNo, + searchFlag: 'Y', + site: this.modalData.bu.split('_')[0], + sopStatus: '下达', + sopType: this.modalData.sopType + } + querySopNum(param).then(({data})=>{ + if (data.code==0){ + this.modalData.sopNum = data.rows[0].sopName + this.modalData.sopUrl = data.rows[0].sopUrl + this.$message.success(this.modalData.sopUrl) + }else{ + this.$message.warning("当前的物料和SOP类型没有下达的SOP编码") + } + }) + }, + sopPreview(){ + if(this.modalData.sopNum == null || this.modalData.sopNum == ''){ + this.$message.warning("请先查询SOP编码") + return + } + this.$message.success(this.modalData.sopUrl) + this.pdfUrl = this.modalData.sopUrl + this.pdfDialogVisible = true + }, queryALLPartList(){ queryPartDescByNo(this.partModalData).then(({data})=>{ if (data.code==0){ @@ -3289,6 +3358,10 @@ export default { this.$message.warning('请填写物料编码!') return } + if (this.modalData.templateId==null ||this.modalData.templateId==''){ + this.$message.warning('检验模板不能为空!') + return + } if (this.modalData.eamObjectId==null ||this.modalData.eamObjectId==''){ this.$message.warning('请填写设备编码!') return @@ -3383,7 +3456,7 @@ export default { }, async queryOperationResourceList(){ let json = { - operation:this.modalData.operationDesc + operation: this.modalData.operationDesc } await queryOperationResourceList(json).then(({data})=>{ if (data.code==0){ @@ -3408,13 +3481,37 @@ export default { } }).catch() }, + //工序变更方法:1.根据工序对应机台查询 设备列表 2.根据BU、物料编码和工序查询检验模板 async operationDescInput(){ - this.queryResourceData = '' - this.eamObjectList = [] - //查询工序对应的机台 - await this.queryOperationResourceList() - //查询机台对应的设备 - // await this.queryEamObjectlist() + if (this.modalData.operationDesc != '' && this.modalData.operationDesc != null){ + this.queryResourceData = '' + this.eamObjectList = [] + // 查询工序对应的机台 + await this.queryOperationResourceList() + // 查询机台对应的设备 + // await this.queryEamObjectlist() + } + if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null || this.modalData.partNo === '' || this.modalData.partNo == null) { + return + } + const result = this.operationList.find(item => item.code == this.modalData.operationDesc); + let param = { + site: this.modalData.bu.split('_')[0], + buNo: this.modalData.bu.split('_')[1], + operation: result.description, + partNo: this.modalData.partNo, + attributeNo: this.modalData.partNo, + attributeType: 'A' + } + searchPartAttributeDetails(param).then(({data}) => { + if (data.rows[0] && data.rows[0]!=null){ + this.modalData.templateId = data.rows[0].templateId + this.modalData.templateDesc = data.rows[0].templateName + } else { + this.modalData.templateId = '' + this.modalData.templateDesc = '' + } + }) }, // 新增 addModal () { @@ -3453,7 +3550,8 @@ export default { changeLineTime: new Date(), sopNum:'', objectID:'', - changePeople:[this.$store.state.user.name] + changePeople:[this.$store.state.user.name], + sopType: 'SOP-ST', } this.operationList = [] this.resourceList = [] @@ -3462,8 +3560,6 @@ export default { this.queytOperationList() //查询当前用户默认工序设置 this.queryUserDefaultOperationListByUsername() - //新增 - this.operationDescInput() this.modalFlag = true this.checked = false }, @@ -3514,6 +3610,7 @@ export default { getRowData3(row){ this.modalData.partNo = row.partNo this.modalData.partDesc = row.partDesc + this.operationDescInput() this.partFlag = false }, diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index b4a9db2..61872fb 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -292,7 +292,7 @@ 查询 - 工序 + 工序 供应商 @@ -1657,6 +1657,7 @@ }, checkInspectionType () { + this.operationData.inspectionTypeNo = this.detailData.inspectionTypeNo getPartTemplateLists(this.detailData).then(({data}) => { this.operation = '' this.resourceId = '' @@ -1716,7 +1717,7 @@ this.$message.warning('请选择可选模板!') return } - if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')) { + if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107' || this.detailData.inspectionTypeNo === '108') && (this.operation == null || this.operation === '')) { this.$message.warning('请选择工序!') return } @@ -1898,6 +1899,7 @@ // 获取工序列表 getOperationList () { + this.$message.success(this.operationData) getOperationDescList(this.operationData).then(({data}) => { if (data && data.code === 0) { this.operationList = data.rows