Commit a78c5df2 by 前端

Merge branch 'saas+v4.22.0' into 'master'

Saas+v4.22.0

See merge request !35
2 parents 0be21eed de29569d
...@@ -15,19 +15,29 @@ Since TypeScript cannot handle type information for `.vue` imports, they are shi ...@@ -15,19 +15,29 @@ Since TypeScript cannot handle type information for `.vue` imports, they are shi
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471). You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
# 众筹 (crowdfunding) # 众筹 (crowdfunding)
* activited:已结束战报 * activited:已结束战报
* activiting:进行中战报 * activiting:进行中战报
* goodNews:喜报 * goodNews:喜报
# 膨胀金 (/expansiongold) # 膨胀金 (/expansiongold)
* activited:已结束战报 * activited:已结束战报
* activiting:进行中战报 * activiting:进行中战报
* goodNews:喜报 * goodNews:喜报
# saas+ 企微推送 (/sass) # saas+ 企微推送 (/sass)
# 嘀加(/dj)
- SA个人喜报:/dj/personalGoodNews?orderCode=230324172030364
- 早报:/dj/morning?merchantId=
- SA喜报:/dj/gladNews
- 喜报:/dj/goodNews
# 车损权益
- 喜报
- 门店战报
- 服务商战报
.banner {
.banner-bg {
height: 769px;
}
}
.equity-box {
.banner .header-box {
top: 402px;
.merchant-name {
color: #F7432B;
font-size: 28px;
}
}
.user-box .user-order {
top: 480px;
background-image: linear-gradient(bottom, #ED4216, #f6721b, #FF9C20);
}
}
// 订单统计
.order-box {
box-sizing: border-box;
width: calc(100% - 1.333333rem);
margin: 0.2rem 0.666667rem;
padding: 0.213333rem;
border-radius: 0.133333rem 0.133333rem 0.133333rem 0.133333rem;
background: linear-gradient(-180deg, rgb(255, 169, 105), rgb(255, 137, 85));
.order-side {
width: calc(100% - 34px);
padding: 20px 17px;
border-radius: 10px;
background: linear-gradient(-180deg, rgba(255,249,235,100), rgba(255,240,196,100));
.title {
width: 100%;
text-align: center;
font-weight: 600;
font-size: 32px;
color: #FEEACE;
margin-top: 20px;
background-image: -webkit-linear-gradient(bottom,#F57300,#ee4831,#E73507);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
.order-list {
margin: 20px;
border-radius: 10px 10px 10px 10px;
background: linear-gradient(0deg, #ffe9c8ff, #fff3e0ff);
padding: 40px;
.order-item {
display: flex;
align-items: center;
background: linear-gradient(90deg, #fbd8b7, #feebd4, transparent);
border-radius: 20px;
padding: 10px 20px;
font-size: 22px;
color: #3A3A3A;
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.order-label {
display: inline-block;
width: 200px;
}
.order-value {
display: inline-flex;
font-size: 34px;
color: #F2383B;
font-style: italic;
font-weight: 600;
align-items: baseline;
.order-unit {
font-size: 26px;
font-style: normal;
margin-left: 8px;
font-weight: 400;
}
}
}
}
}
}
.output.service-box {
flex-direction: column;
align-items: stretch;
}
.service-info {
display: flex;
.medal-bg {
display: flex;
align-items: center;
justify-content: center;
width: 64px;
height: 64px;
background-color: #FFE8E6;
border-radius: 50%;
margin: 8px 10px 16px;
font-weight: 600;
font-size: 32px;
color: #FC422E;
}
.first-medal {
width: 84px;
height: 96px;
}
.store-name {
font-weight: 600;
font-size: 32px;
color: #121314;
}
.resident-sales {
margin-top: 4px;
font-size: 24px;
color: #999999;
}
.name-box {
position: relative;
.price {
position: absolute;
right: 0;
bottom: -4px;
}
}
}
.service-ranking {
display: flex;
justify-content: space-between;
padding: 32px;
border-radius: 16px;
background-image: linear-gradient(180deg, #FFFFFF 0%, #FFF5F5 100%);
&.first {
background-image: linear-gradient(180deg, #FFFFFF 0%, #FFF9E0 100%);
margin-bottom: 32px;
.avatar-box {
background-image: linear-gradient(180deg, #FFF1C3 0%, #FFE9A3 100%);
}
}
&.second {
background-image: linear-gradient(180deg, #FFFFFF 0%, #F0F4F7 100%);
margin-bottom: 32px;
.avatar-box {
background-image: linear-gradient(180deg, #EDEFF0 0%, #E1E4E6 100%);
}
}
&.third {
background-image: linear-gradient(180deg, #FFFFFF 0%, #FAF2E6 100%);
.avatar-box {
background-image: linear-gradient(180deg, #FFF0DF 0%, #F6DABD 100%);
}
}
.ranking-item {
.ranking-label {
font-size: 24px;
color: #999999;
margin-bottom: 8px;
}
.ranking-value {
font-size: 32px;
color: #121314;
text-align: center;
}
}
}
.service-market {
.market-number {
font-size: 40px !important;
}
}
\ No newline at end of file \ No newline at end of file
.banner-header {
position: relative;
.banner-store {
width: 100%;
}
.data-time {
position: absolute;
right: 0;
top: 40px;
color: #fff;
font-size: 24px;
padding: 8px 24px;
background-color: rgba(255, 255, 255,0.25);
}
}
.overview {
margin-bottom: 136px;
}
.sales {
margin-bottom: 156px;
}
.wrapper-box {
position: relative;
width: 100%;
margin-top: -32px;
padding-bottom: 160px;
background-image: linear-gradient(180deg, #FF6352 0%, #FF6453 43%, #FF9D92 100%);
}
.wrapper-content {
position: relative;
.wrapper-bg {
position: relative;
border-radius: 32px;
width: calc(100% - 64px);
background: #FFFFFF;
box-sizing: border-box;
margin: 0 32px;
z-index: 1;
padding: 48px 12px;
}
.wrapper-title {
position: absolute;
top: -76px;
left: 32px;
display: inline-block;
height: 128px;
background-image: linear-gradient(210deg, #FEC5A9 1%, #FC422E 40%);
box-shadow: inset 0 0 12px 4px #fef9dee6;
border-radius: 32px;
font-weight: 500;
font-size: 40px;
color: #FFFFFF;
line-height: 48px;
padding: 16px 66px 12px 32px;
z-index: 1;
}
.market {
display: flex;
.market-item {
position: relative;
width: 33%;
text-align: center;
&::after {
content: '';
display: inline-block;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 2px;
height: 64px;
background-color: #DEEAFC;
}
&:last-child::after {
display: none;
}
.market-label {
font-size: 26px;
color: #1B233D;
margin-bottom: 16px;
}
.market-value {
font-size: 28px;
color: #FC5540;
&.chinese-value {
font-size: 26px;
}
}
.market-number {
display: inline-block;
margin-left: 4px;
margin-right: 4px;
font-size: 48px;
font-weight: 700;
background-image: -webkit-linear-gradient(bottom, #FC422E, #FE836B);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
}
.market-border {
margin: 23px 0 32px;
border-bottom: 3px dashed #DEEAFC;
background: linear-gradient(white, white) padding-box, repeating-linear-gradient(-45deg, #DEEAFC 0, #DEEAFC 0.5em, #DEEAFC, white 0.75em);
}
}
.sales-content {
position: relative;
width: 100%;
height: 408px;
.sale-funnel {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 372px;
height: 280px;
}
.sale-lable {
position: absolute;
left: 60px;
font-size: 24px;
color: #323436;
&.sale-up {
top: 118px;
}
&.sale-down {
bottom: 110px;
}
}
.sale-value {
position: absolute;
font-size: 28px;
left: 50%;
transform: translateX(-50%);
font-weight: 700;
&.sale-up {
top: 118px;
color: #E62F12;
}
&.sale-down {
bottom: 110px;
color: #FFFFFF;
}
}
.sale-rate {
position: absolute;
right: 64px;
top: 50%;
transform: translateY(-50%);
font-size: 24px;
color: #E62F12;
line-height: 36px;
margin-bottom: 4px;
.sale-number {
font-weight: 700;
font-size: 40px;
color: #E62F12;
line-height: 56px;
}
}
}
.output-content {
padding: 48px 36px 56px !important;
.output {
display: flex;
align-items: center;
border-radius: 20px;
box-sizing: border-box;
padding: 24px 12px 28px;
&-bg {
background-image: linear-gradient(180deg, #FFFFFF 0%, #FFF5F5 100%);
}
&.first {
background-image: linear-gradient(180deg, #FFFFFF 0%, #FFF9E0 100%);
margin-bottom: 32px;
.avatar-box {
background-image: linear-gradient(180deg, #FFF1C3 0%, #FFE9A3 100%);
}
.user-name {
color: #EB9C00;
}
}
&.second {
background-image: linear-gradient(180deg, #FFFFFF 0%, #F0F4F7 100%);
margin-bottom: 32px;
.avatar-box {
background-image: linear-gradient(180deg, #EDEFF0 0%, #E1E4E6 100%);
}
.user-name {
color: #788597;
}
}
&.third {
background-image: linear-gradient(180deg, #FFFFFF 0%, #FAF2E6 100%);
.avatar-box {
background-image: linear-gradient(180deg, #FFF0DF 0%, #F6DABD 100%);
}
.user-name {
color: #B87142;
}
}
.avatar-box {
position: relative;
width: 96px;
height: 96px;
border-radius: 50%;
margin-left: 30px;
background-image: linear-gradient(180deg, #FFF0F0 0%, #FFDFDB 100%);
.avatar {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 84px;
height: 84px;
border-radius: 50%;
}
.icon-crown {
position: absolute;
width: 48px;
height: 48px;
left: -15px;
top: -15px;
}
.ranking-bg {
position: absolute;
display: flex;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 84px;
height: 84px;
background-color: rgba(255, 255, 255, .5);
font-weight: 600;
font-size: 32px;
color: #FB6160;
align-items: center;
justify-content: center;
z-index: 1;
border-radius: 50%;
}
}
.right-content {
flex: 1;
margin-left: 20px;
.name-box {
display: flex;
align-items: center;
justify-content: space-between;
.user-name {
font-weight: 600;
font-size: 32px;
}
.price {
font-weight: 700;
font-size: 36px;
color: #FC4728;
margin-right: 20px;
}
}
.ranking-list {
display: flex;
justify-content: space-between;
margin-top: 20px;
.ranking-item {
.ranking-value {
font-size: 32px;
color: #121314;
margin-bottom: 8px;
}
.ranking-label {
color: #999999;
font-size: 24px;
}
}
}
}
}
}
.firework {
position: absolute;
width: 686px;
height: 144px;
left: 50%;
transform: translateX(-50%);
top: 925px;
}
.bg-footer {
position: absolute;
bottom: 0;
width: 100%
}
.logo {
position: absolute;
bottom: 64px;
left: 50%;
transform: translateX(-50%);
width: 148px;
height: 32px;
}
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-04-03 14:46:54 * @LastEditTime: 2023-05-16 14:37:28
*/ */
import HelloWorld from 'comps/HelloWorld.vue' import HelloWorld from 'comps/HelloWorld.vue'
...@@ -113,6 +113,28 @@ const staticRoutes = Object.freeze([ ...@@ -113,6 +113,28 @@ const staticRoutes = Object.freeze([
title: '早报', title: '早报',
backgroundColor: '#FA6031' backgroundColor: '#FA6031'
} }
},
{
path: '/equity/goodNews',
component: () => import('views/equity/goodNews.vue'),
meta: {
title: '喜报',
backgroundColor: '#FA6031'
}
},
{
path: '/equity/storeReport',
component: () => import('views/equity/storeReport.vue'),
meta: {
title: '门店战报'
}
},
{
path: '/equity/serviceReport',
component: () => import('views/equity/serviceReport.vue'),
meta: {
title: '服务商战报'
}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-03-21 17:39:21 * @LastEditTime: 2023-05-22 15:03:39
*/ */
const fetchConfig = function (isEnv = true) { const fetchConfig = function (isEnv = true) {
// return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json()) // return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json()) return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/h5-config', {}).then(res => res.json())
// return window.fetch('https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=h5-config').then(res => res.json())
} }
// const $mockConfig = await fetchConfig() // const $mockConfig = await fetchConfig()
export default fetchConfig export default fetchConfig
\ No newline at end of file \ No newline at end of file
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-04-07 14:23:47 * @LastEditTime: 2023-05-24 14:27:33
*/ */
const fetchConfig1 = function (isEnv = true) { const fetchConfig1 = function (isEnv = true) {
// return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json()) // return window.fetch('http://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json())
return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json()) return window.fetch('https://oss-config.test.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/djposter-config', {}).then(res => res.json())
// return window.fetch('http://192.168.1.68:7001/glsxAdmin/config?moduleUrl=djposter-config').then(res => res.json())
} }
// const $mockConfig = await fetchConfig() // const $mockConfig = await fetchConfig()
export default fetchConfig1 export default fetchConfig1
\ No newline at end of file \ No newline at end of file
<!-- <!--
* @Description:
* @Author: huyue
* @Date: 2023-03-21 17:10:39
* @LastEditors: huyue
* @LastEditTime: 2023-03-21 17:49:31
-->
<!--
* @Description: 喜报 * @Description: 喜报
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 15:26:23 * @Date: 2022-10-10 15:26:23
......
<!--
* @Description: 喜报
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2023-05-24 15:07:55
-->
<template>
<div class="wrapper-good equity-box">
<div class="banner">
<img class="banner-bg" :src="getImageUrl('banner-bg', 'equity')" alt="" />
<div class="header-box">
<div class="merchant-name">{{ data.newInfo!.merchantName4s }}</div>
</div>
</div>
<div class="user-box">
<img
class="user-avatar"
:src="data.newInfo!.referrerWeChatAvatar || getImageUrl('icon-avatar')"
alt=""
/>
<div class="out-box">
<div class="inside-box">
<img class="user-bg" src="@/assets/images/dj/user-bg.png" alt="" />
<div class="user-info">
<span>{{
data.newInfo!.departmentName == "其他"
? ""
: data.newInfo!.departmentName
}}</span>
<div class="user-name">
{{ data.newInfo!.referrer }}
</div>
为团队助力
</div>
<div class="user-order">
第
<div class="order-value">
{{ data.newInfo!.orderNumber }}
</div>
单
</div>
<!-- 定位模块脱离文档流,用一个空白块代替位置 -->
<div class="empty-bg"></div>
</div>
</div>
<img
class="user-header"
src="@/assets/images/dj/user-header.png"
alt=""
/>
</div>
<div class="order-box">
<div class="order-side">
<div class="title">订单统计</div>
<div class="order-list">
<div class="order-item">
<div class="order-label">今日单量</div>
<div class="order-value"><span>{{data.newInfo!.orderNumber?.toLocaleString()}}</span><span class="order-unit">单</span></div>
</div>
<div class="order-item">
<div class="order-label">升级客单价</div>
<div class="order-value"><span>{{data.newInfo!.orderPrice?.toLocaleString()}}</span><span class="order-unit">元</span></div>
</div>
<div class="order-item">
<div class="order-label">本月累计单量</div>
<div class="order-value"><span>{{data.newInfo!.monthOrderNumber?.toLocaleString()}}</span><span class="order-unit">单</span></div>
</div>
<div class="order-item">
<div class="order-label">本月累计产值</div>
<div class="order-value"><span>{{data.newInfo!.monthTurnover?.toLocaleString()}}</span><span class="order-unit">元</span></div>
</div>
</div>
</div>
</div>
<img class="icon-bottom" :src="getImageUrl('icon-bottom')" alt="" />
<img class="dj-logo" src="@/assets/images/dj/dj-logo.png" alt="" />
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import { DataInfo, Params } from "./interface/goodNew";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: Params = {};
const data = reactive<Partial<DataInfo>>({
newInfo: {},
});
const getInfo = async () => {
data.newInfo = await djReq(
"dj.api.quotation.smartcarlife.vd.payment.congratulations",
query
);
};
const getImageUrl = (name: any, path = "goodNews") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
onMounted(() => {
if (route.query) {
console.log(route.query)
query = route.query;
getInfo();
}
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/gladNews.scss";
@import "src/assets/styles/equity/goodNews.scss";
</style>
/*
* @Description:
* @Author: huyue
* @Date: 2023-05-11 10:37:31
* @LastEditors: huyue
* @LastEditTime: 2023-05-22 15:53:51
*/
// 接口入参定义
export interface Params {
merchantId4s?: number;
id?: number;
merchantName4s?: string;
dataId?: number;
}
// data数据接口
export interface DataInfo {
newInfo: Partial<NewsData>;
}
export interface NewsData {
merchantId4s?: number;
createTime?: string;
monthTurnover?: number;
merchantName4s?: string;
orderNumber?: number;
monthOrderNumber?: number;
referrerId?: string;
orderPrice?: number;
departmentName?: string;
referrerWeChatAvatar?: string;
referrer?: string;
reportName?: string;
}
\ No newline at end of file \ No newline at end of file
/*
* @Description: 战报接口
* @Author: huyue
* @Date: 2023-05-16 16:24:07
* @LastEditors: huyue
* @LastEditTime: 2023-05-22 17:57:17
*/
export interface Params {
merchantId4s?: number;
id?: number;
merchantName4s?: string;
dataId?: number;
}
export interface DataInfo {
reportInfo: Partial<ReportData>;
classList: string[];
}
export interface ReportData {
merchantId4s?: number;
successCustomerTotal?: number;
avgDayOrderPrice?: number;
customerTotal?: number;
avgMonthOrderPrice?: number;
createTime?: string;
monthTurnover?: number;
merchantName4s?: string;
yesterdayTurnover?: number;
conversionRate?: string;
monthOrderTotal?: number;
yesterdayOrderTotal?: number;
staffList?: StaffInfo[];
reportName?: string;
}
interface StaffInfo {
referrerId?: string;
referrer?: string;
turnover?: number;
customerTotal?: number;
successCustomerTotal?: number;
avgOrderPrice?: number;
conversionRate?: string;
referrerWeChatAvatar?: string;
}
export interface ServeiceDataInfo {
reportInfo: Partial<ServeiceData>;
classList: string[];
}
export interface ServeiceData {
merchantId4s: number;
successCustomerTotal: number;
avgDayOrderPrice: number;
customerTotal: number;
merchantList: MerchantList[];
avgMonthOrderPrice: number;
createTime: string;
monthTurnover: number;
merchantName4s: string;
yesterdayTurnover: number;
conversionRate: string;
monthOrderTotal: number;
yesterdayOrderTotal: number;
reportName: string;
}
interface MerchantList {
merchantId4s: number;
merchantName4s: string;
staffName: string;
turnover: number;
customerTotal: number;
successCustomerTotal: number;
avgOrderPrice: number;
conversionRate:string
}
\ No newline at end of file \ No newline at end of file
<!--
* @Description:
* @Author: huyue
* @Date: 2023-05-12 15:26:33
* @LastEditors: huyue
* @LastEditTime: 2023-05-25 10:58:26
-->
<template>
<div class="banner-header">
<img class="banner-store" :src="getImageUrl('banner-store')" alt="">
<div class="data-time">数据生成于{{data.reportInfo!.createTime}}</div>
</div>
<div class="wrapper-box">
<div class="wrapper-content overview">
<div class="wrapper-title">营销概览</div>
<div class="wrapper-bg">
<div class="market service-market">
<div class="market-item">
<div class="market-label">昨日营业额</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.yesterdayTurnover}}</span></div>
</div>
<div class="market-item">
<div class="market-label">昨日单量</div>
<div class="market-value chinese-value"><span class="market-number">{{data.reportInfo!.yesterdayOrderTotal}}</span>单</div>
</div>
<div class="market-item">
<div class="market-label">日均升级客单价</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.avgDayOrderPrice}}</span></div>
</div>
</div>
<div class="market-border"></div>
<div class="market service-market">
<div class="market-item">
<div class="market-label">本月营业额</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.monthTurnover}}</span></div>
</div>
<div class="market-item">
<div class="market-label">本月单量</div>
<div class="market-value chinese-value"><span class="market-number">{{data.reportInfo!.monthOrderTotal}}</span>单</div>
</div>
<div class="market-item">
<div class="market-label">月均升级客单价</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.avgMonthOrderPrice}}</span></div>
</div>
</div>
</div>
</div>
<div class="wrapper-content sales">
<div class="wrapper-title">销售漏斗(本月)</div>
<div class="wrapper-bg sales-content">
<img class="sale-funnel" :src="getImageUrl('sale-funnel')" alt="">
<div class="sale-lable sale-up">推荐客户量</div>
<div class="sale-value sale-up">{{data.reportInfo!.customerTotal}}</div>
<div class="sale-lable sale-down">成交客户量</div>
<div class="sale-value sale-down">{{data.reportInfo!.successCustomerTotal}}</div>
<div class="sale-rate">
转化率
<div class="sale-number">{{data.reportInfo!.conversionRate}}</div>
</div>
</div>
</div>
<div class="wrapper-content" v-if="data.reportInfo!.merchantList && data.reportInfo!.merchantList!.length > 0">
<div class="wrapper-title">产值排名(本月)</div>
<div class="wrapper-bg output-content">
<div class="output service-box" v-for="(item, index) in data.reportInfo!.merchantList" :key="index">
<div class="service-info">
<template v-if="index < 3">
<img class="first-medal" :src="getImageUrl(`${data.classList![index]}-medal`)" alt="">
</template>
<template v-else>
<div class="medal-bg">{{ index + 1 }}</div>
</template>
<div class="right-content">
<div class="name-box"><div class="store-name">{{item.merchantName4s && item.merchantName4s.length > 24 ? `${item.merchantName4s!.slice(0,24)}...` : item.merchantName4s}}</div><div class="price">¥{{item.turnover}}</div></div>
<div class="resident-sales">驻店销售:{{ item.staffName }}</div>
</div>
</div>
<div class="service-ranking" :class="data.classList![index]">
<div class="ranking-item">
<div class="ranking-label">推荐客户</div>
<div class="ranking-value">{{item.customerTotal}}</div>
</div>
<div class="ranking-item">
<div class="ranking-label">成交客户</div>
<div class="ranking-value">{{item.successCustomerTotal}}</div>
</div>
<div class="ranking-item">
<div class="ranking-label">转化率</div>
<div class="ranking-value">{{item.conversionRate}}</div>
</div>
<div class="ranking-item">
<div class="ranking-label">客单价</div>
<div class="ranking-value">{{item.avgOrderPrice}}</div>
</div>
</div>
</div>
</div>
</div>
<img class="firework" :src="getImageUrl('firework')" alt="">
<img class="bg-footer" :src="getImageUrl('bg-footer')" alt="">
<img class="logo" :src="getImageUrl('logo')" alt="">
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import { ServeiceDataInfo, Params } from "./interface/report";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: Params = {};
const data = reactive<Partial<ServeiceDataInfo>>({
reportInfo: {
merchantList: []
},
classList: ['first', 'second', 'third']
});
const getInfo = async () => {
data.reportInfo = await djReq(
"dj.api.quotation.smartcarlife.vd.service.battlefield",
query
);
// const merchantList = data.reportInfo?.merchantList
// data.reportInfo!.merchantList = merchantList?.concat(merchantList)
};
const getImageUrl = (name: any, path = "equity") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
onMounted(() => {
if (route.query) {
console.log(route.query)
query = route.query;
getInfo();
}
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/equity/storeReport.scss";
@import "src/assets/styles/equity/serviceReport.scss"
</style>
\ No newline at end of file \ No newline at end of file
<!--
* @Description:
* @Author: huyue
* @Date: 2023-05-12 15:26:33
* @LastEditors: huyue
* @LastEditTime: 2023-05-23 16:30:52
-->
<template>
<div class="banner-header">
<img class="banner-store" :src="getImageUrl('banner-store')" alt="">
<div class="data-time">数据生成于{{ data.reportInfo!.createTime }}</div>
</div>
<div class="wrapper-box">
<div class="wrapper-content overview">
<div class="wrapper-title">营销概览</div>
<div class="wrapper-bg">
<div class="market">
<div class="market-item">
<div class="market-label">昨日营业额</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.yesterdayTurnover}}</span></div>
</div>
<div class="market-item">
<div class="market-label">昨日单量</div>
<div class="market-value chinese-value"><span class="market-number">{{data.reportInfo!.yesterdayOrderTotal}}</span>单</div>
</div>
<div class="market-item">
<div class="market-label">日均升级客单价</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.avgDayOrderPrice}}</span></div>
</div>
</div>
<div class="market-border"></div>
<div class="market">
<div class="market-item">
<div class="market-label">本月营业额</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.monthTurnover}}</span></div>
</div>
<div class="market-item">
<div class="market-label">本月单量</div>
<div class="market-value chinese-value"><span class="market-number">{{ data.reportInfo!.monthOrderTotal }}</span>单</div>
</div>
<div class="market-item">
<div class="market-label">月均升级客单价</div>
<div class="market-value">¥<span class="market-number">{{data.reportInfo!.avgMonthOrderPrice}}</span></div>
</div>
</div>
</div>
</div>
<div class="wrapper-content sales">
<div class="wrapper-title">销售漏斗(本月)</div>
<div class="wrapper-bg sales-content">
<img class="sale-funnel" :src="getImageUrl('sale-funnel')" alt="">
<div class="sale-lable sale-up">推荐客户量</div>
<div class="sale-value sale-up">{{data.reportInfo!.customerTotal}}</div>
<div class="sale-lable sale-down">成交客户量</div>
<div class="sale-value sale-down">{{data.reportInfo!.successCustomerTotal}}</div>
<div class="sale-rate">
转化率
<div class="sale-number">{{data.reportInfo!.conversionRate}}</div>
</div>
</div>
</div>
<div class="wrapper-content" v-if="data.reportInfo!.staffList && data.reportInfo!.staffList!.length > 0">
<div class="wrapper-title">产值排名(本月)</div>
<div class="wrapper-bg output-content">
<div class="output output-bg" :class="data.classList![index]" v-for="(item, index) in data.reportInfo!.staffList" :key="index">
<div class="avatar-box">
<template v-if="index < 3">
<img class="icon-crown" :src="getImageUrl(`icon-${data.classList![index]}`)" alt="">
</template>
<template v-else>
<div class="ranking-bg">{{ index + 1 }}</div>
</template>
<img class="avatar" :src="item.referrerWeChatAvatar || getImageUrl('avatar')" alt="">
</div>
<div class="right-content">
<div class="name-box"><div class="user-name">{{item.referrer}}</div><div class="price">¥{{ item.turnover }}</div></div>
<div class="ranking-list">
<div class="ranking-item">
<div class="ranking-value">{{item.customerTotal}}</div>
<div class="ranking-label">推荐客户</div>
</div>
<div class="ranking-item">
<div class="ranking-value">{{item.successCustomerTotal}}</div>
<div class="ranking-label">成交客户</div>
</div>
<div class="ranking-item">
<div class="ranking-value">{{item.conversionRate}}</div>
<div class="ranking-label">转化率</div>
</div>
<div class="ranking-item">
<div class="ranking-value">{{item.avgOrderPrice}}</div>
<div class="ranking-label">客单价</div>
</div>
</div>
</div>
</div>
</div>
</div>
<img class="firework" :src="getImageUrl('firework')" alt="">
<img class="bg-footer" :src="getImageUrl('bg-footer')" alt="">
<img class="logo" :src="getImageUrl('logo')" alt="">
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import { DataInfo, Params } from "./interface/report";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: Params = {};
const data = reactive<Partial<DataInfo>>({
reportInfo: {
staffList: []
},
classList: ['first', 'second', 'third']
});
const getInfo = async () => {
data.reportInfo = await djReq(
"dj.api.quotation.smartcarlife.vd.merchant.battlefield",
query
);
};
const getImageUrl = (name: any, path = "equity") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
onMounted(() => {
if (route.query) {
console.log(route.query)
query = route.query;
getInfo();
}
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/equity/storeReport.scss";
</style>
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-10-10 10:54:14 * @Date: 2022-10-10 10:54:14
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-10-24 10:10:51 * @LastEditTime: 2023-05-24 10:18:45
*/ */
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
...@@ -52,7 +52,7 @@ export default defineConfig({ ...@@ -52,7 +52,7 @@ export default defineConfig({
// 自定义代理规则 // 自定义代理规则
proxy: { proxy: {
'/api': { '/api': {
target: 'http://192.168.3.101:8247', target: 'http://192.168.1.68:7001',
changeOrigin: true, changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '') rewrite: path => path.replace(/^\/api/, '')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!