list.vue 28 KB

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