details.vue 13 KB

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