Merge branch 'bd-test' of gitee.com:cabbage_qd/web-base-h5 into bd-online
This commit is contained in:
commit
78acf713ad
|
|
@ -1,176 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="width-auto">
|
|
||||||
<view class="title">
|
|
||||||
{{'真实业绩分布'}}
|
|
||||||
</view>
|
|
||||||
<div class="flex-s">
|
|
||||||
<div id="main22" style="width: 690rpx;height: 600rpx;" :style="myChartStyle"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import * as echarts from "echarts";
|
|
||||||
import { realPerformancePic } from "@/config/distribute.js";
|
|
||||||
export default {
|
|
||||||
name: "recommendTime",
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
texts:'',
|
|
||||||
pieData: [
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
age: 0,
|
|
||||||
name: '左区',
|
|
||||||
itemStyle: {color:'#EE5858'},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 0,
|
|
||||||
age: 0,
|
|
||||||
name: '右区',
|
|
||||||
itemStyle: {color:'#FBB046'},
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
myChartStyle: {
|
|
||||||
float: "center",
|
|
||||||
width: "690rpx",
|
|
||||||
height: "750rpx",
|
|
||||||
paddingTop: "0",
|
|
||||||
// margin: "20px",
|
|
||||||
}, //图表样式
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getData()
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
getData() {
|
|
||||||
realPerformancePic().then((res)=>{
|
|
||||||
this.pieData[1].value = res.data.rightAchievement
|
|
||||||
this.pieData[0].value = res.data.leftAchievement
|
|
||||||
this.pieData[1].age = res.data.rightNumber
|
|
||||||
this.pieData[0].age = res.data.leftNumber
|
|
||||||
setTimeout(()=>{
|
|
||||||
this.ageChart(res.data);
|
|
||||||
},50)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
ageChart(datas) {
|
|
||||||
let that =this
|
|
||||||
var myChart = echarts.init(document.getElementById('main22'));
|
|
||||||
var option = {
|
|
||||||
legend: {
|
|
||||||
// 图例
|
|
||||||
// right: "0%",
|
|
||||||
left: '33%',
|
|
||||||
bottom: '0',
|
|
||||||
color: '#999',
|
|
||||||
// orient: "vertical",
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
type: "pie",
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
lineHeight:16,// 行高
|
|
||||||
|
|
||||||
normal: {
|
|
||||||
borderWidth:2,
|
|
||||||
formatter: function (data) {
|
|
||||||
return (
|
|
||||||
data.data.name +
|
|
||||||
":" +
|
|
||||||
data.data.age +
|
|
||||||
that.$t('w_0337') +
|
|
||||||
"\n" +
|
|
||||||
"\n" +
|
|
||||||
that.$t('ENU_TOTAL_V_1') + ':' +
|
|
||||||
data.data.value +
|
|
||||||
that.$t('S_C_58')
|
|
||||||
);
|
|
||||||
},
|
|
||||||
color: "#fff",
|
|
||||||
position:'inside' //默认自适应,水平布局为'top',垂直布局为'right',可选为 'inside'|'left'|'right'|'top'|'bottom'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
radius: "70%", //饼图半径
|
|
||||||
data: that.pieData
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
myChart.setOption(option);
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.width-auto{
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
height:950rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
width: 690rpx;
|
|
||||||
|
|
||||||
border-radius: 20rpx;
|
|
||||||
margin: 20rpx auto;
|
|
||||||
}
|
|
||||||
.title{
|
|
||||||
padding: 20rpx 30rpx ;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
border-bottom: 10rpx solid #f3f3f3;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
::v-deep .el-select .el-input .el-select__caret{
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.lines{
|
|
||||||
width: 2px;
|
|
||||||
height: 470px;
|
|
||||||
opacity: 1;
|
|
||||||
background: #979797;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 50px;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -110px;
|
|
||||||
}
|
|
||||||
.right-lines{
|
|
||||||
position: absolute;
|
|
||||||
right: 80px;
|
|
||||||
top: 140px;
|
|
||||||
color: #999;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.item-s{
|
|
||||||
padding-bottom: 10px;
|
|
||||||
display: flex;
|
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
.bg-color{
|
|
||||||
width: 40px;
|
|
||||||
height: 22px;
|
|
||||||
border-radius: 2px;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.flex-s{
|
|
||||||
// display: flex;
|
|
||||||
// justify-content: center;
|
|
||||||
// align-items: center;
|
|
||||||
// width: 700px;
|
|
||||||
}
|
|
||||||
.styles{
|
|
||||||
position: absolute;
|
|
||||||
right: -30px;
|
|
||||||
z-index: 111;
|
|
||||||
top: 60px;
|
|
||||||
/*background: rgba(0,0,0,0.05);*/
|
|
||||||
/*border-radius: 4px 4px 4px 4px;*/
|
|
||||||
}
|
|
||||||
::v-deep .el-select .el-input__inner{
|
|
||||||
border: none;
|
|
||||||
background: rgba(0,0,0,0.05);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,50 +1,57 @@
|
||||||
|
|
||||||
const http = uni.$u.http
|
const http = uni.$u.http
|
||||||
|
|
||||||
//安置图
|
//安置图
|
||||||
export const getPlaceMent = (params) => http.get('/member/api/achieve/query-place-tree', {params})
|
export const getPlaceMent = params =>
|
||||||
|
http.get('/member/api/achieve/query-place-tree', { params })
|
||||||
|
|
||||||
//安置图详情
|
//安置图详情
|
||||||
export const getTreeDetail = (data) => http.post('/member/api/achieve/query-place-tree-detail', data)
|
export const getTreeDetail = data =>
|
||||||
|
http.post('/member/api/achieve/query-place-tree-detail', data)
|
||||||
|
|
||||||
//安置图上方等级
|
//安置图上方等级
|
||||||
export const getAvatarInfo = (params) => http.get('/member/api/member-structure/get-avatar-info', {params})
|
export const getAvatarInfo = params =>
|
||||||
|
http.get('/member/api/member-structure/get-avatar-info', { params })
|
||||||
|
|
||||||
//安置图
|
//安置图
|
||||||
export const getDayType = (params) => http.get('/system/pub/enums/get-day-type', {params})
|
export const getDayType = params =>
|
||||||
|
http.get('/system/pub/enums/get-day-type', { params })
|
||||||
|
|
||||||
//获取安置业绩分布
|
//获取安置业绩分布
|
||||||
export const azAchievement = (params) => http.get('/report/api/achieve/az-achievement', {params})
|
export const azAchievement = params =>
|
||||||
|
http.get('/report/api/achieve/az-achievement', { params })
|
||||||
|
|
||||||
//获取安置业绩分布
|
//获取安置业绩分布
|
||||||
export const getPerformance = (params) => http.get('/member/api/achieve/query-real-performance', {params})
|
export const getPerformance = params =>
|
||||||
|
http.get('/member/api/achieve/query-real-performance', { params })
|
||||||
//获取真实业绩分布
|
|
||||||
export const realPerformancePic = (params) => http.get('/member/api/achieve/query-real-performance-pic', {params})
|
|
||||||
|
|
||||||
|
|
||||||
//获取推荐列表
|
//获取推荐列表
|
||||||
export const parentList = (params) => http.get('/member/api/member/parent-list', {params})
|
export const parentList = params =>
|
||||||
|
http.get('/member/api/member/parent-list', { params })
|
||||||
|
|
||||||
//获取平均时长
|
//获取平均时长
|
||||||
export const getMemberRecommend = (params) => http.get('/member/api/census/get-member-recommend-time', {params})
|
export const getMemberRecommend = params =>
|
||||||
|
http.get('/member/api/census/get-member-recommend-time', { params })
|
||||||
|
|
||||||
//获取直推业绩左侧
|
//获取直推业绩左侧
|
||||||
export const parentAchieveLeft = (data) => http.post('/member/api/achieve/parent-achieve-left', data)
|
export const parentAchieveLeft = data =>
|
||||||
|
http.post('/member/api/achieve/parent-achieve-left', data)
|
||||||
|
|
||||||
//获取直推业绩右侧
|
//获取直推业绩右侧
|
||||||
export const parentAchieveRight = (data) => http.post('/member/api/achieve/parent-achieve-right',data)
|
export const parentAchieveRight = data =>
|
||||||
|
http.post('/member/api/achieve/parent-achieve-right', data)
|
||||||
|
|
||||||
//获取等级
|
//获取等级
|
||||||
export const systemGrandeRange = (params) => http.get('/system/manage/grade/gradeRanglist', {params})
|
export const systemGrandeRange = params =>
|
||||||
|
http.get('/system/manage/grade/gradeRanglist', { params })
|
||||||
|
|
||||||
//新增业绩统计
|
//新增业绩统计
|
||||||
export const getPlaceNewAddAchieve = (params) => http.get('/member/api/achieve/place-new-add-achieve-stat', {params})
|
export const getPlaceNewAddAchieve = params =>
|
||||||
|
http.get('/member/api/achieve/place-new-add-achieve-stat', { params })
|
||||||
|
|
||||||
//获取业绩类型
|
//获取业绩类型
|
||||||
export const getYjList = (params) => http.get('/system/pub/enums/achievement-type-member', {params})
|
export const getYjList = params =>
|
||||||
|
http.get('/system/pub/enums/achievement-type-member', { params })
|
||||||
|
|
||||||
//月度业绩左右区业绩详情
|
//月度业绩左右区业绩详情
|
||||||
export const getAchieveDetails = (params) => http.get('/member/api/achieve/place-new-add-achieve-details', {params})
|
export const getAchieveDetails = params =>
|
||||||
|
http.get('/member/api/achieve/place-new-add-achieve-details', { params })
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
:list="item.waresList"
|
:list="item.waresList"
|
||||||
:title="item.specialAreaName"
|
:title="item.specialAreaName"
|
||||||
size="small"
|
size="small"
|
||||||
|
:showSales="item.specialArea"
|
||||||
></area-product-list>
|
></area-product-list>
|
||||||
<!-- <view class="goods-top">
|
<!-- <view class="goods-top">
|
||||||
<view class="title">{{ item.specialAreaName }}</view>
|
<view class="title">{{ item.specialAreaName }}</view>
|
||||||
|
|
@ -251,7 +252,13 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '秒杀专区',
|
||||||
|
value: 14,
|
||||||
|
name: 'live',
|
||||||
|
isShow: true,
|
||||||
|
children: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '复购专区',
|
label: '复购专区',
|
||||||
value: 3,
|
value: 3,
|
||||||
|
|
@ -282,12 +289,6 @@ export default {
|
||||||
name: 'cooperation',
|
name: 'cooperation',
|
||||||
isShow: true,
|
isShow: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '直播专区',
|
|
||||||
value: 14,
|
|
||||||
name: 'live',
|
|
||||||
isShow: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '工具流',
|
label: '工具流',
|
||||||
value: 12,
|
value: 12,
|
||||||
|
|
@ -585,11 +586,13 @@ export default {
|
||||||
},
|
},
|
||||||
navTap(item) {
|
navTap(item) {
|
||||||
let tapx = -1
|
let tapx = -1
|
||||||
|
|
||||||
this.zoneList.forEach((items, index) => {
|
this.zoneList.forEach((items, index) => {
|
||||||
if (items.value == item.specialArea) {
|
if (items.value == item.specialArea) {
|
||||||
tapx = index
|
tapx = index
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (tapx == -1) {
|
if (tapx == -1) {
|
||||||
this.zoneList.forEach((items, index) => {
|
this.zoneList.forEach((items, index) => {
|
||||||
items.children.forEach(ctem => {
|
items.children.forEach(ctem => {
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,6 @@ export default {
|
||||||
if (
|
if (
|
||||||
this.specialArea == 3 ||
|
this.specialArea == 3 ||
|
||||||
this.specialArea == 12 ||
|
this.specialArea == 12 ||
|
||||||
this.specialArea == 14 ||
|
|
||||||
this.specialArea == 22 ||
|
this.specialArea == 22 ||
|
||||||
this.specialArea == 26
|
this.specialArea == 26
|
||||||
) {
|
) {
|
||||||
|
|
@ -643,7 +642,7 @@ export default {
|
||||||
} else if (this.specialArea == 13) {
|
} else if (this.specialArea == 13) {
|
||||||
str = '福利专区'
|
str = '福利专区'
|
||||||
} else if (this.specialArea == 14) {
|
} else if (this.specialArea == 14) {
|
||||||
str = '直播专区'
|
str = '秒杀专区'
|
||||||
} else if (this.specialArea == 11) {
|
} else if (this.specialArea == 11) {
|
||||||
str = '积分专区'
|
str = '积分专区'
|
||||||
} else if (this.specialArea == 10) {
|
} else if (this.specialArea == 10) {
|
||||||
|
|
@ -654,23 +653,11 @@ export default {
|
||||||
this.specialArea == 27
|
this.specialArea == 27
|
||||||
) {
|
) {
|
||||||
str = '升级专区'
|
str = '升级专区'
|
||||||
} else if (this.specialArea == 7 || this.specialArea == 101) {
|
|
||||||
str = '嗨粉专区'
|
|
||||||
} else if (this.specialArea == 18) {
|
|
||||||
str = '创客礼包'
|
|
||||||
|
|
||||||
this.isSpace = true
|
|
||||||
} else if (this.specialArea == 19) {
|
|
||||||
str = '赋能礼包'
|
|
||||||
this.isSpace = true
|
|
||||||
} else if (this.specialArea == 28) {
|
|
||||||
str = '创客空间专区'
|
|
||||||
} else if (this.specialArea == 31) {
|
|
||||||
str = '专供专区'
|
|
||||||
this.isSpace = true
|
|
||||||
} else if (this.specialArea == 30) {
|
} else if (this.specialArea == 30) {
|
||||||
str = '续约专区'
|
str = '续约专区'
|
||||||
this.isSpace = true
|
this.isSpace = true
|
||||||
|
} else if (this.specialArea == 14) {
|
||||||
|
str = '秒杀专区'
|
||||||
}
|
}
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: str,
|
title: str,
|
||||||
|
|
|
||||||
|
|
@ -506,17 +506,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-show="[14, 3, 2, 26, 28].includes(specialArea)">
|
||||||
v-show="specialArea == 3 || specialArea == 26 || specialArea == 28"
|
<div class="tit4">{{ '购买人信息' }}</div>
|
||||||
>
|
|
||||||
<div class="tit4">{{ '复购会员信息' }}</div>
|
|
||||||
<div class="quan">
|
<div class="quan">
|
||||||
<div class="kuang_i">
|
<div class="kuang_i">
|
||||||
<div>{{ '复购编号' }}</div>
|
<div>{{ '会员编号' }}</div>
|
||||||
<div>{{ orderData.memberCode }}</div>
|
<div>{{ orderData.memberCode }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="kuang_i">
|
<div class="kuang_i">
|
||||||
<div>{{ '复购姓名' }}</div>
|
<div>{{ '会员姓名' }}</div>
|
||||||
<div>{{ orderData.memberName }}</div>
|
<div>{{ orderData.memberName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="kuang_i">
|
<div class="kuang_i">
|
||||||
|
|
|
||||||
|
|
@ -1,415 +1,416 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
|
<view class="top-lists">
|
||||||
<view class="top-lists">
|
<view
|
||||||
<view v-for="(item, index) in navList" v-show="item.menuKey!=''" :key="index"
|
v-for="(item, index) in navList"
|
||||||
:class="navIndex == index ? 'styles' : ''" class="nav-view" @click="clickHref(index)">
|
v-show="item.menuKey != ''"
|
||||||
{{ item.name }}
|
:key="index"
|
||||||
</view>
|
:class="navIndex == index ? 'styles' : ''"
|
||||||
</view>
|
class="nav-view"
|
||||||
<view>
|
@click="clickHref(index)"
|
||||||
|
>
|
||||||
</view>
|
{{ item.name }}
|
||||||
<!-- 业绩分布 !-->
|
</view>
|
||||||
<template>
|
</view>
|
||||||
<view v-if="navIndex==0 && navList[0].menuKey!=''">
|
<view> </view>
|
||||||
<view v-if='ifDetail==0'>
|
<!-- 业绩分布 !-->
|
||||||
<view>
|
<template>
|
||||||
<performanceDistribution />
|
<view v-if="navIndex == 0 && navList[0].menuKey != ''">
|
||||||
</view>
|
<view v-if="ifDetail == 0">
|
||||||
<!-- 安置图 -->
|
<view>
|
||||||
<view>
|
<performanceDistribution />
|
||||||
<placement />
|
</view>
|
||||||
</view>
|
<!-- 安置图 -->
|
||||||
</view>
|
<view>
|
||||||
<view v-else>
|
<placement />
|
||||||
<!-- 月度业绩详情 -->
|
</view>
|
||||||
<view>
|
</view>
|
||||||
<monthPvDetail :placeDept='ifDetail' />
|
<view v-else>
|
||||||
</view>
|
<!-- 月度业绩详情 -->
|
||||||
|
<view>
|
||||||
</view>
|
<monthPvDetail :placeDept="ifDetail" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</view>
|
||||||
<!-- 安置图 !-->
|
</view>
|
||||||
<!-- <template>
|
</template>
|
||||||
|
<!-- 安置图 !-->
|
||||||
|
<!-- <template>
|
||||||
<view v-if="navIndex==1">
|
<view v-if="navIndex==1">
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template> -->
|
</template> -->
|
||||||
<!-- 月度新增统计 !-->
|
<!-- 月度新增统计 !-->
|
||||||
<template>
|
<template>
|
||||||
<!-- <view v-if="navIndex==1">
|
<!-- <view v-if="navIndex==1">
|
||||||
|
|
||||||
</view> -->
|
</view> -->
|
||||||
</template>
|
</template>
|
||||||
<!-- 月度新增业绩 / 数据查询 !-->
|
<!-- 月度新增业绩 / 数据查询 !-->
|
||||||
<template>
|
<template>
|
||||||
<view v-if="navIndex==1" style="padding-bottom: 20rpx;">
|
<view v-if="navIndex == 1" style="padding-bottom: 20rpx">
|
||||||
<!-- 首购新增业绩 !-->
|
<!-- 首购新增业绩 !-->
|
||||||
<view>
|
<view>
|
||||||
<fistAddPv />
|
<fistAddPv />
|
||||||
</view>
|
</view>
|
||||||
<!-- 首购业绩分布 !-->
|
<!-- 首购业绩分布 !-->
|
||||||
<view>
|
<view>
|
||||||
<firstPv></firstPv>
|
<firstPv></firstPv>
|
||||||
</view>
|
</view>
|
||||||
<!-- 复购新增业绩 !-->
|
<!-- 复购新增业绩 !-->
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<repAddPv />
|
<repAddPv />
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- 复购业绩分布 !-->
|
<!-- 复购业绩分布 !-->
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<secondPv></secondPv>
|
<secondPv></secondPv>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- 奖衔业绩分布 !-->
|
<!-- 奖衔业绩分布 !-->
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<placementPerformance />
|
<placementPerformance />
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- 真实业绩分布 !-->
|
<!-- 真实业绩分布 !-->
|
||||||
<!-- <view>
|
<!-- <view>
|
||||||
<realPerformances />
|
<realPerformances />
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- 首购新增业绩对比 !-->
|
<!-- 首购新增业绩对比 !-->
|
||||||
<view>
|
<view>
|
||||||
<mounthPvCompare />
|
<mounthPvCompare />
|
||||||
</view>
|
</view>
|
||||||
<!-- 活跃会员对比 !-->
|
<!-- 活跃会员对比 !-->
|
||||||
<view>
|
<view>
|
||||||
<activeMembers></activeMembers>
|
<activeMembers></activeMembers>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 推荐小区分布 !-->
|
||||||
<!-- 推荐小区分布 !-->
|
<!-- <view>
|
||||||
<!-- <view>
|
|
||||||
<recommendedCommunity />
|
<recommendedCommunity />
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
|
<!-- 推荐平均用时 -->
|
||||||
<!-- 推荐平均用时 -->
|
<!-- <view>
|
||||||
<!-- <view>
|
|
||||||
<recommendTime />
|
<recommendTime />
|
||||||
</view> -->
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
</view>
|
<!-- 直推业绩 !-->
|
||||||
</template>
|
<template>
|
||||||
|
<view v-if="navIndex == 2">
|
||||||
<!-- 直推业绩 !-->
|
<view class="height-auto-s">
|
||||||
<template>
|
<view style="font-size: 28rpx">{{ '直推业绩' }}</view>
|
||||||
<view v-if="navIndex==2">
|
<view class="flex-ss">
|
||||||
<view class="height-auto-s">
|
<view class="time1">
|
||||||
<view style="font-size: 28rpx;">{{'直推业绩'}}</view>
|
<picker
|
||||||
<view class="flex-ss">
|
:value="query.startDate"
|
||||||
<view class="time1">
|
fields="month"
|
||||||
<picker :value="query.startDate" fields='month' mode="date" @change="bindDateChange">
|
mode="date"
|
||||||
<view v-if="query.startDate!=''" class="uni-inputs">{{query.startDate}}</view>
|
@change="bindDateChange"
|
||||||
<view v-else class="uni-input">{{'开始日期'}}</view>
|
>
|
||||||
</picker>
|
<view v-if="query.startDate != ''" class="uni-inputs">{{
|
||||||
</view>
|
query.startDate
|
||||||
<!-- <view class="text_s">{{'至'}}</view>
|
}}</view>
|
||||||
|
<view v-else class="uni-input">{{ '开始日期' }}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="text_s">{{'至'}}</view>
|
||||||
<view class="time1" style="margin-right: 0;">
|
<view class="time1" style="margin-right: 0;">
|
||||||
<picker :value="query.endDate" mode="date" @change="bindDateChange1">
|
<picker :value="query.endDate" mode="date" @change="bindDateChange1">
|
||||||
<view v-if="query.endDate!=''" class="uni-inputs">{{query.endDate}}</view>
|
<view v-if="query.endDate!=''" class="uni-inputs">{{query.endDate}}</view>
|
||||||
<view v-else class="uni-input">{{'结束日期'}}</view>
|
<view v-else class="uni-input">{{'结束日期'}}</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 推荐业绩分布 !-->
|
<!-- 推荐业绩分布 !-->
|
||||||
<view>
|
<view>
|
||||||
<recommendPerformance ref="recommends" />
|
<recommendPerformance ref="recommends" />
|
||||||
</view>
|
</view>
|
||||||
<!-- 等级业绩 !-->
|
<!-- 等级业绩 !-->
|
||||||
<view>
|
<view>
|
||||||
<gradePerformance ref="recommends1" />
|
<gradePerformance ref="recommends1" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<!-- 推荐列表 !-->
|
<!-- 推荐列表 !-->
|
||||||
<template>
|
<template>
|
||||||
<view v-if="navIndex==3">
|
<view v-if="navIndex == 3">
|
||||||
<directList ref="sgsyData" />
|
<directList ref="sgsyData" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
</view>
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/config/login.js'
|
import * as api from '@/config/login.js'
|
||||||
import * as apis from '@/config/market.js'
|
import * as apis from '@/config/market.js'
|
||||||
import {
|
import { setToken } from '@/config/auth.js'
|
||||||
setToken
|
import store from '@/store'
|
||||||
} from '@/config/auth.js'
|
import placement from '@/components/distribution/placement.vue'
|
||||||
import store from '@/store'
|
import placementPerformance from '@/components/distribution/placementPerformance.vue'
|
||||||
import placement from '@/components/distribution/placement.vue'
|
import fistAddPv from '@/components/distribution/fistAddPv.vue'
|
||||||
import placementPerformance from '@/components/distribution/placementPerformance.vue'
|
import mounthPvCompare from '@/components/distribution/mounthPvCompare.vue'
|
||||||
import fistAddPv from '@/components/distribution/fistAddPv.vue'
|
import activeMembers from '@/components/distribution/activeMembers.vue'
|
||||||
import mounthPvCompare from '@/components/distribution/mounthPvCompare.vue'
|
import repAddPv from '@/components/distribution/repAddPv.vue'
|
||||||
import activeMembers from '@/components/distribution/activeMembers.vue'
|
import recommendedCommunity from '@/components/distribution/recommendedCommunity.vue'
|
||||||
import repAddPv from '@/components/distribution/repAddPv.vue'
|
import firstPv from '@/components/distribution/firstPv.vue'
|
||||||
import recommendedCommunity from '@/components/distribution/recommendedCommunity.vue'
|
import secondPv from '@/components/distribution/secondPv.vue'
|
||||||
import firstPv from '@/components/distribution/firstPv.vue'
|
import realPerformances from '@/components/distribution/realPerformances.vue'
|
||||||
import secondPv from '@/components/distribution/secondPv.vue'
|
// import realPerformance from '@/components/distribution/realPerformance.vue'
|
||||||
import realPerformances from '@/components/distribution/realPerformances.vue'
|
import directList from '@/components/distribution/directList.vue'
|
||||||
import realPerformance from '@/components/distribution/realPerformance.vue'
|
import recommendTime from '@/components/distribution/recommendTime.vue'
|
||||||
import directList from '@/components/distribution/directList.vue'
|
import gradePerformance from '@/components/distribution/gradePerformance.vue'
|
||||||
import recommendTime from '@/components/distribution/recommendTime.vue'
|
import recommendPerformance from '@/components/distribution/recommendPerformance.vue'
|
||||||
import gradePerformance from '@/components/distribution/gradePerformance.vue'
|
import performanceDistribution from '@/components/distribution/performanceDistribution.vue'
|
||||||
import recommendPerformance from '@/components/distribution/recommendPerformance.vue'
|
import monthPvDetail from '@/components/distribution/monthPvDetail.vue'
|
||||||
import performanceDistribution from '@/components/distribution/performanceDistribution.vue'
|
export default {
|
||||||
import monthPvDetail from '@/components/distribution/monthPvDetail.vue'
|
components: {
|
||||||
export default {
|
placement,
|
||||||
|
realPerformances,
|
||||||
|
placementPerformance,
|
||||||
|
// realPerformance,
|
||||||
|
directList,
|
||||||
|
recommendTime,
|
||||||
|
gradePerformance,
|
||||||
|
recommendPerformance,
|
||||||
|
performanceDistribution,
|
||||||
|
fistAddPv,
|
||||||
|
repAddPv,
|
||||||
|
recommendedCommunity,
|
||||||
|
firstPv,
|
||||||
|
secondPv,
|
||||||
|
mounthPvCompare,
|
||||||
|
activeMembers,
|
||||||
|
monthPvDetail,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
index: null,
|
||||||
|
userInfo: [],
|
||||||
|
query: {
|
||||||
|
startDate: '',
|
||||||
|
},
|
||||||
|
marketList: [
|
||||||
|
{
|
||||||
|
text: '奖金来源',
|
||||||
|
id: 3,
|
||||||
|
path: '/marketDynamics',
|
||||||
|
name: 'bonusSource',
|
||||||
|
isShow: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
navList: [
|
||||||
|
{
|
||||||
|
name: '月度业绩',
|
||||||
|
menuKey: '',
|
||||||
|
value: 'ConsanguinityCheck',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '数据查询',
|
||||||
|
menuKey: '',
|
||||||
|
value: 'monthlyPerformance',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '直推业绩',
|
||||||
|
menuKey: '',
|
||||||
|
value: 'recommendPerformance',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '推荐列表',
|
||||||
|
menuKey: '',
|
||||||
|
value: 'recommendList',
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
// {
|
||||||
placement,
|
// name: "最末节点",
|
||||||
realPerformances,
|
// menuKey: "",
|
||||||
placementPerformance,
|
// value: "placementChart"
|
||||||
realPerformance,
|
// },
|
||||||
directList,
|
// {
|
||||||
recommendTime,
|
// name: "月度新增统计",
|
||||||
gradePerformance,
|
// menuKey: "",
|
||||||
recommendPerformance,
|
// value: "monthlyChart"
|
||||||
performanceDistribution,
|
// },
|
||||||
fistAddPv,
|
|
||||||
repAddPv,
|
|
||||||
recommendedCommunity,
|
|
||||||
firstPv,
|
|
||||||
secondPv,
|
|
||||||
mounthPvCompare,
|
|
||||||
activeMembers,
|
|
||||||
monthPvDetail
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
index: null,
|
|
||||||
userInfo: [],
|
|
||||||
query: {
|
|
||||||
startDate: '',
|
|
||||||
},
|
|
||||||
marketList: [{
|
|
||||||
text: '奖金来源',
|
|
||||||
id: 3,
|
|
||||||
path: "/marketDynamics",
|
|
||||||
name: 'bonusSource',
|
|
||||||
isShow: false,
|
|
||||||
}, ],
|
|
||||||
navList: [{
|
|
||||||
name: '月度业绩',
|
|
||||||
menuKey: "",
|
|
||||||
value: "ConsanguinityCheck"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '数据查询',
|
|
||||||
menuKey: "",
|
|
||||||
value: "monthlyPerformance"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '直推业绩',
|
|
||||||
menuKey: "",
|
|
||||||
value: "recommendPerformance"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '推荐列表',
|
|
||||||
menuKey: "",
|
|
||||||
value: "recommendList"
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// name: "最末节点",
|
// name: '推荐平均用时',
|
||||||
// menuKey: "",
|
// menuKey: "",
|
||||||
// value: "placementChart"
|
// value: "recommendTime"
|
||||||
// },
|
// },
|
||||||
// {
|
],
|
||||||
// name: "月度新增统计",
|
navIndex: 0,
|
||||||
// menuKey: "",
|
page: {
|
||||||
// value: "monthlyChart"
|
pageSize: 50,
|
||||||
// },
|
pageNum: 1,
|
||||||
|
},
|
||||||
|
ifDetail: '0',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(val) {
|
||||||
|
this.query.startDate = this.getStartTime()
|
||||||
|
this.ifDetail = val.ifDetail || '0'
|
||||||
|
// this.query.endDate = this.getEndTime()
|
||||||
|
this.getMenuLists()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getStartTime() {
|
||||||
|
let date = new Date()
|
||||||
|
date.setDate(1) // 将当前时间的日期设置成第一天
|
||||||
|
let year = date.getFullYear() // 得到当前年份
|
||||||
|
let month = date.getMonth() + 1 // 得到当前月份(0-11月份,+1是当前月份)
|
||||||
|
month = month > 9 ? month : '0' + month // 补零
|
||||||
|
// return year + '-' + month + '-' + day
|
||||||
|
return year + '-' + month
|
||||||
|
},
|
||||||
|
// getEndTime() {
|
||||||
|
// var date = new Date();
|
||||||
|
// var year = date.getFullYear() // 年
|
||||||
|
// var month = date.getMonth() + 1; // 月
|
||||||
|
// var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate(); // 日
|
||||||
|
// var hour = date.getHours(); // 时
|
||||||
|
// var minutes = date.getMinutes(); // 分
|
||||||
|
// var seconds = date.getSeconds() //秒
|
||||||
|
// // 给一位数的数据前面加 “0”
|
||||||
|
// if (month >= 1 && month <= 9) {
|
||||||
|
// month = "0" + month;
|
||||||
|
// }
|
||||||
|
// if (day >= 0 && day <= 9) {
|
||||||
|
// day = "0" + day;
|
||||||
|
// }
|
||||||
|
// if (hour >= 0 && hour <= 9) {
|
||||||
|
// hour = "0" + hour;
|
||||||
|
// }
|
||||||
|
// if (minutes >= 0 && minutes <= 9) {
|
||||||
|
// minutes = "0" + minutes;
|
||||||
|
// }
|
||||||
|
// if (seconds >= 0 && seconds <= 9) {
|
||||||
|
// seconds = "0" + seconds;
|
||||||
|
// }
|
||||||
|
// // return year + "-" + month + "-" + day + " "
|
||||||
|
// return year + "-" + month
|
||||||
|
// },
|
||||||
|
bindDateChange(e) {
|
||||||
|
this.query.startDate = e.detail.value
|
||||||
|
this.$refs.recommends.upDateCover2(this.query)
|
||||||
|
this.$refs.recommends1.upDateCover2(this.query)
|
||||||
|
},
|
||||||
|
|
||||||
// {
|
async onReachBottom() {
|
||||||
// name: '推荐平均用时',
|
if (this.navIndex == 6) {
|
||||||
// menuKey: "",
|
this.page.pageNum + 1
|
||||||
// value: "recommendTime"
|
this.$refs.sgsyData.getDataList((this.page.pageNum += 1))
|
||||||
// },
|
}
|
||||||
|
},
|
||||||
],
|
bindPickerChange(e) {
|
||||||
navIndex: 0,
|
this.index = e.detail.value
|
||||||
page: {
|
},
|
||||||
pageSize: 50,
|
clickHref(index) {
|
||||||
pageNum: 1,
|
// let that= this;
|
||||||
},
|
this.navIndex = index
|
||||||
ifDetail: "0"
|
this.ifDetail = '0'
|
||||||
}
|
},
|
||||||
},
|
getMenuLists() {
|
||||||
onLoad(val) {
|
api.menuList().then(res => {
|
||||||
|
res.data.forEach(item => {
|
||||||
this.query.startDate = this.getStartTime()
|
this.navList.forEach(items => {
|
||||||
this.ifDetail = val.ifDetail || "0"
|
if (item.menuKey == items.value) {
|
||||||
// this.query.endDate = this.getEndTime()
|
items.menuKey = item.menuKey
|
||||||
this.getMenuLists()
|
}
|
||||||
},
|
})
|
||||||
methods: {
|
if (this.marketList[0].name == item.menuKey) {
|
||||||
getStartTime() {
|
this.marketList[0].isShow = true
|
||||||
let date = new Date()
|
}
|
||||||
date.setDate(1) // 将当前时间的日期设置成第一天
|
})
|
||||||
let year = date.getFullYear() // 得到当前年份
|
})
|
||||||
let month = date.getMonth() + 1 // 得到当前月份(0-11月份,+1是当前月份)
|
},
|
||||||
month = month > 9 ? month : '0' + month // 补零
|
},
|
||||||
// return year + '-' + month + '-' + day
|
}
|
||||||
return year + "-" + month
|
|
||||||
},
|
|
||||||
// getEndTime() {
|
|
||||||
// var date = new Date();
|
|
||||||
// var year = date.getFullYear() // 年
|
|
||||||
// var month = date.getMonth() + 1; // 月
|
|
||||||
// var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate(); // 日
|
|
||||||
// var hour = date.getHours(); // 时
|
|
||||||
// var minutes = date.getMinutes(); // 分
|
|
||||||
// var seconds = date.getSeconds() //秒
|
|
||||||
// // 给一位数的数据前面加 “0”
|
|
||||||
// if (month >= 1 && month <= 9) {
|
|
||||||
// month = "0" + month;
|
|
||||||
// }
|
|
||||||
// if (day >= 0 && day <= 9) {
|
|
||||||
// day = "0" + day;
|
|
||||||
// }
|
|
||||||
// if (hour >= 0 && hour <= 9) {
|
|
||||||
// hour = "0" + hour;
|
|
||||||
// }
|
|
||||||
// if (minutes >= 0 && minutes <= 9) {
|
|
||||||
// minutes = "0" + minutes;
|
|
||||||
// }
|
|
||||||
// if (seconds >= 0 && seconds <= 9) {
|
|
||||||
// seconds = "0" + seconds;
|
|
||||||
// }
|
|
||||||
// // return year + "-" + month + "-" + day + " "
|
|
||||||
// return year + "-" + month
|
|
||||||
// },
|
|
||||||
bindDateChange(e) {
|
|
||||||
this.query.startDate = e.detail.value
|
|
||||||
this.$refs.recommends.upDateCover2(this.query)
|
|
||||||
this.$refs.recommends1.upDateCover2(this.query)
|
|
||||||
},
|
|
||||||
|
|
||||||
async onReachBottom() {
|
|
||||||
if (this.navIndex == 6) {
|
|
||||||
this.page.pageNum + 1
|
|
||||||
this.$refs.sgsyData.getDataList(this.page.pageNum += 1);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
bindPickerChange(e) {
|
|
||||||
this.index = e.detail.value
|
|
||||||
},
|
|
||||||
clickHref(index) {
|
|
||||||
// let that= this;
|
|
||||||
this.navIndex = index
|
|
||||||
this.ifDetail = "0"
|
|
||||||
},
|
|
||||||
getMenuLists() {
|
|
||||||
api.menuList().then((res) => {
|
|
||||||
res.data.forEach((item) => {
|
|
||||||
this.navList.forEach((items) => {
|
|
||||||
if (item.menuKey == items.value) {
|
|
||||||
items.menuKey = item.menuKey
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (this.marketList[0].name == item.menuKey) {
|
|
||||||
this.marketList[0].isShow = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.uni-inputs {
|
.uni-inputs {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text_s {
|
.text_s {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.height-auto-s {
|
.height-auto-s {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
padding: 25rpx 60rpx 0 60rpx;
|
padding: 25rpx 60rpx 0 60rpx;
|
||||||
// line-height: 75rpx;
|
// line-height: 75rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-ss {
|
.flex-ss {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time1 {
|
.time1 {
|
||||||
width: 158rpx;
|
width: 158rpx;
|
||||||
// height: 75rpx;
|
// height: 75rpx;
|
||||||
// border-bottom: 1rpx solid #eee;
|
// border-bottom: 1rpx solid #eee;
|
||||||
margin: 0 20rpx 30rpx 20rpx;
|
margin: 0 20rpx 30rpx 20rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
/* margin-bottom: 30rpx; */
|
/* margin-bottom: 30rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.texts {
|
||||||
|
color: #333;
|
||||||
|
font-size: 26rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* width:200rpx; */
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-text {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.texts {
|
.selIcon {
|
||||||
color: #333;
|
width: 30rpx;
|
||||||
font-size: 26rpx;
|
height: 30rpx;
|
||||||
overflow: hidden;
|
margin: 5rpx 0 0 20rpx;
|
||||||
white-space: nowrap;
|
}
|
||||||
text-overflow: ellipsis;
|
|
||||||
/* width:200rpx; */
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-text {
|
page {
|
||||||
display: flex;
|
background-color: #f2f2f2;
|
||||||
margin-right: 20rpx;
|
}
|
||||||
font-size: 26rpx;
|
|
||||||
color: #333;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selIcon {
|
.styles {
|
||||||
width: 30rpx;
|
border: none !important;
|
||||||
height: 30rpx;
|
color: #fff !important;
|
||||||
margin: 5rpx 0 0 20rpx;
|
background: #d61820;
|
||||||
}
|
}
|
||||||
|
|
||||||
page {
|
.top-lists {
|
||||||
background-color: #f2f2f2;
|
display: flex;
|
||||||
}
|
flex-wrap: nowrap;
|
||||||
|
overflow-x: auto;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx 0;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
.styles {
|
.nav-view {
|
||||||
border: none !important;
|
min-width: 110rpx;
|
||||||
color: #fff !important;
|
padding: 5rpx 26rpx;
|
||||||
background: #d61820;
|
border-radius: 10rpx;
|
||||||
}
|
border: 2rpx solid #999999;
|
||||||
|
font-size: 28rpx;
|
||||||
.top-lists {
|
text-align: center;
|
||||||
display: flex;
|
margin: 0 10rpx;
|
||||||
flex-wrap: nowrap;
|
color: #999;
|
||||||
overflow-x: auto;
|
}
|
||||||
background-color: #fff;
|
}
|
||||||
padding: 20rpx 0;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
|
|
||||||
.nav-view {
|
|
||||||
min-width: 110rpx;
|
|
||||||
padding: 5rpx 26rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
border: 2rpx solid #999999;
|
|
||||||
font-size: 28rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 10rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,39 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="t_hei">{{ goodDetail.waresName }}</view>
|
<view class="t_hei">{{ goodDetail.waresName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 库存进度条 - 预售状态 -->
|
||||||
|
<view
|
||||||
|
class="inventory-progress-container"
|
||||||
|
v-if="goodDetail.useRatio && goodDetail.inventory !== undefined"
|
||||||
|
>
|
||||||
|
<view class="inventory-header">
|
||||||
|
<view class="inventory-label">
|
||||||
|
<text class="inventory-status">库存剩余</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="inventory-percentage"
|
||||||
|
:class="getPercentageClass(goodDetail.inventory)"
|
||||||
|
>
|
||||||
|
{{ getInventoryPercentage(goodDetail.inventory) }}%
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="inventory-progress-bar">
|
||||||
|
<view
|
||||||
|
class="inventory-progress-fill"
|
||||||
|
:style="{
|
||||||
|
width: getInventoryPercentage(goodDetail.inventory) + '%',
|
||||||
|
}"
|
||||||
|
:class="getProgressClass(goodDetail.inventory)"
|
||||||
|
>
|
||||||
|
<!-- 添加流动光效 -->
|
||||||
|
<view
|
||||||
|
class="progress-shine"
|
||||||
|
v-if="getInventoryPercentage(goodDetail.inventory) <= 30"
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -75,7 +108,9 @@
|
||||||
>BV:{{ goodDetail.goodsAssAchive | numberToCurrency }}</view
|
>BV:{{ goodDetail.goodsAssAchive | numberToCurrency }}</view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="t_hui1">销量:{{ goodDetail.sales | seles }}</view>
|
<view v-if="!goodDetail.useRatio" class="t_hui1"
|
||||||
|
>销量:{{ goodDetail.sales | seles }}</view
|
||||||
|
>
|
||||||
<!-- <view class="disFlex" v-show="specialArea == 31">
|
<!-- <view class="disFlex" v-show="specialArea == 31">
|
||||||
<view class="t_hui1">统一零售价:{{ goodDetail.retailPrice | numberToCurrency | isLocal }}</view>
|
<view class="t_hui1">统一零售价:{{ goodDetail.retailPrice | numberToCurrency | isLocal }}</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
@ -85,6 +120,39 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="t_hei">{{ goodDetail.waresName }}</view>
|
<view class="t_hei">{{ goodDetail.waresName }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 库存进度条 -->
|
||||||
|
<view
|
||||||
|
class="inventory-progress-container"
|
||||||
|
v-if="goodDetail.useRatio && goodDetail.inventory !== undefined"
|
||||||
|
>
|
||||||
|
<view class="inventory-header">
|
||||||
|
<view class="inventory-label">
|
||||||
|
<text class="inventory-status">库存剩余</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="inventory-percentage"
|
||||||
|
:class="getPercentageClass(goodDetail.inventory)"
|
||||||
|
>
|
||||||
|
{{ getInventoryPercentage(goodDetail.inventory) }}%
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="inventory-progress-bar">
|
||||||
|
<view
|
||||||
|
class="inventory-progress-fill"
|
||||||
|
:style="{
|
||||||
|
width: getInventoryPercentage(goodDetail.inventory) + '%',
|
||||||
|
}"
|
||||||
|
:class="getProgressClass(goodDetail.inventory)"
|
||||||
|
>
|
||||||
|
<!-- 添加流动光效 -->
|
||||||
|
<view
|
||||||
|
class="progress-shine"
|
||||||
|
v-if="getInventoryPercentage(goodDetail.inventory) <= 30"
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kuang t_hei">
|
<view class="kuang t_hei">
|
||||||
{{ '急速下单即享优先发货' }}
|
{{ '急速下单即享优先发货' }}
|
||||||
|
|
@ -573,6 +641,45 @@ export default {
|
||||||
// 作为返回值返回
|
// 作为返回值返回
|
||||||
return d + '天' + h + ':' + m + ':' + s
|
return d + '天' + h + ':' + m + ':' + s
|
||||||
},
|
},
|
||||||
|
// 处理库存百分比,移除百分号并转换为数字
|
||||||
|
getInventoryPercentage(inventory) {
|
||||||
|
if (typeof inventory === 'string') {
|
||||||
|
// 移除百分号并转换为数字
|
||||||
|
const numStr = inventory.replace('%', '').trim()
|
||||||
|
const num = parseFloat(numStr)
|
||||||
|
return isNaN(num) ? 0 : Math.min(100, Math.max(0, num))
|
||||||
|
} else if (typeof inventory === 'number') {
|
||||||
|
// 如果是数字,确保在0-100范围内
|
||||||
|
return Math.min(100, Math.max(0, inventory))
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
// 根据库存百分比返回对应的进度条样式类
|
||||||
|
getProgressClass(inventory) {
|
||||||
|
const percentage = this.getInventoryPercentage(inventory)
|
||||||
|
if (percentage >= 80) {
|
||||||
|
return 'progress-high'
|
||||||
|
} else if (percentage >= 60) {
|
||||||
|
return 'progress-medium-high'
|
||||||
|
} else if (percentage >= 40) {
|
||||||
|
return 'progress-medium'
|
||||||
|
} else if (percentage >= 20) {
|
||||||
|
return 'progress-low'
|
||||||
|
} else {
|
||||||
|
return 'progress-critical'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 根据库存百分比返回百分比数字的样式类
|
||||||
|
getPercentageClass(inventory) {
|
||||||
|
const percentage = this.getInventoryPercentage(inventory)
|
||||||
|
if (percentage <= 20) {
|
||||||
|
return 'percentage-critical'
|
||||||
|
} else if (percentage <= 30) {
|
||||||
|
return 'percentage-urgent'
|
||||||
|
} else {
|
||||||
|
return 'percentage-normal'
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -970,4 +1077,194 @@ export default {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 库存进度条样式 */
|
||||||
|
.inventory-progress-container {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
.inventory-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
|
||||||
|
.inventory-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
|
||||||
|
.inventory-status {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory-percentage {
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family:
|
||||||
|
DIN Alternate,
|
||||||
|
Arial,
|
||||||
|
sans-serif;
|
||||||
|
|
||||||
|
&.percentage-critical {
|
||||||
|
color: #ff3742;
|
||||||
|
animation: percentageBlink 1s ease-in-out infinite;
|
||||||
|
text-shadow: 0 0 10rpx rgba(255, 55, 66, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.percentage-urgent {
|
||||||
|
color: #ff5252;
|
||||||
|
animation: percentageGlow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.percentage-normal {
|
||||||
|
color: #005bac;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory-progress-bar {
|
||||||
|
width: 100%;
|
||||||
|
height: 16rpx;
|
||||||
|
background: rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 8rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: inset 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
.inventory-progress-fill {
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
/* 进度条渐变色彩 */
|
||||||
|
&.progress-critical {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#ff1744 0%,
|
||||||
|
#d50000 50%,
|
||||||
|
#ff1744 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 20rpx rgba(255, 23, 68, 0.4);
|
||||||
|
animation: criticalPulse 1.5s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-low {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#ff5722 0%,
|
||||||
|
#e64a19 50%,
|
||||||
|
#ff5722 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 15rpx rgba(255, 87, 34, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-medium {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#ff9800 0%,
|
||||||
|
#f57c00 50%,
|
||||||
|
#ff9800 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 10rpx rgba(255, 152, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-medium-high {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#2196f3 0%,
|
||||||
|
#1976d2 50%,
|
||||||
|
#2196f3 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 8rpx rgba(33, 150, 243, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-high {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#4caf50 0%,
|
||||||
|
#388e3c 25%,
|
||||||
|
#005bac 75%,
|
||||||
|
#003d82 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 8rpx rgba(0, 91, 172, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 流动光效 */
|
||||||
|
.progress-shine {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.8) 50%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
animation: shineFlow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 高光效果 */
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 60%;
|
||||||
|
background: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
rgba(255, 255, 255, 0.4) 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
border-radius: 8rpx 8rpx 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 动画定义 */
|
||||||
|
@keyframes percentageBlink {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes percentageGlow {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
text-shadow: 0 0 5rpx rgba(255, 82, 82, 0.3);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
text-shadow: 0 0 15rpx rgba(255, 82, 82, 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes criticalPulse {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0 0 20rpx rgba(255, 23, 68, 0.4);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
box-shadow: 0 0 30rpx rgba(255, 23, 68, 0.7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes shineFlow {
|
||||||
|
0% {
|
||||||
|
left: -100%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,13 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '秒杀专区',
|
||||||
|
value: 14,
|
||||||
|
name: 'live',
|
||||||
|
isShow: true,
|
||||||
|
children: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '复购专区',
|
label: '复购专区',
|
||||||
value: 3,
|
value: 3,
|
||||||
|
|
@ -123,7 +129,7 @@ export default {
|
||||||
isShow: true,
|
isShow: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '直播专区',
|
label: '秒杀专区',
|
||||||
value: 14,
|
value: 14,
|
||||||
name: 'live',
|
name: 'live',
|
||||||
isShow: true,
|
isShow: true,
|
||||||
|
|
|
||||||
|
|
@ -78,95 +78,133 @@
|
||||||
class="goodList_i"
|
class="goodList_i"
|
||||||
@tap="goDetails(item)"
|
@tap="goDetails(item)"
|
||||||
>
|
>
|
||||||
<view
|
<view style="display: flex; flex: 1">
|
||||||
class="fly"
|
|
||||||
v-show="item.preSaleStatus == 3 || item.isSale == 1"
|
|
||||||
></view>
|
|
||||||
<view class="image-container">
|
|
||||||
<img :src="item.cover || item.cover1" class="cover" alt="" />
|
|
||||||
<!-- 三角形角标 -->
|
|
||||||
<view class="triangle-badge" v-if="item.warnMessage">
|
|
||||||
<view
|
|
||||||
class="triangle-badge-text"
|
|
||||||
:class="{
|
|
||||||
'text-2': item.warnMessage.length === 2,
|
|
||||||
'text-3': item.warnMessage.length === 3,
|
|
||||||
'text-4': item.warnMessage.length === 4,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
{{ item.warnMessage }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="goodList_ir">
|
|
||||||
<view>
|
|
||||||
<span class="qzbq" v-if="item.prefixLabelTarget != undefined">{{
|
|
||||||
item.prefixLabelTarget.label
|
|
||||||
}}</span>
|
|
||||||
{{ item.waresName }}
|
|
||||||
</view>
|
|
||||||
<view
|
<view
|
||||||
class="pv"
|
class="fly"
|
||||||
v-if="
|
v-show="item.preSaleStatus == 3 || item.isSale == 1"
|
||||||
specialArea != 18 &&
|
></view>
|
||||||
specialArea != 13 &&
|
<view class="image-container">
|
||||||
specialArea != 31 &&
|
<img :src="item.cover || item.cover1" class="cover" alt="" />
|
||||||
specialArea != 10
|
<!-- 三角形角标 -->
|
||||||
"
|
<view class="triangle-badge" v-if="item.warnMessage">
|
||||||
>
|
<view
|
||||||
业绩:{{ item.waresAchieve | numberToCurrency }}
|
class="triangle-badge-text"
|
||||||
</view>
|
:class="{
|
||||||
<view class="pv" v-if="specialArea == 10">
|
'text-2': item.warnMessage.length === 2,
|
||||||
积分可抵扣:{{ item.deductMoney | numberToCurrency }}
|
'text-3': item.warnMessage.length === 3,
|
||||||
</view>
|
'text-4': item.warnMessage.length === 4,
|
||||||
<view
|
}"
|
||||||
class="pv"
|
>
|
||||||
v-if="specialArea == 31 && userInfo.isMakerSpace == 0"
|
{{ item.warnMessage }}
|
||||||
>
|
</view>
|
||||||
业绩:{{ item.waresAchieve | numberToCurrency }}
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pv" v-if="specialArea == 13">
|
|
||||||
BV:{{ item.assAchieve | numberToCurrency }}
|
<view class="goodList_ir">
|
||||||
</view>
|
<view>
|
||||||
<!-- <view class="pv"> 销量:{{ item.sales | seles }} </view> -->
|
<view>
|
||||||
<view class="goodList_ib">
|
<span
|
||||||
<view v-if="specialArea == 31 && userInfo.isMakerSpace == 1">
|
class="qzbq"
|
||||||
{{ item.vipPrice | numberToCurrency }}
|
v-if="item.prefixLabelTarget != undefined"
|
||||||
|
>{{ item.prefixLabelTarget.label }}</span
|
||||||
|
>
|
||||||
|
<span style="font-weight: 500">{{ item.waresName }}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view
|
||||||
|
class="inventory-progress-container"
|
||||||
|
v-if="item.useRatio && item.inventory !== undefined"
|
||||||
|
>
|
||||||
|
<view class="inventory-progress-bar">
|
||||||
|
<view
|
||||||
|
class="inventory-progress-fill"
|
||||||
|
:style="{
|
||||||
|
width: getInventoryPercentage(item.inventory) + '%',
|
||||||
|
}"
|
||||||
|
:class="getProgressClass(item.inventory)"
|
||||||
|
>
|
||||||
|
<!-- 添加流动光效 -->
|
||||||
|
<view
|
||||||
|
class="progress-shine"
|
||||||
|
v-if="getInventoryPercentage(item.inventory) <= 30"
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="inventory-percentage"
|
||||||
|
:class="getPercentageClass(item.inventory)"
|
||||||
|
>
|
||||||
|
剩余{{ getInventoryPercentage(item.inventory) }}%
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="goodList_ib">
|
||||||
|
<view>
|
||||||
|
<view
|
||||||
|
class="pv"
|
||||||
|
v-if="
|
||||||
|
specialArea != 18 &&
|
||||||
|
specialArea != 13 &&
|
||||||
|
specialArea != 31 &&
|
||||||
|
specialArea != 10
|
||||||
|
"
|
||||||
|
>
|
||||||
|
业绩:{{ item.waresAchieve | numberToCurrency }}
|
||||||
|
</view>
|
||||||
|
<view class="pv" v-if="specialArea == 10">
|
||||||
|
积分可抵扣:{{ item.deductMoney | numberToCurrency }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="pv"
|
||||||
|
v-if="specialArea == 31 && userInfo.isMakerSpace == 0"
|
||||||
|
>
|
||||||
|
业绩:{{ item.waresAchieve | numberToCurrency }}
|
||||||
|
</view>
|
||||||
|
<view class="pv" v-if="specialArea == 13">
|
||||||
|
BV:{{ item.assAchieve | numberToCurrency }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="specialArea == 31 && userInfo.isMakerSpace == 1"
|
||||||
|
>
|
||||||
|
{{ item.vipPrice | numberToCurrency }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="
|
||||||
|
(specialArea == 31 && userInfo.isMakerSpace == 0) ||
|
||||||
|
specialArea != 31
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ item.waresPrice | numberToCurrency }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<img
|
||||||
|
@click.stop="addCar(item)"
|
||||||
|
v-show="
|
||||||
|
item.preSaleStatus != 3 &&
|
||||||
|
item.isSale != 1 &&
|
||||||
|
specialArea != 31
|
||||||
|
"
|
||||||
|
src="@/static/images/cart.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
@click.stop="addCar(item)"
|
||||||
|
v-show="
|
||||||
|
item.preSaleStatus != 3 &&
|
||||||
|
item.isSale != 1 &&
|
||||||
|
specialArea == 31 &&
|
||||||
|
userInfo.isMakerSpace == 0
|
||||||
|
"
|
||||||
|
src="@/static/images/cart.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
|
||||||
v-if="
|
|
||||||
(specialArea == 31 && userInfo.isMakerSpace == 0) ||
|
|
||||||
specialArea != 31
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ item.waresPrice | numberToCurrency }}
|
|
||||||
</view>
|
|
||||||
<img
|
|
||||||
@click.stop="addCar(item)"
|
|
||||||
v-show="
|
|
||||||
item.preSaleStatus != 3 &&
|
|
||||||
item.isSale != 1 &&
|
|
||||||
specialArea != 31
|
|
||||||
"
|
|
||||||
src="@/static/images/cart.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
<img
|
|
||||||
@click.stop="addCar(item)"
|
|
||||||
v-show="
|
|
||||||
item.preSaleStatus != 3 &&
|
|
||||||
item.isSale != 1 &&
|
|
||||||
specialArea == 31 &&
|
|
||||||
userInfo.isMakerSpace == 0
|
|
||||||
"
|
|
||||||
src="@/static/images/cart.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="pv" v-show="specialArea == 31"> 统一零售价:{{ item.retailPrice| numberToCurrency | isLocal}} </view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="zhan"></view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -490,6 +528,45 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 处理库存百分比,移除百分号并转换为数字
|
||||||
|
getInventoryPercentage(inventory) {
|
||||||
|
if (typeof inventory === 'string') {
|
||||||
|
// 移除百分号并转换为数字
|
||||||
|
const numStr = inventory.replace('%', '').trim()
|
||||||
|
const num = parseFloat(numStr)
|
||||||
|
return isNaN(num) ? 0 : Math.min(100, Math.max(0, num))
|
||||||
|
} else if (typeof inventory === 'number') {
|
||||||
|
// 如果是数字,确保在0-100范围内
|
||||||
|
return Math.min(100, Math.max(0, inventory))
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
// 根据库存百分比返回对应的进度条样式类
|
||||||
|
getProgressClass(inventory) {
|
||||||
|
const percentage = this.getInventoryPercentage(inventory)
|
||||||
|
if (percentage >= 80) {
|
||||||
|
return 'progress-high'
|
||||||
|
} else if (percentage >= 60) {
|
||||||
|
return 'progress-medium-high'
|
||||||
|
} else if (percentage >= 40) {
|
||||||
|
return 'progress-medium'
|
||||||
|
} else if (percentage >= 20) {
|
||||||
|
return 'progress-low'
|
||||||
|
} else {
|
||||||
|
return 'progress-critical'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 根据库存百分比返回百分比数字的样式类
|
||||||
|
getPercentageClass(inventory) {
|
||||||
|
const percentage = this.getInventoryPercentage(inventory)
|
||||||
|
if (percentage <= 20) {
|
||||||
|
return 'percentage-critical'
|
||||||
|
} else if (percentage <= 30) {
|
||||||
|
return 'percentage-urgent'
|
||||||
|
} else {
|
||||||
|
return 'percentage-normal'
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -516,6 +593,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabList_a {
|
.tabList_a {
|
||||||
|
/* 二级分类标签容器样式 */
|
||||||
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.index_btm {
|
.index_btm {
|
||||||
|
|
@ -655,22 +734,21 @@ export default {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
.goodList_i {
|
.goodList_i {
|
||||||
display: flex;
|
// display: flex;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
padding: 30rpx 0;
|
padding: 20rpx 0 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.goodList_ir {
|
.goodList_ir {
|
||||||
margin-left: 24rpx;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
font-family: Microsoft YaHei;
|
font-family: Microsoft YaHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
margin-left: 24rpx;
|
||||||
.goodList_ib {
|
.goodList_ib {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -802,4 +880,215 @@ export default {
|
||||||
left: -4rpx;
|
left: -4rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 库存进度条样式 - 升级版 */
|
||||||
|
.inventory-progress-container {
|
||||||
|
// margin-bottom: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
.inventory-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
// margin-bottom: 12rpx;
|
||||||
|
|
||||||
|
.inventory-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
|
||||||
|
.fire-icon,
|
||||||
|
.warning-icon {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
animation: iconBounce 1.5s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory-status {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.inventory-percentage {
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family:
|
||||||
|
DIN Alternate,
|
||||||
|
Arial,
|
||||||
|
sans-serif;
|
||||||
|
|
||||||
|
&.percentage-critical {
|
||||||
|
color: #ff3742;
|
||||||
|
animation: percentageBlink 1s ease-in-out infinite;
|
||||||
|
text-shadow: 0 0 10rpx rgba(255, 55, 66, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.percentage-urgent {
|
||||||
|
color: #ff5252;
|
||||||
|
animation: percentageGlow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.percentage-normal {
|
||||||
|
color: #005bac;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory-progress-bar {
|
||||||
|
width: 0;
|
||||||
|
flex: 1;
|
||||||
|
height: 18rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
background: rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: inset 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
.inventory-progress-fill {
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
/* 进度条渐变色彩 */
|
||||||
|
&.progress-critical {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#ff1744 0%,
|
||||||
|
#d50000 50%,
|
||||||
|
#ff1744 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 20rpx rgba(255, 23, 68, 0.4);
|
||||||
|
animation: criticalPulse 1.5s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-low {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#ff5722 0%,
|
||||||
|
#e64a19 50%,
|
||||||
|
#ff5722 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 15rpx rgba(255, 87, 34, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-medium {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#ff9800 0%,
|
||||||
|
#f57c00 50%,
|
||||||
|
#ff9800 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 10rpx rgba(255, 152, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-medium-high {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#2196f3 0%,
|
||||||
|
#1976d2 50%,
|
||||||
|
#2196f3 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 8rpx rgba(33, 150, 243, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.progress-high {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#4caf50 0%,
|
||||||
|
#388e3c 25%,
|
||||||
|
#005bac 75%,
|
||||||
|
#003d82 100%
|
||||||
|
);
|
||||||
|
box-shadow: 0 0 8rpx rgba(0, 91, 172, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 流动光效 */
|
||||||
|
.progress-shine {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
transparent 0%,
|
||||||
|
rgba(255, 255, 255, 0.8) 50%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
animation: shineFlow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 高光效果 */
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 60%;
|
||||||
|
background: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
rgba(255, 255, 255, 0.4) 0%,
|
||||||
|
rgba(255, 255, 255, 0.1) 50%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
border-radius: 8rpx 8rpx 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 动画定义 */
|
||||||
|
@keyframes iconBounce {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes percentageBlink {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes percentageGlow {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
text-shadow: 0 0 5rpx rgba(255, 82, 82, 0.3);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
text-shadow: 0 0 15rpx rgba(255, 82, 82, 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes criticalPulse {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0 0 20rpx rgba(255, 23, 68, 0.4);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
box-shadow: 0 0 30rpx rgba(255, 23, 68, 0.7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes shineFlow {
|
||||||
|
0% {
|
||||||
|
left: -100%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue