|
|
|
@ -55,7 +55,7 @@ |
|
|
|
|
<view class="m-ticket-count"> |
|
|
|
|
<view class="m-ticket-count-label">购票数量</view> |
|
|
|
|
<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" |
|
|
|
|
<uni-number-box v-if="maxNum == -1" :min="0" :max="maxBuyNums" 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" |
|
|
|
|
@change="changeCount($event, ticket)" /> |
|
|
|
@ -124,10 +124,13 @@ |
|
|
|
|
<view class="m-title-tips">需填 {{ ticket.touristInformation == 2 ? 1 : peopleNums() }} 位</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="m-two-first-row"> |
|
|
|
|
<view class="m-user-list" :class="item.selected ? 'active' : ''" v-for="item in navUserList" |
|
|
|
|
<view class="user-list-box"> |
|
|
|
|
<view class="m-user-list m-user-list-left" :class="item.selected ? 'active' : ''" v-for="item in navUserList" |
|
|
|
|
@click="selectUser(item)"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="m-user-list m-more-user" @click="openAddress"> |
|
|
|
|
<span class="m-span"> |
|
|
|
|
新增 |
|
|
|
@ -172,7 +175,8 @@ |
|
|
|
|
{{ item.name || '暂无' }} |
|
|
|
|
</view> |
|
|
|
|
<!-- <view v-if="item.idtype && item.idtype == ticketIdType" class="m-middle-user-idCode m-gray m-m-font">{{ --> |
|
|
|
|
<view class="m-middle-user-idCode m-gray m-m-font">{{ labelName(item.idtype) }}:{{ item.idCardNumber || '暂无' }} |
|
|
|
|
<view class="m-middle-user-idCode m-gray m-m-font">{{ labelName(item.idtype) }}:{{ item.idCardNumber || |
|
|
|
|
'暂无' }} |
|
|
|
|
</view> |
|
|
|
|
<view v-if="item.phoneNumber" class="m-middle-user-tel m-gray m-m-font">手机号 {{ item.phoneNumber || '暂无' |
|
|
|
|
}} |
|
|
|
@ -285,7 +289,7 @@ |
|
|
|
|
<view class="m-table-head">费用包含</view> |
|
|
|
|
<view class="m-table-th"> |
|
|
|
|
<view class="m-table-td">门票</view> |
|
|
|
|
<view class="m-table-td">{{ ticketInfos.ticketname || "-" }}</view> |
|
|
|
|
<view class="m-table-td">{{ ticket.ticketname || "-" }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="m-driver"></view> |
|
|
|
@ -477,6 +481,7 @@ export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
maxNum: -1, |
|
|
|
|
maxBuyNums:300, |
|
|
|
|
tentId: null, |
|
|
|
|
selected: null, //门票日历 |
|
|
|
|
startDate: parseTime(new Date()), |
|
|
|
@ -587,7 +592,7 @@ export default { |
|
|
|
|
// } |
|
|
|
|
// if (val.qmxId == null) { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.sumPrice = val.settlementPrice * val.num; |
|
|
|
|
this.sumPrice = Number(val.settlementPrice) * Number(val.num); |
|
|
|
|
}) |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
@ -596,7 +601,7 @@ export default { |
|
|
|
|
'dataList': { |
|
|
|
|
handler(val) { |
|
|
|
|
console.log(val); |
|
|
|
|
this.navUserList = val.slice(0, 3) |
|
|
|
|
this.navUserList = val |
|
|
|
|
}, |
|
|
|
|
deep: true |
|
|
|
|
} |
|
|
|
@ -612,6 +617,7 @@ export default { |
|
|
|
|
fullDate: this.getFullDate(i), |
|
|
|
|
isAvailable: true, |
|
|
|
|
price: "0元", |
|
|
|
|
inventory:0, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
console.log(options); |
|
|
|
@ -780,6 +786,7 @@ export default { |
|
|
|
|
selectedDates.forEach((item, index) => { |
|
|
|
|
that.dates[index].isAvailable = item.disable; |
|
|
|
|
that.dates[index].price = item.topInfo; |
|
|
|
|
that.dates[index].inventory = -1 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
console.log(this.dates); |
|
|
|
@ -803,9 +810,9 @@ export default { |
|
|
|
|
res.data.forEach(items => { |
|
|
|
|
const obj = { |
|
|
|
|
date: items.date, |
|
|
|
|
info: items.isAvailable || items.inventory == 0? "库存:" + items.inventory:'', |
|
|
|
|
info: items.isAvailable || items.inventory != 0 ? "库存:" + items.inventory : '', |
|
|
|
|
infoColor: "#666", |
|
|
|
|
topInfo: items.isAvailable || items.inventory == 0 ? items.settlementPrice + '元':'', |
|
|
|
|
topInfo: items.isAvailable || items.inventory != 0 ? items.settlementPrice + '元' : '', |
|
|
|
|
topInfoColor: "", |
|
|
|
|
badgeColor: "", |
|
|
|
|
disable: !items.isAvailable || items.inventory == 0, // 禁用 |
|
|
|
@ -816,6 +823,7 @@ export default { |
|
|
|
|
selectedDates.forEach((item, index) => { |
|
|
|
|
that.dates[index].isAvailable = item.disable; |
|
|
|
|
that.dates[index].price = item.topInfo; |
|
|
|
|
that.dates[index].inventory = item.inventory == -1 ? -1: item.inventory; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
console.log(this.dates); |
|
|
|
@ -854,6 +862,7 @@ export default { |
|
|
|
|
selectedDates.forEach((item, index) => { |
|
|
|
|
that.dates[index].isAvailable = item.disable; |
|
|
|
|
that.dates[index].price = item.topInfo; |
|
|
|
|
that.dates[index].inventory = item.inventory==-1?-1:item.inventory; |
|
|
|
|
}); |
|
|
|
|
console.log(this.dates); |
|
|
|
|
|
|
|
|
@ -1032,6 +1041,7 @@ export default { |
|
|
|
|
this.ticket.settlementPrice = parseFloat(date.price.replace("元", "").trim()); |
|
|
|
|
this.ticket.num = 1 |
|
|
|
|
this.sumPrice = this.ticket.settlementPrice * this.ticket.num; |
|
|
|
|
this.maxBuyNums = date.inventory == -1 ? 300 : date.inventory |
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
console.log(this.ticket, "this.ticket"); |
|
|
|
|
|
|
|
|
@ -1278,8 +1288,9 @@ export default { |
|
|
|
|
item.phoneNumber = ""; |
|
|
|
|
} |
|
|
|
|
if (that.ticket.ischeckedIdcard == 0) { |
|
|
|
|
item.idCardName = ""; |
|
|
|
|
item.idCardNumber = ""; |
|
|
|
|
} |
|
|
|
|
console.log(item, '当前访客信息'); |
|
|
|
|
}) |
|
|
|
|
console.log(arr, 'arrarrarr', that.ticket.ischeckedMobile, that.ticket.ischeckedIdcard) |
|
|
|
|
if (allValid && allValids && allValidtel) { |
|
|
|
@ -1411,7 +1422,7 @@ export default { |
|
|
|
|
item.phoneNumber = ""; |
|
|
|
|
} |
|
|
|
|
if (that.ticketIdType == null) { |
|
|
|
|
item.idCardName = ""; |
|
|
|
|
item.idCardNumber = ""; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if (allValid && allValids && allValidtel) { |
|
|
|
@ -1512,6 +1523,7 @@ export default { |
|
|
|
|
that.nowIndex = -1 |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.maxBuyNums = e.info == "" ? 300 : Number(e.info.split(":")[1]) |
|
|
|
|
this.ticket.date = e.fulldate; |
|
|
|
|
this.ticket.settlementPrice = parseFloat( |
|
|
|
|
e.extraInfo.topInfo.replace("元", "").trim() |
|
|
|
@ -1534,9 +1546,9 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//购票数量 |
|
|
|
|
changeCount(val, ticket) { |
|
|
|
|
console.log(val); |
|
|
|
|
console.log(val, ticket); |
|
|
|
|
this.ticket.num = val; |
|
|
|
|
this.sumPrice = ticket.settlementPrice * val; |
|
|
|
|
this.sumPrice = Number(ticket.settlementPrice) * val; |
|
|
|
|
}, |
|
|
|
|
//选择游客 |
|
|
|
|
selectUser(val, boo) { |
|
|
|
@ -1559,19 +1571,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this_.selectUserList.push(val); |
|
|
|
|
// if (boo == true) { |
|
|
|
|
// const index = this.navUserList.findIndex(user => user.selected == false); |
|
|
|
|
|
|
|
|
|
// // 如果找到了,进行替换 |
|
|
|
|
// if (index !== -1) { |
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
// this.navUserList.splice(index, 1, val); |
|
|
|
|
// }) |
|
|
|
|
// console.log(this.navUserList, 'this.navUserList') |
|
|
|
|
// } else { |
|
|
|
|
// console.log('没有找到 select 为 false 的对象。'); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
val.selected = false; |
|
|
|
@ -1867,6 +1867,19 @@ export default { |
|
|
|
|
margin-left: 10rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.user-list-box { |
|
|
|
|
width: 75%; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
overflow-x: scroll; |
|
|
|
|
|
|
|
|
|
.m-user-list-left { |
|
|
|
|
width: fit-content; |
|
|
|
|
flex: none; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.m-user-list.active { |
|
|
|
|
background: #ebf5ff; |
|
|
|
|
border-radius: 12rpx; |
|
|
|
|