@ -0,0 +1,343 @@ |
||||
<template> |
||||
<view class="wrap"> |
||||
<view class="banner-wrap bg-wh"> |
||||
<view class="pic-wrap"> |
||||
<image class="pic" :src="form.mall.coverDrawing" mode="widthFix"></image> |
||||
<view class="pro-title">{{ form.mall.productName }}</view> |
||||
</view> |
||||
<view class="fields"> |
||||
<view class="field"> |
||||
<image class="icon" src="@/static/image/product/1.png"></image> |
||||
市场建议价:{{ form.mall.marketUnitPrice }}元/年 |
||||
</view> |
||||
<view class="field"> |
||||
<image class="icon" src="@/static/image/product/2.png"></image> |
||||
产品类型:{{ form.goodsRes.typeName }} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="detail"> |
||||
<ul class="tabs"> |
||||
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li> |
||||
</ul> |
||||
<view class="title"> |
||||
<image class="icon" src="@/static/image/product/3.png"></image> |
||||
产品详情 |
||||
</view> |
||||
<view class="texts"> |
||||
<view class="line"> |
||||
<text class="name">产品简介:</text> |
||||
<view class="val" v-html="form.mall.productIntroduction"></view> |
||||
</view> |
||||
<view class="line"> |
||||
<text class="name">适用专业:</text> |
||||
<text class="val">{{ form.goodsRes.professionalName }}</text> |
||||
</view> |
||||
<view v-if="form.mall.courseHours" class="line"> |
||||
<text class="name">预计课时:</text> |
||||
<text class="val">{{ form.mall.courseHours }}</text> |
||||
</view> |
||||
<view v-if="form.mall.matchingCourse" class="line"> |
||||
<text class="name">匹配课程:</text> |
||||
<text class="val">{{ form.mall.matchingCourse }}</text> |
||||
</view> |
||||
<view v-if="form.mall.applicationScenario" class="line"> |
||||
<text class="name">适用场景:</text> |
||||
<text class="val">{{ form.mall.applicationScenario }}</text> |
||||
</view> |
||||
<view class="line"> |
||||
<text class="name">详情介绍:</text> |
||||
<view class="val" v-html="form.mall.detailedIntroduction"></view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-if="form.mall.interfaceDiagram" class="detail"> |
||||
<view class="title mb"> |
||||
<image class="icon" src="@/static/image/product/4.png"></image> |
||||
产品界面图 |
||||
</view> |
||||
<template> |
||||
<image v-for="(pic, i) in form.mall.interfaceDiagram" :key="i" class="pic" mode="widthFix" :src="pic"></image> |
||||
</template> |
||||
</view> |
||||
|
||||
<view v-if="form.mallAnnex && form.mallAnnex.length" class="detail"> |
||||
<view class="title-wrap"> |
||||
<view class="title"> |
||||
<image class="icon" src="@/static/image/product/5.png"></image> |
||||
产品参数 |
||||
</view> |
||||
<view class="download"> |
||||
下载全部 |
||||
<image class="icon" src="@/static/image/product/6.png"></image> |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-if="form.mallAnnex" class="files"> |
||||
<view v-for="(file, i) in form.mallAnnex" :key="i" class="file" @click="download(file)"> |
||||
<view class="text"> |
||||
<image class="icon" src="@/static/image/product/ppt.png"></image> |
||||
{{ file.fileName }} |
||||
</view> |
||||
<view class="download">下载</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="footer"> |
||||
<view class="shop"> |
||||
<image class="icon" src="@/static/image/product/shop.png" mode="widthFix"></image> |
||||
<view>购物车</view> |
||||
</view> |
||||
|
||||
<view class="btns"> |
||||
<view class="btn">加入购物车</view> |
||||
<view class="btn order">下单</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { detailsOfGoods } from '@/apis/modules/product.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
id: '', |
||||
curTab: 0, |
||||
tabs: [ |
||||
{ |
||||
name: '详情介绍', |
||||
id: 0 |
||||
}, |
||||
{ |
||||
name: '界面图', |
||||
id: 1 |
||||
}, |
||||
{ |
||||
name: '参数', |
||||
id: 2 |
||||
}, |
||||
], |
||||
form: { |
||||
classificationIds: [], |
||||
mall: { |
||||
coverDrawing: '' |
||||
}, |
||||
goodsRes: {}, |
||||
mallAnnex: [] |
||||
}, |
||||
} |
||||
}, |
||||
onShow() { |
||||
const pages = getCurrentPages() |
||||
const { options } = pages[pages.length - 1] |
||||
this.id = options.id |
||||
this.getInfo() |
||||
}, |
||||
methods: { |
||||
// 获取详情 |
||||
getInfo() { |
||||
uni.showLoading({ |
||||
title: '加载中' |
||||
}) |
||||
detailsOfGoods(this.id).then(res => { |
||||
this.form = res.orderDetails |
||||
uni.hideLoading() |
||||
}).catch(e => { |
||||
uni.hideLoading() |
||||
}) |
||||
}, |
||||
// tab切换 |
||||
tabChange(tab) { |
||||
this.curTab = tab.id |
||||
}, |
||||
// 下载附件 |
||||
download(item) { |
||||
this.$util.to(`../send/send?url=${item.filePath}©Writing=${item.fileName}`) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.wrap { |
||||
padding-bottom: 140rpx; |
||||
} |
||||
.banner-wrap { |
||||
width: 100%; |
||||
border-radius: 0px 0px 20px 20px; |
||||
.pic-wrap { |
||||
padding: 20rpx 32rpx; |
||||
border-bottom: 1px solid #E2E2E2; |
||||
} |
||||
.pic { |
||||
width: 100%; |
||||
} |
||||
.pro-title { |
||||
margin-top: 22rpx; |
||||
font-size: 30rpx; |
||||
color: #333; |
||||
} |
||||
.fields { |
||||
padding: 26rpx 32rpx; |
||||
} |
||||
.field { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
&:first-child { |
||||
margin-bottom: 22rpx; |
||||
} |
||||
.icon { |
||||
width: 36rpx; |
||||
height: 36rpx; |
||||
margin-right: 12rpx ; |
||||
} |
||||
} |
||||
} |
||||
.tabs { |
||||
display: flex; |
||||
justify-content: space-around; |
||||
margin-bottom: 32rpx; |
||||
li { |
||||
width: 33.33%; |
||||
text-align: center; |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
white-space: nowrap; |
||||
} |
||||
.active { |
||||
color: #007EFF; |
||||
&:after { |
||||
content: ''; |
||||
display: block; |
||||
width: 40rpx; |
||||
height: 8rpx; |
||||
margin: 18rpx auto 0; |
||||
border-radius: 4px; |
||||
background-color: #007EFF; |
||||
} |
||||
} |
||||
} |
||||
.detail { |
||||
padding: 34rpx 32rpx; |
||||
margin: 16rpx 0; |
||||
border-radius: 20px; |
||||
background-color: #fff; |
||||
.title-wrap { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
.download { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
padding: 7rpx 16rpx; |
||||
font-size: 24rpx; |
||||
color: #007EFF; |
||||
text-align: center; |
||||
background-color: #F2F8FF; |
||||
.icon { |
||||
width: 30rpx; |
||||
height: 30rpx; |
||||
margin-left: 4rpx; |
||||
} |
||||
} |
||||
} |
||||
.title { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 30rpx; |
||||
color: #333 ; |
||||
.icon { |
||||
width: 36rpx; |
||||
height: 36rpx; |
||||
margin-right: 11rpx; |
||||
} |
||||
&.mb { |
||||
margin-bottom: 32rpx; |
||||
} |
||||
} |
||||
.texts { |
||||
margin-top: 32rpx; |
||||
} |
||||
.line { |
||||
display: flex; |
||||
margin-bottom: 18rpx; |
||||
line-height: 40rpx; |
||||
text { |
||||
font-size: 26rpx; |
||||
color: #333; |
||||
} |
||||
.name { |
||||
font-weight: 600; |
||||
white-space: nowrap; |
||||
} |
||||
} |
||||
.pic { |
||||
width: 100%; |
||||
} |
||||
.files { |
||||
margin-top: 34rpx; |
||||
.file { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
margin-bottom: 24rpx; |
||||
.text { |
||||
display: inline-flex; |
||||
align-items: center; |
||||
font-size: 26rpx; |
||||
color: #333; |
||||
} |
||||
.icon { |
||||
width: 36rpx; |
||||
height: 36rpx; |
||||
margin-right: 14rpx; |
||||
} |
||||
.download { |
||||
font-size: 26rpx; |
||||
color: #007EFF; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.footer { |
||||
position: fixed; |
||||
bottom: 0; |
||||
left: 0; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
width: 100%; |
||||
padding: 24rpx 32rpx 24rpx 73rpx; |
||||
background-color: #fff; |
||||
box-sizing: border-box; |
||||
.shop { |
||||
.icon { |
||||
width: 56rpx; |
||||
} |
||||
font-size: 24rpx; |
||||
color: #333; |
||||
} |
||||
.btns { |
||||
display: inline-flex; |
||||
.btn { |
||||
width: 229rpx; |
||||
line-height: 80rpx; |
||||
text-align: center; |
||||
font-size: 32rpx; |
||||
color: #333; |
||||
background-color: #E5EEF7; |
||||
border-radius: 100px 0px 0px 100px; |
||||
} |
||||
.order { |
||||
color: #fff; |
||||
background-color: #007EFF; |
||||
border-radius: 0px 100px 100px 0px; |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,264 @@ |
||||
<template> |
||||
<view> |
||||
<view class="filter"> |
||||
<uni-search-bar class="search" radius="30" placeholder="请输入产品名称" v-model="keyword" clearButton="auto" cancelButton="none" /> |
||||
<view :class="['sort', sort]" @click="switchSort"></view> |
||||
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons> |
||||
</view> |
||||
<ul class="tab"> |
||||
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li> |
||||
</ul> |
||||
|
||||
<ul class="list"> |
||||
<li v-for="item in list"> |
||||
<view class="pro-name"> |
||||
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> |
||||
{{ item.productName }} |
||||
</view> |
||||
<view class="info"> |
||||
<view class="line"> |
||||
<text class="name">产品简介:</text> |
||||
<view class="val ell-wrap"> |
||||
<view :class="{ell: !item.toggle}" v-html="item.productIntroduction"></view> |
||||
<view v-if="item.productIntroduction.length > 14" class="toggle" @click="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view> |
||||
</view> |
||||
</view> |
||||
<view class="line"> |
||||
<text class="name">产品类型:</text> |
||||
<text class="val">{{ item.typeName }}</text> |
||||
</view> |
||||
<view class="line"> |
||||
<text class="name">适用专业:</text> |
||||
<text class="val">{{ item.professionalName }}</text> |
||||
</view> |
||||
<view class="line"> |
||||
<text class="name">市场建议单价:</text> |
||||
<text class="val">{{ item.marketUnitPrice }}元/年</text> |
||||
</view> |
||||
</view> |
||||
</li> |
||||
</ul> |
||||
|
||||
<uni-icons class="plus" type="plus-filled" size="60" color="#007eff" @click="$util.to('/order/orderDetail/orderDetail')"></uni-icons> |
||||
<filter-popup :data="filterData" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { tagsList, listOfGoods } from '@/apis/modules/product.js' |
||||
import { queryCustomer } from '@/apis/modules/client.js' |
||||
import { list, del } from '@/apis/modules/order.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
popup: false, |
||||
//筛选表单数据 |
||||
filterData: [ |
||||
{ |
||||
children: false,//是否有子项 |
||||
title: "订单状态", |
||||
key: "orderStatus", //键名 接收对象名字 |
||||
keyValue: "value", //获取的值是哪个 |
||||
isRadio: true, //是否单选 否则多选 |
||||
data: [ |
||||
{ |
||||
title: "待发货", |
||||
value: 0 |
||||
}, |
||||
{ |
||||
title: "已完成", |
||||
value: 1 |
||||
}, |
||||
], |
||||
} |
||||
], |
||||
filterForm: {}, |
||||
curTab: 0, |
||||
tabs: [ |
||||
{ |
||||
name: '综合排序', |
||||
id: 0 |
||||
}, |
||||
{ |
||||
name: '热搜排行', |
||||
id: 1 |
||||
}, |
||||
{ |
||||
name: '发布时间', |
||||
id: 1 |
||||
} |
||||
], |
||||
reachBottom: 0, // 是否是上拉加载。0->否,1->是,-1->加载完所有数据 |
||||
status: 'more', // 上拉加载状态 more|loading|noMore |
||||
searchTimer: null, |
||||
orderStatus: '', |
||||
sort: 'desc', |
||||
keyword: '', |
||||
list: [], |
||||
page: 1, |
||||
pageSize: 10, |
||||
delOption: [{ |
||||
text: '删除', |
||||
style: { |
||||
backgroundColor: '#F56C6C' |
||||
} |
||||
}], |
||||
} |
||||
}, |
||||
watch: { |
||||
keyword () { |
||||
clearTimeout(this.searchTimer) |
||||
this.searchTimer = setTimeout(() => { |
||||
this.initList() |
||||
}, 500) |
||||
} |
||||
}, |
||||
// 下拉刷新 |
||||
onPullDownRefresh() { |
||||
this.initList() |
||||
setTimeout(() => { |
||||
uni.stopPullDownRefresh() |
||||
}, 1500) |
||||
}, |
||||
// 上拉加载 |
||||
onReachBottom() { |
||||
if (this.reachBottom >= 0) { |
||||
this.reachBottom = 1 |
||||
this.status = 'loading' |
||||
this.getList() |
||||
} |
||||
}, |
||||
onShow() { |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
getList() { |
||||
listOfGoods({ |
||||
pageNum: this.page, |
||||
pageSize: this.pageSize, |
||||
sort: 0, |
||||
isShelves: 0, |
||||
hotTag: 1, |
||||
productName: this.keyword, |
||||
}).then(({ page }) => { |
||||
// 未加载完所有数据,并且不是筛选,则拼接list,否则直接赋值 |
||||
const list = page.records |
||||
list.map(e => { |
||||
e.toggle = e.productIntroduction.length < 14 // 超过了14个字才需要显示展开按钮 |
||||
}) |
||||
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list |
||||
this.page++ // 每次获取了数据后page+1 |
||||
const noMore = this.list.length === page.total // 是否加载完所有数据 |
||||
this.status = noMore ? 'noMore' : 'more' // 加载完了则设置为noMore |
||||
this.reachBottom = noMore ? -1 : 0 // 加载完了则设置为-1 |
||||
}).catch(e => {}) |
||||
}, |
||||
initList() { |
||||
this.page = 1 |
||||
this.reachBottom = 0 |
||||
this.getList() |
||||
}, |
||||
// 展开 |
||||
toggle(item) { |
||||
item.toggle = !item.toggle |
||||
}, |
||||
// 筛选确定回调 |
||||
subFinsh(val) { |
||||
const { orderStatus } = val |
||||
this.orderStatus = orderStatus.length ? orderStatus[0] : '' |
||||
this.initList() |
||||
}, |
||||
// 排序 |
||||
switchSort() { |
||||
this.sort = this.sort === 'desc' ? 'asc' : 'desc' |
||||
this.initList() |
||||
}, |
||||
// tab切换 |
||||
tabChange(tab) { |
||||
this.curTab = tab.id |
||||
this.initList() |
||||
}, |
||||
// 跳转详情 |
||||
toDetail(item) { |
||||
this.$util.to(`/order/orderDetail/orderDetail?orderId=${item.orderId}&show=1`) |
||||
}, |
||||
// 删除 |
||||
del(e) { |
||||
const that = this |
||||
uni.showModal({ |
||||
title: '提示', |
||||
content: '确定要删除吗?', |
||||
success(res) { |
||||
if (res.confirm) { |
||||
del({ |
||||
ids: [e.orderId] |
||||
}).then(res => { |
||||
that.$util.sucMsg('删除成功') |
||||
that.initList() |
||||
}).catch(res => {}) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.list { |
||||
margin-top: 20rpx; |
||||
background-color: #fff; |
||||
.item { |
||||
padding: 20rpx 40rpx; |
||||
border-bottom: 1px solid #f1f1f1; |
||||
} |
||||
.c-name { |
||||
font-size: 30rpx; |
||||
color: #333; |
||||
} |
||||
.info { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
margin-top: 10rpx; |
||||
} |
||||
.left { |
||||
max-width: 70%; |
||||
} |
||||
.line { |
||||
display: flex; |
||||
padding: 10rpx 0; |
||||
} |
||||
.name { |
||||
margin-right: 10rpx; |
||||
white-space: nowrap; |
||||
font-size: 28rpx; |
||||
color: #999; |
||||
} |
||||
.val { |
||||
max-width: 88%; |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
} |
||||
.ell { |
||||
white-space: nowrap; |
||||
text-overflow: ellipsis; |
||||
overflow: hidden; |
||||
} |
||||
.toggle { |
||||
margin-top: 10rpx; |
||||
white-space: nowrap; |
||||
font-size: 24rpx; |
||||
color: #0e92ef; |
||||
} |
||||
.type { |
||||
margin-left: 20rpx; |
||||
font-size: 28rpx; |
||||
color: #ff7b2d; |
||||
white-space: nowrap; |
||||
} |
||||
.type1 { |
||||
color: #bdbdbd; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,488 @@ |
||||
<template> |
||||
<view :class="['page', {oh: !per}]"> |
||||
<image class="bg" src="@/static/image/workbench/index2.png" mode="widthFix"></image> |
||||
<view class="team"> |
||||
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker> |
||||
</view> |
||||
|
||||
<view class="banner"> |
||||
<image class="img" src="@/static/image/workbench/index1.png" mode="widthFix"></image> |
||||
<view class="info"> |
||||
<view class="title">城市合伙人招募中</view> |
||||
<view class="text">携手共创教育信息化新未来,合伙共享产业互联领域新红利</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<ul class="entry"> |
||||
<li v-if="auth('首页:客户')" @click="$util.to('../clients/clients')"> |
||||
<image class="icon" src="@/static/image/workbench/index3.png" mode="widthFix"></image> |
||||
<view class="text">客户</view> |
||||
</li> |
||||
<li v-if="auth('首页:方案')" @click="$util.to('../plans/plans')"> |
||||
<image class="icon" src="@/static/image/workbench/index4.png" mode="widthFix"></image> |
||||
<view class="text">方案</view> |
||||
</li> |
||||
<li @click="$util.to('/team/study/study')"> |
||||
<image class="icon" src="@/static/image/tab2-1.png" mode="widthFix"></image> |
||||
<view class="text">学习</view> |
||||
</li> |
||||
<li @click="$util.to('/team/info/info')"> |
||||
<image class="icon" src="@/static/image/tab3-1.png" mode="widthFix"></image> |
||||
<view class="text">资讯</view> |
||||
</li> |
||||
</ul> |
||||
|
||||
<view class="panel study-panel"> |
||||
<view class="title" @click="toStudy"> |
||||
<view class="left"> |
||||
<image class="icon" src="@/static/image/workbench/index8.png" mode="widthFix"></image> |
||||
学习速递 |
||||
</view> |
||||
<view class="right"> |
||||
<text>全部</text> |
||||
<image class="arrow" src="@/static/image/workbench/index10.png" mode="widthFix"></image> |
||||
</view> |
||||
</view> |
||||
<view class="study"> |
||||
<scroll-view class="scroll" scroll-x="true"> |
||||
<view v-for="(item, i) in studies" :key="i" class="item" @click="toDetail(item)"> |
||||
<image class="pic" :src="item.bannerImg"></image> |
||||
<view class="text">{{ item.title }}</view> |
||||
</view> |
||||
</scroll-view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="panel"> |
||||
<view class="title" @click="toPanel(1)"> |
||||
<view class="left"> |
||||
<image class="icon" src="@/static/image/workbench/index8.png" mode="widthFix"></image> |
||||
销售进展 |
||||
</view> |
||||
<view class="right"> |
||||
<image class="date" src="@/static/image/workbench/index7.png" mode="widthFix"></image> |
||||
<text>本月</text> |
||||
<image class="arrow" src="@/static/image/workbench/index10.png" mode="widthFix"></image> |
||||
</view> |
||||
</view> |
||||
<view class="data first"> |
||||
<view class="line"> |
||||
<view class="item"> |
||||
<view class="name">本月新增试用客户</view> |
||||
<view class="val">{{ sell.trialUser || 0 }}</view> |
||||
</view> |
||||
<view class="item"> |
||||
<view class="name">本月成单客户</view> |
||||
<view class="val">{{ sell.regularUser || 0 }}</view> |
||||
</view> |
||||
</view> |
||||
<view class="line"> |
||||
<view class="item"> |
||||
<view class="name">本月新增产品试用</view> |
||||
<view class="val">{{ sell.trialProduct || 0 }}</view> |
||||
</view> |
||||
<view class="item"> |
||||
<view class="name">本月成交订单产品</view> |
||||
<view class="val">{{ sell.officialProduct || 0 }}</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
|
||||
<view class="panel"> |
||||
<view class="title y-title" @click="toPanel(1)"> |
||||
<view class="left"> |
||||
<image class="icon" src="@/static/image/workbench/index9.png" mode="widthFix"></image> |
||||
年度经营分析 |
||||
</view> |
||||
<image class="arrow" src="@/static/image/workbench/index10.png" mode="widthFix"></image> |
||||
</view> |
||||
<view class="data second"> |
||||
<view class="line"> |
||||
<view class="item item1"> |
||||
<view class="val">{{ handleNum(analysis.finalPrice) }}</view> |
||||
<view class="name">总成交金额</view> |
||||
</view> |
||||
<view class="item item2"> |
||||
<view class="val">{{ handleNum(analysis.settlementPrice) }}</view> |
||||
<view class="name">总结算金额</view> |
||||
</view> |
||||
<view class="item equal"> |
||||
<view class="val">{{ handleNum(analysis.marketingServiceCharge) }}</view> |
||||
<view class="name">市场服务费</view> |
||||
</view> |
||||
<view class="item"> |
||||
<view class="val">{{ handleNum(analysis.projectBenefit) }}</view> |
||||
<view class="name">项目收益</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view v-if="!per" class="per-mask">功能升级中,敬请期待...</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' |
||||
import { getTeamsByAccountId, getTheBusinessManagerIdsUnderTheTeam } from '@/apis/modules/client.js' |
||||
import { treeList, salesProgress, annualOperatingAnalysis } from '@/apis/modules/parner.js' |
||||
import { partnerOperatingList } from '@/apis/modules/article.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
per: true, // 是否有权限 |
||||
teamId: uni.getStorageSync('teamId') || '', |
||||
list: [], |
||||
id: '', |
||||
teamList: [], |
||||
studies: [], |
||||
sell: {}, |
||||
analysis: { |
||||
finalPrice: 0, |
||||
settlementPrice: 0, |
||||
marketingServiceCharge: 0, |
||||
projectBenefit: 0, |
||||
} |
||||
} |
||||
}, |
||||
onShow() { |
||||
this.per = true |
||||
this.getInfo() |
||||
}, |
||||
methods: { |
||||
// 初始化权限 |
||||
initRole() { |
||||
if (!uni.getStorageSync('auth').includes('首页')) { |
||||
this.per = false |
||||
} |
||||
this.getStudy() |
||||
this.getSell() |
||||
this.getAnalysis() |
||||
}, |
||||
// 查询当前角色权限 |
||||
getAuth() { |
||||
uni.getStorageSync('token') && getUserRolesPermissionMenu({ |
||||
teamId: this.list.find(e => e.teamId == this.teamId).partnerClassificationId, |
||||
platformId: 4 |
||||
}).then(({ permissionMenu }) => { |
||||
uni.hideLoading() |
||||
const auth = [] |
||||
// 生成权限数组 |
||||
const generateAuth = (list, parent) => { |
||||
list.map(e => { |
||||
const name = `${parent ? parent + ':' : ''}${e.name}` |
||||
auth.push(name) |
||||
generateAuth(e.children, name) |
||||
}) |
||||
} |
||||
generateAuth(permissionMenu[0].children, '') |
||||
uni.setStorageSync('auth', auth) |
||||
this.$forceUpdate() |
||||
this.initRole() |
||||
}).catch(e => { |
||||
uni.hideLoading() |
||||
uni.setStorageSync('auth', []) |
||||
this.initRole() |
||||
}) |
||||
}, |
||||
// 获取团队 |
||||
getInfo() { |
||||
uni.showLoading({ |
||||
title: '加载中' |
||||
}) |
||||
getTeamsByAccountId().then(({ data }) => { |
||||
data.map(e => { |
||||
const n = e.partnerClassificationList |
||||
e.id = n.id |
||||
// parnerId是商务经理id,teamId则是下面这个,其他地方要用的话直接uni.getStorageSync('team').partnerId去使用 |
||||
e.teamId = e.isTeam == 1 ? +e.partnerClassificationId : n.id |
||||
e.partnerClassificationName = n.partnerClassificationName |
||||
delete e.partnerClassificationList |
||||
}) |
||||
if (data.length) { |
||||
/** |
||||
* @description 如果是第一次进,则默认选中第一个团队,并把该团队的信息存入缓存 |
||||
* 或者团队列表里没有该id,则说明超管已经被转让,也需要重新选中团队 |
||||
*/ |
||||
if (!uni.getStorageSync('team') || !data.find(e => e.teamId == this.teamId)) { |
||||
this.teamId = data[0].teamId |
||||
uni.setStorageSync('team', data[0]) |
||||
} |
||||
} else { |
||||
// 如果没有团队,则退出登录 |
||||
uni.hideLoading() |
||||
uni.clearStorageSync() |
||||
uni.navigateTo({ |
||||
url: '../login/login' |
||||
}) |
||||
} |
||||
|
||||
this.list = data |
||||
this.getAuth() |
||||
}).catch(e => { |
||||
uni.hideLoading() |
||||
}) |
||||
}, |
||||
// 学习速递 |
||||
getStudy() { |
||||
partnerOperatingList({ |
||||
topSort: 'desc', |
||||
pageNum: 1, |
||||
pageSize: 5, |
||||
querySource: 4, |
||||
typeId: 1, |
||||
}).then(({ page }) => { |
||||
this.studies = page |
||||
}).catch(e => {}) |
||||
}, |
||||
// 跳转学习 |
||||
toStudy() { |
||||
uni.switchTab({ |
||||
url: '/team/study/study' |
||||
}) |
||||
}, |
||||
// 跳转学习详情 |
||||
toDetail(item) { |
||||
this.$util.to(`/team/article/article?id=` + item.id) |
||||
}, |
||||
// 获取销售进展 |
||||
getSell() { |
||||
salesProgress({ |
||||
businessManagerId: uni.getStorageSync('team').partnerId, |
||||
teamId: this.teamId, |
||||
}).then(res => { |
||||
this.sell = res |
||||
}).catch(e => {}) |
||||
}, |
||||
// 处理年度经营分析数值 除以10000 + w |
||||
handleNum(num) { |
||||
// return num ? parseInt(num / 10000) + 'w' : 0 |
||||
return num |
||||
}, |
||||
// 获取年度经营分析 |
||||
getAnalysis() { |
||||
annualOperatingAnalysis({ |
||||
businessManagerId: uni.getStorageSync('team').partnerId, |
||||
teamId: this.teamId, |
||||
}).then(({ data }) => { |
||||
if (data) this.analysis = data |
||||
}).catch(e => {}) |
||||
}, |
||||
// 团队选择回调 |
||||
teamChange() { |
||||
const { teamId } = this |
||||
const e = this.list.find(e => e.teamId == teamId) |
||||
uni.setStorageSync('team', e) |
||||
this.getAuth() |
||||
}, |
||||
// 提示暂未开放 |
||||
toPanel(i) { |
||||
this.$util.errMsg('功能暂未开放!') |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.page { |
||||
position: relative; |
||||
min-height: 100%; |
||||
padding: 30rpx 22rpx; |
||||
box-sizing: border-box; |
||||
} |
||||
.bg { |
||||
z-index: -1; |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
.team { |
||||
width: 300rpx; |
||||
margin-bottom: 30rpx; |
||||
} |
||||
.banner { |
||||
position: relative; |
||||
.img { |
||||
width: 100%; |
||||
} |
||||
.info { |
||||
position: absolute; |
||||
top: 80rpx; |
||||
left: 46rpx; |
||||
} |
||||
.title { |
||||
margin-bottom: 15rpx; |
||||
font-size: 36rpx; |
||||
font-weight: 600; |
||||
color: #001D67; |
||||
} |
||||
.text { |
||||
font-size: 20rpx; |
||||
font-family: PingFangSC-Regular, PingFang SC; |
||||
color: #001D67; |
||||
} |
||||
} |
||||
.entry { |
||||
display: flex; |
||||
justify-content: space-around; |
||||
align-items: center; |
||||
margin: 10rpx 0 30rpx; |
||||
text-align: center; |
||||
.icon { |
||||
width: 78rpx; |
||||
} |
||||
.text { |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
} |
||||
} |
||||
.panel { |
||||
margin: 20rpx 10rpx; |
||||
background-color: #fff; |
||||
border-radius: 20rpx; |
||||
overflow: hidden; |
||||
&.study-panel { |
||||
background-color: transparent; |
||||
} |
||||
.title { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
padding: 17rpx 20rpx; |
||||
background: linear-gradient(90deg, #E5EFFF 0%, #FFFFFF 100%); |
||||
} |
||||
.y-title { |
||||
background: linear-gradient(90deg, #FFF5E5 0%, #FFFFFF 100%); |
||||
} |
||||
.left { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 30rpx; |
||||
color: #333; |
||||
} |
||||
.right { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
text { |
||||
margin: 0 15rpx 0 8rpx; |
||||
} |
||||
} |
||||
.icon { |
||||
width: 36rpx; |
||||
margin-right: 10rpx; |
||||
} |
||||
.date { |
||||
width: 26rpx; |
||||
} |
||||
.arrow { |
||||
width: 16rpx; |
||||
} |
||||
.data { |
||||
padding: 33rpx 36rpx; |
||||
} |
||||
.line { |
||||
display: flex; |
||||
} |
||||
.first { |
||||
.item:first-child { |
||||
width: 65%; |
||||
} |
||||
.name { |
||||
margin-bottom: 14rpx; |
||||
font-size: 24rpx; |
||||
color: #999; |
||||
} |
||||
.val { |
||||
font-size: 30rpx; |
||||
color: #333; |
||||
} |
||||
.line:first-child { |
||||
margin-bottom: 32rpx; |
||||
} |
||||
} |
||||
.second { |
||||
padding: 38rpx 10rpx; |
||||
.item { |
||||
position: relative; |
||||
text-align: center; |
||||
&:after { |
||||
content: ''; |
||||
position: absolute; |
||||
bottom: 14rpx; |
||||
right: -35rpx; |
||||
width: 22rpx; |
||||
height: 2px; |
||||
background-color: #ccc; |
||||
} |
||||
&.item1 { |
||||
margin-right: 53rpx; |
||||
} |
||||
&.item2 { |
||||
margin-right: 54rpx; |
||||
} |
||||
&.equal { |
||||
margin-right: 50rpx; |
||||
&:after { |
||||
bottom: 6rpx; |
||||
right: -39rpx; |
||||
height: 2px; |
||||
padding-bottom: 5px; |
||||
border-bottom: 2px solid #ccc; |
||||
background-clip:content-box; |
||||
box-sizing: content-box; |
||||
} |
||||
} |
||||
&:last-child:after { |
||||
display: none; |
||||
} |
||||
} |
||||
.val { |
||||
margin-bottom: 10rpx; |
||||
font-size: 30rpx; |
||||
color: #333; |
||||
} |
||||
.name { |
||||
font-size: 24rpx; |
||||
color: #999; |
||||
} |
||||
} |
||||
.study { |
||||
width: 100%; |
||||
margin-top: 15rpx; |
||||
overflow: auto; |
||||
.item { |
||||
display: inline-block; |
||||
width: 280rpx; |
||||
margin-right: 20rpx; |
||||
background-color: #fff; |
||||
border-radius: 8px; |
||||
overflow: hidden; |
||||
} |
||||
.pic { |
||||
width: 100%; |
||||
height: 130rpx; |
||||
} |
||||
.text { |
||||
padding: 15rpx; |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
text-align: center; |
||||
white-space: nowrap; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
} |
||||
} |
||||
.scroll { |
||||
width: 100%; |
||||
white-space: nowrap; |
||||
} |
||||
} |
||||
.oh { |
||||
overflow: hidden; |
||||
} |
||||
</style> |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 513 B |
After Width: | Height: | Size: 581 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 644 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 840 B After Width: | Height: | Size: 840 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 727 B After Width: | Height: | Size: 727 B |
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 672 B |