Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
sales-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 59a1e409
authored
Oct 31, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
总监跳转到客户tab参数回显修改
1 parent
8513ac44
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
7 deletions
pages/tab/customer/components/PageScreen/PageScreen.js
pages/tab/customer/components/PageScreen/PageScreen.wxml
pages/tab/customer/customer.js
pages/tab/customer/customer.wxml
pages/tab/customer/components/PageScreen/PageScreen.js
View file @
59a1e40
...
@@ -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
.
staffN
ame
=
val
.
userName
val
.
n
ame
=
val
.
userName
})
})
res
.
unshift
({
res
.
unshift
({
staffN
ame
:
'全部'
,
n
ame
:
'全部'
,
active
:
true
,
active
:
true
,
value
:
''
value
:
''
})
})
...
...
pages/tab/customer/components/PageScreen/PageScreen.wxml
View file @
59a1e40
...
@@ -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.
staffN
ame}}</view>
<view class="text-item">{{item.
n
ame}}</view>
</view>
</view>
</block>
</block>
</view>
</view>
...
...
pages/tab/customer/customer.js
View file @
59a1e40
...
@@ -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()
...
...
pages/tab/customer/customer.wxml
View file @
59a1e40
...
@@ -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" s
croll-left="{{scrollLeft}}" s
how-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'}}">
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment