| | |
| | | import finishedProductInspectionAdd from './finishedProduct-form' |
| | | import { page,deletePro,exportExaminationProducts,queryById } from '@/api/quality/finishedProduct' |
| | | import { transform } from '@/util/fileTransform' |
| | | import { mapGetters } from 'vuex' |
| | | import printTemplate from './finishedProducter-print.vue' |
| | | import PrintJS from 'print-js' |
| | | import { title } from 'process' |
| | | export default { |
| | | components: { |
| | | finishedProductInspectionAdd, |
| | |
| | | } |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '下载检验报告', |
| | | type: 'primary', |
| | | fun: this.downloadProReport |
| | | } |
| | | ], |
| | | operator: [{ |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }], |
| | | toolbar: [], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | }, |
| | | } |
| | | }, |
| | | created() { }, |
| | | created() { |
| | | if(this.permissions.quality_finishedProductInspection_download){ |
| | | this.table.toolbar.push({ |
| | | text: '下载检验报告', |
| | | type: 'primary', |
| | | fun: this.downloadProReport |
| | | }) |
| | | } |
| | | if(this.permissions.quality_finishedProductInspection_del){ |
| | | this.table.operator = [{ |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | watch:{ |
| | | printFormData(newVal){ |
| | | if(newVal){ |
| | |
| | | }, |
| | | methods: { |
| | | downloadProReport(){ |
| | | this.$message.info("开发中...") |
| | | }, |
| | | //打印按钮 |
| | | printFun() { |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | if(!this.permissions.quality_finishedProductInspection_edit && row.id!=null){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | this.$router.push({ |
| | | name: 'finishedProductForm', |
| | | query: { |
| | |
| | | this.$refs.finishedProduct.getDataList() |
| | | }, |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |