Commit 42e9e4c3 by wangzhihui

```

feat(order): 新增有效引荐数复核功能

- 添加有效引荐数相关API接口,包括列表、复核、详情等
- 实现引荐数审核页面和对话框组件
- 配置引荐数审核路由和权限控制

feat(resident): 优化员工薪资管理功能

- 修改导入员工修订工资接口地址
- 新增批量修改薪资、4s列表、工资条员工列表等API
- 完善薪资管理相关常量定义

chore(api): 更新文件头注释信息

fix(config): 修复配置中心模块URL路径

- 修正main.js中配置中心请求URL路径参数

feat(constants): 添加复核状态选项常量

- 定义复核状态选项及其对应颜色映射

refactor(util): 优化工具函数代码结构

- 清理util.js中getStatusValue方法多余代码

feat(shopConfig): 新增有效引荐列表功能

- 添加有效引荐列表查询和导出API接口

feat(inStoreManage): 增加绩效规则配置功能

- 在驻店管理中添加绩效规则配置相关路由
- 完善批量修改薪资弹窗功能
```
1 parent 9b7d9192
...@@ -202,3 +202,18 @@ export function getSellerListApi(data) { ...@@ -202,3 +202,18 @@ export function getSellerListApi(data) {
data.method = `${path2}staff.page.info` data.method = `${path2}staff.page.info`
return request(data, "post") return request(data, "post")
} }
//订单管理-有效引荐数复核列表
export function getEffectiveReferralStoreList(data) {
data.method = "dj.staff.api.effective.referral.audit.page"
return request(data)
}
// 订单管理 - 有效引荐数 - 复核
export function effectiveReferralStoreAudit(data) {
data.method = "dj.staff.api.effective.referral.audit"
return request(data)
}
//订单管理-有效引荐数-详情
export function getEffectiveReferralStoreDetail(data) {
data.method = "dj.staff.api.effective.referral.detail"
return request(data)
}
...@@ -242,7 +242,8 @@ export function getEmployee(data) { ...@@ -242,7 +242,8 @@ export function getEmployee(data) {
// 导入员工修订工资 // 导入员工修订工资
export function importStaffSalaryApi(data) { export function importStaffSalaryApi(data) {
data.method = `${path2}staffMonthSalary.staffSalary.import` // data.method = `${path2}staffMonthSalary.staffSalary.import`
data.method = `dj.api.smartcarlife.staffMonthSalary.staffSalary.detail.import`
return request(data, "post", ["file"]) return request(data, "post", ["file"])
} }
...@@ -636,3 +637,21 @@ export function staffBaseInfoPageList(data = {}) { ...@@ -636,3 +637,21 @@ export function staffBaseInfoPageList(data = {}) {
data.method = "dj.api.smartcarlife.staffBaseInfo.pageList" data.method = "dj.api.smartcarlife.staffBaseInfo.pageList"
return request(data, "post") return request(data, "post")
} }
// 北森员工信息批量修改
export function updateBatchSalary(data) {
data.method =
"dj.api.smartcarlife.staffBaseInfo.salaryEffectiveRule.updateBatch"
return request(data, "post")
}
//工资维护-4s列表
export function getSalaryMerchantList(data = {}) {
data.method = "dj.api.smartcarlife.staffMonthSalary.merchant.list"
return request(data, "post")
}
//存在工资条的员工手机号列表(分页)
export function getSalaryStaffList(data) {
data.method = "dj.api.smartcarlife.staffMonthSalary.staff.list"
return request(data, "post")
}
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2026-01-21 11:17:18
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-01-22 17:11:52
* @FilePath: \dj-car-life-system\src\api\salaryManagement.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 工资绩效 // 工资绩效
import request from "./request" import request from "./request"
......
...@@ -364,4 +364,15 @@ export function exportProfit(data) { ...@@ -364,4 +364,15 @@ export function exportProfit(data) {
export function importProfit(data) { export function importProfit(data) {
data.method = `dj.api.script.merchant.profit.record.async.import` data.method = `dj.api.script.merchant.profit.record.async.import`
return request(data, "post", ["file"]) return request(data, "post", ["file"])
}
\ No newline at end of file \ No newline at end of file
}
//店铺设置-有效引荐列表
export function getEffectiveReferralList(data) {
data.method = "dj.staff.api.effective.referral.page"
return request(data)
}
//店铺设置-有效引荐列表导出
export function exportEffectiveReferralList(data) {
data.method = "dj.staff.api.effective.referral.export.async"
return request(data)
}
...@@ -1845,3 +1845,22 @@ export const signerTypeOpt = [ ...@@ -1845,3 +1845,22 @@ export const signerTypeOpt = [
{ confId: 1, confValue: "企业委托" }, { confId: 1, confValue: "企业委托" },
{ confId: 2, confValue: "企业" } { confId: 2, confValue: "企业" }
] ]
export const reviewStatusOpts = [
{
confId: 0,
confValue: "待复核"
},
{
confId: 1,
confValue: "已复核"
},
{
confId: 2,
confValue: "已失效"
}
]
export const reviewStatusOptMap = {
0: "#FDB757",
1: "#2CCA74",
2: "#999999"
}
...@@ -400,6 +400,7 @@ export const Util = { ...@@ -400,6 +400,7 @@ export const Util = {
if (!baseData || !baseData[optKey] || !row) return null if (!baseData || !baseData[optKey] || !row) return null
let value = rowKey ? row[rowKey] : row let value = rowKey ? row[rowKey] : row
let item = baseData[optKey].find((item) => item.confId == value) let item = baseData[optKey].find((item) => item.confId == value)
return (item && item.confValue) || "-" return (item && item.confValue) || "-"
}, },
getStatusColor(status, optKey) { getStatusColor(status, optKey) {
......
...@@ -115,7 +115,7 @@ let baseConfig = config ...@@ -115,7 +115,7 @@ let baseConfig = config
// 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取 // 使用fetch 解决axios提前实例化导致sign里面的secret不能通过配置中心动态获取
fetch( fetch(
"https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config" "https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=dj-car-life-system-config-wzh"
) )
.then( .then(
(response) => { (response) => {
......
...@@ -722,5 +722,38 @@ export const routerName = { ...@@ -722,5 +722,38 @@ export const routerName = {
} }
], ],
component: _import("orderManage/refundExamine") component: _import("orderManage/refundExamine")
},
90409: {
path: "/referralAudit",
name: "referralAudit",
meta: {
title: "引荐数审核",
authId: "90409",
parentId: "904",
cache: false
},
auth: [
{
authId: "9040903",
parentId: "90409",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9040901",
parentId: "90409",
label: "查看",
handle: "handleExamine"
},
{
authId: "9040902",
parentId: "90409",
label: "复核",
handle: "handleExamine"
}
],
component: _import("orderManage/referralAudit")
} }
} }
...@@ -202,6 +202,21 @@ export const routerName = { ...@@ -202,6 +202,21 @@ export const routerName = {
type: "default", type: "default",
label: "批量修改薪资占比", label: "批量修改薪资占比",
handle: "handleUpdateSalary" handle: "handleUpdateSalary"
},
{
authId: "9120515",
parentId: "91205",
category: "Button",
type: "default",
label: "绩效规则配置",
addRoutePath: [
{
authId: "912051501",
name: "绩效规则配置",
parentId: "9120505"
}
],
handle: "handleConfigurationPerformance"
} }
], ],
component: _import("residentManage/inStoreManage/inStoreControlList") component: _import("residentManage/inStoreManage/inStoreControlList")
...@@ -218,6 +233,18 @@ export const routerName = { ...@@ -218,6 +233,18 @@ export const routerName = {
}, },
component: _import("residentManage/inStoreManage/staffInfo") component: _import("residentManage/inStoreManage/staffInfo")
}, },
912051501: {
path: "/configurationPerformance",
name: "configurationPerformance",
meta: {
title: "绩效规则配置",
authId: "912051501",
parentId: "9120505",
cache: false,
activePath: "/inStoreManage"
},
component: _import("residentManage/inStoreManage/configurationPerformance")
},
// 91206: { // 91206: {
// path: "/staffManage", // path: "/staffManage",
// name: "staffManage", // name: "staffManage",
......
<!-- 复核有效引荐数/查看有效引荐数 -->
<!-- 只有待复核的数据,才显示复核按钮,已复核和已失效,只显示查看按钮
-->
<template>
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
:config="approveConfig"
@handleClick="handleClick"
>
<div class="reply-dialog" v-loading="loading">
<template v-if="detailInfo">
<detailComp
ref="detailComp"
:configData="configData"
:detailInfo="detailInfo"
labelWidth="168px"
:rules="rules"
></detailComp>
</template>
</div>
</baseDialog>
</template>
<script>
import {
effectiveReferralStoreAudit,
getEffectiveReferralStoreDetail
} from "@api/order"
import detailComp from "../../residentManage/salaryPerformance/components/detailComp.vue"
import { Util, deepClone, getStatusItem } from "@/common/util"
export default {
name: "approvalView",
components: {
detailComp
},
data() {
return {
detailInfo: {},
dialogConfig: {
title: "复核有效引荐数",
width: "520px"
},
loading: false,
isShow: true,
approveConfig: {
isShowFooter: false,
cancel_name: "取 消",
confirm_name: "确 定"
},
configData: [
{
childRef: "referralComp",
infoData: [
{
title: "门店名称",
key: "merchantName",
col: 24
},
{
title: "业务场景",
key: "sceneType",
col: 24,
formatter: (cellValue) => {
return getStatusItem(
this.baseData,
"businessTypeOpts",
cellValue,
"sceneType"
)
}
},
{
title: "车辆品牌",
key: "brandName",
col: 24
},
{
title: "系统交车数",
key: "totalDeliveryCount",
col: 24,
formatter: (val) => {
return val.totalDeliveryCount || val.totalDeliveryCount === 0
? val.totalDeliveryCount
: "-"
}
},
{
title: "区域有效引荐数",
key: "areaEffectiveCount",
col: 24,
formatter: (val) => {
return val.areaEffectiveCount || val.areaEffectiveCount === 0
? val.areaEffectiveCount
: "-"
}
},
{
title: "运营修正实际有效引荐数",
key: "reviewedEffectiveCount",
isEdit: true,
col: 24,
type: "input",
isDisabled: false
}
]
}
],
rules: {
reviewedEffectiveCount: [
{ required: true, message: "请填写修正实际有效引荐数" },
{
validator: (rule, value, callback) => {
const s = String(value == null ? "" : value).trim()
if (!/^\d+$/.test(s)) {
callback(new Error("仅支持输入整数"))
return
}
const n = Number(s)
if (n < 0 || n > 100000000) {
callback(new Error("范围应为 0-100000000"))
return
}
callback()
},
trigger: ["blur", "change"]
}
]
},
baseData: {
businessTypeOpts: [
{
confId: 3,
confValue: "单延保"
},
{
confId: 2,
confValue: "广联权益"
},
{
confId: 1,
confValue: "轻改"
}
]
}
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
id: {
type: String,
default: ""
}
},
computed: {
visible: {
get() {
return this.detailVisible
},
set(newVal) {
this.$emit("dialogClose", { flag: newVal, attrName: "detailVisible" })
}
}
},
watch: {
detailVisible: {
handler(val) {
console.log(val)
this.getDetail()
},
immediate: true
}
},
created() {},
mounted() {},
methods: {
async getDetail() {
// let result = await getEffectiveReferralStoreDetail({ id: this.id })
let result = {
id: 0,
merchantId: 0,
merchantName: "深圳市鹏峰丰田汽车有限公司",
sceneType: 1,
brandId: 0,
brandName: "问界",
totalDeliveryCount: 0,
areaEffectiveCount: 0,
reviewedEffectiveCount: 0,
remark:
"分享时机,在不同的时机时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时分析用户是分享时机,在不同的时机分析用户是分享时机,在不同的时机分析用户是",
managerCommitTime: "",
isReviewed: 0,
managerId: "",
managerName: "尹小燕",
reviewedBy: "",
reviewedName: "尹小燕ww"
}
this.dialogConfig.title =
result.isReviewed == 0 ? "复核有效引荐数" : "查看有效引荐数"
this.approveConfig.isShowFooter = result.isReviewed == 0 ? true : false
// 申诉类型(1:考勤,2:平板录音)
this.configData[0].infoData[
this.findAttrIdx("infoData", "reviewedEffectiveCount")
].isDisabled = result.isReviewed == 0 ? false : true
this.detailInfo = result
},
formatterImg(val) {
if (!val) return []
let arr = val.split(",")
return arr
},
async handleClick() {
const refs =
this.$refs.detailComp &&
this.$refs.detailComp.$refs &&
this.$refs.detailComp.$refs.referralComp
const items = Array.isArray(refs) ? refs : refs ? [refs] : []
const results = await Promise.all(
items.map((comp) => {
if (!comp || typeof comp.validate !== "function")
return Promise.resolve(true)
const ret = comp.validate()
if (ret && typeof ret.then === "function") {
return ret.then(() => true).catch(() => false)
}
return new Promise((resolve) => {
comp.validate((valid) => resolve(!!valid))
})
})
)
const allValid = results.every(Boolean)
if (allValid) {
let params = {
appealRecordId: this.detailInfo.id,
replyContent: this.detailInfo.replyContent
}
if (this.detailInfo.appealType == 1) {
params.confirmActualAttendanceDays =
this.detailInfo.confirmActualAttendanceDays
} else {
params.confirmPadRecordNum = this.detailInfo.confirmPadRecordNum
}
// replySalaryAppeal(params)
// .then((res) => {
// if (res) {
// this.$message.success("操作成功")
// }
// })
// .finally((err) => {
// this.visible = false
// })
}
},
handleClose() {
console.log("handleClose")
},
findAttrIdx(formName, name) {
var index = this.configData[0][formName].findIndex((k) => k.key == name)
return index || 0
}
}
}
</script>
<style lang="scss" scoped>
@import "../../residentManage/salaryPerformance/components/detail.scss";
::v-deep .el-dialog__body {
padding: 12px 20px !important;
}
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
padding: 14px 20px !important;
.dialog-footer {
border-top: 0px solid #fff !important;
}
}
::v-deep .el-dialog__header {
padding: 16px 20px !important;
color: #333333;
font-size: 20px;
font-weight: bold;
}
</style>
<!-- 引荐数审核 -->
<template>
<d2-container class="layout">
<div class="header">
<d2-search
ref="showSearch"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px"
:selectPopperAppendToBody="false"
class="d2-search"
>
<template slot="managerCommitTime">
<el-date-picker
v-model="searchForm.managerCommitTime"
type="month"
placeholder="选择月份"
:picker-options="monthPickerOptions"
size="small"
:clearable="false"
value-format="yyyy-MM"
>
</el-date-picker>
</template>
</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 :show-btn-ids="['9040903']" category="Button" />
</d2-table-header>
<!-- :get-list-api="getListApi" -->
<d2-table
ref="tableRef"
:search-form="searchFormSearch"
:table-params="tableParams"
:tableData="tableData"
:before-search-fn="beforeSearchFn"
>
<div slot="imageUrls" slot-scope="scope" class="coverImage-preview">
<glsx-preview
:image-url-arr="
scope.scope.imageUrls
? formatterImg(scope.scope.imageUrls)
: [noDataUrl]
"
:pic-options="picOptions"
limit="1"
></glsx-preview>
</div>
<template slot="remark" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.remark || "-" }}
</div>
<span class="tag" slot="reference">{{
scope.scope.remark || "-"
}}</span>
</el-popover>
</template>
<template slot="merchantName" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.merchantName || "-" }}
</div>
<span class="tag" slot="reference">{{
scope.scope.merchantName || "-"
}}</span>
</el-popover>
</template>
<!--状态 -->
<div slot="statusHtml" slot-scope="scope">
<div class="online-status">
<span
class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.isReviewed,
'reviewStatusOptMap'
)
}"
></span>
<!-- {{
getStatusItem(
baseData,
"reviewStatusOpts",
scope.scope,
"isReviewed"
)
}} -->
</div>
</div>
<div slot="auth-button" slot-scope="scope">
<span
style="margin-right: 8px"
v-if="scope.scope.isReviewed == 2 || scope.scope.isReviewed == 1"
>
<auth-button
slot="auth-button"
:show-btn-ids="['9040901']"
:data="scope.scope"
/>
</span>
<span v-else>
<auth-button
slot="auth-button"
:show-btn-ids="['9040902']"
:data="scope.scope"
/>
</span>
</div>
</d2-table>
</div>
<referral-dialog
v-if="referralVisible"
:detailVisible="referralVisible"
:id="id"
@dialogClose="handlereferralClose"
></referral-dialog>
</d2-container>
</template>
<script type="text/ecmascript-6">
import {
Util,
deepClone,
getStatusItem,
getOptionsList,
getStatusColor
} from "@/common/util"
import { listShop4sByRef } from "@api/merchant"
import {
getEffectiveReferralStoreList,effectiveReferralStoreAudit,getEffectiveReferralStoreDetail
} from "@api/order"
import { mapActions, mapState } from "vuex"
import {reviewStatusOpts,reviewStatusOptMap} from "@/common/constants"
import ReferralDialog from "./components/referralDialog"
import dayjs from "dayjs"
export default {
name: "",
components: {
ReferralDialog
},
data() {
return {
getStatusColor,
getStatusItem,
id: "",
referralVisible: false,
noDataUrl: require("@/assets/noData.png"),
tableData: [
{
id: 0,
merchantId: 0,
merchantName: "深圳市鹏峰丰田汽车有限公司",
sceneType: 1,
brandId: 0,
brandName: "问界",
totalDeliveryCount: 0,
areaEffectiveCount: 0,
reviewedEffectiveCount: 0,
imageUrls: "https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/1762758178815_9zhk7os8.png,https://qcimg01.glsx.com.cn/group1/M00/11/2F/wKgD3mlt-HGAK-loAATqOHxW64c252.jpg",
remark: "分享时机,在不同的时机时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时分析用户是分享时机,在不同的时机分析用户是分享时机,在不同的时机分析用户是",
managerCommitTime: "",
isReviewed: 0,
managerId: "",
managerName: "尹小燕",
reviewedBy: "",
reviewedName: "尹小燕ww"
}
],
searchForm: {
merchantName:'',
brandName: "",
managerName: "",
sceneType: "",
isReviewed:'',
managerCommitTime: dayjs().format('YYYY-MM')
},
searchFormSearch: {},
showFormData: [
{
label: "门店名称",
name: "merchantName",
type: "input",
isClear: true
},
{
label: "区域运营",
name: "managerName",
type: "input",
isClear: true
},
{
label: '提交时间',
name: "managerCommitTime",
addHtml:'managerCommitTime'
},
{
label: "状态",
name: "isReviewed",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "reviewStatusOpts"
},
{
label: "业务场景",
name: "sceneType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "businessTypeOpts"
},
{
label: "品牌",
name: "brandName",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "brandOpts"
}
],
getListApi: getEffectiveReferralStoreList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: {
width: "104"
},
tableColumns: [
{
label: "门店",
prop: "merchantName",
minWidth: "150",
addHtml: "merchantName"
},
{
label: "业务场景",
prop: "sceneType",
minWidth: "100",
formatter: (cellValue) => {
// return this.getStatusItem(
// this.baseData,
// "businessTypeOpts",
// cellValue,
// "sceneType"
// )
}
},
{
label: "车辆品牌",
prop: "brandName"
},
{
label: "系统交车数",
prop: "totalDeliveryCount",
minWidth: "150",
formatter:(cellValue)=>{
return cellValue.totalDeliveryCount===0||cellValue.totalDeliveryCount?cellValue.totalDeliveryCount:'-'
}
},
{
label: "区域有效引荐数",
prop: "areaEffectiveCount",
minWidth: "150",
formatter:(cellValue)=>{
return cellValue.areaEffectiveCount===0||cellValue.areaEffectiveCount?cellValue.areaEffectiveCount:'-'
}
},
{
label: "运营有效引荐数",
prop: "reviewedEffectiveCount",
minWidth: "150",
formatter:(cellValue)=>{
return cellValue.reviewedEffectiveCount===0||cellValue.reviewedEffectiveCount?cellValue.reviewedEffectiveCount:'-'
}
},
{
label: "上传凭证",
prop: "imageUrls",
width: "138px",
addHtml: "imageUrls"
},
{
label: "备注",
minWidth: "150",
prop: "remark",
addHtml: "remark"
},
{
label: "提交时间",
prop: "managerCommitTime",
formatter: (cellValue) => {
return cellValue.managerCommitTime?Util.dateFormate(cellValue.managerCommitTime, "YYYY-MM-DD HH:mm:ss"):'-'
}
},
{
label: "状态",
prop: "isReviewed",
minWidth: 120,
addHtml: "statusHtml"
},
{
label: "区域经理",
minWidth: "150",
prop: "managerName"
},
{
label: "运营复核人",
minWidth: "150",
prop: "reviewedName"
}
]
},
picOptions: {
width: "138px",
height: "54px",
isClose: false
},
monthPickerOptions: {
// 禁用 2025-12 之前的月份,仅允许 2025-12 以及未来
disabledDate: (date) => dayjs(date).isBefore(dayjs('2025-12-01'), 'month')
},
baseData: {
businessTypeOpts: [
{
confId: 3,
confValue: "单延保"
},
{
confId: 2,
confValue: "广联权益"
},
{
confId: 1,
confValue: "轻改"
}
],
reviewStatusOpts:deepClone(reviewStatusOpts),
reviewStatusOptMap: deepClone(reviewStatusOptMap),
brandOpts:[
{
confId: '问界',
confValue: "问界"
},
{
confId: '智界',
confValue: "智界"
},
{
confId: '享界',
confValue: "享界"
},{
confId: '尊界',
confValue: "尊界"
},
{
confId: '尚界',
confValue: "尚界"
},
{
confId: '其他',
confValue: "其他"
}
]
}
}
},
mounted() {
getOptionsList(this, "showFormData", true)
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
// 复核有效引荐数/查看有效引荐数
handleExamine(data){
this.id = data.id
this.referralVisible = !this.referralVisible
},
formatterImg(val) {
if (!val) return []
let arr = val.split(',')
return arr
},
async fetchOnboardingPlans() {
try {
const [merchantIdList] = await Promise.all([
listShop4sByRef({
yqMerchantId: ""
})
])
// 处理返回的数据
this.baseData.merchantIdList = merchantIdList
getOptionsList(this, "showFormData", true)
} catch (error) {
console.error(error)
}
},
handlereferralClose(){
this.referralVisible = !this.referralVisible
},
beforeSearchFn() {
return new Promise((resolve) => {
if (this.searchFormSearch.managerCommitTime) {
let nowMonth = dayjs().month(),
searchMonth = dayjs(this.searchFormSearch.managerCommitTime).month(),
managerCommitStartTime = dayjs().startOf("month"),
managerCommitEndTime = dayjs().toDate()
if (nowMonth != searchMonth) {
managerCommitStartTime = dayjs(this.searchFormSearch.managerCommitTime).startOf(
"month"
)
managerCommitEndTime = dayjs(this.searchFormSearch.managerCommitTime).endOf(
"month"
)
}
this.searchFormSearch.managerCommitStartTime = `${this.formatDate(
managerCommitStartTime
)} 00:00:00`
this.searchFormSearch.managerCommitEndTime = `${this.formatDate(
managerCommitEndTime
)} 23:59:59`
delete this.searchFormSearch.managerCommitTime
}
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
formatDate(date) {
return dayjs(date).format("YYYY-MM-DD")
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.search()
},
handleExport() {
let params = this.searchFormSearch
params.method =
"dj.staff.api.effective.referral.audit.export.async"
const list = [
...this.dowloadList,
{
name: "引荐数审核列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
search() {
this.$refs.tableRef.refreshTable(false, true)
},
}
}
</script>
<style scoped lang="scss">
.layout {
.d2-search {
::v-deep.el-select-dropdown,
.el-popper {
width: 300px !important;
}
}
.content {
position: absolute;
left: 20px;
width: calc(100% - 40px);
padding: 0 20px 36px;
background: #fff;
margin-top: 14px;
height: calc(100% - 110px);
box-sizing: border-box;
overflow-y: auto;
.top {
height: 52px;
color: #333333;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
.exprot {
margin-left: auto;
}
}
}
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
padding: 0 10px;
display: block;
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
}
}
.coverImage-preview {
width: 138px;
height: 54px;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
</style>
...@@ -15,14 +15,32 @@ ...@@ -15,14 +15,32 @@
@handleConfirm="handleUpdateConfirm" @handleConfirm="handleUpdateConfirm"
:slotArr="slotArr" :slotArr="slotArr"
> >
<template slot="effectiveMonth">
<el-date-picker
v-model="isUpdateForm.effectiveMonth"
type="month"
placeholder="选择月份"
:picker-options="monthPickerOptions"
size="small"
:clearable="false"
value-format="yyyy-MM"
>
</el-date-picker>
</template>
</glsk-form-dialog> </glsk-form-dialog>
</template> </template>
<script> <script>
import { updateBatchSalary } from "@/api/resident"
import dayjs from "dayjs"
export default { export default {
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false
},
staffPhoneList: {
type: Array,
default: () => []
} }
}, },
computed: { computed: {
...@@ -37,6 +55,11 @@ export default { ...@@ -37,6 +55,11 @@ export default {
}, },
data() { data() {
return { return {
slotArr: ["effectiveMonth"],
monthPickerOptions: {
// 禁用当前月之前的所有月份(仅允许当月及未来)
disabledDate: (date) => dayjs(date).isBefore(dayjs(), "month")
},
isUpdateDialogConfig: { isUpdateDialogConfig: {
title: "批量修改薪资占比", title: "批量修改薪资占比",
width: "500px", width: "500px",
...@@ -44,7 +67,8 @@ export default { ...@@ -44,7 +67,8 @@ export default {
}, },
isUpdateForm: { isUpdateForm: {
basicSalaryProportion: "", basicSalaryProportion: "",
performanceSalaryProportion: "" performanceSalaryProportion: "",
effectiveMonth: dayjs("2026-01").format("YYYY-MM")
}, },
isUpdateFormData: [ isUpdateFormData: [
{ {
...@@ -60,7 +84,7 @@ export default { ...@@ -60,7 +84,7 @@ export default {
label: "绩效工资占比", label: "绩效工资占比",
name: "performanceSalaryProportion", name: "performanceSalaryProportion",
type: "input", type: "input",
maxlength: "11", maxlength: "3", // 联动仅需三位,限制为 1-99
placeholder: "请输入", placeholder: "请输入",
append: "%", append: "%",
isClear: true isClear: true
...@@ -73,18 +97,103 @@ export default { ...@@ -73,18 +97,103 @@ export default {
], ],
isUpdateRules: { isUpdateRules: {
basicSalaryProportion: [ basicSalaryProportion: [
{ required: true, message: "请输入", trigger: "blur" } { required: true, message: "请输入", trigger: "blur" },
{
validator: (rule, value, callback) =>
this.validatePercent(value, callback),
trigger: "blur"
}
], ],
performanceSalaryProportion: [ performanceSalaryProportion: [
{ required: true, message: "请输入", trigger: "blur" } { required: true, message: "请输入", trigger: "blur" },
{
validator: (rule, value, callback) =>
this.validatePercent(value, callback),
trigger: "blur"
}
] ]
}, },
baseData: {} baseData: {},
// 联动更新锁,避免互相更新时的递归触发
_linkageLock: false
} }
}, },
methods: { methods: {
closeDialogVisible() {}, closeDialogVisible() {
handleUpdateConfirm() {} this.isUpdateVisible = false
},
handleUpdateConfirm(data) {
let params = {
staffPhoneList: this.staffPhoneList,
...data
}
updateBatchSalary(data)
.then((res) => {
if (res) {
this.$message.success("修改成功")
}
// this.$emit("refreshTable")
})
.catch(() => {
this.$message.error("修改失败")
})
.finally(() => {
this.isUpdateVisible = false
})
},
// 仅允许 1-99 的正整数;返回 null 表示空或无效输入
sanitizePercent(val) {
const s = String(val == null ? "" : val).replace(/\D/g, "")
if (!s) return null
let n = parseInt(s, 10)
if (isNaN(n)) return null
if (n < 1) n = 1
if (n > 99) n = 99 // 单个不能为 100,自动纠正为 99
return n
},
// 表单校验规则:1-99 的正整数
validatePercent(value, callback) {
const v = this.sanitizePercent(value)
if (v === null) {
callback(new Error("请输入1-99的正整数"))
return
}
// 联动后总和恒为 100,这里只需校验单项合法
callback()
}
},
watch: {
// 基本工资占比变更时联动绩效工资占比
"isUpdateForm.basicSalaryProportion"(val) {
if (this._linkageLock) return
const v = this.sanitizePercent(val)
if (v === null) {
this._linkageLock = true
this.isUpdateForm.performanceSalaryProportion = ""
this._linkageLock = false
return
}
this._linkageLock = true
this.isUpdateForm.basicSalaryProportion = v
this.isUpdateForm.performanceSalaryProportion = 100 - v
this._linkageLock = false
},
// 绩效工资占比变更时联动基本工资占比
"isUpdateForm.performanceSalaryProportion"(val) {
if (this._linkageLock) return
const v = this.sanitizePercent(val)
if (v === null) {
this._linkageLock = true
this.isUpdateForm.basicSalaryProportion = ""
this._linkageLock = false
return
}
this._linkageLock = true
this.isUpdateForm.performanceSalaryProportion = v
this.isUpdateForm.basicSalaryProportion = 100 - v
this._linkageLock = false
}
} }
} }
</script> </script>
......
...@@ -695,6 +695,115 @@ ...@@ -695,6 +695,115 @@
</div> </div>
</div> </div>
</div> </div>
<div class="header" v-if="detail.staffBeisenBaseInfoDTO">
<h2>北森信息</h2>
<div class="info-wrap">
<div class="info-item flex">
<label>试用期底薪:</label>
<span>{{
detail.staffBeisenBaseInfoDTO.trialBasicSalary || "-"
}}</span>
</div>
<div class="info-item flex">
<label>转正后底薪:</label>
<span>{{
detail.staffBeisenBaseInfoDTO.formalBasicSalary || "-"
}}</span>
</div>
<div class="info-item flex">
<label>适配业务:</label>
<div>
{{
filterStr(
detail.staffBeisenBaseInfoDTO.staffSceneLabel,
staffSceneLabelList
)
}}
</div>
</div>
<div class="info-item flex">
<label>基本工资占比:</label>
<el-form-item
label=""
style="display: inline-block"
prop="basicSalaryProportion"
>
<el-input
class="flag-input"
v-model="detail.basicSalaryProportion"
placeholder="请输入"
>
<span slot="suffix" class="suffix_text">%</span>
</el-input>
</el-form-item>
</div>
<div class="info-item flex">
<label>绩效工资占比:</label>
<el-form-item
label=""
style="display: inline-block"
prop="performanceSalaryProportion"
>
<el-input
class="flag-input"
v-model="detail.performanceSalaryProportion"
placeholder="请输入"
>
<span slot="suffix" class="suffix_text">%</span>
</el-input>
</el-form-item>
</div>
<div class="info-item flex">
<label>生效月份:</label>
<el-form-item label="" prop="effectiveMonth">
<el-date-picker
v-model="detail.effectiveMonth"
type="month"
placeholder="选择月份"
:picker-options="monthPickerOptions"
size="small"
:clearable="false"
value-format="yyyy-MM"
>
</el-date-picker>
</el-form-item>
</div>
<div class="info-item flex">
<label>入职岗位:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.oidJobPost || "-" }}</span>
</div>
<div class="info-item flex">
<label>入职日期:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.entryDate || "-" }}</span>
</div>
<div class="info-item flex">
<label>离职日期:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.lastWorkDate || "-" }}</span>
</div>
<div class="info-item flex">
<label>职级:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.jobLevel || "-" }}</span>
</div>
<div class="info-item flex" style="width: 66%">
<label>入职门店:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.merchantName || "-" }}</span>
</div>
<div class="info-item flex">
<label>上级领导:</label>
<span>{{
detail.staffBeisenBaseInfoDTO.directLeaderName || "-"
}}</span>
</div>
<div class="info-item flex">
<label>手机号码:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.staffPhone || "-" }}</span>
</div>
<div class="info-item flex">
<label>转正日期:</label>
<span>{{ detail.staffBeisenBaseInfoDTO.officialDate || "-" }}</span>
</div>
</div>
</div>
<div class="header"> <div class="header">
<h2>账号信息</h2> <h2>账号信息</h2>
<div class="info-wrap"> <div class="info-wrap">
...@@ -750,6 +859,7 @@ import { limitPrice } from "@/common/format" ...@@ -750,6 +859,7 @@ import { limitPrice } from "@/common/format"
import dayjs from "dayjs" import dayjs from "dayjs"
import allocateStoreDialog from "./allocateStoreDialog.vue" import allocateStoreDialog from "./allocateStoreDialog.vue"
import { updateRecordOrderConfig } from "@api/inStoreManage" import { updateRecordOrderConfig } from "@api/inStoreManage"
import { updateBatchSalary } from "@/api/resident"
import { staffLevelList, staffSceneLabelList } from "@/common/constants" import { staffLevelList, staffSceneLabelList } from "@/common/constants"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { import {
...@@ -781,6 +891,10 @@ export default { ...@@ -781,6 +891,10 @@ export default {
}, },
data() { data() {
return { return {
monthPickerOptions: {
// 禁用当前月之前的所有月份(仅允许当月及未来)
disabledDate: (date) => dayjs(date).isBefore(dayjs(), "month")
},
filterStr, filterStr,
isEmpty, isEmpty,
staffSceneLabelList: staffSceneLabelList, staffSceneLabelList: staffSceneLabelList,
...@@ -818,7 +932,8 @@ export default { ...@@ -818,7 +932,8 @@ export default {
info: {}, info: {},
checkList: [], checkList: [],
detail: { detail: {
staffConfig: {} staffConfig: {},
bsEffectiveRule: {}
}, },
shopMerchant: "", shopMerchant: "",
workingStatusList: [ workingStatusList: [
...@@ -923,6 +1038,30 @@ export default { ...@@ -923,6 +1038,30 @@ export default {
}, },
allocateStoreVisible: false, allocateStoreVisible: false,
rules: { rules: {
performanceSalaryProportion: [
{
required: true,
message: "请输入",
trigger: "blur"
},
{
validator: (rule, value, callback) =>
this.validatePercent(value, callback),
trigger: "blur"
}
],
basicSalaryProportion: [
{
required: true,
message: "请输入",
trigger: "blur"
},
{
validator: (rule, value, callback) =>
this.validatePercent(value, callback),
trigger: "blur"
}
],
hireType: [ hireType: [
{ {
required: true, required: true,
...@@ -1015,7 +1154,8 @@ export default { ...@@ -1015,7 +1154,8 @@ export default {
confId: "2", confId: "2",
confName: "轻改" confName: "轻改"
} }
] ],
_linkageLock: false
} }
}, },
mounted() { mounted() {
...@@ -1030,7 +1170,55 @@ export default { ...@@ -1030,7 +1170,55 @@ export default {
this.getPermissionsList() this.getPermissionsList()
this.getPermissionsByPhone() this.getPermissionsByPhone()
}, },
watch: {
"detail.basicSalaryProportion"(val) {
console.log("detail.basicSalaryProportion", val)
if (this._linkageLock) return
const v = this.sanitizePercent(val)
if (v === null) {
this._linkageLock = true
this.detail.performanceSalaryProportion = ""
this._linkageLock = false
return
}
this._linkageLock = true
this.detail.basicSalaryProportion = v
this.detail.performanceSalaryProportion = 100 - v
this._linkageLock = false
},
"detail.performanceSalaryProportion"(val) {
if (this._linkageLock) return
const v = this.sanitizePercent(val)
if (v === null) {
this._linkageLock = true
this.detail.basicSalaryProportion = ""
this._linkageLock = false
return
}
this._linkageLock = true
this.detail.performanceSalaryProportion = v
this.detail.basicSalaryProportion = 100 - v
this._linkageLock = false
}
},
methods: { methods: {
sanitizePercent(val) {
const s = String(val == null ? "" : val).replace(/\D/g, "")
if (!s) return null
let n = parseInt(s, 10)
if (isNaN(n)) return null
if (n < 1) n = 1
if (n > 99) n = 99
return n
},
validatePercent(value, callback) {
const v = this.sanitizePercent(value)
if (v === null) {
callback(new Error("请输入1-99的正整数"))
return
}
callback()
},
getPermissionsByPhone() { getPermissionsByPhone() {
console.log(this.queryData.staffPhone, "this.queryData.staffPhone") console.log(this.queryData.staffPhone, "this.queryData.staffPhone")
getPermissionsByPhone({ getPermissionsByPhone({
...@@ -1162,11 +1350,6 @@ export default { ...@@ -1162,11 +1350,6 @@ export default {
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
) )
: "" : ""
console.log(
res.titleTypeStartEffectiveTime,
res.titleTypeStartEffectiveTimeStr,
" res.titleTypestartEffectiveTimeStr"
)
res.staffConfig = res.staffConfig || {} res.staffConfig = res.staffConfig || {}
res?.staffDailyReportConfigList?.forEach((v) => { res?.staffDailyReportConfigList?.forEach((v) => {
if (v.startEffectiveTime && !v.endEffectiveTime) { if (v.startEffectiveTime && !v.endEffectiveTime) {
...@@ -1189,7 +1372,20 @@ export default { ...@@ -1189,7 +1372,20 @@ export default {
res.staffDailyReportConfigList = res.staffDailyReportConfigList =
res.staffDailyReportConfigList || [] res.staffDailyReportConfigList || []
} }
this.detail = res || {} let bsEffectiveRule = {
performanceSalaryProportion: "",
basicSalaryProportion: "",
effectiveMonth: dayjs("2026-01").format("YYYY-MM")
}
if (
res.staffBeisenBaseInfoDTO &&
res.staffBeisenBaseInfoDTO.staffSalaryEffectiveRuleDTO
) {
bsEffectiveRule =
res.staffBeisenBaseInfoDTO.staffSalaryEffectiveRuleDTO
}
this.detail = Object.assign(res, bsEffectiveRule) || {}
console.log(this.detail, " this.detail")
this.tableData = res?.accountRecordList || [] this.tableData = res?.accountRecordList || []
} }
) )
...@@ -1494,7 +1690,15 @@ export default { ...@@ -1494,7 +1690,15 @@ export default {
} }
}) })
}, },
async handleUpdateConfirm(data) {
let params = {
staffPhoneList: this.detail.staffBeisenBaseInfoDTO.staffPhone,
basicSalaryProportion: this.detail.basicSalaryProportion,
performanceSalaryProportion: this.detail.performanceSalaryProportion,
effectiveMonth: this.detail.effectiveMonth
}
await updateBatchSalary(params)
},
// 提交修改内容 // 提交修改内容
handleConfirm() { handleConfirm() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -1539,6 +1743,7 @@ export default { ...@@ -1539,6 +1743,7 @@ export default {
// : this.detail.performSalary || 0 // : this.detail.performSalary || 0
} }
this.handleSingleChange() this.handleSingleChange()
this.handleUpdateConfirm()
editStaffApi(params).then((res) => { editStaffApi(params).then((res) => {
if (res) { if (res) {
// 修改扣款配置项数据 // 修改扣款配置项数据
......
...@@ -20,6 +20,26 @@ ...@@ -20,6 +20,26 @@
<template slot="titleBox1"> <template slot="titleBox1">
<div class="title_box">工资明细修正</div> <div class="title_box">工资明细修正</div>
</template> </template>
<!-- 选择门店 -->
<template slot="salaryMerchantList">
<el-select
class="select"
style="width: 432px"
filterable
v-model="infoForm.merchantIds"
multiple
collapse-tags
:multiple-limit="10"
@change="updateStaffList('staffPhoneList')"
>
<el-option
v-for="item in baseData.salaryMerchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId"
/>
</el-select>
</template>
<template slot="staffPhoneList"> <template slot="staffPhoneList">
<el-select <el-select
class="select" class="select"
...@@ -41,7 +61,7 @@ ...@@ -41,7 +61,7 @@
<template slot="monthPicker"> <template slot="monthPicker">
<el-date-picker <el-date-picker
v-model="infoForm.month" v-model="infoForm.month"
type="monthrange" type="month"
style="width: 432px" style="width: 432px"
:picker-options="monthPickerOptions" :picker-options="monthPickerOptions"
popper-class="statement-of-export-performance-month-picker" popper-class="statement-of-export-performance-month-picker"
...@@ -96,13 +116,71 @@ ...@@ -96,13 +116,71 @@
<template slot="titleBox3"> <template slot="titleBox3">
<div class="title_box">工资条导出</div> <div class="title_box">工资条导出</div>
</template> </template>
</glsx-combi-form>
<glsx-combi-form
class="edit-form-container"
ref="otherFormRef"
label-width="154px"
:is-block="true"
form-ref="editChildRef"
:form-obj="infoForm"
:form-data="otherFormData"
:form-rules="formRules"
>
<template slot="EsalaryMerchantList">
<el-select
class="select"
style="width: 432px"
filterable
v-model="infoForm.exportMerchantIds"
multiple
collapse-tags
:multiple-limit="10"
@change="updateStaffList('salaryMerchantList')"
>
<el-option
v-for="item in baseData.salaryMerchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId"
/>
</el-select>
</template>
<template slot="EstaffPhoneList">
<el-select
class="select"
style="width: 432px"
filterable
v-model="infoForm.exportStaffPhoneList"
multiple
collapse-tags
:multiple-limit="10"
>
<el-option
v-for="item in baseData.exportStaffList"
:key="item.staffPhone"
:label="item.staffName"
:value="item.staffPhone"
/>
</el-select>
</template>
<template slot="EmonthPicker">
<el-date-picker
v-model="infoForm.exportMonth"
type="month"
style="width: 432px"
:picker-options="monthPickerOptions"
popper-class="statement-of-export-performance-month-picker"
>
</el-date-picker>
</template>
<template slot="exportLook"> <template slot="exportLook">
<el-button <el-button
type="primary" type="primary"
plain plain
class="export_btn" class="export_btn"
size="small" size="small"
@click="exportData" @click="exportOtherData"
>导出查看</el-button >导出查看</el-button
> >
</template> </template>
...@@ -115,7 +193,13 @@ ...@@ -115,7 +193,13 @@
</template> </template>
<script> <script>
import { getLevelStaffListApi } from "@api/resident" import { Util, deepClone } from "@/common/util"
import {
getLevelStaffListApi,
getSalaryStaffList,
getSalaryMerchantList
} from "@api/resident"
import { mapActions, mapState, mapMutations } from "vuex"
export default { export default {
name: "exportPerformanceDialog", name: "exportPerformanceDialog",
data() { data() {
...@@ -127,13 +211,8 @@ export default { ...@@ -127,13 +211,8 @@ export default {
}, },
{ {
label: "选择门店", label: "选择门店",
name: "staffPhoneList", name: "merchantIds",
type: "select", addHtml: "salaryMerchantList"
isClear: true,
optionList: [],
optionId: "directLeaderPhone",
optionLabel: "directLeaderName",
optionsName: "directLeaderList"
}, },
{ {
label: "选择员工", label: "选择员工",
...@@ -162,26 +241,23 @@ export default { ...@@ -162,26 +241,23 @@ export default {
{ {
label: "", label: "",
addHtml: "titleBox3" addHtml: "titleBox3"
}, }
],
otherFormData: [
{ {
label: "选择门店", label: "选择门店",
name: "staffPhoneList", name: "exportStaffPhoneList",
type: "select", addHtml: "EsalaryMerchantList"
isClear: true,
optionList: [],
optionId: "directLeaderPhone",
optionLabel: "directLeaderName",
optionsName: "directLeaderList"
}, },
{ {
label: "选择员工", label: "选择员工",
name: "staffPhoneList", name: "exportStaffPhoneList",
addHtml: "staffPhoneList" addHtml: "EstaffPhoneList"
}, },
{ {
label: "选择时间", label: "选择时间",
name: "month", name: "exportMonth",
addHtml: "monthPicker", addHtml: "EmonthPicker",
rules: [{ required: true, message: "请选择时间", trigger: "change" }] rules: [{ required: true, message: "请选择时间", trigger: "change" }]
}, },
{ {
...@@ -190,9 +266,9 @@ export default { ...@@ -190,9 +266,9 @@ export default {
} }
], ],
formRules: { formRules: {
staffPhoneList: [ // staffPhoneList: [
{ required: true, message: "请选择员工", trigger: "change" } // { required: true, message: "请选择员工", trigger: "change" }
] // ]
}, },
monthPickerOptions: { monthPickerOptions: {
disabledDate(date) { disabledDate(date) {
...@@ -217,11 +293,17 @@ export default { ...@@ -217,11 +293,17 @@ export default {
} }
}, },
infoForm: { infoForm: {
merchantIds: [],
staffPhoneList: [], staffPhoneList: [],
month: [] month: "",
exportMerchantIds: [],
exportStaffPhoneList: [],
exportMonth: ""
}, },
baseData: { baseData: {
staffList: [] staffList: [],
exportStaffList: [],
salaryMerchantList: []
}, },
dialogConfig: { dialogConfig: {
title: "工资维护", title: "工资维护",
...@@ -237,6 +319,9 @@ export default { ...@@ -237,6 +319,9 @@ export default {
} }
}, },
computed: { computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
}),
visible: { visible: {
get() { get() {
return this.exportPerformanceVisible return this.exportPerformanceVisible
...@@ -251,27 +336,111 @@ export default { ...@@ -251,27 +336,111 @@ export default {
}, },
mounted() { mounted() {
this.getStaffList() this.getStaffList()
this.getSalaryMerchantList()
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.editFormRef?.$refs?.editChildRef?.clearValidate() this.$refs.editFormRef?.$refs?.editChildRef?.clearValidate()
}) })
}, },
methods: { methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]),
updateStaffList(key) {
let Methods =
key == "staffPhoneList" ? "getStaffList" : "exportGetStaffList"
this[Methods]()
},
exportGetStaffList() {
this.infoForm.exportStaffPhoneList = []
getSalaryStaffList({
pageSize: 9999,
currentPage: 1,
merchantIds: this.infoForm.exportMerchantIds
}).then((res) => {
this.baseData.exportStaffList = res?.list || []
})
},
// 获取员工下拉框数据 // 获取员工下拉框数据
getStaffList() { getStaffList() {
getLevelStaffListApi({ pageSize: 9999, currentPage: 1 }).then((res) => { this.infoForm.staffPhoneList = []
getSalaryStaffList({
pageSize: 9999,
currentPage: 1,
merchantIds: this.infoForm.merchantIds
}).then((res) => {
this.baseData.staffList = res?.list || [] this.baseData.staffList = res?.list || []
}) })
}, },
//获取门店
getSalaryMerchantList() {
getSalaryMerchantList({ pageSize: 9999, currentPage: 1 }).then((res) => {
this.baseData.salaryMerchantList = res?.list || []
})
},
// 导出 // 导出
exportData() { exportData() {
this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => { this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) { if (valid) {
if (this.infoForm?.staffPhoneList?.length > 10) if (this.infoForm?.staffPhoneList?.length > 10)
return this.$message.warning("最大不超过10个员工") return this.$message.warning("最大不超过10个员工")
this.$emit("handleExport", this.infoForm) // 查询类型(1:工资明细;2:工资条)
let params = {
merchantIdList: this.infoForm.merchantIds,
staffPhoneList: this.infoForm.staffPhoneList,
month: this.infoForm.month
}
params.queryType = 1
this.handleExport(params)
} }
}) })
}, },
exportOtherData() {
this.$refs.otherFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) {
if (this.infoForm?.staffPhoneList?.length > 10)
return this.$message.warning("最大不超过10个员工")
// 查询类型(1:工资明细;2:工资条)
let params = {
merchantIdList: this.infoForm.exportMerchantIds,
staffPhoneList: this.infoForm.exportStaffPhoneList,
month: this.infoForm.exportMonth
}
params.queryType = 2
this.handleExport(params)
}
})
},
handleExport(params) {
if (params.staffPhoneList?.length) {
params.staffPhoneList?.forEach((item, index) => {
const staffPhone = `staffPhones[${index}]`
params[staffPhone] = item
})
}
if (params.merchantIdList?.length) {
params.merchantIdList?.forEach((item, index) => {
const merchant = `merchantIds[${index}]`
params[merchant] = item
})
}
params.salaryMonth = Util.dateFormate(params.month, "YYYY-MM")
delete params.month
delete params.staffPhoneList
delete params.sceneType
delete params.merchantIdList
params.method =
"dj.api.smartcarlife.staffMonthSalary.staffSalary.exportAsync"
const list = [
...this.dowloadList,
{
name: params.queryType == 2 ? "工资条列表导出" : "工资明细修正列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
// 下载模板 // 下载模板
downloadTemplate() { downloadTemplate() {
......
<template>
<div class="page-wrap perf-page">
<div class="layout">
<!-- 绩效规则配置管理 -->
<div class="section-card" shadow="never">
<div class="section-title">绩效规则配置管理</div>
<div class="perf-level-grid">
<div class="inner-title">等级列表</div>
<div
class="perf-row"
v-for="row in performanceLevelDetailDTOS"
:key="row.levelCode"
>
<span :class="['level-pill', levelClassMap[row.levelCode]]">
{{ levelNameMap[row.levelCode] || row.levelCode }}
</span>
<span class="inline-label">分数:</span>
<div class="level-field">
<el-input
:value="row.scoreSymbolValue"
placeholder="仅输入><=与数字,0-200,最多两位小数"
@input="onScoreInput(row, $event)"
clearable
/>
</div>
<span class="inline-label">系数:</span>
<div class="level-field">
<el-input
:value="row.rewardCoefficient"
placeholder="0-10,最多两位小数"
@input="onCoefficientInput(row, $event)"
clearable
>
</el-input>
</div>
<div class="stars">
<el-rate :value="starMap[row.levelCode] || 0" :max="6" disabled />
</div>
</div>
</div>
</div>
<!-- 自动评绩效规则配置 -->
<div class="section-card" shadow="never">
<div class="section-title">
自动评绩效规则配置
<el-switch
v-model="autoPerformRuleDetailDTO.isAutoPerform"
:active-value="1"
:inactive-value="0"
style="margin-left: 16px"
/>
</div>
<div class="auto-rule-grid">
<!-- 当月入职新员工 - 条件配置 -->
<div>
<div class="sub-title">当月入职新员工规则条件配置</div>
<el-form
:model="autoPerformRuleDetailDTO"
label-width="150px"
class="rule-form"
>
<el-form-item label="出勤天数要求">
<el-input
:value="autoPerformRuleDetailDTO.monthOnboardAttendanceDays"
placeholder="1-30"
@input="
(val) =>
(autoPerformRuleDetailDTO.monthOnboardAttendanceDays =
sanitizeIntRange(val, 1, 30))
"
>
<template slot="append">天(≥此天数)</template>
</el-input>
</el-form-item>
<el-form-item label="产值阈值">
<el-input
:value="autoPerformRuleDetailDTO.monthOnboardOutputThreshold"
placeholder="5000-20000"
@input="
(val) =>
(autoPerformRuleDetailDTO.monthOnboardOutputThreshold =
sanitizeIntDigits(val))
"
@blur="
() =>
(autoPerformRuleDetailDTO.monthOnboardOutputThreshold =
finalizeIntRange(
autoPerformRuleDetailDTO.monthOnboardOutputThreshold,
5000,
20000
))
"
>
<template slot="append">元(<此值触发规则)</template>
</el-input>
</el-form-item>
<div class="sub-title">触发规则结果</div>
<el-form-item label="绩效等级">
<el-select
v-model="
autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode
"
placeholder="请选择"
@change="
(code) =>
handleTriggerLevelChange('monthOnboardTrigger', code)
"
>
<el-option
v-for="opt in limitedLevelOptions"
:key="opt.levelCode"
:label="levelNameMap[opt.levelCode]"
:value="opt.levelCode"
/>
</el-select>
</el-form-item>
<el-form-item label="绩效分数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.monthOnboardTriggerScore
}}</span>
</el-form-item>
<el-form-item label="奖励系数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.monthOnboardTriggerRewardCoefficient
}}</span>
</el-form-item>
<div class="sub-title small">
除上述规则以外,当月入职的新员工绩效默认为【B】
</div>
</el-form>
</div>
<!-- 非月入职员工 - 条件配置 -->
<div>
<div class="sub-title">非月入职员工规则条件</div>
<el-form
:model="autoPerformRuleDetailDTO"
label-width="180px"
class="rule-form"
>
<el-form-item label="产值阈值">
<el-input
:value="
autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold
"
placeholder="5000-20000"
@input="
(val) =>
(autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold =
sanitizeIntDigits(val))
"
@blur="
() =>
(autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold =
finalizeIntRange(
autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold,
5000,
20000
))
"
>
<template slot="append">元(<此值触发规则)</template>
</el-input>
</el-form-item>
<div class="sub-title small">触发规则结果</div>
<el-form-item label="绩效等级:">
<el-select
v-model="
autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode
"
placeholder="请选择"
@change="
(code) =>
handleTriggerLevelChange('noMonthOnboardTrigger', code)
"
>
<el-option
v-for="opt in limitedLevelOptions"
:key="opt.levelCode"
:label="levelNameMap[opt.levelCode]"
:value="opt.levelCode"
/>
</el-select>
</el-form-item>
<el-form-item label="绩效分数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.noMonthOnboardTriggerScore
}}</span>
</el-form-item>
<el-form-item label="奖励系数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.noMonthOnboardTriggerRewardCoefficient
}}</span>
</el-form-item>
<div class="sub-title small">
除上述规则以外,当月入职的新员工绩效默认为【B】
</div>
</el-form>
</div>
<!-- 生效配置 -->
<div>
<el-form
:model="autoPerformRuleDetailDTO"
label-width="180px"
class="rule-form"
>
<el-form-item label="生效月份">
<el-date-picker
v-model="autoPerformRuleDetailDTO.effectiveMonth"
type="month"
value-format="YYYY-MM"
:picker-options="monthPickerOptions"
placeholder="请选择生效月份"
/>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
<div class="footer">
<el-button
size="small"
:loading="btnLoding"
class="save-btn"
@click="handleSave"
>
确认
</el-button>
<el-button class="cancel-btn" size="small" @click="handleCancel"
>取消</el-button
>
</div>
</div>
</template>
<script>
import dayjs from "dayjs"
export default {
name: "ConfigurationPerformance",
data() {
return {
// 固定等级顺序与星级映射
starMap: { S: 6, A: 5, "B+": 4, B: 3, "B-": 2, C: 1, D: 0 },
levelNameMap: {
S: "S级",
A: "A级",
"B+": "B+级",
B: "B级",
"B-": "B-级",
C: "C级",
D: "D级"
},
// 等级样式映射
levelClassMap: {
S: "level-S",
A: "level-A",
"B+": "level-Bp",
B: "level-B",
"B-": "level-Bm",
C: "level-C",
D: "level-D"
},
// 绩效等级配置列表
performanceLevelDetailDTOS: [
{
levelCode: "S",
uuid: "",
scoreSymbolValue: "150",
rewardCoefficient: "2.0"
},
{
levelCode: "A",
uuid: "",
scoreSymbolValue: "120",
rewardCoefficient: "2.0"
},
{
levelCode: "B+",
uuid: "",
scoreSymbolValue: "110",
rewardCoefficient: "1.5"
},
{
levelCode: "B",
uuid: "",
scoreSymbolValue: "100",
rewardCoefficient: "1.0"
},
{
levelCode: "B-",
uuid: "",
scoreSymbolValue: "85",
rewardCoefficient: "0.8"
},
{
levelCode: "C",
uuid: "",
scoreSymbolValue: "70",
rewardCoefficient: "0.5"
},
{
levelCode: "D",
uuid: "",
scoreSymbolValue: "60",
rewardCoefficient: "0.0"
}
],
// 自动评绩效规则配置
autoPerformRuleDetailDTO: {
id: 0,
isAutoPerform: 1,
monthOnboardAttendanceDays: 15,
monthOnboardOutputThreshold: 10000,
monthOnboardTriggerLevelCode: "D",
monthOnboardTriggerScore: "",
monthOnboardTriggerRewardCoefficient: "",
monthOnboardDefaultLevelCode: "B",
monthOnboardDefaultScore: "",
monthOnboardDefaultRewardCoefficient: "",
noMonthOnboardOutputThreshold: 10000,
noMonthOnboardTriggerLevelCode: "D",
noMonthOnboardTriggerScore: "",
noMonthOnboardTriggerRewardCoefficient: "",
noMonthOnboardDefaultLevelCode: "B",
noMonthOnboardDefaultScore: "",
noMonthOnboardDefaultRewardCoefficient: "",
effectiveMonth: dayjs().toDate(),
effectiveStatus: 2,
status: 1,
performanceLevelUuid: ""
},
monthPickerOptions: {
disabledDate: (date) => dayjs(date).isBefore(dayjs(), "month") // 仅允许当月及未来月份
}
}
},
computed: {
// 限定只可选择 B- / C / D
limitedLevelOptions() {
return this.performanceLevelDetailDTOS.filter((l) =>
["B-", "C", "D"].includes(l.levelCode)
)
}
},
created() {
// TODO: 加载后端数据
this.syncAllTriggerDefaults()
},
methods: {
sanitizeIntDigits(val) {
const s = String(val == null ? "" : val).replace(/[^\d]/g, "")
return s
},
finalizeIntRange(val, min, max) {
const s = String(val == null ? "" : val).replace(/[^\d]/g, "")
if (!s) return ""
let n = parseInt(s, 10)
if (isNaN(n)) return ""
if (n < min) n = min
if (n > max) n = max
return String(n)
},
sanitizeIntRange(val, min, max) {
const raw = String(val == null ? "" : val)
const s = raw.replace(/[^\d]/g, "")
if (!s) return ""
let n = parseInt(s, 10)
if (isNaN(n) || n === 0) return ""
if (n > max) n = max
if (n < min) n = min
return String(n)
},
// 保留:固定两位(如确实需要的场景)
sanitizeFloatRange(val, min, max, fixed = 2) {
const s = String(val == null ? "" : val).replace(/[^\d.]/g, "")
if (!s) return ""
let n = parseFloat(s)
if (isNaN(n)) return ""
if (n < min) n = min
if (n > max) n = max
return n.toFixed(fixed)
},
// 新增:不补零,仅限制最多两位小数(通用清洗)
sanitizeFloatRangeLoose(val, maxDecimals = 2) {
let s = String(val == null ? "" : val).replace(/[^\d.]/g, "")
if (!s) return ""
const firstDot = s.indexOf(".")
if (firstDot !== -1) {
const before = s.slice(0, firstDot)
const after = s.slice(firstDot + 1).replace(/\./g, "")
s = `${before}.${after}`
}
const [intPart, decPart] = s.split(".")
if (decPart != null) {
s = `${intPart}.${decPart.slice(0, maxDecimals)}`
}
return s
},
// 分数:解析符号 + 最多两位小数 + 范围约束(不补零)
// 旧签名兼容:改为调用不补零版本,忽略 fixed 参数
parseScoreWithSymbol(val, min, max) {
const raw = String(val == null ? "" : val)
const m = raw.match(/[><=]|[<>=]/)
const signRaw = m ? m[0] : ""
const sign = signRaw
.replace("<", "<")
.replace(">", ">")
.replace("=", "=")
const body = raw.replace(/[<>=\s]|[<>=]/g, "")
let cleaned = this.sanitizeFloatRangeLoose(body, 2)
if (cleaned) {
const n = parseFloat(cleaned)
if (!isNaN(n)) {
if (n > max) cleaned = String(max)
if (n < min) cleaned = String(min)
} else {
cleaned = ""
}
}
const display = sign ? (cleaned ? `${sign} ${cleaned}` : sign) : cleaned
const numeric = cleaned
return { sign, numeric, display }
},
// 后半段联动:去掉固定两位依赖,保持不补.00
handleTriggerLevelChange(place, code) {
const src = this.performanceLevelDetailDTOS.find(
(l) => l.levelCode === code
)
if (!src) return
const parsed = this.parseScoreWithSymbol(
src.scoreNumericValue || src.scoreSymbolValue,
0,
200
)
const score = parsed.numeric
if (place === "monthOnboardTrigger") {
this.autoPerformRuleDetailDTO.monthOnboardTriggerScore = score
this.autoPerformRuleDetailDTO.monthOnboardTriggerRewardCoefficient =
src.rewardCoefficient
} else if (place === "monthOnboardDefault") {
this.autoPerformRuleDetailDTO.monthOnboardDefaultScore = score
this.autoPerformRuleDetailDTO.monthOnboardDefaultRewardCoefficient =
src.rewardCoefficient
} else if (place === "noMonthOnboardTrigger") {
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerScore = score
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerRewardCoefficient =
src.rewardCoefficient
} else if (place === "noMonthOnboardDefault") {
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultScore = score
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultRewardCoefficient =
src.rewardCoefficient
}
},
// 保存前校验:分数取数值部分;系数 0-10 且最多两位小数(由输入清洗保证)
validateBeforeSave() {
for (const r of this.performanceLevelDetailDTOS) {
const { numeric } = this.parseScoreWithSymbol(
r.scoreNumericValue || r.scoreSymbolValue,
0,
200
)
const score = Number(numeric)
const coef = Number(r.rewardCoefficient)
if (isNaN(score) || score < 0 || score > 200) {
this.$message.error(
`${this.levelNameMap[r.levelCode]}分数需为0-200,最多2位小数`
)
return false
}
if (isNaN(coef) || coef < 0 || coef > 10) {
this.$message.error(
`${this.levelNameMap[r.levelCode]}奖励系数需为0-10,最多2位小数`
)
return false
}
}
// 新员工
const a = Number(this.autoPerformRuleDetailDTO.monthOnboardAttendanceDays)
if (!Number.isInteger(a) || a < 1 || a > 30) {
this.$message.error("出勤天数需为1-30的整数")
return false
}
const mOut = Number(
this.autoPerformRuleDetailDTO.monthOnboardOutputThreshold
)
if (!Number.isInteger(mOut) || mOut < 5000 || mOut > 20000) {
this.$message.error("当月入职新员工产值阈值需为5000-20000的整数")
return false
}
// 非新员工
const noOut = Number(
this.autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold
)
if (!Number.isInteger(noOut) || noOut < 5000 || noOut > 20000) {
this.$message.error("非月入职员工产值阈值需为5000-20000的整数")
return false
}
// 等级选择限制
const selectedCodes = [
this.autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode,
this.autoPerformRuleDetailDTO.monthOnboardDefaultLevelCode,
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode,
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultLevelCode
]
if (selectedCodes.some((c) => !["B-", "C", "D"].includes(c))) {
this.$message.error("自动评绩效规则的绩效等级仅可选择 B- / C / D")
return false
}
return true
},
handleCancel() {
this.$router.replace("/inStoreManage")
},
// 分数输入:保留符号回显,数值用于联动和校验(不自动补.00)
onScoreInput(row, val) {
const { sign, numeric, display } = this.parseScoreWithSymbol(val, 0, 200)
row.scoreSymbolSign = sign
row.scoreNumericValue = numeric
row.scoreSymbolValue = display
},
// 系数输入:0-10,最多两位小数,不自动补.00
onCoefficientInput(row, val) {
let cleaned = this.sanitizeFloatRangeLoose(val, 2)
if (cleaned) {
const n = parseFloat(cleaned)
if (!isNaN(n)) {
if (n > 10) cleaned = "10"
if (n < 0) cleaned = "0"
} else {
cleaned = ""
}
}
row.rewardCoefficient = cleaned
},
handleTriggerLevelChange(place, code) {
const src = this.performanceLevelDetailDTOS.find(
(l) => l.levelCode === code
)
if (!src) return
const parsed = this.parseScoreWithSymbol(
src.scoreNumericValue || src.scoreSymbolValue,
0,
200,
2
)
const score = parsed.numeric
if (place === "monthOnboardTrigger") {
this.autoPerformRuleDetailDTO.monthOnboardTriggerScore = score
this.autoPerformRuleDetailDTO.monthOnboardTriggerRewardCoefficient =
src.rewardCoefficient
} else if (place === "monthOnboardDefault") {
this.autoPerformRuleDetailDTO.monthOnboardDefaultScore = score
this.autoPerformRuleDetailDTO.monthOnboardDefaultRewardCoefficient =
src.rewardCoefficient
} else if (place === "noMonthOnboardTrigger") {
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerScore = score
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerRewardCoefficient =
src.rewardCoefficient
} else if (place === "noMonthOnboardDefault") {
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultScore = score
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultRewardCoefficient =
src.rewardCoefficient
}
},
// 将四处联动值按当前选择初始化一次
syncAllTriggerDefaults() {
this.handleTriggerLevelChange(
"monthOnboardTrigger",
this.autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode
)
this.handleTriggerLevelChange(
"monthOnboardDefault",
this.autoPerformRuleDetailDTO.monthOnboardDefaultLevelCode
)
this.handleTriggerLevelChange(
"noMonthOnboardTrigger",
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode
)
this.handleTriggerLevelChange(
"noMonthOnboardDefault",
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultLevelCode
)
},
// 保存(对接你的接口)
async handleSave() {
if (!this.validateBeforeSave()) return
const payload = {
performanceLevelDetailDTOS: this.performanceLevelDetailDTOS.map(
(r) => ({
levelCode: r.levelCode,
uuid: r.uuid,
scoreSymbolValue: String(r.scoreSymbolValue),
rewardCoefficient: Number(r.rewardCoefficient)
})
),
autoPerformRuleDetailDTO: {
...this.autoPerformRuleDetailDTO
}
}
try {
// TODO: 替换为真实接口
// await api.savePerformanceConfig(payload)
console.log("payload =>", payload)
this.$message.success("保存成功(示例)")
} catch (e) {
this.$message.error("保存失败")
}
},
handleReset() {
this.$confirm("确认重置为默认示例配置?", "提示", { type: "warning" })
.then(() => {
// 简单恢复初始示例值
this.performanceLevelDetailDTOS = JSON.parse(
JSON.stringify(this.$options.data().performanceLevelDetailDTOS)
)
this.autoPerformRuleDetailDTO = JSON.parse(
JSON.stringify(this.$options.data().autoPerformRuleDetailDTO)
)
this.syncAllTriggerDefaults()
})
.catch(() => {})
}
}
}
</script>
<style lang="scss" scoped>
.page-wrap {
padding: 0 20px;
height: 100vh;
.layout {
height: calc(100% - 190px);
overflow: scroll;
&::-webkit-scrollbar {
width: 1px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 4px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-corner {
background-color: transparent;
}
// 修改滚动条样式为透明
&::-webkit-scrollbar {
width: 1px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 1px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-corner {
background-color: transparent;
}
}
.footer {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
.save-btn {
// width: 60px;
padding: 5px 14px;
line-height: 22px;
border-radius: 4px;
border: 1px solid #2a58ad;
background: #2a58ad;
color: #ffffff;
font-size: 14px;
height: 32px;
box-sizing: border-box;
}
.cancel-btn {
color: #666666;
font-size: 14px;
width: 56px;
height: 32px;
padding: 5px 14px;
border-radius: 4px;
background: #e8e8e8;
line-height: 22px;
box-sizing: border-box;
}
}
}
.section-card {
margin-bottom: 20px;
background: #fff;
}
.section-title {
font-weight: 600;
color: #333333;
font-size: 16px;
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
border-bottom: 1px solid #e5e5e5;
padding: 13.5px 20px;
box-sizing: border-box;
}
.perf-level-grid {
padding: 20px;
box-sizing: border-box;
.perf-row {
display: flex;
align-items: center;
margin-bottom: 13px;
}
.inner-title {
color: #222222;
font-size: 14px;
font-weight: 400;
margin-bottom: 8.5px;
}
}
.level-pill {
width: 116px;
height: 30px;
border-radius: 20px;
padding: 5px 0;
text-align: center;
display: inline-block;
color: #222222;
font-size: 14px;
font-weight: 500;
box-sizing: border-box;
}
.level-pill.level-S {
background: #e9e0fa;
}
.level-pill.level-A {
background: #d8f4d4;
}
.level-pill.level-Bp {
background: #d6f5ef;
} /* B+ */
.level-pill.level-B {
background: #e6efff;
}
.level-pill.level-Bm {
background: #d5f1fa;
} /* B- */
.level-pill.level-C {
background: #f7efcd;
}
.level-pill.level-D {
background: #f9e0e0;
}
.inline-label {
color: #666666;
font-size: 14px;
margin: 0 2px 0 12px;
}
.level-field {
width: 90px;
display: flex;
align-items: center;
height: 30px;
}
.level-field .el-input,
.level-field .el-input-number {
width: 100%;
}
.level-field .hint {
margin-left: 8px;
color: var(--hd-muted-color);
font-size: 12px;
}
/* 星级:保证尺寸与间距一致(容器占位) */
.stars {
display: inline-flex;
align-items: center;
gap: 3px;
height: 30px;
margin-left: 12px;
}
.section-switch {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-top: 1px dashed var(--hd-border);
border-bottom: 1px dashed var(--hd-border);
margin-bottom: 16px;
}
/* 自动评绩效规则:≥1280 两列,窄屏一列 */
.auto-rule-grid {
padding: 0 48px 20px;
display: grid;
gap: var(--hd-gap-20);
.sub-title {
color: #333333;
font-size: 14px;
margin: 20px 0;
font-weight: 600;
}
.small {
padding-bottom: 20px;
border-bottom: 1px solid #e8e8ea;
}
::v-deep .el-input-group__append {
border: 0 !important;
background: #fff !important;
padding: 0 8px;
}
::v-deep .el-input-group {
width: 90px;
}
::v-deep .el-input__inner {
width: 90px;
}
::v-deep .el-select .el-input__inner {
width: 136px;
height: 30px;
line-height: 30px;
}
::v-deep .el-date-editor .el-input__inner {
width: 136px;
}
::v-deep .el-date-editor.el-input {
width: 136px;
}
.inline-label {
color: #333333;
font-size: 14px;
}
}
/* ElementUI 控件紧凑化:高度、内边距、增减器宽度 */
.perf-page .el-form-item {
margin-bottom: 12px;
}
.perf-page {
::v-deep .el-input__inner {
height: 30px;
line-height: 30px;
}
::v-deep .el-form-item__label {
color: #666666;
font-size: 14px;
}
::v-deep .el-select .el-input__inner {
height: 30px;
line-height: 30px;
}
::v-deep .el-date-editor.el-input__inner {
width: 136px;
height: 30px;
line-height: 30px;
}
}
</style>
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
<span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9120513']" /> <auth-button category="Button" :show-btn-ids="['9120513']" />
</span> </span>
<!-- <span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9120512']" /> <auth-button category="Button" :show-btn-ids="['9120515']" />
</span> --> </span>
<span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9120511']" /> <auth-button category="Button" :show-btn-ids="['9120511']" />
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
></PermissionDialog> ></PermissionDialog>
<!-- 批量修改薪资占比 --> <!-- 批量修改薪资占比 -->
<batch-modify-salary-dialog <batch-modify-salary-dialog
:staffPhoneList="staffPhoneList"
v-if="batchModifySalaryVisible" v-if="batchModifySalaryVisible"
:visible.sync="batchModifySalaryVisible" :visible.sync="batchModifySalaryVisible"
></batch-modify-salary-dialog> ></batch-modify-salary-dialog>
...@@ -147,7 +148,8 @@ export default { ...@@ -147,7 +148,8 @@ export default {
}, },
data() { data() {
return { return {
batchModifySalaryVisible: true, batchModifySalaryVisible: false,
staffPhoneList: [],
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
labelWidth: "110px", labelWidth: "110px",
permissionVisible: false, permissionVisible: false,
...@@ -258,6 +260,8 @@ export default { ...@@ -258,6 +260,8 @@ export default {
], ],
getListApi: getResidentListApi, getListApi: getResidentListApi,
tableParams: { tableParams: {
mutiSelectUniqueKey: "id",
mutiSelectName: "mutiSelectIndex",
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
tableOption: { width: "130px" }, tableOption: { width: "130px" },
...@@ -449,6 +453,21 @@ export default { ...@@ -449,6 +453,21 @@ export default {
}, },
methods: { methods: {
// 绩效规则配置
handleConfigurationPerformance() {
this.$router.push("/configurationPerformance")
},
filterIds() {
let staffPhoneList = []
if (this.$refs.recordTable.mutiSelectArr.mutiSelectIndex) {
this.$refs.recordTable.mutiSelectArr.mutiSelectIndex.forEach((item) => {
staffPhoneList.push(item.staffPhone)
})
}
return staffPhoneList
},
...mapActions({ ...mapActions({
get: "d2admin/base/get", get: "d2admin/base/get",
close: "d2admin/page/close" close: "d2admin/page/close"
...@@ -459,7 +478,14 @@ export default { ...@@ -459,7 +478,14 @@ export default {
this.getOptionsList() this.getOptionsList()
}, },
//批量修改薪资占比 //批量修改薪资占比
handleUpdateSalary() {}, handleUpdateSalary() {
if (!this.filterIds().length) {
this.$message.warning("请先选择员工")
return
}
this.staffPhoneList = this.filterIds()
this.batchModifySalaryVisible = true
},
//上级领导列表查询 //上级领导列表查询
getLeaderList() { getLeaderList() {
getLeaderList().then((res) => { getLeaderList().then((res) => {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
margin-bottom: 20px; margin-bottom: 20px;
} }
::v-deep .el-form-item__content { ::v-deep .el-form-item__content {
width: calc(100% - 150px); // width: calc(100% - 150px);
word-break: break-all; word-break: break-all;
line-height: 20px; line-height: 20px;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-form <el-form
:ref="item.childRef" :ref="item.childRef"
class="edit-sub-block" class="edit-sub-block"
label-width="150px" :label-width="labelWidth ? labelWidth : '150px'"
:inline="true" :inline="true"
:model="detailInfo" :model="detailInfo"
:rules="rules" :rules="rules"
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
:maxlength="item.maxLength || ''" :maxlength="item.maxLength || ''"
size="small" size="small"
class="edit-form-item" class="edit-form-item"
:disabled="item.isDisabled ? true : false"
> >
<span <span
class="unit" class="unit"
...@@ -77,6 +78,7 @@ ...@@ -77,6 +78,7 @@
" "
v-model="detailInfo[item.key]" v-model="detailInfo[item.key]"
:maxlength="item.maxLength" :maxlength="item.maxLength"
:disabled="item.isDisabled ? true : false"
class="edit-form-item" class="edit-form-item"
> >
</el-input> </el-input>
...@@ -134,7 +136,7 @@ ...@@ -134,7 +136,7 @@
<span v-else :style="{ ...item.style }" <span v-else :style="{ ...item.style }"
>{{ >{{
item.formatter item.formatter
? item.formatter(detailInfo) || "-" ? item.formatter(detailInfo)
: detailInfo[item.key] : detailInfo[item.key]
? detailInfo[item.key] ? detailInfo[item.key]
: "-" : "-"
......
<!-- 店面配置 --> <!-- 店面配置 -->
<template> <template>
<div class="shopConfig"> <div class="shopConfig">
<div class="header" <div class="header" slot="header">
slot="header"> <el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tabs v-model="activeName" <el-tab-pane label="店铺设置" name="shopSet" />
@tab-click="handleClickTabs"> <el-tab-pane label="门店产值" name="outputValue" />
<el-tab-pane label="店铺设置" <el-tab-pane label="主机厂交付数" name="deliveryQuantity" />
name="shopSet" /> <el-tab-pane label="个人交付成交率" name="personalConversionRate" />
<el-tab-pane label="门店产值" <el-tab-pane label="门店毛利额" name="storeGrossProfit" />
name="outputValue" /> <el-tab-pane label="有效引荐数" name="validReferrals" />
<el-tab-pane label="主机厂交付数"
name="deliveryQuantity" />
<el-tab-pane label="个人交付成交率"
name="personalConversionRate" />
<el-tab-pane label="门店毛利额"
name="storeGrossProfit" />
</el-tabs> </el-tabs>
<div> <div>
<shop-set v-if="activeName === 'shopSet'" /> <shop-set v-if="activeName === 'shopSet'" />
<output-value v-if="activeName === 'outputValue'" /> <output-value v-if="activeName === 'outputValue'" />
<delivery-quantity v-if="activeName === 'deliveryQuantity'" /> <delivery-quantity v-if="activeName === 'deliveryQuantity'" />
<personal-conversion-rate v-if="activeName === 'personalConversionRate'"/> <personal-conversion-rate
<store-gross-profit v-if="activeName === 'storeGrossProfit'"/> v-if="activeName === 'personalConversionRate'"
/>
<store-gross-profit v-if="activeName === 'storeGrossProfit'" />
<valid-referrals v-if="activeName === 'validReferrals'" />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import shopSet from './index' import shopSet from "./index"
import outputValue from './outputValue/index' import outputValue from "./outputValue/index"
import deliveryQuantity from './deliveryQuantity/index' import deliveryQuantity from "./deliveryQuantity/index"
import personalConversionRate from './personalConversionRate/index' import personalConversionRate from "./personalConversionRate/index"
import storeGrossProfit from './storeGrossProfit/index' import storeGrossProfit from "./storeGrossProfit/index"
import { deepClone } from '@/common/util' import validReferrals from "./validReferrals/index"
import { deepClone } from "@/common/util"
export default { export default {
name: 'StaffIndex', name: "StaffIndex",
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
activeName: 'shopSet', activeName: "shopSet",
recordInfo: {} recordInfo: {}
} }
}, },
...@@ -49,24 +47,22 @@ export default { ...@@ -49,24 +47,22 @@ export default {
outputValue, outputValue,
deliveryQuantity, deliveryQuantity,
personalConversionRate, personalConversionRate,
storeGrossProfit storeGrossProfit,
validReferrals
}, },
mounted() { mounted() {},
},
methods: { methods: {
handleClickTabs() { handleClickTabs() {
this.recordInfo = {} this.recordInfo = {}
}, },
gotoDetail(params) { gotoDetail(params) {
this.activeName = 'details' this.activeName = "details"
this.recordInfo = deepClone(params) this.recordInfo = deepClone(params)
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.shopConfig { .shopConfig {
......
<!-- 有效引荐数 -->
<template>
<d2-container class="layout m-t-40">
<div class="header">
<d2-search
ref="showSearch"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px"
:selectPopperAppendToBody="false"
class="d2-search"
>
</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>
<el-button
size="small"
type="primary"
@click="handleExport"
class="exprot"
>
导出
</el-button>
</d2-table-header>
<!-- :get-list-api="getListApi" -->
<d2-table
ref="tableRef"
:search-form="searchFormSearch"
:table-params="tableParams"
:tableData="tableData"
:before-search-fn="beforeSearchFn"
>
<div slot="imageUrls" slot-scope="scope" class="coverImage-preview">
<glsx-preview
:image-url-arr="
scope.scope.imageUrls
? formatterImg(scope.scope.imageUrls)
: [noDataUrl]
"
:pic-options="picOptions"
limit="1"
></glsx-preview>
</div>
<template slot="remark" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.remark || "-" }}
</div>
<span class="tag" slot="reference">{{
scope.scope.remark || "-"
}}</span>
</el-popover>
</template>
<template slot="merchantName" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.merchantName || "-" }}
</div>
<span class="tag" slot="reference">{{
scope.scope.merchantName || "-"
}}</span>
</el-popover>
</template>
</d2-table>
</div>
</d2-container>
</template>
<script type="text/ecmascript-6">
import {
Util,
deepClone,
getStatusItem,
getOptionsList
} from "@/common/util"
import { listShop4sByRef } from "@api/merchant"
import {
getEffectiveReferralList
} from "@api/shopConfig"
import { mapActions, mapState } from "vuex"
import dayjs from "dayjs"
export default {
name: "",
data() {
return {
id: "",
replyVisible: false,
noDataUrl: require("@/assets/noData.png"),
tableData: [
{
id: 0,
merchantId: 0,
merchantName: "深圳市鹏峰丰田汽车有限公司",
sceneType: 1,
brandId: 0,
brandName: "问界",
totalDeliveryCount: 0,
areaEffectiveCount: 0,
reviewedEffectiveCount: 0,
imageUrls: "https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/1762758178815_9zhk7os8.png,https://qcimg01.glsx.com.cn/group1/M00/11/2F/wKgD3mlt-HGAK-loAATqOHxW64c252.jpg",
remark: "分享时机,在不同的时机时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时时机,在不同的时机分析用户是分享时分析用户是分享时机,在不同的时机分析用户是分享时机,在不同的时机分析用户是",
managerCommitTime: "",
isReviewed: 0,
managerId: "",
managerName: "尹小燕",
reviewedBy: "",
reviewedName: "尹小燕ww"
}
],
searchForm: {
merchantId: "",
managerName: "",
sceneType: ""
},
searchFormSearch: {},
showFormData: [
{
label: "门店名称",
name: "merchantName",
type: "input",
isClear: true
},
{
label: "区域运营",
name: "managerName",
type: "input",
isClear: true
},
{
label: "业务场景",
name: "sceneType",
type: "select",
isClear: true,
optionList: [],
optionId: "confId",
optionLabel: "confValue",
optionsName: "businessTypeOpts"
}
],
getListApi: getEffectiveReferralList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: "门店",
prop: "merchantName",
minWidth: "150",
addHtml: "merchantName"
},
{
label: "系统交车数",
prop: "totalDeliveryCount",
minWidth: "150",
formatter:(cellValue)=>{
return cellValue.totalDeliveryCount===0||cellValue.totalDeliveryCount?cellValue.totalDeliveryCount:'-'
}
},
{
label: "区域有效引荐数",
prop: "areaEffectiveCount",
minWidth: "150",
formatter:(cellValue)=>{
return cellValue.areaEffectiveCount===0||cellValue.areaEffectiveCount?cellValue.areaEffectiveCount:'-'
}
},
{
label: "线上有效引荐数",
prop: "reviewedEffectiveCount",
minWidth: "150",
formatter:(cellValue)=>{
return cellValue.reviewedEffectiveCount===0||cellValue.reviewedEffectiveCount?cellValue.reviewedEffectiveCount:'-'
}
},
{
label: "业务场景",
prop: "sceneType",
minWidth: "100",
formatter: (cellValue) => {
return getStatusItem(
this.baseData,
"businessTypeOpts",
cellValue,
"sceneType"
)
}
},
{
label: "车辆品牌",
prop: "brandName"
},
{
label: "上传凭证",
prop: "imageUrls",
width: "138px",
addHtml: "imageUrls"
},
{
label: "备注",
minWidth: "150",
prop: "remark",
addHtml: "remark"
},
{
label: "区域经理",
minWidth: "150",
prop: "managerName"
},
{
label: "运营复核人",
minWidth: "150",
prop: "reviewedName"
},
{
label: "核查月份",
prop: "reviewMonth"
}
]
},
picOptions: {
width: "138px",
height: "54px",
isClose: false
},
baseData: {
businessTypeOpts: [
{
confId: 3,
confValue: "单延保"
},
{
confId: 2,
confValue: "广联权益"
},
{
confId: 1,
confValue: "轻改"
}
]
}
}
},
mounted() {
getOptionsList(this, "showFormData", true)
// this.fetchOnboardingPlans()
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
formatterImg(val) {
if (!val) return []
let arr = val.split(',')
return arr
},
async fetchOnboardingPlans() {
try {
const [merchantIdList] = await Promise.all([
listShop4sByRef({
yqMerchantId: ""
})
])
// 处理返回的数据
this.baseData.merchantIdList = merchantIdList
getOptionsList(this, "showFormData", true)
} catch (error) {
console.error(error)
}
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
formatDate(date) {
return dayjs(date).format("YYYY-MM-DD")
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.search()
},
handleExport() {
let params = this.searchFormSearch
params.method =
"dj.staff.api.effective.referral.export.async"
const list = [
...this.dowloadList,
{
name: "有效引荐数列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
search() {
this.$refs.tableRef.refreshTable(false, true)
},
handleToReply(data) {
this.id = data.id
this.replyVisible = !this.replyVisible
}
}
}
</script>
<style scoped lang="scss">
.m-t-40 {
margin-top: 40px;
}
.layout {
.d2-search {
::v-deep.el-select-dropdown,
.el-popper {
width: 300px !important;
}
}
.content {
position: absolute;
left: 20px;
width: calc(100% - 40px);
padding: 0 20px 36px;
background: #fff;
margin-top: 14px;
height: calc(100% - 110px);
box-sizing: border-box;
overflow-y: auto;
.top {
height: 52px;
color: #333333;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
.exprot {
margin-left: auto;
}
}
}
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
padding: 0 10px;
display: block;
}
}
.coverImage-preview {
width: 138px;
height: 54px;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!