Commit a122efd3 by zhangxw

工资绩效管理 店面目标配置 页面开发

1 parent 71095f40
...@@ -72,3 +72,9 @@ export function getNoRelateStaffListApi(data) { ...@@ -72,3 +72,9 @@ export function getNoRelateStaffListApi(data) {
data.method = `${path}staff.mentorPerformanceConfig.listAvailableStudent` data.method = `${path}staff.mentorPerformanceConfig.listAvailableStudent`
return request(data, 'post') return request(data, 'post')
} }
// 根据园区店商户号获取不同场景下的4S店
export function getMerchantStoreApi(data) {
data.method = "dj.api.scenemerchantref.query4SRefByYqShop"
return request(data, "post")
}
import request from "./request"
// 获取店面目标列表
export function getStoreTargetListApi(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.ref.page'
return request(data, 'post')
}
// 获取员工任务列表
export function getStaffTaskListApi(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.ref.page'
return request(data, 'post')
}
// 获取员工任务详情
export function getStaffTaskDetailApi(data) {
data.method = 'dj.smartcarlife.api.yqPartnerMerchant.ref.page'
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
...@@ -319,6 +319,7 @@ export default { ...@@ -319,6 +319,7 @@ export default {
} }
this.total = res.total this.total = res.total
this.loading = false this.loading = false
this.$emit('setTableFinishFun', this.data)
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
......
...@@ -767,7 +767,7 @@ export const routerName = { ...@@ -767,7 +767,7 @@ export const routerName = {
path: "/staffManage", path: "/staffManage",
name: "staffManage", name: "staffManage",
meta: { meta: {
title: "商学院管理", title: "驻店工资绩效",
authId: "90621", authId: "90621",
parentId: "906", parentId: "906",
cache: false cache: false
...@@ -817,13 +817,13 @@ export const routerName = { ...@@ -817,13 +817,13 @@ export const routerName = {
{ {
authId: "9062105", authId: "9062105",
parentId: "90621", parentId: "90621",
label: "启用商学院", label: "启用工资绩效",
handle: "handleEnableOrDisable", handle: "handleEnableOrDisable",
ruleObj: { ruleObj: {
attr: "businessSchoolEnableFlag", attr: "businessSchoolEnableFlag",
rule: { rule: {
N: "启用商学院", 'N': "启用工资绩效",
Y: "禁用商学院" 'Y': "禁用工资绩效"
} }
} }
}, },
...@@ -910,5 +910,118 @@ export const routerName = { ...@@ -910,5 +910,118 @@ export const routerName = {
activePath: "/ruleReview" activePath: "/ruleReview"
}, },
component: _import("systemConfig/ruleReview/examineDetail") component: _import("systemConfig/ruleReview/examineDetail")
},
90625: {
path: '/inStoreGoalsConfig',
name: "inStoreGoalsConfig",
meta: {
title: "驻店目标配置",
authId: "90625",
parentId: "906",
cache: false
},
auth: [
{
authId: "9062501",
parentId: "90625",
label: "新增",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "90626",
name: "新增",
parentId: "90625"
}
]
},
{
authId: "9062502",
parentId: "90625",
label: "查看",
handle: "handleStoreView",
addRoutePath: [
{
authId: "90627",
name: "查看",
parentId: "90625"
}
]
},
{
authId: "9062503",
parentId: "90625",
label: "编辑",
handle: "handleStoreEdit",
addRoutePath: [
{
authId: "90626",
name: "编辑",
parentId: "90625"
}
]
},
{
authId: "9062504",
parentId: "90625",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9062505",
parentId: "90625",
label: "查看",
handle: "handleStaffView",
addRoutePath: [
{
authId: "90628",
name: "查看任务",
parentId: "90625"
}
]
}
],
component: _import("systemConfig/inStoreGoalsConfig/index")
},
90626: {
path: "/addInStoreConfig",
name: "addInStoreConfig",
meta: {
title: "新增",
authId: "90626",
parentId: "90625",
sideHidden: true,
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/addInStoreConfig")
},
// 查看店面目标配置
90627: {
path: "/inStoreConfigView",
name: "inStoreConfigView",
meta: {
title: "查看",
authId: "90627",
parentId: "90625",
sideHidden: true,
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/inStoreConfigView")
},
// 查看驻店员工任务
90628: {
path: "/employeeTasksView",
name: "employeeTasksView",
meta: {
title: "查看任务",
authId: "90628",
parentId: "90625",
sideHidden: true,
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/employeeTasksView")
} }
} }
<template> <template>
<d2-dialog :title="title" mode="mid" v-if="isVisible" :is-visible.sync="isVisible" width="750px" noCancel btn-ok-label="关闭" :before-close="handleClose" @confirmDialog="handleConfirm" @closeDialog="handleClose"> <d2-dialog :title="title" mode="mid" v-if="isVisible" :is-visible.sync="isVisible" width="750px" noCancel btn-ok-label="关闭" :before-close="handleClose" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<div class="explain-title">示例规则定义</div> <div class="explain-title">示例规则定义</div>
<d2-table v-if="diffExplain !== 'minimumWage'" :tableData="tableData" :table-params="tableParams" :hasPage="false"></d2-table> <div v-if="diffExplain == 'performanceConfig'">
<div v-else>开启保底工资,当员工的基本工资+绩效工资低于保底工资时,默认以保底工资作为最终工资</div> <div class="mb10">提成配置中,高产值,成交率以及均客单为联动配置,需请完整填写,无提成时填无,请将此三项全部填无。根据员工每月单店完成(升级订单) 的订单产值累计,匹配符合的奖励规则进行每单奖励计算。</div>
<template v-if="diffExplain !== 'minimumWage'"> <div v-for="(item, index) in commissionConfigArr" :key="index">
<div>{{ item.title }}</div>
<d2-table :tableData="item.tableData" :table-params="item.tableParams" :hasPage="false"></d2-table>
</div>
</div>
<d2-table v-else :tableData="tableData" :table-params="tableParams" :hasPage="false"></d2-table>
<template>
<div class="explain-title mt20">示例业务场景</div> <div class="explain-title mt20">示例业务场景</div>
<div class="business-info" v-html="infoHtml"></div> <div class="business-info" v-html="infoHtml"></div>
</template> </template>
...@@ -11,6 +17,7 @@ ...@@ -11,6 +17,7 @@
</template> </template>
<script> <script>
import { deepClone } from '@/common/util'
export default { export default {
data() { data() {
return { return {
...@@ -25,12 +32,28 @@ export default { ...@@ -25,12 +32,28 @@ export default {
prop: 'endValue' prop: 'endValue'
}, },
{ {
label: '奖励金额/元', label: '提成比例',
prop: 'calculateValue' prop: 'calculateValue'
} }
] ]
}, },
tableData: [] tableData: [],
commissionConfigArr: [{
title: '高产值比例配置',
name: 'outputBonus',
tableData: [],
tableParams: {}
}, {
title: '成交率系数配置',
name: 'upgradeRateBonus',
tableData: [],
tableParams: {}
}, {
title: '均客单系数配置',
name: 'averagePriceBonus',
tableData: [],
tableParams: {}
}]
} }
}, },
props: { props: {
...@@ -46,28 +69,15 @@ export default { ...@@ -46,28 +69,15 @@ export default {
computed: { computed: {
title() { title() {
const titleObj = { const titleObj = {
minimumWage: '保底工资示例说明', performanceConfig: '工资绩效示例说明',
averagePriceBonus: '均客单奖励示例说明',
customerUnitBonus: '高客单奖励示例说明',
outputBonus: '高产值奖励示例说明',
upgradeRateBonus: '成交率奖励示例说明',
montorAdditionalBonus: '导师附加提成示例说明' montorAdditionalBonus: '导师附加提成示例说明'
} }
return titleObj[this.diffExplain] return titleObj[this.diffExplain]
}, },
infoHtml() { infoHtml() {
const infoObj = { const infoObj = {
averagePriceBonus: `<div class='mb10'>员工A在某个月中完成升级订单5个,对应的订单产值1000.00元、1500.00元、2000.00元、2500.00元、3000.00元,</div> performanceConfig: `<div class='mb10'>员工A在某个月中单店完成产值20000元,按高产值奖励规则,奖励值落点区间在0-80000,则提成比例为产值4%;根据该员工的当月成交率为45%,均可单价为2000计算,则整体提成系数为0.8*0.8=0.64</div>
<div class='mb10'>则月度的平均客单价=升级订单总产值/升级订单数量=2000.00元,对应规则的提成比例=10.00%,按每个升级订单的产值*10%计算每单提成;</div> <div class='mb10'>汇总计算员工A在该月份获得的提成为=20000*5%*0.8*0.8=640元。</div>`,
<div class='mb10'>则员工A在该月份获得的总提成奖励=100.00+150.00+200.00+250.00+300.00=1000.00元。</div>`,
customerUnitBonus: `<div class='mb10'>员工A在某个月中完成升级订单5个,对应的订单产值1000.00元、1500.00元、2000.00元、2500.00元、3000.00元,</div>
<div class='mb10'>按高客单奖励规则,产值在0.00-2000.00元的订单每单奖励0.00元(不奖励),产值在2000.00元以上的订单每单奖励100.00元;</div>
<div class='mb10'>则员工A在该月份获得的高客单奖励=0.00+0.00+0.00+100.00+100.00=200元。</div>`,
outputBonus: `<div class='mb10'>员工A在某个月中单店完成产值15000元,按高产值奖励规则,奖励值落点区间在0-20000,则提成比例为产值5%;</div>
<div class='mb10'>则员工A在该月份获得的高产值奖励=15000*5%=750元。</div>`,
upgradeRateBonus: `<div class='mb10'>员工A在某个月中完成升级订单9个,战败订单1个</div>
<div class='mb10'>则月度的成交率=升级订单数/(升级订单数+战败订单数)=90.00%,对应规则的提成比例为10%,若该员工的订单产值为10000元,</div>
<div class='mb10'>则员工A在该月份获得的成交率奖励=1000.00元。</div>`,
montorAdditionalBonus: `<div class='mb10'>1、员工a入职时间为8月18日,对应0-3个月内的导师提成比例为20%,假如第一个月内员工a产生订单产值40000元,根据业绩配置该员工提成为4000元,则其关联导师的导师提成激励为4000*20%=800元,计入次月导师的月份最终工资</div> montorAdditionalBonus: `<div class='mb10'>1、员工a入职时间为8月18日,对应0-3个月内的导师提成比例为20%,假如第一个月内员工a产生订单产值40000元,根据业绩配置该员工提成为4000元,则其关联导师的导师提成激励为4000*20%=800元,计入次月导师的月份最终工资</div>
<div class='mb10'>2、员工a到11月18日为满三个月,12月份初计算导师提成时,按11.1-11.18的学员提成20%和11.19-11.30的学员提成10%计算为该导师的11月总导师激励提成</div> <div class='mb10'>2、员工a到11月18日为满三个月,12月份初计算导师提成时,按11.1-11.18的学员提成20%和11.19-11.30的学员提成10%计算为该导师的11月总导师激励提成</div>
<div class='mb10'>3、删除解绑学员时不影响订单提成规则,如8月18日关联导师,8月20日解绑学员时,导师在9月初将计算8.18-8.20该学员的订单提成比例,并入导师提成激励计算到9月初发放的最终工资中。</div> <div class='mb10'>3、删除解绑学员时不影响订单提成规则,如8月18日关联导师,8月20日解绑学员时,导师在9月初将计算8.18-8.20该学员的订单提成比例,并入导师提成激励计算到9月初发放的最终工资中。</div>
...@@ -81,46 +91,42 @@ export default { ...@@ -81,46 +91,42 @@ export default {
}, },
watch: { watch: {
diffExplain(newVal) { diffExplain(newVal) {
this.tableParams.tableColumns[0].label = '区间开始值/元' if (newVal == 'performanceConfig') {
this.tableParams.tableColumns[1].label = '区间结束值/元' this.commissionConfigArr.forEach(val => {
this.tableParams.tableColumns[2].label = '提成比例/%' val.tableParams = deepClone(this.tableParams)
switch (newVal) { switch (val.name) {
case 'customerUnitBonus': case 'outputBonus':
this.tableData = [ val.tableData = [
{ startValue: 0, endValue: 2000, calculateValue: 0 }, { startValue: 0, endValue: 80000, calculateValue: '4%' },
{ startValue: 2000.01, endValue: '--', calculateValue: 100 } { startValue: 80000.01, endValue: '--', calculateValue: '5%' }
] ]
this.tableParams.tableColumns[2].label = '奖励金额/元' val.tableParams.tableColumns[2].label = '提成比例'
break break
case 'upgradeRateBonus': case 'upgradeRateBonus':
this.tableData = [ val.tableData = [
{ startValue: 0, endValue: '45%', calculateValue: '5%' }, { startValue: 0, endValue: '50%', calculateValue: 0.8 },
{ startValue: '45.01%', endValue: '--', calculateValue: '10%' } { startValue: '50.01%', endValue: '55%', calculateValue: 1.0 },
] { startValue: '55.01%', endValue: '100%', calculateValue: 1.1 }
this.tableParams.tableColumns[0].label = '区间开始值/%' ]
this.tableParams.tableColumns[1].label = '区间结束值/%' val.tableParams.tableColumns[2].label = '提成系数'
break break
case 'averagePriceBonus': case 'averagePriceBonus':
this.tableData = [ val.tableData = [
{ startValue: 0, endValue: 2000, calculateValue: '10%' }, { startValue: 0, endValue: 3000, calculateValue: 0.8 },
{ startValue: 2000.01, endValue: '--', calculateValue: '20%' } { startValue: 3000.01, endValue: '--', calculateValue: 1.0 }
] ]
break val.tableParams.tableColumns[2].label = '提成系数'
case 'outputBonus': break
this.tableData = [ }
{ startValue: 0, endValue: 20000, calculateValue: '5%' }, })
{ startValue: 20000.01, endValue: '--', calculateValue: '10%' } } else { // 导师附加提成
] this.tableData = [
break { startValue: 0, endValue: 3, calculateValue: '20%' },
case 'montorAdditionalBonus': { startValue: 4, endValue: 6, calculateValue: '10%' }
this.tableData = [ ]
{ startValue: 0, endValue: 3, calculateValue: '20%' }, this.tableParams.tableColumns[0].label = '区间开始值/月(含当月)'
{ startValue: 4, endValue: 6, calculateValue: '10%' } this.tableParams.tableColumns[1].label = '区间结束值/月'
] this.tableParams.tableColumns[2].label = '提成比例'
this.tableParams.tableColumns[0].label = '区间开始值/月(含当月)'
this.tableParams.tableColumns[1].label = '区间结束值/月'
this.tableParams.tableColumns[2].label = '提成比例/%'
break
} }
} }
}, },
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<template> <template>
<div class="staff-list-wrap"> <div class="staff-list-wrap">
<div class="header" slot="header" style="background: #e7eaec"> <div class="header" slot="header" style="background: #e7eaec">
<el-tabs v-model="activeName" @tab-click="handleClick"> <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index"> <el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs> -->
<components :is="tabName" :sceneType="activeName"></components> <components :is="tabName" :sceneType="activeName"></components>
</div> </div>
</div> </div>
......
<!-- 2.1 权益业务员工 --> <!-- 2.1 权益业务员工 -->
<template> <template>
<d2-container class="staff-list m-t-40"> <d2-container class="staff-list">
<div class="header" <div class="header"
slot="header"> slot="header">
<d2-search ref="showSearch" <d2-search ref="showSearch"
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<div slot="left"> <div slot="left">
<span class="table-header-title">商学院员工列表</span> <span class="table-header-title">工资绩效员工列表</span>
<div class="table-header-tips">共<span class="count">{{ totalNum }}</span>个员工启用商学院</div> <div class="table-header-tips">共<span class="count">{{ totalNum }}</span>个员工启用工资绩效</div>
</div> </div>
<auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9062101', '9062102']" /> <auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9062101', '9062102']" />
</d2-table-header> </d2-table-header>
...@@ -31,10 +31,11 @@ ...@@ -31,10 +31,11 @@
:search-form="searchForm" :search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
<div slot="partnerMerchantName" slot-scope="scope"> @setTableFinishFun="setTableFinishFun">
<div v-if="!scope.scope.partnerMerchantNameList.length">-</div> <div slot="partnerMerchantNameId" slot-scope="scope">
<div v-else v-for="(item, index) in scope.scope.partnerMerchantNameList" :key="index">{{ item }}</div> <div v-if="!scope.scope.partnerMerchantNameIdList.length">-</div>
<div v-else v-for="(item, index) in scope.scope.partnerMerchantNameIdList" :key="index">{{ item }}</div>
</div> </div>
<div slot="partnerMerchantId" slot-scope="scope"> <div slot="partnerMerchantId" slot-scope="scope">
<div v-if="!scope.scope.partnerMerchantIdList.length">-</div> <div v-if="!scope.scope.partnerMerchantIdList.length">-</div>
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
<span style="margin-right: 10px;"> <span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062104']" /> <auth-button :data="scope.scope" :show-btn-ids="['9062104']" />
</span> </span>
<!-- 禁/启用商学院 --> <!-- 禁/启用工资绩效 -->
<auth-button :data="scope.scope" :show-btn-ids="['9062105']" /> <auth-button :data="scope.scope" :show-btn-ids="['9062105']" />
<!-- 业绩详情 --> <!-- 业绩详情 -->
<span style="margin-right: 10px;"> <span style="margin-right: 10px;">
...@@ -189,6 +190,14 @@ export default { ...@@ -189,6 +190,14 @@ export default {
inputType: 'number', inputType: 'number',
isClear: true, isClear: true,
keyFn: this.keyDownGetList keyFn: this.keyDownGetList
}, {
label: '所属业务',
name: 'sceneType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}], }],
getListApi: getListApi, getListApi: getListApi,
// 表格参数 // 表格参数
...@@ -210,7 +219,7 @@ export default { ...@@ -210,7 +219,7 @@ export default {
prop: 'staffName', prop: 'staffName',
width: '120' width: '120'
}, { }, {
label: '入职时间', label: '创建时间',
prop: 'entryDate', prop: 'entryDate',
width: '120' width: '120'
}, { }, {
...@@ -218,21 +227,24 @@ export default { ...@@ -218,21 +227,24 @@ export default {
prop: 'staffPhone', prop: 'staffPhone',
width: '110' width: '110'
}, { }, {
label: '园区店', label: '所属业务',
prop: 'merchantName' prop: 'scene',
width: '100',
formatter: (cellValue) => {
// return cellValue?.sceneType.map(v => {
// })
}
}, { }, {
label: '商户号', label: '园区店',
prop: 'merchantNo', prop: 'merchantName',
width: '120' formatter: (cellValue) => {
return `${cellValue?.merchantName} ${cellValue?.merchantNo}`
}
}, { }, {
label: '服务商', label: '服务商',
prop: 'partnerMerchantNameList', prop: 'partnerMerchantNameIdList',
addHtml: 'partnerMerchantName' addHtml: 'partnerMerchantNameId'
}, {
label: '商户号',
prop: 'partnerMerchantIdList',
width: '120',
addHtml: 'partnerMerchantId'
}, { }, {
label: '职级', label: '职级',
prop: 'title', prop: 'title',
...@@ -246,21 +258,21 @@ export default { ...@@ -246,21 +258,21 @@ export default {
prop: 'studentNumber', prop: 'studentNumber',
width: '80' width: '80'
}, { }, {
label: '商学院', label: '工资绩效',
prop: 'updatedDate', prop: 'updatedDate',
width: '80', width: '80',
className: (cellValue) => { className: (cellValue) => {
cellValue.businessSchoolEnableFlag = cellValue?.businessSchoolEnableFlag ? cellValue?.businessSchoolEnableFlag : 'N' cellValue.performanceFlag = cellValue?.performanceFlag ? cellValue?.performanceFlag : 'N'
return { return {
'Y': 'greenSpot', 'Y': 'greenSpot',
'N': 'redSpot' 'N': 'redSpot'
}[cellValue.businessSchoolEnableFlag] }[cellValue.performanceFlag]
}, },
formatter: (cellValue) => { formatter: (cellValue) => {
return { return {
'Y': '启用', 'Y': '启用',
'N': '禁用' 'N': '禁用'
}[cellValue.businessSchoolEnableFlag] }[cellValue.performanceFlag]
} }
}] }]
}, },
...@@ -268,11 +280,22 @@ export default { ...@@ -268,11 +280,22 @@ export default {
searchForm: { searchForm: {
staffName: '', staffName: '',
merchantName: '', merchantName: '',
merchantId: '' merchantId: '',
sceneType: ''
}, },
yqMerchantList: [], // 园区店下拉框数据 yqMerchantList: [], // 园区店下拉框数据
perDetailVisible: false, // 业绩详情弹窗 perDetailVisible: false, // 业绩详情弹窗
detailInfoData: {} // 员工详细信息 detailInfoData: {}, // 员工详细信息
// 基本数据
baseData: {
sceneTypeList: [{
confId: 1,
confValue: '1.1'
}, {
confId: 0,
confValue: '2.1'
}]
}
} }
}, },
computed: { computed: {
...@@ -286,6 +309,7 @@ export default { ...@@ -286,6 +309,7 @@ export default {
getYqMerchantListBySceneApi({ scene: this.sceneType }).then(res => { getYqMerchantListBySceneApi({ scene: this.sceneType }).then(res => {
this.yqMerchantList = res this.yqMerchantList = res
}) })
this.getBaseData()
}, },
methods: { methods: {
...mapActions({ ...mapActions({
...@@ -293,13 +317,29 @@ export default { ...@@ -293,13 +317,29 @@ export default {
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.baseData.sceneTypeList.unshift({
confId: '',
confValue: '全部'
})
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.getCount() this.getCount()
resolve() resolve()
}) })
}, },
// 获取已启用商学院员工数量 setTableFinishFun(data) {
data?.forEach(val => {
val.partnerMerchantNameIdList = val?.partnerMerchantNameList.map((item, index) => item + ' ' + val?.partnerMerchantIdList[index]) || []
})
},
// 获取已启用工资绩效员工数量
getCount() { getCount() {
getEnableStaffNumApi(this.searchForm).then(res => { getEnableStaffNumApi(this.searchForm).then(res => {
this.totalNum = res || 0 this.totalNum = res || 0
...@@ -434,8 +474,8 @@ export default { ...@@ -434,8 +474,8 @@ export default {
let partnerMerchantArr = row?.partnerMerchantNameList.map((item, index) => item + row?.partnerMerchantIdList[index]) || [] let partnerMerchantArr = row?.partnerMerchantNameList.map((item, index) => item + row?.partnerMerchantIdList[index]) || []
let queryObj = { let queryObj = {
staffUuid: row.staffUuid, staffUuid: row.staffUuid,
sceneType: this.sceneType,
yqMerchantObj: JSON.stringify(yqMerchantObj), yqMerchantObj: JSON.stringify(yqMerchantObj),
sceneType: this.sceneType,
partnerMerchantArr: JSON.stringify(partnerMerchantArr), partnerMerchantArr: JSON.stringify(partnerMerchantArr),
businessSchoolEnableFlag: row.businessSchoolEnableFlag businessSchoolEnableFlag: row.businessSchoolEnableFlag
} }
...@@ -449,10 +489,10 @@ export default { ...@@ -449,10 +489,10 @@ export default {
this.detailInfoData = row this.detailInfoData = row
this.perDetailVisible = !this.perDetailVisible this.perDetailVisible = !this.perDetailVisible
}, },
// 禁/启用商学院 // 禁/启用绩效配置
handleEnableOrDisable(row) { handleEnableOrDisable(row) {
if (row.businessSchoolEnableFlag == 'Y') { if (row.businessSchoolEnableFlag == 'Y') {
this.$confirm('禁用该员工后关闭商学院配置,请确认', '提示', { this.$confirm('禁用该员工后关闭驻店工资绩效,请确认', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
......
<template>
</template>
<script>
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file \ No newline at end of file
<!-- 驻店员工查看任务 -->
<template>
<d2-container :loading="$store.state.d2admin.loading.value">
<div class="d2-container-content">
<p class="edit-sub-title">
查看员工任务
</p>
<glsx-combi-form class="edit-form-container"
ref="editFormRef2"
label-width="154px"
default-width="432px"
:is-block="true"
form-ref="editChildRef"
:form-obj="viewInfo"
:form-data="viewFormData">
<div slot="inStoreTarget">
<d2-table @arraySpanMethod="arraySpanMethod" :tableData="viewInfo.tableData" :table-params="tableParams" :hasPage="false"></d2-table>
</div>
</glsx-combi-form>
<div class="page_footer">
<el-button type="primary" @click="handleClose">
返回
</el-button>
</div>
</div>
</d2-container>
</template>
<script>
import { mapActions } from 'vuex'
import { getStaffTaskDetailApi } from '@api/inStoreTargetConfig'
export default {
name: 'EmployeeTaskView',
data() {
return {
viewFormData: [{
label: '门店名称',
isHide: false,
showTxt: true
}, {
label: '业务场景',
isHide: false,
showTxt: true
}, {
label: '驻店员工',
isHide: false,
showTxt: true
}, {
label: '联系方式',
isHide: false,
showTxt: true
}, {
label: '考核周期',
isHide: false,
showTxt: true
}, {
label: '驻店目标',
isHide: false,
addHtml: 'inStoreTarget'
}],
tableParams: {
tableColumns: [{
label: '月度',
prop: 'startValue'
}, {
label: '周期',
prop: 'startValue'
}, {
label: '车主类型',
prop: 'startValue'
}, {
label: '主推产品套餐',
prop: 'startValue'
}, {
label: '目标转化率',
prop: 'startValue'
}, {
label: '提成系数',
prop: 'startValue'
}, {
label: '目标客单价',
prop: 'startValue'
}, {
label: '提成系数',
prop: 'startValue'
}],
tableData: []
},
viewInfo: {
tableData: []
}
}
},
mounted() {
let routerQuery = this.$router.query
// 获取详情
this.getDetailInfo(routerQuery)
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
getDetailInfo(routerQuery) {
getStaffTaskDetailApi({}).then(res => {
this.viewInfo = res || {}
}).catch(() => {})
},
// 合并表格
arraySpanMethod() {
},
// 返回
handleClose() {
this.close({ tagName: '/inStoreGoalsConfig' })
this.$router.push({ name: 'inStoreGoalsConfig' })
this.close({ tagName: '/employeeTasksView' })
}
}
}
</script>
<style scoped lang="scss">
.edit-sub-title {
padding-bottom: 14px;
border-bottom: 1px solid #e8e8ea;
}
.page_footer{
display: flex;
justify-content: center;
}
::v-deep .el-form-item__content{
width: calc(100% - 154px);
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
</template>
<script>
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file \ No newline at end of file
<!-- 驻店目标配置 -->
<template>
<div class="in-store-list-wrap">
<div class="header" slot="header" style="background: #e7eaec">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane>
</el-tabs>
<components :is="tabName" :sceneType="activeName"></components>
</div>
</div>
</template>
<script>
import storeTargetList from "./storeTargetList.vue"
import staffTargetList from "./staffTargetList.vue"
export default {
name: 'InStoreGoalsConfig',
components: {
storeTargetList,
staffTargetList
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "门店目标配置",
name: "0"
},
{
label: '驻店员工目标',
name: "1"
}
],
tabName: "storeTargetList"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
handleClick() {
const arr = {
0: "storeTargetList",
1: "staffTargetList"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style scoped lang="scss">
.in-store-list-wrap {
padding: 0 24px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 驻店员工目标 -->
<template>
<d2-container class="staff-target-list m-t-40">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9062504']" />
</d2-table-header>
<d2-table ref="staffTargetTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062505']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { mapActions, mapState } from 'vuex'
import { Util } from '@/common/util'
import { getStaffTaskListApi } from '@api/inStoreTargetConfig'
export default {
name: "StoreTargetList",
data() {
return {
// 搜索框
showFormData: [{
label: '驻店员工',
name: 'staffName',
type: 'input',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '场景名称',
name: 'sceneType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}, {
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '商户号',
name: 'merchantId',
type: 'input',
inputType: 'number',
isClear: true,
keyFn: this.keyDownGetList
}],
getListApi: getStaffTaskListApi,
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: {
width: '100'
},
tableColumns: [{
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '员工名称',
prop: 'staffName',
width: '120'
}, {
label: '联系方式',
prop: 'staffPhoneNumber',
width: '120'
}, {
label: '账号创建日期',
prop: 'created',
width: '110'
}, {
label: '考核状态',
prop: 'status',
className: () => {
return 'blueSpot'
},
formatter: () => {
return '考核中'
}
}, {
label: '考核周期',
prop: 'assessmentCycle',
formatter: (cellValue) => {
return ``
}
}, {
label: '业务场景',
prop: 'scene'
}, {
label: '流量方',
prop: 'merchantName'
}, {
label: '车主类型',
prop: 'carOwnerType',
width: '160',
}, {
label: '商品分类',
prop: 'goodsType',
width: '160',
}, {
label: '主推产品套餐',
prop: 'studentNumber',
width: '160'
}, {
label: '目标转化率',
prop: 'updatedDate',
width: '100',
}, {
label: '提成系数',
prop: 'updatedDate',
width: '80',
}, {
label: '目标客单价',
prop: 'updatedDate',
width: '100',
}, {
label: '提成系数',
prop: 'updatedDate',
width: '80',
}, {
label: '关联服务商',
prop: 'updatedDate',
width: '100',
}, {
label: '关联服务商号',
prop: 'updatedDate',
width: '120',
}, {
label: '最近更新时间',
prop: 'updatedDate',
width: '160',
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}]
},
// 查询条件
searchForm: {
staffName: '',
merchantName: '',
merchantId: '',
sceneType: '',
},
baseData: {
sceneTypeList: [{
confId: 1,
confValue: '精品升级'
}, {
confId: 0,
confValue: '会员权益/升级'
}]
}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList,
updateList: (state) => state.d2admin.user.updateList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
getBaseData() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.baseData[item.name + 'List'].unshift({
confId: '',
confValue: '全部'
})
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
setTableFinishFun(data) {
},
// 重置
handleReset() {
this.searchForm = {
staffName: '',
merchantName: '',
merchantId: '',
sceneType: '',
}
this.$refs.staffTargetTable.refreshTable(true, true)
},
// 导出
handleExport() {
var params = this.searchForm
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.export.async'
const list = [
...this.dowloadList,
{
name: '合并导出',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 查看任务详情
handleStaffView(row) {
this.close({ tagName: '/inStoreGoalsConfig' })
this.$router.push({
path: '/employeeTasksView',
query: row.staffUuid
})
}
}
}
</script>
<style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 门店目标配置 -->
<template>
<d2-container class="store-target-list m-t-40">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9062501']" />
</d2-table-header>
<d2-table ref="storeTargetTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="sceneType" slot-scope="scope">
<div v-if="scope.scope.sceneType == 1">精品升级</div>
<div v-if="scope.scope.sceneType == 0">会员权益/升级</div>
<div v-else>-</div>
</template>
<template slot="yqMerchantName" slot-scope="scope">
<div v-for="item in scope.scope.yqMerchantList" :key="item.merchantId">{{ item.merchantName }}</div>
<!-- <div v-if="!scope.scope.yqMerchantList.length">-</div> -->
</template>
<template slot="yqMerchantId" slot-scope="scope">
<div v-for="item in scope.scope.yqMerchantList" :key="item.merchantId">{{ item.merchantId }}</div>
<!-- <div v-if="!scope.scope.yqMerchantList.length">-</div> -->
</template>
<template slot="partnerMerchantName" slot-scope="scope">
<div v-for="item in scope.scope.partnerMerchantList" :key="item.merchantId">{{ item.merchantName }}</div>
<!-- <div v-if="!scope.scope.partnerMerchantList.length">-</div> -->
</template>
<template slot="partnerMerchantId" slot-scope="scope">
<div v-for="item in scope.scope.partnerMerchantList" :key="item.merchantId">{{ item.merchantId }}</div>
<!-- <div v-if="!scope.scope.partnerMerchantList.length">-</div> -->
</template>
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062502']" />
</span>
<!-- 编辑 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9062503']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { mapActions } from 'vuex'
import { getStoreTargetListApi } from '@api/inStoreTargetConfig'
import { Util } from '@/common/util'
export default {
name: "StoreTargetList",
data() {
return {
// 搜索框
showFormData: [{
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '商户号',
name: 'merchantId',
type: 'input',
inputType: 'number',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '场景名称',
name: 'sceneType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneTypeList'
}, {
label: '配置状态',
name: 'status',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
}],
getListApi: getStoreTargetListApi,
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: {
width: '100'
},
tableColumns: [{
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '流量方',
prop: 'merchantName',
width: '120'
}, {
label: '流量方商户号',
prop: 'merchantId',
width: '120'
}, {
label: '业务场景',
prop: 'sceneType',
addHtml: 'sceneType'
}, {
label: '关联园区店',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName'
}, {
label: '关联园区店号',
prop: 'yqMerchantId',
addHtml: 'yqMerchantId'
}, {
label: '关联服务商',
prop: 'partnerMerchantName',
addHtml: 'partnerMerchantName'
}, {
label: '关联服务商号',
prop: 'partnerMerchantId',
addHtml: 'partnerMerchantId'
}, {
label: '配置状态',
prop: 'status',
width: '80',
className: (cellValue) => {
cellValue.performanceFlag = cellValue?.performanceFlag ? cellValue?.performanceFlag : 'N'
return {
'Y': 'greenSpot',
'N': 'yellowSpot'
}[cellValue.performanceFlag]
},
formatter: (cellValue) => {
return {
'Y': '已配置',
'N': '待配置'
}[cellValue.performanceFlag]
}
}, {
label: '创建时间',
prop: 'created',
width: '160',
formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '更新时间',
prop: 'update',
width: '160',
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
}, {
label: '操作人',
prop: 'updateUser',
width: '80',
}]
},
// 查询条件
searchForm: {
merchantName: '',
merchantId: '',
sceneType: '',
status: ''
},
baseData: {
sceneTypeList: [{
confId: 1,
confValue: '精品升级'
}, {
confId: 0,
confValue: '会员权益/升级'
}],
statusList: [{
confId: 1,
confValue: '待配置'
}, {
confId: 2,
confValue: '已配置'
}]
}
}
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
getBaseData() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.baseData[item.name + 'List'].unshift({
confId: '',
confValue: '全部'
})
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
// 表格数据处理
setTableFinishFun(data) {
},
// 查看详情
handleStoreView(row) {
this.close({ tagName: '/inStoreGoalsConfig' })
this.$router.push({
path: '/inStoreConfigView',
query: row
})
},
// 新增配置
handleAdd() {
this.close({ tagName: '/inStoreGoalsConfig' })
let queryObj = { idEdit: false }
this.$router.push({
path: '/addInStoreConfig',
query: queryObj
})
},
// 编辑配置
handleStoreEdit(row) {
this.close({ tagName: '/inStoreGoalsConfig' })
let queryObj = { idEdit: true, ...row }
this.$router.push({
path: '/addInStoreConfig',
query: queryObj
})
},
// 重置
handleReset() {
this.searchForm = {
merchantName: '',
merchantId: '',
sceneType: '',
status: ''
}
this.$refs.storeTargetTable.refreshTable(true, true)
}
}
}
</script>
<style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!