From 1243f9cdb1ce367af05caabbb71ce81e38d5a1af Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 16 四月 2025 16:16:43 +0800
Subject: [PATCH] 增加一种报名类型
---
zhengcaioa/zhengcaioa/Views/Signin/Signin.cshtml | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/Signin/Signin.cshtml b/zhengcaioa/zhengcaioa/Views/Signin/Signin.cshtml
index 80d8bb4..fa2198e 100644
--- a/zhengcaioa/zhengcaioa/Views/Signin/Signin.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/Signin/Signin.cshtml
@@ -10,6 +10,13 @@
<script type="text/javascript">
var year = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.year))';
var month = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.month))';
+
+ var myDate = new Date();
+ //鑾峰彇褰撳墠骞�
+ var searchyear = myDate.getFullYear();
+ //鑾峰彇褰撳墠鏈�
+ var searchmonth = myDate.getMonth() + 1;
+
dataCol = [
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
{
@@ -26,8 +33,8 @@
{
label: '璇峰亣', name: 'id', align: "center", sortable: false, editable: true,// labtype: 'txt', hidden: false
formatter: function (cellvalue, options, rowObject) {
- return '<a href="javascript:void(0)" onclick="AskLeave(\'' + $.trim(rowObject.Id) + '\');"><span style="background: #ECF3FF;">璇峰亣</span></a> ' +
- '<a href="javascript:void(0)" onclick="AskLeaveOff(\'' + $.trim(rowObject.Id) +'\');"><span style="background: #ECF3FF;">閿�鍋�</span></a>';
+ return '<a href="javascript:void(0)" onclick="AskLeave(\'\',\'' + new Date(rowObject.SgninDate).Format("yyyy-MM-dd") + '\',\'' + new Date(rowObject.SgninDate).Format("yyyy-MM-dd") + '\');"><span style="background: #ECF3FF;">璇峰亣</span></a> ' +
+ '<a href="javascript:void(0)" onclick="AskLeaveOff(\'\',\'' + new Date(rowObject.SgninDate).Format("yyyy-MM-dd") + '\',\'' + new Date(rowObject.SgninDate).Format("yyyy-MM-dd") + '\');"><span style="background: #ECF3FF;">閿�鍋�</span></a>';
}
},
@@ -42,19 +49,19 @@
//?userId=" + "@ViewBag.userId";
searchCol = [
- { label: '鏌ヨ鏃堕棿:骞�', name: 'Year', labtype: 'combox', hidden: false, defultvalue: JSON.parse(year)[1].code , data: JSON.parse(year), cwidth: '5%', cccwidth: '9%' },
- { label: '鏈�', name: 'Month', labtype: 'combox', hidden: false, data: JSON.parse(month), cwidth: '1%', cccwidth: '7%' }
+ { label: '鏌ヨ鏃堕棿锛氬勾', name: 'Year', labtype: 'combox', hidden: false, defultvalue: searchyear , data: JSON.parse(year), cwidth: '5%', cccwidth: '9%' },
+ { label: '鏈�', name: 'Month', labtype: 'combox', hidden: false, defultvalue: searchmonth ,data: JSON.parse(month), cwidth: '1%', cccwidth: '7%' }
];
- function AskLeave(id) {
- OpenWindow("璇峰亣鐢宠", "500px", "800px", "/Signin/AskLeave/?signinId="+ id);
+ function AskLeave(id, StratTimeName, EndTimeName) {
+ OpenWindow("璇峰亣鐢宠", "500px", "800px", "/Signin/AskLeave?id=&StratTimeName=" + StratTimeName + "&EndTimeName=" + EndTimeName);
}
- function AskLeaveOff(id) {
- OpenWindow("閿�鍋囩敵璇�", "500px", "800px", "/Signin/AskLeaveOff/?signinId=" + id);
+ function AskLeaveOff(id, StratTimeName, EndTimeName) {
+ OpenWindow("閿�鍋囩敵璇�", "500px", "800px", "/Signin/AskLeaveOff?id=&StratTimeName=" + StratTimeName + "&EndTimeName=" + EndTimeName);
}
var _afterSave = function (result) {
if (result) {
--
Gitblit v1.9.1