detail.vue 14 KB

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