orderDetails.vue 14 KB

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