Преглед изворни кода

feat(monthlyAssess): add reward punishment type and detail list

补充了奖惩类型字段和奖惩明细列表的初始值,同时根据表单分数自动设置奖惩类型并同步到列表项中
huoyi пре 1 месец
родитељ
комит
c217f7515f
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      src/views/performanceManage/monthlyAssess/index.vue

+ 8 - 1
src/views/performanceManage/monthlyAssess/index.vue

@@ -728,7 +728,9 @@ const indicatorDialog = reactive({
728
     rewardDetails: '',
728
     rewardDetails: '',
729
     reward: 0,
729
     reward: 0,
730
     penaltyDetails: '',
730
     penaltyDetails: '',
731
-    penalty: 0
731
+    penalty: 0,
732
+    rewardPunishmentType: '',
733
+    personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList: []
732
   }
734
   }
733
 })
735
 })
734
 
736
 
@@ -1220,6 +1222,11 @@ const saveIndicator = () => {
1220
     return
1222
     return
1221
   }
1223
   }
1222
 
1224
 
1225
+  const rewardPunishmentType = indicatorDialog.form.score > 0 ? '1' : '0'
1226
+  list.forEach(detail => {
1227
+    detail.rewardPunishmentType = rewardPunishmentType
1228
+  })
1229
+
1223
   if (indicatorDialog.mode === 'add') {
1230
   if (indicatorDialog.mode === 'add') {
1224
     addIndicatorToGroup({ ...indicatorDialog.form })
1231
     addIndicatorToGroup({ ...indicatorDialog.form })
1225
     ElMessage.success('添加成功')
1232
     ElMessage.success('添加成功')