zouyu
2023-12-21 a48ded866d223f581944ea9043df1b296b3425e3
src/views/quality/finishedProductInspection/index.vue
@@ -35,9 +35,9 @@
   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,
@@ -187,19 +187,8 @@
                            }
                        },
                    ],
                    toolbar: [
                        {
                            text: '下载检验报告',
                            type: 'primary',
                            fun: this.downloadProReport
                        }
                    ],
                    operator: [{
                        text: '作废',
                        type: 'text',
                        size: 'small',
                        fun: this.deleteHandle
                    }],
                toolbar: [],
                operator: null,
                    operatorConfig: {
                    fixed: 'right',
                    label: '操作',
@@ -209,7 +198,26 @@
                },
         }
      },
      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){
@@ -219,7 +227,6 @@
    },
      methods: {
            downloadProReport(){
                this.$message.info("开发中...")
            },
            //打印按钮
            printFun() {
@@ -272,6 +279,10 @@
         },
         // 新增 / 修改
         addOrUpdateHandle(row) {
            if(!this.permissions.quality_finishedProductInspection_edit && row.id!=null){
                this.$message.error("该角色没有操作权限")
                return
            }
            this.$router.push({
               name: 'finishedProductForm',
               query: { 
@@ -299,7 +310,6 @@
            this.$refs.finishedProduct.getDataList()
         },
      }
   }
</script>