list.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238
  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(value) {
  312. //处理金额
  313. if (value) {
  314. return Number(value).toFixed(2)
  315. } else {
  316. return '0.00'
  317. }
  318. }
  319. },
  320. computed: {
  321. ...mapState(['hasLogin']),
  322. startDate() {
  323. return this.getDate('start')
  324. },
  325. endDate() {
  326. return this.getDate('end')
  327. }
  328. },
  329. methods: {
  330. async initGetStotage() {
  331. this.getOrderDatainit()
  332. },
  333. getOrderDatainit() {
  334. this.payList =[]
  335. this.listQuery.pageNum = 1
  336. this.OrderService.orderReceiptList(this.listQuery)
  337. .then(response => {
  338. let data = response.data
  339. if (data.list && data.list.length > 0) {
  340. this.isEmpty = false
  341. this.hasNextPage = response.data.hasNextPage
  342. this.payList = data.list
  343. this.pullFlag = false
  344. setTimeout(() => {
  345. this.pullFlag = true
  346. }, 500)
  347. if (this.hasNextPage) {
  348. this.pullUpOn = false
  349. this.nomoreText = '上拉显示更多'
  350. } else {
  351. if (this.payList.length < 4) {
  352. this.pullUpOn = true
  353. } else {
  354. this.pullUpOn = false
  355. this.loadding = false
  356. this.nomoreText = '已至底部'
  357. }
  358. }
  359. } else {
  360. this.isEmpty = true
  361. }
  362. this.skeletonShow = false
  363. })
  364. .catch(error => {
  365. this.$util.msg(error.msg, 2000)
  366. })
  367. },
  368. getOnReachBottomData() {
  369. //上拉加载
  370. this.listQuery.pageNum += 1
  371. this.OrderService.orderReceiptList(this.listQuery).then(response => {
  372. let data = response.data
  373. if (data.list && data.list.length > 0) {
  374. this.hasNextPage = data.hasNextPage
  375. this.payList = this.payList.concat(data.list)
  376. this.pullFlag = false // 防上拉暴滑
  377. setTimeout(() => {
  378. this.pullFlag = true
  379. }, 500)
  380. if (this.hasNextPage) {
  381. this.pullUpOn = false
  382. this.nomoreText = '上拉显示更多'
  383. } else {
  384. this.pullUpOn = false
  385. this.loadding = false
  386. this.nomoreText = '已至底部'
  387. }
  388. }
  389. })
  390. .catch(error => {
  391. this.$util.msg(error.msg, 2000)
  392. })
  393. },
  394. getDate(type) {
  395. const date = new Date()
  396. let year = date.getFullYear()
  397. let month = date.getMonth() + 1
  398. let day = date.getDate()
  399. if (type === 'start') {
  400. year = year - 1
  401. } else if (type === 'end') {
  402. year = year + 1
  403. }
  404. month = month > 9 ? month : '0' + month
  405. day = day > 9 ? day : '0' + day
  406. return `${year}-${month}-${day}`
  407. },
  408. bindStartDateChange(event) {
  409. //开始时间
  410. console.log('开始时间==>', event.detail.value)
  411. this.listQuery.startDate = event.detail.value
  412. },
  413. bindEndDateChange(event) {
  414. //结束时间
  415. console.log('结束时间==>', event.detail.value)
  416. this.listQuery.endDate = event.detail.value
  417. },
  418. receiptDetail(receipt) {
  419. console.log('this.tabCurrents',this.tabCurrents)
  420. console.log('this.receipt',receipt.receiptType)
  421. switch(receipt.receiptType){
  422. case 1:// 1:订单
  423. if(this.tabCurrents == 1 || this.tabCurrents == 0){// 订单待确认
  424. console.log('订单待确认')
  425. this.$api.navigateTo(`/pages/relation/ordinary/index?id=${receipt.id}`)
  426. }else if(this.tabCurrents == 2){// 待审核
  427. console.log('待审核')
  428. this.$api.navigateTo(`/pages/relation/ordinary/examine-detail?id=${receipt.id}`)
  429. }else if(this.tabCurrents == 3){// 审核通过
  430. console.log('审核通过')
  431. this.$api.navigateTo(`/pages/relation/ordinary/detail?id=${receipt.id}`)
  432. }
  433. break
  434. case 2:// 2:非订单
  435. this.$api.navigateTo(`/pages/relation/nonorder/detail?id=${receipt.id}`)
  436. break
  437. case 3:// 3:返佣
  438. if(this.tabCurrents == 1 || this.tabCurrents == 0){// 返佣待确认
  439. this.$api.navigateTo(`/pages/relation/return/index?id=${receipt.id}`)
  440. }else if(this.tabCurrents == 2){
  441. this.$api.navigateTo(`/pages/relation/return/detail?id=${receipt.id}`)
  442. }
  443. break
  444. case 5:// 4:供应商退款
  445. if(this.tabCurrents == 1 || this.tabCurrents == 0){// 返佣待确认
  446. this.$api.navigateTo(`/pages/relation/refund/index?id=${receipt.id}`)
  447. }else if(this.tabCurrents == 2){
  448. this.$api.navigateTo(`/pages/relation/refund/detail?id=${receipt.id}`)
  449. }
  450. break
  451. }
  452. },
  453. handButtonConfirm(data) {
  454. //获取点击操作
  455. console.log('data',data)
  456. this.handShowAlert(data.handleAction,data.receipt)
  457. },
  458. handShowAlert(handleAction,receipt) {
  459. //执行
  460. switch (handleAction.handleId) {
  461. case 0: // 作废
  462. this.contentModalText = '该款项将作废,请重新识别收款短信!'
  463. this.modal = true
  464. break
  465. case 1:// 设为普通款
  466. this.contentModalText = '确认将该款项设为普通款项?'
  467. this.modal = true
  468. break
  469. case 2:// 设为非订单款
  470. this.modal1 = true
  471. break
  472. case 3:// 设为返佣款
  473. this.contentModalText = '确认将该款项设为返佣款项?'
  474. this.modal = true
  475. break
  476. case 4:// 设为供应商退款
  477. this.contentModalText = '确认将该款项设为供应商退款?'
  478. this.modal = true
  479. break
  480. }
  481. this.hanldReceipt = receipt
  482. this.handleOperId = handleAction.handleId
  483. },
  484. handleClick(e) {
  485. // 确定操作
  486. let index = e.index
  487. if (index == 1) {
  488. switch (this.handleOperId) {
  489. case 0: // 作废
  490. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  491. break
  492. case 1: // 设为普通款
  493. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  494. break
  495. case 3: // 设为返佣款
  496. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  497. break
  498. case 4: // 设为供应商退款
  499. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  500. break
  501. }
  502. }
  503. this.modal = false
  504. },
  505. handleClick1(){
  506. // 确认设为非订单款项
  507. console.log('handleOperId',this.handleOperId)
  508. console.log('hanldReceipt',this.hanldReceipt)
  509. if(this.noOrderReason == ''){
  510. this.$util.msg('请输入设为非订单款项说明!', 2000)
  511. return
  512. }
  513. this.modal1 = false
  514. this.handReceiptConfirm(this.handleOperId,this.hanldReceipt)
  515. },
  516. handReceiptConfirm(handleOperId,hanldReceipt) {
  517. //操作款项
  518. this.operateParams.id = hanldReceipt.id
  519. switch (this.handleOperId) {// 设置接口参数
  520. case 0: // 作废
  521. this.operateParams.delFlag = 1
  522. this.operateParams.receiptType = hanldReceipt.receiptType
  523. break
  524. case 1: // 设为普通款
  525. this.operateParams.receiptType = 1
  526. break
  527. case 2: // 设为非订单款
  528. this.operateParams.receiptType = 2
  529. this.operateParams.noOrderReason = this.noOrderReason
  530. break
  531. case 3: // 设为返佣款
  532. this.operateParams.receiptType = 3
  533. break
  534. case 4: // 设为供应商退款
  535. this.operateParams.receiptType = 5
  536. break
  537. }
  538. this.OrderService.orderReceiptOperate(this.operateParams)
  539. .then(response => {
  540. this.$util.msg(response.msg, 2000, true, 'success')
  541. setTimeout(() => {
  542. this.getOrderDatainit()
  543. }, 2000)
  544. })
  545. .catch(error => {
  546. this.$util.msg(error.msg, 2000)
  547. })
  548. },
  549. hideMobel() {
  550. this.modal = false
  551. },
  552. hideMobel1(){
  553. this.modal1 = false
  554. },
  555. formatColor(state) {
  556. //设置邀请码状态亚瑟
  557. let stateColor = '',
  558. stateColorObject = {
  559. 1: '#4cd964',
  560. 2: '#FEAC20',
  561. 3: '#34CC8C',
  562. 4: '#007aff',
  563. 5: '#F94B4B'
  564. }
  565. Object.keys(stateColorObject).forEach(function(key) {
  566. if (key == state) {
  567. stateColor = stateColorObject[key]
  568. }
  569. })
  570. return stateColor
  571. },
  572. rDrawer() {
  573. //弹出抽屉
  574. this.rightDrawer = true
  575. },
  576. closeDrawer(e) {
  577. //关闭抽屉
  578. this.leftDrawer = false
  579. this.rightDrawer = false
  580. },
  581. tabClick(num, index, type) {
  582. switch (num) {
  583. case 1:
  584. this.isEmpty = false
  585. this.pullUpOn = true
  586. this.currents = index
  587. this.listQuery.receiptType = type
  588. this.getOrderDatainit()
  589. this.tabCurrents = 0
  590. break
  591. case 2:
  592. this.isEmpty = false
  593. this.pullUpOn = true
  594. this.tabCurrents = index
  595. this.listQuery.receiptStatus = type
  596. this.getOrderDatainit()
  597. }
  598. },
  599. navBack() {
  600. uni.navigateBack({
  601. delta: 1
  602. })
  603. }
  604. },
  605. onPageScroll(e) {
  606. //实时获取到滚动的值
  607. },
  608. onReachBottom() {
  609. if (this.hasNextPage) {
  610. this.loadding = true
  611. this.pullUpOn = true
  612. this.getOnReachBottomData()
  613. }
  614. },
  615. onPullDownRefresh() {
  616. setTimeout(() => {
  617. this.listQuery.pageNum = 1
  618. this.currents = 0
  619. // this.getOrderDatainit(this.currents)
  620. uni.stopPullDownRefresh()
  621. }, 200)
  622. },
  623. onShareAppMessage(res) {
  624. //分享购买优惠券
  625. const receipt = res.target.dataset.receipt
  626. console.log('receipt', receipt)
  627. if (res.from === 'button') {
  628. // console.log('来自页面内转发按钮')
  629. return {
  630. title: `【待确认】收款金额${receipt.receiptAmount.toFixed(2)}元,收款时间:${receipt.receiptDate}`,
  631. path: `/pages/login/login-share?id=${receipt.id}&receiptType=${receipt.receiptType}`,
  632. imageUrl: 'https://static.caimei365.com/app/img/icon/icon-shareCoupon@2x.png'
  633. }
  634. }
  635. },
  636. onShow() {
  637. }
  638. }
  639. </script>
  640. <style lang="scss">
  641. @import '@/uni.scss';
  642. page {
  643. background: #f7f7f7;
  644. }
  645. .tui-header-box {
  646. width: 100%;
  647. background: #ffffff;
  648. z-index: 999;
  649. position: fixed;
  650. top: 0;
  651. left: 0;
  652. background-size: cover;
  653. background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
  654. }
  655. .tui-header-tabs {
  656. width: 100%;
  657. height: auto;
  658. margin-bottom: 40rpx;
  659. padding: 20rpx;
  660. background: #4688fa;
  661. box-sizing: border-box;
  662. position: fixed;
  663. z-index: 999;
  664. border-radius: 0 0 10rpx 10rpx;
  665. &.day {
  666. background: #ffffff;
  667. padding: 20rpx 24rpx;
  668. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  669. }
  670. .title {
  671. font-size: $font-size-36;
  672. line-height: 60rpx;
  673. color: #fff;
  674. font-weight: bold;
  675. margin-bottom: 20rpx;
  676. }
  677. .main {
  678. width: 100%;
  679. height: 80rpx;
  680. &.day {
  681. height: 70rpx;
  682. box-sizing: border-box;
  683. padding: 20rpx 0;
  684. border-top: 1px solid #efefef;
  685. }
  686. &.one {}
  687. .main-item {
  688. float: left;
  689. text-align: center;
  690. color: #ffffff;
  691. box-sizing: border-box;
  692. &.one {
  693. width: 25%;
  694. .text {
  695. width: 100%;
  696. height: 80rpx;
  697. line-height: 80rpx;
  698. display: block;
  699. float: left;
  700. font-size: $font-size-28;
  701. color: #666666;
  702. text-align: center;
  703. font-weight: 600;
  704. font-family: '正楷';
  705. }
  706. }
  707. &.tab {
  708. width: 140rpx;
  709. border-radius: 8rpx;
  710. background: #f7f7f7;
  711. margin: 0 10rpx;
  712. padding: 0 20rpx;
  713. .text {
  714. width: 100%;
  715. height: 50rpx;
  716. line-height: 50rpx;
  717. display: block;
  718. float: left;
  719. font-size: $font-size-24;
  720. color: #666666;
  721. text-align: center;
  722. }
  723. }
  724. &.active {
  725. .text {
  726. color: $btn-confirm;
  727. font-size: $font-size-28;
  728. }
  729. }
  730. &.tabActive {
  731. .text {
  732. color: $btn-confirm;
  733. }
  734. }
  735. }
  736. }
  737. }
  738. .header-top {
  739. width: 100%;
  740. font-size: 16px;
  741. font-weight: 500;
  742. height: 32px;
  743. display: flex;
  744. align-items: center;
  745. justify-content: center;
  746. position: relative;
  747. padding: 0 40rpx;
  748. }
  749. .header-sit {
  750. width: 100%;
  751. box-sizing: border-box;
  752. height: 80rpx;
  753. line-height: 80rpx;
  754. box-sizing: border-box;
  755. color: #ffffff;
  756. .header-sit-text {
  757. text-align: left;
  758. font-size: $font-size-40;
  759. font-weight: 600;
  760. font-family: '正楷';
  761. }
  762. .icon-fanhui {
  763. display: block;
  764. width: 80rpx;
  765. height: 80rpx;
  766. float: left;
  767. text-align: center;
  768. line-height: 80rpx;
  769. font-size: 42rpx;
  770. }
  771. .icon-iconfonticonfontsousuo1 {
  772. font-size: 42rpx;
  773. margin-left: 30rpx;
  774. }
  775. }
  776. .mine {
  777. width: 100%;
  778. height: 100%;
  779. position: relative;
  780. }
  781. .user-section {
  782. position: absolute;
  783. width: 100%;
  784. }
  785. .header-content {
  786. width: 100%;
  787. height: auto;
  788. position: relative;
  789. background-color: #f7f7f7;
  790. .tui-header-btm {
  791. width: 100%;
  792. padding: 0 30rpx;
  793. box-sizing: border-box;
  794. display: flex;
  795. align-items: center;
  796. justify-content: space-between;
  797. color: #fff;
  798. }
  799. .tui-btm-item {
  800. flex: 1;
  801. display: flex;
  802. flex-direction: column;
  803. align-items: center;
  804. justify-content: center;
  805. }
  806. .tui-btm-num {
  807. font-size: 32rpx;
  808. font-weight: 600;
  809. position: relative;
  810. }
  811. .tui-btm-text {
  812. font-size: 24rpx;
  813. opacity: 0.85;
  814. padding-top: 4rpx;
  815. }
  816. }
  817. .uni-badge--small {
  818. -webkit-transform: scale(0.8);
  819. -ms-transform: scale(0.8);
  820. transform: scale(0.8);
  821. -webkit-transform-origin: center center;
  822. -ms-transform-origin: center center;
  823. transform-origin: center center;
  824. }
  825. .uni-badge {
  826. font-family: 'Helvetica Neue', Helvetica, sans-serif;
  827. -webkit-box-sizing: border-box;
  828. box-sizing: border-box;
  829. font-size: 12px;
  830. line-height: 1;
  831. display: inline-block;
  832. padding: 3px 6px;
  833. color: #333;
  834. border-radius: 100px;
  835. background-color: #f1f1f1;
  836. }
  837. .uni-badge-error {
  838. color: #fff;
  839. background-color: #dd524d;
  840. }
  841. .tui-order-list {
  842. margin-top: 24rpx;
  843. width: 100%;
  844. position: relative;
  845. box-sizing: border-box;
  846. padding: 0 20rpx;
  847. }
  848. .tui-order-content {
  849. width: 100%;
  850. height: auto;
  851. }
  852. .tui-order-item {
  853. display: flex;
  854. flex-direction: column;
  855. width: 100%;
  856. padding: 20rpx 20rpx;
  857. background: #fff;
  858. margin-bottom: 24rpx;
  859. border-radius: 10rpx;
  860. position: relative;
  861. .list-shaore {
  862. width: 80rpx;
  863. height: 80rpx;
  864. line-height: 80rpx;
  865. text-align: center;
  866. position: absolute;
  867. right: 0;
  868. top: 0;
  869. background: transparent;
  870. border-radius: 0;
  871. border: 0;
  872. margin: 0;
  873. .iconfont {
  874. font-size: 48rpx;
  875. color: $color-system;
  876. }
  877. }
  878. }
  879. .list-title {
  880. width: 100%;
  881. height: auto;
  882. .list-title-t {
  883. width: 100%;
  884. height: 50rpx;
  885. float: left;
  886. font-size: $font-size-28;
  887. padding-bottom: 10rpx;
  888. margin-bottom: 10rpx;
  889. .list-title-num {
  890. float: left;
  891. text-align: left;
  892. color: #999999;
  893. margin-left: 30rpx;
  894. line-height: 40rpx;
  895. }
  896. .list-title-tip {
  897. float: left;
  898. .badges {
  899. display: block;
  900. float: left;
  901. padding: 0 15rpx;
  902. height: 40rpx;
  903. line-height: 40rpx;
  904. border-radius: 6rpx;
  905. background: $btn-confirm;
  906. font-size: $font-size-24;
  907. text-align: center;
  908. color: #ffffff;
  909. }
  910. }
  911. }
  912. .list-title-b {
  913. width: 100%;
  914. height: 40rpx;
  915. float: left;
  916. font-size: $font-size-24;
  917. line-height: 40rpx;
  918. color: #666666;
  919. text-align: left;
  920. .text{
  921. color: #999999;
  922. }
  923. &.sms {
  924. height: auto;
  925. }
  926. }
  927. }
  928. .goods-title {
  929. width: 100%;
  930. height: 48rpx;
  931. float: left;
  932. margin-top: 24rpx;
  933. .title-logo {
  934. width: 48rpx;
  935. height: 48rpx;
  936. float: left;
  937. image {
  938. width: 48rpx;
  939. height: 48rpx;
  940. }
  941. }
  942. .title-text {
  943. float: left;
  944. margin-left: 16rpx;
  945. font-size: $font-size-28;
  946. color: $text-color;
  947. text-align: left;
  948. line-height: 48rpx;
  949. font-weight: bold;
  950. }
  951. }
  952. .goods-item {
  953. width: 100%;
  954. height: auto;
  955. padding: 24rpx 0;
  956. .pros-img {
  957. width: 210rpx;
  958. height: 210rpx;
  959. border-radius: 10rpx;
  960. margin: 0 26rpx 0 0;
  961. border: 1px solid #f3f3f3;
  962. float: left;
  963. image {
  964. width: 100%;
  965. height: 100%;
  966. border-radius: 10rpx;
  967. }
  968. }
  969. }
  970. .pros-product {
  971. width: 465rpx;
  972. height: 210rpx;
  973. line-height: 36rpx;
  974. font-size: $font-size-26;
  975. position: relative;
  976. float: left;
  977. .producttitle {
  978. width: 100%;
  979. display: inline-block;
  980. height: auto;
  981. text-overflow: ellipsis;
  982. display: -webkit-box;
  983. word-break: break-all;
  984. -webkit-box-orient: vertical;
  985. -webkit-line-clamp: 2;
  986. overflow: hidden;
  987. margin-bottom: 8rpx;
  988. }
  989. .productspec {
  990. height: 36rpx;
  991. color: #999999;
  992. }
  993. .productprice {
  994. height: 48rpx;
  995. position: absolute;
  996. width: 100%;
  997. bottom: 0;
  998. .price {
  999. line-height: 48rpx;
  1000. font-size: $font-size-28;
  1001. width: 48%;
  1002. color: #ff2a2a;
  1003. float: left;
  1004. }
  1005. .count {
  1006. height: 100%;
  1007. float: right;
  1008. position: relative;
  1009. .small {
  1010. color: #666666;
  1011. }
  1012. }
  1013. }
  1014. }
  1015. .d-container {
  1016. width: 580rpx;
  1017. padding: 80rpx 0;
  1018. .drawer-main {
  1019. width: 100%;
  1020. height: auto;
  1021. box-sizing: border-box;
  1022. float: left;
  1023. .drawer-main-name {
  1024. width: 100%;
  1025. height: 80rpx;
  1026. line-height: 80rpx;
  1027. text-align: left;
  1028. font-size: $font-size-26;
  1029. color: #333333;
  1030. box-sizing: border-box;
  1031. padding: 0 20rpx;
  1032. font-weight: bold;
  1033. }
  1034. .drawer-main-time {
  1035. width: 100%;
  1036. height: 56rpx;
  1037. box-sizing: border-box;
  1038. .line {
  1039. color: #999999;
  1040. float: left;
  1041. line-height: 56rpx;
  1042. }
  1043. .drawer-main-time-input {
  1044. width: 228rpx;
  1045. height: 56rpx;
  1046. background: #f7f7f7;
  1047. border-radius: 28rpx;
  1048. box-sizing: border-box;
  1049. padding: 0 20rpx;
  1050. line-height: 56rpx;
  1051. float: left;
  1052. margin: 0 20rpx;
  1053. position: relative;
  1054. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  1055. .input-text {
  1056. display: block;
  1057. height: 56rpx;
  1058. font-size: 26rpx;
  1059. color: #666666;
  1060. }
  1061. .icon-riqi {
  1062. color: $color-system;
  1063. display: block;
  1064. width: 40rpx;
  1065. height: 56rpx;
  1066. position: absolute;
  1067. right: 10rpx;
  1068. top: 0;
  1069. line-height: 56rpx;
  1070. }
  1071. }
  1072. }
  1073. .drawer-main-textarea {
  1074. width: 100%;
  1075. height: 160rpx;
  1076. box-sizing: border-box;
  1077. padding: 0 20rpx;
  1078. background: #ffffff;
  1079. border-radius: 8rpx;
  1080. .textarea {
  1081. width: 100%;
  1082. height: 100%;
  1083. background: #f7f7f7;
  1084. box-sizing: border-box;
  1085. padding: 20rpx 20rpx;
  1086. font-size: $font-size-24;
  1087. border-radius: 8rpx;
  1088. box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
  1089. }
  1090. }
  1091. }
  1092. .drawer-input {
  1093. width: 100%;
  1094. float: left;
  1095. box-sizing: border-box;
  1096. padding: 24rpx 10rpx 0 10rpx;
  1097. border: 1px solid rgba(0, 0, 0, 0.2);
  1098. border-radius: 4rpx;
  1099. position: relative;
  1100. background-color: #ffffff;
  1101. &.btn {
  1102. border: none;
  1103. display: flex;
  1104. position: fixed;
  1105. left: 0;
  1106. bottom: 0;
  1107. }
  1108. .drawer-btn {
  1109. width: 210rpx;
  1110. height: 84rpx;
  1111. border-radius: 42rpx;
  1112. background: $btn-confirm;
  1113. line-height: 84rpx;
  1114. text-align: center;
  1115. font-size: $font-size-26;
  1116. color: #ffffff;
  1117. flex: 1;
  1118. margin: 0 10rpx;
  1119. &.comfrim {
  1120. background: $btn-confirm;
  1121. }
  1122. &.clear {
  1123. background: #f7f7f7;
  1124. color: #999999;
  1125. }
  1126. }
  1127. }
  1128. }
  1129. .tui-prompt-title{
  1130. line-height: 44rpx;
  1131. text-align: center;
  1132. }
  1133. .tui-prompt-textarea{
  1134. width: 100%;
  1135. height: 160rpx;
  1136. box-sizing: border-box;
  1137. background: #f7f7f7;
  1138. border-radius: 8rpx;
  1139. padding:15rpx 20rpx;
  1140. margin-top: 10rpx;
  1141. .textarea {
  1142. width: 100%;
  1143. height: 100%;
  1144. font-size: $font-size-26;
  1145. }
  1146. }
  1147. .tui-prompt-flex{
  1148. width: 100%;
  1149. height: 70rpx;
  1150. display: flex;
  1151. margin-top: 20rpx;
  1152. .btn{
  1153. flex: 1;
  1154. line-height: 70rpx;
  1155. font-size: $font-size-26;
  1156. text-align: center;
  1157. color: #FFFFFF;
  1158. border-radius: 33rpx;
  1159. margin: 0 24rpx;
  1160. &.btn-cancel{
  1161. background: #F7F7F7;
  1162. color: #999999;
  1163. }
  1164. &.btn-confirm{
  1165. background: $color-system;
  1166. }
  1167. }
  1168. }
  1169. </style>