orderDetails.vue 13 KB

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