diff --git a/src/pages/performance/QualitySetting/components/AddIndicatorsModal.tsx b/src/pages/performance/QualitySetting/components/AddIndicatorsModal.tsx
index f90dbca..a818770 100755
--- a/src/pages/performance/QualitySetting/components/AddIndicatorsModal.tsx
+++ b/src/pages/performance/QualitySetting/components/AddIndicatorsModal.tsx
@@ -159,7 +159,7 @@ export default function AddIndicatorsModal(props: Props) {
- {type == 2 ? 考核方式:绩效排名差
: null}
+ {type == 2 ? 考核方式:按绩效排名差
: null}
• 处罚:
{
if (visible && currentItem.id) {
setDetailsParams({ id: currentItem.id }, true);
@@ -64,8 +64,9 @@ export default function EditModal({ onClose, setItem, item, roleList }: Props) {
setType(currentItem.type);
}
}, [visible]);
+ // 监听到数据变化后将数据处理同时赋给表单,loading直接用详情的loading,有id就用详情的loading,实现了数据获取之前loading的加载,没有id直接写死fasle
useEffect(() => {
- if (detailsData.details) {
+ if (detailsData) {
const result = transformFormData(detailsData, roleList, list);
if (result.type == 1) {
result.rank = "";
@@ -108,13 +109,13 @@ export default function EditModal({ onClose, setItem, item, roleList }: Props) {
pa.details.forEach((item: any) => {
if (
item.capPersonPenaltyScore == undefined ||
- !item.capPersonPenaltyMoney == undefined ||
- !item.awardScore == undefined ||
- !item.capPersonAwardScore == undefined ||
- !item.capAwardScore == undefined ||
- !item.awardMoney == undefined ||
- !item.capPersonAwardMoney == undefined ||
- !item.capAwardMoney == undefined
+ item.capPersonPenaltyMoney == undefined ||
+ item.awardScore == undefined ||
+ item.capPersonAwardScore == undefined ||
+ item.capAwardScore == undefined ||
+ item.awardMoney == undefined ||
+ item.capPersonAwardMoney == undefined ||
+ item.capAwardMoney == undefined
) {
message.error("考核详情中存在没有填的内容");
} else {