From a007999a71d7df6aa899731293f23096478a1b9c Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Wed, 15 May 2024 09:41:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E5=AF=86=E6=96=87=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E5=8F=91,=E7=BC=96=E8=BE=91=EF=BC=8C=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/fileprovide/detail.html | 12 ++---------- .../resources/templates/system/fileprovide/edit.html | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/detail.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/detail.html index b02a0a9..41dc90b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/detail.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/detail.html @@ -134,19 +134,11 @@ }); var updateDate = document.querySelector('#updateDate').value; var provideDate = document.querySelector('#provideDate').value; - function fileFormatDate(date){ - //日期格式化 - var dateObj = new Date(date); - var year = dateObj.getFullYear(); - var month = dateObj.getMonth() + 1; - var day = dateObj.getDate(); - return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day); - } if (updateDate != null && updateDate !== ''){ - document.querySelector('#updateDate').value = fileFormatDate(updateDate) + document.querySelector('#updateDate').value = $.common.dateFormat(updateDate,"yyyy-MM-dd") } if (provideDate != null && provideDate !== ''){ - document.querySelector('#provideDate').value = fileFormatDate(provideDate) + document.querySelector('#provideDate').value = $.common.dateFormat(provideDate,"yyyy-MM-dd") } function submitHandler() { if ($.validate.form()) { diff --git a/ruoyi-admin/src/main/resources/templates/system/fileprovide/edit.html b/ruoyi-admin/src/main/resources/templates/system/fileprovide/edit.html index 7961edf..63a118e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/fileprovide/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/fileprovide/edit.html @@ -129,19 +129,11 @@ }); var updateDate = document.querySelector('#updateDate').value; var provideDate = document.querySelector('#provideDate').value; - function fileFormatDate(date){ - //日期格式化 - var dateObj = new Date(date); - var year = dateObj.getFullYear(); - var month = dateObj.getMonth() + 1; - var day = dateObj.getDate(); - return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day); - } if (updateDate != null && updateDate !== ''){ - document.querySelector('#updateDate').value = fileFormatDate(updateDate) + document.querySelector('#updateDate').value = $.common.dateFormat(updateDate,"yyyy-MM-dd") } if (provideDate != null && provideDate !== ''){ - document.querySelector('#provideDate').value = fileFormatDate(provideDate) + document.querySelector('#provideDate').value = $.common.dateFormat(provideDate,"yyyy-MM-dd") } function submitHandler() { if ($.validate.form()) {