From c983598c12bc3a842a470ed4a443383d699a42c8 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 22 Mar 2023 16:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E5=BC=82=E5=8A=A8-=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuTransferInfo/IntoIndex.js | 2 +- .../Views/StuTransferInfo/MajorIndex.cshtml | 2 +- .../Views/StuTransferInfo/MajorIndex.js | 32 +++++++++++++++++++ .../StuTransferInfo/RestAgainIndex.cshtml | 10 +++--- .../Views/StuTransferInfo/ReturnIndex.js | 12 +++---- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IntoIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IntoIndex.js index 687c83084..dffab1b6d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IntoIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/IntoIndex.js @@ -9,7 +9,7 @@ var bootstrap = function ($, learun) { page.bind(); }, bind: function () { - $('#LeaveDate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + $('#LeaveDate').val(learun.formatDate(new Date(), 'yyyy-MM-dd')); //选项卡切换 $('#navultab li').on('click', function () { if (!$(this).hasClass('active')) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml index 7f6e6207f..a47cfa568 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml @@ -100,7 +100,7 @@
离班日期*
- +
异动类型*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js index 62cf61a6d..b62e5f38b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js @@ -249,6 +249,38 @@ var bootstrap = function ($, learun) { }); $('#StuStatus').lrDataItemSelect({ code: 'YesOrNoInt' }); + const formatTime = (format = "", num = new Date().getTime()) => { + format = format || "YYYY-mm-dd HH:MM:SS"; //第一个参数不填时,使用默认格式 + let ret, date, renum; + // 处理时间戳,js一般获取的时间戳是13位,PHP一般是10位,根据实际情况做判断处理 + if (num.toString().length == 10) { + date = new Date(parseInt(num) * 1000); + } else { + date = new Date(parseInt(num)); + } + const opt = { + "Y": date.getFullYear().toString(), // 年 + "m": (date.getMonth() + 1).toString(), // 月 + "d": date.getDate().toString(), // 日 + "H": date.getHours().toString(), // 时 + "M": date.getMinutes().toString(), // 分 + "S": date.getSeconds().toString() // 秒 + // 目前用的是这六种符号,有其他格式化字符需求可以继续添加,值必须转化成字符串 + }; + for (var k in opt) { + ret = new RegExp("(" + k + "+)").exec(format); + if (ret) { + renum = (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")) //根据复数前面是否补零,如“mm”补零,单“m”前面不补零 + format = format.replace(ret[1], renum) //替换 + }; + }; + return format; + }; + $('#LeaveDate').on('change', function () { + var dateTime = new Date($('#LeaveDate').val()); + dateTime = dateTime.setDate(dateTime.getDate() - 1); + $('#EnteDate').val(formatTime('YYYY-mm-dd', dateTime)) + }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.cshtml index b201165b8..696d14865 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.cshtml @@ -113,23 +113,23 @@
-
+
异动类型*
-
+
注销账号*
-
+
保留学籍*
-
+
离班日期*
-
+
休学年限*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/ReturnIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/ReturnIndex.js index 74a2975e1..10ca5165f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/ReturnIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/ReturnIndex.js @@ -292,9 +292,9 @@ var bootstrap = function ($, learun) { // return cellvalue == "1" ? "已审核" : "未审核"; // } //}, - { label: "学生编号", name: "StuNo", width: 100, align: "left", ishide: true, }, - { label: "学籍号", name: "StuCode", width: 100, align: "left", ishide: true, }, - { label: "学号", name: "ProvinceCode", width: 100, align: "left" }, + //{ label: "学生编号", name: "StuNo", width: 100, align: "left", ishide: true, }, + //{ label: "学籍号", name: "StuCode", width: 100, align: "left", ishide: true, }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "GenderNo", width: 80, align: "left", @@ -449,9 +449,9 @@ var bootstrap = function ($, learun) { // return cellvalue == "1" ? "已审核" : "未审核"; // } //}, - { label: "学生编号", name: "StuNo", width: 100, align: "left" }, - { label: "学籍号", name: "StuCode", width: 100, align: "left" }, - { label: "学号", name: "ProvinceCode", width: 100, align: "left" }, + //{ label: "学生编号", name: "StuNo", width: 100, align: "left", hide: true }, + //{ label: "学籍号", name: "StuCode", width: 100, align: "left", hide: true}, + { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "GenderNo", width: 80, align: "left",