| | |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | > |
| | | // 解决匹配不到提示无匹配数据 |
| | | <template v-if="noData" slot-scope="{ item }"> |
| | | <div class="default" @click.stop="stopClick">{{ item.name }}</div> |
| | | </template> |
| | | </el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | } |
| | | // contactNamelist() { |
| | | // return this.$store.state.getClientName.contactNamelist |
| | | // }, |
| | | // saleChancelist() { |
| | | // return this.$store.state.getClientName.saleChancelist |
| | | // }, |
| | | // saleLeadlist() { |
| | | // return this.$store.state.getClientName.saleLeadlist |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | saleChanceId: this.editContactsConfig.infomation.sale_chance_id, |
| | | saleLeadId: this.editContactsConfig.infomation.sales_leads_id, |
| | | saleChancelist: [], |
| | | isChance: true |
| | | isChance: true, |
| | | noData: false // 是否匹配到数据了 |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | // this.$store.dispatch("geContact") |
| | | // this.$store.dispatch("geChance") |
| | | // this.$store.dispatch("geLead") |
| | | this.getCommonData() |
| | | this.getContactInfoList() |
| | | this.formInfo() |
| | | if (this.editContactsConfig.title === "新建" && this.editContactsConfig.infomation?.client_name?.length > 0) { |
| | | this.getContactList(this.editContactsConfig.infomation) |
| | | } |
| | | }, |
| | | watch: { |
| | | "editContactsConfig.visible"(val) { |
| | |
| | | } else { |
| | | restaurants = this.saleLeadlist |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | var results = queryString ? restaurants?.filter(this.createStateFilter(queryString)) : restaurants |
| | | console.log(results) |
| | | this.noData = false |
| | | if (results == undefined || results?.length <= 0) { |
| | | results = [{ name: "无匹配数据" }] |
| | | this.noData = true |
| | | } |
| | | cb(results) |
| | | }, |
| | | createStateFilter(queryString) { |
| | |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.clientId = this.clientId || 0 |
| | | this.editSelectContactConfig.editVisible = true |
| | | } else if (value === "chance") { |
| | | this.editSelectChanceConfig.editVisible = true |
| | |
| | | } else { |
| | | callback(new Error("请选择客户名称")) |
| | | } |
| | | } |
| | | }, |
| | | // 阻止可点击事件 |
| | | stopClick() {} |
| | | } |
| | | } |
| | | </script> |