Ver Fonte

终保日期显示问题

Qchen há 1 ano atrás
pai
commit
859148f2f8
1 ficheiros alterados com 5 adições e 3 exclusões
  1. 5 3
      src/views/insurancePolicy/index.vue

+ 5 - 3
src/views/insurancePolicy/index.vue

@@ -1703,6 +1703,7 @@ let btns = ref({
   }],
 })
 const handleChange = (item, type) => {
+  console.log(type)
   switch (type) {
     case 'owner1':
       item.checked = !item.checked
@@ -1784,7 +1785,7 @@ const handleChange = (item, type) => {
         let month = date.getMonth() + 1<10?`0${date.getMonth() + 1}`:date.getMonth() + 1
         let day = date.getDate() + 1< 10?`0${date.getDate() + 1}`:date.getDate() + 1
         insurancePolicyForm.value.JQStartDate = `${year}-${month}-${day} 00:00:00`
-        insurancePolicyForm.value.JQEndDate = `${year + 1}-${month}-${day} 23:59:59`
+        insurancePolicyForm.value.JQEndDate = `${year + 1}-${month}-${day - 1} 23:59:59`
       }
       if(insurancePolicyForm.value.productId === '034001' || insurancePolicyForm.value.productId === '034002' || insurancePolicyForm.value.productId === '0330034001' || insurancePolicyForm.value.productId === '0330034002') {
         let date = new Date()
@@ -1792,7 +1793,7 @@ const handleChange = (item, type) => {
         let month = date.getMonth() + 1<10?`0${date.getMonth() + 1}`:date.getMonth() + 1
         let day = date.getDate() + 1< 10?`0${date.getDate() + 1}`:date.getDate() + 1
         insurancePolicyForm.value.SYStartDate = `${year}-${month}-${day} 00:00:00`
-        insurancePolicyForm.value.SYEndDate = `${year + 1}-${month}-${day} 23:59:59`
+        insurancePolicyForm.value.SYEndDate = `${year + 1}-${month}-${day - 1} 23:59:59`
       }
       break;
   }
@@ -1855,7 +1856,7 @@ const getAgeByIdCard = (idCard: any, type?: any) => {
 }
 const noeYearPast = (time) => {
   let strYear: any = time.getFullYear();
-  let strDay: any = time.getDate();
+  let strDay: any = time.getDate()
   let strMonth: any = time.getMonth() + 1;
   let hh: any = time.getHours();
   let minutes: any = time.getMinutes(); // 分
@@ -1928,6 +1929,7 @@ const oneYearPast1 = (time) => {
     minutes +
     ":" +
     Seconds;
+    console.log(datastr)
   return datastr;
 }
 //当前日期的次日