detail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  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" :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. <!-- 弹窗提示 -->
  116. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :title="contentModalTitle"
  117. :content="contentModalText" :button="modalButton" color="#333" :size="32" shape="circle"
  118. :maskClosable="false">
  119. </tui-modal>
  120. </view>
  121. </template>
  122. <script>
  123. import wxLogin from '@/services/wxLogin.js'
  124. import {
  125. mapState,
  126. mapMutations
  127. } from 'vuex'
  128. export default {
  129. data() {
  130. return {
  131. isIphoneX: this.$store.state.isIphoneX,
  132. CustomBar: this.CustomBar, // 顶部导航栏高度
  133. height: 64, //header高度
  134. top: 0, //标题图标距离顶部距离
  135. scrollH: 0, //滚动总高度
  136. opcity: 1,
  137. isCmcustomClass: 'left',
  138. skeletonShow:true,
  139. orderList:[],
  140. listQuery:{
  141. pageNum: 1, //页数
  142. pageSize: 10, //条数
  143. id: 0,
  144. shopName: '',
  145. },
  146. nvabarData: {
  147. //顶部自定义导航
  148. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  149. showSearch: 0,
  150. title: '', // 导航栏 中间的标题
  151. haveBack: false,
  152. home: false,
  153. textLeft: this.$store.state.isIphone,
  154. bgColor: '#D33020',
  155. textColor: '#ffffff'
  156. },
  157. receiptInfo: {},
  158. receiptId: 0
  159. }
  160. },
  161. onLoad(option) {
  162. let obj = {}
  163. // #ifdef MP-WEIXIN
  164. obj = wx.getMenuButtonBoundingClientRect()
  165. // #endif
  166. // #ifdef MP-BAIDU
  167. obj = swan.getMenuButtonBoundingClientRect()
  168. // #endif
  169. // #ifdef MP-ALIPAY
  170. my.hideAddToDesktopMenu()
  171. // #endif
  172. uni.getSystemInfo({
  173. success: res => {
  174. this.width = obj.left || res.windowWidth
  175. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  176. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  177. this.scrollH = res.windowWidth * 0.6
  178. }
  179. })
  180. this.receiptId = this.listQuery.id = option.id
  181. this.getOrderReceiptDetail(this.receiptId)
  182. this.getOrderReceiptRebateOrders()
  183. },
  184. computed: {
  185. ...mapState(['hasLogin'])
  186. },
  187. methods: {
  188. getOrderReceiptDetail(id) {
  189. // 收款详情
  190. this.OrderService.orderReceiptRefundDetail({ id: id })
  191. .then(response => {
  192. this.receiptInfo = response.data
  193. })
  194. .catch(err => {
  195. this.$util.msg(err.msg, 2000)
  196. })
  197. },
  198. getOrderReceiptRebateOrders() {// 收款详情-订单列表
  199. this.OrderService.orderReceiptRebateOrders(this.listQuery)
  200. .then(response => {
  201. let data = response.data
  202. if (data.list && data.list.length > 0) {
  203. this.orderList = data.list
  204. }
  205. setTimeout(()=>{
  206. this.skeletonShow = false
  207. },1000)
  208. })
  209. .catch(err => {
  210. this.$util.msg(err.msg, 2000)
  211. })
  212. },
  213. orderDetail(orderId) {
  214. //订单详情跳转
  215. this.isModalLayer = true
  216. this.$api.navigateTo(`/pages/relation/order/detail?orderId=${orderId}`)
  217. },
  218. toNoSms(url) {
  219. this.$api.navigateTo(url)
  220. },
  221. formatColor(state) {
  222. //设置颜色
  223. let stateColor = '',
  224. stateColorObject = {
  225. 1: '#FEAC20',
  226. 2: '#4cd964',
  227. 3: '#34CC8C',
  228. 4: '#F94B4B',
  229. 5: '#007aff'
  230. }
  231. Object.keys(stateColorObject).forEach(function(key) {
  232. if (key == state) {
  233. stateColor = stateColorObject[key]
  234. }
  235. })
  236. return stateColor
  237. },
  238. },
  239. onPageScroll(e) {
  240. //实时获取到滚动的值
  241. // if (e.scrollTop > 30) {
  242. // this.isCmcustomClass = 'fiexd'
  243. // } else {
  244. // this.isCmcustomClass = 'left'
  245. // }
  246. },
  247. onPullDownRefresh() {
  248. setTimeout(() => {
  249. // this.initSsoMemberCollectionList()
  250. uni.stopPullDownRefresh()
  251. }, 200)
  252. },
  253. onShow() {
  254. if (this.hasLogin) {
  255. this.GetDataInfo()
  256. }
  257. }
  258. }
  259. </script>
  260. <style lang="scss">
  261. @import '@/uni.scss';
  262. page {
  263. background: #fff;
  264. }
  265. .tui-header-box {
  266. width: 100%;
  267. background: #ffffff;
  268. z-index: 999;
  269. background-size: cover;
  270. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  271. &.fiexd {
  272. position: fixed;
  273. top: 0;
  274. left: 0;
  275. }
  276. }
  277. .header-top {
  278. width: 100%;
  279. font-size: 16px;
  280. font-weight: 500;
  281. height: 32px;
  282. display: flex;
  283. align-items: center;
  284. justify-content: center;
  285. position: relative;
  286. padding: 0 40rpx;
  287. }
  288. .header-sit {
  289. width: 100%;
  290. box-sizing: border-box;
  291. height: 80rpx;
  292. line-height: 80rpx;
  293. box-sizing: border-box;
  294. color: #ffffff;
  295. .header-sit-text {
  296. text-align: left;
  297. font-size: $font-size-40;
  298. font-weight: 600;
  299. font-family: '正楷';
  300. }
  301. .icon-fanhui {
  302. display: block;
  303. width: 80rpx;
  304. height: 80rpx;
  305. float: left;
  306. text-align: center;
  307. line-height: 80rpx;
  308. font-size: 42rpx;
  309. }
  310. .icon-iconfonticonfontsousuo1 {
  311. font-size: 42rpx;
  312. margin-left: 30rpx;
  313. }
  314. }
  315. .mine {
  316. width: 100%;
  317. height: 100%;
  318. position: relative;
  319. }
  320. .distinguish-section {
  321. width: 100%;
  322. position: absolute;
  323. padding: 40rpx 20rpx;
  324. box-sizing: border-box;
  325. }
  326. .distinguish-section-conten {
  327. width: 100%;
  328. height: auto;
  329. position: relative;
  330. background-color: #ffffff;
  331. border-radius: 20rpx;
  332. padding: 20rpx;
  333. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  334. .section-top {
  335. width: 100%;
  336. height: 66rpx;
  337. box-sizing: border-box;
  338. .title {
  339. float: left;
  340. height: 66rpx;
  341. padding: 13rpx 0;
  342. .list-title-tip {
  343. float: left;
  344. margin-right: 15rpx;
  345. .badges {
  346. display: block;
  347. float: left;
  348. padding: 0 15rpx;
  349. height: 40rpx;
  350. line-height: 40rpx;
  351. border-radius: 4rpx;
  352. background: $btn-confirm;
  353. font-size: $font-size-24;
  354. text-align: center;
  355. color: #ffffff;
  356. }
  357. }
  358. .title-text{
  359. float: left;
  360. line-height: 40rpx;
  361. height: 40rpx;
  362. color: #333333;
  363. text-align: left;
  364. font-weight: 600;
  365. }
  366. }
  367. .button {
  368. float: right;
  369. box-sizing: border-box;
  370. padding: 0 24rpx;
  371. height: 100%;
  372. line-height: 66rpx;
  373. background: $btn-confirm;
  374. border-radius: 8rpx;
  375. text-align: center;
  376. color: #ffffff;
  377. }
  378. }
  379. .section-top-item {
  380. width: 100%;
  381. height: auto;
  382. margin-top: 10rpx;
  383. position: relative;
  384. float: left;
  385. .list-title-b {
  386. width: 100%;
  387. height: 44rpx;
  388. float: left;
  389. font-size: $font-size-24;
  390. line-height: 44rpx;
  391. color: #666666;
  392. text-align: left;
  393. .text{
  394. color: #999999;
  395. }
  396. .list-title-b-item {
  397. width: 50%;
  398. height: 100%;
  399. float: left;
  400. }
  401. &.sms {
  402. height: 120rpx;
  403. padding: 10rpx;
  404. border-radius: 4rpx;
  405. background: #F7F7F7;
  406. }
  407. }
  408. .list-icon {
  409. width: 120rpx;
  410. height: 60rpx;
  411. border: 1px solid #e1e1e1;
  412. border-radius: 10rpx;
  413. text-align: center;
  414. font-size: 20rpx;
  415. line-height: 60rpx;
  416. position: absolute;
  417. right: 90rpx;
  418. top: 40rpx;
  419. color: #dd524d;
  420. z-index: 99;
  421. transform: rotate(45deg);
  422. -webkit-transform: rotate(45deg);
  423. -moz-transform: rotate(45deg);
  424. font-family: '正楷';
  425. }
  426. }
  427. .section-title {
  428. width: 100%;
  429. height: 66rpx;
  430. float: left;
  431. font-size: $font-size-28;
  432. line-height: 66rpx;
  433. color: #333333;
  434. text-align: left;
  435. font-weight: 600;
  436. }
  437. .section-mid {
  438. width: 100%;
  439. height: auto;
  440. display: flex;
  441. flex-direction: column;
  442. position: relative;
  443. border-radius: 0 0 20rpx 20rpx;
  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. .list-detail {
  532. width: 70rpx;
  533. height: 80rpx;
  534. line-height: 80rpx;
  535. text-align: center;
  536. position: absolute;
  537. right: 0;
  538. bottom: 0;
  539. .iconfont {
  540. font-size: $font-size-32;
  541. color: #999999;
  542. }
  543. }
  544. }
  545. .section-tips{
  546. width: 100%;
  547. height: 50rpx;
  548. font-size: $font-size-28;
  549. line-height: 50rpx;
  550. color: $uni-color-error;
  551. text-align: left;
  552. }
  553. }
  554. .distinguish-button {
  555. width: 100%;
  556. position: fixed;
  557. bottom: 0;
  558. left: 0;
  559. background-color: #ffffff;
  560. padding: 0 50rpx;
  561. padding-top: 20rpx;
  562. display: flex;
  563. .button {
  564. flex: 1;
  565. height: 80rpx;
  566. margin: 0 20rpx;
  567. border-radius: 40rpx;
  568. text-align: center;
  569. color: #ffffff;
  570. line-height: 80rpx;
  571. font-size: $font-size-28;
  572. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  573. &.confirm{
  574. background: $btn-confirm;
  575. }
  576. &.cancel{
  577. background: $uni-color-error;
  578. }
  579. }
  580. }
  581. </style>