Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fd7246b6
authored
Jan 10, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
支持超管、督导和销售在小程序开设员工账号
1 parent
44f38ca0
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
1998 additions
and
2 deletions
app.json
packageEquity/pages/aiCheck/defense/defense.scss
tabWorkOrder/pages/residentManage/api.js
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.js
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.json
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.sass
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.wxml
tabWorkOrder/pages/residentManage/components/accountAllocation/index.js
tabWorkOrder/pages/residentManage/components/accountAllocation/index.json
tabWorkOrder/pages/residentManage/components/accountAllocation/index.sass
tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxml
tabWorkOrder/pages/residentManage/components/addStaff/index.js
tabWorkOrder/pages/residentManage/components/addStaff/index.json
tabWorkOrder/pages/residentManage/components/addStaff/index.sass
tabWorkOrder/pages/residentManage/components/addStaff/index.wxml
tabWorkOrder/pages/residentManage/components/businessType/index.js
tabWorkOrder/pages/residentManage/components/businessType/index.json
tabWorkOrder/pages/residentManage/components/businessType/index.sass
tabWorkOrder/pages/residentManage/components/businessType/index.wxml
tabWorkOrder/pages/residentManage/components/shopMerchant/index.js
tabWorkOrder/pages/residentManage/components/shopMerchant/index.json
tabWorkOrder/pages/residentManage/components/shopMerchant/index.sass
tabWorkOrder/pages/residentManage/components/shopMerchant/index.wxml
tabWorkOrder/pages/residentManage/components/timePicker/index.js
tabWorkOrder/pages/residentManage/components/timePicker/index.json
tabWorkOrder/pages/residentManage/components/timePicker/index.sass
tabWorkOrder/pages/residentManage/components/timePicker/index.wxml
tabWorkOrder/pages/residentManage/components/yqMerchant/index.js
tabWorkOrder/pages/residentManage/components/yqMerchant/index.json
tabWorkOrder/pages/residentManage/components/yqMerchant/index.sass
tabWorkOrder/pages/residentManage/components/yqMerchant/index.wxml
tabWorkOrder/pages/residentManage/image/arrSolid.png
tabWorkOrder/pages/residentManage/image/radio.png
tabWorkOrder/pages/residentManage/residentManage.js
tabWorkOrder/pages/residentManage/residentManage.json
tabWorkOrder/pages/residentManage/residentManage.sass
tabWorkOrder/pages/residentManage/residentManage.wxml
app.json
View file @
fd7246b
...
@@ -110,7 +110,8 @@
...
@@ -110,7 +110,8 @@
"pages/defeatOrder/defeatOrder"
,
"pages/defeatOrder/defeatOrder"
,
"pages/staffDaily/staffDaily"
,
"pages/staffDaily/staffDaily"
,
"pages/upgradeStaffDaily/upgradeStaffDaily"
,
"pages/upgradeStaffDaily/upgradeStaffDaily"
,
"pages/supervisorDaily/supervisorDaily"
"pages/supervisorDaily/supervisorDaily"
,
"pages/residentManage/residentManage"
]
]
},
},
{
{
...
@@ -225,7 +226,8 @@
...
@@ -225,7 +226,8 @@
"van-dialog"
:
"@vant/weapp/dialog/index"
,
"van-dialog"
:
"@vant/weapp/dialog/index"
,
"van-uploader"
:
"@vant/weapp/uploader/index"
,
"van-uploader"
:
"@vant/weapp/uploader/index"
,
"glsx-privacy"
:
"glsk-applet-component/GlsxPrivacy/index"
,
"glsx-privacy"
:
"glsk-applet-component/GlsxPrivacy/index"
,
"empty-data"
:
"/components/EmptyData/EmptyData"
"empty-data"
:
"/components/EmptyData/EmptyData"
,
"van-switch"
:
"@vant/weapp/switch/index"
},
},
"preloadRule"
:
{
"preloadRule"
:
{
"pages/tabWorkOrder/pages/index/index"
:
{
"pages/tabWorkOrder/pages/index/index"
:
{
...
...
packageEquity/pages/aiCheck/defense/defense.scss
0 → 100644
View file @
fd7246b
/* packageEquity/pages/aiCheck/defense/defense.wxss */
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/api.js
0 → 100644
View file @
fd7246b
// const api = wx.$request
import
api
from
"~/utils/request/request.js"
;
// const api = wx.$request
module
.
exports
=
{
/**驻店管理-获取4s店 */
getshopMerchantList
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.scene.shopMerchant.pageList"
,
data
);
},
/**驻店管理-获取园区店 */
getyqMerchantList
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.scene.yqMerchant.pageList'
,
data
)
},
/**小程序新增员工*/
createStaffAccount
(
data
)
{
let
params
=
data
||
{}
return
api
.
post
(
'dj.api.smartcarlife.staffBaseInfo.account.add'
,
params
)
},
/** 员工日报配置列表查询 */
getDailyReportConfigList
(
data
)
{
let
params
=
data
||
{};
return
api
.
post
(
"dj.api.smartcarlife.staff.dailyReportConfig.page"
,
{
pageSize
:
10
,
...
params
,
});
},
/** 禁启用员工园区店账号 */
updateAccountStatus
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.staffBaseInfo.accountStatus.update"
,
data
);
},
/**修改员工日报填报门店配置 */
updateDailyReportConfig
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.staff.dailyReportConfig.update"
,
data
);
}
};
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.js
0 → 100644
View file @
fd7246b
// packageStoreAssistant/components/Dialog/Dialog.js
Component
({
options
:
{
multipleSlots
:
true
},
/**
* 组件的属性列表
*/
properties
:
{
show
:
Boolean
,
confirmText
:
String
,
cancelText
:
String
,
showCancelButton
:
Boolean
,
success
:
Boolean
,
text
:
String
},
/**
* 组件的初始数据
*/
data
:
{},
/**
* 组件的方法列表
*/
methods
:
{
confirm
()
{
this
.
triggerEvent
(
'confirm'
)
},
cancel
()
{
this
.
triggerEvent
(
'cancel'
)
}
}
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{
"van-dialog"
:
"@vant/weapp/dialog/index"
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.sass
0 → 100644
View file @
fd7246b
.dialog
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.icon
{
color
:
#292d33
;
font-size
:
32rpx
;
text-align
:center
;
font-weight
:
500
;
}
.text
{
font-size
:
30rpx
;
color
:
#5a5e66
;
text-align
:
center
;
max-width
:
494rpx
;
line-height
:
40rpx
;
padding
:
10rpx
0
54rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/Dialog/Dialog.wxml
0 → 100644
View file @
fd7246b
<van-dialog use-slot use-title-slot show="{{ show }}" show-cancel-button="{{showCancelButton}}" confirm-button-text="{{confirmText}}" cancel-button-text="{{cancelText}}" confirm-button-color="#347BFF" cancel-button-color="#1B233D" bindconfirm="confirm" bindcancel="cancel">
<view class="dialog">
<view class="icon">
温馨提示
</view>
<text class="text">
<block wx:if="{{text}}">
{{text}}
</block>
<block wx:else>
<block wx:if="{{success}}">
<slot name="success"></slot>
</block>
<block wx:else>
<slot name="error"></slot>
</block>
</block>
</text>
</view>
</van-dialog>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/accountAllocation/index.js
0 → 100644
View file @
fd7246b
// tabWorkOrder/pages/residentManage/components/accountAllocation/index.js
const
IMG_URL
=
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
import
api
from
'../../api'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
nothing
:
false
,
showModal
:
false
,
showTimeModal
:
false
,
isFlag
:
false
,
total
:
0
,
pageNum
:
1
,
pageSize
:
10
,
staffNameOrPhone
:
""
,
IMG_URL
,
accountList
:
[],
businessType
:
[
'会员权益/升级'
,
'轻改'
],
disableObj
:
{}
},
/**
* 组件的方法列表
*/
methods
:
{
onChange
(
e
)
{
let
{
index
,
accountIndex
}
=
e
.
currentTarget
.
dataset
,
{
accountList
}
=
this
.
data
;
let
{
deletedState
,
yqMerchantId
,
yqMerchantName
}
=
accountList
[
index
].
staffAccountList
[
accountIndex
],
{
staffPhone
}
=
accountList
[
index
];
this
.
setData
({
showModal
:
true
,
disableObj
:
{
index
,
accountIndex
,
yqMerchantId
,
staffPhone
,
accountStatus
:
deletedState
?
'I'
:
'N'
},
success
:
true
,
dialogText
:
`是否
${
!
deletedState
?
'启用'
:
'禁用'
}
该员工
${
yqMerchantName
}${
yqMerchantId
}
登录账号`
})
},
dialogClose
()
{
this
.
setData
({
showModal
:
false
})
},
dialogConfirm
()
{
const
{
success
,
accountList
,
disableObj
:
{
index
,
accountIndex
,
yqMerchantId
,
staffPhone
,
accountStatus
}
}
=
this
.
data
;
if
(
success
)
{
api
.
updateAccountStatus
({
yqMerchantId
,
staffPhone
,
accountStatus
}).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
;
if
(
code
==
0
)
{
accountList
[
index
].
staffAccountList
[
accountIndex
].
deletedState
=
!
accountList
[
index
].
staffAccountList
[
accountIndex
].
deletedState
this
.
setData
({
accountList
,
showModal
:
false
},
()
=>
{
wx
.
$util
.
showToast
(
'操作成功'
);
})
}
else
{
wx
.
$util
.
showToast
(
message
);
}
})
}
},
updateConfig
(
e
)
{
let
{
index
,
accountIndex
,
storeIndex
}
=
e
.
currentTarget
.
dataset
,
{
accountList
}
=
this
.
data
;
let
{
yqMerchantId
}
=
accountList
[
index
].
staffAccountList
[
accountIndex
],
{
staffPhone
}
=
accountList
[
index
],
{
merchantId
,
deferredOpenState
,
id
}
=
accountList
[
index
].
staffAccountList
[
accountIndex
].
staffConfigList
[
storeIndex
]
this
.
setData
({
showTimeModal
:
true
,
disableObj
:
{
index
,
accountIndex
,
yqMerchantId
,
merchantId
,
staffPhone
,
storeIndex
,
deferredOpenFlag
:
!
deferredOpenState
?
'Y'
:
'N'
,
id
},
// success: true,
// dialogText: `是否${!deletedState?'启用':'禁用'}该员工${yqMerchantName}${yqMerchantId}登录账号`
})
},
dialogTimeClose
()
{
this
.
setData
({
showTimeModal
:
false
})
},
timeConfirm
(
e
)
{
const
{
startEffectiveTime
}
=
e
.
detail
;
const
{
accountList
,
disableObj
:
{
id
,
index
,
accountIndex
,
yqMerchantId
,
merchantId
,
staffPhone
,
storeIndex
,
deferredOpenFlag
}
}
=
this
.
data
;
let
params
=
{
staffPhone
,
yqMerchantId
,
merchantId
,
deferredOpenFlag
,
startEffectiveTime
,
dailyReportConfigId
:
id
}
let
item
=
accountList
[
index
].
staffAccountList
[
accountIndex
],
isFlag
=
item
.
staffConfigList
[
storeIndex
].
deferredOpenState
,
checkList
=
item
.
checkList
api
.
updateDailyReportConfig
(
params
).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
;
if
(
code
==
0
)
{
this
.
setData
({
accountList
:
[],
pageNum
:
1
,
showTimeModal
:
false
,
staffNameOrPhone
:
''
},
()
=>
{
this
.
getData
()
})
wx
.
$util
.
showToast
(
'操作成功'
);
// if (checkList.length == 0) {
// if (!isFlag) {
// checkList.push(item.staffConfigList[storeIndex])
// }
// } else {
// if (!isFlag) {
// checkList.push(item.staffConfigList[storeIndex])
// } else {
// checkList.filter(item => {
// if (item.merchantId != merchantId) {
// return item
// }
// })
// }
// }
// accountList[index].staffAccountList[accountIndex].staffConfigList[storeIndex].deferredOpenState = !isFlag
// accountList[index].staffAccountList[accountIndex].checkList = checkList
// accountList[index].staffAccountList[accountIndex].unfold=true
// this.setData({
// accountList
// }, () => {
// wx.$util.showToast('操作成功');
// })
}
else
{
wx
.
$util
.
showToast
(
message
);
}
})
},
clear
()
{
this
.
setData
({
staffNameOrPhone
:
""
,
pageNum
:
1
});
this
.
search
();
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
;
this
.
setData
({
staffNameOrPhone
:
value
,
pageNum
:
1
});
},
search
()
{
this
.
setData
({
accountList
:
[],
isFlag
:
false
,
nothing
:
false
,
},
()
=>
{
this
.
getData
()
});
},
getData
()
{
let
{
accountList
,
staffNameOrPhone
,
pageNum
,
pageSize
}
=
this
.
data
let
params
=
{
staffNameOrPhone
,
pageNum
,
pageSize
}
api
.
getDailyReportConfigList
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
let
{
list
,
total
}
=
res
.
data
;
res
.
data
.
list
.
forEach
(
item
=>
{
item
.
labelArr
=
item
.
staffSceneLabel
.
split
(
','
)
item
.
staffAccountList
.
forEach
(
account
=>
{
account
.
checkList
=
[]
account
.
deletedState
=
account
.
deletedFlag
==
'N'
?
true
:
false
account
.
staffConfigList
.
forEach
(
config
=>
{
if
(
config
.
deferredOpenFlag
===
'Y'
)
{
account
.
checkList
.
push
(
config
)
}
config
.
deferredOpenState
=
config
.
deferredOpenFlag
==
'Y'
?
true
:
false
})
account
.
unfold
=
true
})
})
let
tempList
=
pageNum
==
1
?
list
:
[...
accountList
,
...
list
]
this
.
setData
({
accountList
:
tempList
,
isFlag
:
true
,
total
:
total
,
nothing
:
pageNum
==
1
?
false
:
total
==
tempList
.
length
,
})
}
})
},
goToStaff
(
e
){
let
{
index
}
=
e
.
currentTarget
.
dataset
,
{
accountList
}
=
this
.
data
;
let
{
staffPhone
,
staffName
}
=
accountList
[
index
]
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
pageInstance
.
setData
({
activeIndex
:
0
},()
=>
{
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
'staffObj.staffName'
:
staffName
,
'staffObj.staffPhone'
:
staffPhone
})
})
},
// 触底刷新
mineReachBottom
()
{
console
.
log
(
'触底'
)
let
{
pageNum
,
total
,
pageSize
}
=
this
.
data
if
(
pageNum
*
pageSize
>=
total
)
{
return
}
this
.
setData
({
pageNum
:
pageNum
+
1
},
()
=>
{
this
.
getData
()
})
},
packupList
(
e
)
{
let
{
index
,
accountIndex
}
=
e
.
currentTarget
.
dataset
,
{
accountList
}
=
this
.
data
;
let
isFlag
=
accountList
[
index
].
staffAccountList
[
accountIndex
].
unfold
accountList
[
index
].
staffAccountList
[
accountIndex
].
unfold
=
!
isFlag
this
.
setData
({
accountList
})
},
},
lifetimes
:
{
attached
:
function
()
{
this
.
getData
()
}
},
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/accountAllocation/index.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{
"dialog"
:
"../Dialog/Dialog"
,
"time-picker"
:
"../timePicker/index"
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/accountAllocation/index.sass
0 → 100644
View file @
fd7246b
/* tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxss */
.search-input
{
// border: 1rpx solid #979797;
background
:
#ffffff
;
border-radius
:
var
(
--
fontSize38
)
;
width
:
calc
(
100%
-
var
(
--
fontSize64
))
;
height
:
var
(
--
fontSize72
)
;
display
:
flex
;
align-items
:
center
;
margin
:
16rpx
32rpx
;
}
.search-input
.search-icon
{
width
:
var
(
--
fontSize28
)
;
height
:
var
(
--
fontSize28
)
;
margin
:
0
var
(
--
fontSize10
)
0
var
(
--
fontSize26
)
;
}
.search-input
.search-clear
{
width
:
var
(
--
fontSize36
)
;
height
:
var
(
--
fontSize36
)
;
margin
:
0
var
(
--
fontSize26
)
0
var
(
--
fontSize10
)
;
}
.search-input
.input
{
font-size
:
var
(
--
fontSize28
)
;
height
:
var
(
--
fontSize38
)
;
line-height
:
var
(
--
fontSize38
)
;
width
:
calc
(
100%
-
var
(
--
fontSize136
))
;
}
.input-placeholder
{
color
:
rgba
(
200
,
201
,
204
,
.89
)
;
}
.info
{
padding
:
32rpx
40rpx
;
box-sizing
:
border-box
;
color
:
#999ea8
;
font-size
:
24rpx
;
border-radius
:
16rpx
;
opacity
:
1
;
background
:
#ffffff
;
margin
:
0
20rpx
;
}
.title
{
color
:
#181a1f
;
font-size
:
32rpx
;
font-weight
:
bold
;
margin
:
32rpx
0
16rpx
30rpx
;
display
:
flex
;
align-items
:
center
;
text
{
color
:
#999ea8
;
font-size
:
20rpx
;
font-weight
:
normal
;
margin-left
:
12rpx
;
}
}
.list
{
margin
:
0
20rpx
;
.item
{
border-radius
:
16rpx
;
background
:
#ffffff
;
box-shadow
:
0
4rpx
16rpx
0
#cdcdd1
80
;
padding
:
0
32rpx
;
margin-bottom
:
20rpx
;
.header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
1
.6rpx
solid
#f7f8fa
;
padding
:
32rpx
0
;
.left
{
.name
{
color
:
#292d33
;
font-size
:
32rpx
;
font-weight
:
bold
;
margin-bottom
:
8rpx
;
text
{
font-size
:
28rpx
;
font-weight
:
normal
;
margin-left
:
16rpx
;
}
}
.tags
{
display
:
flex
;
align-items
:
center
;
.tag
{
color
:
#999ea8
;
font-size
:
24rpx
;
padding
:
0
8rpx
;
line-height
:
36rpx
;
border-radius
:
4rpx
;
border
:
2rpx
solid
#e8ecf0
;
margin-right
:
8rpx
;
}
}
}
.right
{
padding
:
8rpx
32rpx
;
border-radius
:
32rpx
;
background
:
#347bff
;
color
:
#ffffff
;
font-size
:
28rpx
;
font-weight
:
400
;
}
}
.item-content
{
margin-top
:
20rpx
;
.content-account
{
margin-top
:
2rpx
;
.account-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
34rpx
;
.park-name
{
color
:
#999ea8
;
font-size
:
24rpx
;
margin-right
:
56rpx
;
display
:
flex
;
align-items
:
center
;
white-space
:
nowrap
;
text
{
width
:
calc
(
100%
-
64rpx
)
;
font-size
:
28rpx
;
color
:
#292d33
;
margin-left
:
16rpx
;
display
:
inline-block
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
}
.operation
{
width
:
108rpx
;
height
:
44rpx
;
}
}
.store-list
{
border-radius
:
16rpx
;
background
:
#f5f5f7
;
.store
{
height
:
100rpx
;
display
:
flex
;
align-items
:
center
;
border-bottom
:
2rpx
solid
#ffffff
;
padding
:
16rpx
32rpx
;
.choose-open
{
width
:
32rpx
;
height
:
32rpx
;
.select
{
width
:
100%
;
height
:
100%
;
}
}
.store-info
{
margin-left
:
32rpx
;
.name
{
color
:
#292d33
;
font-size
:
24rpx
;
line-height
:
36rpx
;
margin-bottom
:
4rpx
;
white-space
:
nowrap
;
}
.time
{
color
:
#999ea8
;
font-size
:
20rpx
;
}
}
}
}
.more
{
padding
:
32rpx
;
color
:
#999ea8
;
font-size
:
24rpx
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.pack-up
{
width
:
32rpx
;
height
:
32rpx
;
margin-left
:
14rpx
;
image
{
width
:
100%
;
height
:
100%
;
}
}
.down
{
transform
:
rotate
(
180deg
)
;
}
}
}
}
}
}
/*swtich整体大小及背景色*/
.wx-switch-input
{
width
:
108rpx
!
important
;
height
:
44rpx
!
important
;
// background: #347BFF !important;
// border: #347BFF !important;
}
/*白色样式(false的样式)*/
.
wx-switch-input
:
:
before
{
width
:
108rpx
!
important
;
height
:
44rpx
!
important
;
}
/* 中间的小圆球 */
/*绿色样式(true的样式)*/
.
wx-switch-input
:
:
after
{
width
:
108rpx
!
important
;
height
:
44rpx
!
important
;
}
.wx-switch-input
{
zoom
:
0
.8
;
}
.list-nothing
,
.list-not
{
text-align
:
center
;
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxml
0 → 100644
View file @
fd7246b
<!--tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxml-->
<view class="container" wx:if="{{isFlag}}">
<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" />
<block wx:if="{{ staffNameOrPhone }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="info">员工调店分配新门店账号,业务督导需要处理员工的账号管理,若旧门店账号不再使用,请禁用旧账号,请标记勾选员工所在店面</view>
<view class="title">账号列表<text>请勾选员工目前调岗在店的门店名称</text></view>
<scroll-view class="account-box" style="height: calc(100vh - var(--fontSize160));" 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="tags">
<view class="tag" wx:for="{{item.labelArr}}" wx:for-item="tag" wx:for-index="key" wx:key="key">{{businessType[tag]}}</view>
</view>
</view>
<view class="right" bind:tap="goToStaff" data-index="{{index}}">新增员工账号</view>
</view>
<view class="item-content">
<view class="content-account" wx:for="{{item.staffAccountList}}" wx:for-item="account" wx:for-index="i" wx:key="i">
<view class="account-header">
<view class="park-name">账号{{i+1}}<text>{{account.yqMerchantName}}{{account.yqMerchantId}}</text></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" />
<!-- <switch class="wx-switch-input" checked="{{switch1Checked}}" color="#347BFF" bindchange="switch1Change" /> -->
</view>
</view>
<view class="store-list">
<view class="store" wx:for="{{account.unfold?account.checkList:account.staffConfigList}}" wx:for-item="store" wx:for-index="s" wx:key="s">
<view class="choose">
<view class="choose-open" wx:if="{{ account.deletedState}}" catch:tap="updateConfig" data-index="{{index}}" data-account-index="{{i}}" data-store-index="{{s}}">
<gl-image webp mode="widthFix" wx:if="{{store.deferredOpenState}}" class="select" src="/check.png" />
<gl-image webp mode="widthFix" wx:else class="select" src="/no-check.png" />
</view>
<view class="choose-open" wx:else>
<gl-image webp mode="widthFix" wx:if="{{store.deferredOpenState}}" class="select" src="/dis-check.png" />
<gl-image webp mode="widthFix" wx:else class="select" src="/no-dis-check.png" />
</view>
</view>
<view class="store-info">
<view class="name">{{store.merchantName}}{{store.merchantId}}</view>
<view class="time" wx:if="{{store.startEffectiveTime}}">生效时间:{{store.startEffectiveTime?store.startEffectiveTime:'--'}}</view>
</view>
</view>
</view>
<block wx:if="{{account.unfold}}">
<view class="more" catchtap="packupList" data-index="{{index}}" data-account-index="{{i}}">查看员工更多可登录4s店 <view class="pack-up">
<image src="{{IMG_URL}}arrow.png" />
</view>
</view>
</block>
<block wx:else>
<view class="more" catchtap="packupList" data-index="{{index}}" data-account-index="{{i}}">折叠无效非在岗门店 <view class="pack-up down">
<image src="{{IMG_URL}}arrow.png" />
</view>
</view>
</block>
</view>
</view>
</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</view>
<view class="no-data" wx:else>
<empty-data />
</view>
</scroll-view>
</view>
<dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog>
<time-picker show="{{showTimeModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="timeConfirm" bindcancel="dialogTimeClose"></time-picker>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/addStaff/index.js
0 → 100644
View file @
fd7246b
// tabWorkOrder/pages/residentManage/components/addStaff/index.js
import
api
from
'../../api'
let
toastList
=
{
staffName
:
"员工姓名不能为空"
,
staffPhone
:
"手机号不能为空"
,
staffSceneLabel
:
"所属业务不能为空"
};
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
isBusiness
:
false
,
shopMerchantBox
:
false
,
yqMerchartBox
:
false
,
requiredList
:
[],
yqMerchartList
:
[],
staffObj
:
{
staffName
:
''
,
staffPhone
:
''
,
staffSceneLabel
:
''
,
//所属业务(1.轻改,0.权益+延保
staffSceneLabelText
:
''
,
merchantId
:
''
,
//归属门店id
merchantName
:
''
,
//归属门店名称
yqMerchantId
:
''
,
//园区店id
yqMerchantName
:
''
,
//园区店名称
}
},
/**
* 组件的方法列表
*/
methods
:
{
showPopup
(
e
)
{
let
{
showName
}
=
e
.
currentTarget
.
dataset
,
{
staffObj
:
{
staffSceneLabel
,
merchantId
}
}
=
this
.
data
;
if
(
showName
==
'shopMerchantBox'
&&
staffSceneLabel
==
''
)
{
wx
.
$util
.
showToast
(
`请先选择所属业务`
);
return
}
if
(
showName
==
'yqMerchartBox'
&&
merchantId
==
''
)
{
wx
.
$util
.
showToast
(
`请先选择归属门店`
);
return
}
this
.
setData
({
[
showName
]:
true
});
},
getyqMerchantList
()
{
let
{
sceneLabel
,
merchantId
}
=
this
.
data
.
staffObj
let
params
=
{
sceneLabel
,
merchantId
}
try
{
api
.
getyqMerchantList
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
let
item
=
res
.
data
.
list
.
length
?
res
.
data
.
list
[
0
]
:
''
this
.
setData
({
yqMerchartList
:
res
.
data
.
list
,
'staffObj.yqMerchantId'
:
item
?
item
.
yqMerchantId
:
''
,
'staffObj.yqMerchantName'
:
item
?
item
.
yqMerchantName
:
''
})
}
})
}
catch
(
err
)
{
}
},
selectChoose
(
e
)
{
let
{
chooseList
,
text
,
key
}
=
e
.
detail
let
textArr
=
[],
idArr
=
[];
chooseList
.
forEach
(
item
=>
{
textArr
.
push
(
item
.
text
)
idArr
.
push
(
item
.
id
)
})
this
.
setData
({
[
text
]:
textArr
.
join
(
','
),
[
key
]:
idArr
.
join
(
','
)
})
},
async
submit
(
i
)
{
let
_this
=
this
;
let
{
staffObj
}
=
this
.
data
;
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
key
=
thisPage
.
checkRequired
(
staffObj
);
if
(
key
)
{
toastList
[
key
]
&&
wx
.
$util
.
showToast
(
toastList
[
key
]);
return
;
}
wx
.
$util
.
showLoading
(
"加载中..."
)
let
apiName
=
"createStaffAccount"
,
params
=
{
...
staffObj
};
delete
params
.
staffSceneLabelText
api
[
apiName
](
params
)
.
then
((
res
)
=>
{
let
{
code
,
data
,
message
}
=
res
;
if
(
code
==
0
)
{
wx
.
hideLoading
();
wx
.
showModal
({
title
:
"温馨提示"
,
content
:
"保存成功"
,
showCancel
:
false
,
confirmText
:
"知道了"
,
confirmColor
:
"#347BFF"
,
success
(
_res_
)
{
if
(
_res_
.
confirm
)
{
let
clearData
=
{
staffName
:
''
,
staffPhone
:
''
,
staffSceneLabel
:
''
,
staffSceneLabelText
:
''
,
merchantId
:
''
,
merchantName
:
''
,
yqMerchantId
:
''
,
yqMerchantName
:
''
}
_this
.
setData
({
staffObj
:
clearData
}
)
}
},
});
}
else
{
wx
.
$util
.
showToast
(
message
);
}
})
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
;
let
{
name
}
=
e
.
currentTarget
.
dataset
;
this
.
setData
({
[
`
${
name
}
`
]:
value
.
trim
(),
});
},
}
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/addStaff/index.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{
"business-type"
:
"../businessType/index"
,
"shop-merchant"
:
"../shopMerchant/index"
,
"yq-merchant"
:
"../yqMerchant/index"
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/addStaff/index.sass
0 → 100644
View file @
fd7246b
/* tabWorkOrder/pages/residentManage/components/addStaff/index.wxss */
.container
{
margin
:
16rpx
20rpx
;
border-radius
:
16rpx
;
opacity
:
1
;
background
:
#ffffff
;
padding
:
32rpx
40rpx
;
box-sizing
:
border-box
;
.title
{
color
:
#181a1f
;
font-size
:
32rpx
;
font-weight
:
bold
;
margin-bottom
:
16prpx
;
}
.info
{
color
:
#999ea8
;
font-size
:
24rpx
;
margin-bottom
:
32rpx
;
}
.box
{
margin-left
:
-40rpx
;
.input
{
text-align
:
right
;
font-size
:
var
(
--
fontSize28
)
;
height
:
100%
;
}
.between
{
text-align
:right
;
}
.placeholder-class
{
color
:
#BEC1C7
;
}
}
}
.btn
{
width
:
622rpx
;
height
:
88rpx
;
border-radius
:
12rpx
;
opacity
:
1
;
background
:
#347bff
;
margin
:
156rpx
64rpx
0
;
text-align
:
center
;
line-height
:
88rpx
;
color
:
#ffffff
;
font-size
:
32rpx
;
font-weight
:
500
;
margin-bottom
:
32rpx
;
}
.hint
{
color
:
#999ea8
;
font-size
:
24rpx
;
text-align
:
center
;
line-height
:
36rpx
;
display
:
block
;
margin
:
0
auto
;
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/addStaff/index.wxml
0 → 100644
View file @
fd7246b
<!--tabWorkOrder/pages/residentManage/components/addStaff/index.wxml-->
<view class="container">
<view class="title">增设新员工门店账号</view>
<view class="info">增设的员工账号支持该手机号所绑定的员工登录「生意助手员工版」小程序开展业务录单。
仅支持新增深圳嘀加服务商下的员工账号</view>
<view class="box">
<gl-cell border valueAlign="right" label="员工姓名" requiredAfter labelWidth="var(--fontSize290)" required>
<input placeholder="请输入" value="{{staffObj.staffName}}" class="input" placeholder-class="placeholder-class" bindinput="input" data-name="staffObj.staffName" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="var(--fontSize140)" required>
<input placeholder="请输入" class="input" value="{{staffObj.staffPhone}}" type="number" maxlength="11" placeholder-class="placeholder-class" bindinput="input" bindblur="phoneBlur" data-name="staffObj.staffPhone" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="所属业务" requiredAfter labelWidth="var(--fontSize180)" required haveArrow bindclick="showPopup"data-show-name="isBusiness" placeholder="点击选择">
<block wx:if="{{ staffObj.staffSceneLabelText }}">
<view class="between">{{staffObj.staffSceneLabelText}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" label="归属门店" requiredAfter labelWidth="var(--fontSize180)" haveArrow bindclick="showPopup" data-show-name="shopMerchantBox" placeholder="点击选择">
<block wx:if="{{ staffObj.merchantId }}">
<view class="between">{{staffObj.merchantName}}{{staffObj.merchantId}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" label="关联账号" requiredAfter labelWidth="var(--fontSize290)" haveArrow bindclick="showPopup" data-show-name="yqMerchartBox" placeholder="点击选择" >
<block wx:if="{{ staffObj.yqMerchantName }}">
<view class="between">{{staffObj.yqMerchantName}}{{staffObj.yqMerchantId}}</view>
</block>
</gl-cell>
</view>
</view>
<view class="btn" bind:tap="submit">确认开通</view>
<text class="hint">请核对员工姓名、手机号,开通账号后即可</text>
<text class="hint">投入使用。登录密码默认为Aa+手机号</text>
<business-type show="{{isBusiness}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{shopMerchantBox}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose" merchantId="{{staffObj.merchantId}}"></shop-merchant>
<yq-merchant show="{{yqMerchartBox}}" merchantId="{{staffObj.yqMerchartBox}}" yqMerchartList="{{yqMerchartList}}"></yq-merchant>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/businessType/index.js
0 → 100644
View file @
fd7246b
// tabWorkOrder/pages/residentManage/components/businessType/index.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
if
(
n
)
this
.
initData
();
}
},
sceneLabel
:
String
,
},
/**
* 组件的初始数据
*/
data
:
{
key
:
'staffObj.staffSceneLabel'
,
text
:
'staffObj.staffSceneLabelText'
,
list
:
[{
text
:
'轻改'
,
id
:
1
,
active
:
false
},
{
text
:
'会员权益/升级'
,
id
:
0
,
active
:
false
}
]
},
/**
* 组件的方法列表
*/
methods
:
{
initData
(
ids
)
{
let
arr
=
this
.
data
.
sceneLabel
?
this
.
data
.
sceneLabel
.
split
(
','
):[],
{
list
}
=
this
.
data
;
list
.
forEach
(
item
=>
{
item
.
active
=
false
if
(
arr
.
includes
(
String
(
item
.
id
)))
{
item
.
active
=
true
}
})
this
.
setData
({
list
})
},
choose
(
e
)
{
let
{
list
}
=
this
.
data
,
{
index
}
=
e
.
currentTarget
.
dataset
;
let
thisPage
=
wx
.
$router
.
getPageInstance
();
list
[
index
].
active
=
!
list
[
index
].
active
;
this
.
setData
({
list
,
});
},
confirm
()
{
let
{
list
,
text
,
key
}
=
this
.
data
;
let
chooseList
=
list
.
filter
(
item
=>
{
if
(
item
.
active
)
{
return
item
}
})
let
thisPage
=
wx
.
$router
.
getPageInstance
();
if
(
!
chooseList
.
length
)
return
wx
.
$util
.
showToast
(
"请勾选业务"
);
this
.
setData
({
show
:
false
,
});
thisPage
.
setData
({
isBusiness
:
false
,
});
// thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList);
// thisPage.setData({
// goodsList: chooseList,
// });
console
.
log
(
chooseList
)
this
.
triggerEvent
(
"confirm"
,{
chooseList
,
text
,
key
});
},
cancel
()
{
let
pageInstance
=
wx
.
$router
.
getPageInstance
();
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
this
.
setData
({
show
:
false
,
});
thisPage
.
setData
({
isBusiness
:
false
,
});
},
}
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/businessType/index.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/businessType/index.sass
0 → 100644
View file @
fd7246b
/* tabWorkOrder/pages/residentManage/components/businessType/index.wxss */
.box
{
height
:
200rpx
;
// width: calc(100% + var(--fontSize64));
// margin-left: calc(-1 * var(--fontSize32));
}
.item
{
padding
:
24rpx
4rpx
;
box-sizing
:
border-box
;
border-bottom
:
2rpx
solid
#EBEDF0
;
.item-hd
{
display
:
flex
;
align-items
:
center
;
.name
{
max-width
:
400rpx
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#292D33
;
margin-left
:
20rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.total-price
{
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#347BFF
;
margin-left
:
auto
;
}
.icon
{
display
:
block
;
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
}
.icon
.arc
{
width
:
100%
;
height
:
100%
;
border
:
var
(
--
fontSize2
)
solid
#979797
;
border-radius
:
100%
;
box-sizing
:
border-box
;
}
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/businessType/index.wxml
0 → 100644
View file @
fd7246b
<popup show="{{ show }}" title="选择所属业务" bindconfirm="confirm" bindcancel="cancel" height="40%">
<view class="box">
<block wx:if="{{list.length}}">
<view class="item" wx:for="{{ list }}">
<view class="item-hd" catchtap="choose" data-index="{{ index }}">
<view class="icon" >
<block wx:if="{{ item.active }}">
<image src="../../image/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="name">{{item.text}}</view>
</view>
</view>
</block>
<view class="safeAreaInset"></view>
</view>
</popup>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/shopMerchant/index.js
0 → 100644
View file @
fd7246b
// packageEquity/pages/employeeInspection/components/ItemSelectStore/itemSelectStore.js
import
api
from
'../../api'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
if
(
n
)
this
.
getData
()
}
},
sceneLabel
:
String
,
merchantId
:
String
},
/**
* 组件的初始数据
*/
data
:
{
nothing
:
false
,
isFlag
:
false
,
total
:
0
,
pageNum
:
1
,
pageSize
:
20
,
storeIndex
:
null
,
shopMerchantList
:
[{
shopMerchantId
:
44367642
,
shopMerchantName
:
'玉林市弘森汽车销售服务有限公司'
},
{
shopMerchantId
:
66666
,
shopMerchantName
:
'深圳市华峰汽车有限公司'
}]
},
/**
* 组件的方法列表
*/
methods
:
{
getData
()
{
let
{
shopMerchantList
,
total
,
pageNum
,
pageSize
}
=
this
.
data
let
params
=
{
pageNum
,
pageSize
,
sceneLabel
:
this
.
data
.
sceneLabel
}
api
.
getshopMerchantList
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
let
{
list
,
total
}
=
res
.
data
;
let
tempList
=
pageNum
==
1
?
list
:
[...
shopMerchantList
,
...
res
.
data
.
list
];
this
.
setData
({
shopMerchantList
:
tempList
,
isFlag
:
true
,
total
:
total
,
nothing
:
pageNum
==
1
?
false
:
total
==
tempList
.
length
,
},
()
=>
{
if
(
this
.
data
.
merchantId
)
this
.
initData
()
})
}
})
},
// 触底刷新
mineReachBottom
()
{
console
.
log
(
111
)
let
{
pageNum
,
total
,
pageSize
}
=
this
.
data
if
(
pageNum
*
pageSize
>=
total
)
{
return
}
this
.
setData
({
pageNum
:
pageNum
+
1
},
()
=>
{
this
.
getData
()
})
},
initData
(
n
)
{
let
{
shopMerchantList
,
storeIndex
,
merchantId
}
=
this
.
data
;
shopMerchantList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
shopMerchantId
==
merchantId
)
{
storeIndex
=
index
}
})
this
.
setData
({
storeIndex
})
},
choose
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
storeIndex
:
index
})
},
confirm
()
{
let
{
shopMerchantList
,
storeIndex
}
=
this
.
data
,
{
shopMerchantId
,
shopMerchantName
}
=
shopMerchantList
[
storeIndex
];
this
.
setData
({
show
:
false
},
()
=>
{
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
shopMerchantBox
:
false
,
'staffObj.merchantId'
:
shopMerchantId
,
'staffObj.merchantName'
:
shopMerchantName
},
()
=>
{
thisPage
.
getyqMerchantList
()
})
})
},
hidePopup
()
{
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
shopMerchantBox
:
false
,
})
this
.
setData
({
storeIndex
:
null
})
},
},
lifetimes
:
{
attached
:
function
()
{
this
.
setData
({
nothing
:
false
})
}
},
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/shopMerchant/index.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/shopMerchant/index.sass
0 → 100644
View file @
fd7246b
/* tabWorkOrder/pages/residentManage/components/shopMerchant/index.wxss */
.title{
margin-bottom: var(--fontSize20);
color: #292D33;
font-weight: 400;
font-size: var(--fontSize32);
}
.store-select-box{
height: calc(100% - var(--fontSize168));
}
.merchant-box{
height:100%;
}
.merchant-box .item{
display: flex;
height: var(--fontSize88);
align-items: center;
color: #292D33;
border-bottom: var(--fontSize1) solid #EFF0F2;
}
.merchant-box .item:last-child{
border-bottom: none;
}
.merchant-box .item.active{
color: #347BFF;
}
.item .merchant_item{
height: var(--fontSize88);
font-size: var(--fontSize28);
display: flex;
align-items: center;
width:94%;
}
.item .merchant_item .text-hide{
max-width: calc(100% - var(--fontSize192));
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item .icon {
width: var(--fontSize32);
height: var(--fontSize32);
display: block;
margin-right: var(--fontSize20);
flex-shrink: 0;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.mark{
width:var(--fontSize32);
height: var(--fontSize32);
}
.list-nothing,
.list-not
{
text-align
:
center
;
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/shopMerchant/index.wxml
0 → 100644
View file @
fd7246b
<popup title="选择员工归属门店" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup" class="store-wrap">
<block wx:if="{{isFlag}}">
<scroll-view class="store-select-box" style="height: calc(100% - var(--fontSize10));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="merchant-box" wx:if="{{shopMerchantList.length>0}}">
<block wx:for="{{shopMerchantList}}" wx:key="index">
<view class="item {{storeIndex===index?'active':''}}" bindtap="choose" data-index="{{index}}">
<view class="merchant_item">
<view class="text-hide">{{item.shopMerchantName}}</view>
<view>{{item.shopMerchantId}}</view>
</view>
<view class="mark" wx:if="{{storeIndex===index}}">
<gl-image class="icon" src="/equity/mark.png" />
</view>
</view>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</view>
<view class="no-data" wx:else>
<empty-data />
</view>
</scroll-view>
</block>
</popup>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/timePicker/index.js
0 → 100644
View file @
fd7246b
Component
({
options
:
{
multipleSlots
:
true
},
/**
* 组件的属性列表
*/
properties
:
{
show
:
Boolean
,
confirmText
:
String
,
cancelText
:
String
,
showCancelButton
:
Boolean
,
success
:
Boolean
,
text
:
String
},
/**
* 组件的初始数据
*/
data
:
{
startEffectiveTime
:
''
,
start
:
''
},
/**
* 组件的方法列表
*/
methods
:
{
bindDateChange
(
e
)
{
const
{
value
}
=
e
.
detail
this
.
setData
({
startEffectiveTime
:
value
,
})
},
confirm
()
{
this
.
triggerEvent
(
'confirm'
,{
startEffectiveTime
:
this
.
data
.
startEffectiveTime
})
},
cancel
()
{
this
.
triggerEvent
(
'cancel'
)
}
},
lifetimes
:{
attached
(){
let
date
=
new
Date
().
format
(
`yyyy-MM-dd`
);
this
.
setData
({
start
:
date
,
startEffectiveTime
:
date
})
}
}
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/timePicker/index.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{
"van-dialog"
:
"@vant/weapp/dialog/index"
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/timePicker/index.sass
0 → 100644
View file @
fd7246b
.dialog
{
display
:
flex
;
flex-direction
:
column
;
.icon
{
color
:
#292d33
;
font-size
:
32rpx
;
text-align
:
center
;
font-weight
:
500
;
}
.label
{
color
:
#5a5e66
;
font-size
:
30rpx
;
font-weight
:
500
;
font-family
:
"PingFang"
;
text-align
:
left
;
line-height
:
40rpx
;
margin
:
32rpx
48rpx
16rpx
;
}
.time
{
width
:
526rpx
;
height
:
96rpx
;
border-radius
:
12rpx
;
opacity
:
1
;
background
:
#f3f3f3
;
margin
:
0
48rpx
54rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
32rpx
;
box-sizing
:
border-box
;
}
.value
{
color
:
#292d33
;
font-size
:
32rpx
;
font-weight
:
400
;
text-align
:
left
;
line-height
:
48rpx
;
width
:
400rpx
;
}
.solidArrow
{
width
:
36rpx
;
height
:
36rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/timePicker/index.wxml
0 → 100644
View file @
fd7246b
<van-dialog use-slot use-title-slot show="{{ show }}" show-cancel-button="{{showCancelButton}}" confirm-button-text="{{confirmText}}" cancel-button-text="{{cancelText}}" confirm-button-color="#347BFF" cancel-button-color="#1B233D" bindconfirm="confirm" bindcancel="cancel">
<view class="dialog">
<view class="icon">
日期选择
</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>
</view>
<view>
</view>
</van-dialog>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/yqMerchant/index.js
0 → 100644
View file @
fd7246b
// packageEquity/pages/employeeInspection/components/ItemSelectStore/itemSelectStore.js
import
api
from
'../../api'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
Boolean
,
yqMerchartList
:{
type
:
Array
,
observer
:
function
(
n
){
this
.
initData
()
}
},
merchantId
:
String
},
/**
* 组件的初始数据
*/
data
:
{
storeIndex
:
0
,
// yqMerchartList: [{
// shopMerchantId: 44367642,
// shopMerchantName: '玉林市弘森汽车销售服务有限公司'
// }, {
// shopMerchantId: 66666,
// shopMerchantName: '深圳市华峰汽车有限公司'
// }]
},
/**
* 组件的方法列表
*/
methods
:
{
initData
(
n
)
{
let
{
yqMerchartList
,
merchantId
,
storeIndex
}
=
this
.
data
;
yqMerchartList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
shopMerchantId
==
merchantId
)
{
storeIndex
=
index
}
})
this
.
setData
({
storeIndex
})
},
choose
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
storeIndex
:
index
})
},
confirm
()
{
let
{
yqMerchartList
,
storeIndex
}
=
this
.
data
,
{
yqMerchantId
,
yqMerchantName
}
=
yqMerchartList
[
storeIndex
];
this
.
setData
({
show
:
false
},
()
=>
{
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
yqMerchantBox
:
false
,
'staffObj.yqMerchantId'
:
yqMerchantId
,
'staffObj.yqMerchantName'
:
yqMerchantName
})
})
},
hidePopup
()
{
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
yqMerchantBox
:
false
})
},
}
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/yqMerchant/index.json
0 → 100644
View file @
fd7246b
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/components/yqMerchant/index.sass
0 → 100644
View file @
fd7246b
/* tabWorkOrder/pages/residentManage/components/shopMerchant/index.wxss */
.title
{
margin-bottom
:
var
(
--
fontSize20
)
;
color
:
#292D33
;
font-weight
:
400
;
font-size
:
var
(
--
fontSize32
)
;
}
.store-select-box
{
height
:
calc
(
100%
-
var
(
--
fontSize168
))
;
}
.merchant-box
.item
{
display
:
flex
;
height
:
var
(
--
fontSize88
)
;
align-items
:
center
;
color
:
#292D33
;
border-bottom
:
var
(
--
fontSize1
)
solid
#EFF0F2
;
}
.merchant-box
.item
:last-child
{
border-bottom
:
none
;
}
.merchant-box
.item.active
{
color
:
#347BFF
;
}
.item
.merchant_item
{
height
:
var
(
--
fontSize88
)
;
font-size
:
var
(
--
fontSize28
)
;
display
:
flex
;
align-items
:
center
;
width
:
94%
;
}
.item
.merchant_item
.text-hide
{
max-width
:
calc
(
100%
-
var
(
--
fontSize192
))
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.item
.icon
{
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
display
:
block
;
margin-right
:
var
(
--
fontSize20
)
;
flex-shrink
:
0
;
}
.item
.icon
.arc
{
width
:
100%
;
height
:
100%
;
border
:
var
(
--
fontSize2
)
solid
#979797
;
border-radius
:
100%
;
box-sizing
:
border-box
;
}
.mark
{
width
:var
(
--fontSize32
);
height
:
var
(
--
fontSize32
)
;
}
tabWorkOrder/pages/residentManage/components/yqMerchant/index.wxml
0 → 100644
View file @
fd7246b
<!--tabWorkOrder/pages/residentManage/components/yqMerchant/index.wxml-->
<popup title="选择关联账号" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup" class="store-wrap">
<scroll-view class="store-select-box" enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="merchant-box" wx:if="{{yqMerchartList.length>0}}">
<block wx:for="{{yqMerchartList}}" wx:key="index">
<view class="item {{storeIndex===index?'active':''}}" bindtap="choose" data-index="{{index}}">
<view class="merchant_item">
<view class="text-hide">{{item.yqMerchantName}}</view>
<view>{{item.yqMerchantId}}</view>
</view>
<view class="mark" wx:if="{{storeIndex===index}}">
<gl-image class="icon" src="/equity/mark.png" />
</view>
</view>
</block>
</view>
<view class="no-data" wx:else>
<empty-data />
</view>
</scroll-view>
</popup>
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/image/arrSolid.png
0 → 100644
View file @
fd7246b
1.43 KB
tabWorkOrder/pages/residentManage/image/radio.png
0 → 100644
View file @
fd7246b
1.17 KB
tabWorkOrder/pages/residentManage/residentManage.js
0 → 100644
View file @
fd7246b
// tabWorkOrder/pages/residentManage/residentManage.js
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
navStyle
:
'background-color: transparent'
,
list
:
[
'新增员工'
,
'调店账号分配'
],
activeIndex
:
0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
checkRequired
(
obj
)
{
let
target
=
[
"staffName"
,
"staffPhone"
,
"staffSceneLabel"
];
obj
=
{
...
obj
};
if
(
!
phoneRex
.
test
(
obj
.
staffPhone
))
{
this
.
showToast
(
"请输入正确的手机号"
);
return
true
;
}
try
{
target
.
map
((
key
)
=>
{
if
(
!
obj
[
key
])
{
throw
key
;
}
});
}
catch
(
error
)
{
return
error
;
}
return
false
;
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
changeHandle
(
e
)
{
console
.
log
(
e
)
let
{
index
}
=
e
.
currentTarget
.
dataset
;
this
.
setData
({
activeIndex
:
index
})
// this.selectComponent(`#page-${index}`)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/residentManage.json
0 → 100644
View file @
fd7246b
{
"navigationStyle"
:
"custom"
,
"usingComponents"
:
{
"add-staff"
:
"./components/addStaff/index"
,
"account-allocation"
:
"./components/accountAllocation/index"
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/residentManage.sass
0 → 100644
View file @
fd7246b
/* tabWorkOrder/pages/residentManage/residentManage.wxss */
page
{
background
:
#F7F8FA
;
}
.bg
{
width
:
100%
;
height
:
var
(
--
fontSize400
)
;
background
:
linear-gradient
(
0deg
,
#e8f0fb
00
0%
,
#dde8fb
100%
)
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
-1
;
}
.content
{
margin-top
:
176rpx
;
.tabs
{
margin
:
0
40rpx
;
display
:
flex
;
align-items
:
center
;
height
:
88rpx
;
.tab
{
flex
:
1
;
color
:
#5a5e66
;
font-size
:
28rpx
;
line-height
:
40rpx
;
text-align
:
center
;
}
.active
{
font-size
:
32rpx
;
font-weight
:
600
;
color
:
#347bff
;
position
:
relative
;
}
.
active
:
:
after
{
content
:
''
;
display
:
inline-block
;
width
:
64rpx
;
height
:
4rpx
;
border-radius
:
2rpx
2rpx
0
0
;
background
:
#347bff
;
box-sizing
:
border-box
;
position
:
absolute
;
top
:
60rpx
;
left
:
50%
;
margin-left
:
-32rpx
;
}
}
}
\ No newline at end of file
\ No newline at end of file
tabWorkOrder/pages/residentManage/residentManage.wxml
0 → 100644
View file @
fd7246b
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">驻店管理-深圳嘀加</navigation-bar>
<view class="bg"></view>
<view class="content">
<view class="tabs" >
<view wx:for="{{list}}" wx:key="index" class="tab {{activeIndex==index?'active':''}}" data-index="{{index}}" bind:tap="changeHandle">{{item}}</view>
</view>
<add-staff id="componet-0" wx:if="{{activeIndex===0}}"></add-staff>
<account-allocation id="componet-1" wx:if="{{activeIndex===1}}"></account-allocation>
</view>
\ No newline at end of file
\ No newline at end of file
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