detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  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 + 'px', left: 0 + 'px' }">
  17. <view class="distinguish-section-conten">
  18. <view class="section-rows">
  19. <view class="rows-label">收款金额:</view>
  20. <view class="rows-mains">
  21. <text>¥1000.00</text>
  22. </view>
  23. </view>
  24. <view class="section-rows">
  25. <view class="rows-label">收款类型:</view>
  26. <view class="rows-mains">
  27. <text>中信银行0897</text>
  28. </view>
  29. </view>
  30. <view class="section-rows">
  31. <view class="rows-label">收款时间:</view>
  32. <view class="rows-mains">
  33. <text>2021-05-29 14:42:00</text>
  34. </view>
  35. </view>
  36. <view class="section-rows">
  37. <view class="rows-label">手续费:</view>
  38. <view class="rows-mains">
  39. <text>¥1000.00</text>
  40. </view>
  41. </view>
  42. <view class="section-title">收款短信</view>
  43. <view class="section-textarea msg">
  44. <view class="textarea">【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币9901.00元,当前余额***元。</view>
  45. </view>
  46. <view class="section-title">收款备注</view>
  47. <view class="section-textarea">
  48. <view class="textarea">请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注请输入收款备注</view>
  49. </view>
  50. </view>
  51. <view class="distinguish-button">
  52. <button class="button" open-type="share" :data-payment="payment">分享</button>
  53. </view>
  54. </view>
  55. <!-- 时间组件 -->
  56. <tui-datetime ref="dateTime" :type="7" :startYear="startYear" :endYear="endYear" cancelColor="#555555"
  57. color="#4688fa" @confirm="bindStartDateChange"></tui-datetime>
  58. <!-- 弹窗提示 -->
  59. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :title="contentModalTitle"
  60. :content="contentModalText" :button="modalButton" color="#333" :size="32" shape="circle"
  61. :maskClosable="false">
  62. </tui-modal>
  63. </view>
  64. </template>
  65. <script>
  66. import statistic_bg2 from '@/static/temp/statistic_bg2.png'
  67. import statistic_bg1 from '@/static/temp/statistic_bg1.png'
  68. import wxLogin from '@/services/wxLogin.js'
  69. import {
  70. mapState,
  71. mapMutations
  72. } from 'vuex'
  73. export default {
  74. data() {
  75. return {
  76. payment:{
  77. id: 6090,
  78. receiptAmount: 500000, //收款金额
  79. associateAmount: 5000, //关联金额
  80. payType: '广发银行-0115', //收款类型
  81. receiptDate: '2022-02-15 10:58:25', // 收款时间
  82. reviewDate: '2022-02-15 10:58:25', // 审核时间
  83. smsContent: '【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币99.00元,当前余额为人民币13871.67元。',
  84. confirmType: 0,
  85. userName: '采美网络信息有限公司',
  86. sourceType: 2,
  87. state: 1
  88. },
  89. nvabarData: {
  90. //顶部自定义导航
  91. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  92. showSearch: 0,
  93. title: '', // 导航栏 中间的标题
  94. haveBack: false,
  95. home: false,
  96. textLeft: this.$store.state.isIphone,
  97. bgColor: '#D33020',
  98. textColor: '#ffffff'
  99. },
  100. type: 7,
  101. setDateTime: '',
  102. startYear: 1980,
  103. endYear: 2030,
  104. modalButton: [{
  105. text: '取消',
  106. type: 'gray',
  107. plain: true //是否空心
  108. },
  109. {
  110. text: '确认',
  111. customStyle: {
  112. color: '#fff',
  113. bgColor: '#4688fa'
  114. },
  115. plain: false
  116. }
  117. ],
  118. paymentActions: [{
  119. name: '普通款项',
  120. value: 1
  121. },
  122. {
  123. name: '返佣款项',
  124. value: 2
  125. },
  126. {
  127. name: '供应商退款',
  128. value: 3
  129. }
  130. ],
  131. banksActions: [{
  132. name: '建设银行-7297',
  133. value: 1
  134. },
  135. {
  136. name: '广发银行-0115',
  137. value: 2
  138. },
  139. {
  140. name: '中信银行-7172',
  141. value: 3
  142. },
  143. {
  144. name: '中信银行-0897',
  145. value: 4
  146. },
  147. {
  148. name: '中信银行0897-财付通',
  149. value: 5
  150. },
  151. {
  152. name: '中信银行0897-支付宝',
  153. value: 6
  154. },
  155. {
  156. name: '支付宝',
  157. value: 7
  158. },
  159. {
  160. name: '微信支付',
  161. value: 8
  162. },
  163. {
  164. name: '快钱支付',
  165. value: 9
  166. }
  167. ],
  168. paymentTypeText: '普通款项', // 款项类型显示文案
  169. banksTypeText: '建设银行-7297', // 款项类型显示文案
  170. params: {
  171. type: 1,
  172. banksType: 1,
  173. amount: '',
  174. chargeValue: '',
  175. remarks: '',
  176. time: this.$api.getNowFormatDate()
  177. },
  178. infoData: {},
  179. isCmcustomClass: 'left',
  180. statistic_bg: statistic_bg2,
  181. statistic_bg1: statistic_bg1,
  182. CustomBar: this.CustomBar, // 顶部导航栏高度
  183. height: 64, //header高度
  184. top: 0, //标题图标距离顶部距离
  185. scrollH: 0, //滚动总高度
  186. opcity: 1,
  187. isCheckedCharge: false,
  188. contentModalTitle: '',
  189. contentModalText: '', //操作文字提示语句
  190. modal: false,
  191. }
  192. },
  193. onLoad() {
  194. let obj = {}
  195. // #ifdef MP-WEIXIN
  196. obj = wx.getMenuButtonBoundingClientRect()
  197. // #endif
  198. // #ifdef MP-BAIDU
  199. obj = swan.getMenuButtonBoundingClientRect()
  200. // #endif
  201. // #ifdef MP-ALIPAY
  202. my.hideAddToDesktopMenu()
  203. // #endif
  204. uni.getSystemInfo({
  205. success: res => {
  206. this.width = obj.left || res.windowWidth
  207. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  208. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  209. this.scrollH = res.windowWidth * 0.6
  210. }
  211. })
  212. },
  213. filters: {
  214. NumFormat: function(text) {
  215. //处理金额
  216. return Number(text).toFixed(2)
  217. }
  218. },
  219. computed: {
  220. ...mapState(['hasLogin', 'userInfo'])
  221. },
  222. methods: {
  223. bindPickerChange(type, e) {
  224. // 选择选项
  225. switch (type) {
  226. case 1:
  227. this.paymentTypeText = this.paymentActions[e.target.value].name
  228. this.params.type = this.paymentActions[e.target.value].value
  229. console.log('款项类型', this.paymentTypeText)
  230. console.log('款项类型', this.params.type)
  231. break
  232. case 2:
  233. this.banksTypeText = this.paymentActions[e.target.value].name
  234. this.params.banksType = this.paymentActions[e.target.value].value
  235. console.log('收款类型', this.params.banksType)
  236. break
  237. }
  238. },
  239. showTuiDateTime() {
  240. this.$refs.dateTime.show()
  241. },
  242. bindStartDateChange(event) {
  243. //开始时间
  244. console.log('开始时间==>', event.result)
  245. this.params.time = event.result
  246. },
  247. confirmDistinguish() {
  248. if (this.params.amount == '') {
  249. this.$util.msg('请输入收款金额', 2000)
  250. return
  251. }
  252. if (this.isCheckedCharge) {
  253. if (this.params.chargeValue == '') {
  254. this.$util.msg('请输入手续费', 2000)
  255. return
  256. }
  257. }
  258. if (this.params.remarks == '') {
  259. this.$util.msg('请填写收款备注', 2000)
  260. return
  261. }
  262. if (this.params.type == 1) {
  263. this.contentModalTitle = '确定收款吗?'
  264. this.contentModalText = '确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。' //操作文字提示语句
  265. } else if (this.params.type == 2) {
  266. this.contentModalTitle = ''
  267. this.contentModalText = '确定返佣收款吗?' //操作文字提示语句
  268. } else if (this.params.type == 3) {
  269. this.contentModalTitle = ''
  270. this.contentModalText = '确定供应商退款吗?' //操作文字提示语句
  271. }
  272. this.modal = true
  273. console.log('收款')
  274. },
  275. handleClick(e) {
  276. // 确认收款
  277. if (e.index == 1) {
  278. }
  279. this.modal = false
  280. },
  281. hideMobel() {
  282. this.modal = false
  283. },
  284. checkedCharge() {
  285. // 勾选手续费
  286. this.isCheckedCharge = !this.isCheckedCharge
  287. },
  288. changeNumber(e) {
  289. // 校验输入为数字
  290. if (!this.$api.isNumber(e.detail.value)) {
  291. this.params.amount = ''
  292. } else {
  293. this.params.amount = e.detail.value
  294. }
  295. },
  296. navBack() {
  297. uni.navigateBack({
  298. delta: 1
  299. })
  300. }
  301. },
  302. onPageScroll(e) {
  303. //实时获取到滚动的值
  304. // if (e.scrollTop > 30) {
  305. // this.isCmcustomClass = 'fiexd'
  306. // } else {
  307. // this.isCmcustomClass = 'left'
  308. // }
  309. },
  310. onPullDownRefresh() {
  311. setTimeout(() => {
  312. // this.initSsoMemberCollectionList()
  313. uni.stopPullDownRefresh()
  314. }, 200)
  315. },
  316. onShareAppMessage(res) {
  317. //分享购买优惠券
  318. const payment = res.target.dataset.payment
  319. console.log('payment', payment)
  320. if (res.from === 'button') {
  321. // console.log('来自页面内转发按钮')
  322. return {
  323. title: `【待确认】收款金额${payment.receiptAmount.toFixed(2)}元,收款时间:${payment.receiptDate}`,
  324. path: `pages/seller/cart/coupon-share?payment=${payment.id}`,
  325. imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
  326. }
  327. }
  328. },
  329. onShow() {
  330. if (this.hasLogin) {
  331. this.GetDataInfo()
  332. }
  333. }
  334. }
  335. </script>
  336. <style lang="scss">
  337. @import '@/uni.scss';
  338. page {
  339. background: #fff;
  340. }
  341. .tui-header-box {
  342. width: 100%;
  343. background: #ffffff;
  344. z-index: 999;
  345. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  346. background-size: cover;
  347. &.fiexd {
  348. position: fixed;
  349. top: 0;
  350. left: 0;
  351. }
  352. }
  353. .header-top {
  354. width: 100%;
  355. font-size: 16px;
  356. font-weight: 500;
  357. height: 32px;
  358. display: flex;
  359. align-items: center;
  360. justify-content: center;
  361. position: relative;
  362. padding: 0 40rpx;
  363. }
  364. .header-sit {
  365. width: 100%;
  366. box-sizing: border-box;
  367. height: 80rpx;
  368. line-height: 80rpx;
  369. box-sizing: border-box;
  370. padding: 0 24rpx;
  371. color: #ffffff;
  372. .header-sit-text {
  373. text-align: left;
  374. font-size: $font-size-40;
  375. font-weight: 600;
  376. font-family: '正楷';
  377. }
  378. .icon-fanhui {
  379. display: block;
  380. width: 38rpx;
  381. height: 80rpx;
  382. float: left;
  383. text-align: left;
  384. line-height: 80rpx;
  385. font-size: 42rpx;
  386. margin-right: 15rpx;
  387. }
  388. }
  389. .mine {
  390. width: 100%;
  391. height: 100%;
  392. position: relative;
  393. }
  394. .distinguish-section {
  395. width: 100%;
  396. position: absolute;
  397. padding: 20rpx 20rpx;
  398. box-sizing: border-box;
  399. }
  400. .distinguish-section-conten {
  401. width: 100%;
  402. height: auto;
  403. position: relative;
  404. background-color: #ffffff;
  405. border-radius: 20rpx;
  406. padding: 20rpx;
  407. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  408. .section-rows {
  409. width: 100%;
  410. height: 80rpx;
  411. box-sizing: border-box;
  412. padding: 0 20rpx;
  413. border-radius: 8rpx;
  414. background: #f8f8f8;
  415. margin-bottom: 20rpx;
  416. line-height: 80rpx;
  417. display: flex;
  418. position: relative;
  419. &.disabled {
  420. background: #e1e1e1;
  421. }
  422. .rows-label {
  423. flex: 3;
  424. .iconfont {
  425. margin-right: 8rpx;
  426. &.icon-yixuanze {
  427. color: $color-system;
  428. }
  429. }
  430. }
  431. .rows-mains {
  432. flex: 7;
  433. text-align: left;
  434. font-size: $font-size-28;
  435. color: #666666;
  436. height: 80rpx;
  437. line-height: 80rpx;
  438. }
  439. .icon-xiayibu {
  440. display: block;
  441. width: 40rpx;
  442. height: 80rpx;
  443. position: absolute;
  444. right: 0;
  445. text-align: center;
  446. font-size: $font-size-32;
  447. }
  448. }
  449. .section-title {
  450. width: 100%;
  451. height: 40rpx;
  452. box-sizing: border-box;
  453. padding: 0 20rpx;
  454. text-align: left;
  455. font-size: $font-size-28;
  456. color: #333333;
  457. line-height: 40rpx;
  458. font-weight: bold;
  459. margin-bottom: 20rpx;
  460. }
  461. .section-textarea {
  462. width: 100%;
  463. height: 180rpx;
  464. box-sizing: border-box;
  465. padding: 20rpx;
  466. background: #f7f7f7;
  467. border-radius: 8rpx;
  468. &.msg {
  469. height: 180rpx;
  470. margin-bottom: 10rpx;
  471. }
  472. .textarea {
  473. width: 100%;
  474. height: 100%;
  475. color: #666666;
  476. }
  477. }
  478. }
  479. .distinguish-button {
  480. width: 100%;
  481. height: 80rpx;
  482. margin-top: 100rpx;
  483. box-sizing: border-box;
  484. padding: 0 50rpx;
  485. .button {
  486. width: 100%;
  487. height: 80rpx;
  488. background: $btn-confirm;
  489. border-radius: 40rpx;
  490. text-align: center;
  491. color: #ffffff;
  492. line-height: 80rpx;
  493. font-size: $font-size-28;
  494. }
  495. }
  496. .uni-badge--small {
  497. -webkit-transform: scale(0.8);
  498. -ms-transform: scale(0.8);
  499. transform: scale(0.8);
  500. -webkit-transform-origin: center center;
  501. -ms-transform-origin: center center;
  502. transform-origin: center center;
  503. }
  504. .uni-badge {
  505. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  506. -webkit-box-sizing: border-box;
  507. box-sizing: border-box;
  508. font-size: 12px;
  509. line-height: 1;
  510. display: inline-block;
  511. padding: 3px 6px;
  512. color: #333;
  513. border-radius: 100px;
  514. background-color: #f1f1f1;
  515. }
  516. .uni-badge-error {
  517. color: #fff;
  518. background-color: #dd524d;
  519. }
  520. </style>