detail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  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: 4,
  140. state: 11,
  141. isChecked: false,
  142. order: {
  143. orderId: 18751,
  144. number: 'W164488903271223',
  145. receiptAmount: 5000, //收款金额
  146. associateAmount: 5000, //关联金额
  147. orderType: 1, // 订单类型
  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. color: #ffffff;
  436. .header-sit-text {
  437. text-align: left;
  438. font-size: $font-size-40;
  439. font-weight: 600;
  440. font-family: '正楷';
  441. }
  442. .icon-fanhui {
  443. display: block;
  444. width: 80rpx;
  445. height: 80rpx;
  446. float: left;
  447. text-align: center;
  448. line-height: 80rpx;
  449. font-size: 42rpx;
  450. }
  451. .icon-iconfonticonfontsousuo1 {
  452. font-size: 42rpx;
  453. margin-left: 30rpx;
  454. }
  455. }
  456. .mine {
  457. width: 100%;
  458. height: 100%;
  459. position: relative;
  460. }
  461. .distinguish-section {
  462. width: 100%;
  463. position: absolute;
  464. padding: 40rpx 20rpx;
  465. box-sizing: border-box;
  466. }
  467. .distinguish-section-conten {
  468. width: 100%;
  469. height: auto;
  470. position: relative;
  471. background-color: #ffffff;
  472. border-radius: 20rpx;
  473. padding: 20rpx;
  474. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  475. .section-top {
  476. width: 100%;
  477. height: 66rpx;
  478. box-sizing: border-box;
  479. .title {
  480. float: left;
  481. height: 66rpx;
  482. padding: 13rpx 0;
  483. .list-title-tip {
  484. float: left;
  485. margin-right: 15rpx;
  486. .badges {
  487. display: block;
  488. float: left;
  489. padding: 0 15rpx;
  490. height: 40rpx;
  491. line-height: 40rpx;
  492. border-radius: 4rpx;
  493. background: $btn-confirm;
  494. font-size: $font-size-24;
  495. text-align: center;
  496. color: #ffffff;
  497. }
  498. }
  499. .title-text{
  500. float: left;
  501. line-height: 40rpx;
  502. height: 40rpx;
  503. color: #333333;
  504. text-align: left;
  505. font-weight: 600;
  506. }
  507. }
  508. .button {
  509. float: right;
  510. box-sizing: border-box;
  511. padding: 0 24rpx;
  512. height: 100%;
  513. line-height: 66rpx;
  514. background: $btn-confirm;
  515. border-radius: 8rpx;
  516. text-align: center;
  517. color: #ffffff;
  518. }
  519. }
  520. .section-top-item {
  521. width: 100%;
  522. height: auto;
  523. margin-top: 10rpx;
  524. position: relative;
  525. float: left;
  526. .list-title-b {
  527. width: 100%;
  528. height: 44rpx;
  529. float: left;
  530. font-size: $font-size-24;
  531. line-height: 44rpx;
  532. color: #666666;
  533. text-align: left;
  534. .text{
  535. color: #999999;
  536. }
  537. .list-title-b-item {
  538. width: 50%;
  539. height: 100%;
  540. float: left;
  541. }
  542. &.sms {
  543. height: 120rpx;
  544. padding: 10rpx;
  545. border-radius: 4rpx;
  546. background: #F7F7F7;
  547. }
  548. }
  549. .list-icon {
  550. width: 120rpx;
  551. height: 60rpx;
  552. border: 1px solid #e1e1e1;
  553. border-radius: 10rpx;
  554. text-align: center;
  555. font-size: 20rpx;
  556. line-height: 60rpx;
  557. position: absolute;
  558. right: 90rpx;
  559. top: 40rpx;
  560. color: #dd524d;
  561. z-index: 99;
  562. transform: rotate(45deg);
  563. -webkit-transform: rotate(45deg);
  564. -moz-transform: rotate(45deg);
  565. font-family: '正楷';
  566. }
  567. }
  568. .section-title {
  569. width: 100%;
  570. height: 66rpx;
  571. float: left;
  572. font-size: $font-size-28;
  573. line-height: 66rpx;
  574. color: #333333;
  575. text-align: left;
  576. font-weight: 600;
  577. }
  578. .section-mid {
  579. width: 100%;
  580. height: auto;
  581. display: flex;
  582. flex-direction: column;
  583. position: relative;
  584. border-radius: 0 0 20rpx 20rpx;
  585. .list-title {
  586. width: 100%;
  587. height: auto;
  588. .list-title-t {
  589. width: 100%;
  590. height: 50rpx;
  591. float: left;
  592. font-size: $font-size-28;
  593. padding-bottom: 10rpx;
  594. .list-title-num {
  595. float: left;
  596. text-align: left;
  597. color: #e15616;
  598. margin-left: 30rpx;
  599. line-height: 40rpx;
  600. }
  601. .list-title-tip {
  602. float: left;
  603. .badges {
  604. display: block;
  605. float: left;
  606. padding: 0 15rpx;
  607. height: 40rpx;
  608. line-height: 40rpx;
  609. border-radius: 4rpx;
  610. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  611. font-size: $font-size-24;
  612. text-align: center;
  613. color: #ffffff;
  614. }
  615. }
  616. }
  617. .list-title-a {
  618. width: 100%;
  619. height: auto;
  620. float: left;
  621. padding: 5rpx 8rpx;
  622. border-radius: 4rpx;
  623. background-color: rgba(247, 247, 247, 1);
  624. margin: 10rpx 0;
  625. .text{
  626. color: #999999;
  627. }
  628. .list-title-a-text {
  629. width: 100%;
  630. height: 50rpx;
  631. float: left;
  632. font-size: $font-size-24;
  633. line-height: 50rpx;
  634. color: #666666;
  635. text-align: left;
  636. }
  637. }
  638. .list-title-b {
  639. width: 100%;
  640. height: 50rpx;
  641. float: left;
  642. font-size: $font-size-24;
  643. line-height: 50rpx;
  644. color: #666666;
  645. text-align: left;
  646. .text{
  647. color: #999999;
  648. }
  649. .list-title-b-item {
  650. width: 50%;
  651. height: 100%;
  652. float: left;
  653. }
  654. }
  655. }
  656. }
  657. .section-tips{
  658. width: 100%;
  659. height: 50rpx;
  660. font-size: $font-size-28;
  661. line-height: 50rpx;
  662. color: $uni-color-error;
  663. text-align: left;
  664. }
  665. }
  666. .distinguish-button {
  667. width: 100%;
  668. position: fixed;
  669. bottom: 0;
  670. left: 0;
  671. background-color: #ffffff;
  672. padding: 0 50rpx;
  673. padding-top: 20rpx;
  674. display: flex;
  675. .button {
  676. flex: 1;
  677. height: 80rpx;
  678. margin: 0 20rpx;
  679. border-radius: 40rpx;
  680. text-align: center;
  681. color: #ffffff;
  682. line-height: 80rpx;
  683. font-size: $font-size-28;
  684. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  685. &.confirm{
  686. background: $btn-confirm;
  687. }
  688. &.cancel{
  689. background: $uni-color-error;
  690. }
  691. }
  692. }
  693. </style>