zhouhn
2026-08-12 f3c2a13f75b1fb3632713fab2a7192041a376ab1
fix(vehicle): 保单录入校验生效日期不得晚于到期日期 [ai-coding]

编辑/新增页下一步与完善资料弹窗提交时阻断生效晚于到期的保单
2个文件已修改
8 ■■■■■ 已修改文件
src/views/assetManagement/vehicleManagement/inventoryVehicle/add.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/assetManagement/vehicleManagement/inventoryVehicle/components/CompleteVehicleInfoModal.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/assetManagement/vehicleManagement/inventoryVehicle/add.vue
@@ -265,6 +265,10 @@
        window.$message?.error(`保险${i + 1}的保险名称为必填项,长度1-50字符`)
        return
      }
      if (item.insuranceEffectiveTime && item.insuranceEndTime && item.insuranceEffectiveTime > item.insuranceEndTime) {
        window.$message?.error(`保险${i + 1}的生效日期不能晚于到期日期`)
        return
      }
    }
    currentStep.value = 3
  }
src/views/assetManagement/vehicleManagement/inventoryVehicle/components/CompleteVehicleInfoModal.vue
@@ -255,6 +255,10 @@
            window.$message?.error(`保险${i + 1}的保险名称为必填项`)
            return
          }
          if (it.insuranceEffectiveTime && it.insuranceEndTime && it.insuranceEffectiveTime > it.insuranceEndTime) {
            window.$message?.error(`保险${i + 1}的生效日期不能晚于到期日期`)
            return
          }
        }
        // 保险信息 → 新表 xp_vehicle_insurance(整车替换)
        params.insuranceList = insuranceList.value.map(it => toInsuranceItemDTO(it, dayjs))