list.vue 30 KB

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