| | |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :operates-list="operatesList" :allocation="false" @batchDelete="delClick" /> |
| | |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | search_map: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData() |
| | | if (!this.isDetail) { |
| | | this.search_map = {} |
| | | } else { |
| | | this.search_map = { |
| | | [this.addConfig.id_name]: this.addConfig.client_name |
| | | } |
| | | } |
| | | this.getData(this.search_map) |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | |
| | | { label: "联系人编号", prop: "number", min: 100 }, // 联系人编号 |
| | | { label: "职务", prop: "position", min: 120 }, // 职务 |
| | | { label: "手机", prop: "phone", min: 100 }, // 手机号码 |
| | | { label: "销售负责人", prop: "member_id", min: 120 }, // 销售负责人 |
| | | { label: "首要联系人", prop: "is_first", min: 90 } // 首要联系人 |
| | | { label: "销售负责人", prop: "member_name", min: 120 }, // 销售负责人 |
| | | { label: "首要联系人", prop: "is_first", isFirst: true, min: 90 } // 首要联系人 |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getContactList({ |
| | | keyword: "", |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | return { |
| | | ...item, |
| | | client_name: item.Client.name, |
| | | is_first: item.is_first ? "是" : "否" |
| | | client_id: item.Client.id, |
| | | member_name: item.member.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = {} |
| | | console.log(this.addIdConfig) |
| | | this.editConfig.infomation = { ...this.addConfig } |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | | // this.$confirm("是否确认删除?", "警告", { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning" |
| | | // }) |
| | | // .then(function () { |
| | | // return getDeleteContact({ id: id }) |
| | | // }) |
| | | // .then((response) => { |
| | | // if (response.code === 200) { |
| | | // this.$message.success("删除成功") |
| | | // this.getData() |
| | | // } else { |
| | | // this.$message.warning("删除失败") |
| | | // } |
| | | // }) |
| | | // .catch(function () {}) |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | |
| | | }, |
| | | // 客户名称详情 |
| | | selClientClick(row) { |
| | | console.log(row) |
| | | // console.log(row) |
| | | this.clientDeail.visible = true |
| | | this.clientDeail.infomation = { |
| | | ...row.Client, |
| | | client_name: row.Client.name, |
| | | client_level: row.Client.client_level.name, |
| | | client_status: row.Client.client_status.name |
| | | client_status: row.Client.client_status.name, |
| | | contact_name: row.name |
| | | } |
| | | }, |
| | | // 跟进 |