Commit 5f6ba3c9 by zhangxw

超管/督导侧边栏门店分页加载

1 parent a08e4685
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/SideSelectPopup/SideSelectPopup.wxml-->
<van-popup custom-style="height: 100%;width:var(--fontSize560);" z-index="999999" custom-class="popclass" bind:click-overlay="closeMenu" position="left" bind:before-enter="hideTabBar" bind:after-leave="showTabBar" show="{{ show }}">
<view class="wrapper">
<view class="title_box">
<view class="title">店面列表</view>
</view>
<view class="search-box">
<view class='select_box' wx:if="{{userInfo.sceneType == 1}}">
<view class='select' catchtap='selectTap'>
<view class='select_text'>{{searchSelectData[searchSelectIndex]}}</view>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='/images/arrow-right.png'></image>
</view>
<view class='option_box' wx:if="{{showSelect}}">
<view class='option {{searchSelectIndex == index ? "active" : ""}}' wx:for='{{searchSelectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view>
</view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
</view>
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="{{searchSelectIndex == 0 ? '搜索门店名称/商户号' : '搜索客户姓名/手机号'}}" class="input" confirm-type="search" value="{{searchValue}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="inputConfifm" />
<block wx:if="{{searchValue}}">
<image src="/images/clear.png" class="search-clear" bindtap="clearInputText" />
</block>
</view>
</view>
<!-- 搜门店 -->
<scroll-view wx:if="{{searchSelectIndex == 0}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{storeRangeList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/store_icon_nobg.png"></image></view>
<view class="text_box">
<view class="label">{{item.merchantName}}</view>
<view class="label_no" wx:if="{{item.merchantId}}">商户号:{{item.merchantId}}</view>
</view>
</view>
</block>
</scroll-view>
<!-- 搜客户 -->
<scroll-view wx:if="{{customStoreList.length && searchSelectIndex == 1 && userInfo.sceneType == 1}}" scroll-y style="height: calc(100vh - var(--fontSize264) - var(--fontSize88));" enhanced="{{true}}" show-scrollbar="{{false}}" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{customStoreList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element custom_element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/user_avatar.png"></image></view>
<view class="text_box">
<view class="custom_text">
<view class="name_phone">
<text class="custom_name">{{item.customer.customerName}}</text>
<text class="custom_phone">{{item.customer.customerPhone}}</text>
</view>
<view class="status_text status_text_{{item.listStatus}}">{{statusText[item.listStatus]}}</view>
</view>
<view class="label">{{item.merchantName}}</view>
<view class="label_no" wx:if="{{item.merchantId}}">商户号:{{item.merchantId}}</view>
</view>
</view>
</block>
</scroll-view>
<block wx:if="{{(!customStoreList.length && searchSelectIndex == 1) || (!storeRangeList.length && searchSelectIndex == 0)}}">
<view class="list_not">
<image class="list_nothing_img {{customSearchFlag ? '' : 'big_list_nothing_img'}}" src="{{IMG_URL}}/{{customSearchFlag ? 'no_data_bg' : 'search_icon_bg'}}.png" mode=""/>
<view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view>
</view>
</block>
</view>
</van-popup>
/* components/SideSelectPopup/SideSelectPopup.wxss */
.popclass{
background-image: linear-gradient(180deg, #1D243D 0%, #30365C 100%);
border-radius: 0 var(--fontSize40) var(--fontSize40) 0;
z-index: 1999999999999;
box-sizing: border-box;
padding: var(--fontSize88) var(--fontSize16);
}
.wrapper .title_box{
height: var(--fontSize60);
line-height: var(--fontSize60);
margin-bottom: var(--fontSize20);
display: flex;
align-items: center;
}
.wrapper .title_box .title{
padding-left: var(--fontSize16);
margin-right: var(--fontSize32);
font-weight: 600;
font-size: var(--fontSize28);
color: #FFFFFF80;
}
.search-box {
display: flex;
position: sticky;
top: 0;
left: 0;
z-index: 1009;
box-sizing: border-box;
margin-bottom: var(--fontSize16);
}
.search-box .select_box{
width: var(--fontSize180);
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: var(--fontSize24);
color: #999999;
}
.search-box .select_box .select{
display: flex;
align-items: center;
width: var(--fontSize132);
}
.search-box .select_box .select .select_text{
color: #FFFFFF;
font-size: var(--fontSize28);
}
.search-box .select_box .select .select_img{
transform: rotate(90deg);
width: var(--fontSize12);
height: var(--fontSize20);
flex-shrink: 0;
margin-left: var(--fontSize6);
}
.search-box .select_box .select .select_img_rotate{
transform: rotate(-90deg);
}
.search-box .select_box .option_box{
position: absolute;
z-index: 200;
top: var(--fontSize100);
left: var(--fontSize32);
width: var(--fontSize194);
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 var(--fontSize6) var(--fontSize12) 0 #0000000d;
border-radius: var(--fontSize16);
height: var(--fontSize176);
}
.search-box .select_box .option_box::after{
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
border-right: var(--fontSize14) solid #FFFFFF;
top: calc(-1 * var(--fontSize24));
left: var(--fontSize88);
z-index:-1;
transform: rotate(90deg);
}
.search-box .select_box .option_box::before{
height: 0;
width: 0;
content: '';
position: absolute;
border: var(--fontSize14) solid transparent;
border-right: var(--fontSize14) solid #FFFFFF;
top: calc(-1 * var(--fontSize24));
left: var(--fontSize88);
z-index:-1;
transform: rotate(90deg);
}
.search-box .select_box .option_box .option{
display: block;
height: var(--fontSize88);
line-height: var(--fontSize88);
text-align: center;
color: #333333;
overflow: hidden;
}
.search-box .select_box .option_box .option:first-child{
border-radius: var(--fontSize16) var(--fontSize16) 0 0;
}
.search-box .select_box .option_box .option:last-child{
border-radius: 0 0 var(--fontSize16) var(--fontSize16);
}
.search-box .select_box .option_box .option.active{
background: #347bff1a;
color: #347BFF;
}
.search-box .search-input {
width: 100%;
height: var(--fontSize72);
display: flex;
align-items: center;
background: rgba(255, 255, 255, .15);
border-radius: var(--fontSize38);
}
.search-box .search-input .search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize8) 0 var(--fontSize24);
flex-shrink: 0;
}
.search-box .search-input .search-clear {
flex-shrink: 0;
padding: var(--fontSize10);
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 var(--fontSize10) 0 var(--fontSize10);
}
.search-box .search-input .input {
font-size: var(--fontSize28);
color: #FFFFFF;
width: calc(100% - var(--fontSize100));
height: 100%;
}
.input-placeholder {
color: #BEC1C7;
}
.search-box .search {
width: var(--fontSize144);
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 var(--fontSize24);
}
.search-box .search .text-center {
font-size: var(--fontSize24);
/* background-color: #f7f7f7; */
border-radius: var(--fontSize12);
width: 100%;
height: var(--fontSize50);
color: #888;
}
.search-box .search .text-center .search-filter {
margin-left: var(--fontSize6);
width: var(--fontSize24);
height: var(--fontSize24);
}
.mask_class{
width: 100vw;
height: 100vh;
background: transparent;
position: fixed;
top: 0;
left: 0;
z-index: 100;
}
/* .wrapper .search_box{
padding-bottom: var(--fontSize16);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
}
.wrapper .search_box image{
width: var(--fontSize32);
height: var(--fontSize32);
}
.wrapper .search_box .clear_icon{
flex-shrink: 0;
padding: var(--fontSize10);
}
.wrapper .search_box .search-input {
width: var(--fontSize496);
height: var(--fontSize72);
background: rgba(255, 255, 255, .15);
border-radius: 38px;
padding: 0 var(--fontSize16);
box-sizing: border-box;
}
.wrapper .search_box .search-input .input{
display: flex;
align-items: center;
height: 100%;
color: #FFFFFF;
}
.wrapper .search_box .search-input .input .icon{
margin-right: var(--fontSize8);
}
.wrapper .search_box .search-input .input_box{
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.wrapper .search_box .search-input .placeholder{
color: #BEC1C7;
} */
.wrapper .element{
position: relative;
padding: var(--fontSize32);
display: flex;
align-items: center;
}
.wrapper .element .text_box{
display: flex;
flex-flow: column;
justify-content: center;
width: calc(100% - var(--fontSize116));
}
.wrapper .element .text_box .custom_text{
display: flex;
align-items: center;
justify-content: space-between;
color: #FFFFFF;
margin-bottom: var(--fontSize16);
}
.wrapper .custom_element .text_box .custom_text .name_phone{
max-width: var(--fontSize260);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wrapper .custom_element .text_box .custom_text .custom_name{
font-size: var(--fontSize28);
}
.wrapper .custom_element .text_box .custom_text .custom_phone{
font-size: var(--fontSize24);
margin-left: var(--fontSize8);
}
.wrapper .custom_element .text_box .status_text{
width: var(--fontSize76);
height: var(--fontSize36);
flex-shrink: 0;
line-height: var(--fontSize36);
border-radius: var(--fontSize4);
text-align: center;
font-size: var(--fontSize20);
font-weight: 600;
}
/* 待跟进 */
.wrapper .custom_element .text_box .status_text_0{
background: #FFF5E6;
color: #FF9D0A;
}
/* 已升级 */
.wrapper .custom_element .text_box .status_text_1{
background: #EAF1FF;
color: #347BFF;
}
/* 战败 */
.wrapper .custom_element .text_box .status_text_2{
background: #FDECE9;
color: #F24724;
}
/* 待支付 */
.wrapper .custom_element .text_box .status_text_3{
background: #FFF5E6;
color: #FF9D0A;
}
.wrapper .element .text_box .label{
font-weight: 500;
font-size: var(--fontSize30);
color: #FFFFFF;
max-width: var(--fontSize334);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.label_no{
font-size: var(--fontSize24);
color: #999EA8;
margin-top: var(--fontSize16);
}
.wrapper .custom_element .text_box .label{
font-size: var(--fontSize24);
color: #999EA8;
}
.wrapper .custom_element .text_box .label_no{
margin-top: 0;
}
.wrapper .element image{
width: var(--fontSize96);
height: var(--fontSize96);
margin-right: var(--fontSize30);
flex-shrink: 0;
}
.wrapper .active{
background: #FFFFFF15;
border-radius: var(--fontSize16);
}
.wrapper .element .img{
display: none;
}
.wrapper .active .img{
display: block;
}
.wrapper .active .gap_icon{
display: none;
}
.wrapper .mine{
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 calc(-1 * var(--fontSize16));
padding: var(--fontSize8) var(--fontSize32) var(--fontSize8) var(--fontSize16);
background: #2C3255;
}
.wrapper .mine .img{
width: var(--fontSize96);
height: var(--fontSize96);
}
.wrapper .mine .flex_box{
display: flex;
align-items: center;
}
.wrapper .mine .right_icon{
width: var(--fontSize12);
height: var(--fontSize12);
background-color: transparent; /* 模块背景为透明 */
border-color: #AEB2C2;
border-style: solid;
border-width: var(--fontSize4) var(--fontSize4) 0 0;
transform: rotate(45deg);
}
.list_nothing_img{
width: var(--fontSize226);
height: var(--fontSize156);
}
.big_list_nothing_img{
width: var(--fontSize258);
height: var(--fontSize258);
}
.list_not {
height: calc(100vh - var(--fontSize264) - var(--fontSize88));
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}
.list_not_text{
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: var(--fontSize28);
color: #BEC1C7;
margin-top: var(--fontSize24);
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.wrapper .title_box .title{
font-size: var(--fontSize24);
}
.wrapper .element{
padding: var(--fontSize20);
}
.wrapper .element image{
width: var(--fontSize70);
height: var(--fontSize70);
}
.wrapper .element .text_box .label{
font-size: var(--fontSize26);
}
.wrapper .element .text_box .label_no{
font-size: var(--fontSize20);
}
}
\ No newline at end of file \ No newline at end of file
...@@ -290,7 +290,11 @@ Page({ ...@@ -290,7 +290,11 @@ Page({
this.setData({ this.setData({
userInfo, userInfo,
}); });
this.get4SStoreList(); if (!userInfo.isSuper && userInfo.loginRole != 3) {
this.get4SStoreList();
} else {
this.setData({showPage: true})
}
this.getIsBusinessSchoolEnableCurrentUser(); this.getIsBusinessSchoolEnableCurrentUser();
// this.test() // this.test()
}, },
......
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
"quotation-list": "../carQuotation/index/index", "quotation-list": "../carQuotation/index/index",
"equity-list": "../carEquity/components/EquityList/EquityList", "equity-list": "../carEquity/components/EquityList/EquityList",
"store-picker": "../../components/storePicker/storePicker", "store-picker": "../../components/storePicker/storePicker",
"side-select-popup": "../../../components/SideSelectPopup/SideSelectPopup", "side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"order-switchPopup": "/components/orderSwitchPopup/orderSwitchPopup", "order-switchPopup": "/components/orderSwitchPopup/orderSwitchPopup",
"order-no-popup":"../../components/OrderNoPopup/OrderNoPopup", "order-no-popup":"../../components/OrderNoPopup/OrderNoPopup",
"tab-mine": "/components/TabMine/TabMine", "tab-mine": "/components/TabMine/TabMine",
"home": "../index/index", "home": "../index/index",
"makert-material":"../trainingMaterials/components/Materials/materials", "makert-material":"../trainingMaterials/components/Materials/materials",
"reception-screen": "../index/components/receptionScreen/receptionScreen", "reception-screen": "../index/components/receptionScreen/receptionScreen",
"order-screen": "../carQuotation/components/OrderScreen/OrderScreen" "order-screen": "../carQuotation/components/OrderScreen/OrderScreen",
"side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -41,7 +41,12 @@ ...@@ -41,7 +41,12 @@
</view> </view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#347BFF" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" /> <custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#347BFF" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<!-- <store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" /> --> <!-- <store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" /> -->
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{ storeRange }}" bindconfirm="changePicker" /> <block wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}">
<side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="changePicker" />
</block>
<block wx:else>
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{ storeRange }}" bindconfirm="changePicker" />
</block>
<!-- <order-switchPopup <!-- <order-switchPopup
bind:close="closeSwitchPopup" bind:close="closeSwitchPopup"
bind:success="navigator" bind:success="navigator"
......
...@@ -1092,7 +1092,7 @@ Page({ ...@@ -1092,7 +1092,7 @@ Page({
// 判断是不是特殊账号 // 判断是不是特殊账号
let { menu, newMenu } = this.data; let { menu, newMenu } = this.data;
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
const isNoStaff = userInfo.loginRole != 4 && userInfo.loginRole != null; const isNoStaff = userInfo?.loginRole != 4 && userInfo?.loginRole != null;
this.getIsBusinessSchoolEnableCurrentUser(); this.getIsBusinessSchoolEnableCurrentUser();
// 不是员工类型 // 不是员工类型
if (isNoStaff) { if (isNoStaff) {
...@@ -1106,13 +1106,13 @@ Page({ ...@@ -1106,13 +1106,13 @@ Page({
]; ];
} }
//超管、督导驻店日报、BI报表、生意助手 //超管、督导驻店日报、BI报表、生意助手
if (userInfo.loginRole === 3 || userInfo.isSuper) { if (userInfo?.loginRole === 3 || userInfo?.isSuper) {
menu = []; menu = [];
} }
if ( if (
(app.globalData.isStaff || (app.globalData.isStaff ||
userInfo.isSuper || userInfo?.isSuper ||
userInfo.loginRole === 3) && userInfo?.loginRole === 3) &&
menu.every((item) => item.name != "驻店日报") menu.every((item) => item.name != "驻店日报")
) { ) {
menu.push({ menu.push({
...@@ -1123,7 +1123,7 @@ Page({ ...@@ -1123,7 +1123,7 @@ Page({
}); });
} }
if ( if (
(userInfo.isSuper || userInfo.loginRole === 3) && (userInfo?.isSuper || userInfo?.loginRole === 3) &&
menu.every((item) => item.name != "BI报表") menu.every((item) => item.name != "BI报表")
) { ) {
menu.push({ menu.push({
...@@ -1135,7 +1135,7 @@ Page({ ...@@ -1135,7 +1135,7 @@ Page({
} }
//区域督导和超管角色 //区域督导和超管角色
if ( if (
(userInfo.isSuper || userInfo.loginRole === 3) && (userInfo?.isSuper || userInfo?.loginRole === 3) &&
menu.every((item) => item.name != "生意助手") menu.every((item) => item.name != "生意助手")
) { ) {
menu.push({ menu.push({
...@@ -1218,7 +1218,7 @@ Page({ ...@@ -1218,7 +1218,7 @@ Page({
); );
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.get4SStoreList(); if (!userInfo?.isSuper && userInfo?.loginRole != 3) this.get4SStoreList();
// this.getIsBusinessSchoolEnableCurrentUser(); // this.getIsBusinessSchoolEnableCurrentUser();
// 获取驻店员工目标 // 获取驻店员工目标
if (app.globalData.isStaff) this.getStaffTargetTask(); if (app.globalData.isStaff) this.getStaffTargetTask();
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"van-progress": "@vant/weapp/progress/index", "van-progress": "@vant/weapp/progress/index",
"store-picker": "/components/storePicker/storePicker", "store-picker": "/components/storePicker/storePicker",
"recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup", "recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup",
"task-dialog": "/components/TaskDialog/TaskDialog" "task-dialog": "/components/TaskDialog/TaskDialog",
"side-select-by-page-popup": "/components/SideSelectByPagePopup/SideSelectByPagePopup"
} }
} }
...@@ -404,7 +404,12 @@ ...@@ -404,7 +404,12 @@
<remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" isLimitNum="{{ false }}" title="{{ '修改贴膜台次' }}" btnName="{{ '确认' }}" bind:confirm="remarkConfirm" placeholder="{{ '请输入整数' }}" maxlength="4" value="{{ methodUpdateInfo.filmTimes }}" isInt="{{ true }}" /> <remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" isLimitNum="{{ false }}" title="{{ '修改贴膜台次' }}" btnName="{{ '确认' }}" bind:confirm="remarkConfirm" placeholder="{{ '请输入整数' }}" maxlength="4" value="{{ methodUpdateInfo.filmTimes }}" isInt="{{ true }}" />
<recording-order-popup wx:if="{{showOrderpop}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{showOrderpop}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" />
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{ storeRange}}" bindconfirm="storeSearchEvent" subIndex="{{subIndex}}" hasTabBar="true" /> <block wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}">
<side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="storeSearchEvent" subIndex="{{subIndex}}" hasTabBar="true" />
</block>
<block wx:else>
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{ storeRange}}" bindconfirm="storeSearchEvent" subIndex="{{subIndex}}" hasTabBar="true" />
</block>
<!-- <store-picker <!-- <store-picker
subIndex="{{ subIndex }}" subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}" pickList="{{ merchantRange }}"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!