list.vue 29 KB

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