| | |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | @selCommonClick="selCommonClick" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column align="center" label="状态" width="120"> |
| | |
| | | }, |
| | | search: {}, |
| | | qualityStatusList:getDataByType('qualityStatus'), |
| | | tableColumn: [ |
| | | { label: "质检单编号", prop: "number", min: 190, isCommonClick: true }, |
| | | { label: "采购单编号", prop: "name", min: 130, isCommonClick: true}, |
| | | { label: "单据类型", prop: "contact_name", min: 130 }, |
| | | { label: "供应商名称", prop: "contact_phone", min: 130 }, |
| | | { label: "到货仓库", prop: "sales_resources", min: 130 }, |
| | | { label: "质检数量", prop: "province", min: 130 }, |
| | | { label: "检验员", prop: "city", min: 130 }, |
| | | // { label: "状态", prop: "member_name", min: 110 }, |
| | | { label: "质检时间", prop: "member_name", min: 150 }, |
| | | ], |
| | | showCol: ['质检单编号', '采购单编号', '单据类型', '供应商名称', '到货仓库', '质检数量', '检验员', '质检时间'] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | return "--"; |
| | | } |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | selectIndex: true, |
| | | tableColumn: [ |
| | | { label: "质检单编号", prop: "number", min: 190, isCommonClick: true }, |
| | | { label: "采购单编号", prop: "name", min: 130, isCommonClick: true}, |
| | | { label: "单据类型", prop: "contact_name", min: 130 }, |
| | | { label: "供应商名称", prop: "contact_phone", min: 130 }, |
| | | { label: "到货仓库", prop: "sales_resources", min: 130 }, |
| | | { label: "质检数量", prop: "province", min: 130 }, |
| | | { label: "检验员", prop: "city", min: 130 }, |
| | | // { label: "状态", prop: "member_name", min: 110 }, |
| | | { label: "质检时间", prop: "member_name", min: 150 }, |
| | | ] |
| | | showcol: this.showCol, |
| | | allcol: [], |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |