@@ -3,41 +3,41 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||||
<div class="lr-form-item-title">奖励类型<font face="宋体">*</font></div> | <div class="lr-form-item-title">奖励类型<font face="宋体">*</font></div> | ||||
<div id="NatureType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
<div id="NatureType" isvalid="yes" checkexpession="NotNull"></div> | |||||
<input id="shuxing" type="text" style="display: none; " /> | |||||
<input id="awardtype" type="text" style="display: none; " /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||||
<div class="lr-form-item-title">奖励对象</div> | <div class="lr-form-item-title">奖励对象</div> | ||||
<div id="stuName" ></div> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="lr-form-item-title">申请材料</div> | |||||
<div id="FileAddress" ></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FileAddress" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div id="RewardObjects"></div> | |||||
<input id="StuId" type="text" style="display: none; " /> | |||||
<input id="ClassNo" type="text" style="display: none; " /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="FileAddress"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||||
<div class="lr-form-item-title">获奖时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">获奖时间<font face="宋体">*</font></div> | ||||
<input id="WinningTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#WinningTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="WinningTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#WinningTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||||
<div class="lr-form-item-title">获奖描述</div> | <div class="lr-form-item-title">获奖描述</div> | ||||
<textarea id="Remark" class="form-control" style="height:50px;" ></textarea> | |||||
<textarea id="Remark" class="form-control" style="height:50px;"></textarea> | |||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; "> | |||||
<div class="lr-form-item-title">录入时间</div> | <div class="lr-form-item-title">录入时间</div> | ||||
<input id="Adddate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | <input id="Adddate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; "> | |||||
<div class="lr-form-item-title">录入人</div> | <div class="lr-form-item-title">录入人</div> | ||||
<input id="AddUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | <input id="AddUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | ||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; " > | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; "> | |||||
<div class="lr-form-item-title">奖惩</div> | <div class="lr-form-item-title">奖惩</div> | ||||
<input id="IsVaild" type="text" class="form-control" /> | |||||
<input id="IsVaild" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js") |
@@ -15,8 +15,55 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment',value: 'id',text: 'awardname' }); | |||||
$('#stuName').lrDataItemSelect({ code: '' }); | |||||
$('#NatureType').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=AwardSource', | |||||
selectWord: 'id', | |||||
value: 'id', | |||||
text: 'awardname', | |||||
headData: | |||||
[ | |||||
{ label: "奖励类型", name: "awardname", width: 100, align: "left" }, | |||||
{ | |||||
label: '奖励属性', name: 'naturetype', width: 100, align: "left", | |||||
formatter: function (val) { | |||||
if (val == '0') { return '集体'; } | |||||
else { return '个人'; } | |||||
} | |||||
}, | |||||
{ | |||||
label: "奖励级别", name: "awardtype", width: 100, align: "left", | |||||
formatterAsync: function (callback, value) { | |||||
learun.clientdata.getAsync('dataItem', | |||||
{ | |||||
key: value,code: 'AwardType', | |||||
callback: function (_data) {callback(_data.text);} | |||||
}); | |||||
}, | |||||
} | |||||
], | |||||
select: function (item) { | |||||
$("#NatureType").val(item.awardname); | |||||
$("#shuxing").val(item.naturetype); | |||||
$("#awardtype").val(item.awardtype); | |||||
} | |||||
}); | |||||
$('#RewardObjects').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
selectWord: 'stuno', | |||||
value: 'stuno', | |||||
text: 'stuname', | |||||
headData: | |||||
[ | |||||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||||
], | |||||
select: function (item) { | |||||
$("#StuId").val(item.stuno); | |||||
$("#RewardObjects").val(item.stuname); | |||||
$("#ClassNo").val(item.classno); | |||||
} | |||||
}); | |||||
$('#FileAddress').lrUploader(); | $('#FileAddress').lrUploader(); | ||||
$('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | $('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | ||||
$('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | $('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | ||||
@@ -16,7 +16,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">奖励对象</div> | <div class="lr-form-item-title">奖励对象</div> | ||||
<div id="stuName"></div> | |||||
<div id="StuName"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -16,9 +16,65 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment', value: 'id', text: 'awardname' }); | |||||
$('#stuName').lrDataItemSelect({ code: '' }); | |||||
$('#FileAddress').lrUploader(); | |||||
$('#NatureType').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=AwardSource', | |||||
selectWord: 'id', | |||||
value: 'id', | |||||
text: 'awardname', | |||||
headData: | |||||
[ | |||||
{ label: "奖励类型", name: "awardname", width: 100, align: "left" }, | |||||
{ | |||||
label: '奖励属性', name: 'naturetype', width: 100, align: "left", | |||||
formatter: function (val) { | |||||
if (val == '0') { | |||||
return '集体'; | |||||
} else { | |||||
return '个人'; | |||||
} | |||||
} | |||||
}, | |||||
{ | |||||
label: "奖励级别",name: "awardtype",width: 100,align: "left", | |||||
formatterAsync: function(callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', | |||||
{ | |||||
key: value, | |||||
code: 'AwardType', | |||||
callback: function(_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}, | |||||
} | |||||
], | |||||
select: function (item) { | |||||
$("#NatureType").val(item.awardname); | |||||
$("#shuxing").val(item.naturetype); | |||||
$("#awardtype").val(item.awardtype); | |||||
console.log($("#NatureType").val()) | |||||
console.log($("#shuxing").val()) | |||||
console.log($("#awardtype").val()) | |||||
} | |||||
}); | |||||
$('#RewardObjects').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
selectWord: 'stuno', | |||||
value: 'stuno', | |||||
text: 'stuname', | |||||
headData: | |||||
[ | |||||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||||
], | |||||
select: function (item) { | |||||
$("#StuId").val(item.stuno); | |||||
$("#RewardObjects").val(item.stuname); | |||||
$("#ClassNo").val(item.classno); | |||||
} | |||||
}); | |||||
//$('#FileAddress').lrUploader(); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -71,11 +127,37 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | |||||
label: "获奖对象", name: "RewardObjects", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | |||||
keyId: 'stuno', | |||||
callback: function (_data) { | |||||
callback(_data['stuname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "奖励类型", name: "NatureType", width: 100, align: "left", | label: "奖励类型", name: "NatureType", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardAndPunishment', | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardSource', | |||||
key: value, | key: value, | ||||
keyId: 'id', | keyId: 'id', | ||||
callback: function (_data) { | callback: function (_data) { | ||||
@@ -84,10 +166,17 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "申请材料", name: "FileAddress", width: 100, align: "left" }, | |||||
{ | |||||
label: '奖励属性', name: 'NatureType', width: 100, align: "left", | |||||
formatter: function (val) { | |||||
if (val == '0') { | |||||
return '集体'; | |||||
} else { | |||||
return '个人'; | |||||
} | |||||
} | |||||
}, | |||||
{ label: "获奖时间", name: "WinningTime", width: 100, align: "left" }, | { label: "获奖时间", name: "WinningTime", width: 100, align: "left" }, | ||||
{ label: "获奖描述", name: "Remark", width: 100, align: "left" }, | |||||
{ label: "录入时间", name: "Adddate", width: 100, align: "left" }, | |||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isMultiselect: true, | isMultiselect: true, | ||||
@@ -97,8 +186,11 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.IsVaild='0' | |||||
param.IsVaild = '0' | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
}, | |||||
downLoad: function (fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -106,3 +198,13 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId, fileTwo) { | |||||
if (fileTwo) { | |||||
top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () { | |||||
}); | |||||
} | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -7,14 +7,12 @@ | |||||
<div class="lr-form-item-title">惩罚类型<font face="宋体">*</font></div> | <div class="lr-form-item-title">惩罚类型<font face="宋体">*</font></div> | ||||
<div id="NatureType" isvalid="yes" checkexpession="NotNull" ></div> | <div id="NatureType" isvalid="yes" checkexpession="NotNull" ></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo"> | |||||
<div class="lr-form-item-title">惩罚对象</div> | <div class="lr-form-item-title">惩罚对象</div> | ||||
<div id="stuName" ></div> | |||||
<div id="StuName"></div> | |||||
<input id="StuId" type="text" style="display: none; " /> | |||||
<input id="ClassNo" type="text" style="display: none; " /> | |||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="lr-form-item-title">申请材料</div> | |||||
<div id="FileAddress" ></div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | <div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | ||||
<div class="lr-form-item-title">惩罚时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">惩罚时间<font face="宋体">*</font></div> | ||||
<input id="WinningTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#WinningTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | <input id="WinningTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#WinningTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | ||||
@@ -23,11 +21,11 @@ | |||||
<div class="lr-form-item-title">惩罚描述</div> | <div class="lr-form-item-title">惩罚描述</div> | ||||
<textarea id="Remark" class="form-control" style="height:50px;" ></textarea> | <textarea id="Remark" class="form-control" style="height:50px;" ></textarea> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; " > | |||||
<div class="lr-form-item-title">录入时间</div> | <div class="lr-form-item-title">录入时间</div> | ||||
<input id="Adddate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
<input id="Adddate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" > | |||||
<div class="col-xs-12 lr-form-item" data-table="AwardPunishInfo" style="display: none; " > | |||||
<div class="lr-form-item-title">录入人</div> | <div class="lr-form-item-title">录入人</div> | ||||
<input id="AddUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | <input id="AddUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | ||||
</div> | </div> | ||||
@@ -10,14 +10,31 @@ var bootstrap = function ($, learun) { | |||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | page.bind(); | ||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment',value: 'id',text: 'awardname' }); | |||||
$('#stuName').lrDataItemSelect({ code: '' }); | |||||
$('#FileAddress').lrUploader(); | |||||
$('#NatureType').lrDataSourceSelect({ | |||||
code: 'PunishmentSource', value: 'id', text: 'awardname', | |||||
}); | |||||
$('#AttachmentName').lrUploader(); | |||||
$('#StuName').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
selectWord: 'stuno', | |||||
value: 'stuno', | |||||
text: 'stuname', | |||||
headData: | |||||
[ | |||||
{ label: "学号", name: "stuno", width: 100, align: "left"}, | |||||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||||
], | |||||
select: function (item) { | |||||
$("#StuId").val(item.stuno); | |||||
$("#StuName").val(item.stuname); | |||||
$("#ClassNo").val(item.classno); | |||||
} | |||||
}); | |||||
$('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | $('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | ||||
$('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | $('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | ||||
$('#AddUser').val(learun.clientdata.get(['userinfo']).realName); | $('#AddUser').val(learun.clientdata.get(['userinfo']).realName); | ||||
@@ -27,7 +44,7 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
@@ -35,7 +52,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
$('#IsVaild').val('1'); | |||||
$('#IsVaild').val('1'); | |||||
} | } | ||||
}; | }; | ||||
// 保存数据 | // 保存数据 | ||||
@@ -16,7 +16,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">惩罚对象</div> | <div class="lr-form-item-title">惩罚对象</div> | ||||
<div id="stuName"></div> | |||||
<div id="StuName"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -16,9 +16,26 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#NatureType').lrDataSourceSelect({ code: 'AwardAndPunishment', value: 'id', text: 'awardname' }); | |||||
$('#stuName').lrDataItemSelect({ code: '' }); | |||||
$('#FileAddress').lrUploader(); | |||||
$('#NatureType').lrDataSourceSelect({ | |||||
code: 'PunishmentSource', value: 'id', text: 'awardname', | |||||
}); | |||||
$('#StuName').lrGirdSelect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | |||||
selectWord: 'stuno', | |||||
value: 'id', | |||||
text: 'name', | |||||
headData: | |||||
[ | |||||
{ label: "学号", name: "stuno", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "stuname", width: 100, align: "left" }, | |||||
{ label: "班级", name: "classno", width: 100, align: "left" }, | |||||
], | |||||
select: function (item) { | |||||
$("#StuId").val(item.stuno); | |||||
$("#StuName").val(item.stuname); | |||||
$("#ClassNo").val(item.classno); | |||||
} | |||||
}); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -72,10 +89,37 @@ var bootstrap = function ($, learun) { | |||||
url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | { | ||||
label: "惩罚类型", name: "NatureType", width: 100, align: "left", | |||||
label: "姓名", name: "StuName", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | |||||
keyId: 'stuno', | |||||
callback: function (_data) { | |||||
callback(_data['stuname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "学生学号", name: "StuId", width: 200, align: "left" }, | |||||
{ | |||||
label: "班级", name: "ClassNo", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "惩罚类型", name: "NatureType", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardAndPunishment', | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PunishmentSource', | |||||
key: value, | key: value, | ||||
keyId: 'id', | keyId: 'id', | ||||
callback: function (_data) { | callback: function (_data) { | ||||
@@ -84,10 +128,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "惩罚材料", name: "FileAddress", width: 100, align: "left" }, | |||||
{ label: "惩罚时间", name: "WinningTime", width: 100, align: "left" }, | |||||
{ label: "惩罚描述", name: "Remark", width: 100, align: "left" }, | |||||
{ label: "录入时间", name: "Adddate", width: 100, align: "left" }, | |||||
{ label: "惩罚时间", name: "WinningTime", width: 200, align: "left" }, | |||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isMultiselect: true, | isMultiselect: true, | ||||
@@ -97,7 +138,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.IsVaild='0' | |||||
param.IsVaild = '1' | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -105,4 +146,4 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').jfGridSet('reload'); | $('#gridtable').jfGridSet('reload'); | ||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | |||||
} |
@@ -30,10 +30,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("STUID")] | [Column("STUID")] | ||||
public string StuId { get; set; } | public string StuId { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// stuName | |||||
/// StuName | |||||
/// </summary> | /// </summary> | ||||
[Column("STUNAME")] | [Column("STUNAME")] | ||||
public string stuName { get; set; } | |||||
public string StuName { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 班级 | /// 班级 | ||||
/// </summary> | /// </summary> | ||||
@@ -42,10 +42,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("NatureType",queryParam["NatureType"].ToString(), DbType.String); | dp.Add("NatureType",queryParam["NatureType"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.NatureType = @NatureType "); | strSql.Append(" AND t.NatureType = @NatureType "); | ||||
} | } | ||||
if (!queryParam["stuName"].IsEmpty()) | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("stuName",queryParam["stuName"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.stuName = @stuName "); | |||||
dp.Add("StuName", queryParam["StuName"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.StuName = @StuName "); | |||||
} | |||||
if (!queryParam["IsVaild"].IsEmpty()) | |||||
{ | |||||
dp.Add("IsVaild", queryParam["IsVaild"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.IsVaild = @IsVaild "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<AwardPunishInfoEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<AwardPunishInfoEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||