diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml index 69d345394..0e223a3a0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.cshtml @@ -3,41 +3,41 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
奖励类型*
-
+
+ +
-
+
奖励对象
-
-
- @*
-
申请材料
-
-
*@ -
-
附件上传
-
-
-
+
+ + +
+
+
附件上传
+
+
+
获奖时间*
- +
-
+
获奖描述
- +
- @*
+ -
+ *@ - +
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js index c0ae804ff..7f1d1a0a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardForm.js @@ -15,8 +15,55 @@ var bootstrap = function ($, learun) { page.initData(); }, 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(); $('#Adddate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); $('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml index 9039bd2b1..37ecb59a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.cshtml @@ -16,7 +16,7 @@
奖励对象
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js index 39c9fcdab..23571b051 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js @@ -16,9 +16,65 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 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 () { location.reload(); @@ -71,11 +127,37 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', 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", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardAndPunishment', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardSource', key: value, keyId: 'id', 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: "Remark", width: 100, align: "left" }, - { label: "录入时间", name: "Adddate", width: 100, align: "left" }, ], mainId: 'Id', isMultiselect: true, @@ -97,8 +186,11 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; - param.IsVaild='0' + param.IsVaild = '0' $('#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 () { @@ -106,3 +198,13 @@ var bootstrap = function ($, learun) { }; 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' }); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml index 587823ff4..f3ea06aef 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.cshtml @@ -7,14 +7,12 @@
惩罚类型*
-
+
惩罚对象
-
+
+ +
- @*
-
申请材料
-
-
*@
惩罚时间*
@@ -23,11 +21,11 @@
惩罚描述
-
+ -
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js index ab50835cb..cf7158b6a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js @@ -10,14 +10,31 @@ var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { - $('.lr-form-wrap').lrscroll(); page.bind(); page.initData(); }, 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')); $('#AddUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; $('#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) { 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]); @@ -35,7 +52,7 @@ var bootstrap = function ($, learun) { } }); } - $('#IsVaild').val('1'); + $('#IsVaild').val('1'); } }; // 保存数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml index f79fc5f0a..4ef00d927 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.cshtml @@ -16,7 +16,7 @@
惩罚对象
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js index b6fce5ec0..ea35a36f9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Index.js @@ -16,9 +16,26 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 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 () { location.reload(); @@ -72,10 +89,37 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/AwardPunishInfo/GetPageList', 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) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'AwardAndPunishment', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PunishmentSource', key: value, keyId: 'id', 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', isMultiselect: true, @@ -97,7 +138,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; - param.IsVaild='0' + param.IsVaild = '1' $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; @@ -105,4 +146,4 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGridSet('reload'); }; page.init(); -} +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs index 3f9afc18d..816922a09 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoEntity.cs @@ -30,10 +30,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("STUID")] public string StuId { get; set; } /// - /// stuName + /// StuName /// [Column("STUNAME")] - public string stuName { get; set; } + public string StuName { get; set; } /// /// 班级 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs index 8ce0d4291..6276a326c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AwardPunishInfo/AwardPunishInfoService.cs @@ -42,10 +42,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("NatureType",queryParam["NatureType"].ToString(), DbType.String); 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(strSql.ToString(),dp, pagination); }