@@ -196,7 +196,10 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
{ | { | ||||
entity.AOStatus = 0; | entity.AOStatus = 0; | ||||
entity.AOOutStatus = 0; | entity.AOOutStatus = 0; | ||||
entity.AOCreateTime = DateTime.Now; | |||||
if (entity.AOCreateTime == null) | |||||
{ | |||||
entity.AOCreateTime = DateTime.Now; | |||||
} | |||||
} | } | ||||
List<Ass_AssetsOutItemApplyEntity> ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject<List<Ass_AssetsOutItemApplyEntity>>(); | List<Ass_AssetsOutItemApplyEntity> ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject<List<Ass_AssetsOutItemApplyEntity>>(); | ||||
if (ispl) | if (ispl) | ||||
@@ -0,0 +1,117 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-08-11 11:57 | |||||
/// 描 述:基础信息采集 | |||||
/// </summary> | |||||
public class FD_BudgetFileController : MvcControllerBase | |||||
{ | |||||
private FD_BudgetFileIBLL fD_BudgetFileIBLL = new FD_BudgetFileBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = fD_BudgetFileIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var FD_BudgetFileData = fD_BudgetFileIBLL.GetFD_BudgetFileEntity( keyValue ); | |||||
var jsonData = new { | |||||
FD_BudgetFile = FD_BudgetFileData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
fD_BudgetFileIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
FD_BudgetFileEntity entity = strEntity.ToObject<FD_BudgetFileEntity>(); | |||||
fD_BudgetFileIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,31 @@ | |||||
@{ | |||||
ViewBag.Title = "基础信息采集"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||||
<div class="lr-form-item-title">年度</div> | |||||
<div id="YearNo" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||||
<div class="lr-form-item-title">月份</div> | |||||
<div id="MouthNo" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||||
<div class="lr-form-item-title">接收部门</div> | |||||
<div id="DeptId" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||||
<div class="lr-form-item-title">材料名称</div> | |||||
<input id="FileName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Url" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||||
<div class="lr-form-item-title">说明</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.js") |
@@ -0,0 +1,76 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-08-11 11:57 | |||||
* 描 述:基础信息采集 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
//年度 | |||||
$('#YearNo').lrselect({ | |||||
placeholder: "请选择年度", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#MouthNo').lrDataItemSelect({ code: 'MPMonth' }); | |||||
$('#DeptId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name', maxHeight: 200 }); | |||||
//$('#MPDepartment').lrselect({ | |||||
// type: 'tree', | |||||
// // 展开最大高度 | |||||
// maxHeight: 200, | |||||
// // 是否允许搜索 | |||||
// allowSearch: true, | |||||
// // 访问数据接口地址 | |||||
// url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||||
// select: function (val) { | |||||
// var departmentIds = val.id; | |||||
// $('#MPReceiveUser').lrselectRefresh({ | |||||
// url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds | |||||
// }) | |||||
// } | |||||
//}); | |||||
$('#Url').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/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]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,45 @@ | |||||
@{ | |||||
ViewBag.Title = "基础信息采集"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<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 id="YearNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">月份</div> | |||||
<div id="MouthNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">材料名称</div> | |||||
<input id="FileName" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.js") |
@@ -0,0 +1,166 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-08-11 11:57 | |||||
* 描 述:基础信息采集 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#YearNo').lrDataItemSelect({ code: '' }); | |||||
$('#MouthNo').lrDataItemSelect({ code: 'MPMonth' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
$('.fileurl').on('click', function () { | |||||
console.log("下载!!!"); | |||||
var id = $(this).id; | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: id, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/GetPageList', | |||||
headData: [ | |||||
{ | |||||
label: "年度", name: "YearNo", width: 100, align: "left" | |||||
//formatterAsync: function (callback, value, row, op,$cell) { | |||||
// learun.clientdata.getAsync('dataItem', { | |||||
// key: value, | |||||
// code: '', | |||||
// callback: function (_data) { | |||||
// callback(_data.text); | |||||
// } | |||||
// }); | |||||
//} | |||||
}, | |||||
{ | |||||
label: "月份", name: "MouthNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'MPMonth', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "接收部门", name: "DeptId", 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: "FileName", width: 100, align: "left" }, | |||||
//{ | |||||
// label: "附件", name: "Url", width: 200, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// $.ajax({ | |||||
// url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
// data: { folderId: value }, | |||||
// type: 'GET', | |||||
// dataType: "json", | |||||
// async: false, | |||||
// cache: false, | |||||
// success: function (res) { | |||||
// var bb = ''; | |||||
// //console.log(res); | |||||
// $.each(res.data, function (i, item) { | |||||
// bb += '<span onclick="downLoad(\'' + | |||||
// item.F_Id + | |||||
// '\',)" style="color:blue">' + | |||||
// item.F_FileName + | |||||
// '</span>, '; | |||||
// }) | |||||
// callback(bb); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
{ label: "说明", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = 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 () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} | |||||
@@ -38,6 +38,11 @@ var bootstrap = function ($, learun) { | |||||
// text: 'text' | // text: 'text' | ||||
//}); | //}); | ||||
$('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); | $('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); | ||||
var jsdate = new Date(); | |||||
$('#MPAcademicYearNo').lrselectSet(jsdate.getFullYear()); | |||||
$('#MPMonth').lrselectSet(jsdate.getMonth() + 1); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -120,12 +125,34 @@ var bootstrap = function ($, learun) { | |||||
{ | { | ||||
label: "部门", name: "MPDepartment", width: 250, align: "left", | label: "部门", name: "MPDepartment", width: 250, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/Department/GetDepartmentList?listId=' + value, function (res) { | |||||
console.log(res); | |||||
if (res.code == learun.httpCode.success) { | |||||
callback(res.data); | |||||
if (value && value.indexOf(',') != -1) { | |||||
var content = ''; | |||||
var deptarr = value.split(','); | |||||
for (var i = 0; i < deptarr.length; i++) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: deptarr[i], | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
content += _data['name']; | |||||
} | |||||
}); | |||||
} | } | ||||
}); | |||||
content = content.substring(0, content.length - 1); | |||||
callback(content); | |||||
} else { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -201,14 +228,14 @@ var bootstrap = function ($, learun) { | |||||
if (isUser) { | if (isUser) { | ||||
param.isUser = 'true'; | param.isUser = 'true'; | ||||
} | } | ||||
if (!param.MPAcademicYearNo) { | |||||
var jsdate = new Date(); | |||||
var jsdate = new Date(); | |||||
if (!param.MPAcademicYearNo && param.MPAcademicYearNo == undefined) { | |||||
param.MPAcademicYearNo = jsdate.getFullYear(); | param.MPAcademicYearNo = jsdate.getFullYear(); | ||||
} | } | ||||
if (!param.MPMonth) { | |||||
var jsdate = new Date(); | |||||
if (!param.MPMonth && param.MPMonth == undefined) { | |||||
param.MPMonth = jsdate.getMonth() + 1; | param.MPMonth = jsdate.getMonth() + 1; | ||||
} | } | ||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
}, | }, | ||||
downLoad: function (fileId) { | downLoad: function (fileId) { | ||||
@@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { | |||||
page.initGird(); | page.initGird(); | ||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
@@ -29,6 +28,8 @@ var bootstrap = function ($, learun) { | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
var jsdate = new Date(); | |||||
$('#MPAcademicYearNo').lrselectSet(jsdate.getFullYear()); | |||||
//学期 | //学期 | ||||
//$('#MPSemester').lrselect({ | //$('#MPSemester').lrselect({ | ||||
// placeholder: "请选择学期", | // placeholder: "请选择学期", | ||||
@@ -38,6 +39,7 @@ var bootstrap = function ($, learun) { | |||||
// text: 'text' | // text: 'text' | ||||
//}); | //}); | ||||
$('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); | $('#MPMonth').lrDataItemSelect({ code: 'MPMonth' }); | ||||
//$('#MPMonth').lrselectSet(jsdate.getMonth() + 1); | |||||
$('#MPDepartment').lrselect({ | $('#MPDepartment').lrselect({ | ||||
type: 'tree', | type: 'tree', | ||||
@@ -209,11 +211,39 @@ var bootstrap = function ($, learun) { | |||||
{ | { | ||||
label: "部门", name: "MPDepartment", width: 250, align: "left", | label: "部门", name: "MPDepartment", width: 250, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/Department/GetDepartmentList?listId=' + value, function (res) { | |||||
if (res.code == learun.httpCode.success) { | |||||
callback(res.data); | |||||
if (value && value.indexOf(',') != -1) { | |||||
var content = ''; | |||||
var deptarr = value.split(','); | |||||
for (var i = 0; i < deptarr.length; i++) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: deptarr[i], | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
content += _data['name']; | |||||
} | |||||
}); | |||||
} | } | ||||
}); | |||||
content = content.substring(0, content.length - 1); | |||||
callback(content); | |||||
} else { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
//learun.httpAsyncGet(top.$.rootUrl + '/LR_OrganizationModule/Department/GetDepartmentList?listId=' + value, function (res) { | |||||
// if (res.code == learun.httpCode.success) { | |||||
// callback(res.data); | |||||
// } | |||||
//}); | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -253,26 +283,28 @@ var bootstrap = function ($, learun) { | |||||
width: 200, | width: 200, | ||||
align: "left", | align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: value }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, function (i, item) { | |||||
if (value) { | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: value }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, function (i, item) { | |||||
bb += '<span onclick="downLoad(\'' + | |||||
item.F_Id + | |||||
'\',)" style="color:blue">' + | |||||
item.F_FileName + | |||||
'</span>, '; | |||||
}) | |||||
callback(bb); | |||||
} | |||||
}); | |||||
bb += '<span onclick="downLoad(\'' + | |||||
item.F_Id + | |||||
'\',)" style="color:blue">' + | |||||
item.F_FileName + | |||||
'</span>, '; | |||||
}) | |||||
callback(bb); | |||||
} | |||||
}); | |||||
} | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -297,17 +329,15 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
if (isUser) { | |||||
param.isUser = 'true'; | |||||
} | |||||
if (!param.MPAcademicYearNo) { | |||||
if (!param.MPAcademicYearNo && param.MPAcademicYearNo == undefined) { | |||||
var jsdate = new Date(); | var jsdate = new Date(); | ||||
param.MPAcademicYearNo = jsdate.getFullYear(); | param.MPAcademicYearNo = jsdate.getFullYear(); | ||||
} | } | ||||
if (!param.MPMonth) { | |||||
var jsdate = new Date(); | |||||
param.MPMonth = jsdate.getMonth() + 1; | |||||
if (isUser) { | |||||
param.isUser = 'true'; | |||||
} | } | ||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
}, | }, | ||||
downLoad: function (fileId) { | downLoad: function (fileId) { | ||||
@@ -321,7 +351,6 @@ var bootstrap = function ($, learun) { | |||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId, fileTwo) { | function downLoad(fileId, fileTwo) { | ||||
if (fileTwo) { | if (fileTwo) { | ||||
@@ -820,6 +820,7 @@ | |||||
<Compile Include="Areas\LR_Desktop\Controllers\FormulaMainController.cs" /> | <Compile Include="Areas\LR_Desktop\Controllers\FormulaMainController.cs" /> | ||||
<Compile Include="Areas\LR_Desktop\Controllers\FormulaChildController.cs" /> | <Compile Include="Areas\LR_Desktop\Controllers\FormulaChildController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\ProjectProcessManageController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\ProjectProcessManageController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\FD_BudgetFileController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6536,6 +6537,10 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\Form.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\Form.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\ProjectProcessManage\Form.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Index.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Index.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Form.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | <Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | ||||
@@ -576,6 +576,7 @@ | |||||
<Compile Include="LogisticsManagement\ProjectManageMap.cs" /> | <Compile Include="LogisticsManagement\ProjectManageMap.cs" /> | ||||
<Compile Include="EducationalAdministration\FillinFromMap.cs" /> | <Compile Include="EducationalAdministration\FillinFromMap.cs" /> | ||||
<Compile Include="LogisticsManagement\ProjectProcessManageMap.cs" /> | <Compile Include="LogisticsManagement\ProjectProcessManageMap.cs" /> | ||||
<Compile Include="PersonnelManagement\FD_BudgetFileMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-08-11 11:57 | |||||
/// 描 述:基础信息采集 | |||||
/// </summary> | |||||
public class FD_BudgetFileMap : EntityTypeConfiguration<FD_BudgetFileEntity> | |||||
{ | |||||
public FD_BudgetFileMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("FD_BUDGETFILE"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -1721,6 +1721,10 @@ | |||||
<Compile Include="LogisticsManagement\ProjectProcessManage\ProjectProcessManageService.cs" /> | <Compile Include="LogisticsManagement\ProjectProcessManage\ProjectProcessManageService.cs" /> | ||||
<Compile Include="LogisticsManagement\ProjectProcessManage\ProjectProcessManageBLL.cs" /> | <Compile Include="LogisticsManagement\ProjectProcessManage\ProjectProcessManageBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\ProjectProcessManage\ProjectProcessManageIBLL.cs" /> | <Compile Include="LogisticsManagement\ProjectProcessManage\ProjectProcessManageIBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileEntity.cs" /> | |||||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileService.cs" /> | |||||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-08-11 11:57 | |||||
/// 描 述:基础信息采集 | |||||
/// </summary> | |||||
public class FD_BudgetFileBLL : FD_BudgetFileIBLL | |||||
{ | |||||
private FD_BudgetFileService fD_BudgetFileService = new FD_BudgetFileService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<FD_BudgetFileEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return fD_BudgetFileService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取FD_BudgetFile表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return fD_BudgetFileService.GetFD_BudgetFileEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
fD_BudgetFileService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, FD_BudgetFileEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
fD_BudgetFileService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,87 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-08-11 11:57 | |||||
/// 描 述:基础信息采集 | |||||
/// </summary> | |||||
public class FD_BudgetFileEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 年份 | |||||
/// </summary> | |||||
[Column("YEARNO")] | |||||
public int? YearNo { get; set; } | |||||
/// <summary> | |||||
/// MouthNo | |||||
/// </summary> | |||||
[Column("MOUTHNO")] | |||||
public int? MouthNo { get; set; } | |||||
/// <summary> | |||||
/// DeptId | |||||
/// </summary> | |||||
[Column("DEPTID")] | |||||
public string DeptId { get; set; } | |||||
/// <summary> | |||||
/// FileName | |||||
/// </summary> | |||||
[Column("FILENAME")] | |||||
public string FileName { get; set; } | |||||
/// <summary> | |||||
/// Url | |||||
/// </summary> | |||||
[Column("URL")] | |||||
public string Url { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// CreateUserId | |||||
/// </summary> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.CreateTime=DateTime.Now; | |||||
this.CreateUserId = LoginUserInfo.Get().userId; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,48 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-08-11 11:57 | |||||
/// 描 述:基础信息采集 | |||||
/// </summary> | |||||
public interface FD_BudgetFileIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<FD_BudgetFileEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取FD_BudgetFile表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, FD_BudgetFileEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,165 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-08-11 11:57 | |||||
/// 描 述:基础信息采集 | |||||
/// </summary> | |||||
public class FD_BudgetFileService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<FD_BudgetFileEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.YearNo, | |||||
t.MouthNo, | |||||
t.DeptId, | |||||
t.FileName, | |||||
t.Url, | |||||
t.Remark | |||||
"); | |||||
strSql.Append(" FROM FD_BudgetFile t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["YearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("YearNo",queryParam["YearNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.YearNo = @YearNo "); | |||||
} | |||||
if (!queryParam["MouthNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("MouthNo",queryParam["MouthNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.MouthNo = @MouthNo "); | |||||
} | |||||
if (!queryParam["FileName"].IsEmpty()) | |||||
{ | |||||
dp.Add("FileName", "%" + queryParam["FileName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.FileName Like @FileName "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<FD_BudgetFileEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取FD_BudgetFile表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<FD_BudgetFileEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<FD_BudgetFileEntity>(t=>t.Id == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, FD_BudgetFileEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |