bookticket.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. <template>
  2. <view class="pages">
  3. <view class="" :style="{height: navHeight+'px' }"></view>
  4. <view class="navbar-box">
  5. <u-navbar title="订单详情" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="transparent"></u-navbar>
  6. </view>
  7. <view class="page-wrap">
  8. <view class="base-info">
  9. <view class="up u-flex">
  10. <image class="img" :src="staticUrl+'/img/bookticket-banner.png'" alt="">
  11. <view class="text">
  12. <view class="name text-item">《伟大转折》-【成人票】</view>
  13. <view class="time text-item">今天 10:00-11:00</view>
  14. <view class="num text-item">成人票 x1</view>
  15. <view class="position text-item">《伟大转折》演艺中心 x1</view>
  16. <view class="addr u-flex u-row-between">
  17. <view class="u-line-1">地址:遵义市《伟大转折》演艺中心</view>
  18. <u-icon name="arrow-right" color="#2D2D2D" size="36rpx"></u-icon>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="down">
  23. <view class="num-wrap u-flex u-row-between">
  24. <view class="title">选购数量</view>
  25. <view class="num">1</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="block-wrap purchaser">
  30. <view class="block-title u-flex">
  31. <view class="name">购票人信息</view>
  32. <!-- <text>用于入园身份验证</text> -->
  33. </view>
  34. <view class="" v-if="vuex_member_info.isAuth">
  35. <view class="item">昵称:{{vuex_member_info.name}}</view>
  36. <view class="item">手机号:{{vuex_member_info.mobile}}</view>
  37. </view>
  38. <view class="un-auth" v-else @click="$u.route('center/factorauth',{from:'bookticket'})">
  39. 请先<text style="color: #ED0000;">实名认证</text>
  40. </view>
  41. </view>
  42. <view class="block-wrap visitors">
  43. <view class="block-title u-flex">
  44. <view class="name">观影人信息</view>
  45. <!-- <text>用于入园身份验证</text> -->
  46. </view>
  47. <view class="people-list u-flex u-flex-wrap">
  48. <view class="people btn" v-if="visitors.length>0" v-for="(visitor,index) in visitors" :key="index">
  49. {{visitor.name}}
  50. </view>
  51. <view class="btn u-flex u-row-center" @click="visitorShow = true">
  52. <u-icon name="plus-circle" color="#2D2D2D" size="32rpx"></u-icon>
  53. <text class="text">新增/更换</text>
  54. </view>
  55. </view>
  56. <!-- <view class="no-people u-flex" v-if="!visitors.length>0">
  57. <text>游客</text>
  58. <text class="right" @click="visitorShow = true">点击选择游客</text>
  59. </view> -->
  60. <view class="peoples" v-if="visitors.length>0">
  61. <view class="peoples-item u-flex u-row-between" v-for="(visitor,index) in visitors" :key="index">
  62. <view class="left u-flex">
  63. <u-icon @click="delVisitor(visitor)" name="close-circle" color="#2D2D2D" size="32rpx"></u-icon>
  64. <text style="margin-left: 8rpx;">观影人{{ index + 1 }}</text>
  65. <text class="name">{{visitor.name}}</text>
  66. <text class="people-id">{{ visitor.sfz | maskID }}</text>
  67. </view>
  68. <view class="right" @click="editVisitor(visitor)">编辑</view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="coupon">
  73. <view class="title u-flex u-row-between u-border-bottom">
  74. <text>本单可享优惠</text>
  75. </view>
  76. <view class="single-til u-flex u-row-between">
  77. <view class="text">优惠券</view>
  78. <view class="more-text u-flex">
  79. <text>未使用</text>
  80. <u-icon name="arrow-right" color="#E6E6E6" size="24rpx"></u-icon>
  81. </view>
  82. </view>
  83. <view class="no-coupon">
  84. 您暂无可使用优惠券~
  85. </view>
  86. </view>
  87. <view class="notice">
  88. <view class="title u-flex u-row-between u-border-bottom">
  89. <text>购票须知</text>
  90. </view>
  91. <view class="notice-item">
  92. 1.由于设备故障等不可抗力因素,存在少量场次取消的情况,会
  93. 进行退票退款
  94. </view>
  95. <view class="notice-item">
  96. 2.由于影院系统不稳定等因素,存在出票失败的情况,会进行退款
  97. </view>
  98. <view class="notice-item">
  99. 3.取票码可以在“我的-订单页”中查看
  100. </view>
  101. </view>
  102. </view>
  103. <u-popup :show="visitorShow">
  104. <view class="people-show-content">
  105. <view class="title">
  106. <view class="cancel" @click="visitorShow=false">取消</view>
  107. 选择观影人
  108. </view>
  109. <view class="add-btn u-flex u-row-center" @click="addVisitor">
  110. <image class="img" :src="staticUrl+'/img/car.png'" ></image>
  111. 添加观影人信息
  112. </view>
  113. <view class="list">
  114. <u-checkbox-group
  115. v-model="selectedVisitor"
  116. iconPlacement="left">
  117. <view class="people u-flex u-row-between" v-for="(item,index) in visitorList" :key="index">
  118. <u-checkbox activeColor="#ED0303" :label="item.name" :name="item.id"></u-checkbox>
  119. <u-icon name="edit-pen-fill" color="#7F7F7F" size="32rpx" @click="editVisitor(item)"></u-icon>
  120. </view>
  121. </u-checkbox-group>
  122. </view>
  123. <view class="full-btn" @click="confirmVisitor">确定</view>
  124. </view>
  125. </u-popup>
  126. <view class="page-bottom">
  127. <view class="inner u-flex u-row-between">
  128. <view class="left u-flex">
  129. <text>应付金额:</text>
  130. <view class="total-price">
  131. {{totalPrice}}
  132. </view>
  133. </view>
  134. <view class="right">
  135. <view class="btn active" v-if="totalPrice>0&&cansubmit" @click="submitorder">去结算</view>
  136. <view class="btn" v-else>提交订单</view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. import { systemInfo } from "@/mixin.js";
  144. export default {
  145. mixins:[systemInfo],
  146. data() {
  147. return {
  148. cansubmit:true,
  149. staticUrl:this.$commonConfig.staticUrl,
  150. visitors:[],//游客
  151. visitorShow:false,//游客弹层
  152. visitorList:[
  153. {id:'1',name:'张三',sfz:'522501199012037605'},
  154. {id:'2',name:'李四',sfz:'522501196012037605'},
  155. {id:'3',name:'王五',sfz:'522501202112037605'},
  156. ],//游客列表
  157. selectedVisitor:[],//选中的游客
  158. }
  159. },
  160. computed: {
  161. totalPrice() {
  162. let that = this;
  163. return this.visitors.reduce((total, item) => {
  164. let price = null;
  165. // if(that.vuex_member_info.priceType>1){
  166. // price = item.vipPrice
  167. // }else{
  168. // price = item.salePrice
  169. // }
  170. price = item.levelPrice
  171. total += price * item.quantity;
  172. return total;
  173. }, 0).toFixed(2);
  174. },
  175. },
  176. onShow() {
  177. },
  178. onLoad() {
  179. this.getSystemInfo();
  180. },
  181. methods: {
  182. leftClick(e){
  183. let pages = getCurrentPages();
  184. if(pages.length==1){
  185. uni.$u.route('/pages/index/index')
  186. }else{
  187. uni.navigateBack()
  188. };
  189. },
  190. confirmVisitor(){
  191. let that = this;
  192. // console.log('selectedVisitor',this.selectedVisitor);
  193. this.visitorShow = false;
  194. this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.id));
  195. // console.log('this.visitors',this.visitors);
  196. },
  197. delVisitor(visitor){
  198. // console.log('delVisitor',visitor);
  199. this.visitors = this.visitors.filter(obj => obj.id!=visitor.id );
  200. },
  201. addVisitor(){
  202. uni.$u.route('/center/people', {
  203. type: 'addVisitor',
  204. fromPage:'bookticket'
  205. });
  206. },
  207. editVisitor(item){
  208. uni.$u.route('/center/people', {
  209. type: 'editVisitor',
  210. fromPage:'bookticket',
  211. id:item.id
  212. });
  213. },
  214. submitorder(){
  215. this.cansubmit = false;
  216. },
  217. }
  218. }
  219. </script>
  220. <style>
  221. page{
  222. background: linear-gradient(180deg, #ED0000 0%, #F9FBFD 50%,#fff 100%);
  223. background-repeat: no-repeat;
  224. }
  225. </style>
  226. <style lang="scss" scoped>
  227. .base-info{
  228. border-radius: 30rpx;
  229. overflow: hidden;
  230. background: radial-gradient(circle at -26rpx 294rpx, transparent 8%, #fff 4%) left, radial-gradient(circle at calc( 100% + 26rpx ) 294rpx, transparent 8%, #fff 4%) right;
  231. background-size: 50% 100%;
  232. background-repeat: no-repeat;
  233. padding: 34rpx 36rpx;
  234. box-sizing: border-box;
  235. margin: 30rpx 0 40rpx;
  236. .up{
  237. margin-bottom: 36rpx;
  238. .img{
  239. display: block;
  240. width: 172rpx;
  241. height: 230rpx;
  242. border-radius: 20rpx;
  243. margin-right: 32rpx;
  244. }
  245. .text{
  246. font-size: 22rpx;
  247. font-weight: 400;
  248. color: #606060;
  249. line-height: 1;
  250. }
  251. .text-item{
  252. margin-bottom: 18rpx;
  253. }
  254. .name{
  255. font-size: 32rpx;
  256. font-weight: bold;
  257. color: #2D2D2D;
  258. }
  259. .addr{
  260. font-size: 24rpx;
  261. font-weight: 500;
  262. color: #2D2D2D;
  263. }
  264. }
  265. .down{
  266. position: relative;
  267. &:before{
  268. content: '';
  269. width: calc( 100% + 26rpx );
  270. height: 1px;
  271. position: absolute;
  272. left: -13rpx;
  273. top: -2rpx;
  274. border-top: 4rpx dashed #F39FA0;
  275. }
  276. .num-wrap{
  277. padding-top: 36rpx;
  278. }
  279. }
  280. }
  281. .block-wrap{
  282. background: #FFFFFF;
  283. box-shadow: 0rpx 0rpx 20rpx 2rpx rgba(221,221,221,0.5);
  284. border-radius: 20rpx;
  285. margin-bottom: 28rpx;
  286. padding: 32rpx 30rpx 34rpx;
  287. .block-title{
  288. // padding-left: 16rpx;
  289. position: relative;
  290. margin-bottom: 22rpx;
  291. font-size: 24rpx;
  292. font-weight: 500;
  293. color: #CACACA;
  294. // &:before{
  295. // content: '';
  296. // width: 6rpx;
  297. // height: 32rpx;
  298. // background: #1677FF;
  299. // border-radius: 4rpx;
  300. // position: absolute;
  301. // left: 0;
  302. // top: 50%;
  303. // margin-top: -16rpx;
  304. // }
  305. .name{
  306. font-size: 32rpx;
  307. font-weight: bold;
  308. color: #2D2D2D;
  309. margin-right: 20rpx;
  310. }
  311. }
  312. .no-people{
  313. font-size: 28rpx;
  314. font-weight: 400;
  315. color: #7F7F7F;
  316. .right{
  317. margin-left: 20rpx;
  318. color: #1677FF;
  319. }
  320. }
  321. .peoples{
  322. font-size: 28rpx;
  323. font-weight: 400;
  324. color: #7F7F7F;
  325. margin-bottom: 24rpx;
  326. .peoples-item{
  327. margin-bottom: 10rpx;
  328. }
  329. .name{
  330. margin-left: 20rpx;
  331. margin-right: 28rpx;
  332. font-size: 28rpx;
  333. font-weight: bold;
  334. color: #363636;
  335. }
  336. .people-id{
  337. font-size: 20rpx;
  338. font-weight: 400;
  339. color: #606060;
  340. }
  341. .right{
  342. font-size: 28rpx;
  343. font-weight: 400;
  344. color: #ED0303;
  345. }
  346. }
  347. }
  348. .people-list{
  349. margin-bottom: 20rpx;
  350. .btn{
  351. width: 200rpx;
  352. height: 60rpx;
  353. line-height: 60rpx;
  354. font-size: 24rpx;
  355. font-weight: 500;
  356. color: #2D2D2D;
  357. background-color: #F1F1F1;
  358. border: 1px solid #F1F1F1;
  359. border-radius: 8rpx;
  360. margin-bottom: 12rpx;
  361. .text{
  362. margin-left: 16rpx;
  363. }
  364. &.people{
  365. margin-right: 16rpx;
  366. text-align: center;
  367. background-color: #FFF2F2;
  368. border-color: #ED0303;
  369. }
  370. }
  371. }
  372. .visitors{
  373. margin-bottom: 20rpx;
  374. }
  375. .people-show-content{
  376. background: #FFFFFF;
  377. border-radius: 40rpx 40rpx 0rpx 0rpx;
  378. padding: 30rpx 40rpx;
  379. .title{
  380. position: relative;
  381. font-size: 32rpx;
  382. font-weight: 500;
  383. color: #606060;
  384. margin-bottom: 46rpx;
  385. text-align: center;
  386. .cancel{
  387. position: absolute;
  388. left: 0;
  389. top: 0;
  390. }
  391. }
  392. .add-btn{
  393. margin-bottom: 28rpx;
  394. background: #E5F0FF;
  395. border-radius: 44rpx;
  396. padding: 26rpx;
  397. font-size: 24rpx;
  398. font-weight: 400;
  399. color: #1677FF;
  400. .img{
  401. width: 28rpx;
  402. height: 36rpx;
  403. margin-right: 36rpx;
  404. }
  405. }
  406. .list{
  407. /deep/ .u-radio-group{
  408. flex-wrap: wrap;
  409. }
  410. /deep/ .u-checkbox-group{
  411. flex-wrap: wrap;
  412. }
  413. overflow-y: auto;
  414. height: 40vh;
  415. .people{
  416. width: 100%;
  417. margin-bottom: 24rpx;
  418. }
  419. }
  420. .btn{}
  421. }
  422. .coupon{
  423. background: #FFFFFF;
  424. box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(232,232,232,0.5);
  425. border-radius: 16rpx;
  426. padding: 44rpx 36rpx;
  427. margin-bottom: 24rpx;
  428. .title{
  429. font-size: 28rpx;
  430. font-weight: bold;
  431. color: #2D2D2D;
  432. padding-bottom: 20rpx;
  433. margin-bottom: 26rpx;
  434. border-bottom-style:dashed;
  435. }
  436. .single-til{
  437. margin-bottom: 28rpx;
  438. .text{
  439. font-weight: 400;
  440. }
  441. }
  442. .no-coupon{
  443. height: 116rpx;
  444. line-height: 116rpx;
  445. text-align: center;
  446. background: #F9FAFD;
  447. border-radius: 8rpx;
  448. font-size: 24rpx;
  449. font-weight: 400;
  450. color: #C0C0C0;
  451. }
  452. }
  453. .notice{
  454. background: #FFFFFF;
  455. box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(232,232,232,0.5);
  456. border-radius: 16rpx;
  457. padding: 44rpx 36rpx;
  458. margin-bottom: 24rpx;
  459. .title{
  460. font-size: 28rpx;
  461. font-weight: bold;
  462. color: #2D2D2D;
  463. padding-bottom: 20rpx;
  464. margin-bottom: 26rpx;
  465. border-bottom-style:dashed;
  466. }
  467. .notice-item{
  468. font-size: 24rpx;
  469. font-weight: 400;
  470. color: #7F7F7F;
  471. line-height: 36rpx;
  472. margin-bottom: 8rpx;
  473. }
  474. }
  475. .page-bottom{
  476. position: relative;
  477. z-index: 1001;
  478. height: 98rpx;
  479. padding: 24rpx 20rpx 50rpx;
  480. .inner{
  481. position: fixed;
  482. background-color: #fff;
  483. height: 98rpx;
  484. left: 0;
  485. right: 0;
  486. bottom: 0;
  487. padding: 24rpx 20rpx 50rpx;
  488. box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(215,215,215,0.5);
  489. .total-price{
  490. font-size: 40rpx;
  491. font-weight: bold;
  492. color: #ED0000;
  493. }
  494. .btn{
  495. font-size: 28rpx;
  496. height: 80rpx;
  497. line-height: 80rpx;
  498. border-radius: 50rpx;
  499. padding: 0 50rpx;
  500. background-color: #eee;
  501. color: #333;
  502. text-align: center;
  503. &.active{
  504. background: linear-gradient(90deg, #FF7979 0%, #ED0000 100%);
  505. color: #fff;
  506. }
  507. }
  508. }
  509. }
  510. .purchaser{
  511. .item{
  512. margin-bottom: 10rpx;
  513. font-size: 26rpx;
  514. color: #333;
  515. }
  516. .un-auth{
  517. padding: 26rpx;
  518. background-color: #eee;
  519. color: #333;
  520. text-align: center;
  521. border-radius: 8rpx;
  522. }
  523. }
  524. </style>