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 f2161946
authored
May 07, 2026
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复标签显示
1 parent
15923b64
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
40 deletions
packageCustomer/pages/merchantDetail/merchantDetail.js
pages/tab/customer/components/PotentialSection/PotentialSection.js
pages/tab/customer/components/StoreSection/StoreSection.js
pages/tab/customer/components/StoreSection/StoreSection.wxml
utils/request/environment.js
packageCustomer/pages/merchantDetail/merchantDetail.js
View file @
f216194
// packageCustomer/pages/merchantDetail/merchantDetail.js
// packageCustomer/pages/merchantDetail/merchantDetail.js
import
CustomerApi
from
"~/api/customerApi/index"
import
CustomerApi
from
"~/api/customerApi/index"
import
{
IMG_URL
,
COOPERATIONMODELIST
,
TRSFFICSTATUSLIST
,
SCENELIST
,
ROLELIST
}
from
'~/utils/constantData'
import
{
IMG_URL
,
COOPERATIONMODELIST
,
TRSFFICSTATUSLIST
,
SCENELIST
,
ROLELIST
}
from
'~/utils/constantData'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
Page
({
Page
({
options
:
{
options
:
{
...
@@ -15,8 +21,21 @@ Page({
...
@@ -15,8 +21,21 @@ Page({
tabIndex
:
0
,
tabIndex
:
0
,
infoDetail
:
{},
infoDetail
:
{},
statusText
:
{
statusText
:
{
1
:
{
label
:
'新店'
,
color
:
'#35C376'
,
background
:
'#35c37614'
},
1
:
{
2
:
{
label
:
'老店'
,
color
:
'#347BFF'
,
background
:
'#347bff14'
}
label
:
'新店'
,
color
:
'#35C376'
,
background
:
'#35c37614'
},
2
:
{
label
:
'老店'
,
color
:
'#347BFF'
,
background
:
'#347bff14'
},
3
:
{
label
:
'关店'
,
color
:
'#666666'
,
background
:
'#66666614'
},
},
},
scrollTop
:
0
scrollTop
:
0
},
},
...
@@ -25,13 +44,19 @@ Page({
...
@@ -25,13 +44,19 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
let
{
query
}
=
options
let
{
query
}
=
options
if
(
query
)
{
if
(
query
)
{
const
pageQuery
=
JSON
.
parse
(
decodeURIComponent
(
query
))
const
pageQuery
=
JSON
.
parse
(
decodeURIComponent
(
query
))
this
.
setData
({
pageQuery
})
this
.
setData
({
pageQuery
})
this
.
getMerchantDetail
(
pageQuery
)
this
.
getMerchantDetail
(
pageQuery
)
if
(
pageQuery
.
currentTab
)
{
if
(
pageQuery
.
currentTab
)
{
this
.
setData
({
tabIndex
:
Number
(
pageQuery
.
currentTab
)})
this
.
setData
({
tabIndex
:
Number
(
pageQuery
.
currentTab
)
})
}
}
}
}
},
},
...
@@ -39,8 +64,7 @@ Page({
...
@@ -39,8 +64,7 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
...
@@ -58,7 +82,9 @@ Page({
...
@@ -58,7 +82,9 @@ Page({
onScroll
(
e
)
{
onScroll
(
e
)
{
const
scrollTop
=
e
.
detail
.
scrollTop
const
scrollTop
=
e
.
detail
.
scrollTop
this
.
setData
({
scrollTop
})
this
.
setData
({
scrollTop
})
},
},
recordTabTop
()
{
recordTabTop
()
{
...
@@ -75,17 +101,43 @@ Page({
...
@@ -75,17 +101,43 @@ Page({
},
},
buildInfoBoard
()
{
buildInfoBoard
()
{
const
{
infoDetail
}
=
this
.
data
const
{
const
items
=
[
infoDetail
{
label
:
'主营品牌'
,
value
:
infoDetail
.
mainCategory
},
}
=
this
.
data
{
label
:
'合作模式'
,
value
:
infoDetail
.
coopMode
},
const
items
=
[{
{
label
:
'拜访次数'
,
value
:
infoDetail
.
visitCount
!=
null
?
`
${
infoDetail
.
visitCount
}
`
:
''
,
highlight
:
true
},
label
:
'主营品牌'
,
{
label
:
'流量情况'
,
value
:
infoDetail
.
flowScale
},
value
:
infoDetail
.
mainCategory
{
label
:
'展业时间'
,
value
:
infoDetail
.
expectedOperationDate
?
dayjs
(
infoDetail
.
expectedOperationDate
).
format
(
'YYYY-MM-DD'
)
:
''
},
},
{
label
:
'分润规则'
,
value
:
infoDetail
.
profitRule
},
{
{
label
:
'业务类型'
,
value
:
infoDetail
.
bizType
,
full
:
true
}
label
:
'合作模式'
,
value
:
infoDetail
.
coopMode
},
{
label
:
'拜访次数'
,
value
:
infoDetail
.
visitCount
!=
null
?
`
${
infoDetail
.
visitCount
}
`
:
''
,
highlight
:
true
},
{
label
:
'流量情况'
,
value
:
infoDetail
.
flowScale
},
{
label
:
'展业时间'
,
value
:
infoDetail
.
expectedOperationDate
?
dayjs
(
infoDetail
.
expectedOperationDate
).
format
(
'YYYY-MM-DD'
)
:
''
},
{
label
:
'分润规则'
,
value
:
infoDetail
.
profitRule
},
{
label
:
'业务类型'
,
value
:
infoDetail
.
bizType
,
full
:
true
}
].
filter
(
Boolean
)
].
filter
(
Boolean
)
this
.
setData
({
infoBoardItems
:
items
})
this
.
setData
({
infoBoardItems
:
items
})
},
},
getMerchantDetail
(
pageQuery
)
{
getMerchantDetail
(
pageQuery
)
{
...
@@ -96,9 +148,13 @@ Page({
...
@@ -96,9 +148,13 @@ Page({
pageQuery
pageQuery
)
)
}
}
CustomerApi
.
getMaterialData
({
id
:
pageQuery
.
merchantId
}).
then
(
res
=>
{
CustomerApi
.
getMaterialData
({
id
:
pageQuery
.
merchantId
}).
then
(
res
=>
{
wx
.
$api
.
hideLoading
()
wx
.
$api
.
hideLoading
()
this
.
setData
({
showPage
:
true
})
this
.
setData
({
showPage
:
true
})
// 处理数据回显
// 处理数据回显
this
.
progressData
(
res
)
this
.
progressData
(
res
)
})
})
...
@@ -116,7 +172,11 @@ Page({
...
@@ -116,7 +172,11 @@ Page({
return
return
}
}
try
{
try
{
const
businessSceneNames
=
{
0
:
'轻改'
,
1
:
'权益'
,
2
:
'延保'
}
const
businessSceneNames
=
{
0
:
'轻改'
,
1
:
'权益'
,
2
:
'延保'
}
// 主营品牌
// 主营品牌
data
.
mainCategory
=
data
.
mainBrand
||
''
data
.
mainCategory
=
data
.
mainBrand
||
''
// 合作模式
// 合作模式
...
@@ -236,11 +296,17 @@ Page({
...
@@ -236,11 +296,17 @@ Page({
tabIndex
:
index
,
tabIndex
:
index
,
showVisitButton
:
index
!=
1
showVisitButton
:
index
!=
1
})
})
wx
.
nextTick
(()
=>
{
this
.
measureLayout
()
})
wx
.
nextTick
(()
=>
{
this
.
measureLayout
()
})
},
},
measureLayout
()
{
measureLayout
()
{
const
{
scrollTop
,
initialTabTop
,
navBarHeight
}
=
this
.
data
const
{
scrollTop
,
initialTabTop
,
navBarHeight
}
=
this
.
data
if
(
scrollTop
>=
(
initialTabTop
-
navBarHeight
))
{
if
(
scrollTop
>=
(
initialTabTop
-
navBarHeight
))
{
this
.
setData
({
this
.
setData
({
setScrollTop
:
(
initialTabTop
-
navBarHeight
)
setScrollTop
:
(
initialTabTop
-
navBarHeight
)
...
...
pages/tab/customer/components/PotentialSection/PotentialSection.js
View file @
f216194
...
@@ -83,7 +83,7 @@ Component({
...
@@ -83,7 +83,7 @@ Component({
// 4: 2 // 未签约
// 4: 2 // 未签约
}
}
const
obj
=
{
const
obj
=
{
keyword
:
this
.
data
.
searchKeyword
,
storeName
:
this
.
data
.
searchKeyword
,
isAll
:
boardScopeActive
?
1
:
0
,
isAll
:
boardScopeActive
?
1
:
0
,
year
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getFullYear
(),
year
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getFullYear
(),
month
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getMonth
()
+
1
,
month
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getMonth
()
+
1
,
...
...
pages/tab/customer/components/StoreSection/StoreSection.js
View file @
f216194
...
@@ -69,7 +69,7 @@ Component({
...
@@ -69,7 +69,7 @@ Component({
getParams
()
{
getParams
()
{
let
{
boardScopeActive
,
monthPickerValue
,
searchObj
,
statusIndex
,
userInfo
,
personParams
}
=
this
.
data
let
{
boardScopeActive
,
monthPickerValue
,
searchObj
,
statusIndex
,
userInfo
,
personParams
}
=
this
.
data
const
obj
=
{
const
obj
=
{
keyword
:
this
.
data
.
searchKeyword
,
merchantName
:
this
.
data
.
searchKeyword
,
isAll
:
boardScopeActive
?
1
:
0
,
isAll
:
boardScopeActive
?
1
:
0
,
year
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getFullYear
(),
year
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getFullYear
(),
month
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getMonth
()
+
1
,
month
:
boardScopeActive
?
undefined
:
new
Date
(
monthPickerValue
).
getMonth
()
+
1
,
...
...
pages/tab/customer/components/StoreSection/StoreSection.wxml
View file @
f216194
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<view class="board-actions">
<view class="board-actions">
<view class="board-action {{boardMonthActive ? 'active' : ''}}" bindtap="chooseBoard" data-type="month">
<view class="board-action {{boardMonthActive ? 'active' : ''}}" bindtap="chooseBoard" data-type="month">
<text>{{boardMonthText}}</text>
<text>{{boardMonthText}}</text>
<image src="{{IMG_URL}}customer/arrow.png" mode=""
/>
<image src="{{IMG_URL}}customer/arrow.png" mode=""
/>
</view>
</view>
<view class="board-action {{boardScopeActive ? 'active' : ''}}" bindtap="chooseBoard" data-type="scope">
<view class="board-action {{boardScopeActive ? 'active' : ''}}" bindtap="chooseBoard" data-type="scope">
<text>{{boardScopeText}}</text>
<text>{{boardScopeText}}</text>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</view>
</view>
<view class="grid-item wid-67">
<view class="grid-item wid-67">
<view class="label">关店</view>
<view class="label">关店</view>
<view class="value">{{dashboard.signed
Count}}</view>
<view class="value">{{dashboard.closedStore
Count}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<block wx:for="{{storeList}}" wx:key="index">
<block wx:for="{{storeList}}" wx:key="index">
<view class="list-card" bindtap="goDetail" data-item="{{item}}">
<view class="list-card" bindtap="goDetail" data-item="{{item}}">
<view class="card-header">
<view class="card-header">
<view class="status-tag {{item.storeType == 1 ? 'new': item.storeType == 2? 'old':'close'}}">{{ item.storeType == 1 ? '新店' : '老
店' }}</view>
<view class="status-tag {{item.storeType == 1 ? 'new': item.storeType == 2? 'old':'close'}}">{{ item.storeType == 1 ? '新店':item.storeType == 2?'老店' : '关
店' }}</view>
<view class="title">{{item.merchantName || '-'}} </view>
<view class="title">{{item.merchantName || '-'}} </view>
</view>
</view>
<view class="card-row">
<view class="card-row">
...
@@ -79,14 +79,17 @@
...
@@ -79,14 +79,17 @@
<view class="label">展业时间</view>
<view class="label">展业时间</view>
<view class="value">{{item.expectedOperationDate || '-'}} </view>
<view class="value">{{item.expectedOperationDate || '-'}} </view>
</view>
</view>
<block wx:if="{{item.status == 3}}">
<view class="card-row">
<view class="card-row">
<view class="label">关店时间</view>
<view class="label">关店时间</view>
<view class="value">{{item.signed
Time || '-'}} </view>
<view class="value">{{item.close
Time || '-'}} </view>
</view>
</view>
<view class="card-row">
<view class="card-row">
<view class="label">关店原因</view>
<view class="label">关店原因</view>
<view class="value">{{item.expectedOperationDate
|| '-'}} </view>
<view class="value">{{item.confirmReason
|| '-'}} </view>
</view>
</view>
</block>
</view>
</view>
</block>
</block>
<view class="list-footer" wx:if="{{loading}}">加载中...</view>
<view class="list-footer" wx:if="{{loading}}">加载中...</view>
...
@@ -99,13 +102,6 @@
...
@@ -99,13 +102,6 @@
<!-- 月份选择弹窗(门店) -->
<!-- 月份选择弹窗(门店) -->
<popup bind:hidePopup="cancel" bind:confirm="popupConfirm" customPopupSlotStyle="{{'height: calc(100% - 210rpx)'}}" show="{{monthPickerShow}}" title="选择月份" height="50%">
<popup bind:hidePopup="cancel" bind:confirm="popupConfirm" customPopupSlotStyle="{{'height: calc(100% - 210rpx)'}}" show="{{monthPickerShow}}" title="选择月份" height="50%">
<van-datetime-picker
<van-datetime-picker type="year-month" model:value="{{pendingMonthValue}}" min-date="{{minMonthDate}}" max-date="{{maxMonthDate}}" show-toolbar="{{false}}" bind:change="onMonthChange" />
type="year-month"
model:value="{{pendingMonthValue}}"
min-date="{{minMonthDate}}"
max-date="{{maxMonthDate}}"
show-toolbar="{{false}}"
bind:change="onMonthChange"
/>
</popup>
</popup>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
utils/request/environment.js
View file @
f216194
...
@@ -21,7 +21,7 @@ const h5Obj = {
...
@@ -21,7 +21,7 @@ const h5Obj = {
2测试
2测试
3生产
3生产
*/
*/
let
index
=
2
let
index
=
2
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
// console.log(systemInfo);
// console.log(systemInfo);
...
...
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