detail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  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. <view class="distinguish-section" :style="{ top: CustomBar - 14 + 'px', left: 0 + 'px' }">
  17. <view class="distinguish-section-conten">
  18. <view class="section-top">
  19. <view class="title">
  20. <view class="list-title-tip">
  21. <text class="badges">{{ payment.sourceType | formatSourceType }}款</text>
  22. </view>
  23. <view class="title-text">收款信息</view>
  24. </view>
  25. <view class="button" @click="toNoSms('/pages/collection/list')">
  26. <text class="iconfont icon-wodedingdan"></text>
  27. 收款列表
  28. </view>
  29. </view>
  30. <view class="section-top-item">
  31. <view class="list-title-b">
  32. <view class="list-title-b-item ">
  33. 收款金额:<text class="text">¥{{ payment.receiptAmount | NumFormat }} </text>
  34. </view>
  35. <view class="list-title-b-item ">
  36. 收款类型:<text class="text">{{ payment.receiptType }} </text>
  37. </view>
  38. </view>
  39. <view class="list-title-b">
  40. 收款时间:<text class="text">{{ payment.receiptDate }}</text>
  41. </view>
  42. <template v-if="payment.smsContent">
  43. <view class="list-title-b">收款短信:</view>
  44. <view class="list-title-b sms">
  45. <text class="text">{{ payment.smsContent }}</text>
  46. </view>
  47. </template>
  48. <view class="list-icon">无人确认</view>
  49. </view>
  50. <view class="section-title">关联订单</view>
  51. <view class="section-mid">
  52. <view class="list-title">
  53. <view class="list-title-t">
  54. <view class="list-title-tip">
  55. <text class="badges">{{ payment.order.orderType | formatOrderType }}</text>
  56. </view>
  57. <view class="list-title-num">{{
  58. payment.order.state | StateExpFormat
  59. }}</view>
  60. </view>
  61. <view class="list-title-b">
  62. 订单编号:<text class="text">{{ payment.order.number }} ( {{ payment.order.orderId }} )</text>
  63. </view>
  64. <view class="list-title-b">
  65. 下单日期:<text class="text">{{ payment.order.creatTime }}</text>
  66. </view>
  67. <view class="list-title-b">
  68. 客户名称:<text class="text">{{ payment.order.userName }}</text>
  69. </view>
  70. <view class="list-title-b">
  71. <view class="list-title-b-item ">
  72. 订单金额:<text class="text">¥{{ payment.order.receiptAmount | NumFormat }}</text>
  73. </view>
  74. <view class="list-title-b-item ">
  75. 余额抵扣:<text class="text">¥{{ payment.order.receiptAmount | NumFormat }}</text>
  76. </view>
  77. </view>
  78. <view class="list-title-b">
  79. <view class="list-title-b-item ">
  80. 应收金额:<text class="text">¥{{ payment.order.receiptAmount | NumFormat }}</text>
  81. </view>
  82. <view class="list-title-b-item ">
  83. 已收金额:<text class="text">¥{{ payment.order.receiptAmount | NumFormat }}</text>
  84. </view>
  85. </view>
  86. <view class="list-title-b">
  87. <view class="list-title-b-item ">
  88. 剩余应收:<text class="text">¥{{ payment.order.receiptAmount | NumFormat }}</text>
  89. </view>
  90. <view class="list-title-b-item ">
  91. 待审金额:<text class="text">¥{{ payment.order.receiptAmount | NumFormat }}</text>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="section-title">状态</view>
  97. <view class="section-mid">
  98. <view class="list-title">
  99. <view class="list-title-b">进度:<text
  100. :style="{ color: formatColor(payment.confirmType) }">{{ payment.confirmType | formatStateType }}</text>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="section-tips">注:款项和订单已确认关联,等待审核</view>
  105. </view>
  106. </view>
  107. <!-- 弹窗提示 -->
  108. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :title="contentModalTitle"
  109. :content="contentModalText" :button="modalButton" color="#333" :size="32" shape="circle"
  110. :maskClosable="false">
  111. </tui-modal>
  112. </view>
  113. </template>
  114. <script>
  115. import wxLogin from '@/services/wxLogin.js'
  116. import {
  117. mapState,
  118. mapMutations
  119. } from 'vuex'
  120. export default {
  121. data() {
  122. return {
  123. isIphoneX: this.$store.state.isIphoneX,
  124. nvabarData: {
  125. //顶部自定义导航
  126. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  127. showSearch: 0,
  128. title: '', // 导航栏 中间的标题
  129. haveBack: false,
  130. home: false,
  131. textLeft: this.$store.state.isIphone,
  132. bgColor: '#D33020',
  133. textColor: '#ffffff'
  134. },
  135. payment: {
  136. id: 6090,
  137. receiptAmount: 5000, //收款金额
  138. associateAmount: 5000, //关联金额
  139. receiptType: '广发银行0115',
  140. receiptDate: '2022-02-15 10:58:25', // 收款时间
  141. reviewDate: '2022-02-15 10:58:25', // 审核时间
  142. smsContent: '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  143. confirmType: 1,
  144. userName: '采美网络信息有限公司',
  145. sourceType: 2,
  146. state: 11,
  147. isChecked: false,
  148. order: {
  149. orderId: 18751,
  150. number: 'W164488903271223',
  151. receiptAmount: 5000, //收款金额
  152. associateAmount: 5000, //关联金额
  153. orderType: 1, // 订单类型
  154. creatTime: '2022-02-15 10:58:25', // 下单日期
  155. userName: '采美网络信息有限公司',
  156. state: 11, //订单状态
  157. }
  158. },
  159. modalButton: [{
  160. text: '取消',
  161. type: 'gray',
  162. plain: true //是否空心
  163. },
  164. {
  165. text: '确认',
  166. customStyle: {
  167. color: '#fff',
  168. bgColor: '#4688fa'
  169. },
  170. plain: false
  171. }
  172. ],
  173. params: {
  174. type: 1,
  175. banksType: 1,
  176. amount: '',
  177. chargeValue: '',
  178. remarks: '',
  179. time: this.$api.getNowFormatDate()
  180. },
  181. infoData: {},
  182. isCmcustomClass: 'left',
  183. CustomBar: this.CustomBar, // 顶部导航栏高度
  184. height: 64, //header高度
  185. top: 0, //标题图标距离顶部距离
  186. scrollH: 0, //滚动总高度
  187. opcity: 1,
  188. isCheckedCharge: false,
  189. contentModalTitle: '',
  190. contentModalText: '', //操作文字提示语句
  191. modal: false,
  192. }
  193. },
  194. onLoad() {
  195. let obj = {}
  196. // #ifdef MP-WEIXIN
  197. obj = wx.getMenuButtonBoundingClientRect()
  198. // #endif
  199. // #ifdef MP-BAIDU
  200. obj = swan.getMenuButtonBoundingClientRect()
  201. // #endif
  202. // #ifdef MP-ALIPAY
  203. my.hideAddToDesktopMenu()
  204. // #endif
  205. uni.getSystemInfo({
  206. success: res => {
  207. this.width = obj.left || res.windowWidth
  208. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  209. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  210. this.scrollH = res.windowWidth * 0.6
  211. }
  212. })
  213. },
  214. filters: {
  215. formatSourceType(value) {
  216. switch (value) {
  217. case 1:
  218. return '订单'
  219. break
  220. case 2:
  221. return '非订单'
  222. break
  223. case 3:
  224. return '返佣'
  225. break
  226. case 4:
  227. return '供应商退款'
  228. break
  229. }
  230. },
  231. formatOrderType(value) {
  232. switch (value) {
  233. case 1:
  234. return '自主订单'
  235. break
  236. case 2:
  237. return '协销订单'
  238. break
  239. case 3:
  240. return '客服订单'
  241. break
  242. }
  243. },
  244. formatStateType(value) {
  245. switch (value) {
  246. case 0:
  247. return '待确认'
  248. break
  249. case 1:
  250. return '已确认'
  251. break
  252. case 2:
  253. return '待审核'
  254. break
  255. case 3:
  256. return '审核通过'
  257. break
  258. }
  259. },
  260. StateExpFormat(state) {
  261. //订单状态文字和颜色
  262. var HtmlStateText = '',
  263. stateTextObject = {
  264. 0: '待确认',
  265. 4: '交易完成',
  266. 5: '订单完成',
  267. 6: '已关闭',
  268. 7: '交易全退',
  269. 77: '交易全退',
  270. 11: '待付款待发货',
  271. 12: '待付款部分发货',
  272. 13: '待付款已发货',
  273. 21: '部分付款待发货',
  274. 22: '部分付款部分发货',
  275. 23: '部分付款已发货',
  276. 31: '已付款待发货',
  277. 32: '已付款部分发货',
  278. 33: '已付款已发货',
  279. 111: '待付款待发货'
  280. }
  281. Object.keys(stateTextObject).forEach(function(key) {
  282. if (key == state) {
  283. HtmlStateText = stateTextObject[key]
  284. }
  285. })
  286. return HtmlStateText
  287. },
  288. NumFormat: function(text) {
  289. //处理金额
  290. return Number(text).toFixed(2)
  291. }
  292. },
  293. computed: {
  294. ...mapState(['hasLogin', 'userInfo'])
  295. },
  296. methods: {
  297. bindPickerChange(type, e) {
  298. // 选择选项
  299. switch (type) {
  300. case 1:
  301. this.paymentTypeText = this.paymentActions[e.target.value].name
  302. this.params.type = this.paymentActions[e.target.value].value
  303. console.log('款项类型', this.paymentTypeText)
  304. console.log('款项类型', this.params.type)
  305. break
  306. case 2:
  307. this.banksTypeText = this.banksActions[e.target.value].name
  308. this.params.banksType = this.banksActions[e.target.value].value
  309. console.log('收款类型', this.params.banksType)
  310. break
  311. }
  312. },
  313. showTuiDateTime() {
  314. this.$refs.dateTime.show()
  315. },
  316. confirmDistinguish() {
  317. if (this.params.amount == '') {
  318. this.$util.msg('请输入收款金额', 2000)
  319. return
  320. }
  321. if (this.isCheckedCharge) {
  322. if (this.params.chargeValue == '') {
  323. this.$util.msg('请输入手续费', 2000)
  324. return
  325. }
  326. }
  327. if (this.params.remarks == '') {
  328. this.$util.msg('请填写收款备注', 2000)
  329. return
  330. }
  331. if (this.params.type == 1) {
  332. this.contentModalTitle = '确定收款吗?'
  333. this.contentModalText = '确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。' //操作文字提示语句
  334. } else if (this.params.type == 2) {
  335. this.contentModalTitle = ''
  336. this.contentModalText = '确定返佣收款吗?' //操作文字提示语句
  337. } else if (this.params.type == 3) {
  338. this.contentModalTitle = ''
  339. this.contentModalText = '确定供应商退款吗?' //操作文字提示语句
  340. }
  341. this.modal = true
  342. console.log('收款')
  343. },
  344. handleClick(e) {
  345. // 确认收款
  346. if (e.index == 1) {
  347. this.$api.navigateTo('/pages/collection/detail')
  348. }
  349. this.modal = false
  350. },
  351. hideMobel() {
  352. this.modal = false
  353. },
  354. checkedCharge() {
  355. // 勾选手续费
  356. this.isCheckedCharge = !this.isCheckedCharge
  357. },
  358. changeNumber(e) {
  359. // 校验输入为数字
  360. if (!this.$api.isNumber(e.detail.value)) {
  361. this.params.amount = ''
  362. } else {
  363. this.params.amount = e.detail.value
  364. }
  365. },
  366. toNoSms(url) {
  367. this.$api.navigateTo(url)
  368. },
  369. formatColor(state) {
  370. //设置邀请码状态亚瑟
  371. let stateColor = '',
  372. stateColorObject = {
  373. 0: '#f0ad4e',
  374. 1: '#4cd964',
  375. 2: '#dd524d',
  376. 3: '#007aff'
  377. }
  378. Object.keys(stateColorObject).forEach(function(key) {
  379. if (key == state) {
  380. stateColor = stateColorObject[key]
  381. }
  382. })
  383. return stateColor
  384. },
  385. },
  386. onPageScroll(e) {
  387. //实时获取到滚动的值
  388. // if (e.scrollTop > 30) {
  389. // this.isCmcustomClass = 'fiexd'
  390. // } else {
  391. // this.isCmcustomClass = 'left'
  392. // }
  393. },
  394. onPullDownRefresh() {
  395. setTimeout(() => {
  396. // this.initSsoMemberCollectionList()
  397. uni.stopPullDownRefresh()
  398. }, 200)
  399. },
  400. onShow() {
  401. if (this.hasLogin) {
  402. this.GetDataInfo()
  403. }
  404. }
  405. }
  406. </script>
  407. <style lang="scss">
  408. @import '@/uni.scss';
  409. page {
  410. background: #fff;
  411. }
  412. .tui-header-box {
  413. width: 100%;
  414. background: #ffffff;
  415. z-index: 999;
  416. background-size: cover;
  417. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  418. &.fiexd {
  419. position: fixed;
  420. top: 0;
  421. left: 0;
  422. }
  423. }
  424. .header-top {
  425. width: 100%;
  426. font-size: 16px;
  427. font-weight: 500;
  428. height: 32px;
  429. display: flex;
  430. align-items: center;
  431. justify-content: center;
  432. position: relative;
  433. padding: 0 40rpx;
  434. }
  435. .header-sit {
  436. width: 100%;
  437. box-sizing: border-box;
  438. height: 80rpx;
  439. line-height: 80rpx;
  440. box-sizing: border-box;
  441. color: #ffffff;
  442. .header-sit-text {
  443. text-align: left;
  444. font-size: $font-size-40;
  445. font-weight: 600;
  446. font-family: '正楷';
  447. }
  448. .icon-fanhui {
  449. display: block;
  450. width: 80rpx;
  451. height: 80rpx;
  452. float: left;
  453. text-align: center;
  454. line-height: 80rpx;
  455. font-size: 42rpx;
  456. }
  457. .icon-iconfonticonfontsousuo1 {
  458. font-size: 42rpx;
  459. margin-left: 30rpx;
  460. }
  461. }
  462. .mine {
  463. width: 100%;
  464. height: 100%;
  465. position: relative;
  466. }
  467. .distinguish-section {
  468. width: 100%;
  469. position: absolute;
  470. padding: 40rpx 20rpx;
  471. box-sizing: border-box;
  472. }
  473. .distinguish-section-conten {
  474. width: 100%;
  475. height: auto;
  476. position: relative;
  477. background-color: #ffffff;
  478. border-radius: 20rpx;
  479. padding: 20rpx;
  480. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  481. .section-top {
  482. width: 100%;
  483. height: 66rpx;
  484. box-sizing: border-box;
  485. .title {
  486. float: left;
  487. height: 66rpx;
  488. padding: 13rpx 0;
  489. .list-title-tip {
  490. float: left;
  491. margin-right: 15rpx;
  492. .badges {
  493. display: block;
  494. float: left;
  495. padding: 0 15rpx;
  496. height: 40rpx;
  497. line-height: 40rpx;
  498. border-radius: 4rpx;
  499. background: $btn-confirm;
  500. font-size: $font-size-24;
  501. text-align: center;
  502. color: #ffffff;
  503. }
  504. }
  505. .title-text{
  506. float: left;
  507. line-height: 40rpx;
  508. height: 40rpx;
  509. color: #333333;
  510. text-align: left;
  511. font-weight: 600;
  512. }
  513. }
  514. .button {
  515. float: right;
  516. box-sizing: border-box;
  517. padding: 0 24rpx;
  518. height: 100%;
  519. line-height: 66rpx;
  520. background: $btn-confirm;
  521. border-radius: 8rpx;
  522. text-align: center;
  523. color: #ffffff;
  524. }
  525. }
  526. .section-top-item {
  527. width: 100%;
  528. height: auto;
  529. margin-top: 10rpx;
  530. position: relative;
  531. float: left;
  532. .list-title-b {
  533. width: 100%;
  534. height: 44rpx;
  535. float: left;
  536. font-size: $font-size-24;
  537. line-height: 44rpx;
  538. color: #666666;
  539. text-align: left;
  540. .text{
  541. color: #999999;
  542. }
  543. .list-title-b-item {
  544. width: 50%;
  545. height: 100%;
  546. float: left;
  547. }
  548. &.sms {
  549. height: 120rpx;
  550. padding: 10rpx;
  551. border-radius: 4rpx;
  552. background: #F7F7F7;
  553. }
  554. }
  555. .list-icon {
  556. width: 120rpx;
  557. height: 60rpx;
  558. border: 1px solid #e1e1e1;
  559. border-radius: 10rpx;
  560. text-align: center;
  561. font-size: 20rpx;
  562. line-height: 60rpx;
  563. position: absolute;
  564. right: 90rpx;
  565. top: 40rpx;
  566. color: #dd524d;
  567. z-index: 99;
  568. transform: rotate(45deg);
  569. -webkit-transform: rotate(45deg);
  570. -moz-transform: rotate(45deg);
  571. font-family: '正楷';
  572. }
  573. }
  574. .section-title {
  575. width: 100%;
  576. height: 66rpx;
  577. float: left;
  578. font-size: $font-size-28;
  579. line-height: 66rpx;
  580. color: #333333;
  581. text-align: left;
  582. font-weight: 600;
  583. }
  584. .section-mid {
  585. width: 100%;
  586. height: auto;
  587. display: flex;
  588. flex-direction: column;
  589. position: relative;
  590. border-radius: 0 0 20rpx 20rpx;
  591. .list-title {
  592. width: 100%;
  593. height: auto;
  594. .list-title-t {
  595. width: 100%;
  596. height: 50rpx;
  597. float: left;
  598. font-size: $font-size-28;
  599. padding-bottom: 10rpx;
  600. .list-title-num {
  601. float: left;
  602. text-align: left;
  603. color: #e15616;
  604. margin-left: 30rpx;
  605. line-height: 40rpx;
  606. }
  607. .list-title-tip {
  608. float: left;
  609. .badges {
  610. display: block;
  611. float: left;
  612. padding: 0 15rpx;
  613. height: 40rpx;
  614. line-height: 40rpx;
  615. border-radius: 4rpx;
  616. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  617. font-size: $font-size-24;
  618. text-align: center;
  619. color: #ffffff;
  620. }
  621. }
  622. }
  623. .list-title-b {
  624. width: 100%;
  625. height: 50rpx;
  626. float: left;
  627. font-size: $font-size-24;
  628. line-height: 50rpx;
  629. color: #666666;
  630. text-align: left;
  631. .text{
  632. color: #999999;
  633. }
  634. .list-title-b-item {
  635. width: 50%;
  636. height: 100%;
  637. float: left;
  638. }
  639. }
  640. }
  641. }
  642. .section-tips{
  643. width: 100%;
  644. height: 50rpx;
  645. font-size: $font-size-28;
  646. line-height: 50rpx;
  647. color: $uni-color-error;
  648. text-align: left;
  649. }
  650. }
  651. .distinguish-button {
  652. width: 100%;
  653. position: fixed;
  654. bottom: 0;
  655. left: 0;
  656. background-color: #ffffff;
  657. padding: 0 50rpx;
  658. padding-top: 20rpx;
  659. display: flex;
  660. .button {
  661. flex: 1;
  662. height: 80rpx;
  663. margin: 0 20rpx;
  664. border-radius: 40rpx;
  665. text-align: center;
  666. color: #ffffff;
  667. line-height: 80rpx;
  668. font-size: $font-size-28;
  669. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  670. &.confirm{
  671. background: $btn-confirm;
  672. }
  673. &.cancel{
  674. background: $uni-color-error;
  675. }
  676. }
  677. }
  678. </style>