details.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
  3. <c-nav-bar1 title="订单详情"></c-nav-bar1>
  4. <view class="bg"></view>
  5. <view class="content">
  6. <view class="head">
  7. <text v-if="merchantType==10">{{FishJialeOcfg[infoMation.status]}}</text>
  8. <text v-esle>{{FishJialeOcfg2[infoMation.orderStatus]}}</text>
  9. <!-- <view class="time" v-if="merchantType==4">
  10. 有效期:{{infoMation.activityStartTime&&infoMation.activityStartTime.substring(0,10)}}至{{infoMation.activityEndTime&&infoMation.activityEndTime.substring(0,10)}}
  11. </view> -->
  12. <view class="time" v-if="merchantType==4">
  13. 有效期:{{infoMation.activityStartTime}}至{{infoMation.activityEndTime}}
  14. </view>
  15. </view>
  16. <view class="ticketInfo">
  17. <!-- <view class="hander-titles">
  18. <view class="names">
  19. {{list.fishermanName}}
  20. </view>
  21. <view class="rights">
  22. <u-icon name="arrow-right"></u-icon>
  23. </view>
  24. </view> -->
  25. <view v-if="merchantType==10" class="dateAndType">
  26. <u-icon name="calendar" size="40" color="#272636"
  27. style="display: flex;align-items: center;"></u-icon>
  28. <text>{{infoMation.payTime}}出发/{{infoMation.orderType==3?'拼船':'包船'}}</text>
  29. </view>
  30. <view class="ticketInfo-hander">
  31. <view class="image">
  32. <image :src="infoMation.productImg" mode="aspectFill"></image>
  33. </view>
  34. <view class="right">
  35. <view class="name">
  36. {{infoMation.productName}}
  37. </view>
  38. <view class="tip">
  39. <text v-if='infoMation.orderType==3'>价格:¥{{infoMation.avePrice}}/人</text>
  40. <text v-if='infoMation.orderType==2'>价格:¥{{infoMation.totalPrice}}/艘</text>
  41. <text v-if='infoMation.orderType==1'>价格:¥{{infoMation.discountPrice}}/艘</text>
  42. </view>
  43. <view class="price">
  44. <view class="" v-if="merchantType==10">
  45. <text>数量:</text>X<text>{{infoMation.detailDto.length}}</text>
  46. </view>
  47. <view v-else>
  48. <text>{{infoMation.notice}}</text>
  49. <view style="font-size: 30rpx ;color: #111111; font-weight: bold;margin-top: 10rpx;">
  50. ¥{{infoMation.orderAmount}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="foods" v-if="merchantType==4">
  57. <view class="tit">
  58. 套餐明细
  59. </view>
  60. <view class="li" v-for="(item,inex) in infoMation.productsDetail" :key="index">
  61. <text>{{item.name}}</text>
  62. <text>({{item.number}}份)</text>
  63. <text>¥{{item.price}}</text>
  64. </view>
  65. </view>
  66. <!-- 游客信息 -->
  67. <view class="orderInfo yk" style="padding-bottom: 30rpx;" v-if="merchantType==10">
  68. <view class="tit">游客信息</view>
  69. <u-cell :border="false" v-for="(i,index) in infoMation.detailDto">
  70. <text slot="icon" class="txt">{{i.touristName}}</text>
  71. >
  72. <text slot="title" class="val">{{i.touristCode}}</text>
  73. <text slot="right-icon">航班号:{{infoMation.boatNo||''}}</text>
  74. </u-cell>
  75. </view>
  76. <!-- 订单信息 -->
  77. <view class="orderInfo " style="padding-bottom: 30rpx;">
  78. <view class="tit">订单信息</view>
  79. <u-cell :border="false">
  80. <text slot="icon" class="txt">订单编号</text>
  81. >
  82. <text slot="title" class="val">{{infoMation.orderCode}}</text>
  83. <text slot="right-icon" class="icon"
  84. style="border: 1rpx solid #007A69; border-radius: 50rpx; box-sizing: border-box; color: #007A69;padding: 2rpx 10rpx; font-size: 22rpx; font-weight: Regular;"
  85. @tap="copyOrderNo()">复制</text>
  86. </u-cell>
  87. <template v-if="merchantType==4">
  88. <u-cell :border="false">
  89. <text slot="icon" class="txt">付款时间</text>
  90. >
  91. <text slot="title" class="val">{{infoMation.orderTime}}</text>
  92. </u-cell>
  93. <u-cell :border="false">
  94. <text slot="icon" class="txt">订单总价</text>
  95. >
  96. <text slot="title" class="val">{{infoMation.realityPay}}</text>
  97. </u-cell>
  98. <u-cell :border="false">
  99. <text slot="icon" class="txt">实际付款</text>
  100. >
  101. <text slot="title" class="val">{{infoMation.realityPay}}</text>
  102. </u-cell>
  103. <u-cell :border="false">
  104. <text slot="icon" class="txt">联系方式</text>
  105. >
  106. <text slot="title" class="val">{{infoMation.guestPhone}}</text>
  107. </u-cell>
  108. </template>
  109. <template v-if="merchantType==10">
  110. <u-cell :border="false">
  111. <text slot="icon" class="txt">下单时间</text>
  112. >
  113. <text slot="title" class="val">{{infoMation.orderTime}}</text>
  114. </u-cell>
  115. <u-cell :border="false">
  116. <text slot="icon" class="txt">下单时间</text>
  117. >
  118. <text slot="title" class="val">{{infoMation.linkName}}</text>
  119. </u-cell>
  120. <u-cell :border="false">
  121. <text slot="icon" class="txt">联系方式</text>
  122. >
  123. <text slot="title" class="val">{{infoMation.linkPhone}}</text>
  124. </u-cell>
  125. <u-cell :border="false">
  126. <text slot="icon" class="txt">支付方式</text>
  127. >
  128. <text slot="title" class="val">{{infoMation.payType==1?'微信':'支付宝'}}</text>
  129. </u-cell>
  130. <u-cell :border="false">
  131. <text slot="icon" class="txt">总计</text>
  132. >
  133. <text slot="title" class="val" style="color: #111">{{infoMation.totalPrice}}</text>
  134. </u-cell>
  135. </template>
  136. </view>
  137. </view>
  138. <!-- 餐饮 -->
  139. <view class="btns" v-if="merchantType==4&&infoMation.orderStatus==4">
  140. <view class="detail del" @tap="hexiao2()" v-if="infoMation.orderStatus==4">
  141. 核销订单
  142. </view>
  143. <!-- <template v-else>
  144. <view class="detail" @tap="Detail(list)">
  145. 删除订单
  146. </view>
  147. </template> -->
  148. </view>
  149. <view class="btns" v-if="merchantType==10&&infoMation.status==1">
  150. <view class="detail del" @tap="hexiao()" v-if="infoMation.status==1">
  151. 核销订单
  152. </view>
  153. <!-- <template v-else>
  154. <view class="detail" @tap="Detail(list)">
  155. 删除订单
  156. </view>
  157. </template> -->
  158. </view>
  159. </view>
  160. </template>
  161. <script>
  162. export default {
  163. data() {
  164. return {
  165. merchantType: uni.getStorageSync('merchantType'),
  166. merchantId: uni.getStorageSync('merchantId'),
  167. //渔家乐
  168. FishJialeOcfg: {
  169. 0: '待支付',
  170. 1: '待使用',
  171. 2: '拼船中',
  172. 3: '已使用',
  173. 4: '退款中',
  174. 5: '已退款',
  175. 6: '已取消',
  176. 7: '已完成',
  177. 8: '拼团失败'
  178. },
  179. //餐饮
  180. FishJialeOcfg2: {
  181. 0: '待支付',
  182. 4: '待使用',
  183. 3: '已完成',
  184. '-1': '已取消',
  185. '-2': '退款中',
  186. '-3': '已退款',
  187. },
  188. list: {},
  189. infoMation: {},
  190. orderCode: '',
  191. }
  192. },
  193. onLoad(opt) {
  194. this.orderCode = opt.orderCode;
  195. if (this.merchantType == 10) {
  196. this.info()
  197. } else {
  198. this.info2()
  199. }
  200. },
  201. filters: {
  202. delArr(val) {
  203. if (val) {
  204. return val.split(',')[0]
  205. }
  206. }
  207. },
  208. methods: {
  209. init() {
  210. if (this.merchantType == 10) {
  211. this.info()
  212. } else {
  213. this.info2()
  214. }
  215. },
  216. //渔家乐
  217. info() {
  218. this.$api.get('/api/fishering/personCenterOrderDetail/' + this.orderCode).then(res => {
  219. console.log(res)
  220. if (res.data.code == 0) {
  221. this.infoMation = res.data.data;
  222. }
  223. })
  224. },
  225. //餐饮
  226. info2() {
  227. this.$api.get('/api/merchant/food/queryOrderDetail', {
  228. orderCode: this.orderCode
  229. }).then(res => {
  230. if (res.data.code == 0) {
  231. this.infoMation = res.data.data;
  232. this.infoMation.productsDetail = JSON.parse(res.data.data.productsDetail);
  233. }
  234. })
  235. },
  236. copyOrderNo() {
  237. let that = this;
  238. // #ifdef H5
  239. this.$copyText(this.infoMation.orderCode).then(res => {
  240. this.$showToast('复制成功');
  241. })
  242. // #endif
  243. // #ifdef MP-WEIXIN
  244. uni.setClipboardData({
  245. data: this.infoMation.orderCode,
  246. success(res) {
  247. that.$showToast('复制成功');
  248. },
  249. fail(err) {
  250. that.$showToast('复制失败');
  251. }
  252. })
  253. // #endif
  254. },
  255. hexiao() {
  256. let that = this;
  257. uni.showModal({
  258. title: '提示',
  259. content: '确定核销订单?',
  260. success: function(res) {
  261. if (res.confirm) {
  262. that.$api.get('/scenic/order/orderWriteOff/' + this.infoMation.orderCode).then(
  263. res => {
  264. if (res.data.code === 0) {
  265. that.$showToast('订单已核销');
  266. that.init();
  267. } else that.$showToast(res.data.msg)
  268. })
  269. }
  270. }
  271. });
  272. },
  273. // 核销
  274. hexiao2() {
  275. let that = this;
  276. uni.showModal({
  277. title: '提示',
  278. content: '确定核销订单?',
  279. success: function(res) {
  280. if (res.confirm) {
  281. that.$api.post('/api/merchant/food/scenic/merchant/order/verifyOrderQrCode', {
  282. merchantId: that.merchantId,
  283. orderCode: that.infoMation.orderCode,
  284. type: 4
  285. }).then(res => {
  286. if (res.data.code === 0) {
  287. that.$showToast('订单已核销');
  288. that.init();
  289. } else that.$showToast(res.data.msg)
  290. })
  291. }
  292. }
  293. });
  294. },
  295. }
  296. }
  297. </script>
  298. <style lang="scss" scoped>
  299. * {
  300. margin: 0;
  301. padding: 0;
  302. box-sizing: border-box;
  303. }
  304. .bg {
  305. height: 100%;
  306. position: fixed;
  307. z-index: 1;
  308. width: 100%;
  309. background-image: linear-gradient(to bottom, #007A69, #F5F8FA, #F5F8FA);
  310. }
  311. .content {
  312. position: relative;
  313. z-index: 99;
  314. }
  315. .page {
  316. box-sizing: border-box;
  317. // height: 100%;
  318. background-color: #007A69;
  319. padding-bottom: 170rpx;
  320. }
  321. .foods {
  322. padding: 0 20rpx 10rpx;
  323. background: #fff;
  324. border-radius: 16rpx;
  325. margin: 0 20rpx 20rpx;
  326. .tit {
  327. padding-top: 54rpx;
  328. font-family: PingFang-SC, PingFang-SC;
  329. font-weight: bold;
  330. font-size: 36rpx;
  331. color: #111111;
  332. line-height: 40rpx;
  333. text-align: left;
  334. font-style: normal;
  335. margin-bottom: 36rpx;
  336. }
  337. .li {
  338. display: flex;
  339. justify-content: space-between;
  340. align-items: center;
  341. margin-bottom: 24rpx;
  342. text {
  343. font-size: 26rpx;
  344. color: #111;
  345. &:first-child {
  346. width: 200rpx;
  347. }
  348. &:nth-child(2) {
  349. color: #999;
  350. text-align: right;
  351. display: inline-block;
  352. flex: 1;
  353. margin-right: 60rpx;
  354. }
  355. }
  356. }
  357. }
  358. .ticketInfo-demo {
  359. // border-bottom: 2rpx solid #EFEFEF;
  360. margin-top: 40rpx;
  361. .demo-layout {
  362. display: flex;
  363. align-items: center;
  364. text-align: center;
  365. margin: 0 80rpx;
  366. }
  367. }
  368. .orderInfo {
  369. box-sizing: border-box;
  370. background-color: #fff;
  371. border-radius: 16rpx;
  372. width: 96%;
  373. margin: 0 auto 20rpx;
  374. .tit {
  375. font-size: 32rpx;
  376. color: #333;
  377. padding-left: 30rpx;
  378. padding-top: 40rpx;
  379. font-weight: 600;
  380. margin-bottom: 20rpx;
  381. }
  382. .txt {
  383. font-size: 28rpx;
  384. color: #808080;
  385. width: 115rpx;
  386. font-weight: Regular;
  387. }
  388. .icon {
  389. font-size: 28rpx;
  390. color: #333;
  391. font-weight: Regular;
  392. }
  393. .val {
  394. font-size: 28rpx;
  395. color: #333;
  396. font-weight: Regular;
  397. margin: 0 20rpx 0 30rpx;
  398. }
  399. &.yk {
  400. .txt,
  401. .icon,
  402. .val {
  403. font-size: 30rpx;
  404. color: #333;
  405. }
  406. }
  407. }
  408. .ticketInfo {
  409. box-sizing: border-box;
  410. width: 96%;
  411. margin: 0 auto 20rpx;
  412. padding: 33rpx 24rpx;
  413. border-radius: 20rpx;
  414. position: relative;
  415. background-color: #fff;
  416. z-index: 2;
  417. .dateAndType {
  418. height: 36rpx;
  419. font-family: PingFang-SC, PingFang-SC;
  420. font-weight: bold;
  421. font-size: 32rpx;
  422. color: #333333;
  423. line-height: 36rpx;
  424. margin-bottom: 48rpx;
  425. display: flex;
  426. align-items: center;
  427. }
  428. .hander-titles {
  429. display: flex;
  430. height: 32rpx;
  431. line-height: 32rpx;
  432. margin: 20rpx 0 30rpx 0;
  433. .image {
  434. width: 32rpx;
  435. height: 32rpx;
  436. border-radius: 16rpx;
  437. image {
  438. width: 100%;
  439. height: 100%;
  440. }
  441. }
  442. .names {
  443. font-size: 32rpx;
  444. color: #333333;
  445. font-weight: Bold;
  446. margin: 0rpx 16rpx 0rpx 10rpx;
  447. }
  448. }
  449. .ticketInfo-hander {
  450. display: flex;
  451. .image {
  452. width: 136rpx;
  453. min-width: 136rpx;
  454. height: 136rpx;
  455. border-radius: 12rpx;
  456. margin-right: 20rpx;
  457. image {
  458. border-radius: 12rpx;
  459. width: 100%;
  460. height: 100%;
  461. }
  462. }
  463. }
  464. .name {
  465. font-size: 30rpx;
  466. line-height: 30rpx;
  467. color: #333;
  468. font-weight: bold;
  469. width: 100%;
  470. }
  471. .tip {
  472. margin: 16rpx 0 20rpx;
  473. color: #777;
  474. }
  475. .price {
  476. text {
  477. font-size: 30rpx;
  478. &:first-child {
  479. font-size: 24rpx;
  480. }
  481. }
  482. }
  483. .date {
  484. // padding: 20rpx 0 32rpx;
  485. padding-top: 20rpx;
  486. text {
  487. font-size: 26rpx;
  488. &:nth-child(1) {
  489. color: #808080;
  490. }
  491. &:nth-child(2) {
  492. color: #FF7D01;
  493. margin-left: 30rpx;
  494. }
  495. }
  496. }
  497. .code {
  498. margin-top: 40rpx;
  499. text-align: center;
  500. position: relative;
  501. .cover,
  502. .sx {
  503. position: absolute;
  504. background-color: rgba(255, 255, 255, 0.5);
  505. width: 340rpx;
  506. height: 340rpx;
  507. top: 66rpx;
  508. left: 50%;
  509. transform: translate(-50%, 0);
  510. }
  511. .sx {
  512. width: 120rpx;
  513. height: 120rpx;
  514. top: 150rpx;
  515. background: transparent;
  516. }
  517. .txt {
  518. font-size: 28rpx;
  519. }
  520. image {
  521. width: 340rpx;
  522. height: 340rpx;
  523. margin: 30rpx 0;
  524. }
  525. }
  526. }
  527. .head {
  528. box-sizing: border-box;
  529. padding: 37rpx 40rpx 30rpx;
  530. color: #fff;
  531. text {
  532. font-size: 44rpx;
  533. font-weight: Bold;
  534. }
  535. .time {
  536. margin-top: 18rpx;
  537. font-size: 28rpx;
  538. }
  539. }
  540. .btns {
  541. box-sizing: border-box;
  542. width: 100%;
  543. position: fixed;
  544. bottom: 0;
  545. z-index: 999;
  546. left: 0;
  547. display: flex;
  548. padding: 32rpx 32rpx 50rpx;
  549. background-color: #fff;
  550. gap: 0 20rpx;
  551. box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
  552. &>view {
  553. // width: calc(50% - 15rpx);
  554. width: 100%;
  555. height: 80rpx;
  556. border-radius: 46rpx;
  557. // border: 1rpx solid #999999;
  558. line-height: 80rpx;
  559. text-align: center;
  560. font-size: 28rpx;
  561. font-family: PingFangSC-Regular, PingFang SC;
  562. font-weight: Bold;
  563. color: #FFFFFF;
  564. // background-color: #F6F6F6;
  565. background-color: #007A69;
  566. }
  567. }
  568. </style>