detail.vue 11 KB

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