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 7ed36cd0
authored
Aug 21, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
8a22ebe1
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
694 additions
and
14 deletions
packageMine/components/staffTypePopup/staffTypePopup.js
packageMine/components/staffTypePopup/staffTypePopup.json
packageMine/components/staffTypePopup/staffTypePopup.scss
packageMine/components/staffTypePopup/staffTypePopup.wxml
packageMine/pages/staffManage/createStaff/constant/data.js
packageMine/pages/staffManage/createStaff/createStaff.js
packageMine/pages/staffManage/createStaff/createStaff.json
packageMine/pages/staffManage/createStaff/createStaff.wxml
packageMine/pages/staffManage/index.wxs
packageMine/pages/staffManage/staffList/staffList.js
packageMine/pages/staffManage/staffList/staffList.json
packageMine/pages/staffManage/staffList/staffList.scss
packageMine/pages/staffManage/staffList/staffList.wxml
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.js
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.json
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.scss
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.scss
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.wxml
pages/tab/outputValue/components/employees/employess.js
pages/tab/outputValue/components/employees/employess.json
pages/tab/outputValue/components/employees/employess.scss
pages/tab/outputValue/components/employees/employess.wxml
pages/tab/outputValue/index.wxs
pages/tab/outputValue/outputValue.json
pages/tab/outputValue/outputValue.wxml
packageMine/components/staffTypePopup/staffTypePopup.js
0 → 100644
View file @
7ed36cd
// packageMine/pages/staffManage/staffTypePopup/staffTypePopup.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
selectInfo
:
{
type
:
Object
,
observer
:
function
(
n
)
{
this
.
setData
({
copySelectInfo
:
n
})
}
},
popShow
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
if
(
n
)
{
let
{
staffTypeList
,
notAll
}
=
this
.
data
if
(
notAll
)
{
let
index
=
staffTypeList
.
findIndex
(
v
=>
v
.
type
==
''
)
if
(
index
>
-
1
)
staffTypeList
.
splice
(
index
,
1
)
this
.
setData
({
staffTypeList
})
}
}
}
},
notAll
:
Boolean
},
/**
* 组件的初始数据
*/
data
:
{
staffTypeList
:
[
{
type
:
''
,
typeStr
:
'全部'
},
{
type
:
'1'
,
typeStr
:
'驻店'
},
{
type
:
'2'
,
typeStr
:
'技师'
}
],
copySelectInfo
:
{}
},
/**
* 组件的方法列表
*/
methods
:
{
hidePopup
()
{
this
.
triggerEvent
(
'hidePopup'
)
},
select
(
e
)
{
let
{
target
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
copySelectInfo
:
target
})
},
confirm
()
{
let
{
copySelectInfo
}
=
this
.
data
this
.
triggerEvent
(
'confirm'
,
copySelectInfo
)
this
.
hidePopup
()
}
}
})
packageMine/components/staffTypePopup/staffTypePopup.json
0 → 100644
View file @
7ed36cd
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageMine/components/staffTypePopup/staffTypePopup.scss
0 → 100644
View file @
7ed36cd
/* packageMine/pages/staffManage/staffTypePopup/staffTypePopup.wxss */
.itemCon
{
box-sizing
:
border-box
;
width
:
100%
;
height
:
80rpx
;
color
:
#323436
;
line-height
:
80rpx
;
padding
:
0
32rpx
;
}
.active
{
background
:
#F0F7FF
;
font-size
:
28rpx
;
color
:
#3666FE
;
}
\ No newline at end of file
\ No newline at end of file
packageMine/components/staffTypePopup/staffTypePopup.wxml
0 → 100644
View file @
7ed36cd
<!--packageMine/pages/staffManage/staffTypePopup/staffTypePopup.wxml-->
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
title="员工类型"
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
class="itemCon text-hide {{item.type == copySelectInfo.type?'active':''}}"
data-target="{{item}}"
bindtap="select">
{{item.typeStr}}
</view>
</block>
</popup>
packageMine/pages/staffManage/createStaff/constant/data.js
View file @
7ed36cd
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
:
'所属服务中心不能为空'
}],
type
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffPhone
:
[
staffPhone
:
[
{
required
:
true
,
message
:
'手机号码不能为空'
},
{
required
:
true
,
message
:
'手机号码不能为空'
},
...
@@ -20,6 +21,13 @@ const formItems = [{
...
@@ -20,6 +21,13 @@ const formItems = [{
placeholder
:
'请选择服务中心'
,
placeholder
:
'请选择服务中心'
,
pageType
:
1
pageType
:
1
},
{
},
{
label
:
'员工类型'
,
props
:
'type'
,
valueFn
:
'typeStr'
,
type
:
'select'
,
placeholder
:
'请选择员工类型'
,
pageType
:
3
},
{
label
:
'员工姓名'
,
label
:
'员工姓名'
,
props
:
'staffName'
,
props
:
'staffName'
,
type
:
'input'
,
type
:
'input'
,
...
...
packageMine/pages/staffManage/createStaff/createStaff.js
View file @
7ed36cd
...
@@ -20,7 +20,8 @@ Page({
...
@@ -20,7 +20,8 @@ Page({
visualType
:
0
// 0:全部 1:选中部分可见客户
visualType
:
0
// 0:全部 1:选中部分可见客户
},
},
showServiceConfirm
:
false
,
showServiceConfirm
:
false
,
isConfirm
:
false
isConfirm
:
false
,
staffPopupShow
:
false
},
},
watch
:
{
watch
:
{
...
@@ -134,9 +135,33 @@ Page({
...
@@ -134,9 +135,33 @@ Page({
if (!formData.selectInfo) return wx.$api.showToast('请先选择所属服务中心')
if (!formData.selectInfo) return wx.$api.showToast('请先选择所属服务中心')
wx.$router.go('packageMine.selectConnectionPage', this.data.formData)
wx.$router.go('packageMine.selectConnectionPage', this.data.formData)
break
break
case 3:
this.handleStaffTypeChange()
break
}
}
},
},
handleStaffTypeChange() {
this.setData({
staffPopupShow: !this.data.staffPopupShow
})
},
staffTypeConfiem(e) {
let { formData } = this.data
let obj = {
...formData,
...e.detail,
selectInfo: {
...formData.selectInfo,
...e.detail
}
}
this.setData({
formData: obj
})
},
hiddenSelectConfirm(e) {
hiddenSelectConfirm(e) {
let selectInfo = e?.detail
let selectInfo = e?.detail
this.setData({ showServiceConfirm: !this.data.showServiceConfirm })
this.setData({ showServiceConfirm: !this.data.showServiceConfirm })
...
@@ -171,6 +196,7 @@ Page({
...
@@ -171,6 +196,7 @@ Page({
let params = {
let params = {
merchantNo: formData?.selectInfo?.yqMerchantId,
merchantNo: formData?.selectInfo?.yqMerchantId,
merchantName: userInfo?.merchantName,
merchantName: userInfo?.merchantName,
type: formData.type,
staffUuid: formData?.staffUuid,
staffUuid: formData?.staffUuid,
staffName: formData?.staffName,
staffName: formData?.staffName,
staffPhone: formData?.staffPhone,
staffPhone: formData?.staffPhone,
...
...
packageMine/pages/staffManage/createStaff/createStaff.json
View file @
7ed36cd
{
{
"usingComponents"
:
{
"usingComponents"
:
{
"select-service-confirm"
:
"../../../components/selectServiceConfirm/selectServiceConfirm"
"select-service-confirm"
:
"../../../components/selectServiceConfirm/selectServiceConfirm"
,
"staff-type-popup"
:
"../../../components/staffTypePopup/staffTypePopup"
},
},
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/staffManage/createStaff/createStaff.wxml
View file @
7ed36cd
...
@@ -30,3 +30,4 @@
...
@@ -30,3 +30,4 @@
</view>
</view>
</view>
</view>
<select-service-confirm show="{{showServiceConfirm}}" tabBarStyle="{{tabBarStyle}}" serviceList="{{serviceList}}" selectInfo="{{formData.selectInfo}}" bind:hiddenSelectConfirm="hiddenSelectConfirm"></select-service-confirm>
<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}}"/>
packageMine/pages/staffManage/index.wxs
View file @
7ed36cd
...
@@ -2,6 +2,11 @@ var formatMobile = function (item) {
...
@@ -2,6 +2,11 @@ var formatMobile = function (item) {
return item ? item.substring(0,3)+" " + item.substring(3,7) +" "+item.substring(7) : ' '
return item ? item.substring(0,3)+" " + item.substring(3,7) +" "+item.substring(7) : ' '
}
}
var filterType = function (item) {
return ['驻店', '员工'][item.type] || ''
}
module.exports = {
module.exports = {
formatMobile: formatMobile
formatMobile: formatMobile,
filterType: filterType
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/staffManage/staffList/staffList.js
View file @
7ed36cd
...
@@ -11,14 +11,15 @@ Page({
...
@@ -11,14 +11,15 @@ Page({
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
popupShow
:
false
,
popupShow
:
false
,
staffList
:
[],
staffList
:
[],
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
},
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
,
typeStr
:
'全部员工类型'
,
type
:
''
},
total
:
0
,
total
:
0
,
serviceList
:
[],
serviceList
:
[],
currentPage
:
1
,
currentPage
:
1
,
allServiceIds
:
[],
allServiceIds
:
[],
nothing
:
false
,
nothing
:
false
,
scrollTop
:
0
,
scrollTop
:
0
,
isAsk
:
false
isAsk
:
false
,
staffPopupShow
:
false
},
},
/**
/**
...
@@ -60,7 +61,8 @@ Page({
...
@@ -60,7 +61,8 @@ Page({
let
params
=
{
let
params
=
{
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
currentPage
,
pageNum
:
currentPage
,
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
,
type
:
selectInfo
.
type
}
}
if
(
nothing
||
isAsk
)
{
if
(
nothing
||
isAsk
)
{
return
return
...
@@ -69,7 +71,7 @@ Page({
...
@@ -69,7 +71,7 @@ Page({
isAsk
:
true
isAsk
:
true
})
})
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
let
tempList
=
isReset
?
res
?.
data
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
data
||
[])
let
tempList
=
isReset
?
res
?.
list
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
list
||
[])
this
.
setData
({
this
.
setData
({
staffList
:
tempList
,
staffList
:
tempList
,
currentPage
:
currentPage
+
1
,
currentPage
:
currentPage
+
1
,
...
@@ -102,6 +104,13 @@ Page({
...
@@ -102,6 +104,13 @@ Page({
this
.
getList
(
true
)
this
.
getList
(
true
)
},
},
// 筛选员工类型
handleStaffTypeChange
()
{
this
.
setData
({
staffPopupShow
:
!
this
.
data
.
staffPopupShow
})
},
// 筛选服务中心
// 筛选服务中心
filterTypeFn
()
{
filterTypeFn
()
{
this
.
setData
({
this
.
setData
({
...
@@ -112,8 +121,15 @@ Page({
...
@@ -112,8 +121,15 @@ Page({
// 获取员工列表
// 获取员工列表
getStaffList
(
e
)
{
getStaffList
(
e
)
{
wx
.
$api
.
hideLoading
()
wx
.
$api
.
hideLoading
()
let
{
selectInfo
}
=
this
.
data
let
{
type
,
typeStr
}
=
e
.
detail
if
(
type
==
''
&&
typeStr
==
'全部'
)
e
.
detail
.
typeStr
=
'全部员工类型'
let
obj
=
{
...
selectInfo
,
...
e
.
detail
}
this
.
setData
({
this
.
setData
({
selectInfo
:
e
.
detail
,
selectInfo
:
obj
,
nothing
:
false
,
nothing
:
false
,
currentPage
:
1
currentPage
:
1
})
})
...
...
packageMine/pages/staffManage/staffList/staffList.json
View file @
7ed36cd
{
{
"navigationBarTitleText"
:
"员工管理"
,
"navigationBarTitleText"
:
"员工管理"
,
"usingComponents"
:
{
"usingComponents"
:
{
"select-service-popup"
:
"../../../components/selectServicePopup/selectServicePopup"
"select-service-popup"
:
"../../../components/selectServicePopup/selectServicePopup"
,
"staff-type-popup"
:
"../../../components/staffTypePopup/staffTypePopup"
}
}
}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/staffManage/staffList/staffList.scss
View file @
7ed36cd
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
color
:
var
(
--
btnColor
)
color
:
var
(
--
btnColor
)
}
}
}
}
.select-box
{
display
:
flex
;
.select-btn
{
.select-btn
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
16rpx
0
;
padding
:
16rpx
0
;
...
@@ -68,6 +70,7 @@
...
@@ -68,6 +70,7 @@
}
}
}
}
}
}
}
.item-box
{
.item-box
{
width
:
100%
;
width
:
100%
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
...
@@ -94,6 +97,14 @@
...
@@ -94,6 +97,14 @@
.name
{
.name
{
color
:
#323436
;
color
:
#323436
;
font-size
:
28rpx
;
font-size
:
28rpx
;
.type_tips
{
background
:
#F1F3F9
;
border
:
2rpx
solid
#FFFFFF
;
border-radius
:
8rpx
;
font-size
:
22rpx
;
margin-left
:
16rpx
;
color
:
#6B7384
;
}
}
}
.mobile
{
.mobile
{
color
:
#858A94
;
color
:
#858A94
;
...
...
packageMine/pages/staffManage/staffList/staffList.wxml
View file @
7ed36cd
...
@@ -8,6 +8,13 @@
...
@@ -8,6 +8,13 @@
<view class="content-box">
<view class="content-box">
<view class="title-box">
<view class="title-box">
<view class="title">员工数量:<text class="number">{{total}}</text></view>
<view class="title">员工数量:<text class="number">{{total}}</text></view>
<view class="select-box">
<view class="select-btn">
<view class="type" bindtap="handleStaffTypeChange">
<text>{{selectInfo.typeStr}}</text>
<glsx-image class="point" src="index/point.png" />
</view>
</view>
<view class="select-btn">
<view class="select-btn">
<view class="type" bindtap="filterTypeFn">
<view class="type" bindtap="filterTypeFn">
<text>{{selectInfo.yqMerchantName}}</text>
<text>{{selectInfo.yqMerchantName}}</text>
...
@@ -15,6 +22,7 @@
...
@@ -15,6 +22,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<block wx:if="{{staffList.length}}">
<block wx:if="{{staffList.length}}">
<scroll-view scroll-y
<scroll-view scroll-y
enable-back-to-top
enable-back-to-top
...
@@ -32,7 +40,7 @@
...
@@ -32,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">
{{item.staffName}}
</view>
<view class="name">
<text>{{item.staffName}}</text><text wx:if="{{item.type}}" class="type_tips">{{filter.filterType(item.type)}}</text>
</view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
</view>
</view>
</view>
</view>
...
@@ -54,3 +62,4 @@
...
@@ -54,3 +62,4 @@
</view>
</view>
</view>
</view>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="getStaffList" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" />
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="getStaffList" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" />
<staff-type-popup wx:if="{{staffPopupShow}}" bind:hidePopup="handleStaffTypeChange" selectInfo="{{selectInfo}}" bindconfirm="getStaffList" popShow="{{staffPopupShow}}"/>
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.js
0 → 100644
View file @
7ed36cd
// pages/tab/outputValue/components/CommissionPopup/CommissionPopup.js
import
{
getNowMonth
}
from
'~/utils/format'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
popShow
:
Boolean
,
handleCommissionObj
:
Object
},
/**
* 组件的初始数据
*/
data
:
{
monthCommossionData
:
[
{
month
:
'2023-08'
,
ruleStatus
:
'1'
,
commission
:
5230
},
{
month
:
'2023-07'
,
ruleStatus
:
'1'
,
commission
:
5230
},
{
month
:
'2023-06'
,
ruleStatus
:
'0'
,
commission
:
5230
},
{
month
:
'2023-05'
,
ruleStatus
:
'1'
,
commission
:
5230
},
{
month
:
'2023-04'
,
ruleStatus
:
'0'
,
commission
:
5230
},
{
month
:
'2023-03'
,
ruleStatus
:
'1'
,
commission
:
5230
}
],
nowMonth
:
getNowMonth
()
},
/**
* 组件的方法列表
*/
methods
:
{
hidePopup
()
{
this
.
triggerEvent
(
'hidePopup'
)
},
}
})
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.json
0 → 100644
View file @
7ed36cd
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.scss
0 → 100644
View file @
7ed36cd
/* pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxss */
.title_tips
{
height
:
96rpx
;
line-height
:
96rpx
;
font-size
:
28rpx
;
color
:
#323436
;
padding
:
0
32rpx
;
background
:
#F7F7F7
;
border-radius
:
8rpx
;
display
:
flex
;
.merchant_text
{
display
:
flex
;
view
{
max-width
:
500rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
}
.month_box
{
padding
:
0
32rpx
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
height
:
calc
(
100%
-
100rpx
);
.month_item
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
color
:
#323436
;
font-weight
:
600
;
padding
:
52rpx
40rpx
8rpx
;
border-bottom
:
2rpx
solid
#F5F5F5
;
.inline_b
{
display
:
inline-block
;
}
.tips
{
font-weight
:
400
;
}
}
}
\ No newline at end of file
\ No newline at end of file
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml
0 → 100644
View file @
7ed36cd
<!--pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml-->
<wxs src="../../index.wxs" module="filter" />
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
height="60%"
title="员工提成">
<!-- 服务多家门店不显示门店名称 -->
<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>{{handleCommissionObj.constructionStats[0].shopMerchantName || handleCommissionObj.outputValueStats[0].shopMerchantName}}</view>
<view style="padding: 0 10rpx;"> | </view>
</view>
<view>{{handleCommissionObj.staffName}}</view>
</view>
<scroll-view scroll-y class="month_box">
<view class="month_item" wx:for="{{monthCommossionData}}" wx:key="index">
<view class="month">{{filter.getMonth(item.month)}}月份<view class="inline_b" wx:if="{{nowMonth == item.month}}">(当前月)</view></view>
<view wx:if="{{item.ruleStatus == '1' && nowMonth == item.month}}" class="tips">提成在本月完结后自动计算</view>
<view wx:if="{{item.ruleStatus == '0'}}" class="tips">提成未设置,请登录后台设置</view>
<view wx:if="{{item.ruleStatus == '1' && nowMonth != item.month}}" class="commissionNum">¥{{filter.setPrice(item.commission)}}</view>
</view>
</scroll-view>
</popup>
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.scss
View file @
7ed36cd
...
@@ -114,12 +114,15 @@
...
@@ -114,12 +114,15 @@
background
:
#F7F7F7
;
background
:
#F7F7F7
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
padding
:
16rpx
24rpx
;
padding
:
16rpx
24rpx
;
view
{
white-space
:
normal
;
white-space
:
normal
;
display
:
-
webkit-box
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
word-break
:
break-all
;
}
}
}
.box
.list_box
.list_item.active
{
.box
.list_box
.list_item.active
{
...
...
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.wxml
View file @
7ed36cd
...
@@ -69,7 +69,9 @@
...
@@ -69,7 +69,9 @@
</view>
</view>
<view class="list_box">
<view class="list_box">
<block wx:for="{{staffList}}" wx:key="index">
<block wx:for="{{staffList}}" wx:key="index">
<view class="list_item {{item.active?'active':''}}" bindtap="choose" data-index="{{index}}" data-multiple="true" data-list-name="staffList">{{item.userName}}</view>
<view class="list_item {{item.active?'active':''}}" bindtap="choose" data-index="{{index}}" data-multiple="true" data-list-name="staffList">
<view>{{item.userName}}</view>
</view>
</block>
</block>
</view>
</view>
</view>
</view>
...
...
pages/tab/outputValue/components/employees/employess.js
0 → 100644
View file @
7ed36cd
// pages/tab/outputValue/components/employees/employess.js
const
IMAGES
=
Object
.
freeze
({
userAvatarUrl
:
`/personal/userAvatarUrl.png`
})
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
IMAGES
,
dataList
:
[{
staffRoleName
:
'技师'
,
staffName
:
'张三'
,
staffUUID
:
1
,
totalOutputValue
:
185041
,
commissionFlag
:
false
,
outputValueType
:
1
,
outputValueStats
:
[
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A明明崇文4s店A明明崇文4s店A明明崇文4s店A'
,
totalOrderMoney
:
15
,
customerUnitPrice
:
2000.01
,
orderCount
:
20
},
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A'
,
totalOrderMoney
:
15
,
customerUnitPrice
:
2000.01
,
orderCount
:
20
},
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A'
,
totalOrderMoney
:
15
,
customerUnitPrice
:
2000.01
,
orderCount
:
20
},
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A'
,
totalOrderMoney
:
10
,
customerUnitPrice
:
2000.01
,
orderCount
:
15
}
]
},
{
staffRoleName
:
'驻店员工'
,
staffName
:
'李四'
,
staffUUID
:
1
,
totalOutputValue
:
185041
,
commissionFlag
:
true
,
outputValueType
:
2
,
constructionStats
:
[
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A'
,
upgradeConstructionCount
:
15
,
notUpgradeConstructionCount
:
20
,
upgradeIncentiveFee
:
40
},
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A'
,
upgradeConstructionCount
:
15
,
notUpgradeConstructionCount
:
20
,
upgradeIncentiveFee
:
40
},
{
shopMerchantId
:
123123
,
shopMerchantName
:
'明明崇文4s店A'
,
upgradeConstructionCount
:
15
,
notUpgradeConstructionCount
:
20
,
upgradeIncentiveFee
:
40
}
]
}],
commissionPopup
:
false
,
handleCommissionObj
:
{}
},
/**
* 组件的方法列表
*/
methods
:
{
handleCommissionPopup
(
e
)
{
let
{
target
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
commissionPopup
:
!
this
.
data
.
commissionPopup
,
handleCommissionObj
:
target
})
},
showMore
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
let
params
=
`dataList[
${
index
}
].showMore`
this
.
setData
({
[
params
]:
true
})
}
}
})
pages/tab/outputValue/components/employees/employess.json
0 → 100644
View file @
7ed36cd
{
"component"
:
true
,
"usingComponents"
:
{
"commissionPopup"
:
"../CommissionPopup/CommissionPopup"
}
}
\ No newline at end of file
\ No newline at end of file
pages/tab/outputValue/components/employees/employess.scss
0 → 100644
View file @
7ed36cd
/* pages/tab/outputValue/components/employees/employess.wxss */
.list
{
padding
:
0
16rpx
;
width
:
100%
;
box-sizing
:
border-box
;
.empty_box
{
width
:
100%
;
height
:
24rpx
;
box-sizing
:
border-box
;
background
:
transparent
;
}
.list_item
{
box-sizing
:
border-box
;
width
:
100%
;
background
:
#FFFFFF
;
box-shadow
:
0
2rpx
2rpx
0
#b4bacc
52
;
border-radius
:
16rpx
;
padding
:
40rpx
0
24rpx
24rpx
;
margin
:
0
24rpx
24rpx
0
;
.staff_messsage
{
padding-right
:
26rpx
;
.flex_spa-be
{
display
:
flex
;
justify-content
:
space-between
;
.flex
{
display
:
flex
;
align-items
:
flex-start
;
.headPortrait
{
width
:
52rpx
;
height
:
52rpx
;
margin-right
:
12rpx
;
}
.name
{
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#333333
;
}
.role_name
{
margin
:
6rpx
0
0
8rpx
;
font-size
:
20rpx
;
color
:
#8A8C90
;
}
}
.output_text
text
{
color
:
#4772FC
;
font-size
:
36rpx
;
font-weight
:
700
;
}
.merchant_num
{
margin-left
:
64rpx
;
}
.commission
{
font-size
:
24rpx
;
color
:
#323436
;
.disabled
{
color
:
#B6B7B7
;
}
.flex
{
display
:
flex
;
align-items
:
center
;
}
.arrow
{
position
:
relative
;
display
:
inline-block
;
margin-left
:
12rpx
;
margin-bottom
:
6rpx
;
}
.
arrow
:
:
before
{
content
:
""
;
display
:
inline-block
;
border-top
:
2rpx
solid
#323436
;
border-right
:
2rpx
solid
#323436
;
width
:
8rpx
;
height
:
8rpx
;
transform
:
rotate
(
45deg
);
}
}
}
}
.line
{
width
:
calc
(
100%
+
48rpx
);
height
:
1rpx
;
background
:
#E4E6EE
;
margin
:
40rpx
-24rpx
0
;
}
.merchant_box
{
padding-top
:
24rpx
;
.title
{
font-size
:
24rpx
;
color
:
#8A8C90
;
}
.flex_spa-arr
{
display
:
flex
;
gap
:
20rpx
;
justify-content
:
space-around
;
.flex_1
{
flex
:
1
;
}
.flex_2
{
flex
:
2
;
}
.flex_3
{
flex
:
3
;
}
.font_wei
{
font-size
:
28rpx
;
font-weight
:
600
;
color
:
#323436
;
}
.padd_r16
{
padding-right
:
16rpx
;
}
.name
{
font-size
:
26rpx
;
color
:
#323436
;
display
:
-
webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
.merchant_item
{
padding
:
32rpx
0
;
border-bottom
:
2rpx
solid
#E4E6EE
;
}
.merchant_item
:last-child
{
border
:
none
;
padding-bottom
:
8rpx
;
}
.showMore
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
image
{
width
:
92rpx
;
height
:
36rpx
;
}
}
}
}
}
.end-txt
{
font-size
:
24rpx
;
text-align
:
center
;
color
:
#CCCED1
;
padding-bottom
:
60rpx
;
}
\ No newline at end of file
\ No newline at end of file
pages/tab/outputValue/components/employees/employess.wxml
0 → 100644
View file @
7ed36cd
<!--pages/tab/outputValue/components/employees/employess.wxml-->
<scroll-view scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
data-type="message"
refresher-triggered="{{triggered}}">
<view class="empty_box"></view>
<block wx:for="{{dataList}}" wx:key="index">
<view class="list_item">
<view class="staff_messsage">
<view class="flex_spa-be">
<view class="flex">
<glsx-image class="headPortrait" src="{{item.userAvatarUrl||IMAGES.userAvatarUrl}}" webp></glsx-image>
<view class="name">{{item.staffName}}</view>
<view class="role_name">「{{item.staffRoleName}}」</view>
</view>
<view class="output_text"><text style="font-size: 24rpx;">¥</text><text>{{item.totalOutputValue}}</text></view>
</view>
<view class="flex_spa-be">
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
<view class="commission">
<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>
</view>
</view>
<view class="line"></view>
<view class="merchant_box">
<!-- 驻店员工 -->
<block wx:if="{{item.outputValueType == 1}}">
<view class="title flex_spa-arr">
<view class="flex_2">服务门店</view>
<view class="flex_1">产值/客单价</view>
<view class="flex_1 padd_r16">订单/转化率</view>
</view>
<block wx:for="{{item.outputValueStats}}" wx:for-index="subIndex" wx:for-item="subItem" wx:key="subIndex">
<view class="merchant_item flex_spa-arr" style="{{item.outputValueStats.length > 3 && !item.showMore && subIndex == 2 ? 'border:none;' : ''}}" wx:if="{{subIndex < 3 || item.showMore}}">
<view class="flex_2 name">{{subItem.shopMerchantName}}</view>
<view class="flex_1">
<view class="font_wei">{{'¥' + subItem.totalOrderMoney}}</view>
<view>{{'¥' + subItem.customerUnitPrice}}</view>
</view>
<view class="flex_1 padd_r16">
<view class="font_wei">{{subItem.orderCount}}单</view>
<view>{{subItem.orderCount}}%</view>
</view>
</view>
<view class="showMore" wx:if="{{subIndex >= 3 && subIndex === (item.outputValueStats.length - 1) && !item.showMore}}" bindtap="showMore" data-index="{{index}}">
<glsx-image src="output/show_more_icon.png" webp></glsx-image>
</view>
</block>
</block>
<!-- 技师 -->
<block wx:if="{{item.outputValueType == 2}}">
<view class="title flex_spa-arr" >
<view class="flex_3">服务门店</view>
<view class="flex_2">订单台次</view>
<view class="flex_1 padd_r16">激励费</view>
</view>
<block wx:for="{{item.constructionStats}}" wx:for-index="subIndex" wx:for-item="subItem" wx:key="subIndex">
<view class="merchant_item flex_spa-arr" style="{{item.constructionStats.length > 3 && !item.showMore && subIndex == 2 ? 'border:none;' : ''}}" wx:if="{{subIndex < 3 || item.showMore}}">
<view class="flex_3 name">{{subItem.shopMerchantName}}</view>
<view class="flex_2">
<view class="font_wei">升级膜{{subItem.upgradeConstructionCount || '-'}}台/次</view>
<view>赠送膜{{subItem.notUpgradeConstructionCount || '-'}}台/次</view>
</view>
<view class="flex_1 padd_r16">
<view class="font_wei" wx:if="{{subItem.upgradeIncentiveFee}}">¥{{subItem.upgradeIncentiveFee}}X{{subItem.upgradeConstructionCount}}</view>
<view class="font_wei" wx:if="{{!subItem.upgradeIncentiveFee}}">-</view>
<view wx:if="{{subItem.notUpgradeIncentiveFee}}">¥{{subItem.notUpgradeIncentiveFee}}X{{subItem.notUpgradeConstructionCount}}</view>
<view wx:if="{{!subItem.notUpgradeIncentiveFee}}">-</view>
</view>
</view>
<view class="showMore" wx:if="{{subIndex >= 3 && subIndex === (item.constructionStats.length - 1) && !item.showMore}}" bindtap="showMore" data-index="{{index}}">
<glsx-image src="output/show_more_icon.png" webp></glsx-image>
</view>
</block>
</block>
</view>
</view>
</block>
<view wx:if="{{!dataList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" />
</view>
<view wx:else class="end-txt">
<view>到底啦~</view>
</view>
</scroll-view>
<commissionPopup wx:if="commissionPopup" popShow="{{commissionPopup}}" bind:hidePopup="handleCommissionPopup" handleCommissionObj="{{handleCommissionObj}}"/>
pages/tab/outputValue/index.wxs
View file @
7ed36cd
...
@@ -46,11 +46,15 @@ var threeNumForTwo = {
...
@@ -46,11 +46,15 @@ var threeNumForTwo = {
}
}
}
}
var getMonth = function (n) {
if (n) return n.split('-').length && Number(n.split('-')[1])
}
/*
/*
* 导出
* 导出
*/
*/
module.exports = {
module.exports = {
setPrice: setPrice,
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands, //暴露接口调用
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
getMonth: getMonth
}
}
pages/tab/outputValue/outputValue.json
View file @
7ed36cd
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
"navigation-bar"
:
"../../../components/NavigationBar/NavigationBar"
,
"navigation-bar"
:
"../../../components/NavigationBar/NavigationBar"
,
"tab"
:
"./components/Tab/Tab"
,
"tab"
:
"./components/Tab/Tab"
,
"screen-box"
:
"./components/ScreenBox/ScreenBox"
,
"screen-box"
:
"./components/ScreenBox/ScreenBox"
,
"merchant"
:
"./components/merchant/merchant"
"merchant"
:
"./components/merchant/merchant"
,
"employess"
:
"./components/employees/employess"
},
},
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
pages/tab/outputValue/outputValue.wxml
View file @
7ed36cd
...
@@ -22,4 +22,7 @@
...
@@ -22,4 +22,7 @@
<!-- <view class="comCom" hidden="{{tabIndx != 1}}">
<!-- <view class="comCom" hidden="{{tabIndx != 1}}">
<staff id="staff" />
<staff id="staff" />
</view> -->
</view> -->
<view class="comCom" hidden="{{tabIndx != 1}}">
<employess id="employess"/>
</view>
</view>
</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