zouyu
2024-02-29 363678a54142e62fdd4ca39a0db5c54af1a704dc
src/views/quality/packageinspect/index.vue
@@ -17,7 +17,7 @@
  <template>
    <div class="mod-config">
        <basic-container>
            <ttable
            <ttable
            :table="table"
            :resultData="resultData"
            @handleSelectionChange="handleSelectionChange"
@@ -74,7 +74,7 @@
                // 标题
                column: [
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'packInsNo',
                        label: '包装检验编号',
                        isTrue: true,
@@ -83,7 +83,7 @@
                        render: { fun: this.addOrUpdateHandle }
                    },
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'packageNo',
                        label: '包装编码',
                        isTrue: true,
@@ -91,7 +91,7 @@
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'contractNo',
                        label: '合同号',
                        isTrue: true,
@@ -99,7 +99,7 @@
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'projectName',
                        label: '项目名称',
                        isTrue: true,
@@ -107,7 +107,7 @@
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'customerName',
                        label: '客户名称',
                        isTrue: true,
@@ -115,17 +115,17 @@
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'createTime',
                        label: '报检日期',
                        isTrue: true,
                        sort: true,
                        isSearch: true,
                        searchInfoType: 'text',
                        searchInfoType: 'date',
                        formatter: this.formatDateTime,
                    },
                    {
                        minWidth: '150',
                        minWidth: '180',
                        prop: 'createUser',
                        label: '报检人',
                        isTrue: true,
@@ -133,32 +133,21 @@
                        searchInfoType: 'text'
                    },
                    {
                        minWidth: '150',
                        minWidth: '200',
                        prop: 'result',
                        label: '结论',
                        isTrue: true,
                        isSearch: true,
                        searchInfoType: 'text'
                    },
                ],
                toolbar: [
                    // {
                    //     text: '新增',
                    //     type: 'primary',
                    //     fun: this.addOrUpdateHandle
                    // },
                ],
                operator: [
                {
                    text: '作废',
                    type: 'text',
                    size: 'small',
                    fun: this.deleteHandle
                }],
                toolbar: [],
                operator: null,
                operatorConfig: {
                fixed: 'right',
                label: '操作',
                width: 120,
                minWidth: 120
                width: 100,
                minWidth: 100
                },
            },
        }
@@ -166,7 +155,16 @@
    components: {
        ttable,
    },
    created() { },
    created() {
        if(this.permissions.quality_packageinspect_del){
            this.table.operator = [{
                    text: '作废',
                    type: 'text',
                    size: 'small',
                    fun: this.deleteHandle
                }]
        }
     },
    computed: {
        ...mapGetters(['permissions'])
    },
@@ -198,11 +196,16 @@
        },
        // 新增 / 修改
        addOrUpdateHandle(row) {
            if(!this.permissions.quality_packageinspect_edit && row.id!=null){
                this.$message.error("该角色没有操作权限")
                return
            }
            this.$router.push({
                name: 'packageInspectForm',
                query: {
                    id: row == null ? null : row.id,
                 }
                query: {
                    id: row == null ? null : row.id
                 },
                 params:{resultVal : row.result=='' ? null : row.result}
            })
        },
        formatResult(row, column, cellValue){
@@ -226,4 +229,3 @@
    }
  }
  </script>