list.vue 30 KB

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