Commit d351707e by 前端

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

合并线上版本Saas+v4.26.0

See merge request !40
2 parents 1b5c81fd 30b2517b

199 KB | W: | H:

380 KB | W: | H:

src/assets/images/dj/war-header.png
src/assets/images/dj/war-header.png
src/assets/images/dj/war-header.png
src/assets/images/dj/war-header.png
  • 2-up
  • Swipe
  • Onion skin
$imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/';
#app {
position: relative;
}
.bg {
position: absolute;
left: 0;
// right: 0;
top: 0;
// bottom: 0;
width: 100%;
z-index: -1;
// height: 100%;
}
.x-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.mrg-22{
margin:0 22px;
}
.flex{
display:flex;
}
.mgb19{
margin-bottom:19px;
}
.logo {
bottom: 60px;
width: 196px;
img {
width: 100%;
height: 43px;
}
}
\ No newline at end of file
$imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/h5-posters/';
#app {
position: relative;
}
.bg {
position: absolute;
left: 0;
// right: 0;
top: 0;
// bottom: 0;
width: 100%;
z-index: -1;
// height: 100%;
}
div {
user-select: none;
}
.x-center {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.mrg-22{
margin:0 22px;
}
.flex{
display:flex;
}
.mgb19{
margin-bottom:19px;
}
.logo {
bottom: 60px;
width: 196px;
img {
width: 100%;
height: 43px;
}
}
.wrapper-box {
position: relative;
min-height: 100vh;
.war-hearder {
position: relative;
z-index: -1;
img {
width: 100%;
height: 484px;
}
.header-time {
position: absolute;
right: 0;
top: 60px;
padding: 6px 32px;
height: 44px;
line-height: 44px;
background-image: linear-gradient(90deg, #F95A2E 0%, #F97E2E 100%);
border-radius: 24px 0 0 24px;
font-size: 22px;
color: #FFFFFF;
}
.service-name {
position: absolute;
bottom: 46px;
width: 100%;
padding: 7px 0;
text-align: center;
font-weight: 900;
font-size: 32px;
font-family: 狮尾B2加糖宋体,Swei B2 Sugar CJK SC,獅尾B2加糖宋體SC,獅尾B2加糖宋體SC-Regular;
letter-spacing: 1px;
color: #FFFFFF;
background-image: linear-gradient(270deg, #ff735b00 0%, #F84919 55%, #ff735b00 100%);
border-radius: 4px;
}
}
}
.icon-money {
position: absolute;
left: 0;
top: 434px;
width: 164px;
height: 176px;
z-index: 1;
}
.statics-box {
position: relative;
margin: -24px 12px 0;
width: calc(100% - 24px);
height: 386px;
background: #FFF6ED;
z-index: 1;
border: 2px solid #FCF77D;
border-radius: 16px;
.statics-total {
position: relative;
margin-top: 40px;
width: 100%;
height: 84px;
text-align: center;
font-family: 'Alibaba PuHuiTi 2.0 115';
font-weight: 900;
font-size: 60px;
color: #F9572E;
text-align: center;
text-shadow: 2px 2px 0 #FFEFD2;
z-index: 1;
&::before {
content: '';
display: inline-block;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 144px;
height: 30px;
background-image: linear-gradient(270deg, #FFF6ED 0%, #FCD7B2 55%, #FFF6ED 100%);
z-index: -1;
}
}
.statics-name {
font-size: 32px;
color: #664141;
text-align: center;
margin-top: 8px;
}
.statics-list {
position: absolute;
display: flex;
bottom: 44px;
left: 0;
width: 100%;
.statics-item {
width: 33.33%;
.statics-number {
position: relative;
font-weight: 900;
font-size: 48px;
color: #F9572E;
text-align: center;
font-family: 'Alibaba PuHuiTi 2.0 115';
&::before {
content: '';
display: inline-block;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 144px;
height: 30px;
background-image: linear-gradient(270deg, #FFF6ED 0%, #FCD7B2 55%, #FFF6ED 100%);
z-index: -1;
}
}
}
}
}
.store-box {
margin: 32px 12px 0;
width: calc(100% - 24px);
background: #FFF6ED;
z-index: 1;
border: 2px solid #FCF77D;
border-radius: 16px;
.store-title {
position: relative;
text-align: center;
padding: 16px 0 12px;
img {
width: 172px;
height: 44px;
}
.store-legend {
display: flex;
align-items: center;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 184px;
height: 50px;
background: #FFE1C3;
border-radius: 26px 0 0 26px;
.text {
font-weight: 400;
font-size: 24px;
color: rgba(102, 65, 65, .8);
padding-left: 36px;
}
.yesterday,
.month {
position: relative;
&::after {
content: '';
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
left: 16px;
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
}
}
.yesterday::after {
background-color: #282222;
}
.month::after {
background-color: rgba(40, 34, 34, 0.37);
}
}
}
.title-line {
width: 100%;
height: 12px;
background-color: #F97E2E;
}
}
.store-list {
.store-item {
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.store-name {
box-sizing: border-box;
font-size: 24px;
color: #664141;
width: 100%;
height: 60px;
line-height: 60px;
background-image: linear-gradient(90deg, #FFE7B9 0%, #FFEFD1 100%);
border-radius: 4px 4px 0 0;
padding-left: 16px;
.store-rank {
padding-right: 16px;
}
}
.store-info {
display: flex;
width: 100%;
background-color: #FFF6E5;
font-size: 24px;
padding: 24px 0 32px;
&-item {
width: 20%;
text-align: center;
margin-right: 2px;
&:last-child {
margin-right: 0;
}
.info-name {
color: #282222;
margin-bottom: 8px;
}
.info-yesterday {
font-weight: 600;
font-size: 28px;
color: #282222;
margin-bottom: 12px;
}
.info-month {
color: rgba(40, 34, 34, 0.37);
}
}
}
&:last-child {
.store-info {
border-radius: 0 0 16px 16px;
}
}
}
}
.logo {
display: flex;
width: 100%;
justify-content: center;
padding: 60px 0;
img {
display: inline-block;
width: 216px;
height: 30px;
}
}
\ No newline at end of file
......@@ -28,7 +28,7 @@
width: calc(100% - 34px);
padding: 20px 17px;
border-radius: 10px;
background: linear-gradient(-180deg, rgba(255,249,235,100), rgba(255,240,196,100));
background: #FFF9EA;
.title {
width: 100%;
text-align: center;
......@@ -43,7 +43,7 @@
.order-list {
margin: 20px;
border-radius: 10px 10px 10px 10px;
background: linear-gradient(0deg, #ffe9c8ff, #fff3e0ff);
background: #FFEFDB;
padding: 40px;
.order-item {
display: flex;
......@@ -77,5 +77,53 @@
}
}
}
.goods {
margin: 20px;
&-title {
background: #FFEFDB;
border-radius: 10px 10px 0 0;
font-size: 22px;
line-height: 32px;
padding: 10px 24px;
span {
font-weight: 600;
color: #FEEACE;
background-image: -webkit-linear-gradient(bottom,#F57300,#ee4831,#E73507);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
&-list {
padding: 24px 40px;
font-size: 22px;
color: #3A3A3A;
line-height: 32px;
background: #FFE6CC;
border-radius: 0 0 10px 10px;
}
&-item {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
}
&-name {
max-width: 310px;
}
&-price {
font-weight: 500;
font-size: 24px;
color: #F2383B;
font-weight: 600;
}
&-unit {
display: inline-block;
margin-left: 6px;
font-weight: normal;
}
}
}
}
......@@ -135,6 +135,9 @@ $good-color: #ffd2b2;
font-weight: 800;
font-style: italic;
}
.arrive {
margin: 0 20px;
}
}
.table {
&-box {
......
/*
* @Description:
* @Author: huyue
* @Date: 2022-10-10 11:37:11
* @LastEditors: huyue
* @LastEditTime: 2022-10-10 15:38:16
*/
/*
* @Description:
* @Author: huyue
* @Date: 2022-10-10 11:37:11
* @LastEditors: huyue
* @LastEditTime: 2023-08-08 10:52:01
*/
/** 三个数字加一个逗号 */
const numAddSymbol = (val: number | string | undefined) => {
return val ? (val + '').replace(/\B(?=(?:\d{3})+\b)/g, ',') : 0
}
export default {
numAddSymbol
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2023-03-20 14:37:30
* @LastEditTime: 2023-08-07 17:06:04
-->
<template>
<div class="bg-top-box">
......@@ -49,8 +49,14 @@
</div>
<div class="sales x-center">
<div>第</div>
<div class="number">{{ data.storeInfo!.orderCount }}</div>
<div class="number">{{ data.storeInfo!.orderCount }}</div>
<div>单</div>
<template v-if="data.storeInfo!.orderCount2">
<div class="arrive">—</div>
<div>第</div>
<div class="number">{{ data.storeInfo!.orderCount2 }}</div>
<div>单</div>
</template>
</div>
</div>
<div class="wrapper-bg">
......@@ -145,7 +151,7 @@
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted, inject } from "vue";
import { ref, reactive, onMounted, inject } from "vue";
import { req } from "../../utils/request";
import { useRoute } from "vue-router";
import { DataInfo, Params } from "./interface";
......@@ -157,6 +163,7 @@ const data = reactive<Partial<DataInfo>>({
medals: ["first", "second", "third"],
storeInfo: {},
});
const amount = ref(6)
const getInfo = async () => {
data.storeInfo = await req(
"scrm.api.shopmall.activity.good.report.param",
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-02-14 14:24:26
* @LastEditTime: 2023-08-07 17:01:14
*/
export interface OrderInfo {
avator: string;
......@@ -19,6 +19,7 @@ export interface StoreInfo {
merchantName?: string;
goodsName?: string;
orderCount?: string;
orderCount2?: string;
name?: string;
department?: string;
avatar?: string;
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-11-16 18:18:59
* @LastEditors: huyue
* @LastEditTime: 2023-06-09 16:29:42
* @LastEditTime: 2023-08-08 14:01:32
*/
export interface ReportData {
time?: string;
......@@ -21,30 +21,33 @@ export interface Params {
orderMoney?: string;
}
export interface WarParams {
yqMerchantId?: number | string;
partnerMerchantId?: number | string;
}
export interface WarDataInfo {
reportInfo: WarReportData
}
export interface WarReportData {
filmTimes?: number;
monthlyOrderMoneyTotal?: number;
monthlyOrderNum?: number;
upgradeTotal?: number;
yesterdayDate?: string;
yesterdayOrderMoneyTotal?: number;
yesterdayOrderNum?: number;
experienceTotal?: number;
upgradeRate?: string;
orderDetailList?: OrderDetail[]
yesterdayDate?: string; // 昨日时间
merchantName?: string; // 商户名称
shopMerchantYesterdayOrderMoneyTotal?: number; // 昨日产值
shopMerchantYesterdayOrderNum?: number; // 昨日升级单
shopMerchantMonthlyOrderMoneyTotal?: number; // 本月产值
shopMerchantMonthlyOrderNum?: number; // 本月升级单
shopMerchantReportList?: ShopDetail[]
}
export interface OrderDetail {
customerName: string;
carTypeName: string;
goodsNameList: Array<string>;
orderMoney: Array<number>;
payDate: string;
export interface ShopDetail {
yesterdayOrderMoneyTotal?: number; // 昨日产值
yesterdayOrderNum?: number; // 昨日升级单
yesterdayNotUpgradeOrderNum?: number; // 昨日战败
dailyAveragePrice?: number; // 昨日客单价
dailyUpgradeRate?: number; // 昨日转化率
monthlyOrderMoneyTotal?: number; // 本月产值
monthlyOrderNum?: number; // 本月升级单
monthlyNotUpgradeOrderNum?: number; // 本月战败
monthAveragePrice?: number; // 本月客单价
monthlyUpgradeRate?: number; // 本月转化率
merchantName?: string; // 商户名称
}
// galdNews
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-03-21 17:10:39
* @LastEditors: huyue
* @LastEditTime: 2023-08-09 15:55:12
-->
<template>
<div class="wrapper-box war-report">
<div class="wrapper-box">
<div class="war-hearder">
<img :src="getImageUrl('war-header')" alt="" />
<img src="../../assets/images/dj/war-header.png" alt="" />
<div class="header-time">
数据生成时间为{{ data.reportInfo!.yesterdayDate }}
{{data.reportInfo!.yesterdayDate}}
</div>
<div class="service-name">{{ data.reportInfo!.merchantName }}</div>
</div>
<div class="war-box">
<div class="order-item">
<div class="order-name">昨日营业额/元</div>
<div class="order-value">
¥{{ data.reportInfo!.yesterdayOrderMoneyTotal || 0 }}
<div class="statics-box">
<div class="statics-total">¥{{ common.numAddSymbol(data.reportInfo!.shopMerchantYesterdayOrderMoneyTotal) }}</div>
<div class="statics-name">昨日产值/元</div>
<div class="statics-list">
<div class="statics-item">
<div class="statics-number">¥{{ common.numAddSymbol(data.reportInfo!.shopMerchantYesterdayOrderNum) }}</div>
<div class="statics-name">昨日升级/单</div>
</div>
</div>
<div class="order-item">
<div class="order-name">昨日单量/单</div>
<div class="order-value">
{{ data.reportInfo!.yesterdayOrderNum || 0 }}
</div>
</div>
<div class="order-item p-d">
<div class="order-name">本月累计营业额/元</div>
<div class="order-value">
¥{{ data.reportInfo!.monthlyOrderMoneyTotal || 0 }}
<div class="statics-item">
<div class="statics-number">¥{{ common.numAddSymbol(data.reportInfo!.shopMerchantMonthlyOrderMoneyTotal) }}</div>
<div class="statics-name">本月产值/元</div>
</div>
</div>
<div class="order-item p-d">
<div class="order-name">本月累计单量/单</div>
<div class="order-value">
{{ data.reportInfo!.monthlyOrderNum || 0 }}
<div class="statics-item">
<div class="statics-number">¥{{ common.numAddSymbol(data.reportInfo!.shopMerchantMonthlyOrderNum) }}</div>
<div class="statics-name">本月升级/单</div>
</div>
</div>
</div>
<div class="war-box transform-box">
<div class="transform-title">
<img :src="getImageUrl('transform-title')" alt="" />
</div>
<div class="funnel">
<img :src="getImageUrl('funnel')" alt="" />
</div>
<div class="funnel-label foil">贴膜台次</div>
<div class="funnel-label experience">体验量</div>
<div class="funnel-label deal">成交量</div>
<div class="funnel-value foil-value">
{{ data.reportInfo!.filmTimes || 0 }}
</div>
<div class="funnel-value experience-value">
{{ data.reportInfo!.experienceTotal || 0 }}
</div>
<div class="funnel-value deal-value">
{{ data.reportInfo!.upgradeTotal || 0 }}
</div>
<div class="order-transform">
<div class="order-value">{{ data.reportInfo!.upgradeRate || 0 }}%</div>
<div class="order-rate">订单转化率</div>
</div>
</div>
<div
class="war-box order-box"
v-if="data.reportInfo!.orderDetailList!.length"
>
<div class="order-title">
<img :src="getImageUrl('order-title')" alt="" />
</div>
<div
class="order-li"
v-for="(item,index) in data.reportInfo!.orderDetailList"
:key="index"
>
<div class="order-info">
<div class="order-user">
<span class="user-name">{{ item.customerName }}</span
><span class="user-brand">{{ item.carTypeName }}</span>
</div>
<div style="white-space: nowrap">{{ item.payDate }}</div>
<div class="store-box">
<div class="store-title">
<img src="../../assets/images/dj/store-title.png" alt="">
<div class="store-legend">
<div class="text yesterday">昨日</div>
<div class="text month">本月</div>
</div>
<div class="order-shop">
<div
class="shop-item"
v-for="(i, idx) in item.goodsNameList"
:key="idx"
>
<div class="shop-name">{{ i }}</div>
<div class="shop-price">¥{{ item.orderMoney[idx] }}</div>
</div>
<div class="title-line"></div>
<div class="store-list" >
<div class="store-item" v-for="(item, index) in data.reportInfo!.shopMerchantReportList" :key="index">
<div class="store-name">
<span class="store-rank">{{ index + 1 }}</span>
{{item.merchantName}}</div>
<div class="store-info">
<div class="store-info-item">
<div class="info-name">产值</div>
<div class="info-yesterday">¥{{ common.numAddSymbol(item.yesterdayOrderMoneyTotal) }}</div>
<div class="info-month">¥{{ common.numAddSymbol(item.monthlyOrderMoneyTotal) }}</div>
</div>
<div class="store-info-item">
<div class="info-name">升级/单</div>
<div class="info-yesterday">{{ common.numAddSymbol(item.yesterdayOrderNum) }}</div>
<div class="info-month">{{ common.numAddSymbol(item.monthlyOrderNum) }}</div>
</div>
<div class="store-info-item">
<div class="info-name">战败/单</div>
<div class="info-yesterday">{{ common.numAddSymbol(item.yesterdayNotUpgradeOrderNum) }}</div>
<div class="info-month">{{ common.numAddSymbol(item.monthlyNotUpgradeOrderNum) }}</div>
</div>
<div class="store-info-item">
<div class="info-name">客单价</div>
<div class="info-yesterday">¥{{ common.numAddSymbol(item.dailyAveragePrice) }}</div>
<div class="info-month">¥{{ common.numAddSymbol(item.monthAveragePrice) }}</div>
</div>
<div class="store-info-item">
<div class="info-name">转化率</div>
<div class="info-yesterday">{{ item.dailyUpgradeRate || 0 }}%</div>
<div class="info-month">{{ item.dailyUpgradeRate || 0 }}%</div>
</div>
</div>
</div>
</div>
</div>
<img class="war-logo" :src="getImageUrl('logo')" alt="" />
<img class="bg-footer" :src="getImageUrl('bg-footer')" alt="" />
<img class="bg-center" :src="getImageUrl('bg-center')" alt="" />
<div class="logo">
<img :src="getImageUrl('logo')" alt="" />
</div>
<img class="icon-money" src="../../assets/images/dj/icon-money.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 { WarParams, WarDataInfo, OrderDetail } from "./interface";
import common from "../../utils/common"
import { WarParams, WarDataInfo } from "./interface";
const route = useRoute();
// 获取全局对象
const global: any = inject("global");
let query: WarParams = {};
const data = reactive<Partial<WarDataInfo>>({
reportInfo: {
orderDetailList: [],
shopMerchantReportList: [],
},
});
const getInfo = async () => {
data.reportInfo = await djReq(
"dj.api.smartcarlife.orderSummary.getYqMerchantOrderReport",
"dj.api.smartcarlife.orderSummary.partner.merchant.report",
query
);
};
......@@ -116,6 +107,21 @@ const getImageUrl = (name: any, path = "dj") => {
return new URL(`./${path}/${name}.png?v=${global.version}`, global.$imgUrl)
.href;
};
var isSupportFontFamily = function (f) { if (typeof f != "string") { return false } var h = "Arial"; if (f.toLowerCase() == h.toLowerCase()) { return true } var e = "a"; var d = 100; var a = 100, i = 100; var c = document.createElement("canvas"); var b = c.getContext("2d"); c.width = a; c.height = i; b.textAlign = "center"; b.fillStyle = "black"; b.textBaseline = "middle"; var g = function (j) { b.clearRect(0, 0, a, i); b.font = d + "px " + j + ", " + h; b.fillText(e, a / 2, i / 2); var k = b.getImageData(0, 0, a, i).data; return [].slice.call(k).filter(function (l) { return l != 0 }) }; return g(h).join("") !== g(f).join("") };
let hasFonts = reactive({
font1: false,
font2: false,
font3: false,
font4: false,
font5: false,
font6: false
})
hasFonts.font1 = isSupportFontFamily('狮尾B2加糖宋体')
hasFonts.font2 = isSupportFontFamily('Swei B2 Sugar CJK SC')
hasFonts.font3 = isSupportFontFamily('獅尾B2加糖宋體SC')
hasFonts.font4 = isSupportFontFamily('獅尾B2加糖宋體SC-Regular')
hasFonts.font5 = isSupportFontFamily('Microsoft YaHei')
hasFonts.font6 = isSupportFontFamily('Microsoft YaHei Light')
onMounted(() => {
if (route.query) {
query = route.query;
......@@ -124,5 +130,5 @@ onMounted(() => {
});
</script>
<style lang="scss" scoped>
@import "src/assets/styles/dj.scss";
@import "src/assets/styles/dj/warReport.scss";
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-10 15:26:23
* @LastEditors: huyue
* @LastEditTime: 2023-05-24 15:07:55
* @LastEditTime: 2023-08-15 15:24:34
-->
<template>
<div class="wrapper-good equity-box">
......@@ -71,6 +71,15 @@
<div class="order-value"><span>{{data.newInfo!.monthTurnover?.toLocaleString()}}</span><span class="order-unit">元</span></div>
</div>
</div>
<div class="goods">
<div class="goods-title"><span>升级商品</span></div>
<div class="goods-list">
<div class="goods-item" v-for="(item, index) in data.newInfo!.goodsInfoDTOList" :key="index">
<div class="goods-name">{{ item.goodsName.toLocaleString() }}</div>
<div class="goods-price">{{ item.goodsPrice.toLocaleString() }}<span class="goods-unit">元</span></div>
</div>
</div>
</div>
</div>
</div>
<img class="icon-bottom" :src="getImageUrl('icon-bottom')" alt="" />
......@@ -82,6 +91,7 @@
import { reactive, onMounted, inject } from "vue";
import { djReq } from "../../utils/request";
import { useRoute } from "vue-router";
import common from "../../utils/common"
import { DataInfo, Params } from "./interface/goodNew";
const route = useRoute();
......@@ -90,7 +100,9 @@ const global: any = inject("global");
let query: Params = {};
const data = reactive<Partial<DataInfo>>({
newInfo: {},
newInfo: {
goodsInfoDTOList: []
},
});
const getInfo = async () => {
......
......@@ -31,4 +31,10 @@ export interface NewsData {
referrerWeChatAvatar?: string;
referrer?: string;
reportName?: string;
}
\ No newline at end of file
goodsInfoDTOList: GoodsInfo[];
}
interface GoodsInfo {
goodsName: string;
goodsPrice: number;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!