From bec32310e913fe3333a6e2b2932931c5df2ff7b9 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Tue, 2 Dec 2025 11:20:19 +0800
Subject: [PATCH] =?UTF-8?q?2025-12-02=20=E6=9C=BA=E5=8F=B0=E5=B7=A5?=
=?UTF-8?q?=E4=BD=9C=E5=8F=B0=E8=BF=87=E7=A8=8B=E6=A3=80=E9=AA=8C=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../yieldReport/com_process_inspection.vue | 193 ++++++++++++++++--
.../yieldReport/com_produce_report_normal.vue | 6 +-
2 files changed, 179 insertions(+), 20 deletions(-)
diff --git a/src/views/modules/yieldReport/com_process_inspection.vue b/src/views/modules/yieldReport/com_process_inspection.vue
index 2c07954..894cf1d 100644
--- a/src/views/modules/yieldReport/com_process_inspection.vue
+++ b/src/views/modules/yieldReport/com_process_inspection.vue
@@ -480,7 +480,9 @@ import {
rollNoEnter as rollNoEnterAPI, // 标签号回车事件
searchSeqInfo, // 派工单号查询
getSiteAndBuByUserName2, // 获取BU列表
- saveIPQCDetailedRecord // 保存检验明细记录
+ saveIPQCDetailedRecord, // 保存检验明细记录
+ getSpecialOperationList, // 获取特殊工序列表
+ inspectionTypeSearch, // 搜索所有检验类型
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import { getInspectionFile } from '@/api/eam/eam_object_list.js'
@@ -503,6 +505,14 @@ export default {
seqNo: {
type: String,
default: ''
+ },
+ site: {
+ type: String,
+ default: ''
+ },
+ buNo: {
+ type: String,
+ default: ''
}
},
data() {
@@ -743,14 +753,19 @@ export default {
seqNo: '',
orderNo: '',
operationDesc: '',
+ operationNo: '',
+ resourceId: '',
resourceDesc: '',
+ workCenterNo: '',
partNo: '',
partDesc: '',
invdefinetype: '',
sku: '',
+ cinvSourceCode: '',
inspectionTypeNo: '',
rollQty: '',
umId: '',
+ umName: '',
templateId: '',
templateName: '',
sjzs: '',
@@ -993,17 +1008,18 @@ export default {
}
],
rules: {
- bu: [{ required: true, message: '请选择BU', trigger: 'change' }],
- seqNoType: [{ required: true, message: '请输入派工单号', trigger: 'blur' }],
- orderNoType: [{ required: true, message: '请输入工单号', trigger: 'blur' }],
- operationDescType: [{ required: true, message: '请选择工序', trigger: 'change' }],
- resourceIdType: [{ required: true, message: '请输入机台', trigger: 'blur' }],
- partNoType: [{ required: true, message: '请输入物料编码', trigger: 'blur' }],
- inspectionTypeNoType: [{ required: true, message: '请选择检验类型', trigger: 'change' }],
- rollQtyType: [{ required: true, message: '请输入送检数量', trigger: 'blur' }],
- umIdType: [{ required: true, message: '请选择单位', trigger: 'change' }],
- templateId: [{ required: true, message: '请选择检验模板', trigger: 'change' }]
- }
+ bu: [{ required: true, message: '请选择BU', trigger: ['blur','change']}],
+ seqNoType: [{ required: true, message: '请输入派工单号', trigger: ['blur','change'] }],
+ orderNoType: [{ required: true, message: '请输入工单号', trigger: ['blur','change'] }],
+ operationDescType: [{ required: true, message: '请选择工序', trigger: ['blur','change'] }],
+ resourceIdType: [{ required: true, message: '请输入机台', trigger: ['blur','change'] }],
+ partNoType: [{ required: true, message: '请输入物料编码', trigger: ['blur','change'] }],
+ inspectionTypeNoType: [{ required: true, message: '请选择检验类型', trigger: ['blur','change'] }],
+ rollQtyType: [{ required: true, message: '请输入送检数量', trigger: ['blur','change'] }],
+ umIdType: [{ required: true, message: '请选择单位', trigger: ['blur','change'] }],
+ templateId: [{ required: true, message: '请选择检验模板', trigger: ['blur','change'] }]
+ },
+ typeOptions: [],
}
},
watch: {
@@ -1032,13 +1048,32 @@ export default {
this.getUmList()
// 查看 质量任务生成规则控制 动控是否开启
this.queryController()
+ this.inspectionTypeSearch()
+ },
+
+ // 查询检验类型
+ inspectionTypeSearch () {
+ let tempData = {
+ site: this.site
+ }
+ inspectionTypeSearch(tempData).then(({data}) => {
+ if (data.code === 0) {
+ this.typeOptions = data.rows
+ this.typeOptions.forEach(val => {
+ if (val.inspectionTypeName.includes('IPQC')) {
+ this.templateData.inspectionTypeNo = val.inspectionTypeNo
+ this.templateData.inspectionTypeName = val.inspectionTypeName
+ }
+ })
+ }
+ })
},
// 检查动控是否开启
queryController () {
let tempData = {
controlNo: '10004',
- site: this.$store.state.user.site,
+ site: this.site,
}
queryController(tempData).then(({data}) => {
if (data && data.code === 0) {
@@ -1128,14 +1163,19 @@ export default {
seqNo: '',
orderNo: '',
operationDesc: '',
+ operationNo: '',
+ resourceId: '',
resourceDesc: '',
+ workCenterNo: '',
partNo: '',
partDesc: '',
invdefinetype: '',
sku: '',
+ cinvSourceCode: '',
inspectionTypeNo: '',
rollQty: '',
- umId: '',
+ umId: this.umList.length > 0 ? this.umList[0].umId : '',
+ umName: this.umList.length > 0 ? this.umList[0].umName : '',
templateId: '',
templateName: '',
sjzs: '',
@@ -1143,13 +1183,24 @@ export default {
specialRequirements: '',
specialTaskFlag: 'N'
}
+ this.operationList = []
this.checked = false
this.modalFlag = true
},
// BU变化事件
buChange() {
- // BU变化处理逻辑
+ if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
+ this.modalData.templateId = ''
+ this.modalData.templateName = ''
+ } else { // 无工单检验
+ this.modalData.partNo = ''
+ this.modalData.partDesc = ''
+ this.modalData.invdefinetype = ''
+ this.modalData.sku = ''
+ this.modalData.templateId = ''
+ this.modalData.templateName = ''
+ }
},
// 标签号回车事件
@@ -1193,7 +1244,11 @@ export default {
// 获取单位列表
getUmList() {
- umSearch().then(({data}) => {
+ let tempData = {
+ site: this.site,
+ active: 'Y'
+ }
+ umSearch(tempData).then(({data}) => {
if (data && data.code === 0) {
this.umList = data.rows
}
@@ -1294,16 +1349,120 @@ export default {
// 无工单检验变化
changeSpecialTask() {
- this.modalData.specialTaskFlag = this.checked ? 'Y' : 'N'
+ // 先重置数据
+ this.modalData = {
+ flag: '1',
+ site: '',
+ bu: this.userBuList.length > 0 ? this.userBuList[0].buNo : '',
+ rollNo: '',
+ seqNo: '',
+ orderNo: '',
+ operationDesc: '',
+ operationNo: '',
+ resourceId: '',
+ resourceDesc: '',
+ workCenterNo: '',
+ partNo: '',
+ partDesc: '',
+ invdefinetype: '',
+ sku: '',
+ cinvSourceCode: '',
+ inspectionTypeNo: '',
+ rollQty: '',
+ umId: this.umList.length > 0 ? this.umList[0].umId : '',
+ umName: this.umList.length > 0 ? this.umList[0].umName : '',
+ templateId: '',
+ templateName: '',
+ sjzs: '',
+ batchRollNo: '',
+ specialRequirements: '',
+ specialTaskFlag: ''
+ }
+ // 获取选中框
+ let obj = document.getElementsByName('specialTask')
+ // 判断是否打勾
+ if (obj[0].checked) {
+ let tempData = {
+ site: '',
+ bu: this.modalData.bu
+ }
+ this.modalData.specialTaskFlag = 'Y'
+ // 获取特殊工序列表
+ getSpecialOperationList(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.operationList = data.rows
+ } else {
+ this.$message.error(data.msg)
+ }
+ })
+ // 派工单和工单号赋值
+ this.modalData.seqNo = '000#1TSGD'
+ this.modalData.orderNo = '000#1'
+ } else {
+ this.operationList = []
+ this.modalData.specialTaskFlag = ''
+ }
},
// 保存数据
saveData() {
+ // 验证 BU
+ if (this.modalData.bu === '' || this.modalData.bu == null) {
+ this.$message.warning('请选择BU!')
+ return
+ }
+ // 验证派工单号
+ if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
+ this.$message.warning('请选择派工单!')
+ return
+ }
+ // 验证工单号
+ if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
+ this.$message.warning('请选择工单!')
+ return
+ }
+ // 验证检验类型
+ if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
+ this.$message.warning('请选择检验类型!')
+ return
+ }
+ // 验证物料编码(非无工单检验)
+ if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
+ this.$message.warning('请选择物料!')
+ return
+ }
+ // 验证工序
+ if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
+ this.$message.warning('请选择工序!')
+ return
+ }
+ // 验证机台(非无工单检验)
+ if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
+ this.$message.warning('请选择机台!')
+ return
+ }
+ // 验证送检数量
+ if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
+ this.$message.warning('请填写送检数量!')
+ return
+ }
+ // 验证单位
+ if (this.modalData.umId === '' || this.modalData.umId == null) {
+ this.$message.warning('请选择单位!')
+ return
+ }
+ // 验证检验模板(动控开启时)
+ if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
+ this.$message.warning('请选择检验模板!')
+ return
+ }
+
this.saveLoading = true
if (this.modalData.flag === '1') {
saveOsInspection(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
+ this.operationList = []
this.modalFlag = false
this.$message.success('操作成功')
} else {
diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue
index f255671..467ad5d 100644
--- a/src/views/modules/yieldReport/com_produce_report_normal.vue
+++ b/src/views/modules/yieldReport/com_produce_report_normal.vue
@@ -657,8 +657,8 @@
-
-
+
+
@@ -4661,7 +4661,7 @@ export default {
try {
// 1. 先查询打印的卷信息
const {data} = await getSfdcFlowLabelData(sfdcRow);
-
+
if (data.code !== 200) {
this.$message.error(data.msg);
return;