From f97f278ebb00c6cc046f1110ffa524ff14f81ba2 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 10 十一月 2023 11:21:55 +0800 Subject: [PATCH] 新建跟进记录-联系人搜索失败提示 --- src/views/client/followupRecords/AddFollowupRecordsDialog.vue | 38 ++++++++++++++++++++++---------------- 1 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue index 2b93c08..1fbdcef 100644 --- a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue +++ b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue @@ -108,7 +108,12 @@ value-key="name" @select="handleSelectClient('contact', $event)" style="width: 100%" - ></el-autocomplete> + > + // 瑙e喅鍖归厤涓嶅埌鎻愮ず鏃犲尮閰嶆暟鎹� + <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> @@ -392,15 +397,6 @@ 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 { @@ -462,17 +458,18 @@ 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) { @@ -604,7 +601,13 @@ } 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) { @@ -668,6 +671,7 @@ 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 @@ -743,7 +747,9 @@ } else { callback(new Error("璇烽�夋嫨瀹㈡埛鍚嶇О")) } - } + }, + // 闃绘鍙偣鍑讳簨浠� + stopClick() {} } } </script> -- Gitblit v1.8.0