Commit 92e44dff by chenwq

看产值-全部,太阳膜

1 parent 7ed36cd0
// pages/tab/output/components/myMerchant/myMerchant.js
import { IMG_URL } from '~/utils/constantData'
import outputApi from '~/api/outputApi/index'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
bgUrl: `${IMG_URL}/personal/empty_tran.png`,
formData: {},
// 1精品升级,3众筹,0会员权益)
// 服务商-多4s店
merchantList: [{
yearMonth: '2023年8月',
curMonthTotalData: {
scene1Total: '72536',
scene0Total: '76400',
scene3Total: '15486',
total: '164422'
},
merchantDataList: []
}]
},
lifetimes: {
attached() {
this.getMerchant()
}
},
/**
* 组件的方法列表
*/
methods: {
getMerchant(isReset = false) {
let { userInfo } = wx.$storage.get()
let params = {
partnerMerchantId: userInfo.subLoginUser.merchantId
}
outputApi.getStaffList(params).then(res => {
if (isReset) {
this.setData({
busiScrollTop: 0
})
}
this.setData({
triggered: false
})
// let _list = []
// _list = res || []
// this.setData({
// merchantList: _list
// })
})
},
}
})
/* pages/tab/output/components/myMerchant/myMerchant.wxss */
.merchantCon {
box-sizing: border-box;
background-color: #fff;
height: 100%;
}
.merchant {
box-sizing: border-box;
color: #323436;
// padding-top: 16rpx;
// background-color: #F2F3F7;
background-color: #FFFFFF;
.title {
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
color: #323436;
}
.title::before {
display: inline-block;
content: '';
width: 6rpx;
height: 28rpx;
background: #3666FE;
border-radius: 0 4rpx 4rpx 0;
margin-right: 16rpx;
}
}
.merchant-content {
margin: 0 16rpx;
}
.end-txt {
font-size: 24rpx;
text-align: center;
color: #CCCED1;
padding-bottom: 60rpx;
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/output/components/myMerchant/myMerchant.wxml-->
<view class="merchantCon">
<scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSearch" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<view wx:for="{{merchantList}}" wx:key="index" class="merchant-content">
<view class="title">{{item.yqMerchantName || ''}}</view>
<view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<busi-card info="{{subItem}}" fromPage="merchant" sceneCode="{{formData.sceneCode}}" formData="{{formData}}"></busi-card>
</view>
</view>
<view wx:if="{{!merchantList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" />
</view>
<view wx:else class="end-txt">
<view>到底啦~</view>
</view>
</scroll-view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"usingComponents": { "usingComponents": {
"navigation-bar": "../../../components/NavigationBar/NavigationBar", "navigation-bar": "../../../components/NavigationBar/NavigationBar",
"client": "./components/client/client", "client": "./components/client/client",
"myMerchant": "./components/myMerchant/myMerchant",
"staff": "./components/staff/staff", "staff": "./components/staff/staff",
"search-input": "../../../components/SearchInput/SearchInput", "search-input": "../../../components/SearchInput/SearchInput",
"accountSwitchingPop": "./components/accountSwitchingPop/accountSwitchingPop", "accountSwitchingPop": "./components/accountSwitchingPop/accountSwitchingPop",
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
<client id="client" /> <client id="client" />
</view> --> </view> -->
<!-- 我的门店 --> <!-- 我的门店 -->
<view class="comCom" hidden="{{tabIndx != 0}}"> <!-- <view class="comCom" hidden="{{tabIndx != 0}}">
<myMerchant id="merchant" /> <staff id="staff" />
</view> </view> -->
<!-- 我的员工 --> <!-- 我的员工 -->
<view class="comCom" hidden="{{tabIndx != 1}}"> <view class="comCom" hidden="{{tabIndx != 1}}">
<staff id="staff" /> <staff id="staff" />
......
...@@ -23,43 +23,116 @@ Component({ ...@@ -23,43 +23,116 @@ Component({
scene3Total: '15486', scene3Total: '15486',
total: '164422' total: '164422'
}, },
// 1精品升级(太阳膜),3众筹,0会员权益) // 1精品升级(太阳膜),3众筹,0会员权益)
// 服务商-多4s店 // 服务商-多4s店-全部
// merchantList: [{
// yearMonth: '2023-08',
// curMonthTotalData: {
// scene1Total: '5986',
// scene0Total: '76400',
// scene3Total: '11000',
// total: '19567'
// },
// merchantDataList: [{
// merchantName: '四川申蓉汇亚汽车贸易有限公司',
// curMonthTotalData: {
// scene1Total: '5026',
// scene0Total: '11000',
// scene3Total: '2581',
// total: '18607'
// },
// lastMonthTotalData: {
// scene1Total: '51122',
// scene0Total: '2355',
// scene3Total: '65400',
// total: '0'
// }
// }, {
// merchantName: '四川港宏新通汽车销售服务有限公司',
// curMonthTotalData: {
// scene1Total: '960',
// scene0Total: '0',
// scene3Total: '0',
// total: '960'
// },
// lastMonthTotalData: {
// scene1Total: '123223',
// scene0Total: '0',
// scene3Total: '0',
// total: '0'
// }
// }]
// }],
// 指定场景
merchantList: [{ merchantList: [{
yearMonth: '2023年8月', yearMonth: '2023-08',
curMonthTotalData: { curMonthTotalData: {
scene1Total: '5986', totalCustomer: '100',
scene0Total: '76400', total: '133862000',
scene3Total: '11000', notUpgradeCount: '22',
total: '19567' bizTotal: '960523',
custUnitPrice: '1523',
upgradeCount: '66',
activityTotal: '25',
orderTotal: '22',
upgradeRate: '65',
productCode: 'pc001'
}, },
merchantDataList: [{ merchantDataList: [{
merchantName: '四川申蓉汇亚汽车贸易有限公司', merchantId: 111,
merchantName: '广西弘泽汽车销售服务有限公司',
bizTotal: '39000',
curMonthTotalData: { curMonthTotalData: {
scene1Total: '5986', totalCustomer: '',
scene0Total: '76400', total: '',
scene3Total: '11000', notUpgradeCount: '199',
total: '19567' bizTotal: '18228',
custUnitPrice: '559',
upgradeCount: '177',
activityTotal: '',
orderTotal: '',
upgradeRate: '89',
productCode: ''
}, },
lastMonthTotalData: { lastMonthTotalData: {
scene1Total: '51122', totalCustomer: '',
scene0Total: '2355', total: '',
scene3Total: '65400', notUpgradeCount: '199',
total: '0' bizTotal: '258228',
custUnitPrice: '559',
upgradeCount: '2000',
activityTotal: '',
orderTotal: '',
upgradeRate: '12',
productCode: ''
} }
}, { }, {
merchantName: '四川港宏新通汽车销售服务有限公司', merchantId: 222,
merchantName: '益阳佳烨丰田汽车销售服务有限公司啦啦啦啦',
bizTotal: '19000',
curMonthTotalData: { curMonthTotalData: {
scene1Total: '960', totalCustomer: '',
scene0Total: '0', total: '',
scene3Total: '0', notUpgradeCount: '199',
total: '960' bizTotal: '18228',
custUnitPrice: '559',
upgradeCount: '2000',
activityTotal: '',
orderTotal: '',
upgradeRate: '89',
productCode: ''
}, },
lastMonthTotalData: { lastMonthTotalData: {
scene1Total: '123223', totalCustomer: '',
scene0Total: '0', total: '',
scene3Total: '0', notUpgradeCount: '199',
total: '0' bizTotal: '258228',
custUnitPrice: '559',
upgradeCount: '2000',
activityTotal: '',
orderTotal: '',
upgradeRate: '5',
productCode: ''
} }
}] }]
}] }]
......
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {
"service-total": "../merchantCom/serviceTotal/serviceTotal",
"merchant-all": "../merchantCom/merchantAll/merchantAll",
"membranes": "../merchantCom/Membranes/Membranes"
}
} }
\ No newline at end of file \ No newline at end of file
/* pages/tab/outputValue/components/merchant/merchant.wxss */ /* pages/tab/outputValue/components/merchant/merchant.wxss */
.merchantCon { .merchantCon {
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #F2F3F7;
height: 100%; height: 100%;
padding: 24rpx 16rpx; padding: 0 16rpx;
} }
.merchant { .merchant {
box-sizing: border-box; box-sizing: border-box;
color: #323436; color: #323436;
// padding-top: 16rpx; // padding-top: 16rpx;
// background-color: #F2F3F7; background-color: #F2F3F7;
background-color: #FFFFFF;
} }
.merchant-content { .merchant-content {
margin: 0 16rpx; // margin: 0 16rpx;
}
.all-container {
height: 388rpx;
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg-merchant.png");
background-size: 100% 100%;
.name {
display: flex;
align-items: center;
height: 80rpx;
font-weight: 600;
font-size: 28rpx;
color: #323436;
padding: 0 24rpx;
.tips {
width: 84rpx;
height: 28rpx;
font-size: 20rpx;
text-align: center;
color: #3666FE;
background: #3666fe1a;
border-radius: 5rpx;
margin-left: 8rpx;
}
}
} }
.end-txt { .end-txt {
......
<!--pages/tab/outputValue/components/merchant/merchant.wxml--> <!--pages/tab/outputValue/components/merchant/merchant.wxml-->
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="merchantCon"> <view class="merchantCon">
<scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSearch" lower-threshold='50' scroll-top="{{busiScrollTop}}"> <scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSearch" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<!-- 全部 - 服务商总产值 -->
<!-- <service-total serviceName="{{serviceName}}" totalObj="{{totalObj}}"></service-total> -->
<view wx:for="{{merchantList}}" wx:key="index" class="merchant-content"> <view wx:for="{{merchantList}}" wx:key="index" class="merchant-content">
<!-- 全部 --> <!-- 全部 -->
<view class="all-container"> <!-- <merchant-all curInfo="{{item}}"></merchant-all> -->
<view class="name"> <!-- 太阳膜 - scene1 -->
{{serviceName}} <membranes curInfo="{{item}}"></membranes>
<view class="tips">服务商</view>
</view>
<view>
<view>总产值</view>
<view>¥{{filter.money_three_for_two_thousands(totalObj.total)}}</view>
</view>
<view>
</view>
</view>
</view> </view>
<view wx:if="{{!merchantList.length}}" class="end-txt"> <view wx:if="{{!merchantList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" /> <nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" />
......
// pages/tab/outputValue/components/merchantCom/Membranes/Membranes.js
import constant from '../constant'
Component({
/**
* 组件的属性列表
*/
properties: {
curInfo: {
type: Object,
value: () => { },
observer(n) { }
}
},
/**
* 组件的初始数据
*/
data: {
sceneTopList: constant.membranesTopList,
sceneFormList: constant.membranesFormList,
compareList: [],
switchChecked: false
},
/**
* 组件的方法列表
*/
methods: {
// switchChange() {
// this.setData({
// switchChecked: !this.data.switchChecked
// })
// },
}
})
{
"component": true,
"usingComponents": {},
"styleIsolation": "shared"
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/outputValue/components/merchantCom/Membranes/Membranes.wxss */
.membranes {
background-color: #ffffff;
margin-top: 24rpx;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 16rpx;
.flex {
display: flex;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.num {
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.num-blue {
font-weight: 700;
font-size: 36rpx;
color: #4772FC;
}
.num-grey {
font-size: 24rpx;
color: #8A8C90;
}
.num-green {
font-weight: 600;
font-size: 24rpx;
color: #00C580;
}
.num-red {
font-weight: 600;
font-size: 24rpx;
color: #F35251;
}
.ft-40 {
font-size: 40rpx;
}
.top {
position: relative;
padding: 32rpx 24rpx;
.num-month {
color: #323436;
font-size: 60rpx;
font-weight: 600;
}
.month {
color: #323436;
font-size: 24rpx;
font-weight: 600;
margin-right: 12rpx;
}
.year {
font-weight: 500;
font-size: 24rpx;
color: #B6B7B7;
}
.scene-label {
position: absolute;
top: 0;
right: 0;
height: 36rpx;
line-height: 36rpx;
background-image: linear-gradient(270deg, #FFF7F7 0%, #EEF5FC 100%);
border-radius: 0 16rpx 0 30rpx;
font-size: 24rpx;
color: #32508D;
padding: 0 36rpx;
}
.top-num-box {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
color: #5A6066;
margin-top: 10rpx;
.total-txt {
margin-top: 16rpx;
}
.top-right-box {
display: flex;
justify-content: flex-end;
margin-bottom: 12rpx;
.label {
color: #8A8C90;
margin-right: 4rpx;
}
}
}
}
.contanier {
.list {
border-top: 0.3rpx solid #E4E6EE;
}
.title-box-first {
background-image: linear-gradient(179deg, #FAFAFA 0%, #FFFFFF 50%);
}
.title-box {
position: relative;
padding: 26rpx 24rpx;
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.title-box::before {
position: absolute;
left: 0;
top: 36rpx;
display: inline-block;
content: '';
width: 6rpx;
height: 32rpx;
background: #3666FE;
border-radius: 0 4rpx 4rpx 0;
}
.title-block {
width: 70%;
display: flex;
align-items: center;
}
.title-name {
width: calc(100% - 72rpx);
}
.tips-store {
box-sizing: border-box;
width: 64rpx;
height: 28rpx;
background: #fc8f2826;
border-radius: 5rpx;
font-weight: 400;
font-size: 20rpx;
color: #FC8F28;
padding: 0 12rpx;
margin-left: 8rpx;
}
.list-content {
padding: 10rpx 24rpx 36rpx;
.com-box {
display: flex;
justify-content: center;
align-items: center;
margin: 8rpx 0;
.com-month {
width: 66rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 22rpx;
color: #B6B7B7;
margin: 0 40rpx;
}
.line {
width: calc((100% - 146rpx) / 2);
height: 0.3rpx;
background-color: #F2F3F7;
}
}
.cur-block {
width: calc(100% / 5);
text-align: center;
.label {
font-size: 28rpx;
color: #323436;
margin-bottom: 16rpx;
}
}
// .compare-block {
// width: 33.33%;
// }
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/outputValue/components/merchantCom/Membranes/Membranes.wxml-->
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="membranes">
<view class="top">
<view class="scene-label">太阳膜</view>
<view>
<text class="num-month">8</text><text class="month">月</text><text class="year">2023年</text>
</view>
<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>
<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)}}
</view>
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
</view>
</view>
</view>
</view>
<!-- 门店列表 -->
<view class="contanier">
<view wx:for="{{curInfo.merchantDataList}}" wx:key="index" class="list">
<view class="title-box flex-between {{index == 0 ? 'title-box-first' : ''}}">
<view class="title-block">
<view class="title-name text-hide">{{item.merchantName}}</view>
<text class="tips-store">门店</text>
</view>
<view class="num-blue">¥{{filter.money_three_for_two_thousands(item.bizTotal || 0)}}</view>
</view>
<!-- 内容 -->
<view class="list-content">
<view class="com-box">
<view class="line"></view>
<view class="com-month">当日</view>
<view class="line"></view>
</view>
<view class="flex-between">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block">
<view class="label">{{subItem.label}}</view>
<view class="num">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}
<text wx:if="{{subItem.suffix}}">{{subItem.suffix}}</text>
</view>
</view>
</view>
<view>
<view class="com-box">
<view class="line"></view>
<view class="com-month">本月</view>
<view class="line"></view>
</view>
<view class="flex-between">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block">
<view class="num">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}
<text wx:if="{{subItem.suffix}}">{{subItem.suffix}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
const sceneFormList = [{
label: '太阳膜',
name: 'scene1Total'
}, {
label: '众筹活动',
name: 'scene3Total'
}, {
label: '会员权益/升级',
name: 'scene0Total'
}]
const membranesTopList = [{
label: '订单量',
name: 'orderTotal'
}, {
label: '转化率',
name: 'upgradeRate',
suffix: '%'
}, {
label: '客单价',
name: 'custUnitPrice',
prefix: '¥'
}]
const membranesFormList = [{
label: '营业额',
name: 'bizTotal',
prefix: '¥'
}, {
label: '升级/量',
name: 'upgradeCount'
}, {
label: '战败/单',
name: 'notUpgradeCount'
}, {
label: '客单价',
name: 'custUnitPrice',
prefix: '¥'
}, {
label: '转化率',
name: 'upgradeRate',
suffix: '%'
}]
export default {
sceneFormList,
membranesTopList,
membranesFormList
}
\ No newline at end of file \ No newline at end of file
// pages/tab/outputValue/components/merchantCom/merchantAll/merchantAll.js
import constant from '../constant'
Component({
/**
* 组件的属性列表
*/
properties: {
curInfo: {
type: Object,
value: () => { },
observer(n) {
n && this.dealCompare()
}
}
},
/**
* 组件的初始数据
*/
data: {
sceneFormList: constant.sceneFormList,
compareList: [],
switchChecked: false
},
/**
* 组件的方法列表
*/
methods: {
dealCompare() {
let { merchantDataList } = this.data.curInfo
let list = []
merchantDataList.forEach((item, index) => {
list.push({
scene0Total: Math.abs(item.curMonthTotalData.scene0Total - item.lastMonthTotalData.scene0Total),
scene0TotalSign: (item.curMonthTotalData.scene0Total - item.lastMonthTotalData.scene0Total) > 0,
scene1Total: Math.abs(item.curMonthTotalData.scene1Total - item.lastMonthTotalData.scene1Total),
scene1TotalSign: (item.curMonthTotalData.scene1Total - item.lastMonthTotalData.scene1Total) > 0,
scene3Total: Math.abs(item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total),
scene3TotalSign: (item.curMonthTotalData.scene3Total - item.lastMonthTotalData.scene3Total) > 0,
})
})
this.setData({
compareList: list
})
console.log(this.data.compareList, 'compareList---')
},
switchChange() {
this.setData({
switchChecked: !this.data.switchChecked
})
},
}
})
/* pages/tab/outputValue/components/merchantCom/merchantAll/merchantAll.wxss */
.merchant-all {
background-color: #ffffff;
margin-top: 24rpx;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 16rpx;
.flex {
display: flex;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.num {
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.num-blue {
font-weight: 700;
font-size: 36rpx;
color: #4772FC;
}
.num-grey {
font-size: 24rpx;
color: #8A8C90;
}
.num-green {
font-weight: 600;
font-size: 24rpx;
color: #00C580;
}
.num-red {
font-weight: 600;
font-size: 24rpx;
color: #F35251;
}
.ft-40 {
font-size: 40rpx;
}
.top {
position: relative;
padding: 32rpx 24rpx;
.num-month {
color: #323436;
font-size: 60rpx;
font-weight: 600;
}
.month {
color: #323436;
font-size: 24rpx;
font-weight: 600;
margin-right: 12rpx;
}
.year {
font-weight: 500;
font-size: 24rpx;
color: #B6B7B7;
}
.switch-box {
position: absolute;
top: 34rpx;
right: 24rpx;
display: flex;
align-items: center;
}
.top-num-box {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
color: #5A6066;
margin-top: 10rpx;
.total-txt {
margin-top: 16rpx;
}
.top-right-box {
display: flex;
justify-content: flex-end;
margin-bottom: 12rpx;
.label {
color: #8A8C90;
margin-right: 4rpx;
}
}
}
}
.contanier {
.list {
border-top: 0.3rpx solid #E4E6EE;
}
.title-box-first {
background-image: linear-gradient(179deg, #FAFAFA 0%, #FFFFFF 50%);
}
.title-box {
position: relative;
padding: 26rpx 24rpx;
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.title-box::before {
position: absolute;
left: 0;
top: 36rpx;
display: inline-block;
content: '';
width: 6rpx;
height: 32rpx;
background: #3666FE;
border-radius: 0 4rpx 4rpx 0;
}
.tips-store {
box-sizing: border-box;
width: 64rpx;
height: 28rpx;
background: #fc8f2826;
border-radius: 5rpx;
font-weight: 400;
font-size: 20rpx;
color: #FC8F28;
padding: 0 12rpx;
margin-left: 8rpx;
}
.list-content {
padding: 36rpx 24rpx;
.com-box {
display: flex;
justify-content: center;
align-items: center;
margin: 8rpx 0;
.com-month {
width: 66rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 22rpx;
color: #B6B7B7;
margin: 0 40rpx;
}
.line {
width: calc((100% - 146rpx) / 2);
height: 0.3rpx;
background-color: #F2F3F7;
}
}
.cur-block {
width: 33.33%;
.label {
font-size: 28rpx;
color: #323436;
margin-bottom: 16rpx;
}
}
.compare-block {
width: 33.33%;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/outputValue/components/merchantCom/merchantAll/merchantAll.wxml-->
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="merchant-all">
<view class="top">
<view class="switch-box">对比上月
<switch style="zoom:.6; margin-left: 8rpx;" color="#3666FE" checked="{{switchChecked}}" bindchange="switchChange" />
</view>
<view>
<text class="num-month">8</text><text class="month">月</text><text class="year">2023年</text>
</view>
<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>
<view>
<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>
</view>
</view>
</view>
</view>
<!-- 门店列表 -->
<view class="contanier">
<view wx:for="{{curInfo.merchantDataList}}" wx:key="index" class="list">
<view class="title-box flex-between {{index == 0 ? 'title-box-first' : ''}}">
<view>
{{item.merchantName}}
<text class="tips-store">门店</text>
</view>
<view class="num-blue">¥{{filter.money_three_for_two_thousands(item.curMonthTotalData.total || 0)}}</view>
</view>
<!-- 内容 -->
<view class="list-content">
<view class="flex">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block">
<view class="label">{{subItem.label}}</view>
<view class="num">¥{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}</view>
</view>
</view>
<view wx:if="{{switchChecked}}">
<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="compare-block">
<view wx:if="{{compareList[index][subItem.name] == 0}}">0</view>
<view wx:else class="{{compareList[index][subItem.name + 'Sign'] ? 'num-red' : 'num-green'}}"><text>{{compareList[index][subItem.name + 'Sign'] ? '+' : '-'}}</text>¥{{filter.money_three_for_two_thousands(compareList[index][subItem.name])}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/tab/outputValue/components/merchantCom/serviceTotal/serviceTotal.js
import constant from '../constant'
Component({
/**
* 组件的属性列表
*/
properties: {
serviceName: {
type: String,
value: ''
},
totalObj: {
type: Object,
value: () => { }
}
},
/**
* 组件的初始数据
*/
data: {
sceneFormList: constant.sceneFormList
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/outputValue/components/merchantCom/serviceTotal/serviceTotal.wxss */
.service-total {
height: 388rpx;
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg-merchant.png");
background-size: 100% 100%;
margin-top: 24rpx;
.top {
display: flex;
align-items: center;
height: 80rpx;
font-weight: 600;
font-size: 28rpx;
color: #323436;
padding: 0 24rpx;
.tips {
width: 84rpx;
height: 28rpx;
font-size: 20rpx;
text-align: center;
color: #3666FE;
background: #3666fe1a;
border-radius: 5rpx;
margin-left: 8rpx;
}
}
.box {
font-size: 28rpx;
padding: 32rpx 24rpx;
.total {
height: 154rpx;
.num {
font-weight: 700;
font-size: 40rpx;
color: #3666FE;
margin-top: 12rpx;
}
}
.label {
color: #8A8C90;
}
.content {
display: flex;
justify-content: space-between;
align-items: center;
.num {
color: #323436;
font-weight: 600;
margin-top: 16rpx;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/outputValue/components/merchantCom/serviceTotal/serviceTotal.wxml-->
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="service-total">
<view class="top">
{{serviceName}}
<view class="tips">服务商</view>
</view>
<view class="box">
<view class="total">
<view class="label">总产值</view>
<view class="num">¥{{filter.money_three_for_two_thousands(totalObj.total || 0)}}</view>
</view>
<view class="content">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="label">{{subItem.label}}</view>
<view class="num">¥{{filter.money_three_for_two_thousands(totalObj[subItem.name] || 0)}}</view>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!