|
|
|
@ -52,7 +52,7 @@ |
|
|
|
|
<view class="m-one-third-row"> |
|
|
|
|
<view class="m-ticket-count"> |
|
|
|
|
<view class="m-ticket-count-label">购票数量</view> |
|
|
|
|
<view class="m-ticket-count-value" v-if="ticket&&ticket.qmxId == null"> |
|
|
|
|
<view class="m-ticket-count-value" v-if="ticket && ticket.qmxId == null"> |
|
|
|
|
<uni-number-box v-if="maxNum == -1" :min="0" v-model="ticket.num" :disabled="!ticket.date" |
|
|
|
|
@change="changeCount($event, ticket)" /> |
|
|
|
|
<uni-number-box v-else :min="0" :max="maxNum" v-model="ticket.num" :disabled="!ticket.date" |
|
|
|
@ -75,8 +75,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="m-card m-card-two" v-if="ticket && ticket.touristInformation != 1 && ticket.date!=null"> |
|
|
|
|
<view class="m-card-title" v-if="ticket &&ticket.qmxId != null"> |
|
|
|
|
<view class="m-card m-card-two" v-if="ticket && ticket.touristInformation != 1 && ticket.date != null && ticket.num >0"> |
|
|
|
|
<view class="m-card-title" v-if="ticket && ticket.qmxId != null"> |
|
|
|
|
<view class="contact-user-box" |
|
|
|
|
v-if="ticket.qmxTicketInfoVO.needContactName != false || ticket.qmxTicketInfoVO.needContactPhone != false || ticket.qmxTicketInfoVO.needContactIdCard != false"> |
|
|
|
|
<view class="m-title">联系人信息</view> |
|
|
|
@ -333,12 +333,12 @@ |
|
|
|
|
</view> |
|
|
|
|
</uni-popup> |
|
|
|
|
<!-- 新增 --> |
|
|
|
|
<uni-popup ref="mAddPerson" type="bottom" border-radius="10px 10px 0 0" :safe-area="false"> |
|
|
|
|
<uni-popup ref="mAddPerson" type="bottom" border-radius="10px 10px 0 0" :safe-area="false" :mask-click="false"> |
|
|
|
|
<view class="m-purchase-notice m-pop-bg"> |
|
|
|
|
<view class="m-green-bg"></view> |
|
|
|
|
<view class="m-red-bg"></view> |
|
|
|
|
<view class="m-pop-title">{{ titleName }}游客</view> |
|
|
|
|
<view class="m-form-box" v-if="ticket&& ticket.qmxId == null"> |
|
|
|
|
<view class="m-form-box" v-if="ticket && ticket.qmxId == null"> |
|
|
|
|
<uni-forms class="m-form" ref="peopleForm" :modelValue="baseFormData"> |
|
|
|
|
<uni-row class="m-row"> |
|
|
|
|
<!-- <uni-col class="m-col" :span="ticket.ischeckedIdcard == 1 ? 18 : 24"> --> |
|
|
|
@ -418,8 +418,11 @@ const validateID = (idType, value) => { |
|
|
|
|
let regex; |
|
|
|
|
debugger |
|
|
|
|
switch (idType) { |
|
|
|
|
case 1: // 身份证 |
|
|
|
|
regex = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/; |
|
|
|
|
break; |
|
|
|
|
case '1': // 身份证 |
|
|
|
|
regex = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; |
|
|
|
|
regex = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/; |
|
|
|
|
break; |
|
|
|
|
case '2': // 护照 |
|
|
|
|
regex = /^[A-Za-z0-9]{5,20}$/; |
|
|
|
@ -454,6 +457,7 @@ const validateID = (idType, value) => { |
|
|
|
|
default: |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
console.log(idType, value, regex.test(value)) |
|
|
|
|
return regex.test(value); |
|
|
|
|
}; |
|
|
|
|
export default { |
|
|
|
@ -737,7 +741,7 @@ export default { |
|
|
|
|
getdateTicket() { |
|
|
|
|
let that = this; |
|
|
|
|
debugger |
|
|
|
|
if (this.ticket&&this.ticket.qmxId == null) { |
|
|
|
|
if (this.ticket && this.ticket.qmxId == null) { |
|
|
|
|
if (this.ticket.datesettings == 1) { |
|
|
|
|
// 不限库存 |
|
|
|
|
this.ticket.date = that.parseTime(new Date()) |
|
|
|
@ -861,7 +865,7 @@ export default { |
|
|
|
|
if (fullDate < that.parseTime(new Date())) { |
|
|
|
|
fullDate = that.parseTime(new Date()); |
|
|
|
|
} |
|
|
|
|
if (that.ticket&&that.ticket.qmxId == null) { |
|
|
|
|
if (that.ticket && that.ticket.qmxId == null) { |
|
|
|
|
if (that.ticket.inventorySettings == 1 || that.ticket.inventorySettings == 2) { |
|
|
|
|
const params = { |
|
|
|
|
ticketId: that.ticket.id, |
|
|
|
@ -949,7 +953,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//计算需要填写的人员信息数量 |
|
|
|
|
peopleNums() { |
|
|
|
|
if(this.ticket.touristInformation == 3){ |
|
|
|
|
if (this.ticket.touristInformation == 3) { |
|
|
|
|
return Number(this.ticket.usersNumber ? this.ticket.usersNumber : 0) * Number(this.ticket.num ? this.ticket.num : 0); |
|
|
|
|
} |
|
|
|
|
if (this.ticket.touristInformation == 2) { |
|
|
|
@ -1096,7 +1100,7 @@ export default { |
|
|
|
|
phoneNumber: null, |
|
|
|
|
id: null, |
|
|
|
|
selected: false, |
|
|
|
|
idtype: this.ticket&&this.ticket.qmxId == null ? '1' : this.ticketIdType |
|
|
|
|
idtype: this.ticket && this.ticket.qmxId == null ? '1' : this.ticketIdType |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
@ -1120,7 +1124,7 @@ export default { |
|
|
|
|
phoneNumber: null, |
|
|
|
|
id: null, |
|
|
|
|
selected: false, |
|
|
|
|
idtype: this.ticket&&this.ticket.qmxId == null ? '1' : this.ticketIdType |
|
|
|
|
idtype: this.ticket && this.ticket.qmxId == null ? '1' : this.ticketIdType |
|
|
|
|
} |
|
|
|
|
this.$refs.mAddPerson.open(); |
|
|
|
|
this.$refs.scroll.close(); |
|
|
|
@ -1133,7 +1137,7 @@ export default { |
|
|
|
|
this.$refs.scroll.close(); |
|
|
|
|
this.$refs.mAddPerson.open(); |
|
|
|
|
this.titleName = "编辑"; |
|
|
|
|
if (this.ticket&&this.ticket.qmxId == null) { |
|
|
|
|
if (this.ticket && this.ticket.qmxId == null) { |
|
|
|
|
this.baseFormData = val; |
|
|
|
|
} else { |
|
|
|
|
this.baseFormData = val; |
|
|
|
@ -1216,7 +1220,7 @@ export default { |
|
|
|
|
|
|
|
|
|
debugger |
|
|
|
|
|
|
|
|
|
if (that.ticket&&that.ticket.qmxId == null) { |
|
|
|
|
if (that.ticket && that.ticket.qmxId == null) { |
|
|
|
|
|
|
|
|
|
if (that.ticket.touristInformation == 1) { |
|
|
|
|
const httpData = { |
|
|
|
@ -1398,8 +1402,16 @@ export default { |
|
|
|
|
true |
|
|
|
|
) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.code == 0 && res.data != null) { |
|
|
|
|
this.orderInfo = res.data; |
|
|
|
|
this.isPayPopup = true; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg+'请检查', |
|
|
|
|
icon: 'none' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
|
console.log(err); |
|
|
|
|