分销问题修复,订单问题修复
This commit is contained in:
107
distribution/components/commission.vue
Normal file
107
distribution/components/commission.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<view>
|
||||
<up-popup
|
||||
:show="show"
|
||||
@close="close"
|
||||
mode="center"
|
||||
:safe-area-inset-bottom="false"
|
||||
>
|
||||
<view class="u-flex top justify-between u-p-32">
|
||||
<text class="title">{{ tipsType }}</text>
|
||||
<up-icon name="close" @click="close"></up-icon>
|
||||
</view>
|
||||
<scroll-view style="width: 500rpx; max-height: 60vh">
|
||||
<view class="u-p-30 font-14" style="width: 500rpx">
|
||||
<template v-if="tipsType == '等级分成比例'">
|
||||
<view class="u-flex justify-between font-bold u-m-b-20">
|
||||
<view>等级</view>
|
||||
<view>分成比例</view>
|
||||
</view>
|
||||
<view
|
||||
class="u-m-b-10"
|
||||
v-for="(item, index) in props.levelConfigList"
|
||||
:key="index"
|
||||
>
|
||||
<view class="u-flex justify-between">
|
||||
<view> {{ item.level }}({{ item.name }}) </view>
|
||||
<view class="color-666"> {{ item.levelOneCommission }}% </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="tipsType == '等级升级条件'">
|
||||
<view class="u-flex justify-between font-bold u-m-b-20">
|
||||
<view>等级</view>
|
||||
<view v-if="config.upgradeType != 'not_upgrade'">升级条件</view>
|
||||
</view>
|
||||
<view
|
||||
class="u-m-b-10"
|
||||
v-for="(item, index) in props.levelConfigList"
|
||||
:key="index"
|
||||
>
|
||||
<view class="u-flex justify-between">
|
||||
<view>
|
||||
<text>
|
||||
{{ item.level }}
|
||||
</text>
|
||||
<text>({{ item.name }}) </text>
|
||||
</view>
|
||||
<view v-if="config.upgradeType != 'not_upgrade'"
|
||||
>{{ returnTiaojain(item) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</up-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
const show = defineModel({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
const props = defineProps({
|
||||
tipsType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
levelConfigList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
function close() {
|
||||
show.value = false;
|
||||
}
|
||||
function returnTiaojain(item) {
|
||||
if (props.config.upgradeType === "not_upgrade") {
|
||||
return "";
|
||||
}
|
||||
if (props.config.upgradeType == "cost") {
|
||||
return `订单金额满${item.costAmount}元`;
|
||||
}
|
||||
if (props.config.upgradeType == "invite") {
|
||||
return `邀请${item.inviteCount}人`;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.top {
|
||||
border-bottom: 2rpx solid #ededed;
|
||||
}
|
||||
</style>
|
||||
137
distribution/components/rule.vue
Normal file
137
distribution/components/rule.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<view>
|
||||
<up-popup
|
||||
:show="show"
|
||||
@close="close"
|
||||
mode="center"
|
||||
:safe-area-inset-bottom="false"
|
||||
>
|
||||
<view class="u-flex top justify-between u-p-32">
|
||||
<text class="title">规则说明</text>
|
||||
<up-icon name="close" @click="close"></up-icon>
|
||||
</view>
|
||||
<scroll-view style="width: 500rpx; max-height: 60vh">
|
||||
<view class="u-p-30 font-14" style="width: 500rpx">
|
||||
<view class="font-12 color-666 u-m-t-16">
|
||||
<view>
|
||||
<view> 我的收益什么时候可以到账?</view>
|
||||
<view> 分销的结算时长为{{ config.settlementDay || 0 }}天</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-40" v-if="nextLvMoney">
|
||||
<view>怎么样才能升级分销员等级?</view>
|
||||
<template
|
||||
v-if="
|
||||
config.upgradeType != 'not_upgrade' &&
|
||||
config.levelConfigList &&
|
||||
config.levelConfigList.length >= 2
|
||||
"
|
||||
>
|
||||
<template v-if="config.upgradeType == 'invite'">
|
||||
<view
|
||||
>邀请的有效人数达到{{
|
||||
config.inviteCount || 0
|
||||
}}人即可升级</view
|
||||
>
|
||||
<view class="u-m-t-40"> 什么是有效邀请人数?</view>
|
||||
<view> 被邀请人在店铺消费过,即有一笔订单完成才算有效</view>
|
||||
</template>
|
||||
|
||||
<template v-if="config.upgradeType == 'cost'&&nextLvMoney">
|
||||
<view> 消费金额总计达到{{ nextLvMoney }}元即可升级</view>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view>请联系商家</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="u-m-t-40" v-if="config.upgradeType == 'cost'">
|
||||
<view>消费金额如何计算?</view>
|
||||
<view
|
||||
>消费金额是计算您和您邀请的人在店铺消费的总金额,但退款订单不计入</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</up-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
const show = defineModel({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
const props = defineProps({
|
||||
tipsType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
distributionUser: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
function close() {
|
||||
show.value = false;
|
||||
}
|
||||
const nextLvMoney = computed(() => {
|
||||
let nextLv = undefined;
|
||||
if (
|
||||
!props.distributionUser ||
|
||||
!props.config ||
|
||||
!props.config.levelConfigList ||
|
||||
!props.config.levelConfigList.length
|
||||
) {
|
||||
return "";
|
||||
}
|
||||
if (!props.distributionUser || !props.distributionUser.distributionId) {
|
||||
nextLv = props.config.levelConfigList[0];
|
||||
} else {
|
||||
nextLv = props.config.levelConfigList.find(
|
||||
(v) => v.level == props.distributionUser.level + 1
|
||||
);
|
||||
}
|
||||
|
||||
if (nextLv) {
|
||||
if (props.config.upgradeType == "cost") {
|
||||
return nextLv.costAmount;
|
||||
}
|
||||
if (props.config.upgradeType == "invite") {
|
||||
return nextLv.inviteCount;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
});
|
||||
|
||||
const juNextLvMoney = computed(() => {
|
||||
if (!nextLvMoney.value) {
|
||||
return "";
|
||||
}
|
||||
if (props.config.upgradeType == "cost" && props.distributionUser) {
|
||||
return nextLvMoney.value - (props.distributionUser.consumeAmount || 0);
|
||||
}
|
||||
if (props.config.upgradeType == "invite" && props.distributionUser) {
|
||||
return nextLvMoney.value - (props.config.inviteCount || 0);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.top {
|
||||
border-bottom: 2rpx solid #ededed;
|
||||
}
|
||||
</style>
|
||||
57
distribution/components/tips-popup.vue
Normal file
57
distribution/components/tips-popup.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view>
|
||||
<up-popup
|
||||
:show="show"
|
||||
@close="close"
|
||||
mode="center"
|
||||
:safe-area-inset-bottom="false"
|
||||
>
|
||||
<view class="u-flex top justify-between u-p-32">
|
||||
<text class="title">{{props.tipsType}}</text>
|
||||
<up-icon name="close" @click="close"></up-icon>
|
||||
</view>
|
||||
<view class="u-p-30 font-14" style="width: 500rpx">
|
||||
{{ popupText }}
|
||||
</view>
|
||||
</up-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
const show = defineModel({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
const props = defineProps({
|
||||
tipsType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
function close() {
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
const popupText = computed(() => {
|
||||
if (props.tipsType === "总收益") {
|
||||
return "总收益:即您在所有店铺通过分销获得总金额,包括待入账金额,但不包含已退款订单";
|
||||
}
|
||||
if (props.tipsType === "待入账") {
|
||||
return "待入账:即已通过订单分销获得但未达到结算时间的金额,结算时间达到后将会计入可提现金额";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.top {
|
||||
border-bottom: 2rpx solid #ededed;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user