yongjin.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <template>
  2. <view class="dikou">
  3. <view class="dikou-header u-flex u-row-between u-col-top">
  4. <image src="static/images/yjbg.png" class="header-img" mode=""></image>
  5. <text class="top-font" @click="tobank">银行卡</text>
  6. <view class="header-item u-flex-1 u-flex-col">
  7. <view class="item-top u-flex">
  8. <text>佣金余额</text>
  9. <image style="margin-left: 10rpx;" src="static/images/dikou-tips.png" mode=""></image>
  10. </view>
  11. <view class="item-price u-flex u-row-between"
  12. style="border-bottom: 2rpx solid rgba(255,255,255,0.2);padding-bottom: 32rpx;">
  13. <view class="u-flex">
  14. {{sum || '0.00'}}元
  15. <text style="margin-left: 20rpx;margin-right: 8rpx;" @click.stop="mingxi"
  16. class="fontm">佣金明细</text>
  17. <u-icon name="arrow-right" size="9" color="#fff"></u-icon>
  18. </view>
  19. <!-- <image style="margin-left: 20rpx;" @click="totixian" src="static/images/dikou-tixian.png"
  20. class="item-tixian" mode=""></image> -->
  21. <view class="tixian">
  22. 提现
  23. </view>
  24. </view>
  25. <!-- <view class="u-flex">
  26. <view class="left">
  27. <text class="top">订单佣金</text>
  28. <view class="bottom">
  29. {{order || '0.00'}}
  30. </view>
  31. </view>
  32. <view class="right">
  33. <text class="top">邀请佣金</text>
  34. <view class="bottom">
  35. {{invite || '0.00'}}
  36. </view>
  37. </view>
  38. </view> -->
  39. <view class="u-flex" style="margin-top: 30rpx;">
  40. <view class="" style="border-right: 1rpx solid rgba(255,255,255, 0.2);min-width: 170rpx;">
  41. <view class="fontm">订单佣金</view>
  42. <view class="bottom">{{order || '0.00'}}元</view>
  43. </view>
  44. <view class="" style="margin-left: 70rpx;">
  45. <view class="fontm">待结算订单佣金</view>
  46. <view class="bottom">{{order_un_confirm||'0.00'}}元</view>
  47. </view>
  48. <view class="" style="margin-left: 60rpx;">
  49. <view class="fontm">已结算订单佣金</view>
  50. <view class="bottom">{{order_confirm||'0.00'}}元</view>
  51. </view>
  52. </view>
  53. <view class="u-flex" style="margin-top: 30rpx;">
  54. <view class="" style="border-right: 1rpx solid rgba(255,255,255, 0.2);min-width: 170rpx;">
  55. <view class="fontm">邀请佣金</view>
  56. <view class="bottom">{{invite || '0.00'}}元</view>
  57. </view>
  58. <view class="" style="margin-left: 70rpx;">
  59. <view class="fontm">待结算邀请佣金</view>
  60. <view class="bottom">{{invite_un_confirm ||'0.00'}}元</view>
  61. </view>
  62. <view class="" style="margin-left: 60rpx;">
  63. <view class="fontm">已结算邀请佣金</view>
  64. <view class="bottom">{{ invite_confirm||'0.00'}}元</view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- <view class="header-item u-flex-1 u-flex-col " style="justify-content: center;">
  69. <view class="box">
  70. <view class="u-flex top1" style="">
  71. <text class="fontm" style="margin-right: 8rpx;min-width: 100rpx;"
  72. @click.stop="mingxi">佣金明细</text>
  73. <u-icon name="play-right-fill" style="transform: rotate(90deg);" color="#fff"
  74. size="12"></u-icon>
  75. </view>
  76. <view class="u-flex bottom1" style="">
  77. <text class="fontm" style="margin-right: 8rpx;min-width: 100rpx;" @click="tobank">银行卡</text>
  78. <u-icon name="play-right-fill" color="#fff" size="12"></u-icon>
  79. </view>
  80. </view>
  81. </view> -->
  82. </view>
  83. <view class="" style="height: 120rpx;"></view>
  84. <view class="dikou-list">
  85. <view class="list-header u-flex u-row-between">
  86. <view class="header-title u-flex-col">
  87. <text>收支明细</text>
  88. <text></text>
  89. </view>
  90. <view class="list-time u-flex" @click="workBtn()">
  91. <text class="text1">{{date || '选择时间'}}</text>
  92. <u-icon name="arrow-down-fill" size="9"></u-icon>
  93. </view>
  94. </view>
  95. <view class="list-item u-flex u-row-between" v-for="(item,index) in list" :key="index"
  96. v-if="list.length > 0">
  97. <view class="u-flex-col">
  98. <view class=""></view>
  99. <text v-if="item.souce_type=='invite'||item.souce_type=='order'"
  100. class="text1">{{item.source_type_name}}入账</text>
  101. <text v-else class="text1">佣金提现</text>
  102. <text class="text2">{{item.createtime}}</text>
  103. </view>
  104. <text class="text3" v-if="item.type=='income'" style="color: #35AA1F;">+{{item.amount}}</text>
  105. <text class="text3" v-else style="color: #E02020;">-{{item.amount}}</text>
  106. </view>
  107. <view style="height: 61vh;justify-content: center;" class="u-flex" v-if="list.length == 0">
  108. <u-empty text="暂无数据" mode="list"></u-empty>
  109. </view>
  110. </view>
  111. <u-datetime-picker ref="pickers" :show="showtime" mode="year-month" @confirm="changetime"
  112. @cancel="close()"></u-datetime-picker>
  113. </view>
  114. </template>
  115. <script>
  116. import {
  117. getBank,
  118. commission_list,
  119. index,
  120. commission_data,
  121. commission_log_list
  122. } from "@/units/inquire.js"
  123. export default {
  124. data() {
  125. return {
  126. order_un_confirm: "", //rm //订单待结算佣金
  127. order_confirm: "", ////订单已经结算佣金
  128. invite_un_confirm: "", //irm //订单待结算佣金
  129. invite_confirm: "", // //订单待结算佣金
  130. order: '0.00',
  131. sum: '0.00',
  132. invite: '0.00',
  133. page: 1,
  134. list: [],
  135. total: 0,
  136. date: '',
  137. showtime: false,
  138. bankdata: {},
  139. }
  140. },
  141. onShow() {
  142. this.getuser()
  143. this.page = 1
  144. this.total = 0
  145. this.list = []
  146. this.getlist()
  147. this.getdata()
  148. this.getBank()
  149. },
  150. onReachBottom() {
  151. if (this.total != this.list.length) {
  152. this.page++
  153. this.getlist()
  154. }
  155. },
  156. methods: {
  157. workBtn() {
  158. this.showtime = true
  159. this.$refs.pickers.innerValue = new Date(1672502400000).getTime()
  160. },
  161. mingxi() {
  162. uni.navigateTo({
  163. url: "/pagesD/mingxi"
  164. })
  165. },
  166. close() {
  167. this.showtime = false
  168. },
  169. getBank() {
  170. getBank().then(res => {
  171. this.bankdata = res.data || {}
  172. })
  173. },
  174. async changetime(e) {
  175. const timeFormat = uni.$u.timeFormat;
  176. let timeValue = await timeFormat(e.value, 'yyyy-mm');
  177. this.date = timeValue;
  178. this.page = 1
  179. this.total = 0
  180. this.list = []
  181. this.getlist()
  182. this.showtime = false
  183. },
  184. getdata() {
  185. commission_data().then(res => {
  186. if (res.code == 1) {
  187. this.invite = res.data.invite //邀请
  188. this.order = res.data.order //订单
  189. this.sum = res.data.sum //余额
  190. this.order_un_confirm = res.data.order_un_confirm //订单待结算佣金
  191. this.order_confirm = res.data.order_confirm //订单已经结算佣金
  192. this.invite_un_confirm = res.data.invite_un_confirm //订单待结算佣金
  193. this.invite_confirm = res.data.invite_confirm //订单待结算佣金
  194. } else {
  195. this.$u.toast(res.msg)
  196. }
  197. })
  198. },
  199. getlist() {
  200. commission_log_list({
  201. date: this.date,
  202. page: this.page
  203. }).then(res => {
  204. this.list = this.list.concat(res.data.data)
  205. this.total = res.data.total
  206. })
  207. },
  208. getuser() {
  209. index().then(res => {
  210. this.money = res.data.money
  211. })
  212. },
  213. tobank() {
  214. uni.navigateTo({
  215. url: "/pagesD/bank-card"
  216. })
  217. },
  218. totixian() {
  219. console.log(this.bankdata);
  220. if (this.bankdata.bank_name && this.bankdata.bank_no) {
  221. uni.navigateTo({
  222. url: "/pagesD/tixian1"
  223. })
  224. } else {
  225. uni.navigateTo({
  226. url: "/pagesD/bank-card"
  227. })
  228. }
  229. }
  230. }
  231. }
  232. </script>
  233. <style lang="scss">
  234. .top-font {
  235. font-size: 20rpx;
  236. font-family: PingFangSC, PingFang SC;
  237. font-weight: 400;
  238. color: #FFFFFF;
  239. position: absolute;
  240. top: 8rpx;
  241. left: 610rpx;
  242. }
  243. .box {
  244. width: 172rpx;
  245. height: 188rpx;
  246. background: rgba(161, 208, 255, 0.2);
  247. border-radius: 16rpx;
  248. backdrop-filter: blur(3px);
  249. padding: 42rpx 28rpx;
  250. text-align: center;
  251. box-sizing: border-box;
  252. margin-left: 66rpx;
  253. margin-top: 30rpx;
  254. }
  255. .fontm {
  256. font-size: 20rpx;
  257. font-family: PingFangSC, PingFang SC;
  258. font-weight: 400;
  259. color: #FFFFFF;
  260. }
  261. .top1 {
  262. margin-bottom: 20rpx;
  263. }
  264. .bottom1 {
  265. border-top: 1rpx solid #FFFFFF;
  266. padding-top: 20rpx;
  267. }
  268. .dikou {
  269. padding: 0 20rpx;
  270. box-sizing: border-box;
  271. .dikou-list {
  272. // width: 686rpx;
  273. background: #FFFFFF;
  274. border-radius: 20rpx;
  275. margin-top: 20rpx;
  276. padding: 0 28rpx;
  277. .list-item {
  278. padding: 30rpx 0;
  279. border-bottom: 2rpx solid #F0F0F0;
  280. min-height: 61rpx;
  281. .text3 {
  282. font-size: 32rpx;
  283. font-family: JDZhengHT-Regular, JDZhengHT;
  284. font-weight: 400;
  285. }
  286. .text1 {
  287. font-size: 30rpx;
  288. font-family: PingFangSC-Regular, PingFang SC;
  289. font-weight: 400;
  290. color: #333333;
  291. margin-bottom: 12rpx;
  292. }
  293. .text2 {
  294. font-size: 24rpx;
  295. font-family: SFPro-Regular, SFPro;
  296. font-weight: 400;
  297. color: #222222;
  298. }
  299. }
  300. .list-header {
  301. padding: 28rpx 0 20rpx 0;
  302. .list-time {
  303. .text1 {
  304. font-size: 32rpx;
  305. font-family: SFPro-Regular, SFPro;
  306. font-weight: 400;
  307. color: #222222;
  308. margin-right: 8rpx;
  309. }
  310. }
  311. .header-title {
  312. text:first-child {
  313. font-size: 32rpx;
  314. font-family: PingFangSC-Medium, PingFang SC;
  315. font-weight: 500;
  316. position: relative;
  317. z-index: 1;
  318. }
  319. text:last-child {
  320. width: 120rpx;
  321. height: 8rpx;
  322. background: linear-gradient(270deg, #0C66C2 0%, #FFFFFF 100%);
  323. border-radius: 6rpx;
  324. margin-top: -14rpx;
  325. margin-right: -20rpx;
  326. }
  327. }
  328. }
  329. }
  330. .bottom {
  331. font-size: 28rpx;
  332. font-family: JDZhengHT-Regular, JDZhengHT;
  333. font-weight: 400;
  334. color: #FFFFFF;
  335. }
  336. .dikou-header {
  337. margin: 20rpx auto;
  338. width: 686rpx;
  339. height: 264rpx;
  340. position: relative;
  341. z-index: 1;
  342. padding: 32rpx 0 0 0;
  343. .header-item {
  344. padding: 0 32rpx 0 32rpx;
  345. .left {
  346. .top {
  347. font-size: 20rpx;
  348. font-family: PingFangSC-Light, PingFang SC;
  349. font-weight: 300;
  350. color: #FFFFFF;
  351. }
  352. .bottom {
  353. font-size: 28rpx;
  354. font-family: JDZhengHT-Regular, JDZhengHT;
  355. font-weight: 400;
  356. color: #FFFFFF;
  357. }
  358. }
  359. .right {
  360. margin-left: 72rpx;
  361. .top {
  362. font-size: 20rpx;
  363. font-family: PingFangSC-Light, PingFang SC;
  364. font-weight: 300;
  365. color: #FFFFFF;
  366. }
  367. .bottom {
  368. font-size: 28rpx;
  369. font-family: JDZhengHT-Regular, JDZhengHT;
  370. font-weight: 400;
  371. color: #FFFFFF;
  372. }
  373. }
  374. .item-tixian {
  375. width: 108rpx;
  376. height: 48rpx;
  377. }
  378. .item-price {
  379. font-size: 52rpx;
  380. font-family: JDZhengHT-Regular, JDZhengHT;
  381. font-weight: 400;
  382. color: #FFFFFF;
  383. margin-bottom: 20rpx;
  384. }
  385. .item-top {
  386. margin-bottom: 20rpx;
  387. text {
  388. font-size: 26rpx;
  389. font-family: PingFangSC-Regular, PingFang SC;
  390. font-weight: 400;
  391. color: #FFFFFF;
  392. margin-right: 8rpx;
  393. }
  394. image {
  395. width: 28rpx;
  396. height: 28rpx;
  397. }
  398. }
  399. }
  400. .header-img {
  401. width: 686rpx;
  402. height: 416rpx;
  403. position: absolute;
  404. top: 0;
  405. left: 0;
  406. z-index: -1;
  407. }
  408. }
  409. }
  410. .tixian {
  411. width: 148rpx;
  412. height: 56rpx;
  413. background: #FFFFFF;
  414. border-radius: 28rpx;
  415. font-size: 26rpx;
  416. font-family: PingFangSC, PingFang SC;
  417. font-weight: 500;
  418. color: #0C66C2;
  419. line-height: 56rpx;
  420. text-align: center;
  421. }
  422. page {
  423. background-color: #F3F3F3;
  424. }
  425. </style>