From 10038707f899d2ee5fc01bfb0ff97f92132cb8b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=AE=8F=E6=96=8C?= <2164406372@qq.com>
Date: Fri, 22 Aug 2025 11:01:17 +0800
Subject: [PATCH] =?UTF-8?q?1.=E7=89=A9=E6=96=99=E5=B1=9E=E6=80=A7=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0pqc=E7=B1=BB=E5=9E=8B=E6=A3=80=E9=AA=8C=E6=A8=A1?=
=?UTF-8?q?=E6=9D=BF=E6=97=B6=EF=BC=8C=E8=A6=81=E6=B1=82=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E5=B7=A5=E5=BA=8F=202.=E4=BF=AE=E6=94=B9PQC=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/qc/qc.js | 1 +
src/views/modules/qc/PQCResultEntry.vue | 193 +++++++++++++++++------
src/views/modules/qc/qcPartAttribute.vue | 6 +-
3 files changed, 150 insertions(+), 50 deletions(-)
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