Commit 564e0daa by chenwq

联调,卡片样式

1 parent af7492e5
...@@ -4,14 +4,87 @@ Component({ ...@@ -4,14 +4,87 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
info: {
type: Object,
value: {}
},
sceneCode: {
type: String,
value: '-1'
}
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
formObj: {
'-1': [{
label: '精品升级',
name: 'boutiqueUpgrade',
prefix: '¥',
isNum: true
}, {
label: '售后众筹',
name: 'afterSalesCrowdfunding',
prefix: '¥',
isNum: true
}, {
label: '车损权益升级',
name: 'vdUpgrade',
prefix: '¥',
isNum: true
}],
'SC002': [{
label: '营业额',
name: 'turnover',
prefix: '¥',
isNum: true
}, {
label: '升级客单价',
name: '',
prefix: '¥',
isNum: true
}, {
label: '到店贴膜量',
name: ''
}, {
label: '升级订单',
name: ''
}, {
label: '战败订单',
name: ''
}, {
label: '转化率',
name: 'conversionRate'
}],
'SC001': [{
label: '营业额',
name: 'turnover',
prefix: '¥',
isNum: true
}, {
label: '推荐客户量',
name: 'customerNum'
}, {
label: '成交客户量',
name: 'successNum'
}, {
label: '融合客单价',
name: 'fuseCustomerPrice',
prefix: '¥',
isNum: true
}, {
label: '权益客单价',
name: 'equityCustomerPrice',
prefix: '¥',
isNum: true
}, {
label: '转化率',
name: 'conversionRate',
isNum: true
}]
}
}, },
/** /**
......
/* pages/tab/output/components/BusiCard/BusiCard.wxss */ /* pages/tab/output/components/BusiCard/BusiCard.wxss */
.busi-card {
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 8rpx;
margin-bottom: 20rpx;
padding: 20rpx;
.title-box {
display: flex;
align-items: center;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 8rpx;
padding-bottom: 14rpx;
}
.title {
width: calc(100% - 40rpx);
border-bottom: 2rpx dotted #E0E0E0;
padding-bottom: 14rpx;
}
}
.content {
display: flex;
flex-wrap: wrap;
}
.content-item {
width: 33.33%;
text-align: center;
font-size: 20rpx;
color: #999999;
margin: 10rpx 0;
.price {
font-weight: 500;
font-size: 28rpx;
color: #323436;
font-weight: 600;
margin-bottom: 16rpx;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/output/components/BusiCard/BusiCard.wxml--> <!--pages/tab/output/components/BusiCard/BusiCard.wxml-->
<text>pages/tab/output/components/BusiCard/BusiCard.wxml</text> <wxs src="../index.wxs" module="filter" />
<view class="busi-card">
<view class="title-box">
<glsx-image src="output/icon-head.png" class="icon" />
<view class="title">{{info.merchantName4s || ''}}</view>
</view>
<view class="content">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item">
<view class="price">
{{item.prefix || ''}}
{{item.isNum ? filter.money_three_for_two_thousands(info[item.name] || 0.00) : (info[item.name] || 0)}}
</view>
<view>{{item.label}}</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -83,8 +83,14 @@ Component({ ...@@ -83,8 +83,14 @@ Component({
this.getBusiStatistics() this.getBusiStatistics()
}) })
}, },
// 1、tab-业务经营;2、升降序
// tab-业务经营切换
handleBusiSearch(e) { handleBusiSearch(e) {
this.getBusiStatistics(true, true)
},
// 升降序
handleSort() {
this.getBusiStatistics(true) this.getBusiStatistics(true)
}, },
...@@ -118,11 +124,14 @@ Component({ ...@@ -118,11 +124,14 @@ Component({
console.log(this.data.crowdOrderObj, 'crowdOrderObj-') console.log(this.data.crowdOrderObj, 'crowdOrderObj-')
}, },
getBusiStatistics(isReset = false) { getBusiStatistics(isReset = false, isBusiTab = false) {
let totalTabModule = this.selectComponent('#totalTab') let totalTabModule = this.selectComponent('#totalTab')
let busiSearchData = totalTabModule.dealParams() let busiSearchData = totalTabModule ? totalTabModule.dealParams() : {}
let sortTabModule = this.selectComponent('#sortTab') let sortTabModule = this.selectComponent('#sortTab')
let sortSearchData = sortTabModule.dealParams() if (sortTabModule && isBusiTab) {
sortTabModule.resetAllAsc()
}
let sortSearchData = sortTabModule ? sortTabModule.dealParams() : {}
this.setData({ this.setData({
formData: JSON.parse(JSON.stringify(totalTabModule.data.formData)) formData: JSON.parse(JSON.stringify(totalTabModule.data.formData))
}) })
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<text>总收益</text> <text>总收益</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text> <text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text>
</view> </view>
<sort-tab id="sortTab" bindhandleSort="handleBusiSearch"></sort-tab> <sort-tab id="sortTab" sceneCode="{{formData.sceneCode}}" bindhandleSort="handleSort"></sort-tab>
</view> </view>
<!-- 售后众筹 --> <!-- 售后众筹 -->
<view wx:if="{{formData.sceneCode == 'SC004'}}"> <view wx:if="{{formData.sceneCode == 'SC004'}}">
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
</view> </view>
<!-- 0:全部;1:精品升级;3:会员权益/升级 --> <!-- 0:全部;1:精品升级;3:会员权益/升级 -->
<view wx:else> <view wx:else>
<busi-card></busi-card> <view wx:for="{{busiTotalList}}" wx:key="index">
<busi-card info="{{item}}" sceneCode="{{formData.sceneCode}}"></busi-card>
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
......
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */ /* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.crowdfund-layout { .crowdfund-layout {
margin: 20rpx 20rpx;
padding-bottom: 136rpx; padding-bottom: 136rpx;
.crowdfund-box { .crowdfund-box {
......
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml --> <!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<wxs src="./index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<view class="crowdfund-layout"> <view class="crowdfund-layout">
<view class="crowdfund-box order"> <view class="crowdfund-box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index"> <view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
......
...@@ -10,7 +10,7 @@ Component({ ...@@ -10,7 +10,7 @@ Component({
}, },
sceneCode: { sceneCode: {
type: String, type: String,
value: 'SC002' value: '-1'
} }
}, },
...@@ -117,6 +117,23 @@ Component({ ...@@ -117,6 +117,23 @@ Component({
return _params return _params
}, },
resetAllAsc() {
let { actIdx, sceneCode, formObj } = this.data
if (actIdx == '-1') {
return true
}
let _list = Object.keys(formObj)
_list.forEach(item => {
formObj[item].forEach(k => {
k.asc = ''
})
})
this.setData({
formObj,
actIdx: '-1'
})
},
resetAsc() { resetAsc() {
let { actIdx, sceneCode } = this.data let { actIdx, sceneCode } = this.data
if (actIdx == '-1') { if (actIdx == '-1') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!