details.vue 14 KB

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