Commit 9a47f6af by 胡悦

Merge branch 'SAAS+V4.55.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.55.0

2 parents c018a133 4f1beab4

2.61 MB | W: | H:

2.41 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

120 KB | W: | H:

50.3 KB | W: | H:

assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
assets/spritesmith/customer-1.png
  • 2-up
  • Swipe
  • Onion skin

165 KB | W: | H:

121 KB | W: | H:

assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
assets/spritesmith/customer-2.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<uni-popup
ref="customer"
ref="centerPopupRef"
type="center"
:is-mask-click="false"
animation
class="customerPopup"
class="center-popup"
>
<view class="box">
<view class="title flex">
<view class="text">请选择当前洽谈的客户类型</view>
<view class="text">{{title}}</view>
<view
class="icon-close-box flex"
@click="close"
......@@ -22,13 +22,19 @@
</view>
</view>
<view class="content flex">
<template v-for="(i,index) in typeList">
<template v-for="(i,index) in list">
<view
class="item flex"
:key="index"
@click="choose(index)"
>
<view :class="['sprite-icon',i.icon]"></view>
<template v-if="tag && i.id == id">
<view class="tag flex">{{tag}}</view>
</template>
<view
:class="['sprite-icon',i.icon]"
:style="{zoom: i.zoom || 1}"
></view>
<view class="item-title">{{i.title}}</view>
<text class="item-describe">{{i.describe}}</text>
</view>
......@@ -41,35 +47,31 @@
<script type='text/ecmascript-6'>
export default {
name: 'CustomerType',
name: 'CenterPopup',
props: {
list: Array,
title: String,
tag: String,
id: [Number, String]
},
data () {
return {
typeList: [
{
title: '回店客户',
describe: '客户已领精品券且已上牌完成\n交付安排客户当日回店提车',
icon: 'icon-customer-1'
}, {
title: '现场客户',
describe: '客户未领取精品券\n首次到店',
icon: 'icon-customer-2'
}
]
}
},
mounted () {
},
methods: {
open () {
this.$refs.customer.open();
this.$refs.centerPopupRef.open();
},
close () {
this.$refs.customer.close();
this.$refs.centerPopupRef.close();
this.$emit('cancel')
},
choose: uni.$throttle(function (index) {
this.$emit('choose', index)
this.$refs.customer.close();
this.$refs.centerPopupRef.close();
}, 200)
}
......@@ -77,18 +79,18 @@ export default {
</script>
<style scoped lang='scss'>
.customerPopup {
.center-popup {
z-index: 99 !important;
}
.box {
width: toRpx(1920);
height: toRpx(1120);
width: toRpx(1400);
height: toRpx(928);
background: #ffffff;
border-radius: toRpx(48);
.title {
width: 100%;
height: toRpx(160);
background-image: url("@/assets/images/boutique/customer-type-bg.webp");
background: url('@/assets/images/boutique/customer-type-bg.webp') no-repeat;
background-size: 100%;
position: relative;
.text {
......@@ -119,25 +121,38 @@ export default {
border-radius: toRpx(48);
flex-direction: column;
box-sizing: border-box;
padding-top: toRpx(112);
padding-top: toRpx(92);
position: relative;
&::before,
&::after {
content: "";
overflow: hidden;
.tag {
position: absolute;
width: 192rpx;
height: 72rpx;
border-radius: 0 0 toRpx(48) 0;
background: #4673ff1a;
left: 0;
width: 100%;
background: #edf5ff;
filter: blur(toRpx(40));
}
&::before {
top: 0;
height: toRpx(62);
}
&::after {
bottom: 0;
height: toRpx(126);
color: #4673ff;
font-size: 28rpx;
justify-content: center;
}
// &::before,
// &::after {
// content: '';
// position: absolute;
// left: 0;
// width: 100%;
// background: #edf5ff;
// filter: blur(toRpx(40));
// }
// &::before {
// top: 0;
// height: toRpx(62);
// }
// &::after {
// bottom: 0;
// height: toRpx(126);
// }
&-title {
font-weight: 500;
font-size: toRpx(40);
......
......@@ -49,7 +49,10 @@
></view>
</view> -->
<template v-if="showSceneChange">
<view class="btn">
<view
class="btn"
@click="$refs.sceneTypeRef.open()"
>
<view class="sprite-icon icon-scene-change"></view>
</view>
</template>
......@@ -73,6 +76,14 @@
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
<center-popup
:list="sceneTypeList"
ref="sceneTypeRef"
@choose="chooseSceneType"
title="选择场景"
tag="当前场景"
:id="userInfo.sceneType"
/>
</view>
</template>
......@@ -81,8 +92,9 @@ import KfBox from "./KfBox";
import MessagePop from "./MessagePop"
import SettingBox from "./SettingBox";
import utils from '@/utils/utils'
import CenterPopup from '@/components/CenterPopup.vue'
export default {
components: { KfBox, SettingBox, MessagePop },
components: { KfBox, SettingBox, MessagePop, CenterPopup },
props: {
tabIndex: Number,
userInfo: Object
......@@ -125,7 +137,22 @@ export default {
collectTrack: false,
hasPerson: false,
messageType: 'study',
sopCount: 0
sopCount: 0,
sceneTypeList: Object.freeze([
{
title: '轻改',
describe: '太阳膜升级转化',
icon: 'icon-scene-1',
zoom: 2.91,
id: 1
}, {
title: '会员权益/升级',
describe: '权益延保',
icon: 'icon-scene-0',
zoom: 2.91,
id: 0
}
])
}
},
watch: {
......@@ -366,6 +393,22 @@ export default {
this.$emit('update:tabIndex', 99)
}
},
chooseSceneType (index) {
let { userInfo, sceneTypeList } = this
userInfo.sceneType = sceneTypeList[index].id
uni.showLoading({
title: '切换中',
mask: true
})
uni.$storage.set('userInfo', userInfo)
let url = {
1: '/pages/boutique/index',
0: '/pages/equity/index'
}[userInfo.sceneType]
uni.reLaunch({
url
})
}
},
beforeCreate () {
clearInterval(this.trackInterval)
......
......@@ -24,7 +24,10 @@ export default {
type: Object,
default: () => { }
},
dataShow: Boolean
dataShow: {
type: Boolean,
default: true
}
},
name: '',
data () {
......@@ -68,8 +71,8 @@ export default {
font-size: 20rpx;
box-sizing: border-box;
flex-direction: column;
.num{
transition: all .15s;
.num {
transition: all 0.15s;
}
}
.deliveries,
......
......@@ -22,9 +22,25 @@ export default {
components: {
PageTabs
},
props: {
dataShow: {
type: Boolean,
default: true
}
},
watch: {
dataShow: {
immediate: true,
handler (newval) {
console.log(123)
this.getServerData()
}
}
},
name: '',
data () {
return {
tabIndex: 0,
tabList: ['本月转化率', '本月客单价'],
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
......@@ -32,7 +48,7 @@ export default {
fontColor: '#333',
fontSize: 10,
color: ["#2C66F7"],
padding: [9, 80, 0, 0],
padding: [20, 80, 0, 0],
enableScroll: false,
legend: {
show: false
......@@ -48,13 +64,11 @@ export default {
bar: {
type: "group",
width: 6,
customColor: ['#389FFF', '#2C66F7'],
barColorList: [
['#389FFF', '#2C66F7'],
['#708DFF', '#6858F5'],
['#94CBFF', '#3283FB']
],
barBorderRadius: [0, 2, 2, 0],
linearType: 'custom',
barBorderCircle: true,
}
......@@ -63,34 +77,34 @@ export default {
}
},
mounted () {
this.getServerData();
},
methods: {
getServerData () {
//模拟从服务器获取数据时的延时
setTimeout(() => {
let { dataShow, tabIndex } = this,
series = {
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data: [11370, 12370, 10001],
}
if (tabIndex == 0) series.afterUnit = '%'
else series.beforeUnit = '¥'
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
categories: ['优秀门店均值', '本门店', '个人'],
series: [
{
textSize: 14,
textColor: '#333',
data: [11370, 12370, 10001],
beforeUnit: '¥',
formatter (value) {
return `¥${value}`
}
}
],
series: [series],
}
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
}, 100);
},
changeTab (index) {
this.tabIndex = index
this.getServerData()
}
}
}
......@@ -106,7 +120,7 @@ export default {
height: 64rpx;
}
.canvas {
height: 210rpx;
height: 260rpx;
}
}
</style>
\ No newline at end of file
<template>
<view class="output-value-box"></view>
<view class="output-value-box">
<view class="output-value-title">本月产值</view>
<view class="output-value">
<view class="value">
{{formattedNumber('sumOutput')}}<view class="unit">万</view>
</view>
<view class="sub-value flex">
个人产值<view class="num">{{formattedNumber('output')}}万</view>
</view>
</view>
<view class="output-canvas">
<qiun-data-charts
type="arcbar"
:opts="opts"
:chartData="chartData"
/>
</view>
<view class="output-view flex">
<view class="item flex">目标<view class="num">{{formattedNumber('target')}}万</view>
</view>
<view class="item flex">达成比例<view class="num">{{formattedNumber('proportion','%')}}</view>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
export default {
name: '',
props: {
pageData: {
type: Object,
default: () => { }
},
mounted () {
dataShow: {
type: Boolean,
default: true
}
},
watch: {
dataShow: {
immediate: true,
handler (newval) {
this.getServerData()
}
}
},
data () {
return {
chartData: {},
opts: {
padding: undefined,
title: {
name: "产值贡献",
fontSize: 12,
color: "#333"
},
subtitle: {
name: "52%",
fontSize: 14,
color: "#4673FF"
},
extra: {
arcbar: {
type: "circle",
width: 11,
backgroundColor: "#4673ff1a",
startAngle: 1.5,
endAngle: 0.25,
gap: 2,
linearType: 'custom',
customColor: ['#2C66F7', '#389FFF']
}
}
}
}
},
mounted () {
},
methods: {
getServerData () {
//模拟从服务器获取数据时的延时
setTimeout(() => {
let { dataShow } = this
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
let res = {
series: [
{
hideData: !dataShow,
data: 0.52
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 100);
},
methods: {
formattedNumber (key, unit) {
let { dataShow, pageData } = this,
num = pageData[key]
if (unit && num) num += unit
if (!dataShow || !num) num = '--'
return num
}
}
}
</script>
<style scoped lang='scss'>
.output-value-box{
.output-value-box {
height: toRpx(366);
position: relative;
.output-value-title {
font-size: toRpx(28);
font-weight: 500;
padding: toRpx(24) toRpx(32) 0;
}
.output-value {
padding: 54rpx 0 0 52rpx;
.value {
display: flex;
align-items: baseline;
color: #4673ff;
font-size: 40rpx;
line-height: 48rpx;
font-weight: 700;
margin-bottom: 14rpx;
.unit {
color: #333333;
font-size: 26rpx;
font-weight: 400;
margin-left: 4rpx;
line-height: 36rpx;
}
}
.sub-value {
color: #333333;
font-size: 24rpx;
.num {
color: #4673ff;
font-size: 28rpx;
font-weight: 700;
margin-left: 8rpx;
}
}
}
.output-canvas {
position: absolute;
right: 40rpx;
top: 60rpx;
width: 200rpx;
height: 200rpx;
}
.output-view {
position: absolute;
left: 50%;
bottom: 32rpx;
transform: translateX(-50%);
width: 528rpx;
height: 58rpx;
border-radius: 450rpx;
background: #4673ff0d;
color: #333333;
font-size: 24rpx;
&::after {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
content: '';
width: 2rpx;
height: 28rpx;
background: #cfd4e3;
}
.item {
justify-content: center;
width: 50%;
flex-shrink: 0;
.num {
margin-left: 8rpx;
color: #4673ff;
font-size: 28rpx;
font-weight: 700;
}
}
}
}
</style>
\ No newline at end of file
......@@ -43,6 +43,11 @@
{{item.orderFinishFlag? '成交': '战败'}}
</view>
</template>
<template v-else>
<view :class="['status flex disabled']">
{{isPrePage? '待提交': '待上传'}}
</view>
</template>
<view class="name">
{{ item.customerName ? item.customerName : '未填写姓名' }}
</view>
......@@ -94,7 +99,7 @@ export default {
return {
tabList: Object.freeze([
{ text: '已提交' },
{ text: '未提交' },
{ text: '未提交', dot: () => this.preRecordFailList.length },
]),
orderTypeList: Object.freeze([
{ label: '战败' },
......
......@@ -28,10 +28,13 @@
/>
</view>
<view class="linebar-box box">
<line-bar />
<line-bar :dataShow="dataShow" />
</view>
<view class="box">
<output-value />
<output-value
:dataShow="dataShow"
:pageData="pageData"
/>
</view>
</view>
<view class="right box-class">
......@@ -136,7 +139,11 @@ export default {
pageData: {
deliveries: 1000000,
touchpoints: 100000,
touchpointRate: 1000.6
touchpointRate: 1000.6,
sumOutput: 188.88,
output: 88.88,
target: 2008,
proportion: 9
}
}
},
......
......@@ -11,6 +11,9 @@
}"
>
{{ i[tabKey] || i }}
<template v-if="i.dot && i.dot()">
<view class="dot"></view>
</template>
</view>
</template>
<view
......@@ -102,6 +105,15 @@ export default {
font-size: toRpx(28);
z-index: 10;
position: relative;
.dot {
position: absolute;
top: 4rpx;
right: 28rpx;
width: 12rpx;
height: 12rpx;
border-radius: 100%;
background: #f24724;
}
}
.active {
color: #333333;
......@@ -115,11 +127,5 @@ export default {
transition: all 0.15s;
border-radius: toRpx(16);
}
// .active-btn-0 {
// left: toRpx(4);
// }
// .active-btn-1 {
// left: toRpx(196);
// }
}
</style>
\ No newline at end of file
<template>
<view class="swiper-box">
<view
<movable-area
class="swiper-carousel"
@touchstart="starts"
@touchend="ends"
>
<template v-for="(item,index) in imagelist">
<view
<movable-view
:key="index"
class="carousel-block"
:class="['carousel-block',item.class]"
@click.stop="changeBlock(item)"
:style="{
left:item.left,
top:item.top,
zIndex:item.zIndex,
width:item.width,
height:item.height,
transition:item.transition+'s all',
}"
direction="horizontal"
@change="change"
:disabled="item.class != 'block-center'"
:x="item.class != 'block-center' ? 0 : viewX"
>
<image
class="image-block"
......@@ -31,9 +27,9 @@
color="#909399"
></uni-icons>
</view>
</view>
</movable-view>
</template>
</view>
</movable-area>
<view class="module-title flex">
{{moduleTitle}}
<view class="module-dots flex">
......@@ -49,6 +45,8 @@
</view>
</template>
<script>
import utils from "@/utils/utils.js";
export default {
name: 'SwiperComponent',
props: {
......@@ -113,10 +111,12 @@ export default {
endTimer: null,
playStatus: true,
style_object: Object.freeze([
{ index: 0, left: '150rpx', top: '68rpx', height: '306rpx', width: '468rpx', zIndex: 15, transition: 0.1 },
{ index: 1, left: '294rpx', top: '16rpx', height: '408rpx', width: '624rpx', zIndex: 20, transition: 0.3 },
{ index: 2, left: '592rpx', top: '68rpx', height: '306rpx', width: '468rpx', zIndex: 15, transition: 0.1 }
])
{ index: 0, class: 'block-left' },
{ index: 1, class: 'block-center' },
{ index: 2, class: 'block-right' }
]),
blockX: 0,
viewX: 0
}
},
beforeDestroy () {
......@@ -150,8 +150,7 @@ export default {
item.isIndex = dataIndex
item.isToor = index
item.imgKey = datalist[dataIndex]?.[this.imgKey] || ''
item.scale = 1
item.translateX = 0
item.x = 10
})
if (autoplay) this.autoPlayFunction()
},
......@@ -187,17 +186,8 @@ export default {
(item.isToor - 1) < 0 ? imagelist.length - 1 : item.isToor - 1
: (item.isToor + 1) > imagelist.length - 1 ? 0 : item.isToor + 1
item.isToor = toor
const style = list[toor]
Object.assign(item, {
transition: style.transition,
left: style.left,
top: style.top,
width: style.width,
height: style.height,
zIndex: style.zIndex,
scale: 1,
translateX: 0
})
item.class = list[toor].class
item.x = 0
if (item.index == index) {
let isIndex = item.isIndex + 3
if (isIndex == len + 3) isIndex = 2
......@@ -221,32 +211,43 @@ export default {
this.ismove = e.touches[0].pageX
this.playStatus = false
if (this.endTimer) {
clearInterval(this.endTimer)
this.endTimer = null
clearTimeout(this.endTimer);
this.endTimer = null;
return;
}
},
ends (e) {
let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX
let nums = this.ismove - pageX
if (nums > 50) this.updateCarouselPositions()
if (nums < -50) this.updateCarouselPositions('right')
if (this.endTimer) {
clearInterval(this.endTimer)
this.endTimer = null
return
let nums = ismove - pageX
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10
setTimeout(() => {
this.viewX = 0
}, 16)
}
if (nums > 50 || blockX < -30) this.updateCarouselPositions()
if (nums < -50 || blockX > 30) this.updateCarouselPositions('right')
this.endTimer = setTimeout(() => {
this.playStatus = true
this.autoPlayFunction()
if (!this.playStatus) {
this.playStatus = true
this.autoPlayFunction()
}
}, this.interval)
},
change: utils.throttle(function (e, item) {
let { x } = e.detail
this.blockX = x
}, 16)
}
}
</script>
<style lang="scss" scoped>
.swiper-carousel {
width: 100%;
height: 428rpx;
height: toRpx(428);
position: relative;
overflow: hidden;
.carousel-block {
......@@ -255,9 +256,9 @@ export default {
overflow: hidden;
box-shadow: 0 0 5px #0000001a;
transition: all 0.2s ease; /* 添加过渡 */
border: 1.5rpx solid #ffffffb3;
box-shadow: 0 3rpx 12rpx 0 #5294ff33;
border-radius: 24rpx;
border: toRpx(2) solid #ffffffb3;
box-shadow: 0 toRpx(3) toRpx(12) 0 #5294ff33;
border-radius: toRpx(24);
.image-block {
position: absolute;
left: 0;
......@@ -279,28 +280,52 @@ export default {
justify-content: center;
z-index: 1;
}
.hide {
opacity: 0;
}
}
.block-left,
.block-right {
top: toRpx(68);
height: toRpx(306);
width: toRpx(468);
z-index: 15;
transition: all 0.1s;
}
.block-left {
left: toRpx(150);
}
.block-right {
left: toRpx(592);
}
.block-center {
left: toRpx(294);
top: toRpx(16);
height: toRpx(408);
width: toRpx(624);
z-index: 20;
transition: all 0.3s;
}
}
.module-title {
color: #333333;
font-size: 24rpx;
margin-top: 24rpx;
font-size: toRpx(24);
margin-top: toRpx(24);
justify-content: center;
position: relative;
.module-dots {
position: absolute;
top: 50%;
right: 48rpx;
right: toRpx(48);
transform: translateY(-50%);
gap: 12rpx;
gap: toRpx(12);
.dot {
width: 12rpx;
height: 12rpx;
width: toRpx(12);
height: toRpx(12);
opacity: 1;
background: #0007400d;
border-radius: 100%;
}
.active {
background: #fff;
......
......@@ -29,9 +29,11 @@
/>
</template>
<template slot="content">
<customer-type
<center-popup
:list="typeList"
ref="customerTypeRef"
@choose="chooseCustomerType"
title="请选择当前洽谈的客户类型"
/>
</template>
</home-frame>
......@@ -40,7 +42,7 @@
<script type="text/ecmascript-6">
import HomeFrame from '@/components/HomeFrame/index.vue'
import detail from './detail.vue'
import CustomerType from './components/CustomerType.vue';
import CenterPopup from '@/components/CenterPopup.vue'
import { mapMutations } from "vuex";
const defaultConfig = [
{
......@@ -66,7 +68,7 @@ const defaultConfig = [
}
]
export default {
components: { HomeFrame, detail, CustomerType },
components: { HomeFrame, detail, CenterPopup },
name: 'boutique',
data () {
return {
......@@ -85,7 +87,18 @@ export default {
previewOff: false,
mediaConfigList: [],
bannerTabId: 'car-banner-0',
defaultCarId: ''
defaultCarId: '',
typeList: Object.freeze([
{
title: '回店客户',
describe: '客户已领精品券且已上牌完成\n交付安排客户当日回店提车',
icon: 'icon-customer-1'
}, {
title: '现场客户',
describe: '客户未领取精品券\n首次到店',
icon: 'icon-customer-2'
}
])
}
},
onBackPress (options) {
......@@ -367,7 +380,7 @@ export default {
const { moduleList } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId: merchantId } = userInfo,
{notInvitedCount} = await uni.$api.boutiqueApi.getInviteRecordCount({
{ notInvitedCount } = await uni.$api.boutiqueApi.getInviteRecordCount({
merchantIds: [merchantId]
})
moduleList.map(e => {
......
......@@ -2224,6 +2224,7 @@ function drawActivePoint (points, color, shape, context, opts, option, seriesInd
}
function drawRingTitle (opts, config, context, center) {
let [series] = opts.series
var titlefontSize = opts.title.fontSize || config.titleFontSize;
var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
var title = opts.title.name || '';
......@@ -2234,6 +2235,7 @@ function drawRingTitle (opts, config, context, center) {
var subtitleHeight = subtitle ? subtitlefontSize : 0;
var margin = 5;
if (subtitle) {
if(series.hideData) subtitle = '--'
var textWidth = measureText(subtitle, subtitlefontSize * opts.pix, context);
var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0) * opts.pix;
var startY = center.y + subtitlefontSize * opts.pix / 2 + (opts.subtitle.offsetY || 0) * opts.pix;
......@@ -2398,6 +2400,7 @@ function drawBarPointText (points, series, config, context, opts) {
var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value;
if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}`
if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}`
if(series.hideData) formatVal = '--'
context.setTextAlign('left');
context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
context.closePath();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!