From 75e27a973b76fa78ff12b96b503487c3d7e33688 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 27 十二月 2023 16:06:13 +0800
Subject: [PATCH] Merge branch 'wn' of http://192.168.5.5:10010/r/web/crm-web into dev
---
src/views/client/followupRecords/AddFollowupRecordsDialog.vue | 55 +++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 39 insertions(+), 16 deletions(-)
diff --git a/src/views/client/followupRecords/AddFollowupRecordsDialog.vue b/src/views/client/followupRecords/AddFollowupRecordsDialog.vue
index 2b93c08..ecb4399 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 {
@@ -408,7 +404,7 @@
editConfig: this.editContactsConfig,
rules: {
number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }],
- member_id: [{ required: true, message: "璇烽�夋嫨璐熻矗浜�", trigger: "change" }],
+ member_id: [{ required: true, validator: this.validateMemberId, trigger: "change" }],
record: [{ required: true, message: "璇疯緭鍏ヨ窡杩涜褰�", trigger: "blur" }],
client_name: [{ required: true, validator: this.checkClient, trigger: "change" }],
contact_name: [{ required: true, message: "璇烽�夋嫨鑱旂郴浜哄鍚�", trigger: "change" }],
@@ -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) {
@@ -496,6 +493,15 @@
console.log(res)
this.clientStatusOptions = res.data.client_status
this.memberOptions = res.data.member
+ if (this.editConfig.title === "鏂板缓") {
+ let username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")
+ this.memberOptions.map((item) => {
+ if (item.username == username) {
+ this.$set(this.editConfig.infomation, "member_id", item.id)
+ }
+ })
+ }
+
// this.dataProcess()
})
},
@@ -604,7 +610,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 +680,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,6 +756,16 @@
} else {
callback(new Error("璇烽�夋嫨瀹㈡埛鍚嶇О"))
}
+ },
+ // 闃绘鍙偣鍑讳簨浠�
+ stopClick() {},
+ // 閿�鍞礋璐d汉鑷畾涔夋牎楠岃鍒�
+ validateMemberId(rule, value, callback) {
+ if (this.editConfig.infomation?.member_id > 0) {
+ callback()
+ } else {
+ callback(new Error("璇疯緭鍏ヨ礋璐d汉"))
+ }
}
}
}
--
Gitblit v1.8.0