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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
@model DTO.AdmAttendanceRuleDTO
@using DTO;
@using zhengcaioa.Models;
@{
    Layout = null;
    List< AdmAttendanceRulesDtlDTO >  admAttendanceRulesDtlDTOs =  Model.admAttendanceRulesDtlDTOs;
 
    var jiejiari =  admAttendanceRulesDtlDTOs.Where(x=>x.Name=="jiejiari").ToList();
 
    var tiaoxiuri = admAttendanceRulesDtlDTOs.Where(x => x.Name == "tiaoxiuri").ToList();
 
 
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <title>@(SiteConfig.SiteName)</title>
    <link href="~/css/bootstrap.min.css" rel="stylesheet">
    <link href="~/css/font-awesome.min.css" rel="stylesheet">
    <link href="~/css/animate.min.css" rel="stylesheet">
 
    <link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">
    <link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="~/css/style.min.css" rel="stylesheet">
    <link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
    <link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
 
    <style type="text/css">
        .webuploader-pick {
            position: relative;
            display: inline-block;
            cursor: pointer;
            background: #00b7ee;
            padding: 8px 14px 7px 14px;
            color: #fff;
            text-align: center;
            border-radius: 3px;
            overflow: hidden;
        }
 
        div.clearfix > label {
            padding-top: 8px;
        }
 
        .chosen-container {
            border-radius: 1px;
            border: 1px solid #e5e6e7;
        }
 
        .col-md-1.control-label {
            padding-right: 0px;
            font-weight: 400;
        }
 
        .type_b {
            width: 15px;
            height: 15px;
            padding-bottom: 15px !important;
        }
 
        .addBtn {
            top: 10px;
        }
    </style>
 
    <!-- jqgrid-->
    <script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
    <script src="~/js/bootstrap.min.js"></script>
 
    <!--容器-->
    @*<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>*@
    @*<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>*@
    <script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
    <script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>
    <script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
    @*<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>*@
    <script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
    <script src="~/js/plugins/webuploader/webuploader.min.js"></script>
 
    <script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
    <script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
    <script src="~/js/imgUpload.js"></script>
    @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@
    @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@
    <script src="~/js/TUJS.js"></script>
</head>
 
 
<body class="gray-bg" style="overflow:auto">
    <form id="formtest">
        <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        @*<div class="ibox-title">
                                <h5>  <i class="fa fa-list"></i>&nbsp;考勤规则</h5>
                            </div>*@
                        <div id="div_content" class="ibox-content" style="background-color:white;">
                            <div class="row">
                                <h5 style="color:cornflowerblue;">工作日:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-6 col-md-6">
                                        周 &nbsp;<input type="number" value="@Model.WeekStart" name="WeekStart" id="WeekStart" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" >&nbsp;-
                                        周 &nbsp;<input type="number" value="@Model.WeekEnd" name="WeekEnd" id="WeekEnd" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)" >
                                        <input type="hidden" value="@Model.Id"    id="Id" name="Id" >
                                    </div>
                                </div>
 
 
                                <h5 style="color:cornflowerblue;">上班时间:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>上午:</span><input   type="number" value="@Model.WorkingStart" name="WorkingStart" id="WorkingStart"style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)"  onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">-
                                        <input type="number" value="@Model.WorkingEnd"   name="WorkingEnd" id="WorkingEnd"   style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)"  onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                    </div>
 
                                </div>
 
 
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>下午:</span><input type="number"  value="@Model.OffworkStart" name="OffworkStart" id="OffworkStart" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">-
                                        <input type="number"  value="@Model.OffworkEnd" name="OffworkEnd" id="OffworkEnd" style="width:100px;" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">
                                    </div>
                                </div>
 
 
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>全勤奖</span>
                                        <input type="number" value="@Model.FullAttendance" name="FullAttendance" id="FullAttendance" style="width:150px" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                    </div>
                                </div>
 
                                <h5 style="color:cornflowerblue;">迟到扣款:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-8 col-md-8">
                                        <span>15分钟</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment1" name="LatePayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>30分钟</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment2" name="LatePayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment3" name="LatePayment3" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.LatePayment4" name="LatePayment4" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
 
                                    </div>
                                </div>
 
                                <h5 style="color:cornflowerblue;">旷工扣款:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>迟到</span><input style="width:150px" type="number" min="0" step="1" max="999999" value="@Model.Absenteeism" name="Absenteeism" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">分钟记为旷工
                                        <span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.AbsenteeismPayment1" name="AbsenteeismPayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.AbsenteeismPayment2" name="AbsenteeismPayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                    </div>
                                </div>
 
                                <h5 style="color:cornflowerblue;">事假扣款:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-8 col-md-8">
                                        <span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment1" name="PersonalPayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment2" name="PersonalPayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> 元
                                        <span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment3" name="PersonalPayment3" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.PersonalPayment4" name="PersonalPayment4" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                    </div>
                                </div>
 
                                <h5 style="color:cornflowerblue;">病假扣款:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-8 col-md-8">
                                        <span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment1" name="SickPayment1" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment2" name="SickPayment2" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment3" name="SickPayment3" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                        <span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="@Model.SickPayment4" name="SickPayment4" oninput="if(value.length>8)value=value.slice(0,18)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)">元
                                    </div>
                                </div>
 
                                <h5 style="color:red;">节假日:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-3 col-md-3">
                                        @if (jiejiari == null || jiejiari.Count == 0)
                                        {
                                            <div class="setSelect">
                                                <input type="text" value="" class="layui-input  layer-date  ldate form-control   holiday_s" id="holiday_s1" name="holiday_s" style="width:150px;" onfocus='laydate({elem:"#holiday_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
                                                <input type="text" value="" class="layui-input  layer-date  ldate form-control   holiday_e" id="holiday_e1" name="holiday_e" style="width:150px;" onfocus='laydate({elem:"#holiday_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
                                                <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button>
                                            </div>
                                        }
                                        else
                                        {
                                            for (int i = 0; i < jiejiari.Count; i++)
                                            {
                                                if (i == 0)
                                                {
                                                    <div class="setSelect">
                                                        <input type="text" value="@jiejiari[i].ValueStart" class="layui-input  layer-date  ldate form-control   holiday_s" id="@("holiday_s"+(i+1))" name="holiday_s" style="width:150px;" onfocus='laydate({elem:"#holiday_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
                                                        <input type="text" value="@jiejiari[i].ValueEnd" class="layui-input  layer-date  ldate form-control   holiday_e" id="@("holiday_e"+(i+1))" name="holiday_e" style="width:150px;" onfocus='laydate({elem:"#holiday_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
                                                        <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button>
                                                    </div>
                                                }
                                                else
                                                {
                                    <div class="setSelect">
                                        <input type="text" value="@jiejiari[i].ValueStart" class="layui-input  layer-date  ldate form-control   holiday_s" id="@("holiday_s"+(i+1))" name="holiday_s" style="width:150px;" onfocus='laydate({elem:"#holiday_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
                                        <input type="text" value="@jiejiari[i].ValueEnd" class="layui-input  layer-date  ldate form-control   holiday_e" id="@("holiday_e"+(i+1))" name="holiday_e" style="width:150px;" onfocus='laydate({elem:"#holiday_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
                                        <button type="button" class="addBtn" onclick="delBtn(this,0,'holiday')" data-type="1">-</button> 
                                    </div>
                                                }
 
 
                                            }
 
                                        }
 
                                    </div>
                                </div>
 
                                <h5 style="color:red;">调休日:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;">
                                    <div class="col-sm-3 col-md-3">
                                        @if (tiaoxiuri == null || tiaoxiuri.Count == 0)
                                        {
                                            <div class="setSelect">
                                                <input type="text" value="" class="layui-input  layer-date  ldate form-control rest_s" id="rest_s1" name="rest_s" style="width:150px;" onfocus='laydate({elem:"#rest_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
                                                <input type="text" value="" class="layui-input  layer-date  ldate form-control rest_e" id="rest_e1" name="rest_e" style="width:150px;" onfocus='laydate({elem:"#rest_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
                                                <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button>
                                            </div>
                                        }
                                        else
                                        {
                                            for (int i = 0; i < tiaoxiuri.Count; i++)
                                            {
                                                if (i == 0)
                                                {
                                                    <div class="setSelect">
                                                        <input type="text" value="@tiaoxiuri[i].ValueStart" class="layui-input  layer-date  ldate form-control rest_s" id="@("rest_s"+(i+1))" name="rest_s" style="width:150px;" onfocus='laydate({elem:"#rest_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
                                                        <input type="text" value="@tiaoxiuri[i].ValueEnd" class="layui-input  layer-date  ldate form-control rest_e" id="@("rest_e"+(i+1))" name="rest_e" style="width:150px;" onfocus='laydate({elem:"#rest_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
                                                        <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button>
                                                    </div>
                                                }
                                                else
                                                {
                                    <div class="setSelect">
                                        <input type="text" value="@tiaoxiuri[i].ValueStart" class="layui-input  layer-date  ldate form-control rest_s" id="@("rest_s"+(i+1))" name="rest_s" style="width:150px;" onfocus='laydate({elem:"#rest_s1",format:"YYYY-MM-DD",theme:"#fdd5004"})' /> -
                                        <input type="text" value="@tiaoxiuri[i].ValueEnd" class="layui-input  layer-date  ldate form-control rest_e" id="@("rest_e"+(i+1))" name="rest_e" style="width:150px;" onfocus='laydate({elem:"#rest_e1",format:"YYYY-MM-DD",theme:"#fdd5004"})' />
                                        <button type="button" class="addBtn" onclick="delBtn(this,0,'rest')" data-type="1">-</button>
                                    </div>
                                                }
 
                                            }
                                        }
 
                                    </div>
                                </div>
 
                                <h5 style="color:cornflowerblue;">加班补助:</h5>
                                <div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>节假日</span>
                                        <label>
                                            1倍
                                            @if (Model.Gala == 1)
                                            {
                                                <input name="Gala" type="radio"   value="1" class="type_b" checked="checked">
                                            }
                                            else
                                            { 
                                                <input name="Gala" type="radio"   value="1" class="type_b" >
 
                                            }
 
                                        </label>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <label>
                                            2倍
                                            @if (Model.Gala == 2)
                                            {
                                                <input name="Gala" type="radio" value="2" class="type_b" checked="checked">
                                            }
                                            else
                                            {
                                                <input name="Gala" type="radio" value="2" class="type_b">
 
                                            }
                                        </label>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <label>
                                            3倍
                                            @if (Model.Gala == 3)
                                            {
                                                <input name="Gala" type="radio" value="3" class="type_b" checked="checked">
                                            }
                                            else
                                            {
                                                <input name="Gala" type="radio" value="3" class="type_b">
 
                                            }
                                        </label>
 
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px; height:45px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>周末</span>
                                        <label>
                                            1倍
                                            @if (Model.Weekend1 == 1)
                                            {
                                                <input name="Weekend1" type="radio" checked="checked" value="1" class="type_b">
                                            }
                                            else
                                            {
                                                <input name="Weekend1" type="radio" value="1" class="type_b">
 
                                            }
 
 
                                        </label>
 
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <label>
                                            2倍
                                            @if (Model.Weekend1 == 2)
                                            {
                                            <input name="Weekend1" type="radio" checked="checked" value="2" class="type_b">
                                            }
                                            else
                                            {
                                            <input name="Weekend1" type="radio" value="2" class="type_b">
 
                                            }
                                        </label>
 
                                    </div>
                                </div>
 
                                <div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span>平时</span>
                                        <label for="p1">
                                            1倍/小时
                                            @if (Model.Usually == 1)
                                            {
                                                <input name="Usually" type="radio" checked="checked" value="1" class="type_b">
                                            }
                                            else
                                            {
                                                <input name="Usually" type="radio" value="1" class="type_b">
 
                                            }
                                        </label>
                                        &nbsp;&nbsp;&nbsp;&nbsp;
                                        <label for="Usually">
                                            2倍/小时
                                            @if (Model.Usually == 2)
                                            {
                                                <input name="Usually" type="radio" checked="checked" value="2" class="type_b">
                                            }
                                            else
                                            {
                                                <input name="Usually" type="radio" value="2" class="type_b">
 
                                            }
                                        </label>
                                    </div>
                                </div>
                                <div class="clearfix layer-area" style="padding-bottom:15px;height:45px;">
                                    <div class="col-sm-6 col-md-6">
                                        <span></span>
                                        @*<input name="holiday" value="" type="hidden" id="holiday">
                                        <input name="rest" value="" type="hidden" id="rest">*@
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="wrapper wrapper-content" style="margin-top:0px"></div>
        <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px ">
            <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
 
                <a class="btn btn-success" href="javascript:void(0)" onclick="SaveAttendanceRule();" style="margin-left:4px; border-radius:4px;">
                    <i class="glyphicon glyphicon-ok"></i>&nbsp;&nbsp;<span class="bold">提交</span>
                </a>
            </div>
        </div>
 
    </form>
 
 
 
 
 
    <script type="text/javascript">
        var hh = document.body.clientHeight - $('.ibox-title').height() - $("#top").height() * 2 - 95;
        $("#div_content").height(hh);
 
        toastr.options = {
            "closeButton": true,
            "debug": false,
            "progressBar": true,
            "positionClass": "toast-bottom-right",
            "onclick": null,
            "showDuration": "300",
            "hideDuration": "600",
            "timeOut": "4500",
            "extendedTimeOut": "600",
            "showEasing": "swing",
            "hideEasing": "linear",
            "showMethod": "fadeIn",
            "hideMethod": "fadeOut"
        };
 
 
        var record;
        $(function () {
            //$.ajax({
            //    type: "GET",
            //    url: "/Signin/GetTodaySignin",
            //    async: false,
            //    dataType: "json",
            //    success: function (data) {
            //        record = data;
            //        console.log(record);
            //      //  alert("打卡成功")
            //    },
            //    error: function () {
            //        //alert("错误");
            //    }
            //})
            //$(".ldate").each(function (el) {
            //    laydate({
            //        elem: "#" + $(this).attr('id'), //对应id
            //        format: 'hh:mm', //日期格式 // 分隔符可以任意定义,该例子表示只显示年月
            //        min: '00:00:00', //设定最小日期为当前日期
            //        max: '23:59:59', //最大日期
            //        type: 'datetime',
            //        isInitValue: true,
            //        festival: false, //显示节日
            //        istime: true,   //是否显示时分秒
            //        istoday: true, //是否是今天
            //        choose: function (datas) { //选择日期完毕的回调
            //            // console.log(this);
            //            // end.min = datas; //开始日选好后,重置结束日的最小日期
            //            // end.start = datas //将结束日的初始值设定为开始日
            //        }
            //    });
 
            //});
 
            //laydate({ elem: "#holiday_e1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
            //laydate({ elem: "#holiday_s1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
            //laydate({ elem: "#rest_s1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
            //laydate({ elem: "#rest_e1", format: 'YYYY/MM/DD', istime: true, event: "focus" });
 
        });
 
        var _SigninList = function () {
            OpenWindow("我的考勤记录", "100%", "100%", "/Signin/Signin");///?userId=" + record.Id);
        }
        // 保存打卡信息
        function SaveAttendanceRule(signinType) {
 
 
            $.ajax({
                type: "POST",
                url: "/Signin/SaveAttendanceRule",
                dataType: "json",
                global: false,
                data: $('form').serializeArray(),
                success: function (data) {
                    toastr.success("保存成功");
                },
                error: function () {
                    toastr.error("保存失败");
                }
            });
        }
 
        function _pageAutoClose() {
            parent.window._reloadPageData();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.isRefresh = true;
            parent.layer.closeAll('loading');
            parent.layer.close(index);
            return false;
        }
 
 
        //提交请求
        var SaveAttendanceRule =    function () {
            
 
            $.ajax({
                type: "POST",
                url: "/Signin/SaveAttendanceRule",
                dataType: "json",
                global: false,
                data: $('form').serializeArray(),
                success: function (data) {
 
 
 
                    if (data.Result) {
                        //  parent._afterSave(true);
                        parent.layer.msg('成功保存', { icon: 6 });
                        window.location = "/Signin/AttendanceRule";
 
 
                        //try {
                        //    _pageAutoClose();//自动关闭页面方法
                        //}
                        //catch (err) {
                        //    parent._CloseTab1("/Signin/SaveAttendanceRule/");
                        //}
 
                    }
                    else {
                        // toastr.error("失败");
                        parent.layer.msg(data.Message, { icon: 5 });
                    }
 
                },
                error: function () {
 
 
                    parent.layer.msg('失败', { icon: 5 });
                }
            });
        } ;
        //本月节假日设置
        function addBtn(obj) {
          
            var int = $('.holiday_s').length - 1;
            var id = $('.holiday_s').eq(int).attr('id');
            var holiday_ss = parseInt(id.replace("holiday_s", "")) + 1;
 
            var int1 = $('.holiday_e').length - 1
            var id1 = $('.holiday_e').eq(int1).attr('id');
            var holiday_es = parseInt(id1.replace("holiday_e", "")) + 1;
            
            var html = ' <div class="setSelect">\n' +
                '                <span></span>\n' +
                '                <input type="text" value="" class="layui-input  layer-date  ldate form-control   holiday_s" id="holiday_s' + holiday_ss + '" name="holiday_s"  style="width:150px;"   onfocus=\'laydate({elem:"#holiday_s' + holiday_ss + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\'  /> -\n' +
                '                <input type="text" value="" class="layui-input  layer-date  ldate form-control   holiday_e" id="holiday_e' + holiday_es + '" name="holiday_e"   style="width:150px;"   onfocus=\'laydate({elem:"#holiday_e' + holiday_es + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\'  />\n' +
                '                <button type="button" class="addBtn" onclick="delBtn(this,0,\'holida\')" data-type="1">-</button>\n' +
                '            </div>'
 
            $(obj).parent('div').parent('div').append(html);
 
            
           
 
           
             
 
           
        };
        function addRestBtn(obj) {
            var int = $('.rest_s').length - 1;
            var id = $('.rest_s').eq(int).attr('id');
            var rest_ss = parseInt(id.replace("rest_s", "")) + 1;
 
            var int1 = $('.rest_e').length - 1
            var id1 = $('.rest_e').eq(int1).attr('id');
            var rest_ee = parseInt(id1.replace("rest_e", "")) + 1;
 
            var html = ' <div class="setSelect">\n' +
                '                <span></span>\n' +
                '                <input type="text" value="" class="layui-input  layer-date  ldate form-control rest_s"  id="rest_s' + rest_ss + '" name="rest_s" style="width:150px;" onfocus=\'laydate({elem:"#rest_s' + rest_ss + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\' /> -\n' +
                '                <input type="text" value=""  class="layui-input  layer-date  ldate form-control rest_e"  id="rest_e' + rest_ee + '" name="rest_e"   style="width:150px;" onfocus=\'laydate({elem:"#rest_e' + rest_ee + '",format:"YYYY-MM-DD",theme:"#fdd5004"})\' />\n' +
                '                <button type="button" class="addBtn" onclick="delBtn(this,0,\'rest\')" data-type="1">-</button>\n' +
                '            </div>'
 
            $(obj).parent('div').parent('div').append(html);
 
           
        };
        function delBtn(obj, id, tb) {
            //if (id > 0) {
            //    var url = "/index.php/home/white/del.html"
            //    $.post(url, { id: id, tb: tb }, function (res) {
            //        if (res.status == 1) {
            //            $(obj).parent().remove();
            //        } else {
            //            layer.alert(res.msg)
            //        }
            //    })
            //}
            $(obj).parent().remove();
        }
 
 
    </script>
</body>
</html>