| | |
| | | <div class="content-main"> |
| | | <div class="rawPage"> |
| | | <basic-container> |
| | | <ttable |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :prelang="prelang" |
| | |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import processInspectForm from './processInspect-form' |
| | | import { transform } from '@/util/fileTransform' |
| | | import { mapGetters } from 'vuex' |
| | | import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect' |
| | | export default { |
| | | components: { |
| | | processInspectForm, |
| | | ttable |
| | | ttable, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | column: [ |
| | | { |
| | | minWidth: '120', |
| | | prop: 'orderNumber', |
| | | label: '订单编号', |
| | | prop: 'proInsNo', |
| | | label: '过程检验编号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | render: { fun: this.addOrUpdateHandle } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'orderNumber', |
| | | label: '订单编号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'materialCode', |
| | | label: '产品编号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | |
| | | }, |
| | | { |
| | | minWidth: '130', |
| | | width: '150', |
| | | prop: 'specs', |
| | | label: '规格型号', |
| | | sort: true, |
| | |
| | | } |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '导出', |
| | | fun: this.exportExcel |
| | | } |
| | | ], |
| | | operator: [{ |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }], |
| | | toolbar: [], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | }, |
| | | } |
| | | }, |
| | | created() { }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | created() { |
| | | if(this.permissions.quality_processInspect_add){ |
| | | this.table.toolbar.push({ |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }) |
| | | } |
| | | if(this.permissions.quality_processInspect_del){ |
| | | this.table.operator = [{ |
| | | text: '作废', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | }, |
| | | methods: { |
| | | exportExcel(){ |
| | | let queryParam=this.$refs.processInspect.getQueryParam(); |
| | | delete queryParam.criteria |
| | | console.log(queryParam); |
| | | exportProcessInsProduct(queryParam).then((res)=>{ |
| | | transform(res) |
| | | }) |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | if(!this.permissions.quality_processInspect_edit && row){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | let isAdd = true |
| | | if(!row) { |
| | | isAdd = false |
| | | } |
| | | this.$router.push({ |
| | | name: 'processInspectForm', |
| | | query: { id: row == null ? null : row.id,resultVal : row == null ? null : row.result }, |
| | | }) |
| | | query: { id: row == null ? null : row.id }, |
| | | params: { resultVal : row == null ? null : row.result }, |
| | | isAdd: isAdd |
| | | }) |
| | | }, |
| | | formatResult(row, column, cellValue){ |
| | | if(cellValue != undefined || cellValue != null){ |
| | |
| | | .rawPage .content-body { |
| | | flex: 1; |
| | | } |
| | | </style> |
| | | </style> |