Commit c317ff7a by 张立顺

Merge branch 'SAAS+V5.3.0-1117' of 192.168.3.233:saas_plus/sales-assistant into SAAS+V5.3.0-1117

2 parents 4475a399 59a1e409
...@@ -26,16 +26,19 @@ ...@@ -26,16 +26,19 @@
flex-shrink: 0; flex-shrink: 0;
color: #999EA8; color: #999EA8;
} }
.resident-item { .item-box {
color: #292D33; width: calc(100% - 180rpx);
display: flex; .resident-item {
justify-content: flex-end; color: #292D33;
.name { display: flex;
margin-right: 30rpx; justify-content: flex-end;
max-width: calc(100% - 260rpx); .name {
overflow: hidden; margin-right: 30rpx;
text-overflow: ellipsis; max-width: calc(100% - 260rpx);
white-space: nowrap; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
} }
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<view class="status" wx:if="{{!infoData.storePersonnel.length}}"> <view class="status" wx:if="{{!infoData.storePersonnel.length}}">
<text class="status-text">无</text> <text class="status-text">无</text>
</view> </view>
<view wx:if="{{infoData.storePersonnel.length}}"> <view wx:if="{{infoData.storePersonnel.length}}" class="item-box">
<block wx:for="{{infoData.storePersonnel}}" wx:key="index"> <block wx:for="{{infoData.storePersonnel}}" wx:key="index">
<view class="resident-item"> <view class="resident-item">
<text class="name">{{item.personnelName}}</text> <text class="name">{{item.personnelName}}</text>
......
...@@ -121,8 +121,8 @@ ...@@ -121,8 +121,8 @@
} }
.counter { .counter {
position: absolute; position: absolute;
right: 40rpx; right: 56rpx;
bottom: 10rpx; bottom: 0;
color: #AAB0B7; color: #AAB0B7;
font-size: 28rpx; font-size: 28rpx;
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<view class="label">备注信息</view> <view class="label">备注信息</view>
</view> </view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<textarea class="textarea" maxlength="200" placeholder="请输入" placeholder-class="input-ph" value="{{infoData.remark}}" bindinput="onRemarkInput" /> <textarea class="textarea" maxlength="200" auto-height placeholder="请输入" placeholder-class="input-ph" value="{{infoData.remark}}" bindinput="onRemarkInput" />
<view class="counter">{{remarkLength}}/200</view> <view class="counter">{{remarkLength}}/200</view>
</view> </view>
</view> </view>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<text class="label">上次拜访内容:</text> <text class="label">上次拜访内容:</text>
<text class="text">{{followUpData.waitFollowShopList[1].lastVisitContent||'-'}}</text> <text class="text">{{followUpData.waitFollowShopList[1].lastVisitContent||'-'}}</text>
</view> </view>
<view class="btn" bindtap="goPotentialDetail" data-target="{{ followUpData.waitFollowShopList[0] }}">跟进</view> <view class="btn" bindtap="goPotentialDetail" data-target="{{ followUpData.waitFollowShopList[1] }}">跟进</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -137,10 +137,10 @@ Component({ ...@@ -137,10 +137,10 @@ Component({
CustomerApi.getSalesPersonList({}).then(res => { CustomerApi.getSalesPersonList({}).then(res => {
res?.forEach(val => { res?.forEach(val => {
val.value = val.userId, val.value = val.userId,
val.staffName = val.userName val.name = val.userName
}) })
res.unshift({ res.unshift({
staffName: '全部', name: '全部',
active: true, active: true,
value: '' value: ''
}) })
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
data-index="{{ index }}" data-index="{{ index }}"
hidden="{{ index >= 12 && !salesStaffShowMore }}" hidden="{{ index >= 12 && !salesStaffShowMore }}"
> >
<view class="text-item">{{item.staffName}}</view> <view class="text-item">{{item.name}}</view>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -121,13 +121,20 @@ Page({ ...@@ -121,13 +121,20 @@ Page({
}) })
}, },
onShow() { onShow() {
// 总监从销售小结跳入
const obj = app.getTabParams('customerObj')?.itemParams || {} const obj = app.getTabParams('customerObj')?.itemParams || {}
if (Object.keys(obj)?.length) { if (Object.keys(obj)?.length) {
const data = {name: obj.personName, value: obj.personId}
this.setData({ this.setData({
personParams: obj personParams: obj,
'searchObj.salesStaffList': data, // 将带入的销售人员选中
'storeSearchObj.salesStaffList': data // 将带入的销售人员选中
}, () => {
this.search()
}) })
return
} }
// 从我的门店待跟进看板跳入
const params = app.getTabParams('customer') const params = app.getTabParams('customer')
let myTabIdx let myTabIdx
if (params) { if (params) {
...@@ -190,6 +197,12 @@ Page({ ...@@ -190,6 +197,12 @@ Page({
// 筛选页面确认 // 筛选页面确认
search() { search() {
// 当有页面带入参数时,判断再次选中的销售人员是否与带入相同,不同时清掉数据
if ((Object.keys(this.data.personParams)?.length && this.data.searchObj?.salesStaffList?.value != this.data.personParams.personId) || (Object.keys(this.data.personParams)?.length && this.data.storeSearchObj?.salesStaffList?.value != this.data.personParams.personId)) {
this.setData({
personParams: {}
})
}
const { selectedScreenPotential, selectedScreenStore, searchObj, storeSearchObj, myTabIdx } = this.data const { selectedScreenPotential, selectedScreenStore, searchObj, storeSearchObj, myTabIdx } = this.data
const sourceList = myTabIdx == 0 ? selectedScreenPotential : selectedScreenStore const sourceList = myTabIdx == 0 ? selectedScreenPotential : selectedScreenStore
const valueObj = myTabIdx == 0 ? (searchObj || {}) : (storeSearchObj || {}) const valueObj = myTabIdx == 0 ? (searchObj || {}) : (storeSearchObj || {})
...@@ -218,6 +231,12 @@ Page({ ...@@ -218,6 +231,12 @@ Page({
} }
return { ...item, valueText: text } return { ...item, valueText: text }
}) })
if (Object.keys(this.data.personParams)?.length) {
this.setData({
selectedScreenPotential: nextSelected,
selectedScreenStore: nextSelected
})
}
if (myTabIdx == 0) { if (myTabIdx == 0) {
this.setData({ selectedScreenPotential: nextSelected, scrollTop: 0, setScrollTop: 0 }, () => { this.setData({ selectedScreenPotential: nextSelected, scrollTop: 0, setScrollTop: 0 }, () => {
const potential = this.selectComponent('#potentialSection') const potential = this.selectComponent('#potentialSection')
...@@ -250,7 +269,7 @@ Page({ ...@@ -250,7 +269,7 @@ Page({
if (nextIdx === this.data.myTabIdx) return if (nextIdx === this.data.myTabIdx) return
this.setData({ myTabIdx: nextIdx, scrollTop: 0, setScrollTop: 0 }) this.setData({ myTabIdx: nextIdx, scrollTop: 0, setScrollTop: 0 })
wx.nextTick(() => { wx.nextTick(() => {
this.setData({ scrollTop: 0, setScrollTop: 0 }) this.setData({ scrollTop: 0, setScrollTop: 0, scrollLeft: 0 })
const component = nextIdx == 0 ? 'potentialSection' : 'storeSection' const component = nextIdx == 0 ? 'potentialSection' : 'storeSection'
const coms = this.selectComponent(`#${component}`) const coms = this.selectComponent(`#${component}`)
if (coms.getPageData) coms.getPageData() if (coms.getPageData) coms.getPageData()
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view wx:for="{{tabList}}" wx:key="index" bindtap="changeMyTab" data-id="{{index}}" class='my-tab-item {{myTabIdx==index ? "tab-item-active": ""}}'>{{item.name}}</view> <view wx:for="{{tabList}}" wx:key="index" bindtap="changeMyTab" data-id="{{index}}" class='my-tab-item {{myTabIdx==index ? "tab-item-active": ""}}'>{{item.name}}</view>
</view> </view>
<view class="screen-box"> <view class="screen-box">
<scroll-view class="view-container" show-scrollbar="{{false}}" scroll-x> <scroll-view class="view-container" scroll-left="{{scrollLeft}}" show-scrollbar="{{false}}" scroll-x>
<view class="view-box"> <view class="view-box">
<block wx:for="{{myTabIdx == 0 ? selectedScreenPotential : selectedScreenStore}}" wx:key="index"> <block wx:for="{{myTabIdx == 0 ? selectedScreenPotential : selectedScreenStore}}" wx:key="index">
<view bindtap="changeScreen" class="view-item" wx:if="{{userInfo.loginRole == 1 ? true : item.key != 'provinces' && item.key != 'salesStaffList'}}"> <view bindtap="changeScreen" class="view-item" wx:if="{{userInfo.loginRole == 1 ? true : item.key != 'provinces' && item.key != 'salesStaffList'}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!