| | |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | <ttable |
| | | :table="table" |
| | | :resultData="resultData" |
| | | @handleSelectionChange="handleSelectionChange" |
| | |
| | | // 标题 |
| | | column: [ |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'packInsNo', |
| | | label: '包装检验编号', |
| | | isTrue: true, |
| | |
| | | render: { fun: this.addOrUpdateHandle } |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'packageNo', |
| | | label: '包装编码', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'contractNo', |
| | | label: '合同号', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'projectName', |
| | | label: '项目名称', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'customerName', |
| | | label: '客户名称', |
| | | isTrue: true, |
| | |
| | | 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, |
| | |
| | | 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 |
| | | }, |
| | | }, |
| | | } |
| | |
| | | components: { |
| | | ttable, |
| | | }, |
| | | created() { }, |
| | | created() { |
| | | if(this.permissions.quality_packageinspect_del){ |
| | | this.table.operator = [{ |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | 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){ |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |