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/sales/quotation/AddQuotationDialog.vue | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue index d2647fb..849b37d 100644 --- a/src/views/sales/quotation/AddQuotationDialog.vue +++ b/src/views/sales/quotation/AddQuotationDialog.vue @@ -372,7 +372,7 @@ quotationName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }], quotation_status_id: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "change" }], - member_id: [{ required: true, message: "璇烽�夋嫨璐熻矗浜�", trigger: "change" }] + member_id: [{ required: true, validator: this.validateMemberId, trigger: "change" }] }, memberOptions: [], quotationStatusOptions: [], // 鎶ヤ环鍗曠姸鎬� @@ -436,6 +436,14 @@ getAllData() .then((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.quotationStatusOptions = res.data.quotationStatus this.dataProcess() }) @@ -682,6 +690,14 @@ } else { callback(new Error("璇烽�夋嫨閿�鍞満浼�")) } + }, + // 閿�鍞礋璐d汉鑷畾涔夋牎楠岃鍒� + validateMemberId(rule, value, callback) { + if (this.editConfig.infomation?.member_id > 0) { + callback() + } else { + callback(new Error("璇烽�夋嫨閿�鍞礋璐d汉")) + } } } } -- Gitblit v1.8.0