瀏覽代碼

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 728
     rewardDetails: '',
729 729
     reward: 0,
730 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 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 1230
   if (indicatorDialog.mode === 'add') {
1224 1231
     addIndicatorToGroup({ ...indicatorDialog.form })
1225 1232
     ElMessage.success('添加成功')