detail.vue 17 KB

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