details.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. <text style="font-size: 30rpx;">数量:</text>X<text>{{infoMation.detailDto&&infoMation.detailDto.length}}</text>
  43. </view>
  44. </template>
  45. <template v-if="merchantType==4">
  46. <view class="tip">
  47. <text>周一至周日 · 无需预约</text>
  48. </view>
  49. <view class="price">
  50. <text>¥</text><text>{{infoMation.realityPay}}</text>
  51. </view>
  52. </template>
  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.phone}}</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(res => {
  263. if (res.data.code === 0) {
  264. that.$showToast('订单已核销');
  265. that.init();
  266. } else that.$showToast(res.data.msg)
  267. })
  268. }
  269. }
  270. });
  271. },
  272. // 核销
  273. hexiao2() {
  274. let that = this;
  275. uni.showModal({
  276. title: '提示',
  277. content: '确定核销订单?',
  278. success: function(res) {
  279. if (res.confirm) {
  280. that.$api.post('/api/merchant/food/scenic/merchant/order/verifyOrderQrCode', {
  281. merchantId: that.merchantId,
  282. orderCode: that.infoMation.orderCode,
  283. type: 4
  284. }).then(res => {
  285. if (res.data.code === 0) {
  286. that.$showToast('订单已核销');
  287. that.init();
  288. } else that.$showToast(res.data.msg)
  289. })
  290. }
  291. }
  292. });
  293. },
  294. }
  295. }
  296. </script>
  297. <style lang="scss" scoped>
  298. * {
  299. margin: 0;
  300. padding: 0;
  301. box-sizing: border-box;
  302. }
  303. .bg {
  304. height: 100%;
  305. position: fixed;
  306. z-index: 1;
  307. width: 100%;
  308. background-image: linear-gradient(to bottom, #007A69, #F5F8FA, #F5F8FA);
  309. }
  310. .content {
  311. position: relative;
  312. z-index: 99;
  313. }
  314. .page {
  315. box-sizing: border-box;
  316. // height: 100%;
  317. background-color: #007A69;
  318. padding-bottom: 170rpx;
  319. }
  320. .foods {
  321. padding: 0 20rpx 10rpx;
  322. background: #fff;
  323. border-radius: 16rpx;
  324. margin: 0 20rpx 20rpx;
  325. .tit {
  326. padding-top: 54rpx;
  327. font-family: PingFang-SC, PingFang-SC;
  328. font-weight: bold;
  329. font-size: 36rpx;
  330. color: #111111;
  331. line-height: 40rpx;
  332. text-align: left;
  333. font-style: normal;
  334. margin-bottom: 36rpx;
  335. }
  336. .li {
  337. display: flex;
  338. justify-content: space-between;
  339. align-items: center;
  340. margin-bottom: 24rpx;
  341. text {
  342. font-size: 26rpx;
  343. color: #111;
  344. &:first-child {
  345. width: 160rpx;
  346. }
  347. &:nth-child(2) {
  348. color: #999;
  349. text-align: right;
  350. display: inline-block;
  351. flex: 1;
  352. margin-right: 30rpx;
  353. }
  354. }
  355. }
  356. }
  357. .ticketInfo-demo {
  358. // border-bottom: 2rpx solid #EFEFEF;
  359. margin-top: 40rpx;
  360. .demo-layout {
  361. display: flex;
  362. align-items: center;
  363. text-align: center;
  364. margin: 0 80rpx;
  365. }
  366. }
  367. .orderInfo {
  368. box-sizing: border-box;
  369. background-color: #fff;
  370. border-radius: 16rpx;
  371. width: 96%;
  372. margin: 0 auto 20rpx;
  373. .tit {
  374. font-size: 32rpx;
  375. color: #333;
  376. padding-left: 30rpx;
  377. padding-top: 40rpx;
  378. font-weight: 600;
  379. margin-bottom: 20rpx;
  380. }
  381. .txt {
  382. font-size: 28rpx;
  383. color: #808080;
  384. width: 115rpx;
  385. font-weight: Regular;
  386. }
  387. .icon {
  388. font-size: 28rpx;
  389. color: #333;
  390. font-weight: Regular;
  391. }
  392. .val {
  393. font-size: 28rpx;
  394. color: #333;
  395. font-weight: Regular;
  396. margin: 0 20rpx 0 30rpx;
  397. }
  398. &.yk{
  399. .txt,.icon,.val {font-size: 30rpx;color: #333;}
  400. }
  401. }
  402. .ticketInfo {
  403. box-sizing: border-box;
  404. width: 96%;
  405. margin: 0 auto 20rpx;
  406. padding: 33rpx 24rpx;
  407. border-radius: 20rpx;
  408. position: relative;
  409. background-color: #fff;
  410. z-index: 2;
  411. .dateAndType {
  412. height: 36rpx;
  413. font-family: PingFang-SC, PingFang-SC;
  414. font-weight: bold;
  415. font-size: 32rpx;
  416. color: #333333;
  417. line-height: 36rpx;
  418. margin-bottom: 48rpx;
  419. display: flex;
  420. align-items: center;
  421. }
  422. .hander-titles {
  423. display: flex;
  424. height: 32rpx;
  425. line-height: 32rpx;
  426. margin: 20rpx 0 30rpx 0;
  427. .image {
  428. width: 32rpx;
  429. height: 32rpx;
  430. border-radius: 16rpx;
  431. image {
  432. width: 100%;
  433. height: 100%;
  434. }
  435. }
  436. .names {
  437. font-size: 32rpx;
  438. color: #333333;
  439. font-weight: Bold;
  440. margin: 0rpx 16rpx 0rpx 10rpx;
  441. }
  442. }
  443. .ticketInfo-hander {
  444. display: flex;
  445. .image {
  446. width: 136rpx;
  447. min-width: 136rpx;
  448. height: 136rpx;
  449. border-radius: 12rpx;
  450. margin-right: 20rpx;
  451. image {
  452. border-radius: 12rpx;
  453. width: 100%;
  454. height: 100%;
  455. }
  456. }
  457. }
  458. .name {
  459. font-size: 30rpx;
  460. line-height: 30rpx;
  461. color: #333;
  462. font-weight: bold;
  463. width: 100%;
  464. }
  465. .tip {
  466. margin: 16rpx 0 20rpx;
  467. color: #777;
  468. }
  469. .price {
  470. text {
  471. font-size: 30rpx;
  472. &:first-child {
  473. font-size: 24rpx;
  474. }
  475. }
  476. }
  477. .date {
  478. // padding: 20rpx 0 32rpx;
  479. padding-top: 20rpx;
  480. text {
  481. font-size: 26rpx;
  482. &:nth-child(1) {
  483. color: #808080;
  484. }
  485. &:nth-child(2) {
  486. color: #FF7D01;
  487. margin-left: 30rpx;
  488. }
  489. }
  490. }
  491. .code {
  492. margin-top: 40rpx;
  493. text-align: center;
  494. position: relative;
  495. .cover,
  496. .sx {
  497. position: absolute;
  498. background-color: rgba(255, 255, 255, 0.5);
  499. width: 340rpx;
  500. height: 340rpx;
  501. top: 66rpx;
  502. left: 50%;
  503. transform: translate(-50%, 0);
  504. }
  505. .sx {
  506. width: 120rpx;
  507. height: 120rpx;
  508. top: 150rpx;
  509. background: transparent;
  510. }
  511. .txt {
  512. font-size: 28rpx;
  513. }
  514. image {
  515. width: 340rpx;
  516. height: 340rpx;
  517. margin: 30rpx 0;
  518. }
  519. }
  520. }
  521. .head {
  522. box-sizing: border-box;
  523. padding: 37rpx 40rpx 30rpx;
  524. color: #fff;
  525. text {
  526. font-size: 44rpx;
  527. font-weight: Bold;
  528. }
  529. .time {
  530. margin-top: 18rpx;
  531. font-size: 28rpx;
  532. }
  533. }
  534. .btns {
  535. box-sizing: border-box;
  536. width: 100%;
  537. position: fixed;
  538. bottom: 0;
  539. z-index: 999;
  540. left: 0;
  541. display: flex;
  542. padding: 32rpx 32rpx 50rpx;
  543. background-color: #fff;
  544. gap: 0 20rpx;
  545. box-shadow: 0 -8rpx 16rpx rgba(0, 0, 0, 0.06);
  546. &>view {
  547. // width: calc(50% - 15rpx);
  548. width: 100%;
  549. height: 80rpx;
  550. border-radius: 46rpx;
  551. // border: 1rpx solid #999999;
  552. line-height: 80rpx;
  553. text-align: center;
  554. font-size: 28rpx;
  555. font-family: PingFangSC-Regular, PingFang SC;
  556. font-weight: Bold;
  557. color: #FFFFFF;
  558. // background-color: #F6F6F6;
  559. background-color: #007A69;
  560. }
  561. }
  562. </style>