Commit 81300294 by 前端

Merge branch 'SAAS+V5.4.0' into 'master'

上线合并

See merge request !3
2 parents 1168b36c 51c01f7f
...@@ -59,7 +59,7 @@ class UsersApi { ...@@ -59,7 +59,7 @@ class UsersApi {
{ {
method: 'dj.api.sale.login.auth.phone', method: 'dj.api.sale.login.auth.phone',
...detail, ...detail,
platformEntrance: 'BUSINESS_ASSISTANT' // 平台标识:生意助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT platformEntrance: 'SALES_ASSISTANT' // 平台标识:销售助手
}, },
true true
) )
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
</view> </view>
</view> </view>
</view> </view>
<glsx-privacy appletName="生意助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
<glsx-privacy appletName="销售助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
<button wx:else class="phoneNumber" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">合作申请</button> <button wx:else class="phoneNumber" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">合作申请</button>
</view> </view>
</view> </view>
<glsx-privacy appletName="生意助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="销售助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</view> </view>
<!-- 协议 --> <!-- 协议 -->
<!-- <auth-setting bind:choose="authChoose" agree="{{ agree }}" /> --> <!-- <auth-setting bind:choose="authChoose" agree="{{ agree }}" /> -->
<glsx-privacy appletName="生意助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="销售助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- 未同意协议弹窗提示 --> <!-- 未同意协议弹窗提示 -->
<van-dialog use-slot title="隐私协议与用户协议" show="{{ showAuthDialog }}" class="auth-dialog-class" custom-class="auth-dialog-class" width="var(--fontSize552)" show-cancel-button confirmButtonText="同意" use-title-slot="{{ true }}" confirm-button-color="#5092FF" bind:confirm="agreeEvent" bind:close="onClose"> <van-dialog use-slot title="隐私协议与用户协议" show="{{ showAuthDialog }}" class="auth-dialog-class" custom-class="auth-dialog-class" width="var(--fontSize552)" show-cancel-button confirmButtonText="同意" use-title-slot="{{ true }}" confirm-button-color="#5092FF" bind:confirm="agreeEvent" bind:close="onClose">
<view slot="title"> <view slot="title">
......
...@@ -137,9 +137,10 @@ Page({ ...@@ -137,9 +137,10 @@ Page({
}) })
// 未保存数据,默认将店总选中 // 未保存数据,默认将店总选中
if (managerRoles?.findIndex(v => v.checked) < 0) managerRoles[0].checked = true if (managerRoles?.findIndex(v => v.checked) < 0) managerRoles[0].checked = true
baseForm?.forEach(val => { // 2025-11-24版本放开信息完善门店名称和品牌编辑
if (val.key == 'storeName' || val.key == 'mainCategory') val.disabled = true // baseForm?.forEach(val => {
}) // if (val.key == 'storeName' || val.key == 'mainCategory') val.disabled = true
// })
this.setData({ this.setData({
infoData: data, infoData: data,
selectedMainBrand, selectedMainBrand,
......
...@@ -15,7 +15,7 @@ Page({ ...@@ -15,7 +15,7 @@ Page({
// // this.getWarningStores() // // this.getWarningStores()
// }, // },
onLoad: function (options) { onLoad: function (options) {
console.log(options, 'options') // console.log(options, 'options')
// 生命周期函数--监听页面加载 // 生命周期函数--监听页面加载
console.log(options, 'options') console.log(options, 'options')
let { query } = options let { query } = options
......
{ {
"navigationBarTitleText": "销售助手",
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"regionalLeaders": "/pages/components/regionalLeaders/regionalLeaders" "regionalLeaders": "/pages/components/regionalLeaders/regionalLeaders"
......
...@@ -140,6 +140,21 @@ Component({ ...@@ -140,6 +140,21 @@ Component({
}) })
// 请求我的团队 // 请求我的团队
this.getMyTeam() this.getMyTeam()
},
// 首页切回时统一刷新:我的团队 + 我的门店(KPI) + 预警
refresh() {
console.log('refresh', '大区')
// 刷新团队数据
this.getMyTeam()
// 刷新门店 KPI
const stat = this.selectComponent('#storeStatistics')
if (stat) {
if (typeof stat.getTotal === 'function') stat.getTotal()
if (typeof stat.getKpiProgress === 'function') stat.getKpiProgress()
}
// 刷新预警列表
const warn = this.selectComponent('#storeWarning')
if (warn && typeof warn.refresh === 'function') warn.refresh()
} }
} }
}) })
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
></table> ></table>
</view> </view>
</view> </view>
<storeStatistics regionId="{{ regionId }}"></storeStatistics> <storeStatistics id="storeStatistics" regionId="{{ regionId }}"></storeStatistics>
<view class="storeWaring"> <view class="storeWaring">
<store-waring regionId="{{ regionId }}"></store-waring> <store-waring id="storeWarning" regionId="{{ regionId }}"></store-waring>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -31,5 +31,16 @@ Component({ ...@@ -31,5 +31,16 @@ Component({
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: {} methods: {
// 切回首页时,刷新内部门店统计与预警列表
refresh() {
const stat = this.selectComponent('#storeStatistics')
if (stat) {
if (typeof stat.getTotal === 'function') stat.getTotal()
if (typeof stat.getKpiProgress === 'function') stat.getKpiProgress()
}
const warn = this.selectComponent('#storeWarning')
if (warn && typeof warn.refresh === 'function') warn.refresh()
}
}
}) })
<!--packageIndex/pages/staff/staff.wxml--> <!--packageIndex/pages/staff/staff.wxml-->
<storeStatistics regionId="{{ regionId }}" staffUuid="{{ staffUuid }}"></storeStatistics>
<store-waring regionId="{{ regionId }}" staffUuid="{{ staffUuid }}"></store-waring>
\ No newline at end of file \ No newline at end of file
<storeStatistics id="storeStatistics" regionId="{{ regionId }}" staffUuid="{{ staffUuid }}"></storeStatistics>
<store-waring id="storeWarning" regionId="{{ regionId }}" staffUuid="{{ staffUuid }}"></store-waring>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ Page({ ...@@ -9,7 +9,7 @@ Page({
data: { data: {
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
track_event_code: 'sales_index_view_page', track_event_code: 'sales_index_view_page',
navTitleStyle: "font-weight: 600; font- size: 32rpx; color: #000;", navTitleStyle: 'font-weight: 600; font- size: 32rpx; color: #000;'
}, },
// navbar高度设置 // navbar高度设置
// navbarReady(e) { // navbarReady(e) {
...@@ -43,7 +43,7 @@ Page({ ...@@ -43,7 +43,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { }, onReady: function () {},
onReachBottom() { onReachBottom() {
console.log('滑到底部了') console.log('滑到底部了')
...@@ -53,6 +53,7 @@ Page({ ...@@ -53,6 +53,7 @@ Page({
*/ */
onShow: async function () { onShow: async function () {
this.onPageShow() this.onPageShow()
this.refreshActiveTab()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
...@@ -71,11 +72,33 @@ Page({ ...@@ -71,11 +72,33 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { }, onPullDownRefresh: function () {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { }, onShareAppMessage: function () {},
onShareTimeline: function () { } onShareTimeline: function () {},
// 每次切换到首页 tab,刷新当前角色组件的数据
refreshActiveTab() {
const { loginRole } = this.data
const comp = this.selectComponent('#roleComp')
if (!comp) return
// 1-总监 2-大区经理 3-销售人员
if (loginRole == 1) {
// 总监页封装了 refreshList
if (typeof comp.refreshList === 'function') comp.refreshList()
} else if (loginRole == 2) {
// 大区经理页,统一刷新(我的团队、门店KPI、预警)
if (typeof comp.refresh === 'function') {
comp.refresh()
} else if (typeof comp.getMyTeam === 'function') {
// 兼容旧实现
comp.getMyTeam()
}
} else if (loginRole == 3) {
// 员工页,转发刷新到内部门店统计
if (typeof comp.refresh === 'function') comp.refresh()
}
}
}) })
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<view style="height:100vh;overflow: hidden;"> <view style="height:100vh;overflow: hidden;">
<view class="layout" style="height:calc(100vh - {{ navBarHeight}}px); margin-top:{{ navBarHeight + 'px' }}"> <view class="layout" style="height:calc(100vh - {{ navBarHeight}}px); margin-top:{{ navBarHeight + 'px' }}">
<!-- 登录角色 1-总监 2-大区经理 3-销售人员 --> <!-- 登录角色 1-总监 2-大区经理 3-销售人员 -->
<staff wx:if="{{ loginRole == 3 }}"></staff> <staff id="roleComp" wx:if="{{ loginRole == 3 }}"></staff>
<regionalLeaders wx:if="{{ loginRole == 2 }}"></regionalLeaders> <regionalLeaders id="roleComp" wx:if="{{ loginRole == 2 }}"></regionalLeaders>
<directorLeaders wx:if="{{ loginRole == 1 }}"></directorLeaders> <directorLeaders id="roleComp" wx:if="{{ loginRole == 1 }}"></directorLeaders>
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
</view>
\ No newline at end of file \ No newline at end of file
...@@ -44,7 +44,7 @@ class Router { ...@@ -44,7 +44,7 @@ class Router {
const router = `${thisPage.__route__}.html` const router = `${thisPage.__route__}.html`
if (__wxConfig && __wxConfig.page && __wxConfig.page[router]) { if (__wxConfig && __wxConfig.page && __wxConfig.page[router]) {
let { navigationBarTitleText, navigationStyle } = __wxConfig.page[router].window let { navigationBarTitleText, navigationStyle } = __wxConfig.page[router].window
if (!title) title = '生意助手' if (!title) title = '销售助手'
if (!navigationBarTitleText && !navigationStyle) if (!navigationBarTitleText && !navigationStyle)
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title title
......
...@@ -218,7 +218,7 @@ class TRACK { ...@@ -218,7 +218,7 @@ class TRACK {
? navigationBarTitleText ? navigationBarTitleText
: window.navigationBarTitleText : window.navigationBarTitleText
} }
if (!title) title = '生意助手员工版' if (!title) title = '销售助手'
return title return title
} }
/**获取设备信息 */ /**获取设备信息 */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!