@@ -3,55 +3,59 @@ | |||||
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="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | <div class="lr-form-item-title">学年<font face="宋体">*</font></div> | ||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | <div class="lr-form-item-title">学期<font face="宋体">*</font></div> | ||||
<div id="Semester"></div> | <div id="Semester"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">学生学号<font face="宋体">*</font></div> | <div class="lr-form-item-title">学生学号<font face="宋体">*</font></div> | ||||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | <div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | ||||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业部<font face="宋体">*</font></div> | ||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly></div> | <div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly></div> | <div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | <div class="lr-form-item-title">班级<font face="宋体">*</font></div> | ||||
<div id="ClassNo" isvalid="yes" checkexpession="NotNull" readonly></div> | <div id="ClassNo" isvalid="yes" checkexpession="NotNull" readonly></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">赛事名称<font face="宋体">*</font></div> | <div class="lr-form-item-title">赛事名称<font face="宋体">*</font></div> | ||||
<input id="SCName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="SCName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">赛事级别<font face="宋体">*</font></div> | <div class="lr-form-item-title">赛事级别<font face="宋体">*</font></div> | ||||
<div id="SCLevel" isvalid="yes" checkexpession="NotNull"></div> | <div id="SCLevel" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">赛事种类<font face="宋体">*</font></div> | <div class="lr-form-item-title">赛事种类<font face="宋体">*</font></div> | ||||
<input id="SCType" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="SCType" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">奖次<font face="宋体">*</font></div> | |||||
<div id="EncouragementDegree" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">颁发单位<font face="宋体">*</font></div> | <div class="lr-form-item-title">颁发单位<font face="宋体">*</font></div> | ||||
<input id="Unit" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="Unit" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">分值<font face="宋体">*</font></div> | <div class="lr-form-item-title">分值<font face="宋体">*</font></div> | ||||
<input id="Score" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="Score" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StudentCompetition"> | |||||
<div class="lr-form-item-title">获取时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">获取时间<font face="宋体">*</font></div> | ||||
<input id="SCTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#SCTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | <input id="SCTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#SCTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
@@ -64,6 +64,7 @@ var bootstrap = function ($, learun) { | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | ||||
$('#Url').lrUploader(); | $('#Url').lrUploader(); | ||||
$('#SCLevel').lrDataItemSelect({ code: 'Level' }); | $('#SCLevel').lrDataItemSelect({ code: 'Level' }); | ||||
$('#EncouragementDegree').lrDataItemSelect({ code: 'EncouragementDegree' }); | |||||
$('#StuNo').blur(function () { | $('#StuNo').blur(function () { | ||||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCompetition/GetStuData?stuno=' + $('#StuNo').val(), function (res) { | learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/StudentCompetition/GetStuData?stuno=' + $('#StuNo').val(), function (res) { | ||||
@@ -63,9 +63,9 @@ | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | ||||
<a id="lr_copy" class="btn btn-default"><i class="fa fa-plus"></i> 复制</a> | <a id="lr_copy" class="btn btn-default"><i class="fa fa-plus"></i> 复制</a> | ||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_updscore" class="btn btn-default"><i class="fa fa-plus"></i> 修改分值</a> | |||||
@*<a id="lr_updscore" class="btn btn-default"><i class="fa fa-plus"></i> 修改分值</a>*@ | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
@*<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a>*@ | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | <a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -17,9 +17,57 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 240, 400); | }, 240, 400); | ||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||||
$('#DeptNo').lrselect({ | |||||
allowSearch: true, | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" } | |||||
}); | |||||
} else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: "1=1 AND CheckMark=1" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
value: "majorno", | |||||
text: "majorname", | |||||
param: { strWhere: "1=1 AND CheckMark=1" }, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" } | |||||
}); | |||||
} else { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }, | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
$('#SCLevel').lrDataItemSelect({ code: 'Level' }); | $('#SCLevel').lrDataItemSelect({ code: 'Level' }); | ||||
//学年 | //学年 | ||||
$('#AcademicYearNo').lrselect({ | $('#AcademicYearNo').lrselect({ | ||||
@@ -47,8 +95,8 @@ var bootstrap = function ($, learun) { | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/Form', | url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/Form', | ||||
width: 1000, | |||||
height: 800, | |||||
width: 700, | |||||
height: 400, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -67,21 +115,21 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status == '2') { | |||||
learun.alert.warning("当前项目已审批通过!"); | |||||
return; | |||||
} | |||||
if (Status != '0') { | |||||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||||
return; | |||||
} | |||||
//var Status = $('#gridtable').jfGridValue('Status'); | |||||
//if (Status == '2') { | |||||
// learun.alert.warning("当前项目已审批通过!"); | |||||
// return; | |||||
//} | |||||
//if (Status != '0') { | |||||
// learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||||
// return; | |||||
//} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/Form?keyValue=' + keyValue, | ||||
width: 1000, | |||||
height: 800, | |||||
width: 700, | |||||
height: 400, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -139,8 +187,8 @@ var bootstrap = function ($, learun) { | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/Form?keyValue=' + keyValue + '&type=copy', | url: top.$.rootUrl + '/EducationalAdministration/StudentCompetition/Form?keyValue=' + keyValue + '&type=copy', | ||||
width: 1000, | |||||
height: 800, | |||||
width: 700, | |||||
height: 400, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -160,15 +208,15 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status == '2') { | |||||
learun.alert.warning("当前项目已审批通过!"); | |||||
return; | |||||
} | |||||
if (Status != '0') { | |||||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||||
return; | |||||
} | |||||
//var Status = $('#gridtable').jfGridValue('Status'); | |||||
//if (Status == '2') { | |||||
// learun.alert.warning("当前项目已审批通过!"); | |||||
// return; | |||||
//} | |||||
//if (Status != '0') { | |||||
// learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||||
// return; | |||||
//} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StudentCompetition/DeleteForm', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StudentCompetition/DeleteForm', { keyValue: keyValue }, function () { | ||||
@@ -269,6 +317,18 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ label: "赛事种类", name: "SCType", width: 100, align: "left" }, | { label: "赛事种类", name: "SCType", width: 100, align: "left" }, | ||||
{ | |||||
label: "奖次", name: "EncouragementDegree", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'EncouragementDegree', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "颁发单位", name: "Unit", width: 100, align: "left" }, | { label: "颁发单位", name: "Unit", width: 100, align: "left" }, | ||||
{ label: "分值", name: "Score", width: 100, align: "left" }, | { label: "分值", name: "Score", width: 100, align: "left" }, | ||||
{ | { | ||||
@@ -277,21 +337,22 @@ var bootstrap = function ($, learun) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "状态", name: "Status", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue === 1) { | |||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue === 2) { | |||||
return '<span class=\"label label-success\">审核通过</span>'; | |||||
} else { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "状态", name: "Status", width: 100, align: "left", | |||||
// formatter: function (cellvalue, row) { | |||||
// if (cellvalue === 1) { | |||||
// return '<span class=\"label label-warning\">审批中</span>'; | |||||
// } else if (cellvalue === 2) { | |||||
// return '<span class=\"label label-success\">审核通过</span>'; | |||||
// } else { | |||||
// return '<span class=\"label label-default\" >草稿</span>'; | |||||
// } | |||||
// } | |||||
//}, | |||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isPage: true | |||||
isPage: true, | |||||
sidx: "SCTime desc" | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -301,17 +362,18 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function (res, postData) { | refreshGirdData = function (res, postData) { | ||||
if (res && res.code && res.code == 200) { | |||||
var postData = { | |||||
schemeCode: 'StudentCompetition',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
$('#gridtable').jfGridSet('reload'); | |||||
//if (res && res.code && res.code == 200) { | |||||
// var postData = { | |||||
// schemeCode: 'StudentCompetition',// 填写流程对应模板编号 | |||||
// processId: processId, | |||||
// level: '1', | |||||
// }; | |||||
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
// learun.loading(false); | |||||
// }); | |||||
//} | |||||
//page.search(); | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
@@ -109,6 +109,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("SEMESTER")] | [Column("SEMESTER")] | ||||
public string Semester { get; set; } | public string Semester { get; set; } | ||||
/// <summary> | |||||
/// 学期 | |||||
/// </summary> | |||||
[Column("ENCOURAGEMENTDEGREE")] | |||||
public string EncouragementDegree { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||