| | |
| | | } |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '下载检验报告', |
| | | type: 'primary', |
| | | fun: this.downloadReport |
| | | } |
| | | ], |
| | | operator: [ |
| | | // { |
| | | // text: '打印', |
| | | // type: 'text', |
| | | // size: 'small', |
| | | // fun: this.previewFun, |
| | | // show: { |
| | | // val: [ |
| | | // '1', |
| | | // '0' |
| | | // ], |
| | | // key: 'judgeState' |
| | | // } |
| | | // }, |
| | | { |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }], |
| | | toolbar: [], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | RawMaterialForm, |
| | | printTemplate, |
| | | }, |
| | | created() { }, |
| | | created() { |
| | | if(this.permissions.quality_rawMaterial_add){ |
| | | this.table.toolbar.push({ |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }) |
| | | } |
| | | if(this.permissions.quality_rawMaterial_download){ |
| | | this.table.toolbar.push({ |
| | | text: '下载检验报告', |
| | | type: 'primary', |
| | | fun: this.downloadReport |
| | | }) |
| | | } |
| | | if(this.permissions.quality_rawMaterial_del){ |
| | | this.table.operator = [{ |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | if(!this.permissions.quality_rawMaterial_edit && row.id!=null){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | this.$router.push({ |
| | | name: 'rawMaterialForm', |
| | | query: { |