details.vue 12 KB

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