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 93233a2f
authored
Aug 23, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调修改
1 parent
da9808ee
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
48 additions
and
31 deletions
components/Popup/Popup.js
components/Popup/Popup.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/selectConnectionPage/selectConnectionPage.js
packageMine/pages/staffManage/staffList/staffList.js
packageMine/pages/staffManage/staffList/staffList.wxml
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.scss
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.js
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.scss
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.wxml
pages/tab/outputValue/components/employees/employess.wxml
components/Popup/Popup.js
View file @
93233a2
...
@@ -38,7 +38,8 @@ Component({
...
@@ -38,7 +38,8 @@ Component({
value
:
true
value
:
true
},
},
hideTab
:
Boolean
,
hideTab
:
Boolean
,
isTab
:
Boolean
isTab
:
Boolean
,
popupSlotStyle
:
String
},
},
/**
/**
...
...
components/Popup/Popup.wxml
View file @
93233a2
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<block wx:if="{{title}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
<view class="popup-title text-center">{{title}}</view>
</block>
</block>
<view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}">
<view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}"
style="{{popupSlotStyle}}"
>
<slot></slot>
<slot></slot>
</view>
</view>
<view class="popup-footer {{isTab && !hideTab?'':'isFullSucreen'}}" wx:if="{{only}}">
<view class="popup-footer {{isTab && !hideTab?'':'isFullSucreen'}}" wx:if="{{only}}">
...
...
packageMine/components/staffTypePopup/staffTypePopup.js
View file @
93233a2
...
@@ -18,7 +18,7 @@ Component({
...
@@ -18,7 +18,7 @@ Component({
if
(
n
)
{
if
(
n
)
{
let
{
staffTypeList
,
notAll
}
=
this
.
data
let
{
staffTypeList
,
notAll
}
=
this
.
data
if
(
notAll
)
{
if
(
notAll
)
{
let
index
=
staffTypeList
.
findIndex
(
v
=>
v
.
t
ype
==
''
)
let
index
=
staffTypeList
.
findIndex
(
v
=>
v
.
staffT
ype
==
''
)
if
(
index
>
-
1
)
staffTypeList
.
splice
(
index
,
1
)
if
(
index
>
-
1
)
staffTypeList
.
splice
(
index
,
1
)
this
.
setData
({
this
.
setData
({
staffTypeList
staffTypeList
...
@@ -36,16 +36,16 @@ Component({
...
@@ -36,16 +36,16 @@ Component({
data
:
{
data
:
{
staffTypeList
:
[
staffTypeList
:
[
{
{
t
ype
:
''
,
staffT
ype
:
''
,
t
ypeStr
:
'全部'
staffT
ypeStr
:
'全部'
},
},
{
{
type
:
'1
'
,
staffType
:
'0
'
,
t
ypeStr
:
'驻店'
staffT
ypeStr
:
'驻店'
},
},
{
{
type
:
'2
'
,
staffType
:
'1
'
,
t
ypeStr
:
'技师'
staffT
ypeStr
:
'技师'
}
}
],
],
copySelectInfo
:
{}
copySelectInfo
:
{}
...
...
packageMine/components/staffTypePopup/staffTypePopup.wxml
View file @
93233a2
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
height="500rpx">
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
<view
class="itemCon text-hide {{item.
type == copySelectInfo.t
ype?'active':''}}"
class="itemCon text-hide {{item.
staffType == copySelectInfo.staffT
ype?'active':''}}"
data-target="{{item}}"
data-target="{{item}}"
bindtap="select">
bindtap="select">
{{item.
t
ypeStr}}
{{item.
staffT
ypeStr}}
</view>
</view>
</block>
</block>
</popup>
</popup>
packageMine/pages/staffManage/createStaff/constant/data.js
View file @
93233a2
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
formRule
=
{
const
formRule
=
{
selectInfo
:
[{
required
:
true
,
message
:
'所属服务中心不能为空'
}],
selectInfo
:
[{
required
:
true
,
message
:
'所属服务中心不能为空'
}],
t
ype
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staffT
ype
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffPhone
:
[
staffPhone
:
[
{
required
:
true
,
message
:
'手机号码不能为空'
},
{
required
:
true
,
message
:
'手机号码不能为空'
},
...
@@ -22,8 +22,8 @@ const formItems = [{
...
@@ -22,8 +22,8 @@ const formItems = [{
pageType
:
1
pageType
:
1
},
{
},
{
label
:
'员工类型'
,
label
:
'员工类型'
,
props
:
'
t
ype'
,
props
:
'
staffT
ype'
,
valueFn
:
'
t
ypeStr'
,
valueFn
:
'
staffT
ypeStr'
,
type
:
'select'
,
type
:
'select'
,
placeholder
:
'请选择员工类型'
,
placeholder
:
'请选择员工类型'
,
pageType
:
3
pageType
:
3
...
...
packageMine/pages/staffManage/createStaff/createStaff.js
View file @
93233a2
...
@@ -56,7 +56,8 @@ Page({
...
@@ -56,7 +56,8 @@ Page({
serviceValue
:
optionsInfo
.
merchantName
,
serviceValue
:
optionsInfo
.
merchantName
,
visualType
:
optionsInfo
.
visualType
||
0
,
visualType
:
optionsInfo
.
visualType
||
0
,
connectionValue
:
optionsInfo
.
visualType
==
1
?
`已选
${
optionsInfo
.
visibleMerchantNo
?.
split
(
','
)?.
length
}
位客户
`: '全部',
connectionValue
:
optionsInfo
.
visualType
==
1
?
`已选
${
optionsInfo
.
visibleMerchantNo
?.
split
(
','
)?.
length
}
位客户
`: '全部',
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : []
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : [],
staffTypeStr: optionsInfo.staffType == 0 ? '驻店' : optionsInfo.staffType == 1 ? '技师' : ''
} : {}
} : {}
this.setData({
this.setData({
addOrEdit: options?.info ? 'edit' : 'add',
addOrEdit: options?.info ? 'edit' : 'add',
...
@@ -202,7 +203,8 @@ Page({
...
@@ -202,7 +203,8 @@ Page({
staffPhone: formData?.staffPhone,
staffPhone: formData?.staffPhone,
createdSource: 3, // 创建来源 固定3 生意助手
createdSource: 3, // 创建来源 固定3 生意助手
visualType: formData?.visualType,
visualType: formData?.visualType,
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds // 全部 无需传可见客户数据
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds, // 全部 无需传可见客户数据
staffType: Number(formData?.staffType)
}
}
let message = addOrEdit == 'add' ? '是否确定创建员工?' : '是否确定修改员工信息?'
let message = addOrEdit == 'add' ? '是否确定创建员工?' : '是否确定修改员工信息?'
wx.showModal({
wx.showModal({
...
...
packageMine/pages/staffManage/selectConnectionPage/selectConnectionPage.js
View file @
93233a2
...
@@ -72,7 +72,7 @@ Page({
...
@@ -72,7 +72,7 @@ Page({
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
setData
({
this
.
setData
({
connectionList
:
res
||
[],
connectionList
:
res
||
[],
selectedConnectionList
:
res
?.
filter
(
val
=>
{
return
options
?.
selectedConnectionIds
.
length
&&
options
.
selectedConnectionIds
.
includes
(
val
.
merchantId
)
})
||
[]
selectedConnectionList
:
res
?.
filter
(
val
=>
{
return
options
?.
selectedConnectionIds
?
.
length
&&
options
.
selectedConnectionIds
.
includes
(
val
.
merchantId
)
})
||
[]
})
})
})
})
},
},
...
...
packageMine/pages/staffManage/staffList/staffList.js
View file @
93233a2
...
@@ -11,7 +11,7 @@ Page({
...
@@ -11,7 +11,7 @@ Page({
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
popupShow
:
false
,
popupShow
:
false
,
staffList
:
[],
staffList
:
[],
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
,
typeStr
:
'全部员工类型'
,
t
ype
:
''
},
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
,
staffTypeStr
:
'全部员工类型'
,
staffT
ype
:
''
},
total
:
0
,
total
:
0
,
serviceList
:
[],
serviceList
:
[],
currentPage
:
1
,
currentPage
:
1
,
...
@@ -62,7 +62,7 @@ Page({
...
@@ -62,7 +62,7 @@ Page({
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
currentPage
,
pageNum
:
currentPage
,
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
,
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
,
type
:
selectInfo
.
t
ype
staffType
:
selectInfo
.
staffT
ype
}
}
if
(
nothing
||
isAsk
)
{
if
(
nothing
||
isAsk
)
{
return
return
...
@@ -71,6 +71,9 @@ Page({
...
@@ -71,6 +71,9 @@ Page({
isAsk
:
true
isAsk
:
true
})
})
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
res
?.
list
?.
forEach
(
val
=>
{
val
.
staffTypeStr
=
val
.
staffType
==
0
?
'驻店'
:
'技师'
})
let
tempList
=
isReset
?
res
?.
list
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
list
||
[])
let
tempList
=
isReset
?
res
?.
list
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
list
||
[])
this
.
setData
({
this
.
setData
({
staffList
:
tempList
,
staffList
:
tempList
,
...
@@ -122,8 +125,8 @@ Page({
...
@@ -122,8 +125,8 @@ Page({
getStaffList
(
e
)
{
getStaffList
(
e
)
{
wx
.
$api
.
hideLoading
()
wx
.
$api
.
hideLoading
()
let
{
selectInfo
}
=
this
.
data
let
{
selectInfo
}
=
this
.
data
let
{
type
,
t
ypeStr
}
=
e
.
detail
let
{
staffType
,
staffT
ypeStr
}
=
e
.
detail
if
(
type
==
''
&&
typeStr
==
'全部'
)
e
.
detail
.
t
ypeStr
=
'全部员工类型'
if
(
staffType
==
''
&&
staffTypeStr
==
'全部'
)
e
.
detail
.
staffT
ypeStr
=
'全部员工类型'
let
obj
=
{
let
obj
=
{
...
selectInfo
,
...
selectInfo
,
...
e
.
detail
...
e
.
detail
...
...
packageMine/pages/staffManage/staffList/staffList.wxml
View file @
93233a2
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view class="select-box">
<view class="select-box">
<view class="select-btn">
<view class="select-btn">
<view class="type" bindtap="handleStaffTypeChange">
<view class="type" bindtap="handleStaffTypeChange">
<text>{{selectInfo.
t
ypeStr}}</text>
<text>{{selectInfo.
staffT
ypeStr}}</text>
<glsx-image class="point" src="index/point.png" />
<glsx-image class="point" src="index/point.png" />
</view>
</view>
</view>
</view>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<glsx-image wx:if="{{!item.weChatAvatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<glsx-image wx:if="{{!item.weChatAvatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<image wx:else src="{{item.weChatAvatarUrl}}" class="avatar"></image>
<image wx:else src="{{item.weChatAvatarUrl}}" class="avatar"></image>
<view class="message-text">
<view class="message-text">
<view class="name"><text>{{item.staffName}}</text><text wx:if="{{item.
type}}" class="type_tips">{{filter.filterType(item.type
)}}</text></view>
<view class="name"><text>{{item.staffName}}</text><text wx:if="{{item.
staffTypeStr}}" class="type_tips">{{filter.filterType(item.staffTypeStr
)}}</text></view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
</view>
</view>
</view>
</view>
...
...
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.scss
View file @
93233a2
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
background
:
#F7F7F7
;
background
:
#F7F7F7
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
display
:
flex
;
display
:
flex
;
margin-top
:
-2rpx
;
.merchant_text
{
.merchant_text
{
display
:
flex
;
display
:
flex
;
view
{
view
{
...
@@ -22,7 +23,7 @@
...
@@ -22,7 +23,7 @@
padding
:
0
32rpx
;
padding
:
0
32rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
font-size
:
28rpx
;
height
:
calc
(
100%
-
1
00rpx
);
height
:
calc
(
100%
-
2
00rpx
);
.month_item
{
.month_item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml
View file @
93233a2
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
bind:hidePopup="hidePopup"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
bindconfirm="confirm"
height="60%"
height="60%"
title="员工提成">
title="员工提成"
isTab="{{true}}"
popupSlotStyle="height: calc(100% - 200rpx)">
<!-- 服务多家门店不显示门店名称 -->
<!-- 服务多家门店不显示门店名称 -->
<view class="title_tips">
<view class="title_tips">
<view decode="{{true}}" class="merchant_text" wx:if="{{(handleCommissionObj.constructionStats && handleCommissionObj.constructionStats.length == 1) || (handleCommissionObj.outputValueStats && handleCommissionObj.outputValueStats.length == 1)}}">
<view decode="{{true}}" class="merchant_text" wx:if="{{(handleCommissionObj.constructionStats && handleCommissionObj.constructionStats.length == 1) || (handleCommissionObj.outputValueStats && handleCommissionObj.outputValueStats.length == 1)}}">
...
...
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.js
View file @
93233a2
...
@@ -17,7 +17,7 @@ Component({
...
@@ -17,7 +17,7 @@ Component({
thisPage
.
setData
({
thisPage
.
setData
({
isShowFilterScreen
:
true
isShowFilterScreen
:
true
})
})
this
.
setDate
()
//
默认展示当前月份
if
(
!
this
.
data
.
formData
.
startTime
||
!
this
.
data
.
formData
.
endTime
)
this
.
setDate
()
// 未选择时间
默认展示当前月份
this
.
setViewData
()
this
.
setViewData
()
}
}
}
}
...
@@ -182,9 +182,11 @@ Component({
...
@@ -182,9 +182,11 @@ Component({
target
.
map
(
i
=>
(
i
.
active
=
false
))
target
.
map
(
i
=>
(
i
.
active
=
false
))
target
[
index
].
active
=
true
target
[
index
].
active
=
true
}
else
{
}
else
{
target
[
index
].
active
=
tru
e
target
[
index
].
active
=
!
target
[
index
].
activ
e
target
[
0
].
active
=
false
target
[
0
].
active
=
false
}
}
let
activeFlag
=
target
.
findIndex
(
val
=>
val
.
active
)
if
(
activeFlag
<
0
)
target
[
0
].
active
=
true
break
break
case
'sceneList'
:
case
'sceneList'
:
target
.
map
(
i
=>
(
i
.
active
=
false
))
target
.
map
(
i
=>
(
i
.
active
=
false
))
...
...
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.scss
View file @
93233a2
...
@@ -94,10 +94,14 @@
...
@@ -94,10 +94,14 @@
width
:
316rpx
;
width
:
316rpx
;
height
:
68rpx
;
height
:
68rpx
;
line-height
:
68rpx
;
line-height
:
68rpx
;
font-size
:
26rpx
;
text-align
:
center
;
text-align
:
center
;
background
:
#F7F7F7
;
background
:
#F7F7F7
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
}
}
.box
.date_box
.date_item.placeholder
{
color
:
#9E9EA8
;
}
.box
.list_box
{
.box
.list_box
{
display
:
flex
;
display
:
flex
;
...
...
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.wxml
View file @
93233a2
...
@@ -48,9 +48,11 @@
...
@@ -48,9 +48,11 @@
</view>
</view>
</view>
</view>
<view class="date_box">
<view class="date_box">
<view class="date_item">{{filter.filterDate(formData.startTime)}}</view>
<view class="date_item" wx:if="{{formData.startTime}}">{{filter.filterDate(formData.startTime) || '开始时间'}}</view>
<view class="date_item placeholder" wx:else>YYYY/MM</view>
<view>-</view>
<view>-</view>
<view class="date_item">{{filter.filterDate(formData.endTime)}}</view>
<view class="date_item" wx:if="{{formData.endTime}}">{{filter.filterDate(formData.endTime) || '结束时间'}}</view>
<view class="date_item placeholder" wx:else>YYYY/MM</view>
</view>
</view>
</view>
</view>
<view class="box" wx:if="{{tabType == 0}}">
<view class="box" wx:if="{{tabType == 0}}">
...
...
pages/tab/outputValue/components/employees/employess.wxml
View file @
93233a2
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
<view class="flex_spa-be">
<view class="flex_spa-be">
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
<view class="commission">
<view class="commission">
<view class="flex" data-target="{{item}}" bindtap="handleCommissionPopup"><text>提成</text><text class="arrow"></text></view>
<view class="flex"
wx:if="{{item.commissionFlag}}"
data-target="{{item}}" bindtap="handleCommissionPopup"><text>提成</text><text class="arrow"></text></view>
<
!-- <view class="disabled" wx:else="">提成未设置</view> --
>
<
view class="disabled" wx:else="">提成未设置</view
>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
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