|
|
|
@ -987,6 +987,19 @@ |
|
|
|
fqcRecordOverLoad, // 任务重载 |
|
|
|
searchPartAttributeDetails, // 查询物料属性模板 |
|
|
|
} 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 { getSiteData } from '@/api/board.js' |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
@ -1681,6 +1694,8 @@ |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
inspectionNo:'', |
|
|
|
// 实验室检验单号(qc_fqc_record.ref_info1) |
|
|
|
refInfo1: '', |
|
|
|
partNo:'', |
|
|
|
partDesc:'', |
|
|
|
rollQty:'', |
|
|
|
@ -3699,6 +3714,10 @@ |
|
|
|
saveFQCDetailedRecord(this.saveInformationData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
// 最终检验完成后,如关联了实验室检验单号则触发QMS标签打印 |
|
|
|
if (type === '2' && this.detailData.refInfo1) { |
|
|
|
this.toPrintForQMS(this.detailData.site, this.detailData.refInfo1) |
|
|
|
} |
|
|
|
if (keepDetailOpen) { |
|
|
|
this.getInspectionFormData() |
|
|
|
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) { |
|
|
|
this.actionData = { |
|
|
|
@ -3817,6 +3922,7 @@ |
|
|
|
this.detailData.responsiblePerson = row.responsiblePerson |
|
|
|
this.detailData.responsiblePersonName = row.responsiblePersonName |
|
|
|
this.detailData.state = row.state |
|
|
|
this.detailData.refInfo1 = row.refInfo1 || '' |
|
|
|
this.detailData.releaseFlag = row.releaseFlag || 'N' |
|
|
|
if (row.state === '待检验') { |
|
|
|
this.detailData.passQty = row.samplingQty |
|
|
|
|