details.vue 14 KB

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