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; }