detail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  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. }
  313. .mine {
  314. width: 100%;
  315. height: 100%;
  316. position: relative;
  317. }
  318. .distinguish-section {
  319. width: 100%;
  320. position: absolute;
  321. padding: 40rpx 20rpx;
  322. box-sizing: border-box;
  323. }
  324. .distinguish-section-conten {
  325. width: 100%;
  326. height: auto;
  327. position: relative;
  328. background-color: #ffffff;
  329. border-radius: 20rpx;
  330. padding: 20rpx;
  331. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  332. .section-top {
  333. width: 100%;
  334. height: 66rpx;
  335. box-sizing: border-box;
  336. .title {
  337. float: left;
  338. height: 66rpx;
  339. padding: 13rpx 0;
  340. .list-title-tip {
  341. float: left;
  342. margin-right: 15rpx;
  343. .badges {
  344. display: block;
  345. float: left;
  346. padding: 0 15rpx;
  347. height: 40rpx;
  348. line-height: 40rpx;
  349. border-radius: 4rpx;
  350. background: $btn-confirm;
  351. font-size: $font-size-24;
  352. text-align: center;
  353. color: #ffffff;
  354. }
  355. }
  356. .title-text {
  357. float: left;
  358. line-height: 40rpx;
  359. height: 40rpx;
  360. color: #333333;
  361. text-align: left;
  362. font-weight: 600;
  363. }
  364. }
  365. .button {
  366. float: right;
  367. box-sizing: border-box;
  368. padding: 0 24rpx;
  369. height: 100%;
  370. line-height: 66rpx;
  371. background: $btn-confirm;
  372. border-radius: 8rpx;
  373. text-align: center;
  374. color: #ffffff;
  375. }
  376. }
  377. .section-top-item {
  378. width: 100%;
  379. height: auto;
  380. margin-top: 10rpx;
  381. position: relative;
  382. float: left;
  383. .list-title-b {
  384. width: 100%;
  385. height: 44rpx;
  386. float: left;
  387. font-size: $font-size-24;
  388. line-height: 44rpx;
  389. color: #999999;
  390. text-align: left;
  391. .text {
  392. color: #999999;
  393. }
  394. .list-title-b-item {
  395. width: 50%;
  396. height: 100%;
  397. float: left;
  398. }
  399. &.sms {
  400. height: 120rpx;
  401. padding: 10rpx;
  402. border-radius: 4rpx;
  403. background: #f7f7f7;
  404. }
  405. }
  406. .list-icon {
  407. width: 120rpx;
  408. height: 120rpx;
  409. border-radius: 10rpx;
  410. position: absolute;
  411. right: 0;
  412. top: 0;
  413. color: #dd524d;
  414. z-index: 99;
  415. .list-icon-image{
  416. width: 120rpx;
  417. height: 120rpx;
  418. display: block;
  419. }
  420. }
  421. }
  422. .section-title {
  423. width: 100%;
  424. height: 66rpx;
  425. float: left;
  426. font-size: $font-size-28;
  427. line-height: 66rpx;
  428. color: #333333;
  429. text-align: left;
  430. font-weight: 600;
  431. }
  432. .section-mid {
  433. width: 100%;
  434. height: auto;
  435. display: flex;
  436. flex-direction: column;
  437. position: relative;
  438. border-radius: 0 0 20rpx 20rpx;
  439. .list-title-b {
  440. width: 100%;
  441. height: 50rpx;
  442. float: left;
  443. font-size: $font-size-24;
  444. line-height: 50rpx;
  445. color: #666666;
  446. text-align: left;
  447. .text{
  448. color: #999999;
  449. }
  450. .list-title-b-item {
  451. width: 50%;
  452. height: 100%;
  453. float: left;
  454. }
  455. }
  456. }
  457. .section-tips {
  458. width: 100%;
  459. height: 50rpx;
  460. font-size: $font-size-28;
  461. line-height: 50rpx;
  462. color: $uni-color-error;
  463. text-align: left;
  464. }
  465. }
  466. .distinguish-button {
  467. width: 100%;
  468. position: fixed;
  469. bottom: 0;
  470. left: 0;
  471. background-color: #ffffff;
  472. padding: 0 50rpx;
  473. padding-top: 20rpx;
  474. display: flex;
  475. .button {
  476. flex: 1;
  477. height: 80rpx;
  478. margin: 0 20rpx;
  479. border-radius: 40rpx;
  480. text-align: center;
  481. color: #ffffff;
  482. line-height: 80rpx;
  483. font-size: $font-size-28;
  484. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  485. &.confirm {
  486. background: $btn-confirm;
  487. }
  488. &.cancel {
  489. background: $uni-color-error;
  490. }
  491. }
  492. }
  493. </style>