Commit 0afbbe08 by 张立顺

Merge branch 'v4.27.0_0831' of http://192.168.3.233:8090/saas_plus/business-assi…

…stant into v4.27.0_0831
2 parents 0398985b 4ad7d60a
Showing 39 changed files with 364 additions and 300 deletions
......@@ -11,7 +11,7 @@
},
"glsx-applet-component": {
"version": "1.1.18",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.18.tgz",
"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": {
......
......@@ -29,7 +29,7 @@
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
style="height:calc(100vh - 108rpx - {{tabBarStyle}}px)"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{serviceList}}" wx:key="index">
......
......@@ -4,13 +4,11 @@ Component({
* 组件的属性列表
*/
properties: {
selectInfo: {
staffTypeSelectInfo: {
type: Object,
observer: function(n) {
console.log(n)
this.setData({
copySelectInfo: n
})
this.setData({copyStaffTypeSelectInfo: n})
}
},
popShow: {
......@@ -49,7 +47,7 @@ Component({
staffBusinessTypeStr: '技师'
}
],
copySelectInfo: {}
copyStaffTypeSelectInfo: {}
},
/**
......@@ -62,12 +60,12 @@ Component({
select(e) {
let { target } = e.currentTarget.dataset
this.setData({
copySelectInfo: target
copyStaffTypeSelectInfo: target
})
},
confirm() {
let { copySelectInfo } = this.data
this.triggerEvent('confirm', copySelectInfo)
let { copyStaffTypeSelectInfo } = this.data
this.triggerEvent('confirm', copyStaffTypeSelectInfo)
this.hidePopup()
}
}
......
......@@ -7,7 +7,7 @@
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
class="itemCon text-hide {{item.staffBusinessType == copySelectInfo.staffBusinessType?'active':''}}"
class="itemCon text-hide {{item.staffBusinessType == copyStaffTypeSelectInfo.staffBusinessType?'active':''}}"
data-target="{{item}}"
bindtap="select">
{{item.staffBusinessTypeStr}}
......
// 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() {
}
// 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"
{
"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 {
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;
}
}
}
}
/* packageStoreAssistant/packageActivity/pages/log/log.wxss */
.layout {
.bg {
position: relative;
z-index: -1;
width: 100%;
height: 400rpx;
}
.log-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;
}
}
}
}
}
\ No newline at end of file
<view class="layout">
<navigation-bar showBack navStyle="background-color: transparent;">
生意助手更新记录
</navigation-bar>
<view class="bg">
<glsx-image 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 class="layout">
<navigation-bar showBack navStyle="background-color: transparent;">
生意助手更新记录
</navigation-bar>
<view class="bg">
<glsx-image 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
const phoneRex = /^[1]([3-9])[0-9]{9}$/
const formRule = {
selectInfo: [{ required: true, message: '所属服务中心不能为空' }],
staffBusinessType: [{ required: true, message: '员工类型不能为空' }],
staffTypeSelectInfo: [{ required: true, message: '员工类型不能为空' }],
staffName: [{ required: true, message: '员工姓名不能为空' }],
staffPhone: [
{ required: true, message: '手机号码不能为空' },
......@@ -22,7 +22,7 @@ const formItems = [{
pageType: 1
}, {
label: '员工类型',
props: 'staffBusinessType',
props: 'staffTypeSelectInfo',
valueFn: 'staffBusinessTypeStr',
type: 'select',
placeholder: '请选择员工类型',
......
......@@ -17,7 +17,13 @@ Page({
formData: {
selectedConnectionIds: [],
connectionValue: '全部',
visualType: 0 // 0:全部 1:选中部分可见客户
visualType: 0, // 0:全部 1:选中部分可见客户
staffBusinessType: '0',
staffBusinessTypeStr: '驻店',
staffTypeSelectInfo: {
staffBusinessType: '0',
staffBusinessTypeStr: '驻店',
}
},
showServiceConfirm: false,
isConfirm: false,
......@@ -52,12 +58,13 @@ Page({
let optionsInfo = options?.info || {}
let data = options?.info ? {
...options?.info,
selectInfo: {yqMerchantId: optionsInfo.merchantNo, yqMerchantName: optionsInfo.merchantName, staffBusinessType: optionsInfo?.staffBusinessType},
selectInfo: {yqMerchantId: optionsInfo.merchantNo, yqMerchantName: optionsInfo.merchantName},
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)}) : [],
staffBusinessTypeStr: optionsInfo.staffBusinessType == 0 ? '驻店' : optionsInfo.staffBusinessType == 1 ? '技师' : ''
staffBusinessTypeStr: optionsInfo.staffBusinessType == 0 ? '驻店' : optionsInfo.staffBusinessType == 1 ? '技师' : '',
staffTypeSelectInfo: optionsInfo?.staffBusinessType ? {staffBusinessType: optionsInfo?.staffBusinessType} : undefined
} : {}
this.setData({
addOrEdit: options?.info ? 'edit' : 'add',
......@@ -153,10 +160,8 @@ Page({
let obj = {
...formData,
...e.detail,
selectInfo: {
...formData.selectInfo,
...e.detail
}
selectInfo: formData.selectInfo,
staffTypeSelectInfo: e.detail
}
this.setData({
formData: obj
......
......@@ -30,4 +30,4 @@
</view>
</view>
<select-service-confirm show="{{showServiceConfirm}}" tabBarStyle="{{tabBarStyle}}" serviceList="{{serviceList}}" selectInfo="{{formData.selectInfo}}" bind:hiddenSelectConfirm="hiddenSelectConfirm"></select-service-confirm>
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{formData.selectInfo}}" bindconfirm="staffTypeConfiem" popShow="{{staffPopupShow}}" notAll="{{true}}"/>
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{formData.selectInfo}}" staffTypeSelectInfo="{{formData.staffTypeSelectInfo}}" bindconfirm="staffTypeConfiem" popShow="{{staffPopupShow}}" notAll="{{true}}"/>
......@@ -71,12 +71,12 @@ Page({
isAsk: true
})
mineApi.getStaffListAPI(params).then(res => {
let tempList = isReset ? res?.list || [] : this.data.staffList.concat(res?.list || [])
let tempList = isReset ? res?.data || [] : this.data.staffList.concat(res?.data || [])
this.setData({
staffList: tempList,
currentPage: currentPage + 1,
total: res.total,
nothing: res.total == tempList.length,
total: res.count,
nothing: res.count == tempList.length,
triggered: false
})
if (isReset) {
......
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.crowdfund-layout {
// margin: 20rpx 20rpx;
height: 100%;
overflow: scroll;
padding-bottom: 136rpx;
.box {
......
......@@ -44,6 +44,10 @@
vertical-align: middle;
}
.navigation-title-text {
max-width: 55%;
}
&::after {
content: '';
width: 100%;
......@@ -181,7 +185,7 @@
.activity-box {
width: 100%;
height: 64rpx;
margin-top: 12rpx;
margin: 12rpx 0;
.activity-item {
box-sizing: border-box;
......
......@@ -6,7 +6,7 @@
<view class="imgBox" bind:tap="back">
<image src="../../images/blackArrow.png" />
</view>
<view class="navigation-title-text">广西弘泽汽车销售服务…</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">
......@@ -64,7 +64,7 @@
</scroll-view>
</view>
<view class="conCom">
<view wx:if="{{ tabIndx == 1 }}" class="activity-content">
<view wx:if="{{ tabIndx == 1 }}" class="activity-content container">
<output-crowdfund
wx:if="{{ isShowData }}"
orderObj="{{ activityList[activityActive].outputData }}"
......
......@@ -200,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,15 +14,15 @@
</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">
<block wx:if="{{!item.isHide}}">
<view wx:for="{{boxItemList}}" wx:key="index" class="{{item.isHide ? '': 'item'}}" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<view wx:if="{{!item.isHide}}">
<view class="imgcon">
<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>
<!-- <view class="update" bindtap="jump">
<view class="icon">
......
......@@ -49,6 +49,6 @@ Component({
methods: {
hidePopup() {
this.triggerEvent('hidePopup')
},
}
}
})
......@@ -3,10 +3,11 @@
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
bindconfirm="hidePopup"
height="60%"
title="员工提成"
customIsTab="{{true}}"
only="{{false}}"
customPopupSlotStyle="height: calc(100% - 200rpx)">
<!-- 服务多家门店不显示门店名称 -->
<view class="title_tips">
......
......@@ -61,7 +61,7 @@ Component({
pageLoaded: true,
userInfo
})
getMerchantListApi({serviceMerchantId: userInfo?.subLoginUser?.merchantId}).then(res => {
getMerchantListApi({serviceMerchantId: userInfo?.isSuper ? '' : userInfo?.subLoginUser?.merchantId}).then(res => {
let { code, data } = res
if (code == '0') {
this.setData({
......
......@@ -17,7 +17,7 @@ Component({
thisPage.setData({
isShowFilterScreen: true
})
if (!this.data.formData.startTime || !this.data.formData.endTime) this.setDate() // 未选择时间默认展示当前月份
this.setDate() // 默认展示当前月份
this.setViewData()
}
}
......@@ -214,6 +214,7 @@ Component({
formData.sceneType = sceneList.filter(val => val.active)[0]?.id || ''
formData.staffUUIDs = staffList.filter(val => val.active).map(subVal => {if (subVal.uuid) return subVal.uuid})
this.triggerEvent('screenFlag')
this.setData({screenFlag: true})
const thisPage = wx.$router.getPageInstance()
if (formData?.partnerMerchantIds[0] !== userInfo.subLoginUser.merchantId) {
USERAPI.switchSubLoginInfo({ merchantId: formData?.partnerMerchantIds[0] }).then(res => {
......@@ -240,8 +241,7 @@ Component({
reset() {
let { formData, userInfo, sceneList, staffList, tabType, merchantRange, subIndex } = this.data
formData.partnerMerchantIds = [userInfo.subLoginUser.merchantId]
formData.startTime = ''
formData.endTime = ''
this.setDate()
formData.sceneType = ''
formData.staffUUIDs = []
if (tabType == 0) {
......
......@@ -22,13 +22,11 @@ Component({
} else {
item.act = false
}
this.setData({
merchantRange,
selectedMerchantId: selectInfo.partnerMerchantIds[0]
})
})
this.setData({
searchKeyword: ''
searchKeyword: '',
merchantRange,
selectedMerchantId: selectInfo.partnerMerchantIds[0] || ''
})
}
}
......@@ -96,8 +94,14 @@ Component({
})
},
input(e) {
let { merchantRange, selectedMerchantId } = this.data
let { value } = e.detail
this.setData({
searchKeyword: value
})
},
search(e) {
let { merchantRange, selectedMerchantId } = this.data
let { value } = e.currentTarget.dataset && Object.keys(e.currentTarget.dataset).length ? e.currentTarget.dataset : e.detail
merchantRange.forEach(item => {
item.act = false
item.show = item.merchantName.includes(value)
......
......@@ -13,13 +13,10 @@
type="text"
placeholder="请搜索服务商账号名"
class="input"
value="{{keyword}}"
value="{{searchKeyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
......@@ -28,9 +25,6 @@
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
......
......@@ -68,6 +68,7 @@ Component({
},
actionOperationResult(val1, val2, rate = false){
if (!val2) return flag ? 0 : '0.00'
const p = this.actionOperation(val1, val2)
let flag = Number.isInteger(((val1 * p) / (val2 * p)) * 100) // 是否是整数
return rate ? (flag ? ((val1 * p) / (val2 * p)) * 100 : (((val1 * p) / (val2 * p)) * 100).toFixed(2)) : ((val1 * p) / (val2 * p)).toFixed(2)
......@@ -97,6 +98,7 @@ Component({
...thisPage.data.screenFormData
}
delete params.shopMerchantNames
delete params.sceneType // 删除场景参数
if (nothing || isAsk) {
return
}
......
......@@ -44,12 +44,22 @@
margin: 6rpx 0 0 8rpx;
font-size: 20rpx;
color: #8A8C90;
display: flex;
view{
max-width: 160rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.output_text text{
color: #4772FC;
font-size: 36rpx;
font-weight: 700;
.output_text {
position: relative;
text{
color: #4772FC;
font-size: 36rpx;
font-weight: 700;
}
}
.merchant_num{
margin-left: 64rpx;
......
......@@ -18,9 +18,10 @@
<view class="flex">
<glsx-image class="headPortrait" src="{{item.userAvatarUrl||IMAGES.userAvatarUrl}}" webp></glsx-image>
<view class="name">{{item.staffName}}</view>
<view class="role_name">「{{item.staffRoleName}}」</view>
<view class="role_name" wx:if="{{item.staffRoleName}}">「<view>{{item.staffRoleName}}</view>」</view>
</view>
<view class="output_text"><text style="font-size: 24rpx;">¥</text><text>{{filter.money_three_for_two_thousands(item.totalOutputValue || '0.00', false)}}</text></view>
<view wx:if="{{item.totalOutputValue < 1000000}}" class="output_text"><text style="font-size: 24rpx;">¥</text><text>{{filter.money_three_for_two_thousands(item.totalOutputValue || '0.00', false)}}</text></view>
<view wx:else class="output_text"><text style="font-size: 24rpx;">¥</text><text>一百万</text><text style="font-size: 24rpx;position: absolute;top: 0;">+</text></view>
</view>
<view class="flex_spa-be">
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
......
......@@ -20,9 +20,12 @@ Component({
sceneType: ''
}
}
// observer: function (n) {
// n && this.merchantRefresh()
// }
},
tabBarStyle: {
type: Number,
observer: function(n) {
if (n) this.setData({emptyDataStyle: `height: calc(100vh - ${n}px - 88rpx - 24rpx)`})
}
}
},
......@@ -41,6 +44,8 @@ Component({
},
isEnd: false,
loading: true,
scrollTop: 0,
isAsk: false,
// totalObj: {
// scene1Total: '72536',
// scene0Total: '76400',
......@@ -252,10 +257,14 @@ Component({
},
getMerchantList(isReset = false) {
let { userInfo } = wx.$storage.get()
let { searchForm, merchantList } = this.data
let { searchForm, merchantList, isAsk } = this.data
if(isAsk) {
return true
}
this.setData({
serviceName: userInfo.subLoginUser.merchantName,
loading: true
loading: true,
isAsk: true
})
this.dealMonth(isReset)
let params = {
......@@ -273,14 +282,15 @@ Component({
})
if (isReset) {
this.setData({
busiScrollTop: 0
scrollTop: 0
})
}
}).finally(() => {
wx.hideLoading()
this.setData({
triggered: false,
loading: false
loading: false,
isAsk: false
})
})
}
......
/* pages/tab/outputValue/components/merchant/merchant.wxss */
.merchantCon {
box-sizing: border-box;
background-color: #F2F3F7;
height: 100%;
padding: 0 16rpx;
}
.merchant {
box-sizing: border-box;
color: #323436;
// padding-top: 16rpx;
background-color: #F2F3F7;
height: 100%;
padding: 0 16rpx;
}
.merchant-content {
......@@ -18,6 +13,10 @@
margin-bottom: 44rpx;
}
.btn-box {
padding-bottom: 44rpx;
}
.btn {
width: 256rpx;
height: 80rpx;
......@@ -27,7 +26,7 @@
font-size: 24rpx;
color: #5A6066;
text-align: center;
margin: 0 auto 44rpx;
margin: 0 auto;
}
.end-txt {
......
<!--pages/tab/outputValue/components/merchant/merchant.wxml-->
<view class="merchantCon">
<scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="merchantRefresh" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<!-- 全部 - 服务商总产值 -->
<service-total wx:if="{{!searchForm.sceneType && merchantList.length}}" serviceName="{{serviceName}}" totalObj="{{totalObj}}"></service-total>
<view wx:for="{{merchantList}}" wx:key="index" class="merchant-content">
<!-- 全部 -->
<merchant-all wx:if="{{!searchForm.sceneType}}" curInfo="{{item}}"></merchant-all>
<!-- 指定场景:太阳膜,售后众筹,会员权益/升级 -->
<merchant-scene wx:else searchForm="{{searchForm}}" curInfo="{{item}}"></merchant-scene>
<scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="merchantRefresh" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<!-- 全部 - 服务商总产值 -->
<service-total wx:if="{{merchantList.length}}" serviceName="{{serviceName}}" totalObj="{{totalObj}}"></service-total>
<view wx:for="{{merchantList}}" wx:key="index" class="merchant-content">
<!-- 全部 -->
<merchant-all wx:if="{{!searchForm.sceneType}}" curInfo="{{item}}" searchForm="{{searchForm}}"></merchant-all>
<!-- 指定场景:太阳膜,售后众筹,会员权益/升级 -->
<merchant-scene wx:else searchForm="{{searchForm}}" curInfo="{{item}}"></merchant-scene>
</view>
<view wx:if="{{!loading}}">
<view wx:if="{{!merchantList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" emptyDataStyle="{{emptyDataStyle}}" />
</view>
<view wx:if="{{!loading}}">
<view wx:if="{{!merchantList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" />
</view>
<view class="btn" wx:elif="{{!isEnd}}" bindtap="getMore">加载更多</view>
<view wx:else class="end-txt">
<view>到底啦~</view>
</view>
<view class="btn-box" wx:elif="{{!isEnd}}">
<view class="btn" bindtap="getMore">加载更多</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
<view wx:else class="end-txt">
<view>到底啦~</view>
</view>
</view>
</scroll-view>
......@@ -8,9 +8,10 @@ Component({
curInfo: {
type: Object,
value: () => { },
observer(n) {
if(n) {
observer(n) {
if (n) {
this.dealYearMonth()
this.dealCrowdData()
}
}
},
......@@ -45,7 +46,8 @@ Component({
date: {
year: '',
month: ''
}
},
currentMonth: new Date().format('yyyy-MM')
},
/**
......@@ -59,6 +61,21 @@ Component({
['date.month']: new Date(yearMonth || '').getMonth() + 1,
})
},
dealCrowdData() {
let { searchForm, curInfo } = this.data
// 众筹数据处理
if (searchForm.sceneType == 3) {
curInfo?.merchantDataList.length && curInfo?.merchantDataList.forEach(item => {
let productCodes = item.productCodes || []
item?.curMonthTotalData?.length && item?.curMonthTotalData?.forEach(subItem => {
subItem.isShow = productCodes.includes(subItem.productCode)
})
})
this.setData({
curInfo: curInfo
})
}
},
dealData() {
let { searchForm, sceneToInfo } = this.data
let sceneObj = sceneToInfo.find(item => item.type == (searchForm.sceneType || 1))
......
......@@ -94,6 +94,11 @@
right: 0;
top: 66rpx;
right: 24rpx;
text-align: right;
}
.business-total-other {
text-align: right;
}
.top-num-box {
......@@ -165,7 +170,7 @@
}
.title-name {
width: calc(100% - 72rpx);
max-width: calc(100% - 72rpx);
}
.tips-store {
......
......@@ -3,7 +3,7 @@
<view class="merchant-scene">
<view class="top">
<view class="scene-label">{{sceneObj.label}}</view>
<view wx:if="{{sceneObj.name == 'membranes'}}" class="business-total label">业务产值
<view wx:if="{{sceneObj.name == 'membranes' && searchForm.startTime && searchForm.endTime}}" class="business-total label">业务产值
<text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text>
</view>
<view>
......@@ -12,18 +12,20 @@
<view class="top-num-box">
<view>
<view class="num-blue ft-40">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.total || 0)}}</view>
<!-- <view class="total-txt">本月业绩产生至{{curInfo.merchantDataList.length}}家门店</view> -->
<view class="total-txt num-grey" wx:if="{{curInfo.curMonthTotalData.total == 0}}">暂无业务收入</view>
</view>
<view>
<view wx:if="{{sceneObj.name != 'membranes'}}" class="label m-b-12">业务产值
<view wx:if="{{sceneObj.name != 'membranes' && searchForm.startTime && searchForm.endTime}}" class="label m-b-12 business-total-other">业务产值
<text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text>
</view>
<view wx:for="{{sceneTopList}}" wx:key="index" class="top-right-box">
<view class="label">{{item.label}}</view>
<view class="num-grey">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData[item.name] || 0)}}
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
<view wx:if="{{searchForm.startTime && searchForm.endTime}}">
<view wx:for="{{sceneTopList}}" wx:key="index" class="top-right-box">
<view class="label">{{item.label}}</view>
<view class="num-grey">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData[item.name] || 0)}}
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
</view>
</view>
</view>
</view>
......@@ -42,24 +44,28 @@
<!-- 内容 - 售后众筹 -->
<view wx:if="{{sceneObj.name == 'crowdfund'}}" class="list-content crowdfund">
<view wx:for="{{item.curMonthTotalData}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="crowdfund-item">
<view class="label">{{subItem.productName}}</view>
<view class="num">{{subItem.activityTotal || 0}}场/{{subItem.orderTotal || 0}}单/¥{{filter.money_three_for_two_thousands(subItem.bizTotal || 0)}}</view>
<view wx:if="{{subItem.isShow}}">
<view class="label">{{subItem.productName}}</view>
<view class="num">{{subItem.activityTotal || 0}}场/{{subItem.orderTotal || 0}}单/¥{{filter.money_three_for_two_thousands(subItem.bizTotal || 0)}}</view>
</view>
</view>
</view>
<!-- 内容 - 太阳膜、会员权益/升级 -->
<view wx:else class="list-content">
<view class="com-box">
<view class="line"></view>
<view class="com-month">当日</view>
<view class="line"></view>
</view>
<view class="flex">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block {{sceneObj.name}}">
<view class="label">{{subItem.label}}</view>
<view class="num">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{filter.money_three_for_two_thousands(item.curDayTotalData[subItem.name] || 0)}}
<text wx:if="{{subItem.suffix}}">{{subItem.suffix}}</text>
<view wx:if="{{currentMonth == curInfo.yearMonth}}">
<view class="com-box">
<view class="line"></view>
<view class="com-month">当日</view>
<view class="line"></view>
</view>
<view class="flex">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block {{sceneObj.name}}">
<view class="label">{{subItem.label}}</view>
<view class="num">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{filter.money_three_for_two_thousands(item.curDayTotalData[subItem.name] || 0)}}
<text wx:if="{{subItem.suffix}}">{{subItem.suffix}}</text>
</view>
</view>
</view>
</view>
......
......@@ -14,6 +14,19 @@ Component({
this.dealCompare()
}
}
},
searchForm: {
type: Object,
value: () => {
return {
// 服务商商户号
partnerMerchantId: '',
// 4S店商户号
merchantId: '',
startTime: '',
endTime: '',
}
}
}
},
......
......@@ -148,7 +148,7 @@
}
.title-name {
width: calc(100% - 72rpx);
max-width: calc(100% - 72rpx);
}
.tips-store {
......
......@@ -2,7 +2,7 @@
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="merchant-all">
<view class="top">
<view class="switch-box">对比上月
<view class="switch-box" wx:if="{{curInfo.merchantDataList.length}}">对比上月
<switch style="zoom:.6; margin-left: 8rpx;" color="#3666FE" checked="{{switchChecked}}" bindchange="switchChange" />
</view>
<view>
......@@ -13,7 +13,7 @@
<view class="num-blue ft-40">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.total || 0)}}</view>
<view class="total-txt">本月业绩产生至{{curInfo.merchantDataList.length}}家门店</view>
</view>
<view>
<view wx:if="{{searchForm.startTime && searchForm.endTime}}">
<view wx:for="{{sceneFormList}}" wx:key="index" class="top-right-box">
<view class="label">{{item.label}}</view>
<view class="num-grey">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData[item.name] || 0)}}</view>
......
......@@ -14,7 +14,6 @@ Component({
observer: function (n) {
if (n) {
let { merchantRange, selectInfo } = this.data
console.log(selectInfo)
let activeIndex = merchantRange.findIndex(v => v.merchantId == selectInfo.shopMerchantIds[0])
if (merchantRange.length) merchantRange.unshift({merchantId: '', merchantName: '全部'})
merchantRange.forEach((item, ind) => {
......@@ -24,13 +23,11 @@ Component({
} else {
item.act = false
}
this.setData({
merchantRange,
selectedMerchantId: selectInfo.shopMerchantIds[0]
})
})
this.setData({
searchKeyword: ''
searchKeyword: '',
merchantRange,
selectedMerchantId: selectInfo?.shopMerchantIds[0] || ''
})
}
}
......
......@@ -12,13 +12,10 @@
type="text"
placeholder="请搜索门店"
class="input"
value="{{keyword}}"
value="{{searchKeyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="search" data-value="{{searchKeyword}}">
<view class="text-center">搜索</view>
......@@ -27,9 +24,6 @@
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
......
......@@ -120,7 +120,6 @@ Page({
item.act = true
}
})
console.log(subIndex, merchantRange)
this.setData({
merchantRange,
subIndex
......
......@@ -16,7 +16,7 @@
<view class="layout" style="padding-top:calc({{tabBarStyle}}px + 88rpx);">
<!-- 我的门店 -->
<view class="comCom" hidden="{{tabIndx != 0}}">
<merchant id="merchant" searchForm="{{screenFormData}}" />
<merchant id="merchant" searchForm="{{screenFormData}}" tabBarStyle="{{tabBarStyle}}"/>
</view>
<!-- 我的员工 -->
<view class="comCom" hidden="{{tabIndx != 1}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!