detail.vue 13 KB

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