From acdff03246ce648082192dfb069c3a006a7fbee6 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 09 八月 2023 18:46:06 +0800 Subject: [PATCH] 客户管理模块 批量删除、推进、跟进接口联调 --- src/views/service/serviceFollowup/AddServiceFollowupDialog.vue | 154 ++++++++++++++++++++++++++++++++++---------------- 1 files changed, 104 insertions(+), 50 deletions(-) diff --git a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue index 352ffbf..3564b13 100644 --- a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue +++ b/src/views/service/serviceFollowup/AddServiceFollowupDialog.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" @@ -22,11 +24,20 @@ <div class="basic-info-view"> <el-row> <el-col :span="12"> - <el-form-item label="瀹㈡埛鍚嶇О" prop="clientId"> + <el-form-item label="瀹㈡埛鍚嶇О" prop="client_name"> <div class="custom-name"> - <el-input v-model="editConfig.infomation.clientId"></el-input> - <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="閫夋嫨"></i></div> - <div class="common-select-btn"><i class="el-icon-edit" title="缂栬緫"></i></div> + <el-autocomplete + v-model="editConfig.infomation.client_name" + :fetch-suggestions="querySearchAsync" + value-key="name" + @select="handleSelectClient" + ></el-autocomplete> + <div class="common-select-btn" @click="selClientClick"> + <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + </div> + <div class="common-select-btn" @click="clearupClient"> + <i class="el-icon-edit-outline" title="娓呴櫎"></i> + </div> </div> </el-form-item> </el-col> @@ -189,11 +200,16 @@ </div> </div> </el-form> - <div slot="footer" class="dialog-footer"> <el-button type="primary" size="small" @click="saveClick('form')">淇濆瓨</el-button> <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button> </div> + <!-- 閫夋嫨瀹㈡埛 --> + <SelectClientDialog + v-if="editSelectClientConfig.editVisible" + :edit-common-config="editSelectClientConfig" + @selClient="selClient" + /> </el-dialog> </div> </template> @@ -201,6 +217,7 @@ <script> import { getAllData } from "@/api/client/client" import { getAddServiceFollowup, getUpdateServiceFollowup } from "@/api/serviceManage/serviceFollowup" +import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" export default { name: "AddServiceFollowupDialog", props: { @@ -215,10 +232,13 @@ } } }, - components: {}, + components: { SelectClientDialog }, computed: { searchCommonHeight() { return this.$refs.searchCommonView.offsetHeight + }, + clientList() { + return this.$store.state.getClientName.clientList } }, data() { @@ -234,10 +254,16 @@ solveRateOptions: [], // 瑙e喅鐜� oldMemberOptions: [], // 鍘熸湇鍔′汉鍛� isVisitOptions: [], // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃 - memberOptions: [] + memberOptions: [], + editSelectClientConfig: { + editVisible: false, + title: "", + infomation: {} + } } }, created() { + this.$store.dispatch("geClient") this.getCommonData() }, methods: { @@ -245,6 +271,11 @@ getAllData() .then((res) => { this.memberOptions = res.data.member + this.satisfactionOptions = res.data.satisfaction // 婊℃剰搴� + this.timelyRateOptions = res.data.timely_rate // 鍙婃椂鐜� + this.solveRateOptions = res.data.solve_rate // 瑙e喅鐜� + this.oldMemberOptions = res.data.member // 鍘熸湇鍔′汉鍛� + this.isVisitOptions = res.data.isVisit // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃 }) .catch((err) => { console.log(err) @@ -319,6 +350,33 @@ handleClose() { this.editConfig.visible = false }, + // 閫夋嫨瀹㈡埛鐩稿叧鏂规硶 + querySearchAsync(queryString, cb) { + var restaurants = this.clientList + var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants + cb(results) + }, + createStateFilter(queryString) { + return (state) => { + return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + } + }, + handleSelectClient(item) { + this.editConfig.infomation.client_id = item.id + }, + selClientClick() { + this.editSelectClientConfig.editVisible = true + }, + selClient(row) { + console.log(row) + this.editConfig.infomation.client_name = row.name + this.editConfig.infomation.client_id = row.id + }, + // 娓呴櫎宸查�夋嫨鐢ㄦ埛 + clearupClient() { + this.editConfig.infomation.client_name = "" + this.editConfig.infomation.client_id = 0 + }, // 娣诲姞闄勪欢 addAnnexClick() {}, // 璁剧疆鍏佽涓婁紶鏂囦欢鏍煎紡 @@ -329,58 +387,54 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> -.service-followup { - .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 { - display: flex; - .common-select-btn { - margin-left: 5px; - font-size: 18px; +::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-sel { + width: 270px; + } + .common-select-btn { + margin-left: 5px; + font-size: 16px; + cursor: pointer; + } } } - .common-select { + .annex-view { display: flex; - .common-select-sel { - width: 270px; - } - .common-select-btn { - margin-left: 5px; - font-size: 16px; - cursor: pointer; + 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