Commit d7f58018 by wangzhihui

```

fix(residentManage): 批量修改薪资对话框生效月份初始化修复

- 修正批量修改薪资对话框中生效月份字段初始值为空字符串
- 移除审批记录表格中的 has-num 属性配置
- 注释掉审批记录表格中生效月份的格式化器函数
- 审批意见显示改为纯文本插值并添加换行样式处理
- 添加 formatOpinionText 方法处理换行符转换
- 修改计划列表表格列属性 merchantName 为 merchantNames
```
1 parent 267635c7
......@@ -68,7 +68,7 @@ export default {
isUpdateForm: {
basicSalaryProportion: "",
performanceSalaryProportion: "",
effectiveMonth: dayjs("2026-01").format("YYYY-MM")
effectiveMonth: ""
},
isUpdateFormData: [
{
......
......@@ -3,7 +3,6 @@
<div class="container m-t-40">
<d2-table
ref="table"
:has-num="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
......@@ -137,12 +136,12 @@ export default {
{
label: "生效月份",
prop: "effectiveMonth",
formatter: (cellValue) => {
// 生效月份(格式:yyyy-MM)转成2026年1月
if (!cellValue.effectiveMonth) return "-"
const [year, month] = cellValue.effectiveMonth.split("-")
return `${year}年${parseInt(month)}月`
},
// formatter: (cellValue) => {
// 生效月份(格式:yyyy-MM)转成2026年1月
// if (!cellValue.effectiveMonth) return "-"
// const [year, month] = cellValue.effectiveMonth.split("-")
// return `${year}年${parseInt(month)}月`
// },
width: 120
}
]
......
......@@ -58,7 +58,10 @@
</el-col>
<el-col :span="12">
<el-form-item label="审批意见:">
<span>{{ item.approveOpinion || "-" }}</span>
<!-- 将 v-html 改为纯文本插值,并应用换行样式 -->
<span class="opinion-text">{{
formatOpinionText(item.approveOpinion)
}}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -247,6 +250,11 @@ export default {
if (!val) return []
let arr = val.split(",")
return arr
},
// 把字面量的 \r\n / \n 转为真实换行符
formatOpinionText(opinion) {
const s = String(opinion == null ? "-" : opinion)
return s.replace(/\\r\\n/g, "\n").replace(/\\n/g, "\n")
}
}
}
......@@ -335,3 +343,11 @@ export default {
}
}
</style>
<style scoped>
/* 保留换行和空格,并避免长行溢出 */
.opinion-text {
white-space: pre-wrap;
word-break: break-word;
}
</style>
......@@ -3,7 +3,6 @@
<div class="container">
<d2-table
ref="table"
:has-num="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
......@@ -74,7 +73,7 @@ export default {
tableColumns: [
{
label: "门店名称",
prop: "merchantName"
prop: "merchantNames"
},
{
label: "品牌",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!