orderDetails.vue 13 KB

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