Explorar el Código

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

xiongxing hace 1 semana
padre
commit
b2a5ca4d4b
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  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({