Browse Source

2025-12-02

机台工作台过程检验新增优化
master
fengyuan_yang 1 month ago
parent
commit
bec32310e9
  1. 193
      src/views/modules/yieldReport/com_process_inspection.vue
  2. 2
      src/views/modules/yieldReport/com_produce_report_normal.vue

193
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 {

2
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -658,7 +658,7 @@
@refreshPageData="refreshPageData"></ComMalformedMaterial>
<!-- 过程检验组件 -->
<ComProcessInspection :visible.sync="showProcessInspectionFlag" :orderNo="scheduleData.orderNo" :resourceId="scheduleData.resourceId" :seqNo="scheduleData.seqNo"></ComProcessInspection>
<ComProcessInspection :visible.sync="showProcessInspectionFlag" :orderNo="scheduleData.orderNo" :resourceId="scheduleData.resourceId" :seqNo="scheduleData.seqNo" :site="scheduleData.site" :buNo="scheduleData.buNo"></ComProcessInspection>
<!-- MRB异常单登记组件 -->
<ComMrbRegister ref="comMrbRegister" :visible.sync="showMrbRegisterFlag" @confirmed="onMrbConfirmed"></ComMrbRegister>

Loading…
Cancel
Save