list.vue 28 KB

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