| | |
| | | @selClientClick="selClientClick" |
| | | @selContactsClick="selContactsClick" |
| | | @getSelectArray="getSelectArray" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="150"> |
| | |
| | | visible: false, |
| | | infomation: {} |
| | | }, |
| | | not_admin: 2 |
| | | not_admin: 2, |
| | | tableColumn:[ |
| | | { label: "客户名称", prop: "name", min: 100, isClientClick: true, default:true}, // 客户名称 |
| | | { label: "销售负责人", prop: "member_name" }, // 销售负责人 |
| | | { label: "重要级别", prop: "client_level" }, // 重要级别 |
| | | { label: "下次回访日期", prop: "next_visit_time", min: 90 }, // 下次回访日期 |
| | | { label: "详细地址", prop: "detail_address", min: 200 }, // 详细地址 |
| | | { label: "客户状态", prop: "client_status" }, // 客户状态 |
| | | { label: "联系人姓名", prop: "contact_name", isContactClick: true }, // 联系人姓名 |
| | | { label: "联系人手机号码", prop: "contact_phone" } // 手机号码 |
| | | ], |
| | | showCol:['客户名称','销售负责人','重要级别','下次回访日期','详细地址','客户状态','联系人姓名','联系人手机号码'] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "客户名称", prop: "name", min: 100, isClientClick: true }, // 客户名称 |
| | | { label: "销售负责人", prop: "member_name" }, // 销售负责人 |
| | | { label: "重要级别", prop: "client_level" }, // 重要级别 |
| | | { label: "下次回访日期", prop: "next_visit_time", min: 90 }, // 下次回访日期 |
| | | { label: "详细地址", prop: "detail_address", min: 200 }, // 详细地址 |
| | | { label: "客户状态", prop: "client_status" }, // 客户状态 |
| | | { label: "联系人姓名", prop: "contact_name", isContactClick: true }, // 联系人姓名 |
| | | { label: "联系人手机号码", prop: "contact_phone" } // 手机号码 |
| | | ] |
| | | 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 |
| | | const value = this.tableList.tableColumn[i].prop |
| | | 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() { |
| | |
| | | border-radius: 12px; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .supplier-search { |
| | | display: flex; |
| | | align-items: center; |
| | | .add-view { |
| | | margin-left: auto; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |