From 9e007f676d0e55c4bf0cc2a78bc7dc96be188d50 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期四, 14 十二月 2023 19:45:52 +0800 Subject: [PATCH] 隐藏生成计划和服务收费管理模块 --- src/views/client/contacts/AddContactsDialog.vue | 111 +++++++++++++++++++++++++++++++------------------------ 1 files changed, 63 insertions(+), 48 deletions(-) diff --git a/src/views/client/contacts/AddContactsDialog.vue b/src/views/client/contacts/AddContactsDialog.vue index f0ff288..4348ae2 100644 --- a/src/views/client/contacts/AddContactsDialog.vue +++ b/src/views/client/contacts/AddContactsDialog.vue @@ -14,7 +14,7 @@ :model="editConfig.infomation" :rules="rules" label-position="right" - label-width="120px" + label-width="110px" size="mini" > <!-- 淇℃伅 --> @@ -23,26 +23,22 @@ <div v-if="isUnflod" class="basic-info-title">鍩烘湰淇℃伅</div> <div class="basic-info-view"> <el-row> - <el-col :span="12" v-if="isUnflod"> + <!-- <el-col :span="12" v-if="isUnflod"> <el-form-item label="鑱旂郴浜虹紪鍙�" prop="number"> <WordInput - v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0" + v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" :codenumer="codenumer" :sum="sum" - :disabled="editConfig.infomation.id || isIdDisabled" + :disabled="this.editConfig.title !== '鏂板缓' || isIdDisabled" :inputValue="inputValue" @codeList="codeList" /> <span v-else-if="method == 0" style="color: #f56c6c" - >璇蜂紭鍏堥厤缃紪鐮佽鑼� - <el-button type="text" @click="numberClick"> - 閰嶇疆瑙勮寖 - </el-button - ></span + >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span > - <span v-else>鑷姩鐢熸垚</span> + <span v-else>鑷姩鐢熸垚</span> </el-form-item> - </el-col> + </el-col> --> <el-col :span="12"> <el-form-item label="鑱旂郴浜哄鍚�" prop="name"> <el-input v-model="editConfig.infomation.name"></el-input> @@ -88,13 +84,18 @@ </el-col> <el-col :span="12"> <el-form-item v-if="isUnflod" label="閿�鍞礋璐d汉" prop="member_id"> - <el-select v-model="editConfig.infomation.member_id" placeholder="璇烽�夋嫨" size="mini" style="width: 100%"> + <el-select + v-model="editConfig.infomation.member_id" + placeholder="璇烽�夋嫨" + size="mini" + style="width: 100%" + > <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> - <el-col :span="12"> + <el-col :span="12" style="height: 47px"> <el-form-item v-if="isUnflod" label="棣栬鑱旂郴浜�" prop="is_first"> <el-switch v-model="editConfig.infomation.is_first" active-color="#2E68DB" inactive-color="#AEB9CA"> </el-switch> @@ -271,7 +272,7 @@ import { getAllData } from "@/api/client/client" import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" import { getCityList } from "@/api/common/address" -import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"; +import codeMixin from "@/components/makepager/mixin/codeMixin" export default { name: "AddContactsDialog", mixins: [codeMixin], @@ -298,25 +299,25 @@ dialogWidth: "50%", editConfig: this.editContactsConfig, rules: { - name: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], - number: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], - client_name:[{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }], - member_id: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], + name: [{ required: true, message: "璇疯緭鍏ヨ仈绯讳汉濮撳悕", trigger: ["change", "blur"] }], + number: [{ required: true, message: "璇疯緭鍏�", trigger: ["change", "blur"] }], + client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: ["change", "blur"] }], + member_id: [{ required: true, validator: this.validateMemberId, trigger: ["change", "blur"] }], phone: [ - { required: false, message: "", trigger: "blur" }, - { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: "blur" }, + { required: false, message: "璇疯緭鍏ユ墜鏈哄彿", trigger: ["change", "blur"] }, + { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: ["change", "blur"] }, { pattern: /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/, message: "璇疯緭鍏ユ纭殑鎵嬫満鍙�", - trigger: "blur" + trigger: ["change", "blur"] } ], email: [ - { required: false, message: "", trigger: "blur" }, + { required: false, message: "", trigger: ["change", "blur"] }, { pattern: /^[a-zA-Z0-9_\\.]+@[a-zA-Z0-9-]+[\\.a-zA-Z]+$/, message: "璇疯緭鍏ユ纭殑閭鏍煎紡", - trigger: "blur" + trigger: ["change", "blur"] } ] }, @@ -351,27 +352,28 @@ this.getCityList(this.editConfig.infomation.province_id, "edit") } this.getCommonData() - this.formInfo(); + // this.formInfo() }, - watch:{ - 'editContactsConfig.visible'(val){ - if(val){ - this.formInfo() + watch: { + "editContactsConfig.visible"(val) { + if (val) { + // this.formInfo() + console.log("11111") } }, - 'editContactsConfig.infomation.codeStandID'(){ - this.formInfo() + "editContactsConfig.infomation.codeStandID"() { + // this.formInfo() } }, methods: { - formInfo(){ - this.objCode.type='鑱旂郴浜虹紪鐮�' - this.objCode.codeStandID = '' - if(this.editConfig.infomation.codeStandID){ - this.objCode.codeStandID = this.editConfig.infomation.codeStandID; + formInfo() { + this.objCode.type = "鑱旂郴浜虹紪鐮�" + this.objCode.codeStandID = "" + if (this.editConfig.infomation.codeStandID) { + this.objCode.codeStandID = this.editConfig.infomation.codeStandID } - this.getRCodeStandardList(); - }, + this.getRCodeStandardList() + }, getCommonData() { this.editConfig.infomation.country_id = 1 this.editConfig.infomation.province_id = @@ -379,8 +381,15 @@ this.editConfig.infomation.city_id = this.editConfig.infomation.city_id === 0 ? "" : this.editConfig.infomation.city_id getAllData().then((res) => { - console.log(res) 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.provinceOptions = res.data.province }) }, @@ -446,14 +455,13 @@ is_first: data.is_first || false, member_id: data.member_id || 0, name: data.name || "", - number: data.number || "", + // number: data.number || "", phone: data.phone || "", position: data.position || "", province_id: data.province_id || 0, region_id: data.region_id || 0, - wechat: data.wechat || "", - codeStandID:data.ID, - codeRule:this.codeRule, + wechat: data.wechat || "" + // codeStandID: data.ID, } return params }, @@ -477,16 +485,15 @@ }, selClient(row) { console.log(row) - this.editConfig.infomation.client_name = row.name this.clientId = row.id + this.$set(this.editConfig.infomation, "client_name", row.name) }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 clearupClient() { - console.log("sssssssss") - console.log(this.editConfig.infomation.client_name) + console.log(this.editConfig.infomation.client_name, "sssssssss") // if (this.editConfig.infomation.client_name !== "") { - this.editConfig.infomation.client_name = "" - this.clientId = 0 + this.clientId = null + this.$set(this.editConfig.infomation, "client_name", "") // } }, // 娣诲姞闄勪欢 @@ -517,6 +524,14 @@ } } }) + }, + // 閿�鍞礋璐d汉鑷畾涔夋牎楠岃鍒� + validateMemberId(rule, value, callback) { + if (this.editConfig.infomation?.member_id > 0) { + callback() + } else { + callback(new Error("璇疯緭鍏ラ攢鍞礋璐d汉")) + } } } } @@ -550,7 +565,7 @@ } .common-select { .common-select-sel { - width:100%; + width: 100%; } } } -- Gitblit v1.8.0