details.vue 14 KB

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