list.vue 30 KB

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