| | |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import finishedProductInspectionAdd from './finishedProduct-form' |
| | | import { page,deletePro,exportExaminationProducts } from '@/api/quality/finishedProduct' |
| | | import { page,deletePro,exportExaminationProducts,queryById } from '@/api/quality/finishedProduct' |
| | | import { transform } from '@/util/fileTransform' |
| | | import printTemplate from './finishedProduct-print.vue' |
| | | import printTemplate from './finishedProducter-print.vue' |
| | | import PrintJS from 'print-js' |
| | | export default { |
| | | components: { |
| | |
| | | text: '打印', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.showPrint |
| | | fun: this.showPrint, |
| | | show: { |
| | | val: [ |
| | | '1', |
| | | '0' |
| | | ], |
| | | key: 'result' |
| | | } |
| | | },{ |
| | | text: '作废', |
| | | type: 'text', |
| | |
| | | } |
| | | }, |
| | | created() { }, |
| | | watch:{ |
| | | printFormData(newVal){ |
| | | if(newVal){ |
| | | this.printFormData = newVal |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | //打印按钮 |
| | | printFun() { |
| | | |
| | | //打印按钮 |
| | | printFun() { |
| | | this.printDialogVisible = false; |
| | | PrintJS({ |
| | | printable: "printRaw", |
| | |
| | | orientation: 'portrait' |
| | | }); |
| | | }, |
| | | showPrint(){ |
| | | this.printDialogVisible = true |
| | | //查看报告按钮 |
| | | showPrint(row){ |
| | | console.log('----------'); |
| | | queryById(row.id).then(res=>{ |
| | | this.printFormData = res.data.data |
| | | this.printDialogVisible = true |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }) |
| | | }, |
| | | exportExcel(){ |
| | | console.log("============"); |
| | | let queryParam=this.$refs.finishedProduct.getQueryParam(); |
| | | delete queryParam.criteria |
| | | console.log(queryParam); |