更新打包配置
This commit is contained in:
@@ -1,415 +1,415 @@
|
||||
<template>
|
||||
<view class="my_team_list">
|
||||
<Header :leftTitle="$t('mine.my.team.title')" left-path-type="navigateTo" :leftPath="leftPath" />
|
||||
<view class="my_team_list_content">
|
||||
<view class="team_list_card">
|
||||
<view class="amount_">{{ (juniorSummaryData && juniorSummaryData.teamAmount) || 0 }}</view>
|
||||
<view class="amount_sum">总订单金额</view>
|
||||
<view class="comm_fg"></view>
|
||||
<view class="people_number">
|
||||
<view class="people_number_item">
|
||||
<view class="title_">总人数</view>
|
||||
<view class="value_">{{ (juniorSummaryData && juniorSummaryData.teamCount) || 0 }}</view>
|
||||
</view>
|
||||
<view class="comm_fg_s"></view>
|
||||
<view class="people_number_item">
|
||||
<view class="title_">推广人数</view>
|
||||
<view class="value_">{{ (juniorSummaryData && juniorSummaryData.ztCount) || 0 }}</view>
|
||||
</view>
|
||||
<!-- <view class="comm_fg_s"></view>
|
||||
<view class="people_number_item">
|
||||
<view class="title_">间推人数</view>
|
||||
<view class="value_">{{ (juniorSummaryData && juniorSummaryData.jtCount) || 0 }}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="current_user_id" v-if="form.userId">当前用户ID:{{ form.userId }}</view>
|
||||
<view class="current_user_tips">
|
||||
<up-image src="/static/common/tips_b.png" width="20" height="20" bgColor="#f1f6ff00"
|
||||
@click="openTcShow = true;" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="team_list_remarks">
|
||||
<view>注:所有数据均截至到进入页面的时间为止,返回再进入页面数据会更新</view>
|
||||
<view style="margin-left: 40rpx;">总订单金额统计的为所有已支付的订单金额</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{ 'height': 'calc(100vh - 500rpx)' }">
|
||||
<view class="team_item" v-for="(item, index) in listData" :key="item.id" v-if="listData && listData.length">
|
||||
<view class="team_header" @click="queryLowerFun(item, index)">
|
||||
<view class="header_left_">
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image :src="item.userUrl || '/static/logo.png'" width="50" height="50" bgColor="#f1f6ff00"
|
||||
shape="circle" radius='16'></up-image>
|
||||
</view>
|
||||
<view class="right_data">
|
||||
<view class="name_">{{ item.userName || '信任桥优品用户' }}({{ item.gradeName }})</view>
|
||||
<view class="msg_">
|
||||
ID:{{ item.userId }}
|
||||
</view>
|
||||
<view class="msg_">
|
||||
注册时间:{{ formatDate(item.registTime) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<up-image src="/static/common/right_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16'
|
||||
v-if="!item.isOpen"></up-image>
|
||||
<up-image src="/static/common/buttom_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16'
|
||||
v-else></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 10rpx;" v-if="item.isOpen && item.lowerData">
|
||||
<view class="team_lower">
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">总订单金额</view>
|
||||
<view class="val_">{{ item.lowerData.teamAmount }}</view>
|
||||
</view>
|
||||
<view class="team_lower_fg"></view>
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">直推人数</view>
|
||||
<view class="val_">{{ item.lowerData.ztCount }}</view>
|
||||
</view>
|
||||
<view class="team_lower_fg"></view>
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">间推人数</view>
|
||||
<view class="val_">{{ item.lowerData.jtCount }}</view>
|
||||
</view>
|
||||
<view class="team_lower_fg"></view>
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">总人数</view>
|
||||
<view class="val_">{{ item.lowerData.teamCount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/not_order.png" width="80" height="80"
|
||||
bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">暂无数据</view>
|
||||
</view>
|
||||
<view v-if="royaltyLoading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 提成统计 -->
|
||||
<up-modal :show="openTcShow" :showConfirmButton="false">
|
||||
<view class="slot-content">
|
||||
<view class="close_warp" @click="openTcShow = false;">
|
||||
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="content_">
|
||||
<view class="content_1">温馨提示</view>
|
||||
<view class="content_2">1、页面数据截至到进入该页面的时间统计</view>
|
||||
<view class="content_2">2、当前页面数据为主用户的数据</view>
|
||||
<view class="content_2">3、下方显示为全部的直推用户,点击后可跳转他/她的团队数据页,查看他/她的直推数据(也就是我的间推)</view>
|
||||
</view>
|
||||
<view class="but_">
|
||||
<view class="but_copy" @click="openTcShow = false;">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCascadeJunior, getJuniorSummary } from '@/api/team.js';
|
||||
import { formatDate } from '@/utils/index.js';
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components: { Header },
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
userId: 0,
|
||||
page: 1,
|
||||
pageSize: 15,
|
||||
},
|
||||
loading: false,
|
||||
listData: [],
|
||||
juniorSummaryData: {},// 统计
|
||||
leftPath: "/pages/mine_package/mine_my_team_list/mine_my_team_list",
|
||||
openTcShow: false,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const id = option.id;
|
||||
if (id && id !== "null") {
|
||||
this.form.userId = id;
|
||||
} else {
|
||||
this.leftPath = '/pages/mine_package/mine_my_team/mine_my_team';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
this.getJuniorSummary();
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
jumpNextLevel(item) {
|
||||
const path = "/pages/mine_package/mine_my_team_list/mine_my_team_list?id=" + item.userId;
|
||||
this.leftPath = path;
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查询统计数据
|
||||
*/
|
||||
async getJuniorSummary() {
|
||||
const resp = await getJuniorSummary();
|
||||
console.log("getJuniorSummary", resp);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
this.juniorSummaryData = resp.data;
|
||||
}
|
||||
},
|
||||
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||
this.loading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData();
|
||||
if (newData.entitys && newData.entitys.length !== 0) {
|
||||
const data = newData.entitys.map(item => ({ ...item, isOpen: false }));
|
||||
this.listData = [...this.listData, ...data]; // 将新数据添加到列表中
|
||||
this.form.page++; // 页码加1
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.loading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData() {
|
||||
const params = {
|
||||
...this.form,
|
||||
}
|
||||
const data = await getCascadeJunior(params);
|
||||
if (data && data.bizcode === 100 && data.data) {
|
||||
return data.data
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData(); // 加载更多数据
|
||||
},
|
||||
/**
|
||||
* 查询团队下级数据
|
||||
* @param {Object} item
|
||||
* @param {Object} index
|
||||
*/
|
||||
async queryLowerFun(item, index) {
|
||||
const data = this.listData[index];
|
||||
const type = !data.isOpen
|
||||
if (type) {
|
||||
const params = {
|
||||
userId: item.userId,
|
||||
}
|
||||
const resp = await getJuniorSummary(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
data.lowerData = resp.data;
|
||||
}
|
||||
}
|
||||
data.isOpen = type;
|
||||
this.listData[index] = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my_team_list {
|
||||
// height: calc(100vh - 58rpx);
|
||||
// overflow: auto;
|
||||
background-color: $app-bj;
|
||||
|
||||
.my_team_list_content {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.team_list_card {
|
||||
background-color: $app-bt-bj;
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
padding: 40rpx;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.current_user_id {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #33333340;
|
||||
padding: 10rpx;
|
||||
font-size: 22rpx;
|
||||
border-radius: 10rpx 0;
|
||||
}
|
||||
|
||||
.current_user_tips {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.amount_ {
|
||||
font-weight: 500;
|
||||
font-size: 58rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.amount_sum {
|
||||
font-size: 23rpx;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
}
|
||||
|
||||
.comm_fg {
|
||||
border: 2rpx dashed rgba(255, 255, 255, 0.55);
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.comm_fg_s {
|
||||
width: 1rpx;
|
||||
height: 35rpx;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.people_number {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.people_number_item {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
|
||||
.title_ {
|
||||
font-size: 23rpx;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
line-height: 33rpx;
|
||||
}
|
||||
|
||||
.value_ {
|
||||
font-size: 38rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
line-height: 54rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.team_list_remarks {
|
||||
font-size: 20rpx;
|
||||
color: #9E9E9E;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.team_item {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.team_header {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 8rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
|
||||
.header_left_ {
|
||||
display: flex;
|
||||
align-items: inherit;
|
||||
width: calc(100% - 70rpx);
|
||||
}
|
||||
|
||||
.right_data {
|
||||
margin-left: 10rpx;
|
||||
// display: grid;
|
||||
}
|
||||
|
||||
.name_ {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.msg_ {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.team_lower {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #E9E9E9;
|
||||
border-radius: 4px;
|
||||
padding: 30rpx 20rpx;
|
||||
|
||||
.team_lower_fg {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.26);
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.team_lower_item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-size: 10px;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.val_ {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.team_content {
|
||||
border-top: 1rpx solid #EEEEEE;
|
||||
padding: 20rpx 0 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.team_content_item {
|
||||
width: 50%;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.team_content2_item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_ {
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.content_1 {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.content_2 {
|
||||
text-align: left;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="my_team_list">
|
||||
<Header :leftTitle="$t('mine.my.team.title')" left-path-type="navigateTo" :leftPath="leftPath" />
|
||||
<view class="my_team_list_content">
|
||||
<view class="team_list_card">
|
||||
<view class="amount_">{{ (juniorSummaryData && juniorSummaryData.teamAmount) || 0 }}</view>
|
||||
<view class="amount_sum">总订单金额</view>
|
||||
<view class="comm_fg"></view>
|
||||
<view class="people_number">
|
||||
<view class="people_number_item">
|
||||
<view class="title_">总人数</view>
|
||||
<view class="value_">{{ (juniorSummaryData && juniorSummaryData.teamCount) || 0 }}</view>
|
||||
</view>
|
||||
<view class="comm_fg_s"></view>
|
||||
<view class="people_number_item">
|
||||
<view class="title_">推广人数</view>
|
||||
<view class="value_">{{ (juniorSummaryData && juniorSummaryData.ztCount) || 0 }}</view>
|
||||
</view>
|
||||
<!-- <view class="comm_fg_s"></view>
|
||||
<view class="people_number_item">
|
||||
<view class="title_">间推人数</view>
|
||||
<view class="value_">{{ (juniorSummaryData && juniorSummaryData.jtCount) || 0 }}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="current_user_id" v-if="form.userId">当前用户ID:{{ form.userId }}</view>
|
||||
<view class="current_user_tips">
|
||||
<up-image src="/static/common/tips_b.png" width="20" height="20" bgColor="#f1f6ff00"
|
||||
@click="openTcShow = true;" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="team_list_remarks">
|
||||
<view>注:所有数据均截至到进入页面的时间为止,返回再进入页面数据会更新</view>
|
||||
<view style="margin-left: 40rpx;">总订单金额统计的为所有已支付的订单金额</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{ 'height': 'calc(100vh - 500rpx)' }">
|
||||
<view class="team_item" v-for="(item, index) in listData" :key="item.id" v-if="listData && listData.length">
|
||||
<view class="team_header" @click="queryLowerFun(item, index)">
|
||||
<view class="header_left_">
|
||||
<view style="margin-top: 10rpx;">
|
||||
<up-image :src="item.userUrl || '/static/logo.png'" width="50" height="50" bgColor="#f1f6ff00"
|
||||
shape="circle" radius='16'></up-image>
|
||||
</view>
|
||||
<view class="right_data">
|
||||
<view class="name_">{{ item.userName || '信任桥优品用户' }}({{ item.gradeName }})</view>
|
||||
<view class="msg_">
|
||||
ID:{{ item.userId }}
|
||||
</view>
|
||||
<view class="msg_">
|
||||
注册时间:{{ formatDate(item.registTime) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<up-image src="/static/common/right_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16'
|
||||
v-if="!item.isOpen"></up-image>
|
||||
<up-image src="/static/common/buttom_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16'
|
||||
v-else></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 10rpx;" v-if="item.isOpen && item.lowerData">
|
||||
<view class="team_lower">
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">总订单金额</view>
|
||||
<view class="val_">{{ item.lowerData.teamAmount }}</view>
|
||||
</view>
|
||||
<view class="team_lower_fg"></view>
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">直推人数</view>
|
||||
<view class="val_">{{ item.lowerData.ztCount }}</view>
|
||||
</view>
|
||||
<view class="team_lower_fg"></view>
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">间推人数</view>
|
||||
<view class="val_">{{ item.lowerData.jtCount }}</view>
|
||||
</view>
|
||||
<view class="team_lower_fg"></view>
|
||||
<view class="team_lower_item">
|
||||
<view class="title_">总人数</view>
|
||||
<view class="val_">{{ item.lowerData.teamCount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="not_order_warp">
|
||||
<up-image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/not_order.png" width="80" height="80"
|
||||
bgColor="#f1f6ff00"></up-image>
|
||||
<view class="not_order_msg_warp">暂无数据</view>
|
||||
</view>
|
||||
<view v-if="royaltyLoading" style="text-align: center;">加载中...</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 提成统计 -->
|
||||
<up-modal :show="openTcShow" :showConfirmButton="false">
|
||||
<view class="slot-content">
|
||||
<view class="close_warp" @click="openTcShow = false;">
|
||||
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
|
||||
</view>
|
||||
<view class="content_">
|
||||
<view class="content_1">温馨提示</view>
|
||||
<view class="content_2">1、页面数据截至到进入该页面的时间统计</view>
|
||||
<view class="content_2">2、当前页面数据为主用户的数据</view>
|
||||
<view class="content_2">3、下方显示为全部的直推用户,点击后可跳转他/她的团队数据页,查看他/她的直推数据(也就是我的间推)</view>
|
||||
</view>
|
||||
<view class="but_">
|
||||
<view class="but_copy" @click="openTcShow = false;">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCascadeJunior, getJuniorSummary } from '@/api/team.js';
|
||||
import { formatDate } from '@/utils/index.js';
|
||||
import Header from '@/components/header.vue';
|
||||
|
||||
export default {
|
||||
components: { Header },
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
userId: 0,
|
||||
page: 1,
|
||||
pageSize: 15,
|
||||
},
|
||||
loading: false,
|
||||
listData: [],
|
||||
juniorSummaryData: {},// 统计
|
||||
leftPath: "/pages/mine_package/mine_my_team_list/mine_my_team_list",
|
||||
openTcShow: false,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const id = option.id;
|
||||
if (id && id !== "null") {
|
||||
this.form.userId = id;
|
||||
} else {
|
||||
this.leftPath = '/pages/mine_package/mine_my_team/mine_my_team';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
this.getJuniorSummary();
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
jumpNextLevel(item) {
|
||||
const path = "/pages/mine_package/mine_my_team_list/mine_my_team_list?id=" + item.userId;
|
||||
this.leftPath = path;
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查询统计数据
|
||||
*/
|
||||
async getJuniorSummary() {
|
||||
const resp = await getJuniorSummary();
|
||||
console.log("getJuniorSummary", resp);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
this.juniorSummaryData = resp.data;
|
||||
}
|
||||
},
|
||||
|
||||
// 加载数据的方法
|
||||
async loadData() {
|
||||
if (this.loading) return; // 如果正在加载,则不重复加载
|
||||
this.loading = true; // 设置加载状态为true
|
||||
try {
|
||||
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
|
||||
const newData = await this.fetchData();
|
||||
if (newData.entitys && newData.entitys.length !== 0) {
|
||||
const data = newData.entitys.map(item => ({ ...item, isOpen: false }));
|
||||
this.listData = [...this.listData, ...data]; // 将新数据添加到列表中
|
||||
this.form.page++; // 页码加1
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
} finally {
|
||||
this.loading = false; // 设置加载状态为false
|
||||
}
|
||||
},
|
||||
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
|
||||
async fetchData() {
|
||||
const params = {
|
||||
...this.form,
|
||||
}
|
||||
const data = await getCascadeJunior(params);
|
||||
if (data && data.bizcode === 100 && data.data) {
|
||||
return data.data
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当滚动到底部时触发的方法
|
||||
loadMore() {
|
||||
this.loadData(); // 加载更多数据
|
||||
},
|
||||
/**
|
||||
* 查询团队下级数据
|
||||
* @param {Object} item
|
||||
* @param {Object} index
|
||||
*/
|
||||
async queryLowerFun(item, index) {
|
||||
const data = this.listData[index];
|
||||
const type = !data.isOpen
|
||||
if (type) {
|
||||
const params = {
|
||||
userId: item.userId,
|
||||
}
|
||||
const resp = await getJuniorSummary(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
data.lowerData = resp.data;
|
||||
}
|
||||
}
|
||||
data.isOpen = type;
|
||||
this.listData[index] = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my_team_list {
|
||||
// height: calc(100vh - 58rpx);
|
||||
// overflow: auto;
|
||||
background-color: $app-bj;
|
||||
|
||||
.my_team_list_content {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.team_list_card {
|
||||
background-color: $app-bt-bj;
|
||||
text-align: center;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
padding: 40rpx;
|
||||
border-radius: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.current_user_id {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #33333340;
|
||||
padding: 10rpx;
|
||||
font-size: 22rpx;
|
||||
border-radius: 10rpx 0;
|
||||
}
|
||||
|
||||
.current_user_tips {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.amount_ {
|
||||
font-weight: 500;
|
||||
font-size: 58rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.amount_sum {
|
||||
font-size: 23rpx;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
}
|
||||
|
||||
.comm_fg {
|
||||
border: 2rpx dashed rgba(255, 255, 255, 0.55);
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.comm_fg_s {
|
||||
width: 1rpx;
|
||||
height: 35rpx;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.people_number {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.people_number_item {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
|
||||
.title_ {
|
||||
font-size: 23rpx;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
line-height: 33rpx;
|
||||
}
|
||||
|
||||
.value_ {
|
||||
font-size: 38rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
line-height: 54rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.team_list_remarks {
|
||||
font-size: 20rpx;
|
||||
color: #9E9E9E;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.team_item {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.team_header {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 8rpx;
|
||||
background: #FFFFFF;
|
||||
padding: 20rpx;
|
||||
|
||||
.header_left_ {
|
||||
display: flex;
|
||||
align-items: inherit;
|
||||
width: calc(100% - 70rpx);
|
||||
}
|
||||
|
||||
.right_data {
|
||||
margin-left: 10rpx;
|
||||
// display: grid;
|
||||
}
|
||||
|
||||
.name_ {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.msg_ {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.team_lower {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #E9E9E9;
|
||||
border-radius: 4px;
|
||||
padding: 30rpx 20rpx;
|
||||
|
||||
.team_lower_fg {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.26);
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.team_lower_item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-size: 10px;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.val_ {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.team_content {
|
||||
border-top: 1rpx solid #EEEEEE;
|
||||
padding: 20rpx 0 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.team_content_item {
|
||||
width: 50%;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.team_content2_item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.title_ {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.content_ {
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.content_1 {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.content_2 {
|
||||
text-align: left;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,446 +1,446 @@
|
||||
<template>
|
||||
<!-- 退货退款模块 -->
|
||||
<view>
|
||||
<view v-if="status > 0">
|
||||
<salesStatus
|
||||
:topLabel="topLabel"
|
||||
:topTitle="topTitle"
|
||||
:status="status"
|
||||
></salesStatus>
|
||||
</view>
|
||||
<view class="refund_content">
|
||||
<view class="content_card">
|
||||
<image :src="product.items[0].mainGraph" class="card_img"></image>
|
||||
<view class="card_info">
|
||||
<view class="card_box">
|
||||
<view class="card_title">
|
||||
<view class="title">{{ product.items[0].title }}</view>
|
||||
<view class="price">¥{{ product.items[0].goodsAmount }}</view>
|
||||
</view>
|
||||
<view class="shop_status">规格:{{ product.sumAmount }}</view>
|
||||
</view>
|
||||
<view class="card_total">
|
||||
<text>共{{ product.buyNum }}件</text>
|
||||
<text>合计{{ product.sumAmount }}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">退款原因</view>
|
||||
<view> {{ RETURN_REASON_OBJ[product.afterReason] }} </view>
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">退款金额</view>
|
||||
<view>
|
||||
¥{{ product.refundAmount || product.sumAmount }}
|
||||
<text style="font-size: 24rpx; color: #999">(退回现金余额)</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="status > 1" class="card_list_box">
|
||||
<view class="card_list">
|
||||
<view class="list_left">邮寄地址</view>
|
||||
<view>{{ address || "--" }}</view>
|
||||
</view>
|
||||
<view class="card_list" @click="onSelectExpress">
|
||||
<view class="list_left">请选择快递名称</view>
|
||||
<view>{{ product.expressName || "请选择快递公司" }}</view>
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">填快递单号</view>
|
||||
<input
|
||||
class="input-express"
|
||||
type="text"
|
||||
:disabled="status != 2"
|
||||
placeholder="请填写快递单号"
|
||||
v-model="product.expressNo"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="buttonLabel"
|
||||
:class="[
|
||||
'bottom_box',
|
||||
{
|
||||
bottom_box_disabled:
|
||||
status == 2 && (!product.expressNo || !product.expressName),
|
||||
},
|
||||
{ bottom_box_quash: status == 1 || status == 3 },
|
||||
]"
|
||||
>
|
||||
<view class="button operate_but_2" @click="submit">
|
||||
{{ buttonLabel }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
|
||||
<up-picker
|
||||
:show="expressShow"
|
||||
:columns="[expressList]"
|
||||
keyName="name"
|
||||
valueName="id"
|
||||
itemHeight="34"
|
||||
@confirm="onExpressConfirm"
|
||||
@cancel="expressShow = false"
|
||||
@close="expressShow = false"
|
||||
></up-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import salesStatus from "../components/salesStatus.vue";
|
||||
import {
|
||||
afterSaleApply,
|
||||
cancelAfterSale,
|
||||
returnGoodsFeedback,
|
||||
getExpressCompany,
|
||||
} from "@/api/order.js";
|
||||
import { RETURN_REASON } from "@/pages/mine_package/mine_order/emun/index.js";
|
||||
export default {
|
||||
components: { salesStatus },
|
||||
props: {
|
||||
product: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
cancelForm: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
expressList: [],
|
||||
expressShow: false,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.onGetExpressCompany();
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
// 未售后 -- 提交申请
|
||||
if (this.status == 0) {
|
||||
this.onAfterSaleApply();
|
||||
}
|
||||
//已售后-- 撤销申请
|
||||
if (this.status == 1 || this.status == 3) {
|
||||
this.onCancelApply();
|
||||
}
|
||||
if (this.status == 2) {
|
||||
if (!this.product.expressNo || !this.product.expressName) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "请填写快递信息",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.onReturnGoods();
|
||||
}
|
||||
// 售后中--退款失败
|
||||
if (this.status == 4) {
|
||||
// 重新发起
|
||||
this.onClose(true);
|
||||
}
|
||||
// 售后中--退款成功
|
||||
if (this.status == 5) {
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 未售后 -- 售后
|
||||
async onAfterSaleApply() {
|
||||
const params = {
|
||||
reason: this.cancelForm.afterReason,
|
||||
type: this.product.afterType, //0-未售后 1-退款不退货, 2-退货退款 3-换货
|
||||
id: this.product.id, // 订单id
|
||||
itemIds: this.product.items[0]?.id, // 商品id
|
||||
};
|
||||
console.log("确认取消", params);
|
||||
if (!params.reason) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "请选择取消原因",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { bizcode } = await afterSaleApply(params);
|
||||
if (bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "申请成功,等商家审核",
|
||||
});
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 撤销申请
|
||||
async onCancelApply() {
|
||||
const params = {
|
||||
afterId: this.product.afterId,
|
||||
};
|
||||
console.log("撤销申请", params);
|
||||
const { bizcode } = await cancelAfterSale(params);
|
||||
if (bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "撤销成功",
|
||||
});
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 寄回商品
|
||||
async onReturnGoods() {
|
||||
const params = {
|
||||
id: this.product.afterId,
|
||||
expressNo: this.product.expressNo,
|
||||
expressId: this.product.expressId,
|
||||
};
|
||||
console.log("寄回商品", params);
|
||||
const { bizcode } = await returnGoodsFeedback(params);
|
||||
if (bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "寄回成功",
|
||||
});
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 关闭弹窗
|
||||
onClose(item = false) {
|
||||
this.$emit("close", item);
|
||||
},
|
||||
// 快递公司
|
||||
async onGetExpressCompany() {
|
||||
const res = await getExpressCompany();
|
||||
console.log("快递公司", res.data);
|
||||
this.expressList = res.data;
|
||||
},
|
||||
// 方法
|
||||
onExpressConfirm(item) {
|
||||
console.log(item);
|
||||
const val = item.value[0];
|
||||
this.product.expressName = val.name;
|
||||
this.product.expressId = val.id;
|
||||
this.expressShow = false;
|
||||
},
|
||||
onSelectExpress() {
|
||||
if (this.status == 2) {
|
||||
this.expressShow = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
status() {
|
||||
console.log(
|
||||
"未售后-开始售后---",
|
||||
this.product.status,
|
||||
this.product.afterType
|
||||
);
|
||||
// 未售后-开始售后
|
||||
if (this.product.status == 9) {
|
||||
return 0;
|
||||
}
|
||||
// 已售后 --提交申请
|
||||
if (this.product.status == 0) {
|
||||
return 1;
|
||||
}
|
||||
// 售后中--待买家寄回商品
|
||||
if (this.product.status == 1) {
|
||||
return 2;
|
||||
}
|
||||
// 售后中--快递已发,待卖家收货
|
||||
if (this.product.status == 2) {
|
||||
return 3;
|
||||
}
|
||||
// 售后中--卖家已收货,退款失败
|
||||
if (this.product.status == 6) {
|
||||
return 4;
|
||||
}
|
||||
// 售后中--卖家已收货,退款成功
|
||||
if (this.product.status == 7) {
|
||||
return 5;
|
||||
}
|
||||
},
|
||||
/* 根据订单状态按钮显示不同文案 */
|
||||
buttonLabel() {
|
||||
if (this.status == 0) {
|
||||
return "提交申请";
|
||||
} else if (this.status == 1) {
|
||||
return "撤销申请";
|
||||
} else if (this.status == 2) {
|
||||
return "确定退货/退款";
|
||||
} else if (this.status == 3) {
|
||||
return "撤销申请";
|
||||
} else if (this.status == 4) {
|
||||
return "重新发起";
|
||||
} else if (this.status == 5) {
|
||||
return "我知道了";
|
||||
}
|
||||
},
|
||||
/* 根据订单状态显示不label */
|
||||
topLabel() {
|
||||
if (this.status == 1) {
|
||||
return "您已成功发起退货/退款申请,请耐心等待审";
|
||||
} else if (this.status == 2) {
|
||||
return "请按照以下地址寄回商品";
|
||||
} else if (this.status == 3) {
|
||||
return "退款/退货处理中";
|
||||
} else if (this.status == 4) {
|
||||
return "您发起的退货/退款申请,未通过";
|
||||
} else if (this.status == 5) {
|
||||
return "您发起的退货/退款申请,已处理完成";
|
||||
}
|
||||
},
|
||||
/* 根据订单状态显示不title */
|
||||
topTitle() {
|
||||
if (this.status == 1) {
|
||||
return "退款/退货审核中";
|
||||
} else if (this.status == 2) {
|
||||
return "退款申请通过";
|
||||
} else if (this.status == 3) {
|
||||
return "您已成功发起退货/退款申请,请耐心等待处";
|
||||
} else if (this.status == 4) {
|
||||
return "退款申请失败";
|
||||
} else if (this.status == 5) {
|
||||
return "退款成功";
|
||||
}
|
||||
},
|
||||
|
||||
/* 计算地址 */
|
||||
address() {
|
||||
return `${this.product.provinceName || ""}${this.product.cityName || ""}${
|
||||
this.product.areaName || ""
|
||||
}${this.product.address || ""} ${this.product.name || ""} ${
|
||||
this.product.phone || ""
|
||||
}`;
|
||||
},
|
||||
RETURN_REASON_OBJ() {
|
||||
return RETURN_REASON;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.refund_content {
|
||||
width: 100%;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
.card_list_box {
|
||||
padding-bottom: 88rpx;
|
||||
}
|
||||
.content_card {
|
||||
display: flex;
|
||||
margin-bottom: 48rpx;
|
||||
.card_img {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.card_info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: calc(100% - 176rpx);
|
||||
|
||||
.card_box {
|
||||
.card_title {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
color: #000000;
|
||||
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
.title {
|
||||
width: 80%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.price {
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.shop_status {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card_total {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card_list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
font-size: 28rpx;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
|
||||
.list_left {
|
||||
color: #666;
|
||||
}
|
||||
.input-express {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 400rpx;
|
||||
height: 100%;
|
||||
text-align: end;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.bottom_box {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0; /* 补充 left:0,确保容器从左侧开始 */
|
||||
right: 0; /* 补充 right:0,让容器宽度自适应屏幕/弹窗 */
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
padding: 0 48rpx 28rpx; /* 增加内边距,避免按钮贴边 */
|
||||
z-index: 10; /* 确保整个底部区域在内容上方 */
|
||||
.button {
|
||||
width: 100%; /* 直接用 100%,利用父容器的 padding 控制边距 */
|
||||
height: 88rpx;
|
||||
background: linear-gradient(270deg, #b164fb 0%, #7934f6 100%);
|
||||
color: #ffffff;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 28rpx; /* 只保留顶部 margin,底部由父容器 padding 控制 */
|
||||
/* 移除 margin 左右值,改用父容器 padding 控制边距 */
|
||||
}
|
||||
&.bottom_box_quash {
|
||||
.button {
|
||||
background: #ffffff;
|
||||
color: #b164fb;
|
||||
border: 1rpx solid #b164fb;
|
||||
}
|
||||
}
|
||||
&.bottom_box_disabled {
|
||||
.button {
|
||||
background: #e8ebf6;
|
||||
color: #cbced9;
|
||||
border: 1rpx solid #e7ebf6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<!-- 退货退款模块 -->
|
||||
<view>
|
||||
<view v-if="status > 0">
|
||||
<salesStatus
|
||||
:topLabel="topLabel"
|
||||
:topTitle="topTitle"
|
||||
:status="status"
|
||||
></salesStatus>
|
||||
</view>
|
||||
<view class="refund_content">
|
||||
<view class="content_card">
|
||||
<image :src="product.items[0].mainGraph" class="card_img"></image>
|
||||
<view class="card_info">
|
||||
<view class="card_box">
|
||||
<view class="card_title">
|
||||
<view class="title">{{ product.items[0].title }}</view>
|
||||
<view class="price">¥{{ product.items[0].goodsAmount }}</view>
|
||||
</view>
|
||||
<view class="shop_status">规格:{{ product.sumAmount }}</view>
|
||||
</view>
|
||||
<view class="card_total">
|
||||
<text>共{{ product.buyNum }}件</text>
|
||||
<text>合计{{ product.sumAmount }}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">退款原因</view>
|
||||
<view> {{ RETURN_REASON_OBJ[product.afterReason] }} </view>
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">退款金额</view>
|
||||
<view>
|
||||
¥{{ product.refundAmount || product.sumAmount }}
|
||||
<text style="font-size: 24rpx; color: #999">(退回现金余额)</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="status > 1" class="card_list_box">
|
||||
<view class="card_list">
|
||||
<view class="list_left">邮寄地址</view>
|
||||
<view>{{ address || "--" }}</view>
|
||||
</view>
|
||||
<view class="card_list" @click="onSelectExpress">
|
||||
<view class="list_left">请选择快递名称</view>
|
||||
<view>{{ product.expressName || "请选择快递公司" }}</view>
|
||||
</view>
|
||||
<view class="card_list">
|
||||
<view class="list_left">填快递单号</view>
|
||||
<input
|
||||
class="input-express"
|
||||
type="text"
|
||||
:disabled="status != 2"
|
||||
placeholder="请填写快递单号"
|
||||
v-model="product.expressNo"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="buttonLabel"
|
||||
:class="[
|
||||
'bottom_box',
|
||||
{
|
||||
bottom_box_disabled:
|
||||
status == 2 && (!product.expressNo || !product.expressName),
|
||||
},
|
||||
{ bottom_box_quash: status == 1 || status == 3 },
|
||||
]"
|
||||
>
|
||||
<view class="button operate_but_2" @click="submit">
|
||||
{{ buttonLabel }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
|
||||
<up-picker
|
||||
:show="expressShow"
|
||||
:columns="[expressList]"
|
||||
keyName="name"
|
||||
valueName="id"
|
||||
itemHeight="34"
|
||||
@confirm="onExpressConfirm"
|
||||
@cancel="expressShow = false"
|
||||
@close="expressShow = false"
|
||||
></up-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import salesStatus from "../components/salesStatus.vue";
|
||||
import {
|
||||
afterSaleApply,
|
||||
cancelAfterSale,
|
||||
returnGoodsFeedback,
|
||||
getExpressCompany,
|
||||
} from "@/api/order.js";
|
||||
import { RETURN_REASON } from "@/pages/mine_package/mine_order/emun/index.js";
|
||||
export default {
|
||||
components: { salesStatus },
|
||||
props: {
|
||||
product: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
cancelForm: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
expressList: [],
|
||||
expressShow: false,
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.onGetExpressCompany();
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
// 未售后 -- 提交申请
|
||||
if (this.status == 0) {
|
||||
this.onAfterSaleApply();
|
||||
}
|
||||
//已售后-- 撤销申请
|
||||
if (this.status == 1 || this.status == 3) {
|
||||
this.onCancelApply();
|
||||
}
|
||||
if (this.status == 2) {
|
||||
if (!this.product.expressNo || !this.product.expressName) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "请填写快递信息",
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.onReturnGoods();
|
||||
}
|
||||
// 售后中--退款失败
|
||||
if (this.status == 4) {
|
||||
// 重新发起
|
||||
this.onClose(true);
|
||||
}
|
||||
// 售后中--退款成功
|
||||
if (this.status == 5) {
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 未售后 -- 售后
|
||||
async onAfterSaleApply() {
|
||||
const params = {
|
||||
reason: this.cancelForm.afterReason,
|
||||
type: this.product.afterType, //0-未售后 1-退款不退货, 2-退货退款 3-换货
|
||||
id: this.product.id, // 订单id
|
||||
itemIds: this.product.items[0]?.id, // 商品id
|
||||
};
|
||||
console.log("确认取消", params);
|
||||
if (!params.reason) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "请选择取消原因",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { bizcode } = await afterSaleApply(params);
|
||||
if (bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "申请成功,等商家审核",
|
||||
});
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 撤销申请
|
||||
async onCancelApply() {
|
||||
const params = {
|
||||
afterId: this.product.afterId,
|
||||
};
|
||||
console.log("撤销申请", params);
|
||||
const { bizcode } = await cancelAfterSale(params);
|
||||
if (bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "撤销成功",
|
||||
});
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 寄回商品
|
||||
async onReturnGoods() {
|
||||
const params = {
|
||||
id: this.product.afterId,
|
||||
expressNo: this.product.expressNo,
|
||||
expressId: this.product.expressId,
|
||||
};
|
||||
console.log("寄回商品", params);
|
||||
const { bizcode } = await returnGoodsFeedback(params);
|
||||
if (bizcode === 100) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "寄回成功",
|
||||
});
|
||||
this.onClose();
|
||||
}
|
||||
},
|
||||
// 关闭弹窗
|
||||
onClose(item = false) {
|
||||
this.$emit("close", item);
|
||||
},
|
||||
// 快递公司
|
||||
async onGetExpressCompany() {
|
||||
const res = await getExpressCompany();
|
||||
console.log("快递公司", res.data);
|
||||
this.expressList = res.data;
|
||||
},
|
||||
// 方法
|
||||
onExpressConfirm(item) {
|
||||
console.log(item);
|
||||
const val = item.value[0];
|
||||
this.product.expressName = val.name;
|
||||
this.product.expressId = val.id;
|
||||
this.expressShow = false;
|
||||
},
|
||||
onSelectExpress() {
|
||||
if (this.status == 2) {
|
||||
this.expressShow = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
status() {
|
||||
console.log(
|
||||
"未售后-开始售后---",
|
||||
this.product.status,
|
||||
this.product.afterType
|
||||
);
|
||||
// 未售后-开始售后
|
||||
if (this.product.status == 9) {
|
||||
return 0;
|
||||
}
|
||||
// 已售后 --提交申请
|
||||
if (this.product.status == 0) {
|
||||
return 1;
|
||||
}
|
||||
// 售后中--待买家寄回商品
|
||||
if (this.product.status == 1) {
|
||||
return 2;
|
||||
}
|
||||
// 售后中--快递已发,待卖家收货
|
||||
if (this.product.status == 2) {
|
||||
return 3;
|
||||
}
|
||||
// 售后中--卖家已收货,退款失败
|
||||
if (this.product.status == 6) {
|
||||
return 4;
|
||||
}
|
||||
// 售后中--卖家已收货,退款成功
|
||||
if (this.product.status == 7) {
|
||||
return 5;
|
||||
}
|
||||
},
|
||||
/* 根据订单状态按钮显示不同文案 */
|
||||
buttonLabel() {
|
||||
if (this.status == 0) {
|
||||
return "提交申请";
|
||||
} else if (this.status == 1) {
|
||||
return "撤销申请";
|
||||
} else if (this.status == 2) {
|
||||
return "确定退货/退款";
|
||||
} else if (this.status == 3) {
|
||||
return "撤销申请";
|
||||
} else if (this.status == 4) {
|
||||
return "重新发起";
|
||||
} else if (this.status == 5) {
|
||||
return "我知道了";
|
||||
}
|
||||
},
|
||||
/* 根据订单状态显示不label */
|
||||
topLabel() {
|
||||
if (this.status == 1) {
|
||||
return "您已成功发起退货/退款申请,请耐心等待审";
|
||||
} else if (this.status == 2) {
|
||||
return "请按照以下地址寄回商品";
|
||||
} else if (this.status == 3) {
|
||||
return "退款/退货处理中";
|
||||
} else if (this.status == 4) {
|
||||
return "您发起的退货/退款申请,未通过";
|
||||
} else if (this.status == 5) {
|
||||
return "您发起的退货/退款申请,已处理完成";
|
||||
}
|
||||
},
|
||||
/* 根据订单状态显示不title */
|
||||
topTitle() {
|
||||
if (this.status == 1) {
|
||||
return "退款/退货审核中";
|
||||
} else if (this.status == 2) {
|
||||
return "退款申请通过";
|
||||
} else if (this.status == 3) {
|
||||
return "您已成功发起退货/退款申请,请耐心等待处";
|
||||
} else if (this.status == 4) {
|
||||
return "退款申请失败";
|
||||
} else if (this.status == 5) {
|
||||
return "退款成功";
|
||||
}
|
||||
},
|
||||
|
||||
/* 计算地址 */
|
||||
address() {
|
||||
return `${this.product.provinceName || ""}${this.product.cityName || ""}${
|
||||
this.product.areaName || ""
|
||||
}${this.product.address || ""} ${this.product.name || ""} ${
|
||||
this.product.phone || ""
|
||||
}`;
|
||||
},
|
||||
RETURN_REASON_OBJ() {
|
||||
return RETURN_REASON;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.refund_content {
|
||||
width: 100%;
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
.card_list_box {
|
||||
padding-bottom: 88rpx;
|
||||
}
|
||||
.content_card {
|
||||
display: flex;
|
||||
margin-bottom: 48rpx;
|
||||
.card_img {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.card_info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: calc(100% - 176rpx);
|
||||
|
||||
.card_box {
|
||||
.card_title {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
color: #000000;
|
||||
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
.title {
|
||||
width: 80%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.price {
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.shop_status {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card_total {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card_list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
font-size: 28rpx;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
|
||||
.list_left {
|
||||
color: #666;
|
||||
}
|
||||
.input-express {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 400rpx;
|
||||
height: 100%;
|
||||
text-align: end;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.bottom_box {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0; /* 补充 left:0,确保容器从左侧开始 */
|
||||
right: 0; /* 补充 right:0,让容器宽度自适应屏幕/弹窗 */
|
||||
text-align: center;
|
||||
background: #ffffff;
|
||||
padding: 0 48rpx 28rpx; /* 增加内边距,避免按钮贴边 */
|
||||
z-index: 10; /* 确保整个底部区域在内容上方 */
|
||||
.button {
|
||||
width: 100%; /* 直接用 100%,利用父容器的 padding 控制边距 */
|
||||
height: 88rpx;
|
||||
background: linear-gradient(270deg, #b164fb 0%, #7934f6 100%);
|
||||
color: #ffffff;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
border-radius: 8rpx;
|
||||
margin-top: 28rpx; /* 只保留顶部 margin,底部由父容器 padding 控制 */
|
||||
/* 移除 margin 左右值,改用父容器 padding 控制边距 */
|
||||
}
|
||||
&.bottom_box_quash {
|
||||
.button {
|
||||
background: #ffffff;
|
||||
color: #b164fb;
|
||||
border: 1rpx solid #b164fb;
|
||||
}
|
||||
}
|
||||
&.bottom_box_disabled {
|
||||
.button {
|
||||
background: #e8ebf6;
|
||||
color: #cbced9;
|
||||
border: 1rpx solid #e7ebf6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
<template>
|
||||
<!-- 退货退款进度icon -->
|
||||
<view class="status_box">
|
||||
<image class="status_img" :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine-purse/icon_arrow_black_${status == 4 ? 2 : status == 5 ? 3 : 1}.png`"></image>
|
||||
<view class="status_name">{{ topTitle }}</view>
|
||||
<view class="status_tip">{{ topLabel }}</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'salesStatus',
|
||||
props: {
|
||||
topLabel: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
topTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.status_box {
|
||||
|
||||
text-align: center;
|
||||
.status_img {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
}
|
||||
.status_name {
|
||||
margin-top: 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.status_tip {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 16rpx;
|
||||
background-color: #f5f5f7;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<!-- 退货退款进度icon -->
|
||||
<view class="status_box">
|
||||
<image class="status_img" :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine-purse/icon_arrow_black_${status == 4 ? 2 : status == 5 ? 3 : 1}.png`"></image>
|
||||
<view class="status_name">{{ topTitle }}</view>
|
||||
<view class="status_tip">{{ topLabel }}</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'salesStatus',
|
||||
props: {
|
||||
topLabel: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
topTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.status_box {
|
||||
|
||||
text-align: center;
|
||||
.status_img {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
}
|
||||
.status_name {
|
||||
margin-top: 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.status_tip {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 16rpx;
|
||||
background-color: #f5f5f7;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
export const RETURN_REASON = {
|
||||
1: "我不想买了",
|
||||
2: "下错单了",
|
||||
3: "商家未发货",
|
||||
4: "商品质量问题",
|
||||
5: "商品实物与描述不符",
|
||||
6: "商家发错货",
|
||||
7: "假冒品牌",
|
||||
8: "配件破损",
|
||||
9: "主商品破损",
|
||||
10: "协商一致退款",
|
||||
11: "少件(少配件)",
|
||||
12: "其他",
|
||||
}
|
||||
|
||||
export const RETURN_REASON_LIST = [
|
||||
{ id: 1, name: '我不想买了' },
|
||||
{ id: 2, name: '下错单了' },
|
||||
{ id: 3, name: '商家未发货' },
|
||||
{ id: 4, name: '商品质量问题' },
|
||||
{ id: 5, name: '商品实物与描述不符' },
|
||||
{ id: 6, name: '商家发错货' },
|
||||
{ id: 7, name: '假冒品牌' },
|
||||
{ id: 8, name: '配件破损' },
|
||||
{ id: 9, name: '主商品破损' },
|
||||
{ id: 10, name: '协商一致退款' },
|
||||
{ id: 11, name: '少件(少配件)' },
|
||||
{ id: 12, name: '其他' },
|
||||
]
|
||||
|
||||
|
||||
|
||||
export const RETURN_REASON = {
|
||||
1: "我不想买了",
|
||||
2: "下错单了",
|
||||
3: "商家未发货",
|
||||
4: "商品质量问题",
|
||||
5: "商品实物与描述不符",
|
||||
6: "商家发错货",
|
||||
7: "假冒品牌",
|
||||
8: "配件破损",
|
||||
9: "主商品破损",
|
||||
10: "协商一致退款",
|
||||
11: "少件(少配件)",
|
||||
12: "其他",
|
||||
}
|
||||
|
||||
export const RETURN_REASON_LIST = [
|
||||
{ id: 1, name: '我不想买了' },
|
||||
{ id: 2, name: '下错单了' },
|
||||
{ id: 3, name: '商家未发货' },
|
||||
{ id: 4, name: '商品质量问题' },
|
||||
{ id: 5, name: '商品实物与描述不符' },
|
||||
{ id: 6, name: '商家发错货' },
|
||||
{ id: 7, name: '假冒品牌' },
|
||||
{ id: 8, name: '配件破损' },
|
||||
{ id: 9, name: '主商品破损' },
|
||||
{ id: 10, name: '协商一致退款' },
|
||||
{ id: 11, name: '少件(少配件)' },
|
||||
{ id: 12, name: '其他' },
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user