From ac8749d1f785ee58cec73c27254562c940363205 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期一, 16 十月 2023 16:52:54 +0800
Subject: [PATCH] feat: 销售总单添加必填校验
---
src/views/sales/quotation/AddQuotationDialog.vue | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue
index 428fa9b..bb91971 100644
--- a/src/views/sales/quotation/AddQuotationDialog.vue
+++ b/src/views/sales/quotation/AddQuotationDialog.vue
@@ -356,8 +356,9 @@
editConfig: this.editCommonConfig,
rules: {
number: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+ quotationName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
quotation_status_id: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- sale_chance_name: [{ required: true, message: "璇烽�夋嫨閿�鍞満浼�", trigger: "blur" }],
+ sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "blur" }],
member_id: [{ required: true, message: "璇烽�夋嫨璐熻矗浜�", trigger: "change" }]
},
memberOptions: [],
@@ -495,7 +496,7 @@
let data = this.editConfig.infomation
let params = {
id: this.editConfig.title === "鏂板缓" ? 0 : data.id,
- quotationName: this.quotationName || "",
+ quotationName: data.quotationName || "",
conditions: data.conditions || "",
file: data.file || "",
member_id: data.member_id || 0,
@@ -659,6 +660,14 @@
clearupProduct(data) {
this.tableData = data
this.productTableList.tableData = this.tableData
+ },
+ // 璁㈠崟缂栫爜鍗曠嫭鏍¢獙
+ checkChance(rule, value, callback) {
+ if (this.editConfig.infomation.sale_chance_name && this.editConfig.infomation.sale_chance_name.length > 0) {
+ callback()
+ } else {
+ callback(new Error("璇烽�夋嫨閿�鍞満浼�"))
+ }
}
}
}
--
Gitblit v1.8.0