detail.vue 17 KB

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