details.vue 15 KB

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