list.vue 28 KB

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