detail.vue 16 KB

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