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