username@email.com
2022-08-27 6e2b929cf381e2320ba6e7dec56c0371124d2b51
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>&nbsp;&nbsp;&nbsp;&nbsp;' +
                        '<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>&nbsp;&nbsp;&nbsp;&nbsp;' +
                        '<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) {