orderDetails.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
  3. <c-nav-bar title="订单详情" showIcon="true" :titleStyle="titleStyle"></c-nav-bar>
  4. <view class="content" style="background-color: #F5F8FA;">
  5. <view class="head">
  6. <text class="status" v-if="list.orderStatus=='1'">未核销</text>
  7. <text class="status" v-if="list.orderStatus=='-2'">待支付</text>
  8. <text class="status" v-if="list.orderStatus=='2'">已核销</text>
  9. <text class="status" v-if="list.orderStatus=='4'">已取消</text>
  10. <text class="status" v-if="list.orderStatus=='5'">已退款</text>
  11. <text>¥</text>
  12. <text>{{list.orderAmount}}</text>
  13. </view>
  14. <view class="ticketInfo">
  15. <view class="ticketInfo-hander">
  16. <view class="images">
  17. <image class="image" :src="list.cover" mode="aspectFill"></image>
  18. </view>
  19. <view class="" style="width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;">
  20. <view class="name">
  21. {{list.homestayName}}
  22. </view>
  23. <view class="date">
  24. <text>{{list.comboName}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="ticketInfo-demo">
  29. <u-row customStyle="margin-bottom: 10px">
  30. <u-col span="3">
  31. <view class="demo-layout bg-purple">
  32. 套餐说明
  33. </view>
  34. </u-col>
  35. <u-col span="9">
  36. <view class="demo-layout bg-purple-light">
  37. {{list.comboExplain}}
  38. </view>
  39. </u-col>
  40. </u-row>
  41. </view>
  42. </view>
  43. <!-- 订单信息 -->
  44. <view class="orderInfo">
  45. <view class="tit">订单信息</view>
  46. <u-cell :border="false">
  47. <text slot="icon" class="txt">订单编号</text>
  48. >
  49. <text slot="title" class="val">{{list.orderCode}}</text>
  50. <text slot="right-icon" class="icon"
  51. style="border: 1rpx solid #1372FF; border-radius: 50rpx; box-sizing: border-box; color: #1372FF;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
  52. @tap="copyOrderNo(list)">复制</text>
  53. </u-cell>
  54. <u-cell :border="false">
  55. <text slot="icon" class="txt">关联房间</text>
  56. >
  57. <text slot="title" class="val">{{list.roomNumber==null?'暂无':list.roomNumber}}</text>
  58. </u-cell>
  59. <u-cell :border="false">
  60. <text slot="icon" class="txt">预约时间</text>
  61. >
  62. <text slot="title" class="val">{{list.repastTime}}</text>
  63. </u-cell>
  64. <u-cell :border="false" v-if="list.orderStatus==2">
  65. <text slot="icon" class="txt">核销时间</text>
  66. >
  67. <text slot="title" class="val">{{list.checkinTime}}</text>
  68. </u-cell>
  69. <u-cell :border="false">
  70. <text slot="icon" class="txt">预约人姓名</text>
  71. >
  72. <text slot="title" class="val">{{list.guestName}}</text>
  73. </u-cell>
  74. <u-cell :border="false">
  75. <text slot="icon" class="txt">预约手机号</text>
  76. >
  77. <text slot="title" class="val">{{list.guestPhone}}</text>
  78. </u-cell>
  79. <u-cell :border="false" v-if="list.comboType==2">
  80. <text slot="icon" class="txt">就餐份数</text>
  81. >
  82. <text slot="title" class="val">{{list.num}}</text>
  83. </u-cell>
  84. <u-cell :border="false" v-if="list.comboType==1">
  85. <text slot="icon" class="txt">成人人数</text>
  86. >
  87. <text slot="title" class="val">{{list.num}}</text>
  88. </u-cell>
  89. <u-cell :border="false" v-if="list.comboType==1">
  90. <text slot="icon" class="txt">儿童人数</text>
  91. >
  92. <text slot="title" class="val">{{list.repastNum}}</text>
  93. </u-cell>
  94. <u-cell :border="false">
  95. <text slot="icon" class="txt">备注</text>
  96. >
  97. <text slot="title" class="val">{{list.remarks==null?'':list.remarks}}</text>
  98. </u-cell>
  99. <u-cell :border="false">
  100. <text slot="icon" class="txt">合计金额</text>
  101. >
  102. <text slot="title" class="val">{{list.orderAmount}}</text>
  103. </u-cell>
  104. </view>
  105. </view>
  106. <view class="btns">
  107. <template v-if="list.orderStatus==1&&isDel!=0">
  108. <view class="" @click="toStatus0(list)"
  109. style="color:#fff ; border-color: #1372FF; background-color: #1372FF; width: 100%;">
  110. 确定核销
  111. </view>
  112. </template>
  113. <!-- <template v-if="list.orderStatus==-2||list.orderStatus==5||list.orderStatus==4">
  114. <view class="" style="color:#fff ; border-color: #1372FF; background-color: #1372FF; width: 100%;"
  115. @click="applyAfterSales(list)">
  116. 删除订单
  117. </view>
  118. </template> -->
  119. </view>
  120. <u-toast ref="uToast"></u-toast>
  121. </view>
  122. </template>
  123. <script>
  124. export default {
  125. data() {
  126. return {
  127. titles: '订单详情',
  128. h: uni.getSystemInfoSync().windowHeight,
  129. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  130. value: 1,
  131. status: 1,
  132. id: '',
  133. list: {},
  134. bedData: {},
  135. id: '',
  136. arriveTime: '',
  137. arriveTimes: '',
  138. leaveTime: '',
  139. leaveTimes: '',
  140. count: '',
  141. orderId: '',
  142. price: '',
  143. form: {
  144. initiator: 2,
  145. orderCode: '',
  146. status: ''
  147. },
  148. num: 0,
  149. checkInTimeStart: '',
  150. checkOutTime: '',
  151. checkInRooms: 0,
  152. isDel: null,
  153. }
  154. },
  155. onLoad(option) {
  156. console.log('+++++++++++', JSON.parse(option.obj));
  157. let obj = JSON.parse(option.obj)
  158. this.id = obj.orderId
  159. this.isDel = obj.isDel
  160. this.getList()
  161. },
  162. methods: {
  163. copyOrderNo(no) {
  164. let that = this;
  165. // #ifdef H5
  166. this.$copyText(no).then(res => {
  167. this.$showToast('复制成功');
  168. })
  169. // #endif
  170. // #ifdef MP-WEIXIN
  171. uni.setClipboardData({
  172. data: no,
  173. success(res) {
  174. that.$showToast('复制成功');
  175. },
  176. fail(err) {
  177. that.$showToast('复制失败');
  178. }
  179. })
  180. // #endif
  181. },
  182. // 获取详情
  183. getList() {
  184. this.$api.get(`/merchant/hotel/repast/getRepastOrderInfo/${this.id}`)
  185. .then(res => {
  186. this.list = res.data.data
  187. })
  188. },
  189. // 删除
  190. applyAfterSales(item) {
  191. let ids = []
  192. ids.push(item.id)
  193. this.$api.del('/merchant/hotel/repast', ids).then(res => {
  194. console.log(res);
  195. if (res.data.code == 0) {
  196. uni.navigateTo({
  197. url: '/pagesMy/orderList/orderList'
  198. })
  199. } else this.$showToast(res.data.msg);
  200. })
  201. },
  202. toStatus0(item) {
  203. // this.$api.get('/merchant/hotel/repast/writeOffOrder/' + res.result)
  204. // .then(res => {
  205. // console.log('0000', res);
  206. // if (res.data.code == 0) {
  207. // uni.setStorageSync('list', res.data.data);
  208. // } else {
  209. // this.$showToast(res.data.msg)
  210. // }
  211. // })
  212. this.$api.get('/merchant/hotel/repast/writeOffOrder/' + item.orderCode)
  213. .then(res => {
  214. if (res.data.code == 0) {
  215. uni.navigateTo({
  216. url: '/pages/house/WriteOffResults?price=' + item.orderAmount
  217. })
  218. } else {
  219. this.$showToast(res.data.msg)
  220. }
  221. })
  222. }
  223. }
  224. }
  225. </script>
  226. <style lang="scss" scoped>
  227. .listItemed {
  228. padding: 13rpx 0;
  229. font-size: 26rpx;
  230. color: #666;
  231. align-items: center;
  232. .name {
  233. font-size: 28rpx;
  234. color: #111111;
  235. font-weight: bold;
  236. }
  237. .verityInfo {
  238. margin: 30rpx 0;
  239. line-height: 28rpx;
  240. height: 28rpx;
  241. }
  242. .top {
  243. margin-bottom: 30rpx;
  244. }
  245. .ticketType {
  246. margin-left: 20rpx;
  247. font-weight: 400;
  248. color: #94A9C8;
  249. line-height: 33rpx;
  250. height: 33rpx;
  251. font-size: 24rpx;
  252. background: #F5F8FA;
  253. border-radius: 8rpx;
  254. padding: 4rpx;
  255. }
  256. }
  257. .voucherCode_colse {
  258. padding: 20rpx;
  259. .title {
  260. height: 80rpx;
  261. font-weight: 600;
  262. font-size: 31rpx;
  263. color: #333;
  264. padding: 20rpx 30rpx;
  265. line-height: 80rpx;
  266. background: #fff;
  267. border-radius: 20rpx;
  268. }
  269. .title_info {
  270. line-height: 80rpx;
  271. font-weight: 600;
  272. font-size: 34rpx;
  273. color: #333;
  274. padding: 0 10rpx;
  275. }
  276. .codeList {
  277. // margin-top: 19rpx;
  278. padding: 20rpx;
  279. background: #fff;
  280. border-radius: 20rpx;
  281. }
  282. .listItem {
  283. display: flex;
  284. justify-content: space-between;
  285. padding: 13rpx 19rpx;
  286. flex-direction: row;
  287. font-size: 26rpx;
  288. color: #666;
  289. align-items: center;
  290. .verityInfo {
  291. margin: 30rpx 0;
  292. line-height: 28rpx;
  293. height: 28rpx;
  294. }
  295. .top {
  296. margin-bottom: 30rpx;
  297. }
  298. .ticketType {
  299. margin-left: 20rpx;
  300. font-weight: 400;
  301. color: #94A9C8;
  302. line-height: 33rpx;
  303. height: 33rpx;
  304. font-size: 24rpx;
  305. background: #F5F8FA;
  306. border-radius: 8rpx;
  307. padding: 4rpx;
  308. }
  309. }
  310. }
  311. .ci_bottom {
  312. text-align: center;
  313. width: 100%;
  314. padding: 0 24rpx 30rpx;
  315. box-sizing: border-box;
  316. font-weight: 600;
  317. font-size: 30rpx;
  318. color: #111111;
  319. // display: flex;
  320. // justify-content: space-between;
  321. }
  322. .ci_code {
  323. width: 100%;
  324. display: flex;
  325. align-items: center;
  326. justify-content: center;
  327. }
  328. .voucherCode {
  329. margin: 20rpx 23rpx 0;
  330. padding: 44rpx 24rpx 20rpx;
  331. border-radius: 20rpx;
  332. background-color: #fff;
  333. z-index: 2;
  334. .title {
  335. font-weight: 600;
  336. font-size: 34rpx;
  337. color: #333;
  338. }
  339. .orange {
  340. margin: 0 30rpx;
  341. font-weight: Regular;
  342. font-size: 24rpx;
  343. color: #AAAAAA;
  344. }
  345. }
  346. .bottom-list {
  347. display: flex;
  348. margin: 37rpx auto;
  349. justify-content: center;
  350. .image {
  351. width: 36rpx;
  352. height: 36rpx;
  353. margin: 0 8rpx;
  354. image {
  355. width: 100%;
  356. height: 100%;
  357. }
  358. }
  359. .text {
  360. font-size: 26rpx;
  361. color: #999999;
  362. font-weight: Regular;
  363. }
  364. }
  365. .minus,
  366. .plus {
  367. display: flex;
  368. align-items: center;
  369. // width: 44rpx;
  370. // height: 44rpx;
  371. // line-height: 44rpx;
  372. padding: 10rpx 10rpx;
  373. // padding-left: 8rpx;
  374. border: 1px solid #999;
  375. border-radius: 6rpx;
  376. text-align: center;
  377. }
  378. page {
  379. box-sizing: border-box;
  380. background-color: #F5F8FA;
  381. .content {
  382. position: relative;
  383. z-index: 3;
  384. padding-bottom: 160rpx;
  385. background-color: content;
  386. .hand-title {
  387. position: absolute;
  388. left: 20rpx;
  389. top: 100rpx;
  390. font-size: 24rpx;
  391. color: #fff;
  392. }
  393. }
  394. }
  395. .ticketInfo-demo {
  396. // border-bottom: 2rpx solid #EFEFEF;
  397. margin-top: 40rpx;
  398. .bg-purple {
  399. font-size: 26rpx;
  400. color: #808080;
  401. font-weight: Regular;
  402. }
  403. .bg-purple-light {
  404. font-size: 30rpx;
  405. color: #111111;
  406. font-weight: Regular;
  407. }
  408. }
  409. .two-center-two {
  410. box-sizing: border-box;
  411. .tit {
  412. font-size: 32rpx;
  413. color: #333333;
  414. margin: 20rpx 0;
  415. }
  416. .df-one {
  417. font-size: 32rpx;
  418. color: #333333;
  419. font-weight: bold;
  420. // .bg-purple-dark {
  421. // margin-left: 140rpx;
  422. // }
  423. // .demo-layout {
  424. // margin-left: 30rpx;
  425. // }
  426. }
  427. .df-two {
  428. border-bottom: 2rpx solid #EFEFEF;
  429. .bg-purple {
  430. // margin-right: 100rpx;
  431. width: 182rpx;
  432. margin-left: -13rpx;
  433. }
  434. .bg-purple-dark {
  435. // margin-left: 50rpx;
  436. }
  437. .bg-purple,
  438. .bg-purple-dark {
  439. font-size: 26rpx;
  440. color: #777777;
  441. font-weight: Regular;
  442. text-align: center;
  443. text {
  444. margin: 0 8rpx;
  445. }
  446. }
  447. .bg-purple-light {
  448. font-size: 24rpx;
  449. color: #666666;
  450. border: 1rpx solid #666666;
  451. text-align: center;
  452. border-radius: 50rpx;
  453. }
  454. }
  455. }
  456. .prices-content {
  457. margin: 24rpx 0;
  458. .txt1 {
  459. font-size: 32rpx;
  460. color: #111111;
  461. font-weight: bold;
  462. }
  463. .txt2 {
  464. margin: 12rpx 0;
  465. font-size: 26rpx;
  466. color: #777777;
  467. font-weight: Regular;
  468. }
  469. }
  470. .orderInfo {
  471. box-sizing: border-box;
  472. background-color: #fff;
  473. border-radius: 16rpx;
  474. width: 96%;
  475. margin: 0 auto 20rpx;
  476. padding: 0 0 30rpx;
  477. .tit {
  478. font-size: 32rpx;
  479. color: #333;
  480. padding-left: 30rpx;
  481. padding-top: 40rpx;
  482. font-weight: 600;
  483. margin-bottom: 20rpx;
  484. }
  485. .txt {
  486. font-size: 28rpx;
  487. color: #666;
  488. width: 140rpx;
  489. }
  490. .icon {
  491. font-size: 28rpx;
  492. color: #666;
  493. }
  494. .val {
  495. font-size: 28rpx;
  496. color: #333333;
  497. margin: 0 20rpx 0 30rpx;
  498. font-weight: Regular;
  499. }
  500. }
  501. .ticketInfo {
  502. box-sizing: border-box;
  503. width: 96%;
  504. margin: 0 auto 20rpx;
  505. padding: 44rpx 24rpx 10rpx;
  506. border-radius: 20rpx;
  507. position: relative;
  508. background-color: #fff;
  509. z-index: 2;
  510. .ticketInfo-hander {
  511. display: flex;
  512. .images {
  513. width: 136rpx;
  514. height: 136rpx;
  515. border-radius: 12rpx;
  516. margin-right: 20rpx;
  517. .image {
  518. border-radius: 12rpx;
  519. // width: 100%;
  520. // height: 100%;
  521. width: 136rpx;
  522. height: 136rpx;
  523. }
  524. }
  525. }
  526. .name {
  527. font-size: 32rpx;
  528. color: #333;
  529. font-weight: bold;
  530. width: 100%;
  531. }
  532. .date {
  533. // padding: 20rpx 0 32rpx;
  534. padding-top: 30rpx;
  535. font-size: 28rpx;
  536. color: #666666;
  537. font-weight: Regular;
  538. }
  539. .topHead {
  540. width: 96%;
  541. margin: 0 auto;
  542. background-color: #F5F8FA;
  543. padding: 28rpx 0 28rpx 84rpx;
  544. border-radius: 16rpx;
  545. position: relative;
  546. text {
  547. position: absolute;
  548. left: 0;
  549. top: 0;
  550. z-index: 1;
  551. border-radius: 16rpx 0 0 16rpx;
  552. width: 48rpx;
  553. color: #fff;
  554. font-size: 20rpx;
  555. background-color: #484F61;
  556. text-align: center;
  557. height: 100%;
  558. padding: 15rpx 10rpx 0;
  559. }
  560. .p {
  561. font-size: 28rpx;
  562. color: #333;
  563. &:nth-of-type(1) {
  564. font-weight: 600;
  565. margin-bottom: 16rpx;
  566. }
  567. }
  568. }
  569. .code {
  570. margin-top: 40rpx;
  571. text-align: center;
  572. position: relative;
  573. .cover,
  574. .sx {
  575. position: absolute;
  576. background-color: rgba(255, 255, 255, 0.5);
  577. width: 340rpx;
  578. height: 340rpx;
  579. top: 66rpx;
  580. left: 50%;
  581. transform: translate(-50%, 0);
  582. }
  583. .sx {
  584. width: 120rpx;
  585. height: 120rpx;
  586. top: 150rpx;
  587. background: transparent;
  588. }
  589. .txt {
  590. font-size: 28rpx;
  591. }
  592. image {
  593. width: 340rpx;
  594. height: 340rpx;
  595. margin: 30rpx 0;
  596. }
  597. }
  598. }
  599. .head {
  600. box-sizing: border-box;
  601. padding: 34rpx 24rpx 60rpx;
  602. display: flex;
  603. position: relative;
  604. z-index: 2;
  605. text {
  606. color: #111111;
  607. &:nth-child(1),
  608. &:nth-child(3) {
  609. font-size: 44rpx;
  610. }
  611. &:nth-child(2) {
  612. flex: 1;
  613. text-align: right;
  614. width: 100px;
  615. font-size: 36rpx;
  616. }
  617. }
  618. }
  619. .btns {
  620. box-sizing: border-box;
  621. width: 100%;
  622. position: fixed;
  623. bottom: 0;
  624. z-index: 4;
  625. left: 0;
  626. display: flex;
  627. padding: 32rpx 32rpx 50rpx;
  628. background-color: #fff;
  629. gap: 0 20rpx;
  630. box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
  631. &>view {
  632. width: calc(50% - 15rpx);
  633. height: 80rpx;
  634. border-radius: 46rpx;
  635. // border: 1rpx solid #999999;
  636. line-height: 80rpx;
  637. text-align: center;
  638. font-size: 28rpx;
  639. font-family: PingFangSC-Regular, PingFang SC;
  640. font-weight: Bold;
  641. color: #111111;
  642. background-color: #F6F6F6;
  643. }
  644. }
  645. </style>