Commit 3f0f239f by 李伟康

feat 添加流量有效性筛选功能

1 parent 5acea9e6
......@@ -77,6 +77,7 @@ Component({
['form.dateTimeList']: wx.$util.deepClone(dateTimeList)
})
this.setInviteStatusList()
this.setTrafficEffectiveness()
},
getScreenList() {
let { userInfo } = this.data
......@@ -258,6 +259,27 @@ Component({
})
this.setInviteStatusListDisabled(n)
},
/**流量有效性 */
setTrafficEffectiveness(){
let arr = [
{
name: '全部',
active: true,
value: ''
},
{
name: '有效客户',
value: 1
},
{
name: '无效客户',
value: 2
},
]
this.setData({
['form.trafficEffectiveness']: arr
})
},
setInviteStatusListDisabled(statusType) {
let { inviteStatusList } = this.data.form
inviteStatusList.map((e, index) => {
......
......@@ -112,6 +112,16 @@
</block>
</view>
</view>
<view class="box">
<view class="title">
流量有效性
</view>
<view class="list-box">
<block wx:for="{{form.trafficEffectiveness}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="trafficEffectiveness" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view>
......
......@@ -52,6 +52,10 @@ Page({
label: "转化人员",
arr: ["yqMerchantName", "userName"],
},
{
label: '流量有效性',
single_key:'trafficEffectivenessName'
}
],
// 邀约状态(1待邀约;2已邀约;3取消预约)
status: {
......@@ -432,6 +436,10 @@ Page({
e.merchantName = e.merchantCoupon.merchantName;
e.yqMerchantName = e.merchantCoupon.yqMerchantName;
}
e.trafficEffectivenessName = {
1:'有效客户',
2:'无效客户'
}[e.trafficEffectiveness] || '-'
});
const userType =
!userInfo?.isSuper &&
......
......@@ -102,6 +102,9 @@
</block>
</block>
</block>
<block wx:elif="{{i.single_key}}">
<text>{{li[i.single_key]}}</text>
</block>
<block wx:else>
<text>{{li[i.key][i.c_key]|| ''}}</text>
<text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text>
......
......@@ -355,8 +355,8 @@ Page({
userInfo,
isOrder
} = this.data,
trafficEffectivenessDisabled = userInfo.isSuper && !userInfo.merchantType && userInfo.userType != 2 && !isOrder &&
detail.inviteStatus == 4 && detail.inviteStatus == 6 && detail.inviteStatus == 7
//已支付4、已失效11、已撤销9、已评价6、已关闭10、战败2 不支持编辑
trafficEffectivenessDisabled = (userInfo.isSuper && !userInfo.merchantType && userInfo.userType != 2 && !isOrder) || (detail.inviteStatus == 4 || detail.inviteStatus == 6 || detail.inviteStatus == 7) || ([4, 11, 9, 6, 10, 2].includes(detail.orderStatus))
this.setData({
trafficEffectivenessDisabled,
detail,
......
......@@ -432,6 +432,8 @@ page {
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 28rpx;
color: #292D33;
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!