Commit 0ebd49ca by wangzhihui

```

feat(orderManage): 优化引荐数审核页面显示效果

- 在remark和merchantName字段添加条件渲染,避免空值显示popover
- 优化代码缩进格式,提升可读性

fix(inStoreManage): 修复批量修改薪资弹窗样式和验证问题

- 为批量修改薪资弹窗组件添加CSS类名并调整宽度从500px到480px
- 为effectiveMonth字段添加必填验证规则
- 在日期选择器上添加CSS类名以控制宽度

fix(inStoreManage): 修复编辑员工表单验证规则

- 为effectiveMonth字段添加必填验证规则,确保用户必须选择生效月份

fix(configurationPerformance): 修复绩效配置数值处理逻辑

- 修改小数处理逻辑,保留指定小数位数时包含尾随小数点
- 修改验证逻辑,允许值为0的情况通过验证

feat(validReferrals): 优化有效引荐页面字段显示

- 在remark和merchantName字段添加条件渲染,避免空值显示popover
- 统一代码缩进格式,提升代码可读性
```
1 parent e509c083
<!-- 引荐数审核 -->
<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="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-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>
<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="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-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"
:get-list-api="getListApi"
: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>
<!-- :get-list-api="getListApi" -->
<d2-table
ref="tableRef"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
: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">
<template v-if="scope.scope.remark">
<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 v-else>-</template>
</template>
<template slot="merchantName" slot-scope="scope">
<template v-if="scope.scope.merchantName">
<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>
<template v-else>-</template>
</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">
......@@ -502,70 +525,70 @@ export default {
<style scoped lang="scss">
.layout {
.d2-search {
::v-deep.el-select-dropdown,
.el-popper {
width: 300px !important;
}
}
.header {
background: #fff;
}
.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;
.d2-search {
::v-deep.el-select-dropdown,
.el-popper {
width: 300px !important;
}
}
.header {
background: #fff;
}
.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;
}
}
.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;
}
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;
max-width: 50vw;
}
</style>
......@@ -14,6 +14,7 @@
@handleClose="closeDialogVisible"
@handleConfirm="handleUpdateConfirm"
:slotArr="slotArr"
class="batch-modify-salary-dialog"
>
<template slot="effectiveMonth">
<el-date-picker
......@@ -24,6 +25,7 @@
size="small"
:clearable="false"
value-format="yyyy-MM"
class="effectiveMonth"
>
</el-date-picker>
</template>
......@@ -62,7 +64,7 @@ export default {
},
isUpdateDialogConfig: {
title: "批量修改薪资占比",
width: "500px",
width: "480px",
okText: "确定"
},
isUpdateForm: {
......@@ -111,6 +113,9 @@ export default {
this.validatePercent(value, callback),
trigger: "blur"
}
],
effectiveMonth: [
{ required: true, message: "请选择", trigger: "change" }
]
},
baseData: {},
......@@ -195,4 +200,10 @@ export default {
}
}
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.batch-modify-salary-dialog{
::v-deep .el-date-editor.el-input{
width: 290px!important;
}
}
</style>
......@@ -77,7 +77,8 @@
></glsx-preview>
</div>
<template slot="remark" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover">
<template v-if="scope.scope.remark">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.remark || "-" }}
</div>
......@@ -85,16 +86,21 @@
scope.scope.remark || "-"
}}</span>
</el-popover>
</template>
<template v-else>-</template>
</template>
<template slot="replyContent" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.replyContent || "-" }}
</div>
<span class="tag" slot="reference">{{
scope.scope.replyContent || "-"
}}</span>
</el-popover>
<template v-if="scope.scope.replyContent">
<el-popover placement="top" width="fit-content" trigger="hover">
<div class="tags-popover">
{{ scope.scope.replyContent || "-" }}
</div>
<span class="tag" slot="reference">{{
scope.scope.replyContent || "-"
}}</span>
</el-popover>
</template>
<template v-else>-</template>
</template>
<div slot="auth-button" slot-scope="scope">
<el-button
......
......@@ -1062,6 +1062,11 @@ export default {
trigger: "blur"
}
],
effectiveMonth:[{
required: true,
message: "请选择",
trigger: "blur"
}],
hireType: [
{
required: true,
......
......@@ -374,10 +374,9 @@ export default {
intPart = (intPart || "").replace(/^0+(?=\d)/, "")
if (intPart === "") intPart = "0"
if (decPart != null) {
// 截断到指定位数的小数
// 保留到指定小数位数;当还没输入小数位时保留尾随小数点
decPart = decPart.slice(0, maxDecimals)
// 如果没有小数位,去掉小数点
s = decPart.length > 0 ? `${intPart}.${decPart}` : intPart
s = `${intPart}.${decPart}`
} else {
s = intPart
}
......@@ -431,12 +430,12 @@ export default {
for (const r of this.performanceLevelDetailDTOS) {
// 新增:分数、系数不能为空
const scoreRaw = String(r.scoreNumericValue || r.scoreSymbolValue || "").trim()
if (!scoreRaw) {
if (!scoreRaw&&scoreRaw!=0) {
this.$message.error(`${this.levelNameMap[r.levelCode]}分数不能为空`)
return false
}
const coefRaw = String(r.rewardCoefficient || "").trim()
if (!coefRaw) {
if (!coefRaw&&coefRaw!=0) {
this.$message.error(`${this.levelNameMap[r.levelCode]}奖励系数不能为空`)
return false
}
......
......@@ -48,25 +48,39 @@
></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>
<template v-if="scope.scope.remark">
<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 v-else>-</template>
</template>
<template slot="merchantName" slot-scope="scope">
<template v-if="scope.scope.merchantName">
<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>
<template v-else>-</template>
</template>
</d2-table>
</div>
</d2-container>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!