Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn
| | |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = { ...this.addConfig } |
| | | this.editConfig.infomation = { ...this.addConfig ,contact_name:"",sales_leads_name:"",sale_chance_name:""} |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 编辑 |
| | |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {}, |
| | | search_map: {} |
| | | clientId: 0, |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | |
| | | tableList: [], |
| | | searchSelOptions: [], |
| | | loading: false, |
| | | // search_map: {}, |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "联系人姓名", prop: "name", isContactClick: true, default: true }, // 联系人姓名 |
| | | { label: "联系人编号", prop: "number" }, // 联系人编号 |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.search_map = { |
| | | client_id: this.editConfig.clientId |
| | | } |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getContactList({ |
| | | search_map: this.editConfig.search_map, |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.editConfig.search_map = { |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.editConfig.search_map = {} |
| | | this.search_map = {} |
| | | this.getData() |
| | | } |
| | | } |
| | |
| | | this.editConfig.infomation = { |
| | | ...this.addConfig, |
| | | currency: "人民币", |
| | | sale_chance_name:"", |
| | | subbill_name:"", |
| | | client_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.client_name |
| | | } |
| | | }, |
| | |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | if (this.editConfig.title === '编辑'){ |
| | | if (this.editConfig.title === "编辑") { |
| | | this.isContact = false |
| | | this.getContactList(this.editConfig.infomation.contact_id) |
| | | } |
| | |
| | | status_id: data.status_id || 0, |
| | | threats: data.threats || "", |
| | | whether_established: data.whether_established || "", |
| | | |
| | | remark: data.remark || "", |
| | | detail_address: data.detail_address || "", |
| | | |
| | |
| | | // 获取联系人列表 |
| | | getContactList(id) { |
| | | getContactList({ |
| | | clientId: id, |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: {} |
| | | search_map: { |
| | | client_id: id |
| | | } |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.contactNamelist = res.data.list |
| | |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | this.editConfig.infomation.contact_name = '' |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | this.isContact = false |
| | | this.getContactList(item.id) |
| | |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | this.editSelectContactConfig.clientId = this.clientId |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.editConfig.infomation.contact_name = '' |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | this.isContact = false |
| | | this.getContactList(row.id) |