| | |
| | | > |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | | <el-button size="small" @click="delClick">删除</el-button> |
| | | <!-- <el-button size="small" @click="delClick">删除</el-button> --> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :table-list="tableList" |
| | | :select-box="!isDetail" |
| | | @selContactsClick="selContactsClick" |
| | | @selClientClick="selClientClick" |
| | | @getSelectArray="getSelectArray" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="60" fixed="right"> |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | { label: "负责人", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "跟进记录", prop: "record", min: 130 } // 跟进记录 |
| | | ], |
| | | showCol:['主题','客户名称','联系人姓名','联系人姓名','客户状态','联系方式','联系日期','下次回访日期','负责人','跟进记录'] |
| | | showCol: [ |
| | | "主题", |
| | | "客户名称", |
| | | "联系人姓名", |
| | | "联系人姓名", |
| | | "客户状态", |
| | | "联系方式", |
| | | "联系日期", |
| | | "下次回访日期", |
| | | "负责人", |
| | | "跟进记录" |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | 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 |
| | |
| | | } |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText){ |
| | | this.search_map.name = searchText ?? '' |
| | | this.search_map.name = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | this.editConfig.infomation = { ...row, sale_chance_name: "", sales_leads_name: "" } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | delClick(id) { |
| | | // if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: this.selValueList }).then((response) => { |
| | | getDeleteFollowRecord({ ids: [id] }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | // } else { |
| | | // this.$message.warning("请至少选择一条记录") |
| | | // } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |