|
@@ -1,142 +1,77 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="container">
|
|
<view class="container">
|
|
|
- <div class="tabB" :style="{ top: tabTop + 'px' }">
|
|
|
|
|
- <view class="order-type u-flex-center-sb" v-if="selTabIndex == 0">
|
|
|
|
|
- <view
|
|
|
|
|
- class="type-name u-font26 u-181818"
|
|
|
|
|
- :class="{ active: isChange == item.value }"
|
|
|
|
|
- v-for="(item, index) in orderType"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- @click="clickBtn(item.value)"
|
|
|
|
|
- >
|
|
|
|
|
- {{ item.label }}
|
|
|
|
|
|
|
+ <uv-sticky>
|
|
|
|
|
+ <view class="tabB">
|
|
|
|
|
+ <view class="order-type u-flex-center-sb" v-if="selTabIndex == 0">
|
|
|
|
|
+ <view class="type-name u-font26 u-181818" :class="{ active: isChange == item.value }"
|
|
|
|
|
+ v-for="(item, index) in orderType" :key="index" @click="clickBtn(item.value)">
|
|
|
|
|
+ {{ item.label }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </uv-sticky>
|
|
|
|
|
+
|
|
|
<view class="bigbox" :class="selTabIndex == 0 ? 'bigbox0' : 'bigbox3'">
|
|
<view class="bigbox" :class="selTabIndex == 0 ? 'bigbox0' : 'bigbox3'">
|
|
|
- <view v-if="listdata.length > 0">
|
|
|
|
|
- <template v-if="selTabIndex == 0">
|
|
|
|
|
- <view
|
|
|
|
|
- class="u-bg-fff ppsPd umb20"
|
|
|
|
|
- v-for="(item, index) in listdata"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- >
|
|
|
|
|
- <view
|
|
|
|
|
- class="pt15-pb24 u-border-one-one"
|
|
|
|
|
- style="padding-bottom: 30rpx"
|
|
|
|
|
- >
|
|
|
|
|
- <view class="u-flex-center-sb" style="align-items: center">
|
|
|
|
|
- <view class="u-flex" style="align-items: center">
|
|
|
|
|
- <text
|
|
|
|
|
- class="iconfont2 u-font40"
|
|
|
|
|
- style="padding-top: 2rpx; color: #fa6138"
|
|
|
|
|
- ></text
|
|
|
|
|
- >
|
|
|
|
|
- <text class="u-1A1A1A u-font30 u-ml15">{{
|
|
|
|
|
- item.shop_name
|
|
|
|
|
- }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="u-00BF5A u-font28">{{ item.order_status }}</text>
|
|
|
|
|
|
|
+ <view v-if="RowsList.length > 0">
|
|
|
|
|
+ <view class="u-bg-fff ppsPd umb20" v-for="(item, index) in RowsList" :key="item.id">
|
|
|
|
|
+ <view class="pt15-pb24 u-border-one-one" style="padding-bottom: 30rpx">
|
|
|
|
|
+ <view class="u-flex-center-sb" style="align-items: center">
|
|
|
|
|
+ <view class="u-flex" style="align-items: center">
|
|
|
|
|
+ <text class="iconfont2 u-font40" style="padding-top: 2rpx; color: #fa6138"></text>
|
|
|
|
|
+ <text class="u-1A1A1A u-font30 u-ml15">{{
|
|
|
|
|
+ item.businessName
|
|
|
|
|
+ }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <text class="u-00BF5A u-font28">{{ item.settlement ? '已结算' : '未结算' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view>
|
|
|
|
|
- <view class="goodsItem u-border-one-one u-flex">
|
|
|
|
|
- <image
|
|
|
|
|
- :src="item.goods_img"
|
|
|
|
|
- class="u-goods200 u-ml15"
|
|
|
|
|
- mode=""
|
|
|
|
|
- ></image>
|
|
|
|
|
- <view class="u-flex1 u-flex-column-start rightText u-ml30">
|
|
|
|
|
- <view class="u-text2 u-1A1A1A u-font28">{{
|
|
|
|
|
- item.goods_title
|
|
|
|
|
- }}</view>
|
|
|
|
|
- <view class="bottext u-flex-column-start u-flex1">
|
|
|
|
|
- <text
|
|
|
|
|
- class="u-font22 u-999"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- v-if="item.sku_set_name"
|
|
|
|
|
- >规格:{{ item.sku_set_name }}</text
|
|
|
|
|
- >
|
|
|
|
|
-
|
|
|
|
|
- <view class="u-flex-center botPrice u-mt25">
|
|
|
|
|
- <view class="u-00BF5A u-font32 good-text">
|
|
|
|
|
- <rich-text
|
|
|
|
|
- :nodes="$mUtil.priceBigSmall(item.sale_price)"
|
|
|
|
|
- ></rich-text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="u-font26 u-999 u-ml15" v-if="item.number"
|
|
|
|
|
- >x {{ item.number }}</text
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <view class="goodsItem u-border-one-one u-flex">
|
|
|
|
|
+ <image :src="item.productCover" class="u-goods200 u-ml15" mode=""></image>
|
|
|
|
|
+ <view class="u-flex1 u-flex-column-start rightText u-ml30">
|
|
|
|
|
+ <view class="u-text2 u-1A1A1A u-font28">{{
|
|
|
|
|
+ item.productTitle
|
|
|
|
|
+ }}</view>
|
|
|
|
|
+ <view class="bottext u-flex-column-start u-flex1">
|
|
|
|
|
+ <text class="u-font22 u-999" style="width: 100%" v-if="item.skuSetName">规格:{{ item.skuSetName
|
|
|
|
|
+ }}</text>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="u-flex-center botPrice u-mt25">
|
|
|
|
|
+ <view class="u-00BF5A u-font32 good-text">
|
|
|
|
|
+ <rich-text :nodes="$mUtil.priceBigSmall(item.realPrice)"></rich-text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <text class="u-font26 u-999 u-ml15" v-if="item.number">x {{ item.number }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="botList">
|
|
|
|
|
- <view class="u-flex-center-sb u-mt20">
|
|
|
|
|
- <view class="u-font26 u-181818 opacity">购买人</view>
|
|
|
|
|
- <text
|
|
|
|
|
- style="text-align: right"
|
|
|
|
|
- class="u-font26 u-999 u-text-width-two"
|
|
|
|
|
- >{{ item.user_info.nickname }}</text
|
|
|
|
|
- >
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="u-flex-center-sb u-mt20">
|
|
|
|
|
- <view class="u-font26 u-181818 opacity">下单时间</view>
|
|
|
|
|
- <text class="u-font26 u-999">{{ item.create_time }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="u-flex-center-sb u-mt20">
|
|
|
|
|
- <view class="u-font26 u-181818 opacity">所得佣金</view>
|
|
|
|
|
- <view class="u-font26 u-00BF5A u-bold">
|
|
|
|
|
- <rich-text
|
|
|
|
|
- :nodes="$mUtil.priceBigSmall(item.able_gains, false)"
|
|
|
|
|
- ></rich-text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view
|
|
|
|
|
- class="u-flex-center-sb u-mt20"
|
|
|
|
|
- v-if="item.balance_gains > 0"
|
|
|
|
|
- >
|
|
|
|
|
- <view class="u-font26 u-181818 opacity">所得金额</view>
|
|
|
|
|
- <view class="u-font26 u-00BF5A u-bold">
|
|
|
|
|
- <rich-text
|
|
|
|
|
- :nodes="$mUtil.priceBigSmall(item.balance_gains, false)"
|
|
|
|
|
- ></rich-text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
- </template>
|
|
|
|
|
- <template v-if="selTabIndex == 3">
|
|
|
|
|
- <view class="offline">
|
|
|
|
|
- <view class="order-item" v-for="item in listdata" :key="item.id">
|
|
|
|
|
- <view class="order-item-head">
|
|
|
|
|
- <view class="item-info">
|
|
|
|
|
- <view class="order-num">
|
|
|
|
|
- <text class="num">订单号:</text>
|
|
|
|
|
- <text class="">{{ item.offline_order.order_code }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="order-time-price">
|
|
|
|
|
- <text class="time">{{ item.create_time }}</text>
|
|
|
|
|
- <text class=""
|
|
|
|
|
- >消费金额:{{ item.offline_order.sales_money }}</text
|
|
|
|
|
- >
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="tip">
|
|
|
|
|
- <view class="label">打赏积分:</view
|
|
|
|
|
- >{{ item.offline_order.shop_consume_integral_able }}
|
|
|
|
|
|
|
+ <view class="botList">
|
|
|
|
|
+ <view class="u-flex-center-sb u-mt20">
|
|
|
|
|
+ <view class="u-font26 u-181818 opacity">购买人</view>
|
|
|
|
|
+ <text style="text-align: right" class="u-font26 u-999 u-text-width-two">{{ item.userNickname }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="u-flex-center-sb u-mt20">
|
|
|
|
|
+ <view class="u-font26 u-181818 opacity">下单时间</view>
|
|
|
|
|
+ <text class="u-font26 u-999">{{ item.createTime }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="u-flex-center-sb u-mt20">
|
|
|
|
|
+ <view class="u-font26 u-181818 opacity">所得佣金</view>
|
|
|
|
|
+ <view class="u-font26 u-00BF5A u-bold">
|
|
|
|
|
+ <rich-text :nodes="$mUtil.priceBigSmall(item.ableGains, false)"></rich-text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tip">
|
|
|
|
|
- <view class="label">所得收益:</view>{{ item.income_point }}
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="u-flex-center-sb u-mt20" v-if="item.gains > 0">
|
|
|
|
|
+ <view class="u-font26 u-181818 opacity">所得金额</view>
|
|
|
|
|
+ <view class="u-font26 u-00BF5A u-bold">
|
|
|
|
|
+ <rich-text :nodes="$mUtil.priceBigSmall(item.gains, false)"></rich-text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </template>
|
|
|
|
|
- <loadMore v-if="listdata.length > 0" :status="status"></loadMore>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <loadMore v-if="RowsList.length > 0" :status="LoadStatus"></loadMore>
|
|
|
</view>
|
|
</view>
|
|
|
- <nodata v-else :config="{ top: 20, content: '暂无数据~' }"></nodata>
|
|
|
|
|
|
|
+ <noData v-else :config="{ top: 20, content: '暂无数据~' }"></noData>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -144,9 +79,10 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
|
import { onReachBottom, onPullDownRefresh, onLoad } from "@dcloudio/uni-app";
|
|
import { onReachBottom, onPullDownRefresh, onLoad } from "@dcloudio/uni-app";
|
|
|
-const $http = uni.$http;
|
|
|
|
|
-const $mUtil = uni.$mUtil;
|
|
|
|
|
-const app = getApp();
|
|
|
|
|
|
|
+import { distributionUserOrderGainsPage_Api } from "@/api/agencyCenter";
|
|
|
|
|
+
|
|
|
|
|
+import { usePageData } from "@/hooks/usePageData";
|
|
|
|
|
+const { RowsList, LoadStatus, initData } = usePageData(distributionUserOrderGainsPage_Api);
|
|
|
|
|
|
|
|
const isChange = ref(0);
|
|
const isChange = ref(0);
|
|
|
const orderType = ref([
|
|
const orderType = ref([
|
|
@@ -155,113 +91,31 @@ const orderType = ref([
|
|
|
value: "",
|
|
value: "",
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: "已付款",
|
|
|
|
|
|
|
+ label: "未结算",
|
|
|
value: 1,
|
|
value: 1,
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: "已完成",
|
|
|
|
|
- value: 2,
|
|
|
|
|
- },
|
|
|
|
|
{
|
|
{
|
|
|
label: "已结算",
|
|
label: "已结算",
|
|
|
- value: 3,
|
|
|
|
|
|
|
+ value: 2,
|
|
|
},
|
|
},
|
|
|
]);
|
|
]);
|
|
|
-const listdata = ref([]);
|
|
|
|
|
-const status = ref("more"); // more|loading|noMore
|
|
|
|
|
-const noData = ref(false);
|
|
|
|
|
-const parmas = ref({
|
|
|
|
|
- page: 1,
|
|
|
|
|
- limit: 10,
|
|
|
|
|
- status: "",
|
|
|
|
|
- // user_order_gains_type: 0
|
|
|
|
|
-});
|
|
|
|
|
-const tabTop = ref(0);
|
|
|
|
|
const selTabIndex = ref(0);
|
|
const selTabIndex = ref(0);
|
|
|
|
|
|
|
|
// 生命周期
|
|
// 生命周期
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
|
- tabTop.value = app.globalData.barHeight + 44;
|
|
|
|
|
- listData();
|
|
|
|
|
|
|
+ initData();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 上拉加载
|
|
|
|
|
-onReachBottom((e) => {
|
|
|
|
|
- status.value = "loading";
|
|
|
|
|
- parmas.value.page++;
|
|
|
|
|
- if (selTabIndex.value == 0) {
|
|
|
|
|
- listData();
|
|
|
|
|
- } else {
|
|
|
|
|
- getOfflineorderincome();
|
|
|
|
|
- }
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 下拉刷新
|
|
|
|
|
-onPullDownRefresh(() => {
|
|
|
|
|
- rest();
|
|
|
|
|
- if (selTabIndex.value == 0) {
|
|
|
|
|
- listData();
|
|
|
|
|
- } else {
|
|
|
|
|
- getOfflineorderincome();
|
|
|
|
|
- }
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 重置
|
|
|
|
|
-const rest = () => {
|
|
|
|
|
- parmas.value.page = 1;
|
|
|
|
|
- listdata.value = [];
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 获取列表数据
|
|
|
|
|
-const listData = () => {
|
|
|
|
|
- $http.get("/userordergains/pages", parmas.value).then(async (res) => {
|
|
|
|
|
- if (res && res.code == 200) {
|
|
|
|
|
- uni.stopPullDownRefresh();
|
|
|
|
|
- listdata.value = listdata.value.concat(res.page.list);
|
|
|
|
|
- if (listdata.value.length == 0) {
|
|
|
|
|
- noData.value = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- noData.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- if (res.page.totalPage <= res.page.currPage) {
|
|
|
|
|
- status.value = "noMore";
|
|
|
|
|
- } else {
|
|
|
|
|
- status.value = "more";
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 获取线下订单收益
|
|
|
|
|
-const getOfflineorderincome = () => {
|
|
|
|
|
- $http.get("/offlineorderincome/page", parmas.value).then(async (res) => {
|
|
|
|
|
- if (res && res.code == 200) {
|
|
|
|
|
- uni.stopPullDownRefresh();
|
|
|
|
|
- listdata.value = listdata.value.concat(res.page.list);
|
|
|
|
|
- if (listdata.value.length == 0) {
|
|
|
|
|
- noData.value = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- noData.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- if (res.page.totalPage <= res.page.currPage) {
|
|
|
|
|
- status.value = "noMore";
|
|
|
|
|
- } else {
|
|
|
|
|
- status.value = "more";
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
// 点击按钮
|
|
// 点击按钮
|
|
|
const clickBtn = (index) => {
|
|
const clickBtn = (index) => {
|
|
|
isChange.value = index;
|
|
isChange.value = index;
|
|
|
- if (index == 0) {
|
|
|
|
|
- parmas.value.status = "";
|
|
|
|
|
- } else {
|
|
|
|
|
- parmas.value.status = index;
|
|
|
|
|
|
|
+ let settlement = undefined;
|
|
|
|
|
+ if (index == 1) {
|
|
|
|
|
+ settlement = false;
|
|
|
|
|
+ } else if (index == 2) {
|
|
|
|
|
+ settlement = true;
|
|
|
}
|
|
}
|
|
|
- rest();
|
|
|
|
|
- listData();
|
|
|
|
|
|
|
+ initData({ settlement });
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -271,8 +125,9 @@ const clickBtn = (index) => {
|
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
|
padding: 0 30rpx;
|
|
padding: 0 30rpx;
|
|
|
border-bottom: 1rpx solid #e6e6e6;
|
|
border-bottom: 1rpx solid #e6e6e6;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
|
|
|
- > view {
|
|
|
|
|
|
|
+ >view {
|
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
|
padding: 22rpx 0;
|
|
padding: 22rpx 0;
|
|
|
color: #1a1a1a;
|
|
color: #1a1a1a;
|
|
@@ -280,7 +135,7 @@ const clickBtn = (index) => {
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- > .active {
|
|
|
|
|
|
|
+ >.active {
|
|
|
color: #fa6138;
|
|
color: #fa6138;
|
|
|
|
|
|
|
|
&::after {
|
|
&::after {
|
|
@@ -351,14 +206,6 @@ const clickBtn = (index) => {
|
|
|
height: 30rpx;
|
|
height: 30rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.tabB {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- position: fixed;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- z-index: 66;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.order-type {
|
|
.order-type {
|
|
|
height: 110rpx;
|
|
height: 110rpx;
|
|
|
width: 100%;
|
|
width: 100%;
|