detail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. <template>
  2. <view class="container mine clearfix">
  3. <!-- <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom> -->
  4. <view class="tui-header-box first"
  5. :style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 10 + 'px' : CustomBar + 30 + 'px' }"
  6. :class="isCmcustomClass">
  7. <view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 30 + 'px' }"></view>
  8. <view class="header-sit">
  9. <text class="iconfont icon-shouye1" v-if="isShareType" @click.stop="this.$api.navigateLinkJump()"></text>
  10. <text class="iconfont icon-fanhui" v-else @click.stop="this.$api.navigateBack(1)"></text>
  11. <text class="header-sit-text">供应商退款详情</text>
  12. </view>
  13. </view>
  14. <view class="tui-header-box"
  15. :style="{ height: CustomBar + 30 + 'px', backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)' }">
  16. </view>
  17. <tui-skeleton
  18. v-if="skeletonShow"
  19. backgroundColor="#fafafa"
  20. borderRadius="10rpx"
  21. :isLoading="true"
  22. :loadingType="7"
  23. ></tui-skeleton>
  24. <view class="distinguish-section" :style="{ top: CustomBar - 4 + 'px', left: 0 + 'px' }">
  25. <view class="distinguish-section-conten">
  26. <view class="section-top">
  27. <view class="title">
  28. <view class="title-text">收款信息</view>
  29. </view>
  30. <!-- <view class="button" @click="toNoSms('/pages/collection/list')">
  31. <text class="iconfont icon-wodedingdan"></text>
  32. 收款列表
  33. </view> -->
  34. </view>
  35. <view class="section-top-item">
  36. <view class="list-title-t">
  37. <view class="list-title-tip">
  38. <text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}</text>
  39. </view>
  40. </view>
  41. <view class="list-title-b">
  42. 收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
  43. </view>
  44. <view class="list-title-b">
  45. 收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
  46. </view>
  47. <view class="list-title-b">
  48. 款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
  49. </view>
  50. <view class="list-title-b">收款短信:</view>
  51. <view class="list-title-b sms">
  52. <text class="text">{{ receiptInfo.smsContent ? receiptInfo.smsContent : '无' }}</text>
  53. </view>
  54. </view>
  55. <view class="section-title">关联订单</view>
  56. <view class="section-mid">
  57. <view
  58. class="tui-order-item"
  59. v-for="(order, index) in orderList"
  60. :key="index"
  61. >
  62. <view class="list-title" @click.stop="orderDetail(order.mainOrder.orderId)">
  63. <view class="list-title-t">
  64. <view class="list-title-tip">
  65. <text class="badges">{{ order.mainOrder.orderType | formatOrderType }}</text>
  66. </view>
  67. <view class="list-title-tag" v-if="order.mainOrder.organizeId == 3">
  68. <text class="badges">维沙</text>
  69. </view>
  70. <view class="list-title-num">{{ order.mainOrder.status | stateExpFormat }}</view>
  71. </view>
  72. <view class="list-title-a">
  73. <view class="list-title-a-text">
  74. 子订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
  75. </view>
  76. <view class="list-title-a-text">
  77. 供应商名称:<text class="text">{{ order.shopName }}</text>
  78. </view>
  79. <view class="list-title-a-text">
  80. 订单金额:<text class="text">¥{{ order.needPayAmount | NumFormat }}</text>
  81. </view>
  82. </view>
  83. <view class="list-title-b">
  84. 客户名称:<text class="text">{{ order.mainOrder.userName ? order.mainOrder.userName : '无' }}</text>
  85. </view>
  86. <view class="list-title-b">
  87. 订单编号:<text class="text">{{ order.mainOrder.orderNo }} ( {{ order.mainOrder.orderId }} )</text>
  88. </view>
  89. <view class="list-title-b">
  90. 下单日期:<text class="text">{{ order.mainOrder.orderTime }}</text>
  91. </view>
  92. <view class="list-title-b">
  93. <view class="list-title-b-item ">
  94. 订单金额:<text class="text">¥{{ order.mainOrder.payTotalFee | NumFormat }}</text>
  95. </view>
  96. <view class="list-title-b-item ">
  97. 已收金额:<text class="text">¥{{ order.mainOrder.paidAmount | NumFormat }}</text>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="list-detail" @click.stop="orderDetail(order.mainOrder.orderId)">
  102. <text class="iconfont icon-xiayibu"></text>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="section-title">状态</view>
  107. <view class="section-mid">
  108. <view class="list-title">
  109. <view class="list-title-b">进度:<text
  110. :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{ receiptInfo.receiptStatusText }}</text>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- 弹窗提示 -->
  117. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :title="contentModalTitle"
  118. :content="contentModalText" :button="modalButton" color="#333" :size="32" shape="circle"
  119. :maskClosable="false">
  120. </tui-modal>
  121. </view>
  122. </template>
  123. <script>
  124. import wxLogin from '@/services/wxLogin.js'
  125. import {
  126. mapState,
  127. mapMutations
  128. } from 'vuex'
  129. export default {
  130. data() {
  131. return {
  132. isIphoneX: this.$store.state.isIphoneX,
  133. CustomBar: this.CustomBar, // 顶部导航栏高度
  134. height: 64, //header高度
  135. top: 0, //标题图标距离顶部距离
  136. scrollH: 0, //滚动总高度
  137. opcity: 1,
  138. isCmcustomClass: 'left',
  139. skeletonShow:true,
  140. orderList:[],
  141. listQuery:{
  142. pageNum: 1, //页数
  143. pageSize: 10, //条数
  144. id: 0,
  145. shopName: '',
  146. },
  147. nvabarData: {
  148. //顶部自定义导航
  149. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  150. showSearch: 0,
  151. title: '', // 导航栏 中间的标题
  152. haveBack: false,
  153. home: false,
  154. textLeft: this.$store.state.isIphone,
  155. bgColor: '#D33020',
  156. textColor: '#ffffff'
  157. },
  158. receiptInfo: {},
  159. receiptId: 0,
  160. isShareType: false
  161. }
  162. },
  163. onLoad(option) {
  164. let obj = {}
  165. // #ifdef MP-WEIXIN
  166. obj = wx.getMenuButtonBoundingClientRect()
  167. // #endif
  168. // #ifdef MP-BAIDU
  169. obj = swan.getMenuButtonBoundingClientRect()
  170. // #endif
  171. // #ifdef MP-ALIPAY
  172. my.hideAddToDesktopMenu()
  173. // #endif
  174. uni.getSystemInfo({
  175. success: res => {
  176. this.width = obj.left || res.windowWidth
  177. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  178. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  179. this.scrollH = res.windowWidth * 0.6
  180. }
  181. })
  182. if(option.type == 'share'){ this.isShareType = true }
  183. this.receiptId = this.listQuery.id = option.id
  184. this.getOrderReceiptDetail(this.receiptId)
  185. this.getOrderReceiptRebateOrders()
  186. },
  187. computed: {
  188. ...mapState(['hasLogin'])
  189. },
  190. methods: {
  191. getOrderReceiptDetail(id) {
  192. // 收款详情
  193. this.OrderService.orderReceiptRefundDetail({ id: id })
  194. .then(response => {
  195. this.receiptInfo = response.data
  196. })
  197. .catch(err => {
  198. this.$api.navigateTo('/pages/login/login-error')
  199. })
  200. },
  201. getOrderReceiptRebateOrders() {// 收款详情-订单列表
  202. this.OrderService.orderReceiptRebateOrders(this.listQuery)
  203. .then(response => {
  204. let data = response.data
  205. if (data.list && data.list.length > 0) {
  206. this.orderList = data.list
  207. }
  208. setTimeout(()=>{
  209. this.skeletonShow = false
  210. },1000)
  211. })
  212. .catch(err => {
  213. this.$util.msg(err.msg, 2000)
  214. })
  215. },
  216. orderDetail(orderId) {
  217. //订单详情跳转
  218. this.isModalLayer = true
  219. this.$api.navigateTo(`/pages/relation/order/detail?orderId=${orderId}`)
  220. },
  221. toNoSms(url) {
  222. this.$api.navigateTo(url)
  223. },
  224. formatColor(state) {
  225. //设置邀请码状态亚瑟
  226. let stateColor = '',
  227. stateColorObject = {
  228. 1: '#ff7900',
  229. 2: '#4cd964',
  230. 3: '#19be6b',
  231. 4: '#ed3f14',
  232. 5: '#F74D54'
  233. }
  234. Object.keys(stateColorObject).forEach(function(key) {
  235. if (key == state) {
  236. stateColor = stateColorObject[key]
  237. }
  238. })
  239. return stateColor
  240. },
  241. formatReceiptType(value) {
  242. //订单状态文字和颜色
  243. var HtmlStateText = '',
  244. stateTextObject = {
  245. 1: '订单款',
  246. 2: '非订单款',
  247. 3: '返佣款',
  248. 4: '订单款或者非订单款',
  249. 5: '供应商退款'
  250. }
  251. Object.keys(stateTextObject).forEach(function(key) {
  252. if (key == value) {
  253. HtmlStateText = stateTextObject[key]
  254. }
  255. })
  256. return HtmlStateText
  257. },
  258. },
  259. onPageScroll(e) {
  260. //实时获取到滚动的值
  261. // if (e.scrollTop > 30) {
  262. // this.isCmcustomClass = 'fiexd'
  263. // } else {
  264. // this.isCmcustomClass = 'left'
  265. // }
  266. },
  267. onPullDownRefresh() {
  268. setTimeout(() => {
  269. this.getOrderReceiptDetail(this.receiptId)
  270. uni.stopPullDownRefresh()
  271. }, 200)
  272. },
  273. onShareAppMessage(res) {
  274. //分享购买优惠券
  275. const receipt = this.receiptInfo
  276. const receiptTypeText = this.formatReceiptType(receipt.receiptType)
  277. if (res.from === 'button') {
  278. // console.log('来自页面内转发按钮')
  279. }
  280. return {
  281. title: `【${receipt.receiptStatusText}[${receiptTypeText}]】收款金额${receipt.receiptAmount.toFixed(2)}元,收款时间:${receipt.receiptDate}`,
  282. path: `/pages/login/login-share?id=${receipt.id}`,
  283. imageUrl: 'https://static.caimei365.com/app/crm/image/icon-share@2x.jpg'
  284. }
  285. },
  286. onShow() {
  287. }
  288. }
  289. </script>
  290. <style lang="scss">
  291. @import '@/uni.scss';
  292. page {
  293. background: #fff;
  294. }
  295. .tui-header-box {
  296. width: 100%;
  297. background: #ffffff;
  298. z-index: 999;
  299. background-size: cover;
  300. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  301. &.fiexd {
  302. position: fixed;
  303. top: 0;
  304. left: 0;
  305. }
  306. }
  307. .header-top {
  308. width: 100%;
  309. font-size: 16px;
  310. font-weight: 500;
  311. height: 32px;
  312. display: flex;
  313. align-items: center;
  314. justify-content: center;
  315. position: relative;
  316. padding: 0 40rpx;
  317. }
  318. .header-sit {
  319. width: 100%;
  320. box-sizing: border-box;
  321. height: 80rpx;
  322. line-height: 80rpx;
  323. box-sizing: border-box;
  324. color: #ffffff;
  325. .header-sit-text {
  326. text-align: left;
  327. font-size: $font-size-40;
  328. font-weight: 600;
  329. font-family: '正楷';
  330. }
  331. .iconfont {
  332. display: block;
  333. width: 80rpx;
  334. height: 80rpx;
  335. float: left;
  336. text-align: center;
  337. line-height: 80rpx;
  338. font-size: 42rpx;
  339. }
  340. .icon-iconfonticonfontsousuo1 {
  341. font-size: 42rpx;
  342. margin-left: 30rpx;
  343. }
  344. }
  345. .mine {
  346. width: 100%;
  347. height: 100%;
  348. position: relative;
  349. }
  350. .distinguish-section {
  351. width: 100%;
  352. position: absolute;
  353. padding: 40rpx 20rpx;
  354. box-sizing: border-box;
  355. }
  356. .distinguish-section-conten {
  357. width: 100%;
  358. height: auto;
  359. position: relative;
  360. background-color: #ffffff;
  361. border-radius: 20rpx;
  362. padding: 20rpx;
  363. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  364. .section-top {
  365. width: 100%;
  366. height: 66rpx;
  367. box-sizing: border-box;
  368. .title {
  369. float: left;
  370. height: 66rpx;
  371. padding: 13rpx 0;
  372. .title-text{
  373. float: left;
  374. line-height: 40rpx;
  375. height: 40rpx;
  376. color: #333333;
  377. text-align: left;
  378. font-weight: 600;
  379. font-size: $font-size-30;
  380. }
  381. }
  382. .button {
  383. float: right;
  384. box-sizing: border-box;
  385. padding: 0 24rpx;
  386. height: 100%;
  387. line-height: 66rpx;
  388. background: $btn-confirm;
  389. border-radius: 8rpx;
  390. text-align: center;
  391. color: #ffffff;
  392. }
  393. }
  394. .section-top-item {
  395. width: 100%;
  396. height: auto;
  397. margin-top: 10rpx;
  398. position: relative;
  399. float: left;
  400. .list-title-t {
  401. width: 100%;
  402. height: 50rpx;
  403. float: left;
  404. font-size: $font-size-28;
  405. padding-bottom: 10rpx;
  406. .list-title-tip {
  407. float: left;
  408. .badges {
  409. display: block;
  410. float: left;
  411. padding: 0 15rpx;
  412. height: 40rpx;
  413. line-height: 40rpx;
  414. border-radius: 4rpx;
  415. background: $btn-confirm;
  416. font-size: $font-size-24;
  417. text-align: center;
  418. color: #ffffff;
  419. }
  420. }
  421. }
  422. .list-title-b {
  423. width: 100%;
  424. height: 44rpx;
  425. float: left;
  426. font-size: $font-size-24;
  427. line-height: 44rpx;
  428. color: #666666;
  429. text-align: left;
  430. .text{
  431. color: #999999;
  432. }
  433. .list-title-b-item {
  434. width: 50%;
  435. height: 100%;
  436. float: left;
  437. }
  438. &.sms {
  439. height: auto;
  440. padding: 10rpx;
  441. border-radius: 4rpx;
  442. background: #F7F7F7;
  443. }
  444. }
  445. .list-icon {
  446. width: 120rpx;
  447. height: 60rpx;
  448. border: 1px solid #e1e1e1;
  449. border-radius: 10rpx;
  450. text-align: center;
  451. font-size: 20rpx;
  452. line-height: 60rpx;
  453. position: absolute;
  454. right: 90rpx;
  455. top: 40rpx;
  456. color: #dd524d;
  457. z-index: 99;
  458. transform: rotate(45deg);
  459. -webkit-transform: rotate(45deg);
  460. -moz-transform: rotate(45deg);
  461. font-family: '正楷';
  462. }
  463. }
  464. .section-title {
  465. width: 100%;
  466. height: 66rpx;
  467. float: left;
  468. font-size: $font-size-28;
  469. line-height: 66rpx;
  470. color: #333333;
  471. text-align: left;
  472. font-weight: 600;
  473. }
  474. .section-mid {
  475. width: 100%;
  476. height: auto;
  477. display: flex;
  478. flex-direction: column;
  479. position: relative;
  480. border-radius: 0 0 20rpx 20rpx;
  481. .list-title {
  482. width: 100%;
  483. height: auto;
  484. .list-title-t {
  485. width: 100%;
  486. height: 50rpx;
  487. float: left;
  488. font-size: $font-size-28;
  489. padding-bottom: 10rpx;
  490. .list-title-tip {
  491. float: left;
  492. .badges {
  493. display: block;
  494. float: left;
  495. padding: 0 15rpx;
  496. height: 40rpx;
  497. line-height: 40rpx;
  498. border-radius: 20rpx;
  499. background: rgba(248, 204, 148, 0.5);
  500. font-size: $font-size-24;
  501. text-align: center;
  502. color: #666666;
  503. }
  504. }
  505. .list-title-tag {
  506. float: left;
  507. margin-left: 20rpx;
  508. .badges {
  509. display: block;
  510. float: left;
  511. padding: 0 15rpx;
  512. height: 40rpx;
  513. line-height: 40rpx;
  514. border-radius: 20rpx;
  515. background: linear-gradient(270deg, #fee9ba 0%, #f0cb72 100%);
  516. font-size: $font-size-24;
  517. text-align: center;
  518. color: #666666;
  519. }
  520. }
  521. .list-title-num {
  522. float: left;
  523. text-align: left;
  524. color: #e15616;
  525. line-height: 40rpx;
  526. margin-left: 20rpx;
  527. }
  528. }
  529. .list-title-a {
  530. width: 100%;
  531. height: auto;
  532. float: left;
  533. padding: 5rpx 8rpx;
  534. border-radius: 4rpx;
  535. background-color: rgba(247, 247, 247, 1);
  536. margin: 10rpx 0;
  537. .text{
  538. color: #999999;
  539. }
  540. .list-title-a-text {
  541. width: 100%;
  542. height: 50rpx;
  543. float: left;
  544. font-size: $font-size-24;
  545. line-height: 50rpx;
  546. color: #666666;
  547. text-align: left;
  548. }
  549. }
  550. .list-title-b {
  551. width: 100%;
  552. height: 50rpx;
  553. float: left;
  554. font-size: $font-size-24;
  555. line-height: 50rpx;
  556. color: #666666;
  557. text-align: left;
  558. .text{
  559. color: #999999;
  560. }
  561. .list-title-b-item {
  562. width: 50%;
  563. height: 100%;
  564. float: left;
  565. }
  566. }
  567. }
  568. .list-detail {
  569. width: 70rpx;
  570. height: 80rpx;
  571. line-height: 80rpx;
  572. text-align: center;
  573. position: absolute;
  574. right: 0;
  575. bottom: 0;
  576. .iconfont {
  577. font-size: $font-size-32;
  578. color: #999999;
  579. }
  580. }
  581. }
  582. .section-tips{
  583. width: 100%;
  584. height: 50rpx;
  585. font-size: $font-size-28;
  586. line-height: 50rpx;
  587. color: $uni-color-error;
  588. text-align: left;
  589. }
  590. }
  591. .distinguish-button {
  592. width: 100%;
  593. position: fixed;
  594. bottom: 0;
  595. left: 0;
  596. background-color: #ffffff;
  597. padding: 0 50rpx;
  598. padding-top: 20rpx;
  599. display: flex;
  600. .button {
  601. flex: 1;
  602. height: 80rpx;
  603. margin: 0 20rpx;
  604. border-radius: 40rpx;
  605. text-align: center;
  606. color: #ffffff;
  607. line-height: 80rpx;
  608. font-size: $font-size-28;
  609. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  610. &.confirm{
  611. background: $btn-confirm;
  612. }
  613. &.cancel{
  614. background: $uni-color-error;
  615. }
  616. }
  617. }
  618. </style>