소스 검색

合同管理续签按钮禁用注释合同到期时间2个月内才能续签的逻辑

xiongxing 1 주 전
부모
커밋
b2a5ca4d4b
1개의 변경된 파일과 7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      src/components/Table2/index.vue

+ 7 - 7
src/components/Table2/index.vue

@@ -459,14 +459,14 @@ const userStore = useUserStore()
 const settingStore = useSettingStore()
 const radioId = ref() // 单选表格
 
-//续签提前 16天
 const isDisabledRenewal = (row) => {
-  if (!row.expireTime) return false
-  const expireDate = new Date(row.expireTime)
-  const halfMonthLater = new Date()
-  halfMonthLater.setMonth(halfMonthLater.getMonth() + 2)
-  console.log('AAA')
-  return expireDate > halfMonthLater && (row.isRenew || 0) == 0
+  // 暂时不做“到期前两个月内才可续签”的时间限制,只看 isRenew
+  // if (!row.expireTime) return false
+  // const expireDate = new Date(row.expireTime)
+  // const halfMonthLater = new Date()
+  // halfMonthLater.setMonth(halfMonthLater.getMonth() + 2)
+  // return expireDate > halfMonthLater && (row.isRenew || 0) == 0
+  return (row.isRenew || 0) != 0
 }
 
 const props = defineProps({