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/service/serviceFollowup/AddServiceFollowupDialog.vue | 86 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 76 insertions(+), 10 deletions(-) diff --git a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue index caebbba..4b37119 100644 --- a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue +++ b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue @@ -24,6 +24,35 @@ <div class="basic-info-view"> <el-row> <el-col :span="12"> + <el-form-item label="鍥炶鍗曠紪鍙�" prop="number"> + <el-input + v-if=" + editConfig.title == '缂栬緫' || + (editConfig.title == '鏂板缓' && codenumer && (explain != '' || isIdDisabled)) + " + :disabled="editConfig.title == '缂栬緫'" + v-model="editConfig.infomation.number" + placeholder="璇疯緭鍏ョ紪鐮�" + > + </el-input> + <span v-else-if="editConfig.title == '鏂板缓'" style="color: #f56c6c" + >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span + > + <!-- <WordInput + v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" + :codenumer="codenumer" + :sum="sum" + :disabled="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 + > + <span v-else>{{ editConfig.title === "鏂板缓" ? "鑷姩鐢熸垚" : editConfig.infomation.number }}</span> --> + </el-form-item> + </el-col> + <el-col :span="12"> <el-form-item label="瀹㈡埛鍚嶇О" prop="client_name"> <div class="custom-name"> <el-autocomplete @@ -48,11 +77,6 @@ <i class="el-icon-remove-outline" title="娓呴櫎"></i> </div> </div> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="鍥炶鍗曠紪鍙�" prop="number"> - <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> </el-form-item> </el-col> <el-col :span="12"> @@ -281,8 +305,10 @@ import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" +import codeMixin from "@/components/makepager/mixin/codeMixin" export default { name: "AddServiceFollowupDialog", + mixins: [codeMixin], props: { editCommonConfig: { type: Object, @@ -312,8 +338,10 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, rules: { - number: [{ required: true, message: "璇疯緭鍏ュ洖璁垮崟鍗曠紪鍙�", trigger: "blur" }], - memberId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }] + number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], + client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }], + service_number: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鏈嶅姟鍗�", trigger: "change" }], + memberId: [{ required: true, validator: this.validateMemberId, trigger: "change" }] }, satisfactionOptions: [], // 婊℃剰搴� timelyRateOptions: [], // 鍙婃椂鐜� @@ -346,17 +374,47 @@ this.$store.dispatch("geContact") this.$store.dispatch("geServiceOrder") this.getCommonData() + this.formInfo() + }, + watch: { + "editCommonConfig.visible"(val) { + if (val) { + this.formInfo() + } + } }, methods: { + formInfo() { + this.objCode.type = "鏈嶅姟鍥炶缂栫爜" + this.objCode.codeStandID = "" + if (this.editConfig.infomation.codeStandID) { + this.objCode.codeStandID = this.editConfig.infomation.codeStandID + } + this.getRCodeStandardList() + }, getCommonData() { getAllData() .then((res) => { this.memberOptions = res.data.member + // this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) + 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, "memberId", item.id) + } + }) + } this.satisfactionOptions = res.data.satisfaction // 婊℃剰搴� + this.$set(this.editConfig.infomation, "satisfactionId", this.editConfig.infomation.satisfactionId) this.timelyRateOptions = res.data.timely_rate // 鍙婃椂鐜� + this.$set(this.editConfig.infomation, "timelyRateId", this.editConfig.infomation.timelyRateId) this.solveRateOptions = res.data.solve_rate // 瑙e喅鐜� + this.$set(this.editConfig.infomation, "solveRateId", this.editConfig.infomation.solveRateId) this.oldMemberOptions = res.data.member // 鍘熸湇鍔′汉鍛� + this.$set(this.editConfig.infomation, "oldMemberId", this.editConfig.infomation.oldMemberId) this.isVisitOptions = res.data.isVisit // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃 + this.$set(this.editConfig.infomation, "isVisitId", this.editConfig.infomation.isVisitId) }) .catch((err) => { console.log(err) @@ -368,7 +426,6 @@ if (valid) { console.log(this.editConfig.infomation) const params = this.saveParams() - console.log(params) if (this.editConfig.title === "鏂板缓") { getAddServiceFollowup(params).then((res) => { console.log(res) @@ -410,7 +467,8 @@ satisfaction: data.satisfactionId || 0, serviceOrderId: this.serviceOrderId || 0, solveRate: data.solveRateId || 0, - timelyRate: data.timelyRateId || 0 + timelyRate: data.timelyRateId || 0, + codeStandID: data.ID } return params }, @@ -490,7 +548,15 @@ // 娣诲姞闄勪欢 addAnnexClick() {}, // 璁剧疆鍏佽涓婁紶鏂囦欢鏍煎紡 - setFormatClick() {} + setFormatClick() {}, + // 鍥炶浜鸿嚜瀹氫箟鏍¢獙瑙勫垯 + validateMemberId(rule, value, callback) { + if (this.editConfig.infomation?.memberId > 0) { + callback() + } else { + callback(new Error("璇烽�夋嫨鍥炶浜�")) + } + } } } </script> -- Gitblit v1.8.0