| | |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | | downloadQualityInspect, |
| | | downloadOutReport, |
| | | qualityInspectDel, |
| | | qualityInspectListPage, qualityInspectUpdate, |
| | | submitQualityInspect |
| | |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "生产工单号", |
| | | prop: "workOrderNo", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "检验员", |
| | | prop: "checkName", |
| | | }, |
| | |
| | | prop: "productName", |
| | | }, |
| | | { |
| | | label: "批号", |
| | | prop: "batchNo", |
| | | }, |
| | | { |
| | | label: "检品数量", |
| | | prop: "inspectedQuantity", |
| | | }, |
| | | { |
| | | label: "请检部门", |
| | | prop: "manufacturingTeam", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | prop: "model", |
| | | }, |
| | | { |
| | | label: "UID码", |
| | | prop: "uidNo", |
| | | }, |
| | | { |
| | | label: "单位", |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 280, |
| | | width: 340, |
| | | operation: [ |
| | | { |
| | | name: "编辑", |
| | |
| | | return false; |
| | | } |
| | | }, |
| | | /*{ |
| | | name: "填写检验记录", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openInspectionForm("edit", row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.inspectState == 1) return true; |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | | return false; |
| | | } |
| | | },*/ |
| | | { |
| | | name: "附件", |
| | | type: "text", |
| | |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | downLoadFile(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "报告", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | downloadReport(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
| | | }) |
| | | const downloadUrl = window.URL.createObjectURL(blob) |
| | | |
| | | |
| | | const link = document.createElement('a') |
| | | link.href = downloadUrl |
| | | link.download = '原材料检验报告.docx' |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | |
| | | |
| | | document.body.removeChild(link) |
| | | window.URL.revokeObjectURL(downloadUrl) |
| | | }) |
| | | }; |
| | | |
| | | const downloadReport = (row) => { |
| | | downloadOutReport({ id: row.id }).then((blobData) => { |
| | | const blob = new Blob([blobData], { |
| | | type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
| | | }) |
| | | const downloadUrl = window.URL.createObjectURL(blob) |
| | | |
| | | const link = document.createElement('a') |
| | | link.href = downloadUrl |
| | | link.download = '出库检验报告.docx' |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | |
| | | document.body.removeChild(link) |
| | | window.URL.revokeObjectURL(downloadUrl) |
| | | }) |