| | |
| | | @selContactsClick="selContactsClick" |
| | | @selCommonClick="selCommonClick" |
| | | @getSelectArray="getSelectArray" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90"> |
| | |
| | | searchSel: { |
| | | value: "number", |
| | | label: "报价单号" |
| | | } |
| | | }, |
| | | tableColumn: [ |
| | | { label: "报价单号", prop: "number", min: 90, isCommonClick: true ,default:true}, // 报价单号 |
| | | { label: "客户名称", prop: "client_name", min: 120, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", min: 90, isContactClick: true }, // 联系人姓名 |
| | | { label: "销售负责人", prop: "member_name" }, // 销售负责人 |
| | | { label: "有效期", prop: "validity_date", min: 100 }, // 修改时间 |
| | | // { label: "小计", prop: "subTotal" }, // 小计 |
| | | // { label: "合计", prop: "total" }, // 合计 |
| | | { label: "产品名称", prop: "productName", isProductName: true }, |
| | | { label: "数量", prop: "productNumber", isProductAmount: true }, |
| | | { label: "价税合计", prop: "priceTax", isProductTotal: true } |
| | | ], |
| | | showCol:["报价单号", "客户名称", "联系人姓名", "销售负责人", "有效期", "产品名称", "数量", "价税合计"] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "报价单号", prop: "number", min: 90, isCommonClick: true }, // 报价单号 |
| | | { label: "客户名称", prop: "client_name", min: 120, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", min: 90, isContactClick: true }, // 联系人姓名 |
| | | { label: "销售负责人", prop: "member_name" }, // 销售负责人 |
| | | { label: "有效期", prop: "validity_date", min: 100 }, // 修改时间 |
| | | // { label: "小计", prop: "subTotal" }, // 小计 |
| | | // { label: "合计", prop: "total" }, // 合计 |
| | | { label: "产品名称", prop: "productName", isProductName: true }, |
| | | { label: "数量", prop: "productNumber", isProductAmount: true }, |
| | | { label: "价税合计", prop: "priceTax", isProductTotal: true } |
| | | ] |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |