details.vue 14 KB

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