list.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117
  1. <template>
  2. <view class="container mine clearfix">
  3. <view class="tui-header-box first"
  4. :style="{ height: CustomBar + 6 + 'px' }">
  5. <view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
  6. <view class="header-sit">
  7. <text class="iconfont icon-fanhui" @click.stop="this.$api.navigateBack(1)"></text>
  8. <text class="header-sit-text">收款列表</text>
  9. <text class="iconfont icon-iconfonticonfontsousuo1" @click.stop="rDrawer"></text>
  10. </view>
  11. </view>
  12. <view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
  13. <view class="main one">
  14. <view class="main-item one" v-for="(item, index) in listTabs" :key="index"
  15. :class="{ active: currents == index }" @click="tabClick(1, index, item.type)">
  16. <view class="text">{{ item.name }}</view>
  17. </view>
  18. </view>
  19. <view class="main day" v-if="currents == 0">
  20. <view class="main-item tab" v-for="(item, index) in listTabsType" :key="index"
  21. :class="{ tabActive: tabCurrents == index }" @click="tabClick(2, index, item.type)">
  22. <view class="text">{{ item.name }}</view>
  23. </view>
  24. </view>
  25. <view class="main day" v-if="currents == 2 || currents == 3">
  26. <view class="main-item tab" v-for="(item, index) in listReturnType" :key="index"
  27. :class="{ tabActive: tabCurrents == index }" @click="tabClick(2, index, item.type)">
  28. <view class="text">{{ item.name }}</view>
  29. </view>
  30. </view>
  31. </view>
  32. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="true" :loadingType="7"></tui-skeleton>
  33. <view class="user-section" v-else :style="{
  34. top: currents == 1 ? CustomBar + 71 + 'px' : CustomBar + 105 + 'px',
  35. left: 0 + 'px'
  36. }">
  37. <view class="header-content">
  38. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
  39. <!-- 空白页 -->
  40. <empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
  41. <!-- 列表 -->
  42. <view v-else class="tui-order-content">
  43. <view class="tui-order-item" v-for="(receipt, payIndex) in payList" :key="payIndex">
  44. <view class="list-title" @click.stop="receiptDetail(receipt)">
  45. <view class="list-title-t">
  46. <view class="list-title-tip">
  47. <text class="badges">{{ receipt.receiptType | formatReceiptType }}</text>
  48. </view>
  49. <view class="list-title-num" :style="{ color: formatColor(receipt.receiptStatus) }">{{
  50. receipt.receiptStatusText
  51. }}</view>
  52. </view>
  53. <view class="list-title-b">
  54. 收款金额:<text class="text">¥{{ receipt.receiptAmount | NumFormat }}</text>
  55. </view>
  56. <view class="list-title-b" v-if="receipt.associateAmount">
  57. 关联金额:<text class="text">¥{{ receipt.associateAmount | NumFormat }}</text>
  58. </view>
  59. <view class="list-title-b">
  60. 收款类型:<text class="text">{{ receipt.payTypeText }}</text>
  61. </view>
  62. <view class="list-title-b">
  63. 收款时间:<text class="text">{{ receipt.receiptDate }}</text>
  64. </view>
  65. <view class="list-title-b" v-if="receipt.reviewDate">
  66. 审核时间:<text class="text">{{ receipt.reviewDate }}</text>
  67. </view>
  68. <view class="list-title-b" v-if="userName">
  69. 客户名称:<text class="text">{{ receipt.userName }}</text>
  70. </view>
  71. <template v-if="receipt.smsContent">
  72. <view class="list-title-b">收款短信:</view>
  73. <view class="list-title-b sms">
  74. <text class="text">{{ receipt.smsContent }}</text>
  75. </view>
  76. </template>
  77. </view>
  78. <button class="list-shaore"
  79. open-type="share"
  80. :data-receipt="receipt"
  81. v-if="receipt.receiptType !=3 "
  82. >
  83. <text class="iconfont icon-fenxiang"></text>
  84. </button>
  85. <!-- 底部button -->
  86. <list-button ref="listButton" :status="receipt.receiptStatus" :dataInfo="receipt"
  87. @buttonConfirm="handButtonConfirm">
  88. </list-button>
  89. </view>
  90. <!--加载loadding-->
  91. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  92. <tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText"></tui-nomore>
  93. <!--加载loadding-->
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <!-- 口头返佣按钮 -->
  99. <view class="tui-icon-button" v-if="currents == 2" @click="toNoSms('/pages/relation/return/list')">
  100. <text class="iconfont icon-jiahao"></text>
  101. </view>
  102. <!--右抽屉-->
  103. <tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
  104. <view class="d-container clearfix" :style="{ paddingTop: CustomBar + 10 + 'px' }">
  105. <view class="drawer-main">
  106. <view class="drawer-main-name">日期</view>
  107. <view class="drawer-main-time">
  108. <view class="drawer-main-time-input">
  109. <picker mode="date" :value="date" :start="startDate" :end="endDate"
  110. @change="bindStartDateChange">
  111. <text class="input-text">{{ listQuery.startDate }}</text>
  112. </picker>
  113. <text class="iconfont icon-riqi"></text>
  114. </view>
  115. <view class="line">-</view>
  116. <view class="drawer-main-time-input">
  117. <picker mode="date" :value="date" :start="startDate" :end="endDate"
  118. @change="bindEndDateChange">
  119. <text class="input-text">{{ listQuery.endDate }}</text>
  120. </picker>
  121. <text class="iconfont icon-riqi"></text>
  122. </view>
  123. </view>
  124. <view class="drawer-main-name">收款短信(全匹配)</view>
  125. <view class="drawer-main-textarea">
  126. <textarea class="textarea" placeholder="请输入收款备注..." v-model="listQuery.smsContent" />
  127. </view>
  128. </view>
  129. <view class="drawer-input btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
  130. <view class="drawer-btn clear" @click="closeDrawer">取消</view>
  131. <view class="drawer-btn comfrim" @click="handSearchConfirm">确定</view>
  132. </view>
  133. </view>
  134. </tui-drawer>
  135. <!-- 弹窗 -->
  136. <tui-modal :show="modal" @click="handleClick" @cancel="hideMobel" :content="contentModalText" color="#333"
  137. :size="32" shape="circle" :maskClosable="false"></tui-modal>
  138. <!--设非订单款项弹窗 -->
  139. <tui-modal :show="modal1" :padding="'40rpx 30rpx'" @cancel="hideMobel1" :custom="true" fadeIn >
  140. <view class="tui-modal-custom">
  141. <view class="tui-prompt-title">非订单款项</view>
  142. <view class="tui-prompt-textarea" :class="modal1 ? 'show' : 'none'">
  143. <textarea
  144. class="textarea"
  145. placeholder="请填写说明(必填)"
  146. v-model="noOrderReason"
  147. />
  148. </view>
  149. <view class="tui-prompt-flex">
  150. <view class="btn btn-cancel" @click="hideMobel1">取消</view>
  151. <view class="btn btn-confirm" @click="handleClick1">确定</view>
  152. </view>
  153. </view>
  154. </tui-modal>
  155. </view>
  156. </template>
  157. <script>
  158. import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
  159. import listButton from '@/components/cm-module/orderDetails/list-button' //按钮
  160. import modalLayer from '@/components/modal-layer'
  161. import empty from '@/components/empty'
  162. import wxLogin from '@/services/wxLogin.js'
  163. import {
  164. mapState,
  165. mapMutations
  166. } from 'vuex'
  167. const defaultListQuery = {
  168. endDate : '',//筛选结束时间
  169. pageNum:1, //页码
  170. pageSize:10, //每页数量
  171. receiptStatus:0, //收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
  172. receiptType:1, //收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
  173. smsContent:'', //收款短信
  174. startDate:''//筛选开始时间
  175. }
  176. export default {
  177. components: {
  178. listButton,
  179. empty
  180. },
  181. data() {
  182. const currentDate = this.getDate({
  183. format: true
  184. })
  185. return {
  186. CustomBar: this.CustomBar, // 顶部导航栏高度
  187. isIphoneX: this.$store.state.isIphoneX,
  188. skeletonShow:true,
  189. listTabs: [{//收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
  190. name: '订单',
  191. type: 1
  192. },
  193. {
  194. name: '非订单',
  195. type: 2
  196. },
  197. {
  198. name: '返佣',
  199. type: 3
  200. },
  201. {
  202. name: '供应商退款',
  203. type: 5
  204. }
  205. ],
  206. listTabsType: [{//收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
  207. name: '全部',
  208. type: 0
  209. },
  210. {
  211. name: '待确认',
  212. type: 1
  213. },
  214. {
  215. name: '待审核',
  216. type: 2
  217. },
  218. {
  219. name: '审核通过',
  220. type: 3
  221. }
  222. ],
  223. listReturnType: [{//收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
  224. name: '全部',
  225. type: 0
  226. }, {
  227. name: '待确认',
  228. type: 1
  229. }, {
  230. name: '已确认',
  231. type: 2
  232. }],
  233. date: currentDate,
  234. currents: 0,
  235. tabCurrents: 0,
  236. listQuery: Object.assign({}, defaultListQuery),
  237. operateParams:{
  238. id : 0,
  239. receiptType: 0,
  240. delFlag:0,
  241. },
  242. payList: [],
  243. noOrderReason:'',//设置费订单款备注
  244. scrollTop: 0,
  245. isEmpty: false,
  246. loadding: false,
  247. pullUpOn: true,
  248. hasNextPage: false,
  249. pullFlag: true,
  250. navbarHeight: '',
  251. nomoreText: '上拉显示更多',
  252. contentModalText: '', //操作文字提示语句
  253. modal: false,
  254. modal1: false,
  255. rightDrawer: false,
  256. hanldReceipt: {}, //储存监听收款信息
  257. handleOperId: 0, //操作类型
  258. height: 64, //header高度
  259. top: 0, //标题图标距离顶部距离
  260. scrollH: 0, //滚动总高度
  261. opcity: 1
  262. }
  263. },
  264. onLoad() {
  265. let obj = {}
  266. uni.getSystemInfo({
  267. success: res => {
  268. this.width = obj.left || res.windowWidth
  269. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
  270. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
  271. this.scrollH = res.windowWidth * 0.6
  272. }
  273. })
  274. this.initGetStotage()
  275. },
  276. computed: {
  277. ...mapState(['hasLogin']),
  278. startDate() {
  279. return this.getDate('start')
  280. },
  281. endDate() {
  282. return this.getDate('end')
  283. }
  284. },
  285. methods: {
  286. async initGetStotage() {
  287. this.getOrderDatainit()
  288. },
  289. getOrderDatainit() {
  290. this.payList =[]
  291. this.listQuery.pageNum = 1
  292. this.OrderService.orderReceiptList(this.listQuery)
  293. .then(response => {
  294. let data = response.data
  295. if (data.list && data.list.length > 0) {
  296. this.isEmpty = false
  297. this.hasNextPage = response.data.hasNextPage
  298. this.payList = data.list
  299. this.pullFlag = false
  300. setTimeout(() => {
  301. this.pullFlag = true
  302. }, 500)
  303. if (this.hasNextPage) {
  304. this.pullUpOn = false
  305. this.nomoreText = '上拉显示更多'
  306. } else {
  307. if (this.payList.length < 4) {
  308. this.pullUpOn = true
  309. } else {
  310. this.pullUpOn = false
  311. this.loadding = false
  312. this.nomoreText = '已至底部'
  313. }
  314. }
  315. } else {
  316. this.isEmpty = true
  317. }
  318. this.skeletonShow = false
  319. })
  320. .catch(error => {
  321. this.$util.msg(error.msg, 2000)
  322. })
  323. },
  324. getOnReachBottomData() {
  325. //上拉加载
  326. this.listQuery.pageNum += 1
  327. this.OrderService.orderReceiptList(this.listQuery).then(response => {
  328. let data = response.data
  329. if (data.list && data.list.length > 0) {
  330. this.hasNextPage = data.hasNextPage
  331. this.payList = this.payList.concat(data.list)
  332. this.pullFlag = false // 防上拉暴滑
  333. setTimeout(() => {
  334. this.pullFlag = true
  335. }, 500)
  336. if (this.hasNextPage) {
  337. this.pullUpOn = false
  338. this.nomoreText = '上拉显示更多'
  339. } else {
  340. this.pullUpOn = false
  341. this.loadding = false
  342. this.nomoreText = '已至底部'
  343. }
  344. }
  345. })
  346. .catch(error => {
  347. this.$util.msg(error.msg, 2000)
  348. })
  349. },
  350. getDate(type) {
  351. const date = new Date()
  352. let year = date.getFullYear()
  353. let month = date.getMonth() + 1
  354. let day = date.getDate()
  355. if (type === 'start') {
  356. year = year - 1
  357. } else if (type === 'end') {
  358. year = year + 1
  359. }
  360. month = month > 9 ? month : '0' + month
  361. day = day > 9 ? day : '0' + day
  362. return `${year}-${month}-${day}`
  363. },
  364. bindStartDateChange(event) {
  365. //开始时间
  366. console.log('开始时间==>', event.detail.value)
  367. this.listQuery.startDate = event.detail.value
  368. },
  369. bindEndDateChange(event) {
  370. //结束时间
  371. console.log('结束时间==>', event.detail.value)
  372. this.listQuery.endDate = event.detail.value
  373. },
  374. receiptDetail(receipt) {
  375. console.log('this.tabCurrents',this.tabCurrents)
  376. console.log('this.receipt',receipt.receiptType)
  377. switch(receipt.receiptType){
  378. case 1:// 1:订单 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
  379. if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 订单待确认
  380. console.log('订单待确认')
  381. this.$api.navigateTo(`/pages/relation/ordinary/index?id=${receipt.id}`)
  382. }else if(receipt.receiptStatus == 2){// 待审核
  383. console.log('待审核')
  384. this.$api.navigateTo(`/pages/relation/ordinary/examine-detail?id=${receipt.id}`)
  385. }else if(receipt.receiptStatus == 3){// 审核通过
  386. console.log('审核通过')
  387. this.$api.navigateTo(`/pages/relation/ordinary/detail?id=${receipt.id}`)
  388. }
  389. break
  390. case 2:// 2:非订单
  391. this.$api.navigateTo(`/pages/relation/nonorder/detail?id=${receipt.id}`)
  392. break
  393. case 3:// 3:返佣
  394. if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 返佣待确认
  395. this.$api.navigateTo(`/pages/relation/return/index?id=${receipt.id}`)
  396. }else if(receipt.receiptStatus == 2){
  397. this.$api.navigateTo(`/pages/relation/return/detail?id=${receipt.id}`)
  398. }
  399. break
  400. case 5:// 4:供应商退款
  401. if(receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5){// 返佣待确认
  402. this.$api.navigateTo(`/pages/relation/refund/index?id=${receipt.id}`)
  403. }else if(receipt.receiptStatus == 2){
  404. this.$api.navigateTo(`/pages/relation/refund/detail?id=${receipt.id}`)
  405. }
  406. break
  407. }
  408. },
  409. handButtonConfirm(data) {
  410. //获取点击操作
  411. console.log('data',data)
  412. this.handShowAlert(data.handleAction,data.receipt)
  413. },
  414. handShowAlert(handleAction,receipt) {
  415. //执行
  416. switch (handleAction.handleId) {
  417. case 0: // 作废
  418. this.contentModalText = '该款项将作废,请重新识别收款短信!'
  419. this.modal = true
  420. break
  421. case 1:// 设为普通款
  422. this.contentModalText = '确认将该款项设为普通款项?'
  423. this.modal = true
  424. break
  425. case 2:// 设为非订单款
  426. this.modal1 = true
  427. break
  428. case 3:// 设为返佣款
  429. this.contentModalText = '确认将该款项设为返佣款项?'
  430. this.modal = true
  431. break
  432. case 4:// 设为供应商退款
  433. this.contentModalText = '确认将该款项设为供应商退款?'
  434. this.modal = true
  435. break
  436. }
  437. this.hanldReceipt = receipt
  438. this.handleOperId = handleAction.handleId
  439. },
  440. handleClick(e) {
  441. // 确定操作
  442. let index = e.index
  443. if (index == 1) {
  444. switch (this.handleOperId) {
  445. case 0: // 作废
  446. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  447. break
  448. case 1: // 设为普通款
  449. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  450. break
  451. case 3: // 设为返佣款
  452. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  453. break
  454. case 4: // 设为供应商退款
  455. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  456. break
  457. }
  458. }
  459. this.modal = false
  460. },
  461. handleClick1(){
  462. // 确认设为非订单款项
  463. console.log('handleOperId',this.handleOperId)
  464. console.log('hanldReceipt',this.hanldReceipt)
  465. if(this.noOrderReason == ''){
  466. this.$util.msg('请输入设为非订单款项说明!', 2000)
  467. return
  468. }
  469. this.modal1 = false
  470. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  471. },
  472. handReceiptConfirm(handleOperId,hanldReceipt) {
  473. //操作款项
  474. this.operateParams.id = hanldReceipt.id
  475. switch (this.handleOperId) {// 设置接口参数
  476. case 0: // 作废
  477. this.operateParams.delFlag = 1
  478. this.operateParams.receiptType = hanldReceipt.receiptType
  479. break
  480. case 1: // 设为普通款
  481. this.operateParams.receiptType = 1
  482. break
  483. case 2: // 设为非订单款
  484. this.operateParams.receiptType = 2
  485. this.operateParams.noOrderReason = this.noOrderReason
  486. break
  487. case 3: // 设为返佣款
  488. this.operateParams.receiptType = 3
  489. break
  490. case 4: // 设为供应商退款
  491. this.operateParams.receiptType = 5
  492. break
  493. }
  494. this.OrderService.orderReceiptOperate(this.operateParams)
  495. .then(response => {
  496. this.$util.msg(response.msg, 2000, true, 'success')
  497. setTimeout(() => {
  498. this.getOrderDatainit()
  499. }, 2000)
  500. })
  501. .catch(error => {
  502. this.$util.msg(error.msg, 2000)
  503. })
  504. },
  505. hideMobel() {
  506. this.modal = false
  507. },
  508. hideMobel1(){
  509. this.modal1 = false
  510. },
  511. formatColor(state) {
  512. //设置邀请码状态亚瑟
  513. let stateColor = '',
  514. stateColorObject = {
  515. 1: '#FEAC20',
  516. 2: '#4cd964',
  517. 3: '#34CC8C',
  518. 4: '#F94B4B',
  519. 5: '#007aff'
  520. }
  521. Object.keys(stateColorObject).forEach(function(key) {
  522. if (key == state) {
  523. stateColor = stateColorObject[key]
  524. }
  525. })
  526. return stateColor
  527. },
  528. rDrawer() {
  529. //弹出抽屉
  530. this.rightDrawer = true
  531. },
  532. closeDrawer(e) {
  533. //关闭抽屉
  534. this.leftDrawer = false
  535. this.rightDrawer = false
  536. },
  537. tabClick(num, index, type) {
  538. switch (num) {
  539. case 1:
  540. this.isEmpty = false
  541. this.pullUpOn = true
  542. this.currents = index
  543. this.listQuery.receiptType = type
  544. if(index == 1){
  545. this.listQuery.receiptStatus = 0
  546. }
  547. this.getOrderDatainit()
  548. this.tabCurrents = 0
  549. break
  550. case 2:
  551. this.isEmpty = false
  552. this.pullUpOn = true
  553. this.tabCurrents = index
  554. this.listQuery.receiptStatus = type
  555. this.getOrderDatainit()
  556. }
  557. },
  558. toNoSms(url) {
  559. this.$api.navigateTo(url)
  560. },
  561. navBack() {
  562. uni.navigateBack({
  563. delta: 1
  564. })
  565. }
  566. },
  567. onPageScroll(e) {
  568. //实时获取到滚动的值
  569. },
  570. onReachBottom() {
  571. if (this.hasNextPage) {
  572. this.loadding = true
  573. this.pullUpOn = true
  574. this.getOnReachBottomData()
  575. }
  576. },
  577. onPullDownRefresh() {
  578. setTimeout(() => {
  579. this.listQuery.pageNum = 1
  580. this.currents = 0
  581. // this.getOrderDatainit(this.currents)
  582. uni.stopPullDownRefresh()
  583. }, 200)
  584. },
  585. onShareAppMessage(res) {
  586. //分享购买优惠券
  587. const receipt = res.target.dataset.receipt
  588. console.log('receipt', receipt)
  589. if (res.from === 'button') {
  590. // console.log('来自页面内转发按钮')
  591. return {
  592. title: `【待确认】收款金额${receipt.receiptAmount.toFixed(2)}元,收款时间:${receipt.receiptDate}`,
  593. path: `/pages/login/login-share?id=${receipt.id}&receiptType=${receipt.receiptType}`,
  594. imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
  595. }
  596. }
  597. },
  598. onShow() {
  599. }
  600. }
  601. </script>
  602. <style lang="scss">
  603. @import '@/uni.scss';
  604. page {
  605. background: #f7f7f7;
  606. }
  607. .tui-header-box {
  608. width: 100%;
  609. background: #ffffff;
  610. z-index: 999;
  611. position: fixed;
  612. top: 0;
  613. left: 0;
  614. background-size: cover;
  615. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  616. }
  617. .tui-header-tabs {
  618. width: 100%;
  619. height: auto;
  620. margin-bottom: 40rpx;
  621. padding: 20rpx;
  622. background: #4688fa;
  623. box-sizing: border-box;
  624. position: fixed;
  625. z-index: 999;
  626. border-radius: 0 0 10rpx 10rpx;
  627. &.day {
  628. background: #ffffff;
  629. padding: 20rpx 24rpx;
  630. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  631. }
  632. .title {
  633. font-size: $font-size-36;
  634. line-height: 60rpx;
  635. color: #fff;
  636. font-weight: bold;
  637. margin-bottom: 20rpx;
  638. }
  639. .main {
  640. width: 100%;
  641. height: 80rpx;
  642. &.day {
  643. height: 70rpx;
  644. box-sizing: border-box;
  645. padding: 20rpx 0;
  646. border-top: 1px solid #efefef;
  647. }
  648. &.one {}
  649. .main-item {
  650. float: left;
  651. text-align: center;
  652. color: #ffffff;
  653. box-sizing: border-box;
  654. &.one {
  655. width: 25%;
  656. .text {
  657. width: 100%;
  658. height: 80rpx;
  659. line-height: 80rpx;
  660. display: block;
  661. float: left;
  662. font-size: $font-size-28;
  663. color: #666666;
  664. text-align: center;
  665. font-weight: 600;
  666. font-family: '正楷';
  667. }
  668. }
  669. &.tab {
  670. width: 140rpx;
  671. border-radius: 8rpx;
  672. background: #f7f7f7;
  673. margin: 0 10rpx;
  674. padding: 0 20rpx;
  675. .text {
  676. width: 100%;
  677. height: 50rpx;
  678. line-height: 50rpx;
  679. display: block;
  680. float: left;
  681. font-size: $font-size-24;
  682. color: #666666;
  683. text-align: center;
  684. }
  685. }
  686. &.active {
  687. .text {
  688. color: $btn-confirm;
  689. font-size: $font-size-28;
  690. }
  691. }
  692. &.tabActive {
  693. .text {
  694. color: $btn-confirm;
  695. }
  696. }
  697. }
  698. }
  699. }
  700. .header-top {
  701. width: 100%;
  702. font-size: 16px;
  703. font-weight: 500;
  704. height: 32px;
  705. display: flex;
  706. align-items: center;
  707. justify-content: center;
  708. position: relative;
  709. padding: 0 40rpx;
  710. }
  711. .header-sit {
  712. width: 100%;
  713. box-sizing: border-box;
  714. height: 80rpx;
  715. line-height: 80rpx;
  716. box-sizing: border-box;
  717. color: #ffffff;
  718. .header-sit-text {
  719. text-align: left;
  720. font-size: $font-size-40;
  721. font-weight: 600;
  722. font-family: '正楷';
  723. }
  724. .icon-fanhui {
  725. display: block;
  726. width: 80rpx;
  727. height: 80rpx;
  728. float: left;
  729. text-align: center;
  730. line-height: 80rpx;
  731. font-size: 42rpx;
  732. }
  733. .icon-iconfonticonfontsousuo1 {
  734. font-size: 42rpx;
  735. margin-left: 30rpx;
  736. }
  737. }
  738. .mine {
  739. width: 100%;
  740. height: 100%;
  741. position: relative;
  742. }
  743. .user-section {
  744. position: absolute;
  745. width: 100%;
  746. }
  747. .header-content {
  748. width: 100%;
  749. height: auto;
  750. position: relative;
  751. background-color: #f7f7f7;
  752. .tui-header-btm {
  753. width: 100%;
  754. padding: 0 30rpx;
  755. box-sizing: border-box;
  756. display: flex;
  757. align-items: center;
  758. justify-content: space-between;
  759. color: #fff;
  760. }
  761. .tui-btm-item {
  762. flex: 1;
  763. display: flex;
  764. flex-direction: column;
  765. align-items: center;
  766. justify-content: center;
  767. }
  768. .tui-btm-num {
  769. font-size: 32rpx;
  770. font-weight: 600;
  771. position: relative;
  772. }
  773. .tui-btm-text {
  774. font-size: 24rpx;
  775. opacity: 0.85;
  776. padding-top: 4rpx;
  777. }
  778. }
  779. .uni-badge--small {
  780. -webkit-transform: scale(0.8);
  781. -ms-transform: scale(0.8);
  782. transform: scale(0.8);
  783. -webkit-transform-origin: center center;
  784. -ms-transform-origin: center center;
  785. transform-origin: center center;
  786. }
  787. .uni-badge {
  788. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  789. -webkit-box-sizing: border-box;
  790. box-sizing: border-box;
  791. font-size: 12px;
  792. line-height: 1;
  793. display: inline-block;
  794. padding: 3px 6px;
  795. color: #333;
  796. border-radius: 100px;
  797. background-color: #f1f1f1;
  798. }
  799. .uni-badge-error {
  800. color: #fff;
  801. background-color: #dd524d;
  802. }
  803. .tui-order-list {
  804. margin-top: 24rpx;
  805. width: 100%;
  806. position: relative;
  807. box-sizing: border-box;
  808. padding: 0 20rpx;
  809. }
  810. .tui-order-content {
  811. width: 100%;
  812. height: auto;
  813. }
  814. .tui-order-item {
  815. display: flex;
  816. flex-direction: column;
  817. width: 100%;
  818. padding: 20rpx 20rpx;
  819. background: #fff;
  820. margin-bottom: 24rpx;
  821. border-radius: 10rpx;
  822. position: relative;
  823. .list-shaore {
  824. width: 80rpx;
  825. height: 80rpx;
  826. line-height: 80rpx;
  827. text-align: center;
  828. position: absolute;
  829. right: 0;
  830. top: 0;
  831. background: transparent;
  832. border-radius: 0;
  833. border: 0;
  834. margin: 0;
  835. .iconfont {
  836. font-size: 48rpx;
  837. color: $color-system;
  838. }
  839. }
  840. }
  841. .list-title {
  842. width: 100%;
  843. height: auto;
  844. .list-title-t {
  845. width: 100%;
  846. height: 50rpx;
  847. float: left;
  848. font-size: $font-size-28;
  849. padding-bottom: 10rpx;
  850. margin-bottom: 10rpx;
  851. .list-title-num {
  852. float: left;
  853. text-align: left;
  854. color: #999999;
  855. margin-left: 30rpx;
  856. line-height: 40rpx;
  857. }
  858. .list-title-tip {
  859. float: left;
  860. .badges {
  861. display: block;
  862. float: left;
  863. padding: 0 15rpx;
  864. height: 40rpx;
  865. line-height: 40rpx;
  866. border-radius: 6rpx;
  867. background: $btn-confirm;
  868. font-size: $font-size-24;
  869. text-align: center;
  870. color: #ffffff;
  871. }
  872. }
  873. }
  874. .list-title-b {
  875. width: 100%;
  876. height: 40rpx;
  877. float: left;
  878. font-size: $font-size-24;
  879. line-height: 40rpx;
  880. color: #666666;
  881. text-align: left;
  882. .text{
  883. color: #999999;
  884. }
  885. &.sms {
  886. height: auto;
  887. }
  888. }
  889. }
  890. .d-container {
  891. width: 580rpx;
  892. padding: 80rpx 0;
  893. .drawer-main {
  894. width: 100%;
  895. height: auto;
  896. box-sizing: border-box;
  897. float: left;
  898. .drawer-main-name {
  899. width: 100%;
  900. height: 80rpx;
  901. line-height: 80rpx;
  902. text-align: left;
  903. font-size: $font-size-26;
  904. color: #333333;
  905. box-sizing: border-box;
  906. padding: 0 20rpx;
  907. font-weight: bold;
  908. }
  909. .drawer-main-time {
  910. width: 100%;
  911. height: 56rpx;
  912. box-sizing: border-box;
  913. .line {
  914. color: #999999;
  915. float: left;
  916. line-height: 56rpx;
  917. }
  918. .drawer-main-time-input {
  919. width: 228rpx;
  920. height: 56rpx;
  921. background: #f7f7f7;
  922. border-radius: 28rpx;
  923. box-sizing: border-box;
  924. padding: 0 20rpx;
  925. line-height: 56rpx;
  926. float: left;
  927. margin: 0 20rpx;
  928. position: relative;
  929. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  930. .input-text {
  931. display: block;
  932. height: 56rpx;
  933. font-size: 26rpx;
  934. color: #666666;
  935. }
  936. .icon-riqi {
  937. color: $color-system;
  938. display: block;
  939. width: 40rpx;
  940. height: 56rpx;
  941. position: absolute;
  942. right: 10rpx;
  943. top: 0;
  944. line-height: 56rpx;
  945. }
  946. }
  947. }
  948. .drawer-main-textarea {
  949. width: 100%;
  950. height: 160rpx;
  951. box-sizing: border-box;
  952. padding: 0 20rpx;
  953. background: #ffffff;
  954. border-radius: 8rpx;
  955. .textarea {
  956. width: 100%;
  957. height: 100%;
  958. background: #f7f7f7;
  959. box-sizing: border-box;
  960. padding: 20rpx 20rpx;
  961. font-size: $font-size-24;
  962. border-radius: 8rpx;
  963. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  964. }
  965. }
  966. }
  967. .drawer-input {
  968. width: 100%;
  969. float: left;
  970. box-sizing: border-box;
  971. padding: 24rpx 10rpx 0 10rpx;
  972. border: 1px solid rgba(0, 0, 0, 0.2);
  973. border-radius: 4rpx;
  974. position: relative;
  975. background-color: #ffffff;
  976. &.btn {
  977. border: none;
  978. display: flex;
  979. position: fixed;
  980. left: 0;
  981. bottom: 0;
  982. }
  983. .drawer-btn {
  984. width: 210rpx;
  985. height: 84rpx;
  986. border-radius: 42rpx;
  987. background: $btn-confirm;
  988. line-height: 84rpx;
  989. text-align: center;
  990. font-size: $font-size-26;
  991. color: #ffffff;
  992. flex: 1;
  993. margin: 0 10rpx;
  994. &.comfrim {
  995. background: $btn-confirm;
  996. }
  997. &.clear {
  998. background: #f7f7f7;
  999. color: #999999;
  1000. }
  1001. }
  1002. }
  1003. }
  1004. .tui-icon-button{
  1005. width: 80rpx;
  1006. height: 80rpx;
  1007. line-height: 80rpx;
  1008. text-align: center;
  1009. border-radius: 50%;
  1010. background: linear-gradient(45deg, #1CBBB4 0%, #0081FF 100%);
  1011. box-shadow: 0 8rpx 8rpx 0 rgba(86, 119, 252, 0.2);
  1012. position: fixed;
  1013. bottom: 120rpx;
  1014. right: 20rpx;
  1015. .icon-jiahao{
  1016. font-size: $font-size-44;
  1017. color: #FFFFFF;
  1018. }
  1019. }
  1020. .tui-prompt-title{
  1021. line-height: 44rpx;
  1022. text-align: center;
  1023. }
  1024. .tui-prompt-textarea{
  1025. width: 100%;
  1026. height: 160rpx;
  1027. box-sizing: border-box;
  1028. background: #f7f7f7;
  1029. border-radius: 8rpx;
  1030. padding:15rpx 20rpx;
  1031. margin-top: 10rpx;
  1032. &.none{
  1033. display: none;
  1034. }
  1035. .textarea {
  1036. width: 100%;
  1037. height: 100%;
  1038. font-size: $font-size-26;
  1039. }
  1040. }
  1041. .tui-prompt-flex{
  1042. width: 100%;
  1043. height: 70rpx;
  1044. display: flex;
  1045. margin-top: 20rpx;
  1046. .btn{
  1047. flex: 1;
  1048. line-height: 70rpx;
  1049. font-size: $font-size-26;
  1050. text-align: center;
  1051. color: #FFFFFF;
  1052. border-radius: 33rpx;
  1053. margin: 0 24rpx;
  1054. &.btn-cancel{
  1055. background: #F7F7F7;
  1056. color: #999999;
  1057. }
  1058. &.btn-confirm{
  1059. background: $color-system;
  1060. }
  1061. }
  1062. }
  1063. </style>