| | |
| | | ref="tableListRef" |
| | | :showSummary="showSummary" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | <div class="table-bottom"> |
| | |
| | | mergeNumber: 5, |
| | | totalName:'小计' |
| | | }, |
| | | showCol: ['产品名称', '产品编码', '计量单位', '规格型号', '数量', '销售单价','价税合计','描述'], |
| | | purchaseStatusList:getDataByType('purchaseStatus'), |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "name", min: 160, }, |
| | | { label: "产品编码", prop: "number", min: 130, }, |
| | | { label: "计量单位", prop: "unit", min: 130 }, |
| | | { label: "规格型号", prop: "specifications", min: 130 }, |
| | | { label: "数量", prop: "amount", min: 130 }, |
| | | { label: "销售单价", prop: "price", min: 130 }, |
| | | { label: "价税合计", prop: "total", min: 130 }, |
| | | { label: "描述", prop: "remark", min: 130 }, |
| | | ], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.tableList = { |
| | | tableInfomation: item.productList?item.productList:[], |
| | | selectIndex: true, |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "name", min: 160, }, |
| | | { label: "产品编码", prop: "number", min: 130, }, |
| | | { label: "计量单位", prop: "unit", min: 130 }, |
| | | { label: "规格型号", prop: "specifications", min: 130 }, |
| | | { label: "数量", prop: "amount", min: 130 }, |
| | | { label: "销售单价", prop: "price", min: 130 }, |
| | | { label: "价税合计", prop: "total", min: 130 }, |
| | | { label: "描述", prop: "remark", min: 130 }, |
| | | ], |
| | | 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); |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.detailConfig.visible = false; |