orderDetails.vue 14 KB

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