Commit e2e0dff2 by wangzhihui

fixed

1 parent 10c83f18
......@@ -548,6 +548,19 @@ Component({
icon: "supervisorDaily",
})
}
if (
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5) &&
menuList.every((item) => item.menuText != "驻店管理")
) {
menuList.push({
menuText: "驻店管理",
path: "tabWorkOrder.residentManage",
recordId: 13,
icon: "residentManage"
});
}
this.checkIsPadOrNot();
this.getData();
// 隐藏待办事项模块
......
......@@ -1261,6 +1261,20 @@ Page({
path: "",
});
}
if (
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5) &&
menu.every((item) => item.name != "驻店管理")
) {
menu.push({
name: "驻店管理",
url: "tabWorkOrder.residentManage",
recordId: 13,
icon: "residentManage",
noCheckdailyReport: true,
});
}
this.setData({
menu,
isNoStaff,
......
......@@ -83,7 +83,16 @@
font-size: 32rpx;
font-weight: bold;
margin-bottom: 8rpx;
white-space: nowrap;
display: flex;
align-items: center;
.staff{
white-space: nowrap;
max-width: 204rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
text {
font-size: 28rpx;
font-weight: normal;
......@@ -138,18 +147,19 @@
display: flex;
align-items: center;
white-space: nowrap;
width:calc(100% - 164rpx);
width: calc(100% - 164rpx);
.yqMerchant-box {
display: flex;
align-items: center;
font-size: 28rpx;
color: #292d33;
margin-left: 16rpx;
width:calc(100% - 74rpx);
width: calc(100% - 74rpx);
}
.text-hide {
max-width: calc(100vw - 100rpx);
max-width: calc(100vw - 100rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......@@ -159,7 +169,7 @@
.operation {
width: 108rpx;
height: 44rpx;
position: relative;
}
}
......@@ -187,7 +197,8 @@
.store-info {
margin-left: 32rpx;
width:calc(100% - 64rpx);
width: calc(100% - 64rpx);
.name {
color: #292d33;
font-size: 24rpx;
......@@ -196,8 +207,9 @@
white-space: nowrap;
display: flex;
align-items: center;
.text-hide {
max-width: calc(100vw - 100rpx);
max-width: calc(100vw - 100rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......@@ -271,4 +283,30 @@
.list-nothing,
.list-not {
text-align: center;
}
.operation {
.switch-text {
padding:0 16rpx;
width: 108rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 24rpx;
view{
position: absolute;
top:10rpx;
z-index:99;
}
}
.active{
left:5rpx;
}
.disabled{
left:52rpx;
}
}
\ No newline at end of file
<!--tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxml-->
<view class="container" wx:if="{{isFlag}}">
<view class="container">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名/手机号查询" class="input" value="{{ staffNameOrPhone }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
......@@ -10,12 +10,13 @@
</view>
<view class="info">员工调店分配新门店账号,业务督导需要处理员工的账号管理,若旧门店账号不再使用,请禁用旧账号,请标记勾选员工所在店面</view>
<view class="title">账号列表<text>请勾选员工目前调岗在店的门店名称</text></view>
<scroll-view class="account-box" style="height: calc(100vh - var(--fontSize640));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<block wx:if="{{isFlag}}">
<scroll-view class="account-box" style="height: calc(100vh - var(--fontSize640));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="list" wx:if="{{accountList.length>0}}">
<view class="item" wx:for="{{accountList}}" wx:key="index">
<view class="header">
<view class="left">
<view class="name">{{item.staffName}}<text>{{item.staffPhone}}</text></view>
<view class="name"><view class="staff">{{item.staffName}}</view><text>{{item.staffPhone}}</text></view>
<view class="tags">
<view class="tag" wx:for="{{item.labelArr}}" wx:for-item="tag" wx:for-index="key" wx:key="key">{{businessType[tag]}}</view>
</view>
......@@ -27,7 +28,11 @@
<view class="account-header">
<view class="park-name">账号{{i+1}}<view class="yqMerchant-box"><view class="text-hide">{{account.yqMerchantName}}</view>{{account.yqMerchantId}}</view></view>
<view class="operation">
<van-switch checked="{{ account.deletedState }}" active-color="#347BFF" inactive-color="#fff" data-index="{{index}}" data-account-index="{{i}}" bind:change="onChange" size="24px" />
<view class="switch-text">
<view class="active" wx:if="{{ account.deletedState}}">启用</view>
<view class="disabled" wx:else>禁用</view>
</view>
<van-switch checked="{{ account.deletedState }}" active-color="#347BFF" inactive-color="#D0D2D6" data-index="{{index}}" data-account-index="{{i}}" bind:change="onChange" size="26px" />
<!-- <switch class="wx-switch-input" checked="{{switch1Checked}}" color="#347BFF" bindchange="switch1Change" /> -->
</view>
</view>
......@@ -73,6 +78,8 @@
<empty-data />
</view>
</scroll-view>
</block>
</view>
<dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
......
......@@ -6,7 +6,21 @@ Component({
* 组件的属性列表
*/
properties: {
show: Boolean,
show: {
type: Boolean,
observer: function (n) {
if (n) {
let date =new Date().getTime();
console.log(date)
this.setData({
showPop:false,
start: date,
currentDate:date,
startEffectiveTime: new Date().format(`yyyy-MM-dd`)
})
}
}
},
confirmText: String,
cancelText: String,
showCancelButton: Boolean,
......@@ -18,8 +32,18 @@ Component({
* 组件的初始数据
*/
data: {
timeShow:false,
startEffectiveTime: '',
start:''
start: '',
formatter(type, value) {
if (type === 'year') {
return `${value}年`;
}
if (type === 'month') {
return `${value}月`;
}
return value
},
},
/**
......@@ -27,27 +51,47 @@ Component({
*/
methods: {
bindDateChange(e) {
const {
console.log(e)
const
value
} = e.detail
= e.detail
this.setData({
startEffectiveTime: value,
timeShow:false,
currentDate:value,
startEffectiveTime: new Date(value).format(`yyyy-MM-dd`),
})
},
confirm() {
this.triggerEvent('confirm',{startEffectiveTime:this.data.startEffectiveTime})
this.triggerEvent('confirm', {
startEffectiveTime: this.data.startEffectiveTime
})
},
cancel() {
this.calcelDate()
this.triggerEvent('cancel')
},
calcelDate(){
this.setData({
timeShow:false
})
},
showPop(){
this.setData({
timeShow:true
})
}
},
lifetimes:{
attached(){
let date=new Date().format(`yyyy-MM-dd`);
this.setData({
start:date,
startEffectiveTime:date
})
lifetimes: {
attached() {
let date =new Date().getTime();
console.log(date)
this.setData({
showPop:false,
start: date,
currentDate:date,
startEffectiveTime: new Date().format(`yyyy-MM-dd`)
})
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
"van-dialog": "@vant/weapp/dialog/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@
}
.time {
width: 526rpx;
// width: 526rpx;
height: 96rpx;
border-radius: 12rpx;
opacity: 1;
......@@ -47,4 +47,11 @@
height: 36rpx;
}
}
.footer{
position: fixed;
bottom:0;
left:0;
right:0;
z-index:99999!important;
}
\ No newline at end of file
......@@ -4,15 +4,21 @@
日期选择
</view>
<view class="label">选择该员工调店日期</view>
<picker mode="date" value="{{startEffectiveTime}}" start="{{start}}" bindchange="bindDateChange">
<view class="time">
<view class="value">{{startEffectiveTime?startEffectiveTime:'请选择'}}</view>
<image class="solidArrow" src="/tabIndex/images/arrSolid.png" />
</view>
</picker>
<!-- <picker mode="date" value="{{startEffectiveTime}}" start="{{start}}" bindchange="bindDateChange" picker-options="{{options}}"> -->
<view class="time" bind:tap="showPop">
<view class="value">{{startEffectiveTime?startEffectiveTime:'请选择'}}</view>
<image class="solidArrow" src="/tabIndex/images/arrSolid.png" />
</view>
<!-- </picker> -->
</view>
<view>
</view>
</van-dialog>
\ No newline at end of file
</van-dialog>
<!-- <van-popup show="{{ timeShow }}" position="bottom" custom-style="height: 20%;" bind:close="onClose"> -->
<view class="footer" wx:if="{{timeShow}}">
<van-datetime-picker type="date" value="{{ currentDate }}" bind:confirm="bindDateChange" bind:cancel="calcelDate" min-date="{{ start }}" />
</view>
<!-- </van-popup> -->
\ No newline at end of file
......@@ -57,8 +57,10 @@ Page({
onShow() {
},
back() {
wx.$router.back()
},
changeHandle(e) {
console.log(e)
let {
index
} = e.currentTarget.dataset;
......
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">驻店管理-深圳嘀加</navigation-bar>
<navigation-bar bindnavbarReady="navbarReady" bindback="back" showBack="true" navStyle="{{navStyle}}">驻店管理-深圳嘀加</navigation-bar>
<view class="bg"></view>
<view class="content">
<view class="tabs" >
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!