Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-shop
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 800d5780
authored
Aug 30, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
test
1 parent
f1b42463
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1508 additions
and
27 deletions
src/views/performanceManage copy/components/residentCorrectionDialog.vue
src/views/performanceManage copy/components/residentDetailDialog.vue
src/views/performanceManage copy/components/residentPerformance.vue
src/views/performanceManage copy/components/technicianCorrectionDialog.vue
src/views/performanceManage copy/components/technicianDetailDialog.vue
src/views/performanceManage copy/components/technicianPerformance.vue
src/views/performanceManage copy/index.vue
src/views/performanceManage/index.vue
src/views/performanceManage copy/components/residentCorrectionDialog.vue
0 → 100644
View file @
800d578
<!-- 驻店绩效-校正弹窗 -->
<
template
>
<GLDialog
title=
"校正"
mode=
"mid"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
v-loading=
"loading"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
<div>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:labelWidth=
"defaultLabelWidth"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
</glsx-combi-form>
</div>
</GLDialog>
</
template
>
<
script
>
import
{
limitPrice
}
from
'@/common/format'
export
default
{
name
:
'ResidentCorrectionDialog'
,
data
()
{
return
{
editChildRef
:
'editChildRef'
,
editForm
:
{
customerUnitPrice
:
''
,
successRate
:
''
,
otherExpenses
:
''
,
},
oldVal
:
{
customerUnitPrice
:
''
,
successRate
:
''
,
otherExpenses
:
''
,
},
editRule
:
{
customerUnitPrice
:
[{
required
:
true
,
message
:
'请输入当月平均客单价'
,
trigger
:
'change'
}],
successRate
:
[{
required
:
true
,
message
:
'请输入当月成交率'
,
trigger
:
'change'
}],
otherExpenses
:
[{
required
:
true
,
message
:
'请输入其他费用'
,
trigger
:
'change'
}],
},
editFormData
:
[
{
label
:
'当月平均客单价/元'
,
name
:
'customerUnitPrice'
,
type
:
'input'
,
width
:
'432px'
,
inputFn
:
(
value
,
item
)
=>
{
this
.
handleCustomerUnitPrice
(
value
)
}
},
{
label
:
'当月成交率/%'
,
name
:
'successRate'
,
type
:
'input'
,
width
:
'432px'
,
inputFn
:
(
value
,
item
)
=>
{
this
.
handleSuccessRatee
(
value
)
}
},
{
label
:
'其他费用/元'
,
name
:
'otherExpenses'
,
type
:
'input'
,
width
:
'432px'
,
inputFn
:
(
value
,
item
)
=>
{
this
.
handleOtherExpenses
(
value
)
}
},
],
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
recordInfo
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
methods
:
{
handleCustomerUnitPrice
(
newVal
)
{
this
.
editForm
.
customerUnitPrice
=
limitPrice
(
newVal
,
this
.
oldVal
.
customerUnitPrice
,
9
,
2
,
0
,
999999
)
this
.
oldVal
.
customerUnitPrice
=
this
.
editForm
.
customerUnitPrice
},
handleSuccessRatee
(
newVal
)
{
this
.
editForm
.
successRate
=
limitPrice
(
newVal
,
this
.
oldVal
.
successRate
,
6
,
2
,
0
,
100
)
this
.
oldVal
.
successRate
=
this
.
editForm
.
successRate
},
handleOtherExpenses
(
newVal
)
{
this
.
editForm
.
otherExpenses
=
limitPrice
(
newVal
,
this
.
oldVal
.
otherExpenses
,
10
,
2
,
-
999999
,
999999
,
'burdenNumReg'
)
this
.
oldVal
.
otherExpenses
=
this
.
editForm
.
otherExpenses
},
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
params
.
id
=
this
.
recordInfo
.
id
console
.
log
(
params
);
this
.
$apis
.
performanceManage
.
correctApi
(
params
)
.
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
title
:
res
.
message
||
'操作成功'
})
this
.
handleClose
()
})
}
})
},
handleClose
()
{
this
.
$emit
(
'handleClose'
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/performanceManage copy/components/residentDetailDialog.vue
0 → 100644
View file @
800d578
<!-- 驻店绩效-查看明细弹窗 -->
<
template
>
<GLDialog
class=
"apply-store"
bigTitle=
"查看明细"
mode=
"big"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
v-loading=
"loading"
:hasFooter=
"false"
>
<div>
<slot
name=
"search"
></slot>
<GLTable
ref=
"storeRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"tb-ellipsis"
slot=
"customerName"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
popper-class=
"base-popper"
trigger=
"hover"
:content=
"scope.scope.customerName"
>
<span
slot=
"reference"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'ResidentDetailDialog'
,
data
()
{
return
{
// 表格组件
userInfo
:
{},
tableSearchForm
:
{},
url
:
url
,
getListApi
:
this
.
$apis
.
performanceManage
.
getDetailApi
,
// 表格参数
tableParams
:
{
listName
:
'list'
,
tableColumns
:
[
{
label
:
'订单编码'
,
prop
:
'orderCode'
,
width
:
180
},
{
label
:
'支付时间'
,
prop
:
'orderTime'
,
width
:
'180px'
,
formatter
:
cellValue
=>
{
return
cellValue
.
orderTime
?
dayjs
(
cellValue
.
orderTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
,
minWidth
:
120
},
{
label
:
'客户手机号'
,
prop
:
'customerPhone'
,
width
:
130
},
{
label
:
'订单产值'
,
prop
:
'orderMoney'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
orderMoney
||
cellValue
.
orderMoney
==
0
?
cellValue
.
orderMoney
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'提成奖励'
,
prop
:
'commissionBonus'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
commissionBonus
||
cellValue
.
commissionBonus
==
0
?
cellValue
.
commissionBonus
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'高客单奖励'
,
prop
:
'highCustomerUnitBonus'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
highCustomerUnitBonus
||
cellValue
.
highCustomerUnitBonus
==
0
?
cellValue
.
highCustomerUnitBonus
.
toFixed
(
2
)
:
'-'
}
},
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
searchForm
:
{
type
:
Object
,
default
:
()
=>
{
}
},
recordInfo
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
// this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
// this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
this
.
tableSearchForm
.
id
=
this
.
recordInfo
.
id
resolve
()
})
},
handleClose
()
{
this
.
$emit
(
'handleClose'
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/performanceManage copy/components/residentPerformance.vue
0 → 100644
View file @
800d578
<
template
>
<div
class=
"shop"
>
<template>
<el-alert
title=
"每月最后一天24:00按当月业务完成情况自动计算员工绩效。"
show-icon
class=
"tip-cla"
>
</el-alert>
</
template
>
<div
class=
"container"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<div
slot=
"performanceMonth"
>
<el-date-picker
v-model=
"searchForm.performanceMonth"
type=
"month"
placeholder=
"选择月"
value-format=
"yyyy-MM"
format=
"yyyy-MM"
clearable
:picker-options=
"pickerOption"
></el-date-picker>
</div>
</GLCombiForm>
<div
class=
"table-header"
>
<h2>
驻店绩效列表
</h2>
<div>
<el-button
size=
"small"
@
click=
"exportExcel_summary"
plain
>
导出汇总表
</el-button>
<el-button
size=
"small"
@
click=
"exportExcel_detail"
>
导出明细
</el-button>
<el-button
size=
"small"
@
click=
"batchDistribute"
>
批量下发
</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"residentRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"tb-ellipsis"
slot=
"yqMerchantName"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
popper-class=
"base-popper"
trigger=
"hover"
:content=
"scope.scope.yqMerchantName"
>
<span
slot=
"reference"
>
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
<div
slot=
"applyStatus"
slot-scope=
"scope"
class=
"flex"
>
<div
:class=
"['dot', statusClass[scope.scope.status]]"
></div>
{{ reviewStatusObj[scope.scope.status] }}
</div>
<!-- <div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div> -->
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.scope.status == 0"
@
click=
"handleCorrection(scope.scope)"
>
校正
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 0"
@
click=
"distribute(scope.scope)"
>
下发
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看明细
</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<ResidentDetailDialog
v-if=
"isResidentVisible"
:isVisible=
"isResidentVisible"
:recordInfo=
"recordInfo"
@
handleClose=
"handleDetail"
></ResidentDetailDialog>
<ResidentCorrectionDialog
v-if=
"isCorrectionVisible"
:isVisible=
"isCorrectionVisible"
:recordInfo=
"recordInfo"
@
handleClose=
"handleCorrectionClose"
></ResidentCorrectionDialog>
</div>
</template>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
downLoadFile
}
from
'@/common/util'
import
ResidentDetailDialog
from
'./residentDetailDialog.vue'
import
ResidentCorrectionDialog
from
'./residentCorrectionDialog.vue'
export
default
{
name
:
'ResidentPerformance'
,
data
()
{
return
{
size
:
'small'
,
url
:
url
,
userInfo
:
{},
searchForm
:
{
performanceMonth
:
''
,
staffName
:
''
,
staffPhone
:
''
,
yqMerchantId
:
''
,
status
:
''
,
staffType
:
0
//员工类型(0:驻店,1:技师)
},
tableSearchForm
:
{},
showFormData
:
[
{
label
:
'绩效月份'
,
prop
:
'performanceMonth'
,
addHtml
:
'performanceMonth'
,
},
{
label
:
'员工姓名'
,
name
:
'staffName'
,
type
:
'input'
,
isClear
:
true
,
maxlength
:
20
},
{
label
:
'员工手机号'
,
name
:
'staffPhone'
,
type
:
'input'
,
inputType
:
"number"
,
isClear
:
true
,
maxlength
:
'11'
},
{
label
:
'所属服务中心'
,
name
:
'yqMerchantId'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'yqMerchantId'
,
optionLabel
:
'yqMerchantName'
,
optionsName
:
'merchantList'
},
{
label
:
'状态'
,
name
:
'status'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'statusList'
}
],
// tableButtonList: [
// {
// type: 'GLButton',
// name: '校正',
// attrs: {
// type: 'text',
// fn: '校正'
// },
// listeners: {
// click: row => this.handleCorrection('edit', row)
// }
// },
// {
// type: 'GLButton',
// name: '下发',
// attrs: {
// type: 'text',
// fn: '下发'
// },
// listeners: {
// click: row => this.distribute(row)
// }
// },
// {
// type: 'GLButton',
// name: '邀请',
// attrs: {
// type: 'text',
// fn: '邀请'
// },
// listeners: {
// click: row => this.handleInvite(row)
// }
// }
// ],
pickerOption
:
{
disabledDate
(
date
)
{
if
(
date
>
new
Date
())
{
return
true
}
return
false
}
},
// 表格
getListApi
:
this
.
$apis
.
performanceManage
.
getListApi
,
tableParams
:
{
listName
:
'list'
,
mutiSelectUniqueKey
:
'id'
,
mutiSelectName
:
'residentPerformance'
,
checkSelectable
:
row
=>
{
return
row
.
status
==
0
},
tableOption
:
true
,
tableColumns
:
[
{
label
:
'员工姓名'
,
prop
:
'staffName'
,
width
:
130
,
line
:
1
},
{
label
:
'员工手机号'
,
prop
:
'staffPhone'
,
width
:
130
},
{
label
:
'所属服务中心'
,
prop
:
'yqMerchantName'
,
addHtml
:
'yqMerchantName'
,
minWidth
:
120
},
{
label
:
'当月平均客单价'
,
prop
:
'customerUnitPrice'
,
width
:
130
,
formatter
:
cellValue
=>
{
return
cellValue
.
customerUnitPrice
||
cellValue
.
customerUnitPrice
==
0
?
cellValue
.
customerUnitPrice
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'当月成交率'
,
prop
:
'successRate'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
successRate
||
cellValue
.
successRate
==
0
?
cellValue
.
successRate
+
'%'
:
'-'
}
},
{
label
:
'基本工资'
,
prop
:
'basicWage'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
basicWage
||
cellValue
.
basicWage
==
0
?
cellValue
.
basicWage
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'保底工资'
,
prop
:
'minimumWage'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
minimumWage
||
cellValue
.
minimumWage
==
0
?
cellValue
.
minimumWage
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'提成奖励'
,
prop
:
'commissionBonus'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
commissionBonus
||
cellValue
.
commissionBonus
==
0
?
cellValue
.
commissionBonus
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'高客单奖励'
,
prop
:
'highCustomerUnitBonus'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
highCustomerUnitBonus
||
cellValue
.
highCustomerUnitBonus
==
0
?
cellValue
.
highCustomerUnitBonus
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'成交率奖励'
,
prop
:
'successRateBonus'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
successRateBonus
||
cellValue
.
successRateBonus
==
0
?
cellValue
.
successRateBonus
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'其他费用'
,
prop
:
'otherExpenses'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
otherExpenses
||
cellValue
.
otherExpenses
==
0
?
cellValue
.
otherExpenses
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'最终工资'
,
prop
:
'finalWage'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
finalWage
||
cellValue
.
finalWage
==
0
?
cellValue
.
finalWage
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'状态'
,
prop
:
'status'
,
width
:
'100px'
,
addHtml
:
'applyStatus'
},
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
statusClass
:
{
0
:
'grey'
,
1
:
'green'
},
reviewStatusObj
:
{
0
:
'未下发'
,
1
:
'已下发'
},
isResidentVisible
:
false
,
isCorrectionVisible
:
false
,
recordInfo
:
{},
// 基本数据
baseData
:
{
merchantList
:
[],
statusList
:
[{
confId
:
0
,
confName
:
'未下发'
},
{
confId
:
1
,
confName
:
'已下发'
}]
},
setMonthFlag
:
false
,
//第一次进入页面时设置绩效月份参数值
}
},
components
:
{
ResidentDetailDialog
,
ResidentCorrectionDialog
},
mounted
()
{
this
.
userInfo
=
this
.
$globalState
.
session
// this.getLastMonth()
this
.
getServiceCenterList
()
},
methods
:
{
getLastMonth
()
{
// 获取上个月日期
var
date
=
new
Date
;
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
();
if
(
month
==
0
)
{
year
=
year
-
1
;
month
=
12
;
}
month
=
month
>
10
?
month
:
"0"
+
month
this
.
searchForm
.
performanceMonth
=
year
.
toString
()
+
'-'
+
month
;
},
getServiceCenterList
()
{
const
params
=
{
partnerMerchantId
:
this
.
userInfo
.
merchantId
}
this
.
$apis
.
customer
.
getServiceCenterList
(
params
).
then
(
res
=>
{
this
.
baseData
.
merchantList
=
res
this
.
$utils
.
getOptionsList
(
this
,
'showFormData'
)
})
},
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
if
(
!
this
.
setMonthFlag
)
{
//进入页面时设置绩效月份参数值
this
.
getLastMonth
()
}
this
.
tableSearchForm
=
this
.
getParams
()
this
.
setMonthFlag
=
true
resolve
()
})
},
handleSearch
()
{
this
.
$refs
.
residentRef
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
performanceMonth
:
''
,
staffName
:
''
,
staffPhone
:
''
,
yqMerchantId
:
''
,
status
:
''
,
staffType
:
0
}
this
.
handleSearch
()
},
handleDetail
(
row
)
{
this
.
recordInfo
=
row
?
row
:
{}
this
.
isResidentVisible
=
!
this
.
isResidentVisible
},
handleCorrection
(
row
)
{
this
.
recordInfo
=
row
?
row
:
{}
this
.
isCorrectionVisible
=
!
this
.
isCorrectionVisible
},
handleCorrectionClose
()
{
this
.
isCorrectionVisible
=
!
this
.
isCorrectionVisible
this
.
$refs
.
residentRef
.
refreshTable
()
},
// 下发操作
distribute
(
row
)
{
var
selectedData
=
[]
selectedData
.
push
(
row
)
this
.
distribute_commit
(
selectedData
)
},
// 批量下发
batchDistribute
()
{
var
selectedData
=
[]
if
(
this
.
$refs
.
residentRef
.
mutiSelectArr
.
residentPerformance
)
{
selectedData
=
this
.
$refs
.
residentRef
.
mutiSelectArr
.
residentPerformance
}
this
.
distribute_commit
(
selectedData
)
},
distribute_commit
(
selectedData
)
{
if
(
!
selectedData
?.
length
)
{
this
.
$message
({
message
:
"请选择需要下发的记录"
,
type
:
"warning"
,
showClose
:
true
})
return
false
}
var
idList
=
selectedData
.
map
((
item
)
=>
{
return
item
.
id
})
this
.
$confirm
(
'<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> '
,
'提示'
,
{
dangerouslyUseHTMLString
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$apis
.
performanceManage
.
batchIssueApi
({
idList
:
idList
}).
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
title
:
res
.
message
||
'操作成功'
})
this
.
$refs
.
residentRef
.
refreshTable
()
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
exportExcel_summary
()
{
var
params
=
this
.
getParams
()
this
.
$apis
.
performanceManage
.
exportSummaryApi
(
params
).
then
(
res
=>
{
downLoadFile
(
res
)
})
},
exportExcel_detail
()
{
var
params
=
this
.
getParams
()
this
.
$apis
.
performanceManage
.
exportDetailApi
(
params
).
then
(
res
=>
{
downLoadFile
(
res
)
})
},
}
}
</
script
>
<
style
scoped
>
.tip-cla
{
margin
:
16px
0
16px
0
;
width
:
1184px
;
height
:
40px
;
background
:
#e4e3ff
;
border-radius
:
4px
;
}
.flex
{
display
:
flex
;
align-items
:
center
;
}
.dot
{
width
:
6px
;
height
:
6px
;
background
:
#5850ff
;
border-radius
:
4px
;
margin-right
:
6px
;
}
.green
{
background
:
#4aca74
;
}
.red
{
background
:
#eb4e4e
;
}
.grey
{
background
:
#999999
;
}
</
style
>
src/views/performanceManage copy/components/technicianCorrectionDialog.vue
0 → 100644
View file @
800d578
<!-- 技师绩效-校正弹窗 -->
<
template
>
<GLDialog
title=
"校正"
mode=
"mid"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
v-loading=
"loading"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
<div>
<glsx-combi-form
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:labelWidth=
"defaultLabelWidth"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
</glsx-combi-form>
</div>
</GLDialog>
</
template
>
<
script
>
import
{
limitPrice
}
from
'@/common/format'
export
default
{
name
:
'TechnicianCorrectionDialog'
,
data
()
{
return
{
editChildRef
:
'editChildRef'
,
editForm
:
{
otherExpenses
:
''
,
},
oldVal
:
{
otherExpenses
:
''
,
},
editRule
:
{
otherExpenses
:
[{
required
:
true
,
message
:
'请输入其他费用'
,
trigger
:
'change'
}],
},
editFormData
:
[
{
label
:
'其他费用/元'
,
name
:
'otherExpenses'
,
type
:
'input'
,
width
:
'432px'
,
inputFn
:
(
value
,
item
)
=>
{
this
.
handleOtherExpenses
(
value
)
}
},
],
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
recordInfo
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
methods
:
{
handleOtherExpenses
(
newVal
)
{
this
.
editForm
.
otherExpenses
=
limitPrice
(
newVal
,
this
.
oldVal
.
otherExpenses
,
10
,
2
,
-
999999
,
999999
,
'burdenNumReg'
)
this
.
oldVal
.
otherExpenses
=
this
.
editForm
.
otherExpenses
},
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
params
.
id
=
this
.
recordInfo
.
id
console
.
log
(
params
);
this
.
$apis
.
performanceManage
.
correctApi
(
params
)
.
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
title
:
res
.
message
||
'操作成功'
})
this
.
handleClose
()
})
}
})
},
handleClose
()
{
this
.
$emit
(
'handleClose'
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/performanceManage copy/components/technicianDetailDialog.vue
0 → 100644
View file @
800d578
<!-- 技师绩效-查看明细弹窗 -->
<
template
>
<GLDialog
class=
"apply-store"
bigTitle=
"查看明细"
mode=
"big"
:visible
.
sync=
"isVisible"
:before-close=
"handleClose"
v-loading=
"loading"
:hasFooter=
"false"
>
<div>
<slot
name=
"search"
></slot>
<GLTable
ref=
"storeRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"tb-ellipsis"
slot=
"customerName"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
popper-class=
"base-popper"
trigger=
"hover"
:content=
"scope.scope.customerName"
>
<span
slot=
"reference"
>
{{
scope
.
scope
.
customerName
}}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'TechnicianDetailDialog'
,
data
()
{
return
{
// 表格组件
userInfo
:
{},
tableSearchForm
:
{},
url
:
url
,
getListApi
:
this
.
$apis
.
performanceManage
.
getDetailApi
,
// 表格参数
tableParams
:
{
listName
:
'list'
,
tableColumns
:
[
{
label
:
'订单编码'
,
prop
:
'orderCode'
,
width
:
180
},
{
label
:
'订单类型'
,
prop
:
'upgradeFlag'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
this
.
baseData
.
upgradeFlagList
.
find
((
item
)
=>
item
.
confId
===
cellValue
.
upgradeFlag
).
confName
||
"-"
}
},
{
label
:
'支付时间'
,
prop
:
'orderTime'
,
width
:
'180px'
,
formatter
:
cellValue
=>
{
return
cellValue
.
orderTime
?
dayjs
(
cellValue
.
orderTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
'--'
}
},
{
label
:
'客户名称'
,
prop
:
'customerName'
,
addHtml
:
'customerName'
,
minWidth
:
120
},
{
label
:
'客户手机号'
,
prop
:
'customerPhone'
,
width
:
130
},
{
label
:
'订单产值'
,
prop
:
'orderMoney'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
orderMoney
||
cellValue
.
orderMoney
==
0
?
cellValue
.
orderMoney
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'施工奖励'
,
prop
:
'constructionBonus'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
constructionBonus
||
cellValue
.
constructionBonus
==
0
?
cellValue
.
constructionBonus
.
toFixed
(
2
)
:
'-'
}
}
],
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
// 基本数据
baseData
:
{
upgradeFlagList
:
[{
confId
:
'Y'
,
confName
:
'升级'
},
{
confId
:
'N'
,
confName
:
'战败'
}]
},
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
searchForm
:
{
type
:
Object
,
default
:
()
=>
{
}
},
recordInfo
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
// this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
// this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
this
.
tableSearchForm
.
id
=
this
.
recordInfo
.
id
resolve
()
})
},
handleClose
()
{
this
.
$emit
(
'handleClose'
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/performanceManage copy/components/technicianPerformance.vue
0 → 100644
View file @
800d578
<
template
>
<div
class=
"shop"
>
<template>
<el-alert
title=
"每月最后一天24:00按当月业务完成情况自动计算员工绩效。"
show-icon
class=
"tip-cla"
>
</el-alert>
</
template
>
<div
class=
"container"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<div
slot=
"performanceMonth"
>
<el-date-picker
v-model=
"searchForm.performanceMonth"
type=
"month"
placeholder=
"选择月"
value-format=
"yyyy-MM"
format=
"yyyy-MM"
clearable
:picker-options=
"pickerOption"
></el-date-picker>
</div>
</GLCombiForm>
<div
class=
"table-header"
>
<h2>
技师绩效列表
</h2>
<div>
<el-button
size=
"small"
@
click=
"exportExcel_summary"
plain
>
导出汇总表
</el-button>
<el-button
size=
"small"
@
click=
"exportExcel_detail"
>
导出明细
</el-button>
<el-button
size=
"small"
@
click=
"batchDistribute"
>
批量下发
</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"residentRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"tb-ellipsis"
slot=
"yqMerchantName"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
popper-class=
"base-popper"
trigger=
"hover"
:content=
"scope.scope.yqMerchantName"
>
<span
slot=
"reference"
>
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
<div
slot=
"applyStatus"
slot-scope=
"scope"
class=
"flex"
>
<div
:class=
"['dot', statusClass[scope.scope.status]]"
></div>
{{ reviewStatusObj[scope.scope.status] }}
</div>
<!-- <div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div> -->
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.scope.status == 0"
@
click=
"handleCorrection(scope.scope)"
>
校正
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.status == 0"
@
click=
"distribute(scope.scope)"
>
下发
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
查看明细
</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<TechnicianDetailDialog
v-if=
"isTechnicianVisible"
:isVisible=
"isTechnicianVisible"
:recordInfo=
"recordInfo"
@
handleClose=
"handleDetail"
></TechnicianDetailDialog>
<TechnicianCorrectionDialog
v-if=
"isCorrectionVisible"
:isVisible=
"isCorrectionVisible"
:recordInfo=
"recordInfo"
@
handleClose=
"handleCorrectionClose"
></TechnicianCorrectionDialog>
</div>
</template>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
downLoadFile
}
from
'@/common/util'
import
TechnicianDetailDialog
from
'./technicianDetailDialog.vue'
import
TechnicianCorrectionDialog
from
'./technicianCorrectionDialog.vue'
export
default
{
name
:
'TechnicianPerformance'
,
data
()
{
return
{
size
:
'small'
,
url
:
url
,
userInfo
:
{},
searchForm
:
{
performanceMonth
:
''
,
staffName
:
''
,
staffPhone
:
''
,
yqMerchantId
:
''
,
status
:
''
,
staffType
:
1
//员工类型(0:驻店,1:技师)
},
tableSearchForm
:
{},
showFormData
:
[
{
label
:
'绩效月份'
,
prop
:
'performanceMonth'
,
addHtml
:
'performanceMonth'
,
},
{
label
:
'员工姓名'
,
name
:
'staffName'
,
type
:
'input'
,
isClear
:
true
,
maxlength
:
20
},
{
label
:
'员工手机号'
,
name
:
'staffPhone'
,
type
:
'input'
,
inputType
:
"number"
,
isClear
:
true
,
maxlength
:
'11'
},
{
label
:
'所属服务中心'
,
name
:
'yqMerchantId'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'yqMerchantId'
,
optionLabel
:
'yqMerchantName'
,
optionsName
:
'merchantList'
},
{
label
:
'状态'
,
name
:
'status'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'statusList'
}
],
pickerOption
:
{
disabledDate
(
date
)
{
if
(
date
>
new
Date
())
{
return
true
}
return
false
}
},
// 表格
getListApi
:
this
.
$apis
.
performanceManage
.
getListApi
,
tableParams
:
{
listName
:
'list'
,
mutiSelectUniqueKey
:
'id'
,
mutiSelectName
:
'technicianPerformance'
,
checkSelectable
:
row
=>
{
return
row
.
status
==
0
},
tableOption
:
true
,
tableColumns
:
[
{
label
:
'员工姓名'
,
prop
:
'staffName'
,
width
:
130
,
line
:
1
},
{
label
:
'员工手机号'
,
prop
:
'staffPhone'
,
width
:
130
},
{
label
:
'所属服务中心'
,
prop
:
'yqMerchantName'
,
addHtml
:
'yqMerchantName'
,
minWidth
:
120
},
{
label
:
'基本工资'
,
prop
:
'basicWage'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
basicWage
||
cellValue
.
basicWage
==
0
?
cellValue
.
basicWage
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'保底工资'
,
prop
:
'minimumWage'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
minimumWage
||
cellValue
.
minimumWage
==
0
?
cellValue
.
minimumWage
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'施工奖励'
,
prop
:
'constructionBonus'
,
width
:
120
,
formatter
:
cellValue
=>
{
return
cellValue
.
constructionBonus
||
cellValue
.
constructionBonus
==
0
?
cellValue
.
constructionBonus
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'其他费用'
,
prop
:
'otherExpenses'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
otherExpenses
||
cellValue
.
otherExpenses
==
0
?
cellValue
.
otherExpenses
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'最终工资'
,
prop
:
'finalWage'
,
width
:
100
,
formatter
:
cellValue
=>
{
return
cellValue
.
finalWage
||
cellValue
.
finalWage
==
0
?
cellValue
.
finalWage
.
toFixed
(
2
)
:
'-'
}
},
{
label
:
'状态'
,
prop
:
'status'
,
width
:
'100px'
,
addHtml
:
'applyStatus'
},
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'currentPage'
,
totalCount
:
'total'
},
statusClass
:
{
0
:
'grey'
,
1
:
'green'
},
reviewStatusObj
:
{
0
:
'未下发'
,
1
:
'已下发'
},
isTechnicianVisible
:
false
,
isCorrectionVisible
:
false
,
recordInfo
:
{},
// 基本数据
baseData
:
{
merchantList
:
[],
statusList
:
[{
confId
:
0
,
confName
:
'未下发'
},
{
confId
:
1
,
confName
:
'已下发'
}]
},
setMonthFlag
:
false
,
//第一次进入页面时设置绩效月份参数值
}
},
components
:
{
TechnicianDetailDialog
,
TechnicianCorrectionDialog
},
mounted
()
{
this
.
userInfo
=
this
.
$globalState
.
session
this
.
getServiceCenterList
()
},
methods
:
{
getLastMonth
()
{
// 获取上个月日期
var
date
=
new
Date
;
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
();
if
(
month
==
0
)
{
year
=
year
-
1
;
month
=
12
;
}
this
.
searchForm
.
performanceMonth
=
year
.
toString
()
+
'-'
+
month
;
},
getServiceCenterList
()
{
const
params
=
{
partnerMerchantId
:
this
.
userInfo
.
merchantId
}
this
.
$apis
.
customer
.
getServiceCenterList
(
params
).
then
(
res
=>
{
this
.
baseData
.
merchantList
=
res
this
.
$utils
.
getOptionsList
(
this
,
'showFormData'
)
})
},
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
if
(
!
this
.
setMonthFlag
)
{
//进入页面时设置绩效月份参数值
this
.
getLastMonth
()
}
this
.
tableSearchForm
=
this
.
getParams
()
this
.
setMonthFlag
=
true
resolve
()
})
},
handleSearch
()
{
this
.
$refs
.
residentRef
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
performanceMonth
:
''
,
staffName
:
''
,
staffPhone
:
''
,
yqMerchantId
:
''
,
status
:
''
,
staffType
:
1
}
this
.
handleSearch
()
},
handleDetail
(
row
)
{
this
.
recordInfo
=
row
?
row
:
{}
this
.
isTechnicianVisible
=
!
this
.
isTechnicianVisible
},
handleCorrection
(
row
)
{
this
.
recordInfo
=
row
?
row
:
{}
this
.
isCorrectionVisible
=
!
this
.
isCorrectionVisible
},
handleCorrectionClose
()
{
this
.
isCorrectionVisible
=
!
this
.
isCorrectionVisible
this
.
$refs
.
residentRef
.
refreshTable
()
},
// 下发操作
distribute
(
row
)
{
var
selectedData
=
[]
selectedData
.
push
(
row
)
this
.
distribute_commit
(
selectedData
)
},
// 批量下发
batchDistribute
()
{
var
selectedData
=
[]
if
(
this
.
$refs
.
residentRef
.
mutiSelectArr
.
technicianPerformance
)
{
selectedData
=
this
.
$refs
.
residentRef
.
mutiSelectArr
.
technicianPerformance
}
this
.
distribute_commit
(
selectedData
)
},
distribute_commit
(
selectedData
)
{
if
(
!
selectedData
?.
length
)
{
this
.
$message
({
message
:
"请选择需要下发的记录"
,
type
:
"warning"
,
showClose
:
true
})
return
false
}
var
idList
=
selectedData
.
map
((
item
)
=>
{
return
item
.
id
})
this
.
$confirm
(
'<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> '
,
'提示'
,
{
dangerouslyUseHTMLString
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$apis
.
performanceManage
.
batchIssueApi
({
idList
:
idList
}).
then
(
res
=>
{
this
.
$notify
({
type
:
'success'
,
title
:
res
.
message
||
'操作成功'
})
this
.
$refs
.
residentRef
.
refreshTable
()
})
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
exportExcel_summary
()
{
var
params
=
this
.
getParams
()
this
.
$apis
.
performanceManage
.
exportSummaryApi
(
params
).
then
(
res
=>
{
downLoadFile
(
res
)
})
},
exportExcel_detail
()
{
var
params
=
this
.
getParams
()
this
.
$apis
.
performanceManage
.
exportDetailApi
(
params
).
then
(
res
=>
{
downLoadFile
(
res
)
})
},
}
}
</
script
>
<
style
scoped
>
.tip-cla
{
margin
:
16px
0
16px
0
;
width
:
1184px
;
height
:
40px
;
background
:
#e4e3ff
;
border-radius
:
4px
;
}
.flex
{
display
:
flex
;
align-items
:
center
;
}
.dot
{
width
:
6px
;
height
:
6px
;
background
:
#5850ff
;
border-radius
:
4px
;
margin-right
:
6px
;
}
.green
{
background
:
#4aca74
;
}
.red
{
background
:
#eb4e4e
;
}
.grey
{
background
:
#999999
;
}
</
style
>
src/views/performanceManage copy/index.vue
0 → 100644
View file @
800d578
<
template
>
<div>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs>
<components
:is=
"tabName"
></components>
</div>
</
template
>
<
script
>
import
ResidentPerformance
from
"./components/residentPerformance.vue"
import
TechnicianPerformance
from
"./components/technicianPerformance.vue"
export
default
{
components
:
{
ResidentPerformance
,
TechnicianPerformance
},
data
()
{
return
{
activeName
:
"1"
,
tabPaneList
:
[
{
label
:
"驻店绩效"
,
name
:
"1"
},
{
label
:
"技师绩效"
,
name
:
"2"
}
],
tabName
:
"ResidentPerformance"
}
},
mounted
()
{
},
computed
:
{
},
watch
:
{
},
methods
:
{
handleClick
()
{
let
arr
=
{
1
:
"residentPerformance"
,
2
:
"technicianPerformance"
}
this
.
tabName
=
arr
[
+
this
.
activeName
]
console
.
log
(
this
.
tabName
);
},
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/performanceManage/index.vue
View file @
800d578
<
template
>
<div>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs
>
<
components
:is=
"tabName"
></components
>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs>
<!--
<components
:is=
"tabName"
></components>
-->
<ResidentPerformance
v-if=
"tabName == 'ResidentPerformance'"
></ResidentPerformance
>
<
TechnicianPerformance
v-if=
"tabName == 'TechnicianPerformance'"
></TechnicianPerformance
>
</div>
</
template
>
<
script
>
import
ResidentPerformance
from
"./components/residentPerformance.vue"
import
TechnicianPerformance
from
"./components/technicianPerformance.vue"
import
ResidentPerformance
from
'./components/residentPerformance.vue'
import
TechnicianPerformance
from
'./components/technicianPerformance.vue'
export
default
{
components
:
{
ResidentPerformance
,
...
...
@@ -16,40 +16,33 @@ export default {
},
data
()
{
return
{
activeName
:
"1"
,
activeName
:
'1'
,
tabPaneList
:
[
{
label
:
"驻店绩效"
,
name
:
"1"
label
:
'驻店绩效'
,
name
:
'1'
},
{
label
:
"技师绩效"
,
name
:
"2"
label
:
'技师绩效'
,
name
:
'2'
}
],
tabName
:
"ResidentPerformance"
tabName
:
'ResidentPerformance'
}
},
mounted
()
{
},
computed
:
{
},
watch
:
{
},
mounted
()
{
},
computed
:
{},
watch
:
{},
methods
:
{
handleClick
()
{
let
arr
=
{
1
:
"residentPerformance"
,
2
:
"technicianPerformance"
1
:
'residentPerformance'
,
2
:
'technicianPerformance'
}
this
.
tabName
=
arr
[
+
this
.
activeName
]
console
.
log
(
this
.
tabName
)
;
}
,
console
.
log
(
this
.
tabName
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
<
style
scoped
></
style
>
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