list.vue 28 KB

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