Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-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 514e301f
authored
Aug 24, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
d9cb5738
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
43 additions
and
50 deletions
packageMine/components/selectServiceConfirm/selectServiceConfirm.wxml
packageMine/components/staffTypePopup/staffTypePopup.js
packageMine/components/staffTypePopup/staffTypePopup.wxml
packageMine/pages/staffManage/createStaff/constant/data.js
packageMine/pages/staffManage/createStaff/createStaff.js
packageMine/pages/staffManage/createStaff/createStaff.wxml
packageMine/pages/staffManage/staffList/staffList.js
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.js
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.wxml
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.js
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.wxml
packageMine/components/selectServiceConfirm/selectServiceConfirm.wxml
View file @
514e301
...
...
@@ -29,7 +29,7 @@
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:
100%;
"
style="height:
calc(100vh - 108rpx - {{tabBarStyle}}px)
"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{serviceList}}" wx:key="index">
...
...
packageMine/components/staffTypePopup/staffTypePopup.js
View file @
514e301
...
...
@@ -4,12 +4,11 @@ Component({
* 组件的属性列表
*/
properties
:
{
selectInfo
:
{
s
taffTypeS
electInfo
:
{
type
:
Object
,
observer
:
function
(
n
)
{
this
.
setData
({
copySelectInfo
:
n
})
console
.
log
(
n
)
this
.
setData
({
copyStaffTypeSelectInfo
:
n
})
}
},
popShow
:
{
...
...
@@ -48,7 +47,7 @@ Component({
staffBusinessTypeStr
:
'技师'
}
],
copySelectInfo
:
{}
copyS
taffTypeS
electInfo
:
{}
},
/**
...
...
@@ -61,12 +60,12 @@ Component({
select
(
e
)
{
let
{
target
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
copySelectInfo
:
target
copyS
taffTypeS
electInfo
:
target
})
},
confirm
()
{
let
{
copySelectInfo
}
=
this
.
data
this
.
triggerEvent
(
'confirm'
,
copySelectInfo
)
let
{
copyS
taffTypeS
electInfo
}
=
this
.
data
this
.
triggerEvent
(
'confirm'
,
copyS
taffTypeS
electInfo
)
this
.
hidePopup
()
}
}
...
...
packageMine/components/staffTypePopup/staffTypePopup.wxml
View file @
514e301
...
...
@@ -7,7 +7,7 @@
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
class="itemCon text-hide {{item.staffBusinessType == copySelectInfo.staffBusinessType?'active':''}}"
class="itemCon text-hide {{item.staffBusinessType == copyS
taffTypeS
electInfo.staffBusinessType?'active':''}}"
data-target="{{item}}"
bindtap="select">
{{item.staffBusinessTypeStr}}
...
...
packageMine/pages/staffManage/createStaff/constant/data.js
View file @
514e301
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
formRule
=
{
selectInfo
:
[{
required
:
true
,
message
:
'所属服务中心不能为空'
}],
staff
BusinessType
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staff
TypeSelectInfo
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffPhone
:
[
{
required
:
true
,
message
:
'手机号码不能为空'
},
...
...
@@ -22,7 +22,7 @@ const formItems = [{
pageType
:
1
},
{
label
:
'员工类型'
,
props
:
'staff
BusinessType
'
,
props
:
'staff
TypeSelectInfo
'
,
valueFn
:
'staffBusinessTypeStr'
,
type
:
'select'
,
placeholder
:
'请选择员工类型'
,
...
...
packageMine/pages/staffManage/createStaff/createStaff.js
View file @
514e301
...
...
@@ -17,7 +17,13 @@ Page({
formData
:
{
selectedConnectionIds
:
[],
connectionValue
:
'全部'
,
visualType
:
0
// 0:全部 1:选中部分可见客户
visualType
:
0
,
// 0:全部 1:选中部分可见客户
staffBusinessType
:
'0'
,
staffBusinessTypeStr
:
'驻店'
,
staffTypeSelectInfo
:
{
staffBusinessType
:
'0'
,
staffBusinessTypeStr
:
'驻店'
,
}
},
showServiceConfirm
:
false
,
isConfirm
:
false
,
...
...
@@ -52,12 +58,13 @@ Page({
let
optionsInfo
=
options
?.
info
||
{}
let
data
=
options
?.
info
?
{
...
options
?.
info
,
selectInfo
:
{
yqMerchantId
:
optionsInfo
.
merchantNo
,
yqMerchantName
:
optionsInfo
.
merchantName
,
staffBusinessType
:
optionsInfo
?.
staffBusinessType
},
selectInfo
:
{
yqMerchantId
:
optionsInfo
.
merchantNo
,
yqMerchantName
:
optionsInfo
.
merchantName
},
serviceValue
:
optionsInfo
.
merchantName
,
visualType
:
optionsInfo
.
visualType
||
0
,
connectionValue
:
optionsInfo
.
visualType
==
1
?
`已选
${
optionsInfo
.
visibleMerchantNo
?.
split
(
','
)?.
length
}
位客户
`: '全部',
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : [],
staffBusinessTypeStr: optionsInfo.staffBusinessType == 0 ? '驻店' : optionsInfo.staffBusinessType == 1 ? '技师' : ''
staffBusinessTypeStr: optionsInfo.staffBusinessType == 0 ? '驻店' : optionsInfo.staffBusinessType == 1 ? '技师' : '',
staffTypeSelectInfo: optionsInfo?.staffBusinessType ? {staffBusinessType: optionsInfo?.staffBusinessType} : undefined
} : {}
this.setData({
addOrEdit: options?.info ? 'edit' : 'add',
...
...
@@ -153,10 +160,8 @@ Page({
let obj = {
...formData,
...e.detail,
selectInfo: {
...formData.selectInfo,
...e.detail
}
selectInfo: formData.selectInfo,
staffTypeSelectInfo: e.detail
}
this.setData({
formData: obj
...
...
packageMine/pages/staffManage/createStaff/createStaff.wxml
View file @
514e301
...
...
@@ -30,4 +30,4 @@
</view>
</view>
<select-service-confirm show="{{showServiceConfirm}}" tabBarStyle="{{tabBarStyle}}" serviceList="{{serviceList}}" selectInfo="{{formData.selectInfo}}" bind:hiddenSelectConfirm="hiddenSelectConfirm"></select-service-confirm>
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{formData.selectInfo}}" bindconfirm="staffTypeConfiem" popShow="{{staffPopupShow}}" notAll="{{true}}"/>
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{formData.selectInfo}}"
staffTypeSelectInfo="{{formData.staffTypeSelectInfo}}"
bindconfirm="staffTypeConfiem" popShow="{{staffPopupShow}}" notAll="{{true}}"/>
packageMine/pages/staffManage/staffList/staffList.js
View file @
514e301
...
...
@@ -62,7 +62,7 @@ Page({
pageSize
:
10
,
pageNum
:
currentPage
,
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
,
staffType
:
selectInfo
.
staffBusinessType
staff
Business
Type
:
selectInfo
.
staffBusinessType
}
if
(
nothing
||
isAsk
)
{
return
...
...
@@ -71,12 +71,12 @@ Page({
isAsk
:
true
})
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
let
tempList
=
isReset
?
res
?.
list
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
list
||
[])
let
tempList
=
isReset
?
res
?.
data
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
data
||
[])
this
.
setData
({
staffList
:
tempList
,
currentPage
:
currentPage
+
1
,
total
:
res
.
total
,
nothing
:
res
.
total
==
tempList
.
length
,
total
:
res
.
count
,
nothing
:
res
.
count
==
tempList
.
length
,
triggered
:
false
})
if
(
isReset
)
{
...
...
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.js
View file @
514e301
...
...
@@ -22,13 +22,11 @@ Component({
}
else
{
item
.
act
=
false
}
this
.
setData
({
merchantRange
,
selectedMerchantId
:
selectInfo
.
partnerMerchantIds
[
0
]
})
})
this
.
setData
({
searchKeyword
:
''
searchKeyword
:
''
,
merchantRange
,
selectedMerchantId
:
selectInfo
.
partnerMerchantIds
[
0
]
||
''
})
}
}
...
...
@@ -96,8 +94,14 @@ Component({
})
},
input
(
e
)
{
let
{
merchantRange
,
selectedMerchantId
}
=
this
.
data
let
{
value
}
=
e
.
detail
this
.
setData
({
searchKeyword
:
value
})
},
search
(
e
)
{
let
{
merchantRange
,
selectedMerchantId
}
=
this
.
data
let
{
value
}
=
e
.
currentTarget
.
dataset
&&
Object
.
keys
(
e
.
currentTarget
.
dataset
).
length
?
e
.
currentTarget
.
dataset
:
e
.
detail
merchantRange
.
forEach
(
item
=>
{
item
.
act
=
false
item
.
show
=
item
.
merchantName
.
includes
(
value
)
...
...
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.wxml
View file @
514e301
...
...
@@ -13,13 +13,10 @@
type="text"
placeholder="请搜索服务商账号名"
class="input"
value="{{
k
eyword}}"
value="{{
searchK
eyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
...
...
@@ -28,9 +25,6 @@
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
...
...
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.js
View file @
514e301
...
...
@@ -14,7 +14,6 @@ Component({
observer
:
function
(
n
)
{
if
(
n
)
{
let
{
merchantRange
,
selectInfo
}
=
this
.
data
console
.
log
(
selectInfo
)
let
activeIndex
=
merchantRange
.
findIndex
(
v
=>
v
.
merchantId
==
selectInfo
.
shopMerchantIds
[
0
])
if
(
merchantRange
.
length
)
merchantRange
.
unshift
({
merchantId
:
''
,
merchantName
:
'全部'
})
merchantRange
.
forEach
((
item
,
ind
)
=>
{
...
...
@@ -24,13 +23,11 @@ Component({
}
else
{
item
.
act
=
false
}
this
.
setData
({
merchantRange
,
selectedMerchantId
:
selectInfo
.
shopMerchantIds
[
0
]
})
})
this
.
setData
({
searchKeyword
:
''
searchKeyword
:
''
,
merchantRange
,
selectedMerchantId
:
selectInfo
?.
shopMerchantIds
[
0
]
||
''
})
}
}
...
...
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.wxml
View file @
514e301
...
...
@@ -12,13 +12,10 @@
type="text"
placeholder="请搜索门店"
class="input"
value="{{
k
eyword}}"
value="{{
searchK
eyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="search" data-value="{{searchKeyword}}">
<view class="text-center">搜索</view>
...
...
@@ -27,9 +24,6 @@
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
...
...
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