@@ -3,7 +3,7 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*<link href="~/Content/camera/cropper.min.css" rel="stylesheet" /> | |||
<link href="~/Content/camera/ImgCropping.css" rel="stylesheet" />*@ | |||
<link href="~/Content/camera/ImgCropping.css" rel="stylesheet" />*@ | |||
<style> | |||
.title { | |||
margin-left: 40px; | |||
@@ -15,11 +15,19 @@ | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">填写人</div> | |||
<div class="lr-form-item-title">周别<font face="宋体">*</font></div> | |||
<div id="Week" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">发布人</div> | |||
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">填写日期</div> | |||
<div class="lr-form-item-title">发布日期</div> | |||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-12 title">一、常规工作安排</div> | |||
@@ -45,6 +45,14 @@ var bootstrap = function ($, learun) { | |||
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#Week').lrDataItemSelect({ code: 'Week' }); | |||
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: learun.clientdata.get(['userinfo']).departmentId, | |||
callback: function (_data) { | |||
$('#Department').val(_data.name); | |||
} | |||
}); | |||
$('#Firset').jfGrid({ | |||
headData: [ | |||
{ | |||
@@ -12,14 +12,22 @@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly/> | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">填写人</div> | |||
<div class="lr-form-item-title">周别<font face="宋体">*</font></div> | |||
<div id="Week" isvalid="yes" checkexpession="NotNull" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">发布人</div> | |||
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">填写日期</div> | |||
<div class="lr-form-item-title">发布日期</div> | |||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-12 title">一、常规工作安排</div> | |||
@@ -45,6 +45,14 @@ var bootstrap = function ($, learun) { | |||
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; | |||
$('#Week').lrDataItemSelect({ code: 'Week' }); | |||
learun.clientdata.getAsync('department', { | |||
key: learun.clientdata.get(['userinfo']).departmentId, | |||
callback: function (_data) { | |||
$('#Department').val(_data.name); | |||
} | |||
}); | |||
$('#Firset').jfGrid({ | |||
headData: [ | |||
{ | |||
@@ -15,11 +15,19 @@ | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">填写人</div> | |||
<div class="lr-form-item-title">周别<font face="宋体">*</font></div> | |||
<div id="Week" isvalid="yes" checkexpession="NotNull" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">发布人</div> | |||
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek"> | |||
<div class="lr-form-item-title">填写日期</div> | |||
<div class="lr-form-item-title">发布日期</div> | |||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-12 title">一、常规工作安排</div> | |||
@@ -45,6 +45,14 @@ var bootstrap = function ($, learun) { | |||
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; | |||
$('#Week').lrDataItemSelect({ code: 'Week' }); | |||
learun.clientdata.getAsync('department', { | |||
key: learun.clientdata.get(['userinfo']).departmentId, | |||
callback: function (_data) { | |||
$('#Department').val(_data.name); | |||
} | |||
}); | |||
$('#Firset').jfGrid({ | |||
headData: [ | |||
{ | |||
@@ -11,7 +11,15 @@ | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">填写人</div> | |||
<div class="lr-form-item-title">周别</div> | |||
<div id="Week"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">部门</div> | |||
<div id="Department"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">发布人</div> | |||
<div id="CreateUser"></div> | |||
</div> | |||
</div> | |||
@@ -31,7 +39,7 @@ | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_push" class="btn btn-default"><i class="fa fa-plus"></i> 一键推送</a> | |||
<a id="lr_push" class="btn btn-default"><i class="fa fa-plus"></i> 一键发布</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -18,6 +18,8 @@ var bootstrap = function ($, learun) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#CreateUser').lrUserSelect(0); | |||
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#Week').lrDataItemSelect({ code: 'Week' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -29,7 +31,7 @@ var bootstrap = function ($, learun) { | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/Form', | |||
width: 1000, | |||
height: 650, | |||
height: 670, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
@@ -59,7 +61,7 @@ var bootstrap = function ($, learun) { | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 650, | |||
height: 670, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
@@ -125,13 +127,13 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 推送 | |||
// 发布 | |||
$('#lr_push').on('click', function () { | |||
//var keyValue = $('#gridtable').jfGridValue('ID'); | |||
//if (learun.checkrow(keyValue)) { | |||
// var Status = $('#gridtable').jfGridValue('Status'); | |||
// if (Status !== 2) { | |||
// learun.alert.warning("当前项目不可推送!"); | |||
// learun.alert.warning("当前项目不可发布!"); | |||
// return; | |||
// } | |||
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/PushForm', {}, function () { | |||
@@ -142,10 +144,10 @@ var bootstrap = function ($, learun) { | |||
//if (learun.checkrow(keyValue)) { | |||
//var Status = $('#gridtable').jfGridValue('Status'); | |||
//if (Status !== 2) { | |||
// learun.alert.warning("当前项目不可推送!"); | |||
// learun.alert.warning("当前项目不可发布!"); | |||
// return; | |||
//} | |||
learun.layerConfirm('是否确认一键推送所有已审核项!', function (res) { | |||
learun.layerConfirm('是否确认一键发布所有已审核项!', function (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/PushForm', {}, function () { | |||
page.search(); | |||
}); | |||
@@ -177,25 +179,35 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/GetPageList', | |||
headData: [ | |||
{ label: "标题", name: "Title", width: 100, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
if (cellvalue == 0) { | |||
return "<span class=\"label label-default\">草稿</span>"; | |||
} else if (cellvalue == 1) { | |||
return "<span class=\"label label-warning\">审批中</span>"; | |||
} else if (cellvalue == 2) { | |||
return "<span class=\"label label-success\">审批通过</span>"; | |||
} else if (cellvalue == 3) { | |||
return "<span class=\"label label-primary\">推送</span>"; | |||
} else { | |||
return "<span class=\"label label-danger\">作废</span>"; | |||
} | |||
label: "部门", name: "Department", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "填写人", name: "CreateUser", width: 100, align: "left", | |||
label: "周别", name: "Week", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'Week', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "标题", name: "Title", width: 100, align: "left" }, | |||
{ | |||
label: "发布人", name: "CreateUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
key: value, | |||
@@ -206,11 +218,27 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "填写日期", name: "CreateTime", width: 100, align: "left", | |||
label: "发布日期", name: "CreateTime", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); | |||
} | |||
}, | |||
{ | |||
label: "发布状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
if (cellvalue == 0) { | |||
return "<span class=\"label label-default\">草稿</span>"; | |||
} else if (cellvalue == 1) { | |||
return "<span class=\"label label-warning\">审批中</span>"; | |||
} else if (cellvalue == 2) { | |||
return "<span class=\"label label-success\">审批通过</span>"; | |||
} else if (cellvalue == 3) { | |||
return "<span class=\"label label-primary\">发布</span>"; | |||
} else { | |||
return "<span class=\"label label-danger\">作废</span>"; | |||
} | |||
} | |||
}, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
@@ -38,8 +38,8 @@ | |||
<input id="TCNum" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate"> | |||
<div class="lr-form-item-title">批准时间<font face="宋体">*</font></div> | |||
<input id="TCTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TCTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="lr-form-item-title">批准时间</div> | |||
<input id="TCTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TCTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate"> | |||
<div class="lr-form-item-title">批准文号</div> | |||
@@ -59,6 +59,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int? Status { get; set; } | |||
/// <summary> | |||
/// Department | |||
/// </summary> | |||
[Column("DEPARTMENT")] | |||
public String Department { get; set; } | |||
/// <summary> | |||
/// Week | |||
/// </summary> | |||
[Column("WEEK")] | |||
public String Week { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -42,6 +42,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("CreateUser", queryParam["CreateUser"].ToString(), DbType.String); | |||
strSql.Append(" AND t.CreateUser = @CreateUser "); | |||
} | |||
if (!queryParam["Department"].IsEmpty()) | |||
{ | |||
dp.Add("Department", queryParam["Department"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Department = @Department "); | |||
} | |||
if (!queryParam["Week"].IsEmpty()) | |||
{ | |||
dp.Add("Week", queryParam["Week"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Week = @Week "); | |||
} | |||
return this.BaseRepository().FindList<DepartmentWeekEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||