86134
2023-11-11 4652431ce329b4dec6c4dcc0758d5c4ff97e0666
src/views/quality/finishedProductInspection/index.vue
@@ -16,7 +16,7 @@
            top="10vh"
            title="打印预览"
            :visible.sync="printDialogVisible"
            width="65%">
            width="70%">
            <div style="width:100%;height: 60vh;overflow-y: scroll;">
                <printTemplate id="printRaw" :formData="printFormData"></printTemplate>
            </div>
@@ -35,7 +35,7 @@
   import finishedProductInspectionAdd from './finishedProduct-form'
    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: {
@@ -178,7 +178,14 @@
                        text: '打印',
                        type: 'text',
                        size: 'small',
                        fun: this.showPrint
                        fun: this.showPrint,
                        show: {
                            val: [
                                '1',
                                '0'
                            ],
                            key: 'result'
                        }
                    },{
                        text: '作废',
                        type: 'text',
@@ -195,7 +202,15 @@
         }
      },
      created() { },
        watch:{
        printFormData(newVal){
            if(newVal){
                this.printFormData = newVal
            }
        }
    },
      methods: {
            //打印按钮
            printFun() {
            this.printDialogVisible = false;
@@ -209,16 +224,17 @@
                    orientation: 'portrait'
                });
            },
            //查看报告按钮
            showPrint(row){
                console.log('----------');
                queryById(row.id).then(res=>{
                    console.log(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);