moneyList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. <template>
  2. <view class="container">
  3. <div class="tabB" :style="{ top: tabTop + 'px' }">
  4. <view class="order-type u-flex-center-sb" v-if="selTabIndex == 0">
  5. <view
  6. class="type-name u-font26 u-181818"
  7. :class="{ active: isChange == item.value }"
  8. v-for="(item, index) in orderType"
  9. :key="index"
  10. @click="clickBtn(item.value)"
  11. >
  12. {{ item.label }}
  13. </view>
  14. </view>
  15. </div>
  16. <view class="bigbox" :class="selTabIndex == 0 ? 'bigbox0' : 'bigbox3'">
  17. <view v-if="listdata.length > 0">
  18. <template v-if="selTabIndex == 0">
  19. <view
  20. class="u-bg-fff ppsPd umb20"
  21. v-for="(item, index) in listdata"
  22. :key="item.id"
  23. >
  24. <view
  25. class="pt15-pb24 u-border-one-one"
  26. style="padding-bottom: 30rpx"
  27. >
  28. <view class="u-flex-center-sb" style="align-items: center">
  29. <view class="u-flex" style="align-items: center">
  30. <text
  31. class="iconfont2 u-font40"
  32. style="padding-top: 2rpx; color: #00bf5a"
  33. >&#xe611;</text
  34. >
  35. <text class="u-1A1A1A u-font30 u-ml15">{{
  36. item.shop_name
  37. }}</text>
  38. </view>
  39. <text class="u-00BF5A u-font28">{{ item.order_status }}</text>
  40. </view>
  41. </view>
  42. <view>
  43. <view class="goodsItem u-border-one-one u-flex">
  44. <image
  45. :src="item.goods_img"
  46. class="u-goods200 u-ml15"
  47. mode=""
  48. ></image>
  49. <view class="u-flex1 u-flex-column-start rightText u-ml30">
  50. <view class="u-text2 u-1A1A1A u-font28">{{
  51. item.goods_title
  52. }}</view>
  53. <view class="bottext u-flex-column-start u-flex1">
  54. <text
  55. class="u-font22 u-999"
  56. style="width: 100%"
  57. v-if="item.sku_set_name"
  58. >规格:{{ item.sku_set_name }}</text
  59. >
  60. <view class="u-flex-center botPrice u-mt25">
  61. <view class="u-00BF5A u-font32 good-text">
  62. <rich-text
  63. :nodes="$mUtil.priceBigSmall(item.sale_price)"
  64. ></rich-text>
  65. </view>
  66. <text class="u-font26 u-999 u-ml15" v-if="item.number"
  67. >x {{ item.number }}</text
  68. >
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="botList">
  75. <view class="u-flex-center-sb u-mt20">
  76. <view class="u-font26 u-181818 opacity">购买人</view>
  77. <text
  78. style="text-align: right"
  79. class="u-font26 u-999 u-text-width-two"
  80. >{{ item.user_info.nickname }}</text
  81. >
  82. </view>
  83. <view class="u-flex-center-sb u-mt20">
  84. <view class="u-font26 u-181818 opacity">下单时间</view>
  85. <text class="u-font26 u-999">{{ item.create_time }}</text>
  86. </view>
  87. <view class="u-flex-center-sb u-mt20">
  88. <view class="u-font26 u-181818 opacity">所得佣金</view>
  89. <view class="u-font26 u-00BF5A u-bold">
  90. <rich-text
  91. :nodes="$mUtil.priceBigSmall(item.able_gains, false)"
  92. ></rich-text>
  93. </view>
  94. </view>
  95. <view
  96. class="u-flex-center-sb u-mt20"
  97. v-if="item.balance_gains > 0"
  98. >
  99. <view class="u-font26 u-181818 opacity">所得金额</view>
  100. <view class="u-font26 u-00BF5A u-bold">
  101. <rich-text
  102. :nodes="$mUtil.priceBigSmall(item.balance_gains, false)"
  103. ></rich-text>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </template>
  109. <template v-if="selTabIndex == 3">
  110. <view class="offline">
  111. <view class="order-item" v-for="item in listdata" :key="item.id">
  112. <view class="order-item-head">
  113. <view class="item-info">
  114. <view class="order-num">
  115. <text class="num">订单号:</text>
  116. <text class="">{{ item.offline_order.order_code }}</text>
  117. </view>
  118. <view class="order-time-price">
  119. <text class="time">{{ item.create_time }}</text>
  120. <text class=""
  121. >消费金额:{{ item.offline_order.sales_money }}</text
  122. >
  123. </view>
  124. </view>
  125. </view>
  126. <view class="tip">
  127. <view class="label">打赏积分:</view
  128. >{{ item.offline_order.shop_consume_integral_able }}
  129. </view>
  130. <view class="tip">
  131. <view class="label">所得收益:</view>{{ item.income_point }}
  132. </view>
  133. </view>
  134. </view>
  135. </template>
  136. <loadMore v-if="listdata.length > 0" :status="status"></loadMore>
  137. </view>
  138. <nodata v-else :config="{ top: 20, content: '暂无数据~' }"></nodata>
  139. </view>
  140. </view>
  141. </template>
  142. <script setup>
  143. import { ref } from "vue";
  144. import { onReachBottom, onPullDownRefresh, onLoad } from "@dcloudio/uni-app";
  145. const $http = uni.$http;
  146. const $mUtil = uni.$mUtil;
  147. const app = getApp();
  148. const isChange = ref(0);
  149. const orderType = ref([
  150. {
  151. label: "全部订单",
  152. value: "",
  153. },
  154. {
  155. label: "已付款",
  156. value: 1,
  157. },
  158. {
  159. label: "已完成",
  160. value: 2,
  161. },
  162. {
  163. label: "已结算",
  164. value: 3,
  165. },
  166. ]);
  167. const listdata = ref([]);
  168. const status = ref("more"); // more|loading|noMore
  169. const noData = ref(false);
  170. const parmas = ref({
  171. page: 1,
  172. limit: 10,
  173. status: "",
  174. // user_order_gains_type: 0
  175. });
  176. const tabTop = ref(0);
  177. const selTabIndex = ref(0);
  178. // 生命周期
  179. onLoad(() => {
  180. tabTop.value = app.globalData.barHeight + 44;
  181. listData();
  182. });
  183. // 上拉加载
  184. onReachBottom((e) => {
  185. status.value = "loading";
  186. parmas.value.page++;
  187. if (selTabIndex.value == 0) {
  188. listData();
  189. } else {
  190. getOfflineorderincome();
  191. }
  192. });
  193. // 下拉刷新
  194. onPullDownRefresh(() => {
  195. rest();
  196. if (selTabIndex.value == 0) {
  197. listData();
  198. } else {
  199. getOfflineorderincome();
  200. }
  201. });
  202. // 重置
  203. const rest = () => {
  204. parmas.value.page = 1;
  205. listdata.value = [];
  206. };
  207. // 获取列表数据
  208. const listData = () => {
  209. $http.get("/userordergains/pages", parmas.value).then(async (res) => {
  210. if (res && res.code == 200) {
  211. uni.stopPullDownRefresh();
  212. listdata.value = listdata.value.concat(res.page.list);
  213. if (listdata.value.length == 0) {
  214. noData.value = true;
  215. } else {
  216. noData.value = false;
  217. }
  218. if (res.page.totalPage <= res.page.currPage) {
  219. status.value = "noMore";
  220. } else {
  221. status.value = "more";
  222. }
  223. }
  224. });
  225. };
  226. // 获取线下订单收益
  227. const getOfflineorderincome = () => {
  228. $http.get("/offlineorderincome/page", parmas.value).then(async (res) => {
  229. if (res && res.code == 200) {
  230. uni.stopPullDownRefresh();
  231. listdata.value = listdata.value.concat(res.page.list);
  232. if (listdata.value.length == 0) {
  233. noData.value = true;
  234. } else {
  235. noData.value = false;
  236. }
  237. if (res.page.totalPage <= res.page.currPage) {
  238. status.value = "noMore";
  239. } else {
  240. status.value = "more";
  241. }
  242. }
  243. });
  244. };
  245. // 点击按钮
  246. const clickBtn = (index) => {
  247. isChange.value = index;
  248. if (index == 0) {
  249. parmas.value.status = "";
  250. } else {
  251. parmas.value.status = index;
  252. }
  253. rest();
  254. listData();
  255. };
  256. </script>
  257. <style lang="scss">
  258. .tabBox {
  259. display: flex;
  260. justify-content: space-around;
  261. padding: 0 30rpx;
  262. border-bottom: 1rpx solid #e6e6e6;
  263. > view {
  264. font-size: 30rpx;
  265. padding: 22rpx 0;
  266. color: #1a1a1a;
  267. position: relative;
  268. font-weight: 700;
  269. }
  270. > .active {
  271. color: #00bf5a;
  272. &::after {
  273. display: block;
  274. width: 100%;
  275. height: 4rpx;
  276. content: "";
  277. background: #00bf5a;
  278. position: absolute;
  279. bottom: 0;
  280. left: 0;
  281. border-radius: 2rpx;
  282. }
  283. }
  284. }
  285. .good-text {
  286. font-weight: 700;
  287. }
  288. .opacity {
  289. opacity: 0.9;
  290. }
  291. .rightText {
  292. margin-top: 4rpx;
  293. }
  294. .contribution-txt {
  295. margin-top: 6rpx;
  296. color: #ff6600;
  297. font-size: 26rpx;
  298. }
  299. // .bigbox {
  300. // margin-top: 200rpx;
  301. // }
  302. .bigbox0 {
  303. margin-top: 110rpx;
  304. // margin-top: 200rpx;
  305. }
  306. .bigbox3 {
  307. margin-top: 88rpx;
  308. }
  309. .ppsPd {
  310. padding: 30rpx;
  311. border-bottom: 0.5px solid #e6e6e6;
  312. }
  313. .goodsItem {
  314. padding: 30rpx 0;
  315. position: relative;
  316. }
  317. .umb20 {
  318. margin-bottom: 20rpx;
  319. }
  320. .wt112 {
  321. width: 140rpx;
  322. }
  323. .img30 {
  324. width: 30rpx;
  325. height: 30rpx;
  326. }
  327. .tabB {
  328. width: 100%;
  329. position: fixed;
  330. left: 0;
  331. z-index: 66;
  332. background: #ffffff;
  333. }
  334. .order-type {
  335. height: 110rpx;
  336. width: 100%;
  337. box-sizing: border-box;
  338. padding: 0 30rpx;
  339. .type-name {
  340. border-radius: 30px;
  341. padding: 12rpx 18rpx;
  342. display: inline-block;
  343. background: #f2f2f2;
  344. border-radius: 30rpx;
  345. }
  346. .active {
  347. background: #00bf5a;
  348. color: #ffffff;
  349. }
  350. }
  351. .wd-bgImg {
  352. position: relative;
  353. padding: 25rpx 0rpx;
  354. image {
  355. width: 100%;
  356. height: 200rpx;
  357. vertical-align: bottom;
  358. }
  359. .moneyInfo {
  360. position: absolute;
  361. top: 25rpx;
  362. width: 92%;
  363. .mt40 {
  364. margin-top: 40rpx;
  365. }
  366. .detail-btn button {
  367. height: 56rpx;
  368. line-height: 30rpx;
  369. border-radius: 28px;
  370. opacity: 0.82;
  371. padding: 10rpx 30rpx;
  372. background-color: #eed9a9;
  373. color: #0b844a;
  374. }
  375. }
  376. }
  377. .wdInput {
  378. background-color: #ffffff;
  379. border-radius: 18rpx 18rpx 0px 0rpx;
  380. padding: 40rpx 22rpx 32rpx;
  381. .input {
  382. height: 80rpx;
  383. line-height: 80rpx;
  384. font-size: 60rpx;
  385. border-bottom: 1rpx solid #d9d9d9;
  386. padding-bottom: 25rpx;
  387. input {
  388. height: 80rpx;
  389. line-height: 80rpx;
  390. font-size: 36rpx;
  391. }
  392. }
  393. }
  394. .bg-fff {
  395. background-color: #ffffff;
  396. padding: 26rpx 22rpx 36rpx;
  397. border-radius: 0rpx 0rpx 18px 18rpx;
  398. }
  399. .ml46 {
  400. margin-left: 46rpx;
  401. }
  402. .apply-btn {
  403. margin-top: 114rpx;
  404. button {
  405. background: #0b844a;
  406. color: #ffffff;
  407. }
  408. }
  409. .zfb-wx {
  410. padding-bottom: 24rpx;
  411. .payIcon {
  412. color: #00aaef;
  413. font-size: 32rpx;
  414. margin-right: 18rpx;
  415. }
  416. .wxIcon {
  417. color: rgb(37, 171, 56);
  418. font-size: 32rpx;
  419. margin-right: 18rpx;
  420. }
  421. }
  422. .zhInput input {
  423. width: 62%;
  424. height: 70rpx;
  425. line-height: 70rpx;
  426. padding: 0rpx 20rpx;
  427. border: 1rpx solid #d9d9d9;
  428. border-radius: 6rpx;
  429. }
  430. .popup {
  431. width: 100%;
  432. .bg-top {
  433. background-color: #f5f5f5;
  434. padding: 20rpx 30rpx;
  435. border-radius: 18rpx 18rpx 0px 0px;
  436. }
  437. .bankCardList {
  438. background-color: #ffffff;
  439. padding: 0rpx 30rpx;
  440. padding-bottom: 185rpx;
  441. .item {
  442. height: 84rpx;
  443. line-height: 84rpx;
  444. image {
  445. width: 48rpx;
  446. height: 42rpx;
  447. margin-top: 20rpx;
  448. vertical-align: bottom;
  449. }
  450. .rh-br {
  451. width: 100%;
  452. border-bottom: 1rpx solid #e6e6e6;
  453. }
  454. .pull-right {
  455. float: right !important;
  456. }
  457. }
  458. }
  459. }
  460. .ml56 {
  461. margin-left: 56rpx;
  462. }
  463. .ml200 {
  464. margin-left: 200rpx;
  465. }
  466. .offline {
  467. padding: 0 30rpx;
  468. .order-item {
  469. padding: 30rpx 0;
  470. border-bottom: 1rpx solid #f2f2f2;
  471. .order-item-head {
  472. display: flex;
  473. justify-content: space-between;
  474. align-items: center;
  475. width: 100%;
  476. }
  477. .item-info {
  478. font-size: 28rpx;
  479. font-family: PingFang SC, PingFang SC-Regular;
  480. font-weight: 400;
  481. color: #808080;
  482. .order-num {
  483. margin-bottom: 10rpx;
  484. .num {
  485. color: #1a1a1a;
  486. }
  487. }
  488. .order-time-price {
  489. font-size: 24rpx;
  490. .time {
  491. margin-right: 89rpx;
  492. }
  493. }
  494. }
  495. .tip {
  496. display: flex;
  497. justify-content: flex-end;
  498. color: #808080;
  499. font-size: 28rpx;
  500. margin-bottom: 10rpx;
  501. .label {
  502. color: #1a1a1a;
  503. }
  504. }
  505. .tip:last-child {
  506. margin-bottom: 0;
  507. }
  508. .item-icon {
  509. width: 32rpx;
  510. height: 32rpx;
  511. transform: rotate(-90deg);
  512. flex-shrink: 0;
  513. }
  514. }
  515. }
  516. </style>