From 109de768d891f08a0aba21f4b5291d4d31f1c118 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Mon, 11 Dec 2023 17:02:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=84=E7=BA=A6=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reservation/reservationAddFrom.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/distribution/reservation/reservationAddFrom.vue b/src/views/distribution/reservation/reservationAddFrom.vue index 5416c179..5bff8f26 100644 --- a/src/views/distribution/reservation/reservationAddFrom.vue +++ b/src/views/distribution/reservation/reservationAddFrom.vue @@ -2762,22 +2762,24 @@ export default { console.log('orderList-------------》', this.orderList); if (this.orderList.length === 0) return this.$message.warning('最少选择一条数据!!!'); const list = [...this.orderList, ...this.orderData]; - let _name = list[0].customerName; - let _address = list[0].customerAddress; - let _phone = list[0].customerTelephone; - let _marketName = list[0].mallName; + let _name = list[0].customerName.trim(); + let _address = list[0].customerAddress.trim(); + let _phone = list[0].customerTelephone.trim(); + let _marketName = list[0].mallName.trim(); // 循环查看数据是否符合要求 const isRturn = list.every(item => { - if (item.mallName !== _marketName) { + if (item.mallName.trim() !== _marketName) { this.$message.warning('请选择统一商场!!!'); return false; } + if ( - item.customerName !== _name || - item.customerAddress !== _address || - item.customerTelephone !== _phone + (item.customerName.trim() !== _name) || + (item.customerAddress.trim() !== _address) || + (item.customerTelephone.trim() !== _phone) ) { + console.log("123"); this.$message.warning('请选择统一顾客订单!!!'); return false; }