list.vue 30 KB

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