detail.vue 15 KB

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