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> <template>
<d2-container class="layout"> <d2-container class="layout">
<div class="header"> <div class="header">
<d2-search <d2-search
ref="showSearch" ref="showSearch"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" :form-data="showFormData"
label-width="100px" label-width="100px"
:selectPopperAppendToBody="false" :selectPopperAppendToBody="false"
class="d2-search" class="d2-search"
> >
<template slot="managerCommitTime"> <template slot="managerCommitTime">
<el-date-picker <el-date-picker
v-model="searchForm.managerCommitTime" v-model="searchForm.managerCommitTime"
type="monthrange" type="monthrange"
range-separator="至" range-separator="至"
start-placeholder="开始月份" start-placeholder="开始月份"
end-placeholder="结束月份" end-placeholder="结束月份"
:picker-options="monthPickerOptions" :picker-options="monthPickerOptions"
size="small" size="small"
:clearable="false" :clearable="false"
value-format="yyyy-MM" value-format="yyyy-MM"
> >
</el-date-picker> </el-date-picker>
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId" size="small" type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button size="small" @click="handleReset"> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<auth-button :show-btn-ids="['9040903']" category="Button" /> <auth-button :show-btn-ids="['9040903']" category="Button" />
</d2-table-header> </d2-table-header>
<!-- :get-list-api="getListApi" --> <!-- :get-list-api="getListApi" -->
<d2-table <d2-table
ref="tableRef" ref="tableRef"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<div slot="imageUrls" slot-scope="scope" class="coverImage-preview"> <div
<glsx-preview slot="imageUrls"
:image-url-arr=" slot-scope="scope"
scope.scope.imageUrls class="coverImage-preview"
? formatterImg(scope.scope.imageUrls) >
: [noDataUrl] <glsx-preview
" :image-url-arr="
:pic-options="picOptions" scope.scope.imageUrls
limit="1" ? formatterImg(scope.scope.imageUrls)
></glsx-preview> : [noDataUrl]
</div> "
<template slot="remark" slot-scope="scope"> :pic-options="picOptions"
<el-popover placement="top" width="fit-content" trigger="hover"> limit="1"
<div class="tags-popover"> ></glsx-preview>
{{ scope.scope.remark || "-" }} </div>
</div> <template slot="remark" slot-scope="scope">
<span class="tag" slot="reference">{{ <template v-if="scope.scope.remark">
scope.scope.remark || "-" <el-popover
}}</span> placement="top"
</el-popover> width="fit-content"
</template> trigger="hover"
<template slot="merchantName" slot-scope="scope"> >
<el-popover placement="top" width="fit-content" trigger="hover"> <div class="tags-popover">
<div class="tags-popover"> {{ scope.scope.remark || "-" }}
{{ scope.scope.merchantName || "-" }} </div>
</div> <span class="tag" slot="reference">{{
<span class="tag" slot="reference">{{ scope.scope.remark || "-"
scope.scope.merchantName || "-" }}</span>
}}</span> </el-popover>
</el-popover> </template>
</template> <template v-else>-</template>
<!--状态 --> </template>
<div slot="statusHtml" slot-scope="scope"> <template slot="merchantName" slot-scope="scope">
<div class="online-status"> <template v-if="scope.scope.merchantName">
<span <el-popover
class="dot" placement="top"
:style="{ width="fit-content"
background: getStatusColor( trigger="hover"
scope && scope.scope && scope.scope.isReviewed, >
'reviewStatusOptMap' <div class="tags-popover">
) {{ scope.scope.merchantName || "-" }}
}" </div>
></span> <span class="tag" slot="reference">{{
{{ scope.scope.merchantName || "-"
getStatusItem( }}</span>
baseData, </el-popover>
"reviewStatusOpts", </template>
scope.scope, <template v-else>-</template>
"isReviewed" </template>
) <!--状态 -->
}} <div slot="statusHtml" slot-scope="scope">
</div> <div class="online-status">
</div> <span
<div slot="auth-button" slot-scope="scope"> class="dot"
<span :style="{
style="margin-right: 8px" background: getStatusColor(
v-if="scope.scope.isReviewed == 2 || scope.scope.isReviewed == 1" scope &&
> scope.scope &&
<auth-button scope.scope.isReviewed,
slot="auth-button" 'reviewStatusOptMap'
:show-btn-ids="['9040901']" ),
:data="scope.scope" }"
/> ></span>
</span> {{
<span v-else> getStatusItem(
<auth-button baseData,
slot="auth-button" "reviewStatusOpts",
:show-btn-ids="['9040902']" scope.scope,
:data="scope.scope" "isReviewed"
/> )
</span> }}
</div> </div>
</d2-table> </div>
</div> <div slot="auth-button" slot-scope="scope">
<referral-dialog <span
v-if="referralVisible" style="margin-right: 8px"
:detailVisible="referralVisible" v-if="
:id="id" scope.scope.isReviewed == 2 ||
@dialogClose="handlereferralClose" scope.scope.isReviewed == 1
></referral-dialog> "
</d2-container> >
<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> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
...@@ -502,70 +525,70 @@ export default { ...@@ -502,70 +525,70 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.layout { .layout {
.d2-search { .d2-search {
::v-deep.el-select-dropdown, ::v-deep.el-select-dropdown,
.el-popper { .el-popper {
width: 300px !important; width: 300px !important;
} }
} }
.header { .header {
background: #fff; background: #fff;
} }
.content { .content {
position: absolute; position: absolute;
left: 20px; left: 20px;
width: calc(100% - 40px); width: calc(100% - 40px);
padding: 0 20px 36px; padding: 0 20px 36px;
background: #fff; background: #fff;
margin-top: 14px; margin-top: 14px;
height: calc(100% - 110px); height: calc(100% - 110px);
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
.top { .top {
height: 52px; height: 52px;
color: #333333; color: #333333;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
display: flex; display: flex;
align-items: center; align-items: center;
.exprot { .exprot {
margin-left: auto; margin-left: auto;
} }
} }
} }
.tag { .tag {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
cursor: pointer; cursor: pointer;
padding: 0 10px; padding: 0 10px;
display: block; display: block;
} }
.online-status { .online-status {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.dot { .dot {
display: inline-block; display: inline-block;
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 50%; border-radius: 50%;
margin-right: 8px; margin-right: 8px;
} }
} }
} }
.coverImage-preview { .coverImage-preview {
width: 138px; width: 138px;
height: 54px; height: 54px;
::v-deep .photo-activity { ::v-deep .photo-activity {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
position: static !important; position: static !important;
} }
} }
::v-deep.tags-popover { ::v-deep.tags-popover {
max-width: 50vw; max-width: 50vw;
} }
</style> </style>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
@handleClose="closeDialogVisible" @handleClose="closeDialogVisible"
@handleConfirm="handleUpdateConfirm" @handleConfirm="handleUpdateConfirm"
:slotArr="slotArr" :slotArr="slotArr"
class="batch-modify-salary-dialog"
> >
<template slot="effectiveMonth"> <template slot="effectiveMonth">
<el-date-picker <el-date-picker
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
size="small" size="small"
:clearable="false" :clearable="false"
value-format="yyyy-MM" value-format="yyyy-MM"
class="effectiveMonth"
> >
</el-date-picker> </el-date-picker>
</template> </template>
...@@ -62,7 +64,7 @@ export default { ...@@ -62,7 +64,7 @@ export default {
}, },
isUpdateDialogConfig: { isUpdateDialogConfig: {
title: "批量修改薪资占比", title: "批量修改薪资占比",
width: "500px", width: "480px",
okText: "确定" okText: "确定"
}, },
isUpdateForm: { isUpdateForm: {
...@@ -111,6 +113,9 @@ export default { ...@@ -111,6 +113,9 @@ export default {
this.validatePercent(value, callback), this.validatePercent(value, callback),
trigger: "blur" trigger: "blur"
} }
],
effectiveMonth: [
{ required: true, message: "请选择", trigger: "change" }
] ]
}, },
baseData: {}, baseData: {},
...@@ -195,4 +200,10 @@ export default { ...@@ -195,4 +200,10 @@ export default {
} }
} }
</script> </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 @@ ...@@ -77,7 +77,8 @@
></glsx-preview> ></glsx-preview>
</div> </div>
<template slot="remark" slot-scope="scope"> <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"> <div class="tags-popover">
{{ scope.scope.remark || "-" }} {{ scope.scope.remark || "-" }}
</div> </div>
...@@ -85,16 +86,21 @@ ...@@ -85,16 +86,21 @@
scope.scope.remark || "-" scope.scope.remark || "-"
}}</span> }}</span>
</el-popover> </el-popover>
</template>
<template v-else>-</template>
</template> </template>
<template slot="replyContent" slot-scope="scope"> <template slot="replyContent" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover"> <template v-if="scope.scope.replyContent">
<div class="tags-popover"> <el-popover placement="top" width="fit-content" trigger="hover">
{{ scope.scope.replyContent || "-" }} <div class="tags-popover">
</div> {{ scope.scope.replyContent || "-" }}
<span class="tag" slot="reference">{{ </div>
scope.scope.replyContent || "-" <span class="tag" slot="reference">{{
}}</span> scope.scope.replyContent || "-"
</el-popover> }}</span>
</el-popover>
</template>
<template v-else>-</template>
</template> </template>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<el-button <el-button
......
...@@ -1062,6 +1062,11 @@ export default { ...@@ -1062,6 +1062,11 @@ export default {
trigger: "blur" trigger: "blur"
} }
], ],
effectiveMonth:[{
required: true,
message: "请选择",
trigger: "blur"
}],
hireType: [ hireType: [
{ {
required: true, required: true,
......
...@@ -374,10 +374,9 @@ export default { ...@@ -374,10 +374,9 @@ export default {
intPart = (intPart || "").replace(/^0+(?=\d)/, "") intPart = (intPart || "").replace(/^0+(?=\d)/, "")
if (intPart === "") intPart = "0" if (intPart === "") intPart = "0"
if (decPart != null) { if (decPart != null) {
// 截断到指定位数的小数 // 保留到指定小数位数;当还没输入小数位时保留尾随小数点
decPart = decPart.slice(0, maxDecimals) decPart = decPart.slice(0, maxDecimals)
// 如果没有小数位,去掉小数点 s = `${intPart}.${decPart}`
s = decPart.length > 0 ? `${intPart}.${decPart}` : intPart
} else { } else {
s = intPart s = intPart
} }
...@@ -431,12 +430,12 @@ export default { ...@@ -431,12 +430,12 @@ export default {
for (const r of this.performanceLevelDetailDTOS) { for (const r of this.performanceLevelDetailDTOS) {
// 新增:分数、系数不能为空 // 新增:分数、系数不能为空
const scoreRaw = String(r.scoreNumericValue || r.scoreSymbolValue || "").trim() const scoreRaw = String(r.scoreNumericValue || r.scoreSymbolValue || "").trim()
if (!scoreRaw) { if (!scoreRaw&&scoreRaw!=0) {
this.$message.error(`${this.levelNameMap[r.levelCode]}分数不能为空`) this.$message.error(`${this.levelNameMap[r.levelCode]}分数不能为空`)
return false return false
} }
const coefRaw = String(r.rewardCoefficient || "").trim() const coefRaw = String(r.rewardCoefficient || "").trim()
if (!coefRaw) { if (!coefRaw&&coefRaw!=0) {
this.$message.error(`${this.levelNameMap[r.levelCode]}奖励系数不能为空`) this.$message.error(`${this.levelNameMap[r.levelCode]}奖励系数不能为空`)
return false return false
} }
......
...@@ -48,25 +48,39 @@ ...@@ -48,25 +48,39 @@
></glsx-preview> ></glsx-preview>
</div> </div>
<template slot="remark" slot-scope="scope"> <template slot="remark" slot-scope="scope">
<el-popover placement="top" width="fit-content" trigger="hover"> <template v-if="scope.scope.remark">
<div class="tags-popover"> <el-popover
{{ scope.scope.remark || "-" }} placement="top"
</div> width="fit-content"
<span class="tag" slot="reference">{{ trigger="hover"
scope.scope.remark || "-" >
}}</span> <div class="tags-popover">
</el-popover> {{ scope.scope.remark || "-" }}
</template> </div>
<template slot="merchantName" slot-scope="scope"> <span class="tag" slot="reference">{{
<el-popover placement="top" width="fit-content" trigger="hover"> scope.scope.remark || "-"
<div class="tags-popover"> }}</span>
{{ scope.scope.merchantName || "-" }} </el-popover>
</div> </template>
<span class="tag" slot="reference">{{ <template v-else>-</template>
scope.scope.merchantName || "-" </template>
}}</span> <template slot="merchantName" slot-scope="scope">
</el-popover> <template v-if="scope.scope.merchantName">
</template> <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> </d2-table>
</div> </div>
</d2-container> </d2-container>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!