bookticket.vue 13 KB

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