detail.vue 16 KB

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