Commit c5c0ea297bc4312bb2966dfc32f39f5bb720f88b
1 parent
35cc926d
考评2002
Showing
6 changed files
with
42 additions
and
18 deletions
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCommissionParamsModal.tsx
... | ... | @@ -61,9 +61,7 @@ export default function AddCommissionParamsModal(props: Props) { |
61 | 61 | // console.log("selectedIndicators", selectedIndicators); |
62 | 62 | } |
63 | 63 | if (addComVisible && comItem.code) { |
64 | - const indTar = comItem.targetType; | |
65 | - console.log("indTar", indTar); | |
66 | - console.log("comItem.targetType", comItem.targetType); | |
64 | + const indTar = indicatorsList.find((item: any) => item.code == comItem.code)?.targetType; | |
67 | 65 | setTargetType(indTar); |
68 | 66 | setIndicatorName(comItem.name); |
69 | 67 | setDataType(comItem.dataType); |
... | ... | @@ -133,10 +131,16 @@ export default function AddCommissionParamsModal(props: Props) { |
133 | 131 | pa.extraTargetType = pa.targetType; |
134 | 132 | if (comItem.codeType == 1 && multiStage) { |
135 | 133 | if (pa.targetValue) { |
134 | + pa.targetType = targetType; | |
136 | 135 | pa.targetCalcType = 3; |
136 | + } else { | |
137 | + pa.targetType = 1; | |
137 | 138 | } |
138 | 139 | if (pa.extraTargetValue) { |
140 | + pa.extraTargetType = targetType; | |
139 | 141 | pa.extraTargetCalcType = 4; |
142 | + } else { | |
143 | + pa.extraTargetType = 1; | |
140 | 144 | } |
141 | 145 | } |
142 | 146 | onOk(pa); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCommissionParamsModalSal.tsx
... | ... | @@ -60,9 +60,7 @@ export default function AddCommissionParamsModal(props: Props) { |
60 | 60 | setNewIndicators([...res]); |
61 | 61 | } |
62 | 62 | if (addComVisible && comItem.code) { |
63 | - const indTar = comItem.targetType; | |
64 | - console.log("indTar", indTar); | |
65 | - console.log("comItem.targetType", comItem.targetType); | |
63 | + const indTar = indicatorsList.find((item: any) => item.code == comItem.code)?.targetType; | |
66 | 64 | setTargetType(indTar); |
67 | 65 | setIndicatorName(comItem.name); |
68 | 66 | setDataType(comItem.dataType); |
... | ... | @@ -127,10 +125,16 @@ export default function AddCommissionParamsModal(props: Props) { |
127 | 125 | pa.extraTargetType = pa.targetType; |
128 | 126 | if (comItem.codeType == 1 && multiStage) { |
129 | 127 | if (pa.targetValue) { |
128 | + pa.targetType = targetType; | |
130 | 129 | pa.targetCalcType = 3; |
130 | + } else { | |
131 | + pa.targetType = 1; | |
131 | 132 | } |
132 | 133 | if (pa.extraTargetValue) { |
134 | + pa.extraTargetType = targetType; | |
133 | 135 | pa.extraTargetCalcType = 4; |
136 | + } else { | |
137 | + pa.extraTargetType = 1; | |
134 | 138 | } |
135 | 139 | } |
136 | 140 | onOk(pa); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCommissionParamsModalSalShop.tsx
... | ... | @@ -61,9 +61,7 @@ export default function AddCommissionParamsModal(props: Props) { |
61 | 61 | setNewIndicators([...res]); |
62 | 62 | } |
63 | 63 | if (addComVisible && comItem.code) { |
64 | - const indTar = comItem.targetType; | |
65 | - console.log("indTar", indTar); | |
66 | - console.log("comItem.targetType", comItem.targetType); | |
64 | + const indTar = indicatorsList.find((item: any) => item.code == comItem.code)?.targetType; | |
67 | 65 | setTargetType(indTar); |
68 | 66 | setIndicatorName(comItem.name); |
69 | 67 | setDataType(comItem.dataType); |
... | ... | @@ -128,10 +126,16 @@ export default function AddCommissionParamsModal(props: Props) { |
128 | 126 | pa.extraTargetType = pa.targetType; |
129 | 127 | if (comItem.codeType == 1 && multiStage) { |
130 | 128 | if (pa.targetValue) { |
129 | + pa.targetType = targetType; | |
131 | 130 | pa.targetCalcType = 3; |
131 | + } else { | |
132 | + pa.targetType = 1; | |
132 | 133 | } |
133 | 134 | if (pa.extraTargetValue) { |
135 | + pa.extraTargetType = targetType; | |
134 | 136 | pa.extraTargetCalcType = 4; |
137 | + } else { | |
138 | + pa.extraTargetType = 1; | |
135 | 139 | } |
136 | 140 | } |
137 | 141 | onOk(pa); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddLadderParamsModal.tsx
... | ... | @@ -54,9 +54,7 @@ export default function AddLadderParamsModal(props: Props) { |
54 | 54 | setNewIndicators([...res]); |
55 | 55 | } |
56 | 56 | if (addComVisible && comItem.code) { |
57 | - const indTar = comItem.targetType; | |
58 | - console.log("indTar", indTar); | |
59 | - console.log("comItem.targetType", comItem.targetType); | |
57 | + const indTar = indicatorsList.find((item: any) => item.code == comItem.code)?.targetType; | |
60 | 58 | setTargetType(indTar); |
61 | 59 | setIndicatorName(comItem.name); |
62 | 60 | setCodeType(comItem.codeType); |
... | ... | @@ -125,10 +123,16 @@ export default function AddLadderParamsModal(props: Props) { |
125 | 123 | pa.extraTargetType = pa.targetType; |
126 | 124 | if (comItem.codeType == 1 && multiStage) { |
127 | 125 | if (pa.targetValue) { |
126 | + pa.targetType = targetType; | |
128 | 127 | pa.targetCalcType = 3; |
128 | + } else { | |
129 | + pa.targetType = 1; | |
129 | 130 | } |
130 | 131 | if (pa.extraTargetValue) { |
132 | + pa.extraTargetType = targetType; | |
131 | 133 | pa.extraTargetCalcType = 4; |
134 | + } else { | |
135 | + pa.extraTargetType = 1; | |
132 | 136 | } |
133 | 137 | } |
134 | 138 | onOk(pa); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddLadderParamsModalSal.tsx
... | ... | @@ -54,9 +54,7 @@ export default function AddLadderParamsModal(props: Props) { |
54 | 54 | setNewIndicators([...res]); |
55 | 55 | } |
56 | 56 | if (addComVisible && comItem.code) { |
57 | - const indTar = comItem.targetType; | |
58 | - console.log("indTar", indTar); | |
59 | - console.log("comItem.targetType", comItem.targetType); | |
57 | + const indTar = indicatorsList.find((item: any) => item.code == comItem.code)?.targetType; | |
60 | 58 | setTargetType(indTar); |
61 | 59 | setIndicatorName(comItem.name); |
62 | 60 | setCodeType(comItem.codeType); |
... | ... | @@ -125,10 +123,16 @@ export default function AddLadderParamsModal(props: Props) { |
125 | 123 | pa.extraTargetType = pa.targetType; |
126 | 124 | if (comItem.codeType == 1 && multiStage) { |
127 | 125 | if (pa.targetValue) { |
126 | + pa.targetType = targetType; | |
128 | 127 | pa.targetCalcType = 3; |
128 | + } else { | |
129 | + pa.targetType = 1; | |
129 | 130 | } |
130 | 131 | if (pa.extraTargetValue) { |
132 | + pa.extraTargetType = targetType; | |
131 | 133 | pa.extraTargetCalcType = 4; |
134 | + } else { | |
135 | + pa.extraTargetType = 1; | |
132 | 136 | } |
133 | 137 | } |
134 | 138 | onOk(pa); | ... | ... |
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddLadderParamsModalSalShop.tsx
... | ... | @@ -55,9 +55,7 @@ export default function AddLadderParamsModal(props: Props) { |
55 | 55 | setNewIndicators([...res]); |
56 | 56 | } |
57 | 57 | if (addComVisible && comItem.code) { |
58 | - const indTar = comItem.targetType; | |
59 | - console.log("indTar", indTar); | |
60 | - console.log("comItem.targetType", comItem.targetType); | |
58 | + const indTar = indicatorsList.find((item: any) => item.code == comItem.code)?.targetType; | |
61 | 59 | setTargetType(indTar); |
62 | 60 | setIndicatorName(comItem.name); |
63 | 61 | setCodeType(comItem.codeType); |
... | ... | @@ -126,10 +124,16 @@ export default function AddLadderParamsModal(props: Props) { |
126 | 124 | pa.extraTargetType = pa.targetType; |
127 | 125 | if (comItem.codeType == 1 && multiStage) { |
128 | 126 | if (pa.targetValue) { |
127 | + pa.targetType = targetType; | |
129 | 128 | pa.targetCalcType = 3; |
129 | + } else { | |
130 | + pa.targetType = 1; | |
130 | 131 | } |
131 | 132 | if (pa.extraTargetValue) { |
133 | + pa.extraTargetType = targetType; | |
132 | 134 | pa.extraTargetCalcType = 4; |
135 | + } else { | |
136 | + pa.extraTargetType = 1; | |
133 | 137 | } |
134 | 138 | } |
135 | 139 | onOk(pa); | ... | ... |