Browse Source

(IQC、IPQC、FQC、SQC)标签打印

master
qiankanghui 15 hours ago
parent
commit
fd39b856a9
  1. 2
      src/views/modules/print/print_inspect_labelForPartStock.js
  2. 106
      src/views/modules/qc/FQCResultEntry.vue
  3. 89
      src/views/modules/qc/IPQCResultEntry.vue
  4. 89
      src/views/modules/qc/IQCResultEntry.vue
  5. 86
      src/views/modules/qc/SQCResultEntry.vue

2
src/views/modules/print/print_inspect_labelForPartStock.js

@ -46,7 +46,7 @@ export function printInspectStockLabel(printList) {
LODOP.ADD_PRINT_TEXT(64,8,112,25,"ExpireDate:"); LODOP.ADD_PRINT_TEXT(64,8,112,25,"ExpireDate:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(64,110,148,24,printData.remark==="不合格"?" ":printData.newDate.substring(0,10));
LODOP.ADD_PRINT_TEXT(64,110,148,24,printData.remark==="不合格"?" ":(printData.newDate?printData.newDate.substring(0,10):""));
LODOP.SET_PRINT_STYLEA(0,"FontSize",10); LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(194,8,128,25,"MFG Date:"); LODOP.ADD_PRINT_TEXT(194,8,128,25,"MFG Date:");

106
src/views/modules/qc/FQCResultEntry.vue

@ -987,6 +987,19 @@
fqcRecordOverLoad, // 任务重载 fqcRecordOverLoad, // 任务重载
searchPartAttributeDetails, // 查询物料属性模板 searchPartAttributeDetails, // 查询物料属性模板
} from "@/api/qc/qc.js" } from "@/api/qc/qc.js"
import {
getInspectData,
inspectPrint,
} from '@/api/production/inspect.js'
import {
printInspectLabel,
} from "@/views/modules/print/print_inspect_label.js"
import {
printInspectLabelForB,
} from "@/views/modules/print/print_inspect_labelForB.js"
import {
printInspectStockLabel,
} from "@/views/modules/print/print_inspect_labelForPartStock.js"
import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js" import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js"
import { getSiteData } from '@/api/board.js' import { getSiteData } from '@/api/board.js'
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -1681,6 +1694,8 @@
site: '', site: '',
buNo: '', buNo: '',
inspectionNo:'', inspectionNo:'',
// 实验室检验单号(qc_fqc_record.ref_info1)
refInfo1: '',
partNo:'', partNo:'',
partDesc:'', partDesc:'',
rollQty:'', rollQty:'',
@ -3699,6 +3714,10 @@
saveFQCDetailedRecord(this.saveInformationData).then(({data}) => { saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
// 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印
if (type === '2' && this.detailData.refInfo1) {
this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1)
}
if (keepDetailOpen) { if (keepDetailOpen) {
this.getInspectionFormData() this.getInspectionFormData()
if (!options.skipSuccessMessage) { if (!options.skipSuccessMessage) {
@ -3732,6 +3751,92 @@
}) })
}, },
// 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签(复制自 inspect.vue)
toPrintForQMS (site, transNo) {
let indata={
site:site,
transNo:transNo
}
getInspectData(indata).then(({data}) => {
if(!data.rows||data.rows.length===0){
this.$alert("关联的实验室检验数据不存在或者已取消", '错误', {
confirmButtonText: '确定'
})
return
}
let row=data.rows[0]
if(row.toTypeFlagDb=='S') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectStockLabel(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch((err) => {
this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', {
confirmButtonText: '确定'
})
})
}else if(row.toTypeFlagDb=='B') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.qtyRequired=row.transQty
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectLabelForB(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch((err) => {
this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', {
confirmButtonText: '确定'
})
})
}else {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData = data.row
printData.userId = this.$store.state.user.name
if (row.toTypeFlagDb != 'I') {
printData.seqNo = printData.orderNo
}
if (row.toTypeFlag == '硫化检验单(重复)') {
printData.type = '(变更)'
} else {
printData.type = ''
}
let array = [];
array.push(printData)
printInspectLabel(array)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch((err) => {
this.$alert('打印检验标签失败:' + (err && err.message ? err.message : err), '错误', {
confirmButtonText: '确定'
})
})
}
}).catch((err) => {
this.$alert('获取实验室检验数据失败:' + (err && err.message ? err.message : err), '错误', {
confirmButtonText: '确定'
})
})
},
// 开始检验 // 开始检验
actionModal (row) { actionModal (row) {
this.actionData = { this.actionData = {
@ -3817,6 +3922,7 @@
this.detailData.responsiblePerson = row.responsiblePerson this.detailData.responsiblePerson = row.responsiblePerson
this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.refInfo1 = row.refInfo1 || ''
this.detailData.releaseFlag = row.releaseFlag || 'N' this.detailData.releaseFlag = row.releaseFlag || 'N'
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty

89
src/views/modules/qc/IPQCResultEntry.vue

@ -1004,6 +1004,19 @@
ipqcRecordOverLoad, // 任务重载 ipqcRecordOverLoad, // 任务重载
searchPartAttributeDetails, // 查询物料属性模板 searchPartAttributeDetails, // 查询物料属性模板
} from "@/api/qc/qc.js" } from "@/api/qc/qc.js"
import {
getInspectData,
inspectPrint,
} from '@/api/production/inspect.js'
import {
printInspectLabel,
} from "@/views/modules/print/print_inspect_label.js"
import {
printInspectLabelForB,
} from "@/views/modules/print/print_inspect_labelForB.js"
import {
printInspectStockLabel,
} from "@/views/modules/print/print_inspect_labelForPartStock.js"
import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js" import {getTableDefaultListLanguage, getTableUserListLanguage, saveTableDefaultList} from "@/api/table.js"
import { getSiteData } from '@/api/board.js' import { getSiteData } from '@/api/board.js'
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -1669,6 +1682,8 @@
site: '', site: '',
buNo: '', buNo: '',
inspectionNo:'', inspectionNo:'',
// 实验室检验单号(qc_ipqc_record.ref_info1)
refInfo1: '',
partNo:'', partNo:'',
partDesc:'', partDesc:'',
rollQty:'', rollQty:'',
@ -3737,6 +3752,10 @@
saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => { saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
// 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印
if (type === '2' && this.detailData.refInfo1) {
this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1)
}
if (keepDetailOpen) { if (keepDetailOpen) {
this.getInspectionFormData() this.getInspectionFormData()
if (!options.skipSuccessMessage) { if (!options.skipSuccessMessage) {
@ -3770,6 +3789,75 @@
}) })
}, },
// 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签
toPrintForQMS (site, transNo) {
let indata={
site:site,
transNo:transNo
}
getInspectData(indata).then(({data}) => {
if(!data.rows||data.rows.length===0){
this.$alert("关联的实验室检验数据不存在或者已取消", '错误', {
confirmButtonText: '确定'
})
}
let row=data.rows[0]
if(row.toTypeFlagDb=='S') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectStockLabel(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}else if(row.toTypeFlagDb=='B') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.qtyRequired=row.transQty
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectLabelForB(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}else {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData = data.row
printData.userId = this.$store.state.user.name
if (row.toTypeFlagDb != 'I') {
printData.seqNo = printData.orderNo
}
if (row.toTypeFlag == '硫化检验单(重复)') {
printData.type = '(变更)'
} else {
printData.type = ''
}
let array = [];
array.push(printData)
printInspectLabel(array)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
})
},
// 开始检验 // 开始检验
actionModal (row) { actionModal (row) {
@ -3857,6 +3945,7 @@
this.detailData.responsiblePerson = row.responsiblePerson this.detailData.responsiblePerson = row.responsiblePerson
this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.refInfo1 = row.refInfo1 || ''
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty
} else { } else {

89
src/views/modules/qc/IQCResultEntry.vue

@ -866,6 +866,19 @@
import IqcFileTable from "./IQCFileTable.vue"; import IqcFileTable from "./IQCFileTable.vue";
import column from "../common/column.vue"; import column from "../common/column.vue";
import {getManufacturerList, searchPartAttributeDetails} from "../../../api/qc/qc"; import {getManufacturerList, searchPartAttributeDetails} from "../../../api/qc/qc";
import {
getInspectData,
inspectPrint,
} from '@/api/production/inspect.js'
import {
printInspectLabel,
} from "@/views/modules/print/print_inspect_label.js"
import {
printInspectLabelForB,
} from "@/views/modules/print/print_inspect_labelForB.js"
import {
printInspectStockLabel,
} from "@/views/modules/print/print_inspect_labelForPartStock.js"
export default { export default {
mixins: [workingFiles], mixins: [workingFiles],
components: { components: {
@ -1890,6 +1903,8 @@
site: '', site: '',
buNo: '', buNo: '',
inspectionNo: '', inspectionNo: '',
// 实验室检验单号(qc_iqc_record.ref_info1)
refInfo1: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
cinvSourceCode:'', cinvSourceCode:'',
@ -2781,6 +2796,10 @@
saveIQCDetailedRecord(this.saveInformationData).then(({data}) => { saveIQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
// 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印
if (type === '2' && this.detailData.refInfo1) {
this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1)
}
if (keepDetailOpen) { if (keepDetailOpen) {
this.getInspectionFormData() this.getInspectionFormData()
if (!options.skipSuccessMessage) { if (!options.skipSuccessMessage) {
@ -2814,6 +2833,75 @@
}) })
}, },
// 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签
toPrintForQMS (site, transNo) {
let indata={
site:site,
transNo:transNo
}
getInspectData(indata).then(({data}) => {
if(!data.rows||data.rows.length===0){
this.$alert("关联的实验室检验数据不存在或者已取消", '错误', {
confirmButtonText: '确定'
})
}
let row=data.rows[0]
if(row.toTypeFlagDb=='S') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectStockLabel(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}else if(row.toTypeFlagDb=='B') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.qtyRequired=row.transQty
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectLabelForB(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}else {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData = data.row
printData.userId = this.$store.state.user.name
if (row.toTypeFlagDb != 'I') {
printData.seqNo = printData.orderNo
}
if (row.toTypeFlag == '硫化检验单(重复)') {
printData.type = '(变更)'
} else {
printData.type = ''
}
let array = [];
array.push(printData)
printInspectLabel(array)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
})
},
// 开始检验 // 开始检验
actionModal (row) { actionModal (row) {
this.actionData = { this.actionData = {
@ -2901,6 +2989,7 @@
this.detailData.invdefinetype = row.invdefinetype this.detailData.invdefinetype = row.invdefinetype
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.inspectCode = row.inspectCode || '' this.detailData.inspectCode = row.inspectCode || ''
this.detailData.refInfo1 = row.refInfo1 || ''
this.$set(this.detailData, 'submissionType', row.submissionType || '') this.$set(this.detailData, 'submissionType', row.submissionType || '')
this.$set(this.detailData, 'supplierNo', row.supplierNo || '') this.$set(this.detailData, 'supplierNo', row.supplierNo || '')
// if (row.state === '待检验') { // if (row.state === '待检验') {

86
src/views/modules/qc/SQCResultEntry.vue

@ -710,6 +710,19 @@
cancelSQCApproval, cancelSQCApproval,
getBatchDetailsByLaboratoryOrder, getBatchDetailsByLaboratoryOrder,
} from "@/api/qc/qc.js" } from "@/api/qc/qc.js"
import {
getInspectData,
inspectPrint,
} from '@/api/production/inspect.js'
import {
printInspectLabel,
} from "@/views/modules/print/print_inspect_label.js"
import {
printInspectLabelForB,
} from "@/views/modules/print/print_inspect_labelForB.js"
import {
printInspectStockLabel,
} from "@/views/modules/print/print_inspect_labelForPartStock.js"
import Chooselist from '@/views/modules/common/Chooselist_eam' import Chooselist from '@/views/modules/common/Chooselist_eam'
import workingFiles from "./workingFiles" import workingFiles from "./workingFiles"
import { import {
@ -2054,6 +2067,10 @@
saveSQCDetailedRecord(this.saveInformationData).then(({data}) => { saveSQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getDataList() this.getDataList()
// 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印
if (type === '2' && this.detailData.refInfo1) {
this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1)
}
if (keepDetailOpen) { if (keepDetailOpen) {
this.getInspectionFormData() this.getInspectionFormData()
if (!options.skipSuccessMessage) { if (!options.skipSuccessMessage) {
@ -2074,6 +2091,75 @@
this.transferLoadFlag = false this.transferLoadFlag = false
}) })
}, },
// 检验完成后根据 site+实验室单号 获取实验室检验数据并打印标签
toPrintForQMS (site, transNo) {
let indata={
site:site,
transNo:transNo
}
getInspectData(indata).then(({data}) => {
if(!data.rows||data.rows.length===0){
this.$alert("关联的实验室检验数据不存在或者已取消", '错误', {
confirmButtonText: '确定'
})
}
let row=data.rows[0]
if(row.toTypeFlagDb=='S') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectStockLabel(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}else if(row.toTypeFlagDb=='B') {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData=data.row
printData.qtyRequired=row.transQty
printData.userId=this.$store.state.user.name
let array=[];
array.push(printData)
printInspectLabelForB(array)
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}else {
inspectPrint(row).then(({data}) => {
if (data && data.code === 0) {
let printData = data.row
printData.userId = this.$store.state.user.name
if (row.toTypeFlagDb != 'I') {
printData.seqNo = printData.orderNo
}
if (row.toTypeFlag == '硫化检验单(重复)') {
printData.type = '(变更)'
} else {
printData.type = ''
}
let array = [];
array.push(printData)
printInspectLabel(array)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
})
},
disposalMeasuresSearch () { disposalMeasuresSearch () {
disposalMeasuresSearch({ inspectionTypeNo: '105' }).then(({data}) => { disposalMeasuresSearch({ inspectionTypeNo: '105' }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

Loading…
Cancel
Save