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="this.$api.navigateBack(1)"></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"> 款项信息 </view>
  17. </view>
  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-size: cover;
  346. &.fiexd {
  347. position: fixed;
  348. top: 0;
  349. left: 0;
  350. background: #4688fa;
  351. border-radius: 0 0 30rpx 30rpx;
  352. }
  353. &.first {
  354. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  355. }
  356. }
  357. .header-top {
  358. width: 100%;
  359. font-size: 16px;
  360. font-weight: 500;
  361. height: 32px;
  362. display: flex;
  363. align-items: center;
  364. justify-content: center;
  365. position: relative;
  366. padding: 0 40rpx;
  367. }
  368. .header-sit {
  369. width: 400rpx;
  370. height: 80rpx;
  371. line-height: 80rpx;
  372. box-sizing: border-box;
  373. padding-left: 20rpx;
  374. text-align: left;
  375. .icon-fanhui2 {
  376. font-size: $font-size-44;
  377. color: #ffffff;
  378. }
  379. }
  380. .mine {
  381. width: 100%;
  382. height: 100%;
  383. position: relative;
  384. }
  385. .distinguish-section {
  386. width: 100%;
  387. position: absolute;
  388. padding: 40rpx 20rpx;
  389. box-sizing: border-box;
  390. }
  391. .distinguish-section-conten {
  392. width: 100%;
  393. height: auto;
  394. position: relative;
  395. background-color: #ffffff;
  396. border-radius: 20rpx;
  397. padding: 20rpx;
  398. box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
  399. .section-top {
  400. width: 100%;
  401. height: 106rpx;
  402. box-sizing: border-box;
  403. padding: 20rpx 0;
  404. .title {
  405. float: left;
  406. line-height: 66rpx;
  407. text-align: left;
  408. box-sizing: border-box;
  409. padding-left: 20rpx;
  410. font-size: $font-size-40;
  411. color: #333333;
  412. font-weight: 600;
  413. font-family: '正楷';
  414. .iconfont {
  415. color: #666666;
  416. font-size: $font-size-40;
  417. }
  418. }
  419. }
  420. .section-rows {
  421. width: 100%;
  422. height: 80rpx;
  423. box-sizing: border-box;
  424. padding: 0 20rpx;
  425. border-radius: 8rpx;
  426. background: #f8f8f8;
  427. margin-bottom: 20rpx;
  428. line-height: 80rpx;
  429. display: flex;
  430. position: relative;
  431. &.disabled {
  432. background: #e1e1e1;
  433. }
  434. .rows-label {
  435. flex: 3;
  436. .iconfont {
  437. margin-right: 8rpx;
  438. &.icon-yixuanze {
  439. color: $color-system;
  440. }
  441. }
  442. }
  443. .rows-mains {
  444. flex: 7;
  445. text-align: left;
  446. font-size: $font-size-28;
  447. color: #666666;
  448. height: 80rpx;
  449. line-height: 80rpx;
  450. }
  451. .icon-xiayibu {
  452. display: block;
  453. width: 40rpx;
  454. height: 80rpx;
  455. position: absolute;
  456. right: 0;
  457. text-align: center;
  458. font-size: $font-size-32;
  459. }
  460. }
  461. .section-title {
  462. width: 100%;
  463. height: 40rpx;
  464. box-sizing: border-box;
  465. padding: 0 20rpx;
  466. text-align: left;
  467. font-size: $font-size-28;
  468. color: #333333;
  469. line-height: 40rpx;
  470. font-weight: bold;
  471. margin-bottom: 20rpx;
  472. }
  473. .section-textarea {
  474. width: 100%;
  475. height: 180rpx;
  476. box-sizing: border-box;
  477. padding: 20rpx;
  478. background: #f7f7f7;
  479. border-radius: 8rpx;
  480. &.msg {
  481. height: 180rpx;
  482. margin-bottom: 10rpx;
  483. }
  484. .textarea {
  485. width: 100%;
  486. height: 100%;
  487. color: #666666;
  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>