detail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  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: function(text) {
  294. //处理金额
  295. return Number(text).toFixed(2)
  296. }
  297. },
  298. computed: {
  299. ...mapState(['hasLogin', 'userInfo'])
  300. },
  301. methods: {
  302. bindPickerChange(type, e) {
  303. // 选择选项
  304. switch (type) {
  305. case 1:
  306. this.paymentTypeText = this.paymentActions[e.target.value].name
  307. this.params.type = this.paymentActions[e.target.value].value
  308. console.log('款项类型', this.paymentTypeText)
  309. console.log('款项类型', this.params.type)
  310. break
  311. case 2:
  312. this.banksTypeText = this.banksActions[e.target.value].name
  313. this.params.banksType = this.banksActions[e.target.value].value
  314. console.log('收款类型', this.params.banksType)
  315. break
  316. }
  317. },
  318. showTuiDateTime() {
  319. this.$refs.dateTime.show()
  320. },
  321. confirmDistinguish() {
  322. if (this.params.amount == '') {
  323. this.$util.msg('请输入收款金额', 2000)
  324. return
  325. }
  326. if (this.isCheckedCharge) {
  327. if (this.params.chargeValue == '') {
  328. this.$util.msg('请输入手续费', 2000)
  329. return
  330. }
  331. }
  332. if (this.params.remarks == '') {
  333. this.$util.msg('请填写收款备注', 2000)
  334. return
  335. }
  336. if (this.params.type == 1) {
  337. this.contentModalTitle = '确定收款吗?'
  338. this.contentModalText = '确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。' //操作文字提示语句
  339. } else if (this.params.type == 2) {
  340. this.contentModalTitle = ''
  341. this.contentModalText = '确定返佣收款吗?' //操作文字提示语句
  342. } else if (this.params.type == 3) {
  343. this.contentModalTitle = ''
  344. this.contentModalText = '确定供应商退款吗?' //操作文字提示语句
  345. }
  346. this.modal = true
  347. console.log('收款')
  348. },
  349. handleClick(e) {
  350. // 确认收款
  351. if (e.index == 1) {
  352. this.$api.navigateTo('/pages/collection/detail')
  353. }
  354. this.modal = false
  355. },
  356. hideMobel() {
  357. this.modal = false
  358. },
  359. checkedCharge() {
  360. // 勾选手续费
  361. this.isCheckedCharge = !this.isCheckedCharge
  362. },
  363. changeNumber(e) {
  364. // 校验输入为数字
  365. if (!this.$api.isNumber(e.detail.value)) {
  366. this.params.amount = ''
  367. } else {
  368. this.params.amount = e.detail.value
  369. }
  370. },
  371. toNoSms(url) {
  372. this.$api.navigateTo(url)
  373. },
  374. formatColor(state) {
  375. //设置邀请码状态亚瑟
  376. let stateColor = '',
  377. stateColorObject = {
  378. 0: '#f0ad4e',
  379. 1: '#4cd964',
  380. 2: '#dd524d',
  381. 3: '#007aff'
  382. }
  383. Object.keys(stateColorObject).forEach(function(key) {
  384. if (key == state) {
  385. stateColor = stateColorObject[key]
  386. }
  387. })
  388. return stateColor
  389. },
  390. },
  391. onPageScroll(e) {
  392. //实时获取到滚动的值
  393. // if (e.scrollTop > 30) {
  394. // this.isCmcustomClass = 'fiexd'
  395. // } else {
  396. // this.isCmcustomClass = 'left'
  397. // }
  398. },
  399. onPullDownRefresh() {
  400. setTimeout(() => {
  401. // this.initSsoMemberCollectionList()
  402. uni.stopPullDownRefresh()
  403. }, 200)
  404. },
  405. onShow() {
  406. if (this.hasLogin) {
  407. this.GetDataInfo()
  408. }
  409. }
  410. }
  411. </script>
  412. <style lang="scss">
  413. @import '@/uni.scss';
  414. page {
  415. background: #fff;
  416. }
  417. .tui-header-box {
  418. width: 100%;
  419. background: #ffffff;
  420. z-index: 999;
  421. background-size: cover;
  422. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  423. &.fiexd {
  424. position: fixed;
  425. top: 0;
  426. left: 0;
  427. }
  428. }
  429. .header-top {
  430. width: 100%;
  431. font-size: 16px;
  432. font-weight: 500;
  433. height: 32px;
  434. display: flex;
  435. align-items: center;
  436. justify-content: center;
  437. position: relative;
  438. padding: 0 40rpx;
  439. }
  440. .header-sit {
  441. width: 100%;
  442. box-sizing: border-box;
  443. height: 80rpx;
  444. line-height: 80rpx;
  445. box-sizing: border-box;
  446. color: #ffffff;
  447. .header-sit-text {
  448. text-align: left;
  449. font-size: $font-size-40;
  450. font-weight: 600;
  451. font-family: '正楷';
  452. }
  453. .icon-fanhui {
  454. display: block;
  455. width: 80rpx;
  456. height: 80rpx;
  457. float: left;
  458. text-align: center;
  459. line-height: 80rpx;
  460. font-size: 42rpx;
  461. }
  462. .icon-iconfonticonfontsousuo1 {
  463. font-size: 42rpx;
  464. margin-left: 30rpx;
  465. }
  466. }
  467. .mine {
  468. width: 100%;
  469. height: 100%;
  470. position: relative;
  471. }
  472. .distinguish-section {
  473. width: 100%;
  474. position: absolute;
  475. padding: 40rpx 20rpx;
  476. box-sizing: border-box;
  477. }
  478. .distinguish-section-conten {
  479. width: 100%;
  480. height: auto;
  481. position: relative;
  482. background-color: #ffffff;
  483. border-radius: 20rpx;
  484. padding: 20rpx;
  485. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  486. .section-top {
  487. width: 100%;
  488. height: 66rpx;
  489. box-sizing: border-box;
  490. .title {
  491. float: left;
  492. height: 66rpx;
  493. padding: 13rpx 0;
  494. .list-title-tip {
  495. float: left;
  496. margin-right: 15rpx;
  497. .badges {
  498. display: block;
  499. float: left;
  500. padding: 0 15rpx;
  501. height: 40rpx;
  502. line-height: 40rpx;
  503. border-radius: 4rpx;
  504. background: $btn-confirm;
  505. font-size: $font-size-24;
  506. text-align: center;
  507. color: #ffffff;
  508. }
  509. }
  510. .title-text{
  511. float: left;
  512. line-height: 40rpx;
  513. height: 40rpx;
  514. color: #333333;
  515. text-align: left;
  516. font-weight: 600;
  517. }
  518. }
  519. .button {
  520. float: right;
  521. box-sizing: border-box;
  522. padding: 0 24rpx;
  523. height: 100%;
  524. line-height: 66rpx;
  525. background: $btn-confirm;
  526. border-radius: 8rpx;
  527. text-align: center;
  528. color: #ffffff;
  529. }
  530. }
  531. .section-top-item {
  532. width: 100%;
  533. height: auto;
  534. margin-top: 10rpx;
  535. position: relative;
  536. float: left;
  537. .list-title-b {
  538. width: 100%;
  539. height: 44rpx;
  540. float: left;
  541. font-size: $font-size-24;
  542. line-height: 44rpx;
  543. color: #999999;
  544. text-align: left;
  545. .text{
  546. color: #999999;
  547. }
  548. .list-title-b-item {
  549. width: 50%;
  550. height: 100%;
  551. float: left;
  552. }
  553. &.sms {
  554. height: 120rpx;
  555. padding: 10rpx;
  556. border-radius: 4rpx;
  557. background: #F7F7F7;
  558. }
  559. }
  560. }
  561. .section-title {
  562. width: 100%;
  563. height: 66rpx;
  564. float: left;
  565. font-size: $font-size-28;
  566. line-height: 66rpx;
  567. color: #333333;
  568. text-align: left;
  569. font-weight: 600;
  570. }
  571. .section-mid {
  572. width: 100%;
  573. height: auto;
  574. display: flex;
  575. flex-direction: column;
  576. position: relative;
  577. border-radius: 0 0 20rpx 20rpx;
  578. .list-title {
  579. width: 100%;
  580. height: auto;
  581. .list-title-t {
  582. width: 100%;
  583. height: 50rpx;
  584. float: left;
  585. font-size: $font-size-28;
  586. padding-bottom: 10rpx;
  587. .list-title-num {
  588. float: left;
  589. text-align: left;
  590. color: #e15616;
  591. margin-left: 30rpx;
  592. line-height: 40rpx;
  593. }
  594. .list-title-tip {
  595. float: left;
  596. .badges {
  597. display: block;
  598. float: left;
  599. padding: 0 15rpx;
  600. height: 40rpx;
  601. line-height: 40rpx;
  602. border-radius: 4rpx;
  603. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  604. font-size: $font-size-24;
  605. text-align: center;
  606. color: #ffffff;
  607. }
  608. }
  609. }
  610. .list-title-b {
  611. width: 100%;
  612. height: 50rpx;
  613. float: left;
  614. font-size: $font-size-24;
  615. line-height: 50rpx;
  616. color: #666666;
  617. text-align: left;
  618. .text{
  619. color: #999999;
  620. }
  621. .list-title-b-item {
  622. width: 50%;
  623. height: 100%;
  624. float: left;
  625. }
  626. }
  627. }
  628. }
  629. .section-tips{
  630. width: 100%;
  631. height: 50rpx;
  632. font-size: $font-size-28;
  633. line-height: 50rpx;
  634. color: $uni-color-error;
  635. text-align: left;
  636. }
  637. }
  638. .distinguish-button {
  639. width: 100%;
  640. position: fixed;
  641. bottom: 0;
  642. left: 0;
  643. background-color: #ffffff;
  644. padding: 0 50rpx;
  645. padding-top: 20rpx;
  646. display: flex;
  647. .button {
  648. flex: 1;
  649. height: 80rpx;
  650. margin: 0 20rpx;
  651. border-radius: 40rpx;
  652. text-align: center;
  653. color: #ffffff;
  654. line-height: 80rpx;
  655. font-size: $font-size-28;
  656. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  657. &.confirm{
  658. background: $btn-confirm;
  659. }
  660. &.cancel{
  661. background: $uni-color-error;
  662. }
  663. }
  664. }
  665. </style>