detail.vue 17 KB

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