|
|
@@ -17,13 +17,34 @@ var bootstrap = function ($, learun) { |
|
|
|
bind: function () { |
|
|
|
$('#NoSignIn').lrDataItemSelect({ code: 'ADStatus' }); |
|
|
|
$('#NoSignOut').lrDataItemSelect({ code: 'ADStatus' }); |
|
|
|
$('#ClockTime').lrselect({ |
|
|
|
data: [{ 'value': '二次打卡', text: '二次打卡' }, { 'value': '四次打卡', text: '四次打卡' }], |
|
|
|
value: "value", |
|
|
|
text: "text", |
|
|
|
select: |
|
|
|
function (val) { |
|
|
|
if (val.value == "四次打卡") { |
|
|
|
$('#NoonCloseTime').parent('.lr-form-item').show(); |
|
|
|
$('#NoonCloseTime').removeAttr('isvalid'); |
|
|
|
$('#NoonWorkTime').removeAttr('isvalid'); |
|
|
|
$('#NoonWorkTime').parent('.lr-form-item').show(); |
|
|
|
} else { |
|
|
|
|
|
|
|
$('#NoonCloseTime').parent('.lr-form-item').hide(); |
|
|
|
$('#NoonWorkTime').parent('.lr-form-item').hide(); |
|
|
|
$('#NoonCloseTime').attr('isvalid','true'); |
|
|
|
$('#NoonWorkTime').attr('isvalid','true'); |
|
|
|
} |
|
|
|
} |
|
|
|
}).lrselectSet('二次打卡'); |
|
|
|
|
|
|
|
}, |
|
|
|
initData: function () { |
|
|
|
if (!!keyValue) { |
|
|
|
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/GetFormData?keyValue=' + keyValue, function (data) { |
|
|
|
for (var id in data) { |
|
|
|
if (!!data[id].length && data[id].length > 0) { |
|
|
|
$('#' + id ).jfGridSet('refreshdata', data[id]); |
|
|
|
$('#' + id).jfGridSet('refreshdata', data[id]); |
|
|
|
} |
|
|
|
else { |
|
|
|
$('[data-table="' + id + '"]').lrSetFormData(data[id]); |
|
|
|