Commit d10528f7 by 前端

Merge branch 'develop' into 'master'

V4.27.0 0831上线后,代码合并。

See merge request !37
2 parents 46f1f4d6 fb9facad
Showing 154 changed files with 3799 additions and 169 deletions
......@@ -79,11 +79,15 @@ class outputApi {
/** 查询门店权益订单数据统计-车险升级活动产值 */
getEquityRevenue(data) {
return api.post({
// method: 'scrm.api.busassistant.merchant.equity.statistics',
method: 'dj.api.smartcarlife.vd.quotation.merchant.statistics',
...data
}, false, 'dj')
return api.post(
{
// method: 'scrm.api.busassistant.merchant.equity.statistics',
method: 'dj.api.smartcarlife.vd.quotation.merchant.statistics',
...data
},
false,
'dj'
)
}
/** 店面汇总-下载海报 */
......@@ -166,5 +170,30 @@ class outputApi {
...data
})
}
/** 业务数据指标分析诊断-趋势分析 */
analysisTendency(data) {
return api.post({ method: 'dj.api.smartcarlife.data.analysis.tendency', ...data }, false, 'dj')
}
/** 业务数据指标分析诊断-营收概要 */
analysisOverview(data) {
return api.post({ method: 'dj.api.smartcarlife.data.analysis.overview', ...data }, false, 'dj')
}
/** 业务数据指标分析诊断-营收概要 权益会员*/
analysisOverviewVdquotation(data) {
return api.post({ method: 'dj.api.smartcarlife.data.analysis.Vdquotation.overview', ...data }, false, 'dj')
}
/** 业务数据指标分析诊断-趋势分析 权益会员*/
analysisTendencyVdquotation(data) {
return api.post({ method: 'dj.api.smartcarlife.data.Vdquotation.analysis.tendency', ...data }, false, 'dj')
}
/** 业务数据指标分析诊断-流量情况*/
analysisInviteRecord(data) {
return api.post({ method: 'dj.api.smartcarlife.data.analysis.inviteRecord.count', ...data }, false, 'dj')
}
/** 业务数据指标分析诊断-无效流量(战败订单)*/
analysisNotUpgradePage(data) {
return api.post({ method: 'dj.api.smartcarlife.data.analysis.notUpgrade.page', ...data }, false, 'dj')
}
}
export default outputApi
import outputValueApi from './outputValue.js'
export default new outputValueApi()
import api from '~/utils/request/request'
class outputValueApi {
/** 我的员工分页 */
GETSTAFFLISTAPI(data) {
return api.post({
method: 'scrm.api.busassistant.outputValue.staff.list',
...data
})
}
/** 员工列表(仅员工信息筛选用) */
GETALLSTAFFDATAAPI(data) {
return api.post({
method: 'scrm.api.busassistant.staff.list',
...data
})
}
/** 获取服务商(生意助手看产值)全场景我的门店数据 */
getAllSceneList(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchantTotal.allSceneShopList',
...data
})
}
/** 获取服务商(生意助手看产值)我的门店页总累计产值 */
getMerchantTotal(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchantTotal.getMerchantTotal',
...data
})
}
/** 获取服务商(生意助手看产值)指定场景我的门店数据 */
getQuerySceneList(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchantTotal.querySceneShopList',
...data
})
}
}
export default outputValueApi
......@@ -39,6 +39,8 @@ import './utils/network'
import { getDiscoverList } from '~/api/index.js'
import {Version} from 'glsx-common-sdk'
App({
onLaunch(options) {
/**挂载到wx对象 */
......@@ -49,7 +51,12 @@ App({
wx.$router = router
wx.$storage = $Storage /** 挂载全局缓存方法 */
wx.$eventbus = eventbus
wx.$versionConfig = new Version({
request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
isSign: false
}
})
// 存储设备信息
setSystem_info()
// console.log('test')
......@@ -65,7 +72,21 @@ App({
})
})
},
async getVersionInfo(request) {
if (request) this.globalData.versionData = null
const {
versionData
} = this.globalData
if (versionData) return versionData
else {
const res = await wx.$versionConfig.get({
moduleUrl: 'business-assistant',
env: 'update'
})
this.globalData.versionData = res
return res
}
},
onShow(options) {
getUpdateManager()
},
......@@ -73,5 +94,8 @@ App({
onPageNotFound(e) {
wx.$router.goHome()
},
onHide() {}
onHide() {},
globalData: {
versionData: null
},
})
......@@ -3,6 +3,7 @@
"login/loading/loading",
"pages/tab/index/index",
"pages/tab/output/output",
"pages/tab/outputValue/outputValue",
"pages/tab/mine/mine",
"pages/webView/webView",
"login/index/index",
......@@ -37,7 +38,7 @@
"selectedIconPath": "images/home_active.png"
},
{
"pagePath": "pages/tab/output/output",
"pagePath": "pages/tab/outputValue/outputValue",
"text": "看产值",
"iconPath": "images/output.png",
"selectedIconPath": "images/output_active.png"
......@@ -65,7 +66,8 @@
"name": "packageOutput",
"pages": [
"pages/openBusiness",
"pages/summary"
"pages/summary",
"pages/newSummary/newSummary"
]
},
{
......@@ -98,7 +100,8 @@
"customerManagement/customerList/customerList",
"customerManagement/editCustomer/editCustomer",
"customerManagement/saleList/saleList",
"customerManagement/technicianList/technicianList"
"customerManagement/technicianList/technicianList",
"log/log"
]
}
],
......
......@@ -13,6 +13,14 @@
font-family: "number";
src: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/font/subset-AlimamaShuHeiTi-Bold.woff");
}
@font-face {
font-family: "ali-medium";
src: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/font/subset-AlibabaPuHuiTi-Medium.woff");
}
@font-face {
font-family: "ali-bold";
src: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/font/subset-AlibabaPuHuiTi-Bold.woff");
}
page {
......@@ -24,10 +32,13 @@ page {
--borderRadius: 8rpx;
--margin: 32rpx;
/* vant 样式覆盖 */
--tabs-bottom-bar-color:#3666FE;
--sidebar-selected-border-color:#3666FE;
--tree-select-nav-background-color:#f6f6f6;
--tabs-bottom-bar-color: #3666FE;
--sidebar-selected-border-color: #3666FE;
--tree-select-nav-background-color: #f6f6f6;
/* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
/* 兼容 IOS>11.2 */
--envSafeAreaInsetBottom: env(safe-area-inset-bottom);
}
image {
......
// components/Calendar/Calendar.js
import Calendar from './Calendar_Function'
import _component_ from './Static_Properties'
const CalendarFunction = Symbol('CalendarFunction')
Component({
/**
* 组件的属性列表
*/
properties: _component_.properties,
/**
* 组件的初始数据
*/
data: _component_.data,
/**
* 组件的方法列表
*/
methods: {
noScroll() {},
setCalenderBodyHeight() {
this[CalendarFunction].setCalenderBodyHeight()
},
showCalendar(e) {
let type = (e && e.currentTarget && e.currentTarget.dataset.type) || ''
let result = type === 'show'
if (!result) {
this.setData({
hideCalendar: true
})
setTimeout(() => {
this.setData({
show: result,
hideCalendar: false
})
}, 300)
} else {
this.setData({
show: result
})
if (!this.data.calenderBodyHeight) this[CalendarFunction].setCalenderBodyHeight()
}
this.triggerEvent('tapCalendar')
},
dateChange(e) {
let { current, source } = e.detail
let {dayType} = this.data
// console.log(source)
// console.log(current)
/**
* 根据官方 source 来进行判断swiper的change事件是通过什么来触发的,autoplay是自动轮播。
* touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的,所以做了限制
* 只有在自动轮播和用户主动触发才去改变current值,达到规避了抖动bug
*/
source == 'touch' &&
this.setData({
// current
[dayType?'current':'yearCurrent']:current
})
},
bindDateChange: function (e) {
var date = e.detail.value
console.log(date)
this.setData({
date: date
})
this.post_data.year = date
this.renderHtml()
},
choose(e) {
let { dateType, minDate, maxDate } = this.data
let { data } = e.currentTarget.dataset
// console.log((minDate && Date.parse(minDate) > Date.parse(data)) || (maxDate && Date.parse(maxDate) < Date.parse(data)))
console.log(minDate && Date.parse(minDate) > Date.parse(data))
console.log(maxDate && Date.parse(maxDate) < Date.parse(data))
if ((minDate && Date.parse(minDate) > Date.parse(data)) || (maxDate && Date.parse(maxDate) < Date.parse(data))) return
this[CalendarFunction][dateType](e)
},
monChoose(e) {
let { data, type } = e.currentTarget.dataset
if (data.disable) return false
this[CalendarFunction][type](e)
},
done() {
let { dateType } = this.data
this[CalendarFunction].done(dateType)
},
changeDate(e) {
let { value } = e.detail
console.log(value)
this.setData({
current: value
})
},
bindYearChange(e) {
let { value } = e.detail
this.setData({
yearCurrent: value
})
},
showShortcutPicker() {
this.setData({
showShortcut: !this.data.showShortcut
})
},
showShortcutPickerYear() {
this.setData({
showShortcutYear: !this.data.showShortcutYear
})
},
chooseAll() {
this[CalendarFunction].chooseAll()
},
changeModel() {
let { dayType } = this.data
this.setData({
dayType: dayType == 0 ? 1 : 0
})
}
},
ready() {
// console.log(this)
// return
this[CalendarFunction] = new Calendar(this)
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='calender-picker' bindtap="showCalendar" data-type='show'>
<slot />
</view>
<!-- 弹框模式 -->
<!-- 先取消 -->
<view class='calender-box' hidden='{{!show}}' catchtouchmove="noScroll">
<view class='calender-bg' bindtap="showCalendar" />
<view class='calender-view {{hasRadius}} {{hideCalendar?"hideCalendar":""}} {{(isFullSucreen&&!showConfirm)?"isFullSucreen":""}} ' style="height:{{height}};">
<!-- 按日期选择 开始 -->
<view class='calender-header'>
<view class='calender-title' wx:if='{{showTitle}}'>
<!-- <block wx:if="{{rangeAll && dateType == 'range'}}"> -->
<!-- bindtap="chooseAll" -->
<view wx:if="{{isChangeType}}" class="calender-all" style="color:{{calenderColor}};" bindtap="changeModel">
{{dateObj['tips'][dayType]}}
</view>
<!-- </block> -->
{{title||'日期选择'}}
<view class='calender-close' bindtap="showCalendar">
<image src="./images/close.png" class='calender-close-image' />
</view>
</view>
<block wx:if='{{showSubTitle}}'>
<!-- <block hidden="{{!dayType}}"> -->
<picker class='calender-subtitle' bindchange="changeDate" bindcancel='showShortcutPicker' value="{{current}}" range="{{dateList}}" wx:if='{{shortcut&&dayType}}'>
<view class='calender-subtitle-text' bindtap="showShortcutPicker">
{{dateList[current]}}
<view class='arrow {{showShortcut}}' />
</view>
</picker>
<picker class='calender-subtitle' value="{{yearCurrent}}" bindcancel='showShortcutPickerYear' range="{{monPickList}}" wx:elif='{{shortcut&&!dayType}}' bindchange="bindYearChange">
<view class='calender-subtitle-text' bindtap="showShortcutPickerYear`">
{{monPickList[yearCurrent]}}
<view class='arrow {{showShortcutYear}}' />
</view>
</picker>
<view class='calender-subtitle' wx:else>{{monPickList[current]}}</view>
<!-- </block> -->
<!-- <block hidden="{{dayType}}"> -->
<!-- </block> -->
</block>
<view class='calendar-weekdays' hidden="{{!dayType}}">
<block wx:for='{{weekdays}}' wx:key='index'>
<view class='calendar-weekday'>{{item}}</view>
</block>
</view>
</view>
<view class='calender-body' style="height:calc(100% - {{calenderBodyHeight}})">
<!-- 日期 -->
<swiper hidden="{{!dayType}}" class='calender-swiper' bindchange='dateChange' current='{{current}}' vertical='{{vertical}}'>
<block wx:for='{{monthList}}' wx:key='index'>
<swiper-item>
<view class='calender-mark box-center' wx:if="{{!hideMark}}">{{item.mark}}</view>
<view class='calender-month'>
<block wx:for='{{item.data}}' wx:for-item='i' wx:for-index='ind' wx:key='ind'>
<view class='calender-day {{ind == 0?i.week:""}} {{i.active?"active":""}} {{i.disable?"disable":""}}' style="background:{{i.active?calenderColor:''}};color:{{i.middle?calenderColor:''}}" bindtap="choose" data-index='{{index}}' data-ind='{{ind}}' data-data='{{i.data}}'>
<view class='calender-middle' style="background:{{calenderColor}};" wx:if='{{i.middle}}' />
<view class='box-center text'>
{{i.day}}
<view wx:if='{{dateType==="range"}}' class='calender-tips'>
<view wx:if='{{i.start}}'>{{rangeText.start}}</view>
<view wx:if='{{i.end}}'>{{rangeText.end}}</view>
</view>
</view>
</view>
</block>
</view>
</swiper-item>
</block>
</swiper>
<!-- 月份 wx:if="{{!dayType}}" -->
<div class='calenderMonth'>
<swiper hidden="{{dayType}}" class='calender-year ' bindchange='dateChange' current='{{yearCurrent}}' vertical='{{vertical}}'>
<block wx:for="{{yearList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<swiper-item class="calenderMonth">
<block wx:for="{{item}}" wx:for-item="monItem" wx:for-index="monIndex" wx:key="monIndex">
<view bindtap="monChoose" data-type="month" data-index="{{monIndex}}" data-yearindex="{{index}}" data-data="{{monItem}}" class="monItem {{monItem.start?'active':''}} {{monItem.select?'select':''}} {{monItem.end?'end':''}} {{monItem.disable?'disable':''}}" style="background: {{monItem.start || monItem.end ? calenderColor : ''}};color: {{monItem.select ? calenderColor : ''}};">
<view>{{monItem.label}}</view>
<view class="text" wx:if="{{monItem.start}}">开始</view>
<view class="text" wx:if="{{monItem.end}}">结束</view>
</view>
</block>
</swiper-item>
</block>
</swiper>
</div>
</view>
<!-- 月份 结束 -->
<view class='calender-footer {{isFullSucreen?true:""}} ' wx:if='{{showConfirm}}'>
<view class='calender-btn {{dateType === "range" && !rangeDate.end ?"disable":""}} {{dateType === "multiple" && multipleDate.length < 1 ?"disable":""}}' style="background:{{calenderColor}}" bindtap="done">
{{confirmText||'确定'}}
</view>
</view>
</view>
</view>
\ No newline at end of file
/* components/Calendar/Calendar.wxss */
.calender-box {
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
height: 100%;
}
.calender-bg {
position: absolute;
background: rgba(0, 0, 0, .5);
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.calender-view {
position: absolute;
left: 0;
width: 100%;
background: #fff;
animation: show-calender .5s forwards;
color: #333;
}
.calender-view.true {
border-radius: 40rpx 40rpx 0 0;
}
.calender-view.isFullSucreen {
box-sizing: border-box;
padding-bottom: 34px !important;
}
@keyframes show-calender {
from {
bottom: -100%;
}
to {
bottom: 0;
}
}
.calender-view.hideCalendar {
animation: hide-calender .5s forwards;
}
@keyframes hide-calender {
from {
bottom: 0;
}
to {
bottom: -100%;
}
}
.calender-header {
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.10);
}
.calender-title,
.calender-subtitle {
width: 100%;
height: 88rpx;
text-align: center;
position: relative;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.calender-all {
position: absolute;
top: 50%;
left: 40rpx;
transform: translateY(-50%);
}
.calender-subtitle-text {
display: flex;
align-items: center;
justify-content: center;
}
.calender-subtitle {
font-size: 28rpx;
}
.calender-subtitle .arrow {
width: 14rpx;
height: 14rpx;
border-top: 2rpx solid transparent;
border-right: 2rpx solid #ccc;
border-bottom: 2rpx solid #ccc;
border-left: 2rpx solid transparent;
transform: rotate(45deg) translateY(-4rpx);
margin-left: 16rpx;
transition: all .3s;
}
.calender-subtitle .arrow.true {
transform: rotate(225deg) translateY(0) translateX(-4rpx);
}
.calender-close {
position: absolute;
width: 40rpx;
height: 40rpx;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
}
.calender-close-image {
width: 24rpx;
height: 24rpx;
}
.calendar-weekdays {
display: grid;
grid-template-columns: repeat(7, 1fr);
font-size: 24rpx;
line-height: 60rpx;
}
.calendar-weekday {
text-align: center;
}
.calender-body {
width: 100%;
padding: 20rpx 0;
box-sizing: border-box;
}
.calender-swiper {
height: 100%;
}
.calender-mark {
color: #F2F3F5;
text-shadow: 0 4rpx 20rpx #F2F3F5;
font-size: 320rpx;
width: 100%;
text-align: center;
}
.box-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.calender-month {
height: 100%;
position: relative;
z-index: 1;
display: grid;
grid-template-rows: repeat(minmax(5, 6), 1fr);
grid-template-columns: repeat(7, 1fr);
}
.calender-day {
position: relative;
font-size: 32rpx;
display: flex;
}
.calender-day.active {
color: #fff;
border-radius: 8rpx;
}
.calender-day.disable {
opacity: .25;
}
.calender-day .calender-middle {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.1;
}
.calender-day .text {
text-align: center;
width: 100%;
}
.calender-tips {
font-size: 14rpx;
}
.week-1 {
grid-column-start: 2;
}
.week-2 {
grid-column-start: 3;
}
.week-3 {
grid-column-start: 4;
}
.week-4 {
grid-column-start: 5;
}
.week-5 {
grid-column-start: 6;
}
.week-6 {
grid-column-start: 7;
}
.calender-year {
/* display: flex;
flex-wrap: wrap; */
width: 100%;
height: 100%;
}
.calenderMonth {
display: flex;
flex-wrap: wrap;
width: 100%;
height: 100%;
}
.monItem {
box-sizing: border-box;
width: 25%;
height: 186rpx;
font-size: 32rpx;
/* text-align: center; */
/* line-height: 186rpx; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-wrap: wrap;
color: #666666;
border: 1rpx solid #fff;
}
.monItem .text {
font-size: 20rpx;
margin-top: 5rpx;
}
.monItem.select {
color: #3582EE;
/* background: #3582EE;
opacity: 0.1; */
background-color: rgba(53, 130, 238, .1);
}
.monItem.active {
color: #fff;
background: #3582EE;
border-radius: 8px 0px 0px 8px;
}
.monItem.end {
color: #fff;
background: #3582EE;
border-radius: 0px 8px 8px 0px;
}
.monItem.disable {
color: #C8C9CC;
}
.calender-footer {
position: absolute;
width: 100%;
left: 0;
bottom: 0;
padding: 14rpx 32rpx;
box-sizing: border-box;
}
.calender-footer.true {
padding-bottom: 34px !important;
}
.calender-footer .calender-btn {
width: 100%;
height: 72rpx;
font-size: 28rpx;
color: #fff;
border-radius: 999rpx;
display: flex;
justify-content: center;
align-items: center;
}
.calender-footer .calender-btn.disable {
opacity: .3;
}
\ No newline at end of file
export default {
properties: {
calenderHeight: {
// 新版本不能使用type 改用optionalTypes 属性避免提示错误
type: String,
optionalTypes: [Number]
},
title: String, // 标题名称
hasRadius: {
type: Boolean,
value: true
}, // 是否圆角
showTitle: {
type: Boolean,
value: true
}, // 是否显示标题
showSubTitle: {
type: Boolean,
value: true
}, // 是否显示副标题
confirmText: String, // 确定按钮文本
showConfirm: {
type: Boolean,
value: true
}, // 是否显示确定按钮
calenderColor: {
type: String,
value: '#00A479'
}, // 日历主题色
previous: {
type: Number,
value: 3
}, // 当前月的前几个月 ,默认3个月
next: {
type: Number,
value: 3
}, // 当前月的后几个月 , 默认3个月
vertical: Boolean, //是否纵向滑动
/** 选择类型默认单选,single单选, multiple多个日期,range日期范围 */
dateType: {
type: String,
value: 'single'
},
value: String, //单选绑定数据
shortcut: Boolean, //日期快捷切换 默认为false
/** 分隔符,默认为 "-" */
separator: {
type: String,
value: '-'
},
/** 日期范围-开始结束文本 */
rangeText: {
type: Object,
value: {
start: '开始',
end: '结束'
}
},
/**是否显示日期范围 全选 */
rangeAll: Boolean,
/** 是否允许日期范围的起止时间为同一天, 默认为false */
allowSameDay: Boolean,
/** 周起始日,默认周日 */
firstDayOfWeek: {
// 新版本不能使用type 改用optionalTypes 属性避免提示错误
type: Number,
optionalTypes: [Number],
value: 7
},
/**
* 可选最小日期,不传则默认无限制。
* 格式yyyy-MM-dd, 需跟separator一致。 */
minDate: String,
/** 可选最大日期,不传则默认无限制。
* 格式yyyy-MM-dd, 需跟separator一致 */
maxDate: String,
/**隐藏水印 */
hideMark: Boolean,
isComponents: Boolean,
isChangeType: {
type: Boolean,
value: true
}, // 是否显示切换 按月份 按日期
dayType: { // 0按月份 1按日期
type: Number,
value: 1
}
},
data: {
weekdays: ['一', '二', '三', '四', '五', '六', '日'],
monthList: [],
dateList: [],
monPickList: [],
current: 0,
height: '80%',
rangeDate: {},
multipleDate: [],
date: '',
yearCurrent: 0,
yearList: [],
rangeMonth: {},
// MonthShowList: [
// {
// label: '1月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '2月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '3月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '4月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '5月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '6月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '7月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '8月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '9月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '10月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '11月',
// disable: false,
// start: false,
// end: false,
// select: false
// },
// {
// label: '12月',
// disable: false,
// start: false,
// end: false,
// select: false
// }
// ],
// dayType: 1, // 1 日期 0 月份 默认日期
dateObj: {
// switch:'按月份',
// type:'day',
tips: ['按日期', '按月份']
}
}
}
// components/navigationBar/navigationBar.js
Component({
externalClasses: ['custom-class'],
/**
* 组件的属性列表
*/
......@@ -80,7 +81,8 @@ Component({
const thisPage = wx.$router.getPageInstance()
this.triggerEvent('navbarReady', {
height: navHeight,
statusBarHeight
statusBarHeight,
navigationBarHeight
})
this.setData({
showNavBar: true
......
<view class="navigation-bar" id="navigation-bar" style="padding-top:{{statusBarHeight}}px;height:{{navigationBarHeight}}px;{{navStyle}}">
<block wx:if="{{!custom}}">
<view class="navigation-bar-box" wx:if="{{showNavBar}}" style="{{navigationBarStyle}}{{navBarBoxStyle}}">
<view class="navigation-bar-box custom-class" wx:if="{{showNavBar}}" style="{{navigationBarStyle}}{{navBarBoxStyle}}">
<block wx:if="{{SHOWBACK}}">
<view class="back " bindtap="back">
<image class="img" src="./images/icon-back.png" />
......
......@@ -10,7 +10,8 @@ Component({
bgColor: {
type: String,
value: '#fff'
}
},
emptyDataStyle: String
},
/**
......
<!-- components/Nothing-tips/nothingTips.wxml -->
<view class="nothingCon custom-class" style="background-color: {{bgColor}};">
<view class="nothingCon custom-class" style="background-color: {{bgColor}};{{emptyDataStyle}}">
<image
wx:if="{{bg}}"
class="bg"
......
......@@ -20,7 +20,6 @@ Component({
}, 0.2 * 1000)
} else {
let hideTab = wx.$hideTab
// console.log(hideTab)
this.setData({
showPopup: true,
close: false,
......@@ -37,7 +36,10 @@ Component({
only: {
type: Boolean,
value: true
}
},
customHideTab: Boolean,
customIsTab: Boolean,
customPopupSlotStyle: String
},
/**
......@@ -67,5 +69,6 @@ Component({
this.setData({
isTab
})
console.log(isTab)
}
})
......@@ -4,15 +4,15 @@
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}">
<view class="popup-slot {{(isTab || customIsTab) && (!hideTab || !customHideTab) ? '': title?'isFullSucreen':'isFullSucreen-notitle'}}" style="{{customPopupSlotStyle}}">
<slot></slot>
</view>
<view class="popup-footer {{isTab && !hideTab?'':'isFullSucreen'}}" wx:if="{{only}}">
<view class="popup-footer {{(isTab || customIsTab) && (!hideTab || !customHideTab) ?'':'isFullSucreen'}}" wx:if="{{only}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
<view class="confirm btn text-center" bindtap="confirm">确定</view>
</view>
<view class="popup-footer {{isTab && !hideTabb?'':'isFullSucreen'}}" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确认</view>
<view class="popup-footer {{(isTab || customIsTab) && (!hideTab || !customHideTab) ?'':'isFullSucreen'}}" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确定</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -76,7 +76,7 @@
height: 80rpx;
box-sizing: border-box;
border-radius: 12rpx;
font-size: 28rpx;
font-size: 32rpx;
}
.popup-footer .doubtn {
......@@ -84,7 +84,7 @@
height: 80rpx;
box-sizing: border-box;
border-radius: 12rpx;
font-size: 28rpx;
font-size: 32rpx;
}
.popup-footer .cancel {
......
......@@ -4,7 +4,7 @@ import { checkLoginUserInfo, setLoginInfo, loginModal } from '~/login/lib/index'
import md5 from '~/utils/lib/md5'
import network from '~/utils/network'
import { imgUrlMixin } from '~/mixins/index'
let thisPage
// let thisPage
Component({
behaviors: [imgUrlMixin],
options: {
......@@ -52,6 +52,7 @@ Component({
},
/**输入回调 */
input(e) {
const thisPage = wx.$router.getPageInstance()
const { value } = e.detail,
{ name } = e.currentTarget.dataset
this.setData({
......@@ -116,6 +117,7 @@ Component({
},
/**检查输入框内容 */
checkFormData() {
const thisPage = wx.$router.getPageInstance()
const { loginType, formData } = this.data
if (loginType != 0) {
if (loginType == 1) {
......@@ -169,6 +171,7 @@ Component({
.then(({ code, data, message }) => {
this.setBtnLoading(false)
if (code == '0') {
const thisPage = wx.$router.getPageInstance()
if (loginType == 1) checkLoginUserInfo(data)
else {
const { autoLogin } = thisPage.data,
......@@ -221,6 +224,7 @@ Component({
},
/**设置登录按钮loading状态 */
setBtnLoading(loading = true) {
const thisPage = wx.$router.getPageInstance()
thisPage.setData({
loading
})
......@@ -230,10 +234,13 @@ Component({
},
/**页面初始化 */
async init() {
this.setData({
code:3
})
network.getNetworkType()
thisPage = wx.$router.getPageInstance()
try {
const { data, code, message } = await USERAPI.wxCodeLogin()
const thisPage = wx.$router.getPageInstance()
if (code == '0') {
thisPage.setData({
disabled: false
......
......@@ -8,8 +8,9 @@ Page({
loginType: 0,
/**按钮disabled */
disabled: true,
// disabled: false,
/**免登 */
autoLogin: false
autoLogin: false,
},
onRoute(options) {},
/**
......@@ -33,12 +34,11 @@ Page({
disabled: true
})
}
const login = this.selectComponent('#box')
if (login) login.init()
wx.hideHomeButton({
success: res => {
wx.hideLoading()
const login = this.selectComponent('#box')
if (login) login.init()
// this.checkLoginBtn()
}
})
},
......@@ -73,15 +73,18 @@ Page({
autoLogin: e.detail
})
},
checkLoginBtn(disabled = false) {
checkLoginBtn(disabled = false ) {
const { loginType } = this.data,
{
data: { formData },
loginToken
// loginToken
} = this.selectComponent('#box')
if (loginType == 0) {
disabled = loginToken
} else disabled = loginType == 1 ? formData.phone && this.validate.methods.tel(formData.phone) && formData.code && formData.code.length == 4 : formData.account && formData.password
// disabled = loginToken
disabled = this.loginToken
} else{
disabled = loginType == 1 ? formData.phone && this.validate.methods.tel(formData.phone) && formData.code && formData.code.length == 4 : formData.account && formData.password
}
this.setData({
disabled: !disabled
})
......
......@@ -2,6 +2,8 @@
<mask show="{{loading}}"></mask>
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar>
<box loginType="{{loginType}}" disabled="{{disabled}}" id="box" />
{{test4}}
<agree show="{{loginType == 2}}" text="7天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
{{test}}
<type-list loginType="{{loginType}}" />
</view>
\ No newline at end of file
......@@ -65,7 +65,7 @@ const loginSuccess = () => {
obj
} = setRouteData(targetPath)
wx.$router.reLaunch(url, obj)
} else wx.$router.go('pages.index')
} else wx.$router.reLaunch('pages.index')
}
const loginModal = async ({
message,
......
......@@ -14,6 +14,11 @@
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.18.tgz",
"integrity": "sha512-oNJMLkKh/BOFyiGUDlm5r+5dvqBlZx7T9U+UQ2BkqL8R9i713sCHs+1AOsFMA1GOjsgRM2ShgzoXaQef6RQ/ew=="
},
"glsx-common-sdk": {
"version": "0.2.8",
"resolved": "https://registry.npmmirror.com/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"glsx-map-sdk": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/glsx-map-sdk/-/glsx-map-sdk-0.1.5.tgz",
......
......@@ -6,6 +6,7 @@
"dependencies": {
"@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.1.18",
"glsx-common-sdk": "^0.2.8",
"glsx-map-sdk": "^0.1.5"
},
"devDependencies": {},
......
......@@ -31,8 +31,7 @@ Component({
}
},
serviceList: Array,
selectInfo: Object,
tabBarStyle: String
selectInfo: Object
},
/**
......
......@@ -6,7 +6,7 @@
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #F2F3F7;
background-color: #ffffff;
animation: show-confirm-box .5s forwards;
.search-content{
height: 108rpx;
......@@ -76,6 +76,10 @@
}
}
}
.list{
height: calc(100% - 108rpx);
box-sizing: border-box;
}
.service-items{
width: 100%;
height: 88rpx;
......
<!--packagesList/mineDetail/pages/staffManage/selectServicePage.wxml-->
<view class="select-service-page" hidden="{{!show}}" style="margin-top:{{tabBarStyle}}px;">
<view class="select-service-page" hidden="{{!show}}" catchtouchmove="{{true}}">
<view class="search-content">
<view class="search-box">
<view class="search-input">
......@@ -23,13 +23,8 @@
</view>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
class="list isFullSucreen"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{serviceList}}" wx:key="index">
......
......@@ -23,12 +23,10 @@ Component({
} else {
item.act = false
}
this.setData({
serviceRange
})
})
this.setData({
searchKeyword: ''
searchKeyword: '',
serviceRange
})
}
}
......@@ -92,9 +90,9 @@ Component({
} else {
item.act = false
}
this.setData({
serviceRange
})
})
this.setData({
serviceRange
})
},
search(e) {
......
// packageMine/pages/staffManage/staffTypePopup/staffTypePopup.js
Component({
/**
* 组件的属性列表
*/
properties: {
staffTypeSelectInfo: {
type: Object,
observer: function(n) {
console.log(n)
this.setData({copyStaffTypeSelectInfo: n})
}
},
popShow: {
type: Boolean,
observer: function(n) {
if (n) {
let { staffTypeList, notAll } = this.data
if (notAll) {
let index = staffTypeList.findIndex(v => v.staffBusinessType == '')
if (index > -1) staffTypeList.splice(index, 1)
this.setData({
staffTypeList
})
}
}
}
},
notAll: Boolean
},
/**
* 组件的初始数据
*/
data: {
staffTypeList: [
{
staffBusinessType: '',
staffBusinessTypeStr: '全部'
},
{
staffBusinessType: '0',
staffBusinessTypeStr: '驻店'
},
{
staffBusinessType: '1',
staffBusinessTypeStr: '技师'
}
],
copyStaffTypeSelectInfo: {}
},
/**
* 组件的方法列表
*/
methods: {
hidePopup() {
this.triggerEvent('hidePopup')
},
select(e) {
let { target } = e.currentTarget.dataset
this.setData({
copyStaffTypeSelectInfo: target
})
},
confirm() {
let { copyStaffTypeSelectInfo } = this.data
this.triggerEvent('confirm', copyStaffTypeSelectInfo)
this.hidePopup()
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageMine/pages/staffManage/staffTypePopup/staffTypePopup.wxss */
.itemCon {
box-sizing: border-box;
width: 100%;
height: 80rpx;
color: #323436;
line-height: 80rpx;
padding: 0 32rpx;
}
.active {
background: #F0F7FF;
font-size: 28rpx;
color: #3666FE;
}
\ No newline at end of file
<!--packageMine/pages/staffManage/staffTypePopup/staffTypePopup.wxml-->
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
title="员工类型"
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
class="itemCon text-hide {{item.staffBusinessType == copyStaffTypeSelectInfo.staffBusinessType?'active':''}}"
data-target="{{item}}"
bindtap="select">
{{item.staffBusinessTypeStr}}
</view>
</block>
</popup>
......@@ -93,6 +93,7 @@
border-bottom: 2rpx dotted #CCCED1;
.message {
width: calc(100% - 36rpx);
display: flex;
.avatar {
......@@ -106,10 +107,12 @@
display: flex;
flex-flow: column;
justify-content: center;
width: calc(100% - 84rpx);
.name {
color: #323436;
font-size: 28rpx;
word-break: break-all;
}
.tips {
......
......@@ -133,15 +133,16 @@ Page({
// 逆地址解析
// 代码共6位,前两位代表省(一级)、中间两位为市/地区(二级),最后两位为区县(三级),区code获取省code和市code
mapApi.detailedAdrress([res.latitude, res.longitude]).then(obj => {
let cityName = typeof obj?.ad_info?.city == 'string' ? obj?.ad_info?.city : obj?.ad_info?.province
_this.setData({
['formData.latitude']: obj?.location?.lat,
['formData.longitude']: obj?.location?.lng,
['formData.provinceName']: obj?.ad_info?.province,
['formData.provinceCode']: obj?.ad_info?.adcode.slice(0, 2) + '0000',
['formData.cityName']: obj?.ad_info?.city,
['formData.cityName']: cityName,
['formData.cityCode']: obj?.ad_info?.adcode.slice(0, 4) + '00',
['formData.merchantAddress']: res?.name,
region: [obj?.ad_info?.province, obj?.ad_info?.city]
region: [obj?.ad_info?.province, cityName]
})
})
}
......
// packageStoreAssistant/packageActivity/pages/log/log.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getVersionInfo()
},
async getVersionInfo() {
const logData = await getApp().getVersionInfo()
this.setData({
logData
})
wx.$versionConfig.set(logData.version)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageStoreAssistant/packageActivity/pages/log/log.wxss */
.layout {
.bg {
position: relative;
z-index: -1;
width: 100%;
height: 400rpx;
}
.log-box {
box-sizing: border-box;
height: calc(100vh - 400rpx);
background: #FFFFFF;
overflow-y: scroll;
box-sizing: border-box;
padding: 40rpx 32rpx calc(40rpx + var(--constantSafeAreaInsetBottom));
padding: 40rpx 32rpx calc(40rpx + var(--envSafeAreaInsetBottom));
.title {
font-weight: 500;
font-size: 48rpx;
color: #282829;
margin-bottom: 48rpx;
}
.sub-title {
font-weight: 500;
font-size: 40rpx;
color: #333333;
margin-bottom: 4rpx;
}
.date {
font-size: 26rpx;
color: #999999;
margin-bottom: 24rpx;
}
.log-item {
margin-bottom: 40rpx;
.log-title {
width: fit-content;
height: 48rpx;
background-image: linear-gradient(-75deg, #E8E6FF 0%, #EDF1FF 49%, #E0F3FF 100%);
border-radius: 8rpx;
padding: 0 16rpx;
.text {
color: transparent !important;
background: linear-gradient(116deg, #27C0C2 0%, #4837E6 100%) !important;
-webkit-background-clip: text !important;
}
}
.log-content {
margin-top: 16rpx;
font-size: 28rpx;
color: #1B233D;
line-height: 44rpx;
.img{
width: 100%;
border-radius: 12rpx;
}
}
}
}
}
.bgimg{
height: 400rpx;
}
\ No newline at end of file
<view class="layout">
<navigation-bar showBack navStyle="background-color: transparent;">
生意助手更新记录
</navigation-bar>
<view class="bg">
<glsx-image custom-class='bgimg' webp src="personal/log-bg.png"></glsx-image>
</view>
<view class="log-box">
<view class="title">{{logData.title}}</view>
<view class="sub-title">
{{logData.subtitle}}
</view>
<view class="date">{{logData.date}}</view>
<block wx:for="{{logData.logList}}" wx:key="index">
<view class="log-item">
<view class="log-title text-center">
<view class="text">{{item.title}}</view>
</view>
<block wx:for="{{item.data}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view class="log-content">
<block wx:if="{{i.type == 'text'}}">
{{i.content}}
</block>
<block wx:else>
<view class="img">
<image webp src="{{i.content}}" mode="widthFix" />
</view>
</block>
</view>
</block>
</view>
</block>
</view>
</view>
\ No newline at end of file
......@@ -44,6 +44,7 @@
padding: 24rpx 32rpx;
.message {
width: calc(100% - 84rpx);
display: flex;
.avatar {
......@@ -57,10 +58,12 @@
display: flex;
flex-flow: column;
justify-content: center;
width: calc(100% - 84rpx);
.merchant {
color: #323436;
font-size: 28rpx;
word-break: break-all;
}
.contact {
......
......@@ -135,15 +135,16 @@ Page({
// 逆地址解析
// 代码共6位,前两位代表省(一级)、中间两位为市/地区(二级),最后两位为区县(三级),区code获取省code和市code
mapApi.detailedAdrress([res.latitude, res.longitude]).then(obj => {
let cityName = typeof obj?.ad_info?.city == 'string' ? obj?.ad_info?.city : obj?.ad_info?.province
_this.setData({
['formData.latitude']: obj?.location?.lat,
['formData.longitude']: obj?.location?.lng,
['formData.provinceName']: obj?.ad_info?.province,
['formData.provinceCode']: obj?.ad_info?.adcode.slice(0, 2) + '0000',
['formData.cityName']: obj?.ad_info?.city,
['formData.cityName']: cityName,
['formData.cityCode']: obj?.ad_info?.adcode.slice(0, 4) + '00',
['formData.merchantAddress']: res?.name,
region: [obj?.ad_info?.province, obj?.ad_info?.city]
region: [obj?.ad_info?.province, cityName]
})
})
}
......
......@@ -92,6 +92,7 @@
padding: 24rpx 32rpx;
.message {
width: calc(100% - 36rpx);
display: flex;
.avatar {
......@@ -105,10 +106,12 @@
display: flex;
flex-flow: column;
justify-content: center;
width: calc(100% - 84rpx);
.merchant {
color: #323436;
font-size: 28rpx;
word-break: break-all;
}
.contact {
......
const phoneRex = /^[1]([3-9])[0-9]{9}$/
const formRule = {
selectInfo: [{ required: true, message: '所属服务中心不能为空' }],
staffTypeSelectInfo: [{ required: true, message: '员工类型不能为空' }],
staffName: [{ required: true, message: '员工姓名不能为空' }],
staffPhone: [
{ required: true, message: '手机号码不能为空' },
......@@ -20,6 +21,13 @@ const formItems = [{
placeholder: '请选择服务中心',
pageType: 1
}, {
label: '员工类型',
props: 'staffTypeSelectInfo',
valueFn: 'staffBusinessTypeStr',
type: 'select',
placeholder: '请选择员工类型',
pageType: 3
}, {
label: '员工姓名',
props: 'staffName',
type: 'input',
......
......@@ -17,10 +17,17 @@ Page({
formData: {
selectedConnectionIds: [],
connectionValue: '全部',
visualType: 0 // 0:全部 1:选中部分可见客户
visualType: 0, // 0:全部 1:选中部分可见客户
staffBusinessType: '0',
staffBusinessTypeStr: '驻店',
staffTypeSelectInfo: {
staffBusinessType: '0',
staffBusinessTypeStr: '驻店',
}
},
showServiceConfirm: false,
isConfirm: false
isConfirm: false,
staffPopupShow: false
},
watch: {
......@@ -55,8 +62,11 @@ Page({
serviceValue: optionsInfo.merchantName,
visualType: optionsInfo.visualType || 0,
connectionValue: optionsInfo.visualType == 1 ? `已选${optionsInfo.visibleMerchantNo?.split(',')?.length}位客户`: '全部',
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : []
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : [],
staffBusinessTypeStr: optionsInfo.staffBusinessType == 0 ? '驻店' : optionsInfo.staffBusinessType == 1 ? '技师' : '',
staffTypeSelectInfo: {staffBusinessType: optionsInfo?.staffBusinessType}
} : {}
if (options?.info) wx.setNavigationBarTitle({ title: '编辑员工' })
this.setData({
addOrEdit: options?.info ? 'edit' : 'add',
'formItems[0].disabled': options?.info ? true : false,
......@@ -79,13 +89,6 @@ Page({
},
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight
})
},
// 获取服务中心下的客户列表
getConnectionList(e) {
mineApi.getConnectionListByServiceAPI({
......@@ -131,14 +134,40 @@ Page({
this.hiddenSelectConfirm()
break
case 2:
if (!formData.selectInfo) return wx.$api.showToast('请先选择所属服务中心')
if (!formData?.selectInfo?.yqMerchantId) return wx.$api.showToast('请先选择所属服务中心')
wx.$router.go('packageMine.selectConnectionPage', this.data.formData)
break
case 3:
this.handleStaffTypeChange()
break
}
},
handleStaffTypeChange() {
this.setData({
staffPopupShow: !this.data.staffPopupShow
})
},
staffTypeConfiem(e) {
let { formData } = this.data
let obj = {
...formData,
...e.detail,
selectInfo: formData.selectInfo,
staffTypeSelectInfo: e.detail
}
this.setData({
formData: obj
})
},
hiddenSelectConfirm(e) {
let selectInfo = e?.detail
let { formData } = this.data
let selectInfo = {
...formData.selectInfo,
...e?.detail
}
this.setData({ showServiceConfirm: !this.data.showServiceConfirm })
if (!selectInfo) return
this.setData({
......@@ -171,12 +200,14 @@ Page({
let params = {
merchantNo: formData?.selectInfo?.yqMerchantId,
merchantName: userInfo?.merchantName,
type: formData.type,
staffUuid: formData?.staffUuid,
staffName: formData?.staffName,
staffPhone: formData?.staffPhone,
createdSource: 3, // 创建来源 固定3 生意助手
visualType: formData?.visualType,
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds // 全部 无需传可见客户数据
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds, // 全部 无需传可见客户数据
staffType: Number(formData?.staffBusinessType)
}
let message = addOrEdit == 'add' ? '是否确定创建员工?' : '是否确定修改员工信息?'
wx.showModal({
......
{
"usingComponents": {
"select-service-confirm": "../../../components/selectServiceConfirm/selectServiceConfirm"
"select-service-confirm": "../../../components/selectServiceConfirm/selectServiceConfirm",
"staff-type-popup": "../../../components/staffTypePopup/staffTypePopup"
},
"navigationStyle": "custom"
"navigationBarTitleText": "创建员工"
}
\ No newline at end of file
<!--packagesList/mineDetail/pages/staffManage/createStaff/createStaff.wxml-->
<navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back" customBack="{{true}}">
<!-- <navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back" customBack="{{true}}">
{{!showServiceConfirm ? (addOrEdit == 'add' ? '创建员工' : '编辑员工') : '选择服务中心'}}
</navigation-bar>
</navigation-bar> -->
<view class="create-staff-page" style="padding-top:{{tabBarStyle}}px;">
<view class="tips" wx:if="{{addOrEdit == 'add'}}">请完善员工资料完成创建:</view>
<view class="form-content">
......@@ -29,4 +29,5 @@
<view class="btn-blue" bindtap="handleConfirm">{{addOrEdit == 'add' ? '提交' : '保存'}}</view>
</view>
</view>
<select-service-confirm show="{{showServiceConfirm}}" tabBarStyle="{{tabBarStyle}}" serviceList="{{serviceList}}" selectInfo="{{formData.selectInfo}}" bind:hiddenSelectConfirm="hiddenSelectConfirm"></select-service-confirm>
<select-service-confirm show="{{showServiceConfirm}}" serviceList="{{serviceList}}" selectInfo="{{formData.selectInfo}}" bind:hiddenSelectConfirm="hiddenSelectConfirm"></select-service-confirm>
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{formData.selectInfo}}" staffTypeSelectInfo="{{formData.staffTypeSelectInfo}}" bindconfirm="staffTypeConfiem" popShow="{{staffPopupShow}}" notAll="{{true}}"/>
......@@ -2,6 +2,12 @@ var formatMobile = function (item) {
return item ? item.substring(0,3)+" " + item.substring(3,7) +" "+item.substring(7) : ' '
}
var filterType = function (item) {
console.log(item, '123123')
return ['驻店', '技师'][item] || ''
}
module.exports = {
formatMobile: formatMobile
formatMobile: formatMobile,
filterType: filterType
}
\ No newline at end of file
......@@ -72,7 +72,7 @@ Page({
}).then(res => {
this.setData({
connectionList: res || [],
selectedConnectionList: res?.filter(val => { return options?.selectedConnectionIds.length && options.selectedConnectionIds.includes(val.merchantId) }) || []
selectedConnectionList: res?.filter(val => { return options?.selectedConnectionIds?.length && options.selectedConnectionIds.includes(val.merchantId) }) || []
})
})
},
......
......@@ -11,14 +11,18 @@ Page({
bgUrl: `${IMG_URL}/personal/empty_tran.png`,
popupShow: false,
staffList: [],
selectInfo: { yqMerchantName: '全部服务中心' },
selectInfo: { yqMerchantName: '全部服务中心', staffBusinessTypeStr: '全部员工类型' },
total: 0,
serviceList: [],
currentPage: 1,
allServiceIds: [],
nothing: false,
scrollTop: 0,
isAsk: false
isAsk: false,
staffPopupShow: false,
staffTypeSelectInfo: {
staffBusinessType: ''
}
},
/**
......@@ -55,12 +59,13 @@ Page({
},
getList(isReset = false) {
let { currentPage, selectInfo, allServiceIds, nothing, isAsk } = this.data
let { currentPage, selectInfo, allServiceIds, nothing, isAsk, staffTypeSelectInfo } = this.data
let _this = this
let params = {
pageSize: 10,
pageNum: currentPage,
merchantNoList: selectInfo?.yqMerchantId ? [selectInfo?.yqMerchantId] : allServiceIds
merchantNoList: selectInfo?.yqMerchantId ? [selectInfo?.yqMerchantId] : allServiceIds,
staffBusinessType: staffTypeSelectInfo.staffBusinessType
}
if (nothing || isAsk) {
return
......@@ -102,6 +107,13 @@ Page({
this.getList(true)
},
// 筛选员工类型
handleStaffTypeChange() {
this.setData({
staffPopupShow: !this.data.staffPopupShow
})
},
// 筛选服务中心
filterTypeFn() {
this.setData({
......@@ -112,8 +124,16 @@ Page({
// 获取员工列表
getStaffList(e) {
wx.$api.hideLoading()
let { selectInfo } = this.data
let { staffBusinessType, staffBusinessTypeStr } = e.detail
if (staffBusinessType == '' && staffBusinessTypeStr == '全部') e.detail.staffBusinessTypeStr = '全部员工类型'
let obj = {
...selectInfo,
...e.detail
}
this.setData({
selectInfo: e.detail,
selectInfo: obj,
staffTypeSelectInfo: obj,
nothing: false,
currentPage: 1
})
......
{
"navigationBarTitleText": "员工管理",
"usingComponents": {
"select-service-popup": "../../../components/selectServicePopup/selectServicePopup"
"select-service-popup": "../../../components/selectServicePopup/selectServicePopup",
"staff-type-popup": "../../../components/staffTypePopup/staffTypePopup"
}
}
\ No newline at end of file
......@@ -35,35 +35,38 @@
color: var(--btnColor)
}
}
.select-btn {
box-sizing: border-box;
padding: 16rpx 0;
.select-box{
display: flex;
align-items: center;
z-index: 2;
background-color: #f2f3f7;
.type {
margin-left: 8px;
.select-btn {
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
justify-content: center;
align-items: center;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
text{
max-width: 360rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.point {
margin-left: 2px;
width: 12px;
height: 12px;
z-index: 2;
background-color: #f2f3f7;
.type {
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
text{
max-width: 360rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
}
}
......@@ -94,6 +97,15 @@
.name{
color: #323436;
font-size: 28rpx;
.type_tips{
background: #F1F3F9;
border: 2rpx solid #FFFFFF;
border-radius: 8rpx;
padding: 0 8rpx;
font-size: 22rpx;
margin-left: 16rpx;
color: #6B7384;
}
}
.mobile{
color: #858A94;
......
......@@ -8,10 +8,18 @@
<view class="content-box">
<view class="title-box">
<view class="title">员工数量:<text class="number">{{total}}</text></view>
<view class="select-btn">
<view class="type" bindtap="filterTypeFn">
<text>{{selectInfo.yqMerchantName}}</text>
<glsx-image class="point" src="index/point.png" />
<view class="select-box">
<view class="select-btn">
<view class="type" bindtap="handleStaffTypeChange">
<text>{{selectInfo.staffBusinessTypeStr}}</text>
<glsx-image class="point" src="index/point.png" />
</view>
</view>
<view class="select-btn">
<view class="type" bindtap="filterTypeFn">
<text>{{selectInfo.yqMerchantName}}</text>
<glsx-image class="point" src="index/point.png" />
</view>
</view>
</view>
</view>
......@@ -32,7 +40,7 @@
<glsx-image wx:if="{{!item.weChatAvatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<image wx:else src="{{item.weChatAvatarUrl}}" class="avatar"></image>
<view class="message-text">
<view class="name">{{item.staffName}}</view>
<view class="name"><text>{{item.staffName}}</text><text class="type_tips" wx:if="{{format.filterType(item.staffBusinessType)}}">{{format.filterType(item.staffBusinessType)}}</text></view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
</view>
</view>
......@@ -54,3 +62,4 @@
</view>
</view>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="getStaffList" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" />
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{selectInfo}}" staffTypeSelectInfo="{{staffTypeSelectInfo}}" bindconfirm="getStaffList" popShow="{{staffPopupShow}}"/>
// components/Tab/Tab.js
// behaviors: [LocationBehavior],
import { imgUrlMixin } from '~/mixins/index'
Component({
behaviors: [imgUrlMixin],
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
outClassName:String,
tab: Array,
openScroll: Boolean,
tabHeight: {
type: Boolean,
value: false
},
productHeight: {
type: Boolean,
value: false
},
index: {
type: Number,
observer: function (n) {
this.setData({
count: n,
to: `to-${n}`
})
}
},
itemWidth: String,
align: {
type: String,
value: ''
},
// 是否有红点
unreadClueCount: {
type: Number,
value: 0
},
},
/**
* 组件的初始数据
*/
data: {
count: 0,
to: ''
},
// lifetimes:{
// attached: function() {
// console.log('unreadClueCount',this.data.unreadClueCount)
// }
// },
/**
* 组件的方法列表
*/
methods: {
click(e) {
let { count } = e.currentTarget.dataset
this.setData({
count,
to: `to-${count}`,
unreadClueCount:0
})
this.triggerEvent('click', count)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}">
<scroll-view class="tab-box {{align}} {{outClassName}}" style="{{productHeight ? 'height: 72rpx;' : ''}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}">
<view class="text" style="{{productHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" style="{{productHeight ? 'height: 4rpx;' : ''}}" />
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<view class="tab-box flex" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" style="width:{{item.width}}; {{index == 0 ? 'margin-left: 32rpx;' : ''}}" bindtap="click" data-count="{{index}}">
<view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">{{item.label}}</view>
<view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
<!-- -->
<!-- <view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" /> -->
</view>
</block>
</view>
</block>
\ No newline at end of file
var hasRedpoint = function (unreadClueCount) {
// console.log('unreadClueCount: ', unreadClueCount);
if(unreadClueCount>0){
return true
}else{
return false;
}
};
module.exports = {
hasRedpoint: hasRedpoint,
};
/* components/Tab/Tab.wxss */
.tab-box {
display: flex;
/* display: grid; */
width: 100%;
height: 92rpx;
box-sizing: border-box;
}
.tab-box.left {
padding-left: 32rpx;
}
.left .tab {
padding-right: 40rpx;
}
/* .flex .tab {
flex: 1;
} */
.tab {
position: relative;
flex-shrink: 0;
}
.tab .text {
height: 72rpx;
display: flex;
align-items: center;
box-sizing: border-box;
justify-content: center;
font-weight: 400;
font-size: 34rpx;
color: #636465;
}
.left .text {
justify-content: flex-start;
}
.flex .tab .text {
padding: 0;
}
.tab + .tab{
margin-left: 20rpx;
}
.tab.active .text {
/* font-weight: 500; */
font-weight: 600;
transition: all .25s;
font-size: 34rpx;
color: #323436;
/* font-size: 38rpx; */
/* color: #2C2C2C; */
font-family: PingFangSC-S0pxibold;
}
.tab .line {
width: 40rpx;
/* height: var(--borderRadius); */
height: 8rpx;
background: var(--btnColor);
border-radius: 4rpx;
margin: 0 auto;
transform: scale(0);
transition: all .25s;
}
.tab.active .line {
transform: scale(1);
}
.tab-box::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.active .redpoint {
display: none;
}
.redpoint {
position: absolute;
top: 10px;
right: 5px;
/* top: 8px;
right: 10px; */
width: 10px;
height: 10px;
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */
.project-tab {
padding-left: 20px;
padding-right: 20px;
}
.project-tab .tab {
margin-right: 28px;
}
.project-tab .tab.active .text {
font-size: 28rpx;
color: var(--btnColor);
}
.project-tab .tab .line {
width: auto;
}
\ No newline at end of file
import WxCanvas from './wx-canvas';
import * as echarts from './echarts';
let ctx;
function compareVersion(v1, v2) {
v1 = v1.split('.')
v2 = v2.split('.')
const len = Math.max(v1.length, v2.length)
while (v1.length < len) {
v1.push('0')
}
while (v2.length < len) {
v2.push('0')
}
for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i])
const num2 = parseInt(v2[i])
if (num1 > num2) {
return 1
} else if (num1 < num2) {
return -1
}
}
return 0
}
Component({
properties: {
canvasId: {
type: String,
value: 'ec-canvas'
},
ec: {
type: Object
},
forceUseOldCanvas: {
type: Boolean,
value: false
}
},
data: {
isUseNewCanvas: false
},
ready: function () {
// Disable prograssive because drawImage doesn't support DOM as parameter
// See https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
echarts.registerPreprocessor(option => {
if (option && option.series) {
if (option.series.length > 0) {
option.series.forEach(series => {
series.progressive = 0;
});
}
else if (typeof option.series === 'object') {
option.series.progressive = 0;
}
}
});
if (!this.data.ec) {
console.warn('组件需绑定 ec 变量,例:<ec-canvas id="mychart-dom-bar" '
+ 'canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>');
return;
}
// console.log(this.data.ec.lazyLoad,'this.data.ec.lazyLoad');
if (!this.data.ec.lazyLoad) {
this.init();
}
},
methods: {
init: function (callback) {
const version = wx.getSystemInfoSync().SDKVersion
const canUseNewCanvas = compareVersion(version, '2.9.0') >= 0;
const forceUseOldCanvas = this.data.forceUseOldCanvas;
const isUseNewCanvas = canUseNewCanvas && !forceUseOldCanvas;
this.setData({ isUseNewCanvas });
console.log(this.data.isUseNewCanvas)
if (forceUseOldCanvas && canUseNewCanvas) {
console.warn('开发者强制使用旧canvas,建议关闭');
}
if (isUseNewCanvas) {
// console.log('微信基础库版本大于2.9.0,开始使用<canvas type="2d"/>');
// 2.9.0 可以使用 <canvas type="2d"></canvas>
this.initByNewWay(callback);
} else {
const isValid = compareVersion(version, '1.9.91') >= 0
if (!isValid) {
console.error('微信基础库版本过低,需大于等于 1.9.91。'
+ '参见:https://github.com/ecomfe/echarts-for-weixin'
+ '#%E5%BE%AE%E4%BF%A1%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82');
return;
} else {
console.warn('建议将微信基础库调整大于等于2.9.0版本。升级后绘图将有更好性能');
this.initByOldWay(callback);
}
}
},
initByOldWay(callback) {
// 1.9.91 <= version < 2.9.0:原来的方式初始化
ctx = wx.createCanvasContext(this.data.canvasId, this);
const canvas = new WxCanvas(ctx, this.data.canvasId, false);
echarts.setCanvasCreator(() => {
return canvas;
});
// const canvasDpr = wx.getSystemInfoSync().pixelRatio // 微信旧的canvas不能传入dpr
const canvasDpr = 1
var query = wx.createSelectorQuery().in(this);
query.select('.ec-canvas').boundingClientRect(res => {
if (typeof callback === 'function') {
this.chart = callback(canvas, res.width, res.height, canvasDpr);
}
else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
this.chart = this.data.ec.onInit(canvas, res.width, res.height, canvasDpr);
}
else {
this.triggerEvent('init', {
canvas: canvas,
width: res.width,
height: res.height,
canvasDpr: canvasDpr // 增加了dpr,可方便外面echarts.init
});
}
}).exec();
},
initByNewWay(callback) {
// version >= 2.9.0:使用新的方式初始化
const query = wx.createSelectorQuery().in(this)
query
.select('.ec-canvas')
.fields({ node: true, size: true })
.exec(res => {
const canvasNode = res[0].node
this.canvasNode = canvasNode
const canvasDpr = wx.getSystemInfoSync().pixelRatio
const canvasWidth = res[0].width
const canvasHeight = res[0].height
const ctx = canvasNode.getContext('2d')
const canvas = new WxCanvas(ctx, this.data.canvasId, true, canvasNode)
echarts.setCanvasCreator(() => {
return canvas
})
if (typeof callback === 'function') {
this.chart = callback(canvas, canvasWidth, canvasHeight, canvasDpr)
} else if (this.data.ec && typeof this.data.ec.onInit === 'function') {
this.chart = this.data.ec.onInit(canvas, canvasWidth, canvasHeight, canvasDpr)
} else {
this.triggerEvent('init', {
canvas: canvas,
width: canvasWidth,
height: canvasHeight,
dpr: canvasDpr
})
}
})
},
canvasToTempFilePath(opt) {
if (this.data.isUseNewCanvas) {
// 新版
const query = wx.createSelectorQuery().in(this)
query
.select('.ec-canvas')
.fields({ node: true, size: true })
.exec(res => {
const canvasNode = res[0].node
opt.canvas = canvasNode
wx.canvasToTempFilePath(opt)
})
} else {
// 旧的
if (!opt.canvasId) {
opt.canvasId = this.data.canvasId;
}
ctx.draw(true, () => {
wx.canvasToTempFilePath(opt, this);
});
}
},
touchStart(e) {
if (this.chart && e.touches.length > 0) {
var touch = e.touches[0];
var handler = this.chart.getZr().handler;
handler.dispatch('mousedown', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.dispatch('mousemove', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.processGesture(wrapTouch(e), 'start');
}
},
touchMove(e) {
if (this.chart && e.touches.length > 0) {
var touch = e.touches[0];
var handler = this.chart.getZr().handler;
handler.dispatch('mousemove', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.processGesture(wrapTouch(e), 'change');
}
},
touchEnd(e) {
if (this.chart) {
const touch = e.changedTouches ? e.changedTouches[0] : {};
var handler = this.chart.getZr().handler;
handler.dispatch('mouseup', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.dispatch('click', {
zrX: touch.x,
zrY: touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
handler.processGesture(wrapTouch(e), 'end');
}
}
}
});
function wrapTouch(event) {
for (let i = 0; i < event.touches.length; ++i) {
const touch = event.touches[i];
touch.offsetX = touch.x;
touch.offsetY = touch.y;
}
return event;
}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!-- 新的:接口对其了H5 -->
<canvas wx:if="{{isUseNewCanvas}}" type="2d" class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
<!-- 旧的 -->
<canvas wx:else class="ec-canvas" canvas-id="{{ canvasId }}" bindinit="init" bindtouchstart="{{ ec.disableTouch ? '' : 'touchStart' }}" bindtouchmove="{{ ec.disableTouch ? '' : 'touchMove' }}" bindtouchend="{{ ec.disableTouch ? '' : 'touchEnd' }}"></canvas>
.ec-canvas {
width: 100%;
height: 100%;
z-index:10;
}
This diff could not be displayed because it is too large.
export default class WxCanvas {
constructor(ctx, canvasId, isNew, canvasNode) {
this.ctx = ctx;
this.canvasId = canvasId;
this.chart = null;
this.isNew = isNew
if (isNew) {
this.canvasNode = canvasNode;
}
else {
this._initStyle(ctx);
}
// this._initCanvas(zrender, ctx);
this._initEvent();
}
getContext(contextType) {
if (contextType === '2d') {
return this.ctx;
}
}
// canvasToTempFilePath(opt) {
// if (!opt.canvasId) {
// opt.canvasId = this.canvasId;
// }
// return wx.canvasToTempFilePath(opt, this);
// }
setChart(chart) {
this.chart = chart;
}
addEventListener() {
// noop
}
attachEvent() {
// noop
}
detachEvent() {
// noop
}
_initCanvas(zrender, ctx) {
zrender.util.getContext = function () {
return ctx;
};
zrender.util.$override('measureText', function (text, font) {
ctx.font = font || '12px sans-serif';
return ctx.measureText(text);
});
}
_initStyle(ctx) {
ctx.createRadialGradient = () => {
return ctx.createCircularGradient(arguments);
};
}
_initEvent() {
this.event = {};
const eventNames = [{
wxName: 'touchStart',
ecName: 'mousedown'
}, {
wxName: 'touchMove',
ecName: 'mousemove'
}, {
wxName: 'touchEnd',
ecName: 'mouseup'
}, {
wxName: 'touchEnd',
ecName: 'click'
}];
eventNames.forEach(name => {
this.event[name.wxName] = e => {
const touch = e.touches[0];
this.chart.getZr().handler.dispatch(name.ecName, {
zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
zrY: name.wxName === 'tap' ? touch.clientY : touch.y,
preventDefault: () => {},
stopImmediatePropagation: () => {},
stopPropagation: () => {}
});
};
});
}
set width(w) {
if (this.canvasNode) this.canvasNode.width = w
}
set height(h) {
if (this.canvasNode) this.canvasNode.height = h
}
get width() {
if (this.canvasNode)
return this.canvasNode.width
return 0
}
get height() {
if (this.canvasNode)
return this.canvasNode.height
return 0
}
}
import * as echarts from '../ec-canvas/echarts'
Component({
/**
* 组件的属性列表
*/
properties: {
chartData: {
type: Object,
value: {}
}
},
observers: {
'chartData.data': function (data) {
console.log(data, 'pie----------------')
data && this.onInitChart(data)
}
},
/**
* 组件的初始数据
*/
data: {
ec: {
// lazyLoad: false
lazyLoad: true
},
allList: false
},
attached() {
let { chartData } = this.data
console.log(chartData, 'chartDataattached')
chartData && chartData.data && this.onInitChart()
},
/**
* 组件的方法列表
*/
methods: {
showAll() {
this.setData({
allList: !this.data.allList
})
},
onInitChart() {
// console.log(this.ecComponent, this.selectComponent('#mychart-dom-bar'), 'this.ecComponent')
let ecComponent = this.ecComponent || this.selectComponent('#mychart-dom-bar')
ecComponent &&
ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr
})
this.setOption(chart)
return chart
})
},
setOption(chart) {
let { chartData } = this.data
// const abscissaDataList = [],
// orderMoneyTotalList = [],
// upgradeAveragePriceList = [],
// upgradeRateList = []
// diagramList.forEach(element => {
// abscissaDataList.push(element.abscissaData)
// orderMoneyTotalList.push(this.sceneId == 0 ? element.orderMoneyTotal : element.outputValue)
// upgradeAveragePriceList.push(this.sceneId == 0 ? element.upgradeAveragePrice : element.avgPrice)
// upgradeRateList.push(element.upgradeRate || 0)
// })
// const colors = ['#3582EE', '#35C376', '#FF9D0A']
var option = {
title: {
show: true, //显示策略,默认值true,可选为:true(显示) | false(隐藏)
text: chartData.total + '人', //主标题文本,'\n'指定换行
x: 'center', //水平安放位置,默认为'left',可选为:'center' | 'left' | 'right' | {number}(x坐标,单位px)
y: 'center', //垂直安放位置,默认为top,可选为:'top' | 'bottom' | 'center' | {number}(y坐标,单位px)
textAlign: null, //水平对齐方式,默认根据x设置自动调整,可选为: left' | 'right' | 'center
padding: 5, //标题内边距,单位px,默认各方向内边距为5,接受数组分别设定上右下左边距
// itemGap: 10, //主副标题纵向间隔,单位px,默认为10
textStyle: {
//主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
fontFamily: 'PingFangSC-Medium, Verdana, sans...',
fontSize: 14,
fontStyle: 'normal',
color: '#333333',
fontWeight: '600'
},
zlevel: 0, //一级层叠控制。默认0,每一个不同的zlevel将产生一个独立的canvas,相同zlevel的组件或图标将在同一个canvas上渲染。zlevel越高越靠顶层,canvas对象增多会消耗更多的内存和性能,并不建议设置过多的zlevel,大部分情况可以通过二级层叠控制z实现层叠控制。
z: 6 //二级层叠控制,默认6,同一个canvas(相同zlevel)上z越高约靠顶层。
},
color: ['#5fcf90','#ffb13c', '#f56c51', '#5f9cf3', ],
tooltip: {
trigger: 'item'
},
label: {
show: true,
formatter: '{b}\n{c}',
// alignTo: 'labelLine',
align: 'right',
edgeDistance: '10%' // 可以调整文字与饼图边缘的距离
// rich: {
// // d: {
// // color: '#fff',
// // fontSize: 16,
// // lineHeight: 24,
// // height: 24
// // },
// align: {
// // color: '#5fcf90',
// fontSize: 14,
// // lineHeight: 20,
// align: 'right'
// }
// }
// textStyle: {
// color: '#fff',
// align: 'right',
// fontSize: 14
// }
},
series: [
{
type: 'pie',
radius: ['40%', '70%'],
minAngle: 10,
labelLine: {
//设置提示线的长度
normal: {
length: 10, //第一条线
length2: 15 //第二条线
}
},
emphasis: {
label: {
show: true,
fontSize: 14,
// fontWeight: 'bold'
}
},
data: chartData.data
// [
// { value: 1048, name: '已预约' },
// { value: 735, name: '取消预约' },
// { value: 580, name: '超时未到店' },
// { value: 484, name: '待预约' }
// ]
}
]
}
chart.setOption(option)
},
//初始化数据
initData(data) {
// const xData = [],
// yData = []
// const [x, y] = this.data.keys
// data.forEach(item => {
// xData.push(item[x])
// yData.push(item[y])
// })
// this.setData({
// xData,
// yData
// })
// this.onInitChart(xData, yData)
}
},
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-bar')
}
})
{
"component": true,
"usingComponents": {
"ec-canvas": "../ec-canvas/ec-canvas"
}
}
/* packageOutput/components/echart/echart.wxss */
.ec-canvas {
width: 720rpx;
height: 450rpx;
// margin-top: -20rpx;
}
.container {
// height: 584rpx;
padding: 20rpx 16rpx 0rpx;
background-color: #fff;
margin-bottom: 20rpx;
font-size: 36rpx;
border-radius: 16rpx;
.title {
display: flex;
justify-content: space-between;
font-weight: 600;
font-size: 28rpx;
color: #323436;
.title-tip {
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
.title-tip-red {
font-weight: 400;
font-size: 24rpx;
color: #db6d6d;
}
}
.content {
padding: 24rpx 20rpx 0rpx;
.row {
font-size: 24rpx;
padding: 16rpx 0;
border-bottom: 0.5rpx solid #e4e6ee;
.label {
margin-bottom: 19rpx;
}
.num {
font-weight: 600;
font-size: 36rpx;
color: #333333;
}
}
.row:last-child {
border: none;
}
.td:first-child {
width: 60%;
}
.td:nth-child(2),
.td:nth-child(3) {
width: 20%;
}
.icon-up-down {
width: 24rpx;
height: 24rpx;
}
.up {
font-weight: 600;
color: #f24724;
}
.down {
font-weight: 600;
color: #35c376;
}
}
.revenue {
box-sizing: border-box;
background-color: #fff;
padding: 20rpx 16rpx 20rpx;
margin-bottom: 20rpx;
border-radius: 16rpx;
}
.pro-rank {
.rank-item {
border-bottom: 0.5rpx solid #e4e6ee;
padding: 24rpx 0;
}
.rank-idx {
width: 36rpx;
height: 36rpx;
line-height: 40rpx;
text-align: center;
background: #999999;
border-radius: 8rpx;
font-weight: 600;
font-size: 20rpx;
color: #ffffff;
margin-right: 10rpx;
}
.rank-0 {
background-image: linear-gradient(180deg, #ffd767 0%, #f7c33f 100%);
color: #a86921;
}
.rank-1 {
background-image: linear-gradient(180deg, #dfe1e5 0%, #cbccce 100%);
color: #8b8585;
}
.rank-2 {
background-image: linear-gradient(180deg, #f6dac4 0%, #f0be98 100%);
color: #cf7334;
}
.pro-name {
width: 480rpx;
font-weight: 600;
font-size: 28rpx;
color: #333333;
}
.price {
font-weight: 600;
font-size: 36rpx;
color: #f24724;
text-align: right;
}
.tips {
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin: 18rpx 0 0 46rpx;
}
.icons {
width: 100%;
text-align: center;
padding: 20rpx 0 0;
}
.rank-icon {
width: 40rpx;
height: 40rpx;
}
}
}
.invalidFlowContainer {
box-sizing: border-box;
border-top: 1rpx solid #e4e6ee;
padding: 20rpx 16rpx 24rpx;
margin-top: 40rpx;
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32rpx;
.label {
font-size: 24rpx;
color: #333333;
}
}
.customer {
box-sizing: border-box;
width: 100%;
padding: 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #666666;
background: #F7F9FA;
border: 2rpx solid #F3F8FA;
border-radius: 16rpx;
margin-bottom: 24rpx;
.header {
display: flex;
align-items: center;
justify-content: space-between;
.name {
font-weight: 600;
font-size: 28rpx;
color: #333333;
}
}
.item {
display: flex;
margin-top: 16rpx;
.label {
width: 100rpx;
margin-right: 24rpx;
}
.result{
flex: 1;
word-break: break-all;
}
}
}
}
.arrow {
width: 40rpx;
height: 40rpx;
margin: 0 auto;
.img {
width: 100%;
height: 100%;
}
.rotate {
transform: rotate(180deg);
}
}
\ No newline at end of file
<view class="container">
<view class="title">
流量情况
<view class="title-tip">客户领券后的预约情况</view>
</view>
<view class="ec-canvas">
<!-- force-use-old-canvas="true" -->
<ec-canvas class="echart-box" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}" ></ec-canvas>
</view>
<view class="invalidFlowContainer" wx:if="{{chartData.customerListAll.length}}">
<view class="header">
<view class="title">无效流量</view>
<view class="label">共{{chartData.customerListAll.length}}条客户信息经由跟进人处理为战败客户</view>
</view>
<view class="customer" wx:for="{{ allList? chartData.customerListAll:chartData.customerList }}" wx:key="index">
<view class="header">
<view class="name">{{item.customer.customerName}}</view>
<view class="date">{{item.orderTime}}</view>
</view>
<!-- followUpPerson -->
<view class="item">
<view class="label">跟进人</view>
<view class="name">{{item.employeeName}}|{{item.advanceUserName}}</view>
</view>
<!-- reasonContainer -->
<view class="item">
<view class="label">拒升理由</view>
<view class="result">{{item.customer.refusalReason}}</view>
</view>
</view>
<view class="arrow" bind:tap="showAll" wx:if="{{chartData.customerListAll.length>10}}">
<image class="img {{ allList?'rotate':'' }}" src="../../images/arrowIcon.png"></image>
</view>
</view>
</view>
\ No newline at end of file
import * as echarts from '../ec-canvas/echarts'
Component({
/**
* 组件的属性列表
*/
properties: {
tabIndex: {
type: Number,
value: 0
},
chartData: {
type: Object,
value: {}
}
// keys: {
// type: Array,
// value: ['year', 'sales']
// },
// tickCount: {
// type: Number,
// value: 4
// }
// color: {
// type: String,
// value: '#3975C6'
// }
},
observers: {
chartData: function (data) {
console.log(data, '----------------')
data.diagramList && data.diagramList.length && this.initData()
}
},
/**
* 组件的初始数据
*/
data: {
ec: {
// lazyLoad: false
lazyLoad: true
}
},
/**
* 组件的方法列表
*/
methods: {
onInitChart() {
let ecComponent = this.ecComponent || this.selectComponent('#mychart-dom-bar')
ecComponent &&
ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr
})
this.setOption(chart)
return chart
})
},
setOption(chart) {
let { chartData, tabIndex } = this.data
const abscissaDataList = [],
orderMoneyTotalList = [],
upgradeAveragePriceList = [],
upgradeRateList = []
chartData.diagramList.forEach(element => {
abscissaDataList.push(element.abscissaData)
// console.log(element.orderMoneyTotal, 'orderMoneyTotal')
orderMoneyTotalList.push(tabIndex == 0 ? element.orderMoneyTotal : element.outputValue)
upgradeAveragePriceList.push(tabIndex == 0 ? element.upgradeAveragePrice : element.avgPrice)
upgradeRateList.push(element.upgradeRate || 0)
})
// console.log(orderMoneyTotalList, 'orderMoneyTotalList')
const colors = ['#3582EE', '#35C376', '#FF9D0A']
var option = {
color: colors,
grid: {
left: '25%',
right: '15%'
},
tooltip: {
trigger: 'axis',
formatter: function(params) {
console.log(params,'formatter');
// debugger
// + '\n'
var html = params[0].name
html += '\n'
for (var i = 0; i < params.length; i++) {
let unit = i+1 == params.length? '':'\n'
let template = params[i].marker + params[i].seriesName + ':' + ' ' + params[i].value
if (option.series[params[i].seriesIndex].valueType == 'percent') {
template = template + '%' + unit
} else {
template = template + unit
}
html += template
}
// html += params[0].name
console.log(html,'html');
return html
}
},
// 滚动设置
dataZoom: [
{
type: 'slider', //隐藏或显示(true)组件
show: false,
showDetail: false, //是否显示detail,即拖拽时候显示详细数值信息
startValue: 0,
endValue: 5,
start: 50,
end: 100,
zoomLoxk: true // 是否锁定选择区域(或叫做数据窗口)的大小
},
{
//没有下面这块的话,只能拖动滚动条,鼠标滚轮在区域内不能控制外部滚动条
type: 'inside',
zoomOnMouseWheel: false, //滚轮是否触发缩放
moveOnMouseMove: true, //鼠标滚轮触发滚动
moveOnMouseWheel: true
}
],
legend: {
data: ['营业额', tabIndex ? '权益客单价' : '客单价', '转化率'],
top: 'bottom'
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true
},
data: abscissaDataList || ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
}
],
yAxis: [
{
type: 'value',
name: '营业额',
position: 'left',
alignTicks: true,
offset: -5,
axisLabel: {
formatter: '{value} 元'
}
},
{
type: 'value',
name: tabIndex ? '权益客单价' : '客单价',
position: 'right',
offset: 1000,
axisLabel: {
formatter: '{value} 元'
}
},
{
type: 'value',
name: '转化率',
position: 'right',
alignTicks: true,
axisLabel: {
formatter: '{value} %'
}
}
],
series: [
{
name: '营业额',
type: 'bar',
yAxisIndex: 0,
data: orderMoneyTotalList
},
{
name: tabIndex ? '权益客单价' : '客单价',
type: 'bar',
yAxisIndex: 0,
data: upgradeAveragePriceList
},
{
name: '转化率',
type: 'line',
yAxisIndex: 2,
data: upgradeRateList
}
]
}
chart.setOption(option)
},
//初始化数据
initData(data) {
// const xData = [],
// yData = []
// const [x, y] = this.data.keys
// data.forEach(item => {
// xData.push(item[x])
// yData.push(item[y])
// })
// this.setData({
// xData,
// yData
// })
this.onInitChart()
}
},
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-bar')
}
})
{
"component": true,
"usingComponents": {
"ec-canvas": "../ec-canvas/ec-canvas"
}
}
/* packageOutput/components/echart/echart.wxss */
// .f2-chart {
// width: 100%;
// height: 500rrpx;
// }
.ec-canvas {
width: 670rpx;
height: 520rpx;
margin-top: -20rpx;
}
.container {
box-sizing: border-box;
height: 584rpx;
padding: 20rpx 16rpx 0rpx;
background-color: #fff;
margin-bottom: 20rpx;
font-size: 36rpx;
border-radius: 16rpx;
.title {
display: flex;
justify-content: space-between;
font-weight: 600;
font-size: 28rpx;
color: #323436;
.title-tip {
font-weight: 400;
font-size: 24rpx;
color: #333;
}
.title-tip-red {
font-weight: 400;
font-size: 24rpx;
color: #db6d6d;
}
}
.content {
padding: 24rpx 20rpx 0rpx;
.row {
font-size: 24rpx;
padding: 16rpx 0;
border-bottom: 0.5rpx solid #e4e6ee;
.label {
margin-bottom: 19rpx;
}
.num {
font-weight: 600;
font-size: 36rpx;
color: #333333;
}
}
.row:last-child {
border: none;
}
.td:first-child {
width: 60%;
}
.td:nth-child(2),
.td:nth-child(3) {
width: 20%;
}
.icon-up-down {
width: 24rpx;
height: 24rpx;
}
.up {
font-weight: 600;
color: #f24724;
}
.down {
font-weight: 600;
color: #35c376;
}
}
.revenue {
box-sizing: border-box;
background-color: #fff;
padding: 20rpx 16rpx 20rpx;
margin-bottom: 20rpx;
border-radius: 16rpx;
}
.pro-rank {
.rank-item {
border-bottom: 0.5rpx solid #e4e6ee;
padding: 24rpx 0;
}
.rank-idx {
width: 36rpx;
height: 36rpx;
line-height: 40rpx;
text-align: center;
background: #999999;
border-radius: 8rpx;
font-weight: 600;
font-size: 20rpx;
color: #ffffff;
margin-right: 10rpx;
}
.rank-0 {
background-image: linear-gradient(180deg, #ffd767 0%, #f7c33f 100%);
color: #a86921;
}
.rank-1 {
background-image: linear-gradient(180deg, #dfe1e5 0%, #cbccce 100%);
color: #8b8585;
}
.rank-2 {
background-image: linear-gradient(180deg, #f6dac4 0%, #f0be98 100%);
color: #cf7334;
}
.pro-name {
width: 480rpx;
font-weight: 600;
font-size: 28rpx;
color: #333333;
}
.price {
font-weight: 600;
font-size: 36rpx;
color: #f24724;
text-align: right;
}
.tips {
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin: 18rpx 0 0 46rpx;
}
.icons {
width: 100%;
text-align: center;
padding: 20rpx 0 0;
}
.rank-icon {
width: 40rpx;
height: 40rpx;
}
}
}
\ No newline at end of file
<view class="container">
<view class="title">
趋势分析
<view class="title-tip" wx:if="{{ chartData.firstOrderDate }}">业务开展时间:{{ chartData.firstOrderDate }}</view>
</view>
<!-- <view class="" id="bar"></view> -->
<view class="ec-canvas">
<!-- force-use-old-canvas="true" -->
<ec-canvas class="echart-box" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}" ></ec-canvas>
</view>
</view>
\ No newline at end of file
......@@ -58,11 +58,13 @@ Component({
merchantFormList: [
{
label: '预计活动时间',
name: 'time'
name: 'time',
className: 'medium-no-bold'
},
{
label: '实际活动时间',
name: 'realTime'
name: 'realTime',
className: 'medium-no-bold'
},
{
label: '订单数',
......
{
"component": true,
"usingComponents": {}
"usingComponents": {},
"styleIsolation": "shared"
}
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.crowdfund-layout {
margin: 20rpx 20rpx;
// margin: 20rpx 20rpx;
height: 100%;
overflow: scroll;
padding-bottom: 136rpx;
overflow-x: hidden;
.box {
background-color: #FFFFFF;
border-radius: 8rpx;
border-radius: 16rpx;
margin-bottom: 20rpx;
}
......@@ -23,21 +26,22 @@
text-align: center;
font-weight: 500;
font-size: 26rpx;
color: #393B3E;
color: #323436;
padding: 20rpx 0;
}
&-txt {
font-family: "ali-medium";
// font-weight: 500;
height: 40rpx;
line-height: 40rpx;
margin-bottom: 14rpx;
// font-weight: 600;
// font-family: 'number';
margin-bottom: 12rpx;
font-size: 28rpx;
}
&-label {
font-size: 20rpx;
color: #8A8C90;
font-size: 24rpx;
color: #323436;
}
}
......@@ -61,6 +65,7 @@
&-title {
width: 70%;
color: #323436;
}
&-link {
......@@ -122,9 +127,17 @@
}
&-txt {
font-family: "ali-bold";
font-weight: 700;
font-size: 26rpx;
color: #323436;
}
&-txt.medium-no-bold {
font-family: "ali-medium";
font-weight: 400;
}
&-txt.red {
color: #F35251;
}
......@@ -224,7 +237,7 @@
content: '';
position: absolute;
bottom: -27rpx;
right: 67rpx;
right: 67rpx;
width: 0;
height: 0;
border: 18rpx solid;
......@@ -284,6 +297,8 @@
.txt-red {
color: #F35251;
font-family: "ali-bold";
font-weight: 700;
}
// .th,
......@@ -332,14 +347,16 @@
margin-top: 32rpx;
.suggest-title {
box-sizing: border-box;
width: 116rpx;
height: 36rpx;
line-height: 36rpx;
font-weight: 600;
font-size: 20rpx;
color: #3E71FE;
background: rgba(62, 113, 254, 0.12);
background: #3e71fe1f;
border-radius: 4rpx;
padding: 0 8rpx;
}
.suggest-txt {
......@@ -368,7 +385,7 @@
.step-txt {
width: calc(100% - 72rpx);
font-size: 22rpx;
color: #8A8C90;
color: #636465;
}
}
}
......@@ -387,11 +404,12 @@
box-sizing: border-box;
display: flex;
font-size: 20rpx;
font-weight: 600;
color: #3666FE;
padding: 0 20rpx;
height: 100%;
background: rgba(54, 102, 254, 0.06);
border: 2rpx solid rgba(62,113,254,0.70);
height: 52rpx;
line-height: 51rpx;
border: 1rpx solid #3E71FE;
border-radius: 30rpx;
margin-right: 4rpx;
......
......@@ -42,7 +42,7 @@
<view class="rank-left">
<view class="rank-num">{{idx + 1}}</view>
<view class="rank-head">
<glsx-image wx:if="{{subItem.shareType == 1}}" class="icon-wechat" src="output/icon-wechat.webp" />
<glsx-image wx:if="{{subItem.shareType == 1}}" class="icon-wechat" src="output/icon-wechat-sigle.png" />
<image wx:if="{{subItem.imageUrl}}" src="{{subItem.imageUrl}}" />
<glsx-image wx:else src="output/icon-head.webp" />
</view>
......
// packagesList/packageOutput/components/outputEchart/outputEchart.js
Component({
/**
* 组件的属性列表
*/
properties: {
tabIndex: {
type: Number,
value: 0
},
revenueData: {
type: Object,
value: {},
observer: function () {
this.initRevenueData()
}
},
chartData: {
type: Object,
value: []
},
chartDataPie: {
type: Object,
value: {}
},
customerList: {
type: Object,
value: []
}
},
/**
* 组件的初始数据
*/
data: {
// chartData: [],
opts: {
keys: ['abscissaValue', 'ordinateValue'],
tickCount: 8
},
revenueFormData: {
membraneList: [
{
label: '营业额(元)',
name: 'orderMoneyTotalData'
},
{
label: '客单价(元)',
name: 'upgradeAveragePriceData'
},
{
label: '订单量',
name: 'upgradeCountTotalData'
},
{
label: '转化率',
name: 'upgradeRateData'
}
],
equityList: [
{
label: '营业额(元)',
name: 'outputValueData'
},
{
label: '权益客单价(元)',
name: 'avgPriceData'
},
{
label: '成交客户量',
name: 'successCountData'
},
{
label: '转化率',
name: 'upgradeRateData'
}
]
}
},
attached() {},
/**
* 组件的方法列表
*/
methods: {
initRevenueData() {
// let {revenueData,}
}
}
})
{
"component": true,
"usingComponents": {
"echart": "../echart/echart",
"echart-pie": "../echart-pie/echart"
}
}
\ No newline at end of file
/* packagesList/packageOutput/components/outputEchart/outputEchart.wxss */
.container {
// padding: 20rpx 16rpx;
margin-bottom: 20rpx;
font-size: 36rpx;
// border-radius: 16rpx;
.title {
display: flex;
justify-content: space-between;
font-weight: 600;
font-size: 28rpx;
color: #323436;
.title-tip {
font-weight: 400;
font-size: 20rpx;
color: #999999;
}
.title-tip-red {
font-weight: 400;
font-size: 24rpx;
color: #db6d6d;
}
}
.content {
padding: 24rpx 20rpx 0rpx;
.row {
height: 115rpx;
font-size: 24rpx;
padding: 16rpx 0;
border-bottom: 0.5rpx solid #e4e6ee;
.label {
line-height: 18rpx;
margin-bottom: 22rpx;
}
.num {
font-weight: 600;
line-height: 22rpx;
font-size: 36rpx;
color: #333333;
}
}
.row:last-child {
border: none;
}
.td:first-child {
width: 55%;
}
.td:nth-child(2){
width: 25%;
}
// .td:nth-child(2),
.td:nth-child(3) {
width: 20%;
}
.icon-up-down {
width: 24rpx;
height: 24rpx;
}
.up {
font-weight: 600;
color: #f24724;
}
.down {
font-weight: 600;
color: #35c376;
}
}
.revenue {
box-sizing: border-box;
background-color: #fff;
padding: 20rpx 16rpx 20rpx;
margin-bottom: 20rpx;
border-radius: 16rpx;
}
.pro-rank {
.rank-item {
border-bottom: 0.5rpx solid #e4e6ee;
padding: 24rpx 0;
}
.rank-idx {
width: 36rpx;
height: 36rpx;
line-height: 40rpx;
text-align: center;
background: #999999;
border-radius: 8rpx;
font-weight: 600;
font-size: 20rpx;
color: #ffffff;
margin-right: 10rpx;
}
.rank-0 {
background-image: linear-gradient(180deg, #ffd767 0%, #f7c33f 100%);
color: #a86921;
}
.rank-1 {
background-image: linear-gradient(180deg, #dfe1e5 0%, #cbccce 100%);
color: #8b8585;
}
.rank-2 {
background-image: linear-gradient(180deg, #f6dac4 0%, #f0be98 100%);
color: #cf7334;
}
.pro-name {
width: 480rpx;
font-weight: 600;
font-size: 28rpx;
color: #333333;
}
.price {
font-weight: 600;
font-size: 36rpx;
color: #f24724;
text-align: right;
}
.tips {
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin: 18rpx 0 0 46rpx;
}
.icons {
width: 100%;
text-align: center;
padding: 20rpx 0 0;
}
.rank-icon {
width: 40rpx;
height: 40rpx;
}
}
}
.container.revenue {
padding: 20rpx 0 20rpx 16rpx;
.title-tip {
margin-right: 16rpx;
}
}
.container.rank {
padding: 24rpx 10rpx 0 20rpx;
}
.container.result {
background-image: linear-gradient(0deg, #f8fbff 0%, #eff5fe 100%);
border-radius: 16rpx;
.content {
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
.resultContainer {
padding: 20rpx 16rpx 40rpx;
background-image: linear-gradient(0deg, #f8fbff 0%, #eff5fe 100%);
border-radius: 16rpx;
.content {
font-weight: 400;
font-size: 24rpx;
color: #333333;
}
}
.flex {
display: flex;
align-items: center;
}
.container {
// height: 370rrpx;
height: 100%;
overflow: scroll;
overflow-x: hidden;
// background-color: #fff;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
\ No newline at end of file
<!--packagesList/packageOutput/components/outputEchart/outputEchart.wxml-->
<!-- <text>packagesList/packageOutput/components/outputEchart/outputEchart.wxml</text> -->
<wxs src="../../index.wxs" module="filter" />
<view class="container">
<view class="revenue">
<view class="title">
营收概要
<!-- <view wx:if="{{ phone && outputObj }}" class="title-tip">当月产值目标:{{
outputObj.targetOutputValue || 0 }}元
完成进度{{ outputObj.currentProgress || 0 }}%</view> -->
</view>
<view class="content">
<view wx:for="{{ tabIndex? revenueFormData.equityList: revenueFormData.membraneList }}" wx:key="index" class="flex row">
<view class="td">
<view class="label">{{ item.label }}</view>
<view class="num">{{filter.filterItemName(item,revenueData)}}</view>
</view>
<view class="td">
<view class="label">较上月</view>
<view class="flex">
<view class="{{ revenueData[item.name].revenueToClassMonth }}">{{revenueData[item.name].comparedWithLastMonth }}</view>
<image
wx:if="{{ revenueData[item.name].revenueToClassMonth }}"
class="icon-up-down"
src="../../images/icon-{{ revenueData[item.name].revenueToClassMonth }}.png"
/>
</view>
</view>
<view class="td">
<view class="label">较去年</view>
<view class="flex">
<view :class="{{ revenueData[item.name].revenueToClassYear }}">{{revenueData[item.name].comparedWithLastYear }}</view>
<image
wx:if="{{ revenueData[item.name].revenueToClassYear }}"
class="icon-up-down"
src="../../images/icon-'{{ revenueData[item.name].revenueToClassYear }}.png"
/>
</view>
</view>
</view>
</view>
</view>
<echart chartData="{{ chartData }}" tickCount="{{ opts.tickCount }}" keys="{{ opts.keys }}" tabIndex="{{ tabIndex }}"></echart>
<echart-pie
wx:if="{{ !tabIndex }}"
chartData="{{ chartDataPie }}"
customerList="{{ customerList }}"
tickCount="{{ opts.tickCount }}"
keys="{{ opts.keys }}"
></echart-pie>
<!-- wx:if="{{ chartData.diagnosticResults && !tabIndx }}" -->
<view class="resultContainer" wx:if="{{ chartData.diagnosticResults && !tabIndex }}">
<view class="title">诊断结果</view>
<view class="content">{{ chartData.diagnosticResults }}</view>
</view>
</view>
\ No newline at end of file
......@@ -46,11 +46,54 @@ var threeNumForTwo = {
}
}
var filterItemName = function (item,revenueData) {
console.log(item,revenueData);
var unit = item.name == 'upgradeRateData' ? '%' : ''
if (revenueData && revenueData[item.name]) {
return (revenueData[item.name].value || 0) + unit
} else{
return 0 + unit
}
}
var revenueToClass = function (item,revenueData,name) {
console.log(item,revenueData,name);
// var unit = item.name == 'upgradeRateData' ? '%' : ''
if (revenueData && revenueData[item.name]&&revenueData[item.name][name]) {
const val = revenueData[item.name][name]
return val > 0 ? 'up' : 'down'
}
}
var dateFormatSlash = function (date) {
// 验证日期格式
if (!date) return;
console.log(date);
// var regex = /^\d{4}-\d{2}-\d{2}$/; 不支持正则表达式
// if (typeof date !== 'string' || !regex.test(date)) {
// console.log('Invalid date format. Expected format: "YYYY-MM-DD"');
// return
// }
// 解构赋值提取年、月和日
var parts = date.split('-');
var year = parts[0];
var month = parts[1];
var day = parts[2] || '';
// 构建日期字符串
if (day) {
return year + '/' + month + '/' + day; // 带有日的格式:YY/MM/DD
} else {
return year + '/' + month; // 只有年月的格式:YY/MM
}
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
filterItemName:filterItemName,
revenueToClass:revenueToClass,
dateFormatSlash:dateFormatSlash,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
}
{
"component": true,
"usingComponents": {
"tab": "../../components/Tab/Tab",
"output-echart": "../../components/outputEchart/outputEchart",
"output-crowdfund": "../../components/outputCrowdfund/outputCrowdfund",
"CalendarMonth": "/components/CalendarMonth/CalendarMonth"
},
"navigationStyle": "custom"
}
/* packagesList/packageOutput/pages/openNewBusiness/openNewBusiness.wxss */
.layout {
box-sizing: border-box;
position: relative;
// padding: 400rpx 16rpx 0;
// padding-top: 400rpx;
padding-top: 80rpx;
font-size: 24rpx;
color: #8A8C90;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
.flex {
display: flex;
}
.titleBox {
box-sizing: border-box;
position: relative;
padding: 0 32rpx;
display: flex;
height: 88rpx;
// padding-top: 80rpx;
align-items: center;
width: 100%;
justify-content: center;
font-weight: 500;
font-size: 28rpx;
color: #282829;
}
.imgBox {
position: absolute;
left: 40rpx;
// margin-right: auto;
}
.titleBox .imgBox image {
width: 40rpx;
height: 40rpx;
display: inline-block;
vertical-align: middle;
}
.navigation-title-text {
max-width: 55%;
}
&::after {
content: '';
width: 100%;
// height: 350rpx;
height: 320rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.tabContainer {
height: 100rpx;
font-weight: 600;
.tab{
.text{
font-size: 32rpx!important;
}
}
// padding: 0 32rpx;
// background-color: #F2F3F7;
}
.tab.active {
.text {
font-size: 32rpx !important;
color: #323436 !important;
}
}
.searchBar {
height: 88rpx;
// line-height: 88rpx;
background-color: #fff;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
.calendarMonthCon {
margin-left: auto;
display: flex;
align-items: center;
}
.checkCon {
display: flex;
align-items: center;
.checkoutBox {
box-sizing: border-box;
width: 24rpx;
height: 24rpx;
border: 2rpx solid #5A6066;
border-radius: 4rpx;
}
.checkBox {
margin-right: 8rpx;
width: 24rpx;
height: 24rpx;
}
}
.monthNow {
width: 96rpx;
height: 52rpx;
background: #F7F7F7;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 26rpx;
color: #333333;
line-height: 52rpx;
text-align: center;
margin-left: auto;
margin-right: 20rpx;
&.active {
color: #3666FE;
background: #ebf2fd;
}
}
.dateNum {
box-sizing: border-box;
display: flex;
align-items: center;
white-space: nowrap;
height: 52rpx;
padding: 8rpx 24rpx;
border-radius: 8rpx;
font-weight: 500;
font-size: 26rpx;
color: #3666FE;
background-color: rgba(24, 102, 254, .1);
.arrow {
width: 40rpx;
height: 40rpx;
.arrowIcon {
width: 100%;
height: 100%;
}
}
}
.dateNum.custom {
color: #333333;
background: #F7F7F7;
}
}
.conCom {
box-sizing: border-box;
height: calc(100%);
padding: 20rpx 20rpx 60rpx;
// overflow: scroll;
overflow: hidden;
}
.container {
box-sizing: border-box;
height: calc(100% - 80rpx);
background-color: #F2F3F7;
}
.container::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
// 众筹产品
.activity-box {
width: 100%;
height: 64rpx;
margin: 12rpx 0;
.activity-item {
box-sizing: border-box;
flex-shrink: 0;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
padding: 0 16rpx;
margin-right: 16rpx;
border-radius: 8rpx;
background: #F7F7F7;
}
.activity-item:last-child {
margin-right: 0;
}
.activity-item.open {
color: #323436;
}
.activity-item.no-open {
color: #CCCED1;
}
.activity-item.active {
border-width: 0;
}
.activity-item.open.active {
background: #3666fe1a;
color: #3666FE;
}
.activity-item.no-open.active {
background: #3666fe1a;
color: #949494;
}
}
// 众筹内容
.activity-content {
position: relative;
width: 100%;
height: 100%;
.content-empty {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.img-empty {
width: 512rpx;
height: 512rpx;
}
}
}
.btn-box {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 116rpx;
background-color: #FFFFFF;
}
.btn-box.shadow {
box-shadow: 0 -2rpx 2rpx 0 rgba(0, 0, 0, 0.08);
}
.btn {
width: calc(100% - 64rpx);
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
margin: 14rpx 32rpx;
.btn-blue {
background: #3666FE;
border-radius: 8rpx;
}
.btn-disabled {
background: #CCCED1;
border-radius: 8rpx;
}
.btn-share {
background: #3666FE;
border-radius: 12rpx;
// animation: xing ease-in-out 2s infinite;
}
}
}
\ No newline at end of file
<!--packagesList/packageOutput/pages/openNewBusiness/openNewBusiness.wxml-->
<!-- <text>packagesList/packageOutput/pages/openNewBusiness/openNewBusiness.wxml</text> -->
<wxs src="../../index.wxs" module="filter" />
<navigation-bar showBack navStyle="background-color: transparent;" bindnavbarReady="navbarReady">
{{merchantInfo.merchantName}}
</navigation-bar>
<!-- - {{tabBarStyle}}px -->
<view class="layout" style="padding-top:{{tabBarStyle}}px; height:calc(100vh )">
<!-- <view class="titleBox">
<view class="imgBox" bind:tap="back">
<image src="../../images/blackArrow.png" />
</view>
<view class="navigation-title-text text-hide">{{merchantInfo.merchantName}}</view>
</view> -->
<tab tab="{{ tabList }}" itemWidth="{{ '30%' }}" index="{{ tabIndx }}" bindclick="changeTabIndx" class="tabContainer" />
<view class="searchBar">
<view class="checkCon" wx:if="{{ tabIndx == 0 }}">
<view class="checkoutBox checkBox" bind:tap="changeStatus" wx:if="{{ !allType }}"></view>
<image class="checkBox" bind:tap="changeStatus" wx:if="{{ allType }}" src="../../images/checkoutIcon.png"></image>
查看全品类
</view>
<view class="calendarMonthCon" wx:if="{{ tabIndx != 1 }}">
<view class="monthNow {{ dateObj.nowMonth ? 'active' : '' }}" bind:tap="handleMonthNow">本月</view>
<CalendarMonth
allowSameDay
shortcut
bind:select="rangeSelect"
bind:tapCalendar="tapCalendar"
rangeAll
dateType="range"
calenderColor="#3666FE"
vertical
minDate="2020-10-01"
maxDate="{{ dateObj.today }}"
isComponents
isChangeType="{{ false }}"
forceFullSucreen="{{ bottomLift>0?true:false }}"
dayType="{{ 0 }}"
>
<view class="item dateNum {{ dateObj.nowMonth ? 'custom' : '' }}">
<view wx:if="{{ dateObj.type == 'today' }}">自定义</view>
<view wx:elif="{{ dateObj.nowMonth }}">{{ dateObj.today }}</view>
<view wx:else>{{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}}</view>
<view class="arrow {{ whiteArrow ? 'move' : '' }}">
<image class="arrowIcon" src="../../images/blackArrowIcon.png" />
</view>
</view>
</CalendarMonth>
</view>
<!-- 众筹 -->
<scroll-view
wx:if="{{ tabIndx == 1 }}"
scroll-x="{{ true }}"
enable-flex
class="activity-box"
scroll-with-animation
scroll-left="{{ scrollLeft }}"
>
<view class="flex">
<view
class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.openFlag == 1 ? 'open' : 'no-open' }}"
wx:for="{{ scenceList[0].productList }}"
wx:key="index"
bindtap="handleActChange"
data-idx="{{ index }}"
>{{item.productName}}</view>
</view>
</scroll-view>
</view>
<view class="conCom">
<view wx:if="{{ tabIndx == 1 }}" class="activity-content container">
<output-crowdfund
wx:if="{{ isShowData }}"
orderObj="{{ activityList[activityActive].outputData }}"
bind:handleZhanReport="handleZhanReport"
bind:posterTrack="posterTrack"
hasReport="{{ !isMock.SC004 }}"
/>
<view wx:else class="content-empty">
<image class="img-empty" src="{{ IMGURL}}output/sun-empty-transparent.png?v={{img_version }}" />
</view>
<view
wx:if="{{ activityList.length && isShowData && activityList[activityActive].outputData.shareBtnIdx && activityList[activityActive].outputData.shareBtnIdx != -1 }}"
class="isFullSucreen btn-box shadow"
bindtap="handleBtnShare"
>
<view class="btn">
<view class="btn-share">活动进行中,分享母链海报开展活动</view>
</view>
</view>
</view>
<output-echart
wx:else
class="container"
revenueData="{{ revenueData }}"
chartData="{{ lineChart }}"
chartDataPie="{{ chartDataPie }}"
tabIndex="{{ tabIndx }}"
customerList="{{ customerList }}"
></output-echart>
</view>
<!-- <output-echart></output-echart>
<output-crowdfund></output-crowdfund> -->
</view>
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{true}}" bindlongtouch="longtouch" />
\ No newline at end of file
......@@ -8,6 +8,7 @@ const IMAGES = Object.freeze({
icon2: `personal/icon3.png`,
icon3: `personal/icon4.png`,
icon4: `personal/icon5.png`,
icon5: `personal/icon6.png`,
userAvatarUrl: `/personal/userAvatarUrl.png`
})
import { unreadApi, readApi } from '~/api/index.js'
......@@ -43,7 +44,14 @@ Page({
name: '客户管理',
path: 'packageMine.customerList',
isHide: true
}],
},
{
name: '更新日志',
path: 'packageMine.log',
isHide: false,
newTips:true
}
],
isShowService: false,
},
navGO(e) {
......@@ -156,7 +164,12 @@ Page({
})
}
},
async getVersionInfo() {
const versionData = await getApp().getVersionInfo()
this.setData({
versionData
})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -167,14 +180,17 @@ Page({
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({
serviceMerchantId,
userInfo: userInfo.subLoginUser
// userInfo: userInfo.subLoginUser
userInfo
})
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
})
// v4.27.0_0831版本隐藏加微入口
// this.setData({
// isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
// })
this.judgeIsHide()
this.getVersionInfo()
console.log(serviceMerchantId)
},
/**
......@@ -186,8 +202,20 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.messageBoxPageIsRead()
this.getUnreadApi()
let {
versionData
} = this.data
if (versionData) {
versionData = wx.$versionConfig.compare()
wx.nextTick(() => {
this.setData({
versionData
})
})
}
},
/**
......
......@@ -64,8 +64,8 @@ page {
.headPortrait {
width: 128rpx;
height: 128rpx;
border-radius: 64rpx;
border: 2rpx solid #fff;
// border-radius: 64rpx;
// border: 2rpx solid #fff;
}
.name {
......@@ -130,6 +130,21 @@ page {
right: 20rpx;
z-index: 1;
}
.new {
width: 52rpx;
height: 22rpx;
background: #F36261;
color: #EEEEEE;
border-radius: 12rpx;
position: absolute;
top: 13rpx;
font-size: 20rpx;
text-align: center;
line-height: 22rpx;
right: -5rpx;
z-index: 1;
}
}
.name {
......@@ -140,6 +155,41 @@ page {
}
}
.update {
height: 112rpx;
background: #2C3255;
font-weight: 500;
font-size: 15px;
color: #FFFFFF;
display: flex;
align-items: center;
padding: 0 16rpx;
.icon {
width: 64rpx;
height: 64rpx;
margin-right: 4rpx;
}
.new {
margin-left: 16rpx;
width: 52rpx;
height: 28rpx;
font-size: 18rpx;
color: #FFFFFF;
line-height: 28rpx;
text-align: center;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
border-radius: 14rpx;
}
.arrow {
margin-left: auto;
width: 32rpx;
height: 32rpx;
}
}
.logoutBtn {
position: fixed;
bottom: 106rpx;
......@@ -150,4 +200,7 @@ page {
font-weight: 400 !important;
border: 2rpx solid #EEEEEE !important;
background-color: #fff !important;
width: 336rpx;
height: 88rpx;
line-height: 88rpx;
}
\ No newline at end of file
......@@ -14,28 +14,28 @@
</view>
<view class="utilBoxTitle">常用工具</view>
<view class="boxItemCon">
<view wx:for="{{boxItemList}}" wx:key="index" class="item" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<view wx:for="{{boxItemList}}" wx:key="index" class="{{item.isHide ? '': 'item'}}" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<block wx:if="{{!item.isHide}}">
<view class="imgcon">
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" />
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" ></view>
<view wx:if="{{item.newTips}}" class="new" hidden="{{!versionData.isNew}}">new</view>
<glsx-image class="img" src="{{IMAGES['icon' + index]}}" />
</view>
<view class="name">{{item.name}}</view>
</block>
</view>
<!-- <view class="item" data-path="packagesList.customerManagement" bind:tap="navGO">
<view class="imgcon">
<glsx-image class="img" src="{{IMAGES.icon0}}" />
</view>
<view class="name">客户管理</view>
</view>
<view class="item" data-path="packagesList.messageBox" bind:tap="navGO">
<view class="imgcon">
<view class="redPot" hidden="{{!isRead}}" />
<glsx-image class="img" src="{{test}}" />
</view>
<view class="name">消息盒子</view>
</view> -->
<!-- <view class="update" bindtap="jump">
<view class="icon">
<glsx-image class="logo" webp src="store-assistant/menu/log.png"></glsx-image>
</view>
更新日志
<block wx:if="{{versionData.isNew}}">
<view class="new">NEW</view>
</block>
<view class="arrow">
<glsx-image class="logo" webp src="store-assistant/menu/log-arrow.png"></glsx-image>
</view>
</view> -->
</view>
<button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
退出登录
......
......@@ -14,7 +14,7 @@ Page({
agree: true,
tabIndx: 0,
// tabList: ['我的客户', '我的门店', '我的员工'],
tabList: ['我的客户', '我的员工'],
tabList: ['我的门店', '我的员工'],
popupShow: false,
subIndex: -1,
merchantList: [
......@@ -33,12 +33,12 @@ Page({
},
// 切换园区
tapPicker() {
let { isSuper } = this.data
isSuper &&
this.setData({
moveArrow: !this.data.moveArrow,
popupShow: !this.data.popupShow
})
// let { isSuper } = this.data
// isSuper &&
this.setData({
moveArrow: !this.data.moveArrow,
popupShow: !this.data.popupShow
})
},
navbarReady(e) {
let { height, statusBarHeight } = e.detail
......@@ -48,8 +48,9 @@ Page({
// console.log(e)
},
changeTabIndx(e) {
const { idx } = e.currentTarget.dataset
this.setData({
tabIndx: e.detail
tabIndx: idx
})
},
init() {
......
{
"usingComponents": {
"navigation-bar": "../../../components/NavigationBar/NavigationBar",
"tab": "../../../components/Tab/Tab",
"client": "./components/client/client",
"merchant": "./components/merchant/mrechant",
"staff": "./components/staff/staff",
"search-input": "../../../components/SearchInput/SearchInput",
"accountSwitchingPop": "./components/accountSwitchingPop/accountSwitchingPop",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!