vue el 自动计算时间加1天
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | / * * 计算结束时间方法 * * / effectiveEndTimeHander(value){ const year1 = 8 * 365 ; / / 注册日期 + 延保产品服务年限 8 this.formOrder.effectiveEndTime = this.formCar.regDate; let tomorrow = new Date(value); let nowDate = this.getNowFormatDate(); tomorrow.setTime(tomorrow.getTime() + 24 * 60 * 60 * 1000 ); let reduce = '-' ; let year = tomorrow.getFullYear() + reduce + this.addZero(tomorrow.getMonth() + 1 ) + reduce + this.addZero(tomorrow.getDate()); let t_timestamp = Math. round (new Date(year) / 1000 ); let n_timestamp = Math. round (new Date(nowDate) / 1000 ); if (t_timestamp > n_timestamp){ return this.msgError( '不能超过今天' ); } else { this.formOrder.effectiveEndTime = year; } }, getNowFormatDate: function () { let date = new Date(); let reduce = "-" ; let currentdate = date.getFullYear() + reduce + this.addZero(date.getMonth() + 1 ) + reduce + this.addZero(date.getDate()); return currentdate; }, addZero: function (time) { if (time > = 1 && time < = 9 ) { time = "0" + time; } return time; }, |
分类:
若依/RuoYi-Vue权限管理
, 诺依ruoyi
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
2020-08-18 No cached version of org.springframework.boot:spring-boot-gradle-plugin:1.5.10.RELEASE available for offline mode.
2020-08-18 gradle下载安安装教程
2018-08-18 maven整合eclise
2018-08-18 mybatis insert update delete返回都是整型 0,1,增,删,改要提交事物
2018-08-18 mybatis别名
2018-08-18 mybatis学习$与#号取值区别
2018-08-18 java学习