From 78cf30802189becef2725af73f37b5d2cb28600f Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 11 八月 2023 10:57:48 +0800 Subject: [PATCH] 新建跟进记录入参修改 --- src/views/client/client/AddClientManageDialog.vue | 122 +++++++++++++++++++++++++--------------- 1 files changed, 75 insertions(+), 47 deletions(-) diff --git a/src/views/client/client/AddClientManageDialog.vue b/src/views/client/client/AddClientManageDialog.vue index d4055d0..7200b7d 100644 --- a/src/views/client/client/AddClientManageDialog.vue +++ b/src/views/client/client/AddClientManageDialog.vue @@ -5,6 +5,8 @@ :visible.sync="editConfig.visible" :width="dialogWidth" :before-close="handleClose" + append-to-body + custom-class="iframe-dialog" > <el-form ref="form" @@ -157,7 +159,12 @@ </el-col> <el-col :span="12"> <el-form-item label="鑱旂郴浜烘墜鏈�" prop="contact_phone"> - <el-input v-model="editConfig.infomation.contact_phone"></el-input> + <el-input + v-model="editConfig.infomation.contact_phone" + maxlength="11" + show-word-limit + oninput="value=value.replace(/[^\d]/g,'')" + ></el-input> </el-form-item> </el-col> <el-col :span="12"> @@ -470,7 +477,7 @@ <div slot="footer" class="dialog-footer"> <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">淇濆苟鎻愪氦瀹℃壒</el-button> --> <el-button type="primary" size="small" @click="saveClick('form')">淇濆瓨</el-button> - <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button> + <el-button size="small" @click="handleClose">鍙栨秷</el-button> </div> </el-dialog> </div> @@ -487,6 +494,7 @@ return { visible: false, title: "鏂板缓", + isSalesOpportunity: false, infomation: {} } } @@ -506,7 +514,16 @@ name: [{ required: true, message: "璇疯緭鍏ュ鎴峰悕绉�", trigger: "blur" }], client_status_id: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鐘舵��", trigger: "change" }], member_id: [{ required: true, message: "璇烽�夋嫨閿�鍞礋璐d汉", trigger: "change" }], - approvalOpinion: [{ required: true, message: "璇疯緭鍏ュ鎵规剰瑙�", trigger: "blur" }] + approvalOpinion: [{ required: true, message: "璇疯緭鍏ュ鎵规剰瑙�", trigger: "blur" }], + contact_phone: [ + { required: false, message: "", trigger: "blur" }, + { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: "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" + } + ] }, memberOptions: [], clientStatusOptions: [], // 瀹㈡埛鐘舵�� @@ -532,7 +549,6 @@ getCommonData() { getAllData() .then((res) => { - console.log(res) this.memberOptions = res.data.member this.clientSourceOptions = res.data.client_origin this.clientStatusOptions = res.data.client_status @@ -553,6 +569,9 @@ }, handleClose() { this.editConfig.visible = false + if (this.editConfig.title === "鏂板缓" && this.editConfig.infomation.sales_leads_id) { + this.$parent.handleClose() + } }, // 淇濆瓨 saveClick(formName) { @@ -571,7 +590,13 @@ message: "娣诲姞鎴愬姛", type: "success" }) - this.$parent.getData() + if (this.editConfig.isSalesOpportunity) { + this.$emit("salesOpportunityClick", this.editConfig.infomation) + } else if (this.editConfig.title === "鏂板缓" && this.editConfig.infomation.sales_leads_id) { + this.$parent.handleClose() + } else { + this.$parent.getData() + } } }) .catch((err) => { @@ -643,7 +668,8 @@ registration_time: data.registration_time || "", remark: data.remark || "", representative: data.representative || "", - service_member_id: data.service_member_id || 0 + service_member_id: data.service_member_id || 0, + sales_leads_id: data.sales_leads_id || 0 } return params }, @@ -663,54 +689,56 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> -.add-client-manage { - .basic-info { - .basic-info-title { - background-color: #f4f8fe; - padding-left: 10px; - font-size: 15px; - font-weight: bold; - color: #666; - height: 42px; - line-height: 42px; - } - .basic-info-view { - margin-top: 10px; - padding-right: 40px; - .custom-name, - .common-select { +::v-deep { + .iframe-dialog .el-dialog__body { + .basic-info { + .basic-info-title { + background-color: #f4f8fe; + padding-left: 10px; + font-size: 15px; + font-weight: bold; + color: #666; + height: 42px; + line-height: 42px; + } + .basic-info-view { + margin-top: 10px; + padding-right: 40px; + .custom-name, + .common-select { + display: flex; + .common-select-btn { + margin-left: 5px; + font-size: 18px; + cursor: pointer; + } + } + .common-select { + .common-select-sel { + width: 270px; + } + } + } + .annex-view { display: flex; - .common-select-btn { - margin-left: 5px; - font-size: 18px; - cursor: pointer; - } - } - .common-select { - .common-select-sel { - width: 270px; + color: #6166d3; + .setFormat { + margin-left: 10px; } } } - .annex-view { + .unflod-collapse { display: flex; + height: 30px; + justify-content: center; + align-items: center; color: #6166d3; - .setFormat { - margin-left: 10px; - } } - } - .unflod-collapse { - display: flex; - height: 30px; - justify-content: center; - align-items: center; - color: #6166d3; - } - .dialog-footer { - background-color: #f5f5f5; - height: 55px; - line-height: 55px; + .dialog-footer { + background-color: #f5f5f5; + height: 55px; + line-height: 55px; + } } } </style> -- Gitblit v1.8.0