detail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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 class="iconfont icon-fanhui" @click.stop="this.$api.navigateBack(1)"></text>
  12. <text class="header-sit-text">审核详情</text>
  13. </view>
  14. </view>
  15. <view
  16. class="tui-header-box"
  17. :style="{
  18. height: CustomBar + 30 + 'px',
  19. backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)'
  20. }"
  21. >
  22. </view>
  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 | formatSourceType }}款</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. </view>
  35. </view>
  36. <view class="section-top-item">
  37. <view class="list-title-b">
  38. <view class="list-title-b-item ">
  39. 收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
  40. </view>
  41. <view class="list-title-b-item ">
  42. 收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
  43. </view>
  44. </view>
  45. <view class="list-title-b">
  46. 款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
  47. </view>
  48. <template v-if="receiptInfo.smsContent">
  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. </template>
  54. <view class="list-icon" v-if="receiptInfo.tipMsg">
  55. <image
  56. class="list-icon-image"
  57. src="https://static.caimei365.com/app/crm/image/icon-noconfirm@2x.png"
  58. mode=""
  59. v-if="receiptInfo.receiptStatus == 1"
  60. ></image>
  61. <image
  62. class="list-icon-image"
  63. src="https://static.caimei365.com/app/crm/image/icon-noaudit@2x.png"
  64. mode=""
  65. v-if="receiptInfo.receiptStatus == 2"
  66. ></image>
  67. </view>
  68. </view>
  69. <template v-if="receiptInfo.orderList">
  70. <view class="section-title">关联订单</view>
  71. <view class="section-mid">
  72. <view class="tui-order-item" v-for="(order, orderIndex) in receiptInfo.orderList" :key="orderIndex">
  73. <receipt-details :orderInfo="order"></receipt-details>
  74. </view>
  75. </view>
  76. </template>
  77. <view class="section-title">状态</view>
  78. <view class="section-mid">
  79. <view class="list-title">
  80. <view class="list-title-b"
  81. >进度:<text :style="{ color: formatColor(receiptInfo.receiptStatus) }"
  82. >{{ receiptInfo.receiptStatusText }}</text
  83. >
  84. </view>
  85. <view class="list-title-b"
  86. >确认人:<text class="text">{{
  87. receiptInfo.confirmUserName ? receiptInfo.confirmUserName : '无'
  88. }}</text></view
  89. >
  90. <view class="list-title-b"
  91. >确认时间:<text class="text">{{
  92. receiptInfo.confirmDate ? receiptInfo.confirmDate : '无'
  93. }}</text></view
  94. >
  95. <view class="list-title-b"
  96. >审核人:<text class="text">{{
  97. receiptInfo.reviewUserName ? receiptInfo.reviewUserName : '无'
  98. }}</text></view
  99. >
  100. <view class="list-title-b"
  101. >审核时间:<text class="text">{{
  102. receiptInfo.reviewDate ? receiptInfo.reviewDate : '无'
  103. }}</text></view
  104. >
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </template>
  111. <script>
  112. import wxLogin from '@/services/wxLogin.js'
  113. import receiptDetails from '@/components/cm-module/receipt/receipt-details'
  114. import { mapState, mapMutations } from 'vuex'
  115. export default {
  116. components: {
  117. receiptDetails
  118. },
  119. data() {
  120. return {
  121. isIphoneX: this.$store.state.isIphoneX,
  122. CustomBar: this.CustomBar, // 顶部导航栏高度
  123. height: 64, //header高度
  124. top: 0, //标题图标距离顶部距离
  125. scrollH: 0, //滚动总高度
  126. opcity: 1,
  127. isCmcustomClass: 'left',
  128. nvabarData: {
  129. //顶部自定义导航
  130. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  131. showSearch: 0,
  132. title: '', // 导航栏 中间的标题
  133. haveBack: false,
  134. home: false,
  135. textLeft: this.$store.state.isIphone,
  136. bgColor: '#D33020',
  137. textColor: '#ffffff'
  138. },
  139. receiptInfo: {},
  140. receiptId: 0
  141. }
  142. },
  143. onLoad(option) {
  144. let obj = {}
  145. // #ifdef MP-WEIXIN
  146. obj = wx.getMenuButtonBoundingClientRect()
  147. // #endif
  148. // #ifdef MP-BAIDU
  149. obj = swan.getMenuButtonBoundingClientRect()
  150. // #endif
  151. // #ifdef MP-ALIPAY
  152. my.hideAddToDesktopMenu()
  153. // #endif
  154. uni.getSystemInfo({
  155. success: res => {
  156. this.width = obj.left || res.windowWidth
  157. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  158. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  159. this.scrollH = res.windowWidth * 0.6
  160. }
  161. })
  162. this.receiptId = option.id
  163. this.getOrderReceiptDetail(this.receiptId)
  164. },
  165. filters: {
  166. formatSourceType(value) {
  167. switch (value) {
  168. case 1:
  169. return '订单'
  170. break
  171. case 2:
  172. return '非订单'
  173. break
  174. case 3:
  175. return '返佣'
  176. break
  177. case 4:
  178. return '订单款或者非订单款'
  179. break
  180. case 5:
  181. return '供应商退款'
  182. break
  183. }
  184. },
  185. formatStateType(value) {
  186. switch (value) {
  187. case 0:
  188. return '待确认'
  189. break
  190. case 1:
  191. return '已确认'
  192. break
  193. case 2:
  194. return '待审核'
  195. break
  196. case 3:
  197. return '审核通过'
  198. break
  199. }
  200. },
  201. NumFormat(value) {
  202. //处理金额
  203. if (value) {
  204. return Number(value).toFixed(2)
  205. } else {
  206. return '0.00'
  207. }
  208. }
  209. },
  210. computed: {
  211. ...mapState(['hasLogin', 'userInfo'])
  212. },
  213. methods: {
  214. getOrderReceiptDetail(id) {
  215. // 收款详情
  216. this.OrderService.orderReceiptDetail({ id: id })
  217. .then(response => {
  218. this.receiptInfo = response.data
  219. this.skeletonShow = false
  220. })
  221. .catch(err => {
  222. this.$util.msg(err.msg, 2000)
  223. })
  224. },
  225. toNoSms(url) {
  226. this.$api.navigateTo(url)
  227. },
  228. formatColor(state) {
  229. //设置邀请码状态亚瑟
  230. let stateColor = '',
  231. stateColorObject = {
  232. 0: '#4cd964',
  233. 1: '#4cd964',
  234. 2: '#4cd964',
  235. 3: '#007aff'
  236. }
  237. Object.keys(stateColorObject).forEach(function(key) {
  238. if (key == state) {
  239. stateColor = stateColorObject[key]
  240. }
  241. })
  242. return stateColor
  243. }
  244. },
  245. onPageScroll(e) {
  246. //实时获取到滚动的值
  247. // if (e.scrollTop > 30) {
  248. // this.isCmcustomClass = 'fiexd'
  249. // } else {
  250. // this.isCmcustomClass = 'left'
  251. // }
  252. },
  253. onPullDownRefresh() {
  254. setTimeout(() => {
  255. this.getOrderReceiptDetail(this.receiptId)
  256. uni.stopPullDownRefresh()
  257. }, 200)
  258. },
  259. onShow() {}
  260. }
  261. </script>
  262. <style lang="scss">
  263. @import '@/uni.scss';
  264. page {
  265. background: #fff;
  266. }
  267. .tui-header-box {
  268. width: 100%;
  269. background: #ffffff;
  270. z-index: 999;
  271. background-size: cover;
  272. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  273. &.fiexd {
  274. position: fixed;
  275. top: 0;
  276. left: 0;
  277. }
  278. }
  279. .header-top {
  280. width: 100%;
  281. font-size: 16px;
  282. font-weight: 500;
  283. height: 32px;
  284. display: flex;
  285. align-items: center;
  286. justify-content: center;
  287. position: relative;
  288. padding: 0 40rpx;
  289. }
  290. .header-sit {
  291. width: 100%;
  292. box-sizing: border-box;
  293. height: 80rpx;
  294. line-height: 80rpx;
  295. box-sizing: border-box;
  296. color: #ffffff;
  297. .header-sit-text {
  298. text-align: left;
  299. font-size: $font-size-40;
  300. font-weight: 600;
  301. font-family: '正楷';
  302. }
  303. .icon-fanhui {
  304. display: block;
  305. width: 80rpx;
  306. height: 80rpx;
  307. float: left;
  308. text-align: center;
  309. line-height: 80rpx;
  310. font-size: 42rpx;
  311. }
  312. .icon-iconfonticonfontsousuo1 {
  313. font-size: 42rpx;
  314. margin-left: 30rpx;
  315. }
  316. }
  317. .mine {
  318. width: 100%;
  319. height: 100%;
  320. position: relative;
  321. }
  322. .distinguish-section {
  323. width: 100%;
  324. position: absolute;
  325. padding: 40rpx 20rpx;
  326. box-sizing: border-box;
  327. }
  328. .distinguish-section-conten {
  329. width: 100%;
  330. height: auto;
  331. position: relative;
  332. background-color: #ffffff;
  333. border-radius: 20rpx;
  334. padding: 20rpx;
  335. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  336. .section-top {
  337. width: 100%;
  338. height: 66rpx;
  339. box-sizing: border-box;
  340. .title {
  341. float: left;
  342. height: 66rpx;
  343. padding: 13rpx 0;
  344. .list-title-tip {
  345. float: left;
  346. margin-right: 15rpx;
  347. .badges {
  348. display: block;
  349. float: left;
  350. padding: 0 15rpx;
  351. height: 40rpx;
  352. line-height: 40rpx;
  353. border-radius: 4rpx;
  354. background: $btn-confirm;
  355. font-size: $font-size-24;
  356. text-align: center;
  357. color: #ffffff;
  358. }
  359. }
  360. .title-text {
  361. float: left;
  362. line-height: 40rpx;
  363. height: 40rpx;
  364. color: #333333;
  365. text-align: left;
  366. font-weight: 600;
  367. }
  368. }
  369. .button {
  370. float: right;
  371. box-sizing: border-box;
  372. padding: 0 24rpx;
  373. height: 100%;
  374. line-height: 66rpx;
  375. background: $btn-confirm;
  376. border-radius: 8rpx;
  377. text-align: center;
  378. color: #ffffff;
  379. }
  380. }
  381. .section-top-item {
  382. width: 100%;
  383. height: auto;
  384. margin-top: 10rpx;
  385. position: relative;
  386. float: left;
  387. .list-title-b {
  388. width: 100%;
  389. height: 44rpx;
  390. float: left;
  391. font-size: $font-size-24;
  392. line-height: 44rpx;
  393. color: #999999;
  394. text-align: left;
  395. .text {
  396. color: #999999;
  397. }
  398. .list-title-b-item {
  399. width: 50%;
  400. height: 100%;
  401. float: left;
  402. }
  403. &.sms {
  404. height: 120rpx;
  405. padding: 10rpx;
  406. border-radius: 4rpx;
  407. background: #f7f7f7;
  408. }
  409. }
  410. .list-icon {
  411. width: 120rpx;
  412. height: 120rpx;
  413. border-radius: 10rpx;
  414. position: absolute;
  415. right: 0;
  416. top: 0;
  417. color: #dd524d;
  418. z-index: 99;
  419. .list-icon-image{
  420. width: 120rpx;
  421. height: 120rpx;
  422. display: block;
  423. }
  424. }
  425. }
  426. .section-title {
  427. width: 100%;
  428. height: 66rpx;
  429. float: left;
  430. font-size: $font-size-28;
  431. line-height: 66rpx;
  432. color: #333333;
  433. text-align: left;
  434. font-weight: 600;
  435. }
  436. .section-mid {
  437. width: 100%;
  438. height: auto;
  439. display: flex;
  440. flex-direction: column;
  441. position: relative;
  442. border-radius: 0 0 20rpx 20rpx;
  443. .list-title-b {
  444. width: 100%;
  445. height: 50rpx;
  446. float: left;
  447. font-size: $font-size-24;
  448. line-height: 50rpx;
  449. color: #666666;
  450. text-align: left;
  451. .text{
  452. color: #999999;
  453. }
  454. .list-title-b-item {
  455. width: 50%;
  456. height: 100%;
  457. float: left;
  458. }
  459. }
  460. }
  461. .section-tips {
  462. width: 100%;
  463. height: 50rpx;
  464. font-size: $font-size-28;
  465. line-height: 50rpx;
  466. color: $uni-color-error;
  467. text-align: left;
  468. }
  469. }
  470. .distinguish-button {
  471. width: 100%;
  472. position: fixed;
  473. bottom: 0;
  474. left: 0;
  475. background-color: #ffffff;
  476. padding: 0 50rpx;
  477. padding-top: 20rpx;
  478. display: flex;
  479. .button {
  480. flex: 1;
  481. height: 80rpx;
  482. margin: 0 20rpx;
  483. border-radius: 40rpx;
  484. text-align: center;
  485. color: #ffffff;
  486. line-height: 80rpx;
  487. font-size: $font-size-28;
  488. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  489. &.confirm {
  490. background: $btn-confirm;
  491. }
  492. &.cancel {
  493. background: $uni-color-error;
  494. }
  495. }
  496. }
  497. </style>