@@ -39,6 +39,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 查看页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -3,57 +3,69 @@ | |||||
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-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">学年</div> | <div class="lr-form-item-title">学年</div> | ||||
<div id="AcademicYearNo" ></div> | |||||
<div id="AcademicYearNo"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">学期</div> | <div class="lr-form-item-title">学期</div> | ||||
<div id="Semester" ></div> | |||||
<div id="Semester"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">申报部门</div> | |||||
<div id="Department"></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">申请人</div> | |||||
<div id="Applicat"></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">填报时间</div> | |||||
<input id="FillingTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss', onpicked: function() { $('#FillingTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">年级</div> | <div class="lr-form-item-title">年级</div> | ||||
<div id="Grade" ></div> | |||||
<div id="Grade"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">班级</div> | <div class="lr-form-item-title">班级</div> | ||||
<div id="ClassNo" ></div> | |||||
<div id="ClassNo"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">册数</div> | <div class="lr-form-item-title">册数</div> | ||||
<input id="BookNumber" type="text" class="form-control" /> | |||||
<input id="BookNumber" type="number" class="form-control calcul" value="0" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">资料名称</div> | <div class="lr-form-item-title">资料名称</div> | ||||
<input id="DataName" type="text" class="form-control" /> | |||||
<input id="DataName" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">刊号</div> | <div class="lr-form-item-title">刊号</div> | ||||
<input id="ISSN" type="text" class="form-control" /> | |||||
<input id="ISSN" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">出版社</div> | <div class="lr-form-item-title">出版社</div> | ||||
<input id="Publisher" type="text" class="form-control" /> | |||||
<input id="Publisher" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">作者</div> | <div class="lr-form-item-title">作者</div> | ||||
<input id="Author" type="text" class="form-control" /> | |||||
<input id="Author" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">定价</div> | <div class="lr-form-item-title">定价</div> | ||||
<input id="Pricing" type="text" class="form-control" /> | |||||
<input id="Pricing" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">教师册数</div> | <div class="lr-form-item-title">教师册数</div> | ||||
<input id="TeachNum" type="text" class="form-control" /> | |||||
<input id="TeachNum" type="number" class="form-control calcul" value="0" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">合计</div> | <div class="lr-form-item-title">合计</div> | ||||
<input id="Amount" type="text" class="form-control" /> | |||||
<input id="Amount" type="text" class="form-control" readonly /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TextBookSubscription" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSubscription/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSubscription/Form.js") |
@@ -42,6 +42,30 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
//$('#Department').lrDepartmentSelect({ | |||||
// select: function (val) { | |||||
// $('#Applicat').lrselectRefresh({ url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + val.value, text: 'F_RealName', value: 'F_UserId' }) | |||||
// } | |||||
//}); | |||||
$('#Applicat').lrselect({ allowSearch: true, text: 'F_RealName', value: 'F_UserId' }); | |||||
$('#Department').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var departmentId = ""; | |||||
if (val) { | |||||
departmentId = val.value; | |||||
} | |||||
$('#Applicat').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + departmentId, | |||||
text: "F_RealName", | |||||
value: "F_UserId" | |||||
}) | |||||
} | |||||
}); | |||||
$('#AcademicYearNo').lrselect({ | $('#AcademicYearNo').lrselect({ | ||||
placeholder: "学年", | placeholder: "学年", | ||||
allowSearch: false, | allowSearch: false, | ||||
@@ -87,6 +111,33 @@ var bootstrap = function ($, learun) { | |||||
value: "classno", | value: "classno", | ||||
text: "classname" | text: "classname" | ||||
}); | }); | ||||
$('.calcul').blur(function () { | |||||
var Book = $('#BookNumber').val(); | |||||
var Teach = $('#TeachNum').val(); | |||||
if (!!Book) { | |||||
let regNeg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; | |||||
if (regNeg.test(Book) && Book != '.') { | |||||
$('#Book').val(Book); | |||||
} else { | |||||
$('#Book').val(''); | |||||
learun.alert.warning("单价必须为整数或最多两位小数(不能为负数)!"); | |||||
return false; | |||||
} | |||||
} | |||||
if (!!Teach) { | |||||
let regNeg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; | |||||
if (regNeg.test(Teach) && Teach != '.') { | |||||
$('#Teach').val(Teach); | |||||
} else { | |||||
$('#Teach').val(''); | |||||
learun.alert.warning("数量必须为整数或最多两位小数(不能为负数)!"); | |||||
return false; | |||||
} | |||||
} | |||||
if (!!Book && !!Teach) { | |||||
$('#Amount').val(parseInt(Book) + parseInt(Teach)); | |||||
} | |||||
}); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -0,0 +1,71 @@ | |||||
@{ | |||||
ViewBag.Title = "流程审批"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">学年</div> | |||||
<div id="AcademicYearNo" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">学期</div> | |||||
<div id="Semester"></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">申报部门</div> | |||||
<div id="Department" readonly></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">申请人</div> | |||||
<div id="Applicat" readonly></div> | |||||
</div> | |||||
<div class="col-xs-4 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">填报时间</div> | |||||
<input id="FillingTime" type="text" readonly class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">年级</div> | |||||
<div id="Grade" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">册数</div> | |||||
<input id="BookNumber" type="number" class="form-control " readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">资料名称</div> | |||||
<input id="DataName" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">刊号</div> | |||||
<input id="ISSN" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">出版社</div> | |||||
<input id="Publisher" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">作者</div> | |||||
<input id="Author" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">定价</div> | |||||
<input id="Pricing" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">教师册数</div> | |||||
<input id="TeachNum" type="number" class="form-control " readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">合计</div> | |||||
<input id="Amount" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TextBookSubscription"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSubscription/FormView.js") |
@@ -0,0 +1,163 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-07-04 15:10 | |||||
* 描 述:TextBookSubscription | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
// 设置权限 | |||||
var setAuthorize; | |||||
// 设置表单数据 | |||||
var setFormData; | |||||
// 验证数据是否填写完整 | |||||
var validForm; | |||||
// 保存数据 | |||||
var save; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
// 设置权限 | |||||
setAuthorize = function (data) { | |||||
if (!!data) { | |||||
for (var field in data) { | |||||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||||
$('#' + data[field].fieldId).parent().remove(); | |||||
} | |||||
else { | |||||
if (data[field].isEdit != 1) { | |||||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#Applicat').lrselect({ allowSearch: true, text: 'F_RealName', value: 'F_UserId' }); | |||||
$('#Department').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||||
param: {}, | |||||
select: function (val) { | |||||
var departmentId = ""; | |||||
if (val) { | |||||
departmentId = val.value; | |||||
} | |||||
$('#Applicat').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + departmentId, | |||||
text: "F_RealName", | |||||
value: "F_UserId" | |||||
}) | |||||
} | |||||
}); | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200, | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#Grade').lrselect({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||||
value: "value", | |||||
text: "text", | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', | |||||
param: { | |||||
strWhere: "CheckMark=1 AND Grade='" + item.text + "' 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" | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 设置表单数据 | |||||
setFormData = function (processId, param, callback) { | |||||
if (!!processId) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/GetFormDataByProcessId?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'TextBookSubscription' && data[id]) { | |||||
keyValue = data[id].ID; | |||||
} | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
callback && callback(); | |||||
} | |||||
// 验证数据是否填写完整 | |||||
validForm = function () { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
}; | |||||
// 保存数据 | |||||
save = function (processId, callBack, i) { | |||||
//var formData = {}; | |||||
var res = {}; | |||||
res.code = 200; | |||||
//if (!!processId) { | |||||
// formData.PID = processId; | |||||
//} | |||||
callBack(res, i); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -2,7 +2,7 @@ | |||||
ViewBag.Title = "TextBookSubscription"; | ViewBag.Title = "TextBookSubscription"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout " > | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
@@ -43,9 +43,11 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" 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_add" 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_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_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -56,16 +56,19 @@ var bootstrap = function ($, learun) { | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/Form', | url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/Form', | ||||
width: 600, | |||||
height: 600, | |||||
width: 800, | |||||
height: 500, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
res = top[id].validForm(); | res = top[id].validForm(); | ||||
// 保存数据 | // 保存数据 | ||||
if (res) { | if (res) { | ||||
processId = learun.newGuid(); | |||||
res = top[id].save(processId, refreshGirdData); | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
//processId = learun.newGuid(); | |||||
//res = top[id].save(processId, refreshGirdData); | |||||
} | } | ||||
return res; | return res; | ||||
} | } | ||||
@@ -75,12 +78,17 @@ 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 !== 0) { | |||||
learun.alert.warning("当前项目已提交不可编辑!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/Form?keyValue=' + keyValue, | url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/Form?keyValue=' + keyValue, | ||||
width: 600, | |||||
height: 600, | |||||
width: 800, | |||||
height: 500, | |||||
callBack: function (id) { | callBack: function (id) { | ||||
var res = false; | var res = false; | ||||
// 验证数据 | // 验证数据 | ||||
@@ -100,48 +108,134 @@ 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 !== 0) { | |||||
learun.alert.warning("选中记录中包含已提交项目,不可删除!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | learun.layerConfirm('是否确认删除该项!', function (res) { | ||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/DeleteForm', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/DeleteForm', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | |||||
page.search(); | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var Status = $('#gridtable').jfGridValue('Status'); | |||||
if (Status !== 0) { | |||||
learun.alert.warning("选中记录中包含已提交项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/ModifyStatus', { keyValue: keyValue, processId: processId }, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'TextBookSubscription', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/FormView?keyValue=' + keyValue, | |||||
width: 800, | |||||
height: 600, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
{ label: "年级", name: "Grade", width: 100, align: "left" }, | |||||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 80, align: "left" }, | |||||
{ | |||||
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: 'Applicat', width: 100, align: 'left', | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||||
key: value, | |||||
keyId: 'f_userid', | |||||
callback: function (_data) { | |||||
callback(_data['f_realname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "填报时间", name: "FillingTime", width: 120, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm'); | |||||
} | |||||
}, | |||||
{ label: "年级", name: "Grade", width: 80, align: "left" }, | |||||
{ | { | ||||
label: "班级", name: "ClassNo", width: 100, align: "left", | label: "班级", name: "ClassNo", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: value, | key: value, | ||||
code: '', | |||||
keyId: 'classno', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data.text); | |||||
callback(_data['classname']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "册数", name: "BookNumber", width: 100, align: "left" }, | |||||
{ label: "册数", name: "BookNumber", width: 80, align: "left", statistics: true, }, | |||||
{ label: "资料名称", name: "DataName", width: 100, align: "left" }, | { label: "资料名称", name: "DataName", width: 100, align: "left" }, | ||||
{ label: "刊号", name: "ISSN", width: 100, align: "left" }, | |||||
{ label: "出版社", name: "Publisher", width: 100, align: "left" }, | |||||
{ label: "刊号", name: "ISSN", width: 150, align: "left" }, | |||||
{ label: "出版社", name: "Publisher", width: 150, align: "left" }, | |||||
{ label: "作者", name: "Author", width: 100, align: "left" }, | { label: "作者", name: "Author", width: 100, align: "left" }, | ||||
{ label: "定价", name: "Pricing", width: 100, align: "left" }, | { label: "定价", name: "Pricing", width: 100, align: "left" }, | ||||
{ label: "教师册数", name: "TeachNum", width: 100, align: "left" }, | |||||
{ label: "合计", name: "Amount", width: 100, align: "left" }, | |||||
{ label: "教师册数", name: "TeachNum", width: 80, align: "left", statistics: true, }, | |||||
{ label: "合计", name: "Amount", width: 100, align: "left", statistics: true,}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | { label: "备注", name: "Remark", width: 100, align: "left" }, | ||||
{ | |||||
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 if (cellvalue === 0) { | |||||
return '<span class=\"label label-default\" >草稿</span>'; | |||||
} else { | |||||
return "<span class=\"label label-danger\">作废</span>"; | |||||
} | |||||
} | |||||
} | |||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
isPage: true | |||||
isPage: true, | |||||
sidx: 'AcademicYearNo desc,FillingTime desc,Semester desc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -155,7 +249,7 @@ var bootstrap = function ($, learun) { | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
// 发起流程 | // 发起流程 | ||||
var postData = { | var postData = { | ||||
schemeCode: '',// 填写流程对应模板编号 | |||||
schemeCode: 'TextBookSubscription',// 填写流程对应模板编号 | |||||
processId: processId, | processId: processId, | ||||
level: '1', | level: '1', | ||||
}; | }; | ||||
@@ -1461,6 +1461,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\FormView.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | ||||
@@ -8139,6 +8140,7 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\SRPaper\CheckForm.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\SRPaper\CheckForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\TeacherServiceInfo\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\FormView.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -114,6 +114,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("APPLICAT")] | [Column("APPLICAT")] | ||||
public string Applicat { get; set; } | public string Applicat { get; set; } | ||||
/// <summary> | |||||
/// 申请时间 | |||||
/// </summary> | |||||
[Column("FILLINGTIME")] | |||||
public DateTime? FillingTime { get; set; } | |||||
#endregion | #endregion | ||||
@@ -5,6 +5,7 @@ using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Data; | using System.Data; | ||||
using System.Text; | using System.Text; | ||||
using System.Linq; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | namespace Learun.Application.TwoDevelopment.EducationalAdministration | ||||
{ | { | ||||
@@ -195,14 +196,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | var db = this.BaseRepository("CollegeMIS").BeginTrans(); | ||||
try | try | ||||
{ | { | ||||
var id = keyValue.Split(','); | |||||
foreach (var item in id) | |||||
{ | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.ID == keyValue); | |||||
entity.processId = processId; | |||||
entity.Status = 1; | |||||
db.Update(entity); | |||||
} | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookSubscriptionEntity>(a => a.ID == keyValue); | |||||
entity.ProcessId = processId; | |||||
entity.Status = 1; | |||||
db.Update(entity); | |||||
db.Commit(); | db.Commit(); | ||||
} | } | ||||
catch (Exception e) | catch (Exception e) | ||||