details.vue 15 KB

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