| | |
| | | @{ |
| | | @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> |
| | |
| | | padding-bottom: 15px !important; |
| | | } |
| | | |
| | | .addBtn{ |
| | | top:10px; |
| | | .addBtn { |
| | | top: 10px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <h5 style="color:cornflowerblue;">工作日:</h5> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | <div class="col-sm-6 col-md-6"> |
| | | 周 <input type="number" value="1" name="WeekStart" id="WeekStart" style="width:100px;"> - |
| | | 周 <input type="number" value="5" name="WeekEnd" id="WeekEnd" style="width:100px;"> |
| | | 周 <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})?/)" > - |
| | | 周 <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 class="layui-input layer-date ldate form-control" type="text" value="09:00" name="WorkingStart" id="WorkingStart" placeholder="HH:mm:ss" style="width:100px;">- |
| | | <input type="text" value="12:00" class="layui-input layer-date ldate form-control" name="WorkingEnd" id="WorkingEnd" placeholder="HH:mm:ss" style="width:100px;"> |
| | | <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="text" class="layui-input layer-date ldate form-control" value="13:00" name="OffworkStart" id="OffworkStart" style="width:100px;">- |
| | | <input type="text" class="layui-input layer-date ldate form-control" value="18:00" name="OffworkEnd" id="OffworkEnd" style="width:100px;"> |
| | | <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="200.00" name="FullAttendance" id="FullAttendance" style="width:150px">元 |
| | | <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="10.00" name="LatePayment1">元 |
| | | <span>30分钟</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="LatePayment2">元 |
| | | <span>1小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="LatePayment3">元 |
| | | <span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="100.00" name="LatePayment4">元 |
| | | <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="120" name="Absenteeism">分钟记为旷工 |
| | | <span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="AbsenteeismPayment1">元 |
| | | <span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="200.00" name="AbsenteeismPayment2">元 |
| | | <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="10.00" name="PersonalPayment1">元 |
| | | <span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment2">元 |
| | | <span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="PersonalPayment3">元 |
| | | <span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="50.00" name="PersonalPayment4">元 |
| | | <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="10.00" name="SickPayment1">元 |
| | | <span>2小时</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment2">元 |
| | | <span>半天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="10.00" name="SickPayment3">元 |
| | | <span>1天</span><input style="width:150px" type="number" min="0.01" step="0.01" max="999999" value="100.00" name="SickPayment4">元 |
| | | <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"> |
| | | <div class="setSelect"> |
| | | <input type="text" value="" class="layui-input layer-date ldate form-control " id="holiday_s1" name="holiday_s" style="width:150px;"> - |
| | | <input type="text" value="" class="layui-input layer-date ldate form-control" id="holiday_e1" name="holiday_e" style="width:150px;"> |
| | | <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addBtn(this)" data-type="1">+</button> |
| | | </div> |
| | | @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"> |
| | | <div class="setSelect"> |
| | | <input type="text" value="" class="layui-input layer-date ldate form-control " id="rest_s1" name="rest_s" style="width:150px;"> - |
| | | <input type="text" value="" class="layui-input layer-date ldate form-control " id="rest_e1" name="rest_e" style="width:150px;"> |
| | | <button type="button" class="addBtn" style="padding-bottom:10px;" onclick="addRestBtn(this)" data-type="1">+</button> |
| | | </div> |
| | | @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> |
| | | |
| | |
| | | <span>节假日</span> |
| | | <label> |
| | | 1倍 |
| | | <input name="Gala" type="radio" checked="" value="1" class="type_b"> |
| | | @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> |
| | | |
| | | <label> |
| | | 2倍 |
| | | <input name="Gala" type="radio" value="2" class="type_b"> |
| | | @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> |
| | | |
| | | <label> |
| | | 3倍 |
| | | <input name="Gala" type="radio" value="3" class="type_b"> |
| | | @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 class="clearfix layer-area" style="padding-bottom:15px; height:45px;"> |
| | | <div class="col-sm-6 col-md-6"> |
| | | <span>周末</span> |
| | | <label>1倍 <input name="Weekend1" type="radio" checked="" value="1" class="type_b"></label> |
| | | <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> |
| | | |
| | | |
| | | <label>2倍<input name="Weekend1" type="radio" value="2" class="type_b"></label> |
| | | <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倍/小时<input id="p1" name="usually" type="radio" checked="" value="1" class="type_b"></label> |
| | | <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> |
| | | |
| | | <label for="p2">2倍/小时<input id="p2" name="usually" type="radio" value="2" class="type_b"></label> |
| | | <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"> |
| | | @*<input name="holiday" value="" type="hidden" id="holiday"> |
| | | <input name="rest" value="" type="hidden" id="rest">*@ |
| | | </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> <span class="bold">提交</span> |
| | | </a> |
| | |
| | | |
| | | //}); |
| | | |
| | | 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" }); |
| | | |
| | | //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 () { |
| | |
| | | } |
| | | // 保存打卡信息 |
| | | function SaveAttendanceRule(signinType) { |
| | | |
| | | |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/Signin/SaveAttendanceRule", |
| | | dataType: "json", |
| | | global: false, |
| | | data: $('form').serializeArray(), |
| | | data: $('form').serializeArray(), |
| | | success: function (data) { |
| | | toastr.success("保存成功"); |
| | | }, |
| | |
| | | |
| | | |
| | | //提交请求 |
| | | $('#searchBtn').on('click', function () { |
| | | var holiday = ''; |
| | | $('.holiday_s').each(function () { |
| | | var holiday_s = $(this).val(); |
| | | var holiday_e = $(this).next('.holiday_e').val(); |
| | | if (holiday_s != '' && holiday_e != '') { |
| | | holiday += ',' + holiday_s + '+' + holiday_e; |
| | | } |
| | | |
| | | }) |
| | | holiday = holiday.substring(1) |
| | | if (holiday) { |
| | | $('#holiday').val(holiday); |
| | | } |
| | | var rest = ''; |
| | | $('.rest_s').each(function () { |
| | | var rest_s = $(this).val(); |
| | | var rest_e = $(this).next('.rest_e').val(); |
| | | if (rest_s != '' && rest_e != '') { |
| | | rest += ',' + rest_s + '+' + rest_e; |
| | | } |
| | | |
| | | }) |
| | | rest = rest.substring(1) |
| | | if (rest) { |
| | | $('#rest').val(rest); |
| | | } |
| | | formFile = new FormData($('#form')[0]); |
| | | var SaveAttendanceRule = function () { |
| | | |
| | | |
| | | $.ajax({ |
| | | url: "/index.php/home/index/attendance.html", |
| | | type: 'POST', |
| | | data: formFile, |
| | | async: true, |
| | | cache: false, |
| | | contentType: false, |
| | | processData: false, |
| | | // traditional:true, |
| | | // dataType:'json', |
| | | success: function (res) { |
| | | console.log(res); |
| | | if (res.status == 1) { |
| | | layer.alert(res.msg) |
| | | } else { |
| | | layer.alert(res.msg) |
| | | 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" name="holiday_s[]" class="Wdate holiday_s" style="width:150px;"> -\n' + |
| | | ' <input type="text" value="" class="layui-input layer-date ldate form-control" name="holiday_e[]" class="Wdate holiday_e" style="width:150px;">\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').after(html); |
| | | $(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" name="rest_s[]" class="Wdate rest_s" style="width:150px;"> -\n' + |
| | | ' <input type="text" value="" class="layui-input layer-date ldate form-control" name="rest_e[]" class="Wdate rest_e" style="width:150px;">\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').after(html); |
| | | } |
| | | $(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) |
| | | } |
| | | }) |
| | | } |
| | | //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(); |
| | | } |
| | | |