diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/FD_BudgetFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/FD_BudgetFileController.cs new file mode 100644 index 000000000..5cb66be80 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/FD_BudgetFileController.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-08-11 11:57 + /// 描 述:基础信息采集 + /// + public class FD_BudgetFileController : MvcControllerBase + { + private FD_BudgetFileIBLL fD_BudgetFileIBLL = new FD_BudgetFileBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = fD_BudgetFileIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + fD_BudgetFileIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + FD_BudgetFileEntity entity = strEntity.ToObject(); + fD_BudgetFileIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.cshtml new file mode 100644 index 000000000..0bdb24f5a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "基础信息采集"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
年度
+
+
+
+
月份
+
+
+
+
接收部门
+
+
+
+
材料名称
+ +
+
+
附件上传
+
+
+
+
说明
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.js new file mode 100644 index 000000000..24553d62a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.cshtml new file mode 100644 index 000000000..dabc250aa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.cshtml @@ -0,0 +1,45 @@ +@{ + ViewBag.Title = "基础信息采集"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
年度
+
+
+
+
月份
+
+
+
+
材料名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.js new file mode 100644 index 000000000..586044013 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.js @@ -0,0 +1,173 @@ +/* * 版 本 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').lrselect({ + placeholder: "请选择年度", + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', + value: 'value', + text: 'text' + }); + $('#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').jfGrid({ + 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 += '' + + // item.F_FileName + + // ',   '; + // }) + // 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(); +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_BudgetBasicsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_BudgetBasicsController.cs new file mode 100644 index 000000000..c2615cc9b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_BudgetBasicsController.cs @@ -0,0 +1,159 @@ +using System; +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using Learun.Application.Organization; + +namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 17:42 + /// 描 述:基础信息上报 + /// + public class FD_BudgetBasicsController : MvcControllerBase + { + private FD_BudgetBasicsIBLL fD_BudgetBasicsIBLL = new FD_BudgetBasicsBLL(); + private DepartmentIBLL departmentIBLL = new DepartmentBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + var userInfo = LoginUserInfo.Get(); + ViewBag.Name = userInfo.realName; + var dept = departmentIBLL.GetEntity(userInfo.departmentId); + ViewBag.Dept = dept == null ? "" : dept.F_FullName; + ViewBag.Date = DateTime.Now; + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = fD_BudgetBasicsIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue); + var jsonData = new + { + FD_BudgetBasics = FD_BudgetBasicsData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFormDataByProcessId(processId); + var jsonData = new + { + FD_BudgetBasics = FD_BudgetBasicsData, + }; + return Success(jsonData); + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + var entity = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue); + entity.BIsDelete = true; + entity.BDeleteTime = DateTime.Now; + entity.BDeleteUser = LoginUserInfo.Get().userId; + fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + FD_BudgetBasicsEntity entity = strEntity.ToObject(); + fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + /// + /// 提交资助变更 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + fD_BudgetBasicsIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_IncomeManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_IncomeManageController.cs new file mode 100644 index 000000000..b9c59e579 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_IncomeManageController.cs @@ -0,0 +1,180 @@ +using System; +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Linq; + +namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 10:40 + /// 描 述:收入预算管理 + /// + public class FD_IncomeManageController : MvcControllerBase + { + private FD_IncomeManageIBLL fD_IncomeManageIBLL = new FD_IncomeManageBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form2() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form3() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = fD_IncomeManageIBLL.GetPageList(paginationobj, queryJson); + //FD_IncomeManageEntity entity = new FD_IncomeManageEntity();// data.Sum(x=>x.IAmount) + //entity.IName = "总计:"; + //entity.IActual = data.Sum(x => x.IActual); + //entity.IQuota = data.Sum(x => x.IQuota); + //entity.IAmount = data.Sum(x => x.IAmount); + //entity.IUseAmount = data.Sum(x => x.IUseAmount); + //entity.ISurplusAmount = data.Sum(x => x.ISurplusAmount); + //var list = data.ToList(); + //list.Add(entity); + var jsonData = new + { + rows = data,// list, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue); + var jsonData = new + { + FD_IncomeManage = FD_IncomeManageData, + }; + return Success(jsonData); + } + + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetTree() + { + var data = fD_IncomeManageIBLL.GetTree(); + + return Success(data); + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + var entity = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue); + entity.IIsDelete = true; + entity.IDeleteTime = DateTime.Now; + entity.IDeleteUser = LoginUserInfo.Get().userId; + fD_IncomeManageIBLL.SaveEntity(keyValue, entity); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + FD_IncomeManageEntity entity = strEntity.ToObject(); + if (entity.IAmount <= 0) + return Fail("金额必须大于0!"); + if (string.IsNullOrEmpty(keyValue)) + { + entity.IUseAmount = 0; + entity.ISurplusAmount = entity.IAmount; + } + else + { + var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue); + entity.IUseAmount = FD_IncomeManageData.IUseAmount; + entity.ISurplusAmount = entity.IAmount - FD_IncomeManageData.IUseAmount; + } + + fD_IncomeManageIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_PayManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_PayManageController.cs new file mode 100644 index 000000000..75241d177 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FD_PayManageController.cs @@ -0,0 +1,274 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Linq; +using Learun.Application.WorkFlow; + +namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 14:18 + /// 描 述:支出预算管理 + /// + public class FD_PayManageController : MvcControllerBase + { + private FD_PayManageIBLL fD_PayManageIBLL = new FD_PayManageBLL(); + private FD_IncomeManageIBLL fD_IncomeManageIBLL = new FD_IncomeManageBLL(); + private NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL(); + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 打印 + /// + /// + [HttpGet] + public ActionResult PrintSpecial() + { + return View(); + } + /// + /// 打印 + /// + /// + [HttpGet] + public ActionResult PrintPublic() + { + return View(); + } + + /// + /// 表单(基本承包经费支出) + /// + /// + [HttpGet] + public ActionResult FormPublic() + { + ViewBag.Amount = 0; + ViewBag.Name = ""; + var incomlist = fD_IncomeManageIBLL.GetIncomeList("0", "1"); + if (incomlist.Count() > 0) + { + var model = incomlist.FirstOrDefault(); + ViewBag.Name = model.IName; + ViewBag.Amount = model.ISurplusAmount; + } + return View(); + } + #endregion + + #region 获取数据 + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPTypeTree(string keyValue) + { + var data = fD_PayManageIBLL.GetTree(); + + return Success(data); + } + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = fD_PayManageIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var FD_PayManageData = fD_PayManageIBLL.GetFD_PayManageEntity(keyValue); + var jsonData = new + { + FD_PayManage = FD_PayManageData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPrintData(string keyValue, string processId) + { + var FD_PayManageData = fD_PayManageIBLL.GetFD_PayManageEntity(keyValue); + var TaskLogList = (List)nWFTaskIBLL.GetLogList(processId); + var jsonData = new + { + FD_PayManage = FD_PayManageData, + TaskLogList = TaskLogList + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 流程Id + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var FD_PayManageData = fD_PayManageIBLL.GetFormDataByProcessId(processId); + var jsonData = new + { + FD_PayManage = FD_PayManageData, + }; + return Success(jsonData); + } + + /// + /// 获取收入预算下拉框列表 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetIncomeList(string budgetType, string financeBudgetType) + { + var fD_IncomeManageData = fD_IncomeManageIBLL.GetIncomeList(budgetType, financeBudgetType); + var list = new List(); + foreach (var item in fD_IncomeManageData) + { + list.Add(new + { + text = item.IName + "(剩余金额:" + item.ISurplusAmount + ")", + value = item.IId, + }); + } + return Success(list); + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + fD_PayManageIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + FD_PayManageEntity entity = strEntity.ToObject(); + //判断资金支出来源对应的收入预算是否存在 + var ITopType = ""; + var ISecondType = ""; + if ((entity.PTopSource == "1" || entity.PTopSource == "2") || entity.PType == "2") + { + //学校经费 部门专项经费对应公用经费 + ITopType = "0"; + ISecondType = "1"; + } + else if (entity.PTopSource == "3") + { + //财政专项经费 + ITopType = "0"; + ISecondType = "2"; + } + else if (entity.PTopSource == "4") + { + //培训收入 + ITopType = "2"; + } + + var incomlist = fD_IncomeManageIBLL.GetIncomeList(ITopType, ISecondType); + if (incomlist.Count() <= 0) + return Fail("请先添加对应的收入预算!"); + + if (entity.PTopSource == "3" && string.IsNullOrEmpty(entity.PIncomeId)) + { + //财政专项经费 + return Fail("请选择财政专项名称!"); + } + else + { + entity.PIncomeId = incomlist.Select(x => x.IId).FirstOrDefault(); + } + fD_PayManageIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, string processId) + { + fD_PayManageIBLL.ChangeStatusById(keyValue, 1, processId); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.cshtml new file mode 100644 index 000000000..1d1ba45b3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "基础信息上报"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
姓名
+ +
+
+
部门
+ +
+
+
当前时间
+ +
+
+
附件上传
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.js new file mode 100644 index 000000000..97bbb5a2a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.js @@ -0,0 +1,117 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-27 17:42 + * 描 述:基础信息上报 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#BFile').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/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 + '/ReceiveSendFeeManagement/FD_BudgetBasics/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 == 'FD_BudgetBasics' && data[id]) { + keyValue = data[id].BId; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + //setTimeout(function () { + // ue.setContent(data[id].F_NewsContent); + //}, 100); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + if (!$('body').lrValidform()) { + return false; + } + var postData = {}; + var strEntity = $('body').lrGetFormData(); + if (!!processId) { + strEntity.BProcessId = processId; + } + postData.strEntity = JSON.stringify(strEntity); + + $.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/SaveForm?keyValue=' + keyValue, postData, function (res) { + if (!!processId) { + var res = {}; + res.code = 200; + if (!!callBack) { + callBack(res, i); + } + + } else { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, strEntity, i); + } + } + }); + }; + // 保存数据 + //acceptClick = function (callBack) { + // if (!$('body').lrValidform()) { + // return false; + // } + // var postData = { + // strEntity: JSON.stringify($('body').lrGetFormData()) + // }; + // $.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/SaveForm?keyValue=' + keyValue, postData, function (res) { + // // 保存成功后才回调 + // if (!!callBack) { + // callBack(); + // } + // }); + //}; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.cshtml new file mode 100644 index 000000000..00fc4d9d0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.cshtml @@ -0,0 +1,34 @@ +@{ + ViewBag.Title = "基础信息上报"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.js new file mode 100644 index 000000000..88ed6de4a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.js @@ -0,0 +1,202 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-27 17:42 + * 描 述:基础信息上报 + */ +var refreshGirdData; +var processId = ''; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_eye').on('click', function () { + page.eye(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/Form', + width: 600, + height: 400, + callBack: function (id) { + top[id].save(); + return location.reload(); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('BId'); + var status = $('#gridtable').jfGridValue('BStatus'); + if (status != 0) { + learun.alert.warning("当前项目已提交,不可修改!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + top[id].save(); + return refreshGirdData('', ''); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('BId'); + var status = $('#gridtable').jfGridValue('BStatus'); + if (status != 0) { + learun.alert.warning("当前项目已提交,不可删除!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData('', ''); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('BId'); + if (learun.checkrow(keyValue)) { + var status = $('#gridtable').jfGridValue('BStatus'); + if (status != 0) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/GetPageList', + headData: [ + { label: "姓名", name: "BName", width: 100, align: "left" }, + { + label: '部门', name: 'BDept', width: 100, align: 'left', + formatterAsync: function (callback, value, row) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (item) { + callback(item.name); + } + }); + } + }, + { label: "创建时间", name: "BCreateTime", width: 150, align: "left" }, + { + label: "状态", name: "BStatus", width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == 0) { + return '草稿'; + } else if (cellvalue == 1) { + return '进行中'; + } else if (cellvalue == 2) { + return '已审批'; + } + } + }, + { label: "备注", name: "BRemarks", width: 100, align: "left" } + ], + mainId: 'BId', + isPage: true + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('BProcessId') || ''; + + if (learun.checkrow(processId)) { + learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看【基础信息上报】', F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); + } + } + }; + //refreshGirdData = function () { + // $('#gridtable').jfGridSet('reload'); + //}; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'FD_BudgetBasics',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + + } + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.cshtml new file mode 100644 index 000000000..6893a7d48 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.cshtml @@ -0,0 +1,38 @@ +@{ + ViewBag.Title = "收入预算管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +@*财政预算-人员经费、公用经费*@ +
+ +
+
项目名称*
+ +
+ @*
+
预算类型*
+
+
+
+
预算科目
+
+
*@ +
+
人数
+ +
+
+
定额*
+ +
+
+
金额*
+ +
+ +
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js new file mode 100644 index 000000000..c469aede7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js @@ -0,0 +1,91 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 10:40 + * 描 述:收入预算管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var ITopType = request('ITopType'); +var ISecondType = request('ISecondType'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //$('#ITopType').lrDataItemSelect({ + // code: 'BudgetType', select: function (item) { + // if (item) { + // if (item.id == '0' || item.text == '财政预算') { + // $('#ISecondType').removeAttr("readonly"); + // $('#idIQuota').html('定额*'); + // document.getElementById("divIActual").style.display = "none"; + // } else { + // $('#IPeopleNum').attr('readonly', 'readonly'); + // $('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); + // $('#ISecondType').attr('readonly', 'readonly'); + // $('#idIQuota').html('年度预计收入*'); + // document.getElementById("divIActual").style.display = ""; + // $('#idIAmount').html('金额*'); + // } + // } + // } + //}); + //$('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType', select: function(item) { + // if (item) { + // if (item.text == '人员经费') { + // $('#IPeopleNum').removeAttr("readonly"); + // } else { + // $('#IPeopleNum').val(''); + // $('#IPeopleNum').attr('readonly', 'readonly'); + // } + // if (item.text == '财政专项') { + // $('#idIQuota').html('申报金额*'); + // $('#idIAmount').html('批复金额*'); + // } else { + // $('#spanIQuota').text('定额*'); + // $('#idIAmount').html('金额*'); + // } + // } + + //} }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/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 strEntity = $('body').lrGetFormData(); + strEntity.ITopType = ITopType; + strEntity.ISecondType = ISecondType; + var postData = { + strEntity: JSON.stringify(strEntity) + }; + $.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form2.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form2.cshtml new file mode 100644 index 000000000..b24b6df3b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form2.cshtml @@ -0,0 +1,37 @@ +@{ + ViewBag.Title = "收入预算管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +@*事业收入、培训收入*@ +
+
+
项目名称*
+ +
+ @*
+
预算类型*
+
+
+
+
预算科目
+
+
*@ + +
+
年度实际收入
+ +
+
+
年度预计收入
+ +
+
+
金额*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form3.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form3.cshtml new file mode 100644 index 000000000..d2699719d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form3.cshtml @@ -0,0 +1,38 @@ +@{ + ViewBag.Title = "收入预算管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +@*财政预算-财政专项*@ +
+
+
项目编号*
+ +
+
+
项目名称*
+ +
+ @*
+
预算类型*
+
+
+
+
预算科目
+
+
*@ + +
+
申报金额*
+ +
+
+
批复金额*
+ +
+ +
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.cshtml new file mode 100644 index 000000000..d277e508e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "收入预算管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
类型
+
+
+
+
+
+
+
+
+
+
+
+
项目编号
+ +
+
+
项目名称
+ +
+
+
预算类型
+
+
+
+
预算科目
+
+
+
+
定额
+ +
+
+
金额
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js new file mode 100644 index 000000000..ca7f911e2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js @@ -0,0 +1,277 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 10:40 + * 描 述:收入预算管理 + */ +var refreshGirdData; +var ITopType; +var ISecondType; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + //page.initGird(); + page.bind(); + page.initTree(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 300, 400); + $('#ITopType').lrDataItemSelect({ + code: 'BudgetType', select: function (item) { + if (item) { + if (item.id == '0' || item.text == '财政预算') { + $('#ISecondType').removeAttr("readonly"); + } else { + $('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); + $('#ISecondType').attr('readonly', 'readonly'); + } + } else { + $('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); + $('#ISecondType').attr('readonly', 'readonly'); + } + } + }); + $('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + if (!ITopType) { + learun.alert.warning('请选择类型!'); + return; + } + if (ITopType == '0' && !ISecondType) { + learun.alert.warning('请选择二级类型!'); + return; + } + var url = ''; + if (ITopType == '1' || ITopType == '2') { + //事业收入、培训收入 + url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form2'; + } else if (ITopType == '0' && ISecondType == '2') { + //财政预算 + url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form3'; + } else { + url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form'; + } + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + url + '?ITopType=' + ITopType + '&ISecondType=' + ISecondType, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('IId'); + if (learun.checkrow(keyValue)) { + var url = ''; + if (ITopType == '1' || ITopType == '2') { + //事业收入、培训收入 + url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form2'; + } else if (ITopType == '0' && ISecondType == '2') { + //财政预算 + url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form3'; + } else { + url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form'; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + url + '?keyValue=' + keyValue + '&ITopType=' + ITopType + '&ISecondType=' + ISecondType, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('IId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + initTree: function () { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetTree', + nodeClick: function (item) { + if (item.parent) { + ISecondType = item.value; + ITopType = item.parent.value; + } else { + ITopType = item.value; + ISecondType = ''; + } + page.initGird(); + page.search({ ITopType: ITopType, ISecondType: ISecondType }); + } + }); + }, + // 初始化列表 + initGird: function () { + $("#gridtable").empty(); + $("#gridtable")[0].dfop = undefined; + if (ITopType == '1' || ITopType == '2') { + //事业收入、培训收入 + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', + headData: [ + { label: "项目名称", name: "IName", width: 100, align: "left" }, + { + label: "预算类型", name: "ITopType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'BudgetType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + //{ label: "项目编号", name: "IEnCode", width: 100, align: "left" }, + { label: "年度实际收入", name: "IActual", width: 100, align: "left", statistics: true }, + { label: "年度预计收入", name: "IQuota", width: 150, align: "left", statistics: true }, + { label: "金额", name: "IAmount", width: 150, align: "left", statistics: true }, + { label: "使用金额", name: "IUseAmount", width: 150, align: "left", statistics: true }, + { label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left", statistics: true }, + { label: "备注", name: "IRemarks", width: 100, align: "left" }, + ], + mainId: 'IId', + isPage: true + }); + + } else if (ITopType == '0' && ISecondType == '2') { + //财政预算-财政专项 + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', + headData: [ + { label: "项目名称", name: "IName", width: 100, align: "left" }, + { label: "项目编号", name: "IEnCode", width: 100, align: "left" }, + { + label: "预算类型", + name: "ITopType", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'BudgetType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "预算科目", + name: "ISecondType", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'financeBudgetType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "申报金额", name: "IQuota", width: 150, align: "left", statistics: true }, + { label: "批复金额", name: "IAmount", width: 150, align: "left", statistics: true }, + { label: "使用金额", name: "IUseAmount", width: 150, align: "left", statistics: true }, + { label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left", statistics: true }, + { label: "备注", name: "IRemarks", width: 100, align: "left" } + ], + mainId: 'IId', + isPage: true + }); + } + else { + //财政预算-人员经费、公用经费 + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', + headData: [ + { label: "项目名称", name: "IName", width: 100, align: "left" }, + { + label: "预算类型", + name: "ITopType", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'BudgetType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "预算科目", + name: "ISecondType", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'financeBudgetType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + //{ label: "项目编号", name: "IEnCode", width: 100, align: "left" }, + { label: "人数", name: "IPeopleNum", width: 100, align: "left" }, + { label: "定额", name: "IQuota", width: 150, align: "left", statistics: true }, + { label: "金额", name: "IAmount", width: 150, align: "left", statistics: true}, + { label: "使用金额", name: "IUseAmount", width: 150, align: "left", statistics: true }, + { label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left", statistics: true}, + { label: "备注", name: "IRemarks", width: 100, align: "left" }, + ], + mainId: 'IId', + isPage: true + }); + } + //page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js new file mode 100644 index 000000000..d09f484bc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js @@ -0,0 +1,29 @@ + +function smalltoBIG(n) { + var fraction = ['角', '分']; + var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; + var unit = [ + ['元', '万', '亿'], + ['', '拾', '佰', '仟'] + ]; + var head = n < 0 ? '欠' : ''; + n = Math.abs(n); + + var s = ''; + + for (var i = 0; i < fraction.length; i++) { + s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); + } + s = s || '整'; + n = Math.floor(n); + + for (var i = 0; i < unit[0].length && n > 0; i++) { + var p = ''; + for (var j = 0; j < unit[1].length && n > 0; j++) { + p = digit[n % 10] + unit[1][j] + p; + n = Math.floor(n / 10); + } + s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; + } + return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.cshtml new file mode 100644 index 000000000..bd9ae600f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.cshtml @@ -0,0 +1,68 @@ +@{ + ViewBag.Title = "支出预算管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+ +
+
付款方式*
+
+
+
+
收款单位
+ +
+
+
开户银行
+ +
+
+
银行账号
+ +
+
+
收款人
+ +
+
+
开卡银行
+ +
+
+
卡号
+ +
+
+
开卡银行
+ +
+
+
卡号
+ +
+
+
资金支出用途
+ +
+
+
资金支出来源
+
+
+
+
财政专项名称
+
+
+
+
支出金额*
+ +
+
+
附件上传
+
+
+ +
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.js new file mode 100644 index 000000000..eec46ba49 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.js @@ -0,0 +1,177 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 14:18 + * 描 述:支出预算管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +//报销类型 +var ptype = request('ptype'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#PFile').lrUploader(); + + $('#PType').lrDataItemSelect({ + code: 'payReimburseType', select: function (item) { + if (item) { + if (item.id == '1') { + //基本承包经费外支出 + $('#PTopSource').removeAttr("readonly"); + $('#PIncomeId').removeAttr("readonly"); + } else { + //基本承包经费支出不需要选择资金支出来源 + //$('#PTopSource').html(''); + //$('#PIncomeId').html(''); + $('#PTopSource').attr('readonly', 'readonly'); + $('#PIncomeId').attr('readonly', 'readonly'); + } + } + } + }); + $('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); + $('#PTopSource').lrDataItemSelect({ + code: 'fdPaySource', select: function (item) { + var budgetType = ''; + var financeBudgetType = ''; + if (item) { + if (item.id == '1' || item.id == '2') { + //学校经费 部门专项经费,都走公用经费 + budgetType = '0'; + financeBudgetType = '1'; + } else if (item.id == '3') { + //财政专项经费 + budgetType = '0'; + financeBudgetType = '2'; + } else if (item.id == '4') { + //培训收入 + budgetType = '2'; + } + + } + + //财政专项名称 + $('#PIncomeId').lrselectRefresh({ + placeholder: "请选择财政专项名称", + allowSearch: true, + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType, + value: 'value', + text: 'text' + }); + //if (item) { + // if (item.id == '3') { + // $('#PIncomeId').removeAttr("readonly"); + // } else { + // $('#PIncomeId').attr('readonly', 'readonly'); + // } + //} + } + }); + + //财政专项名称 + $('#PIncomeId').lrselect({ + placeholder: "请选择财政专项名称", + allowSearch: true, + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=', + value: 'value', + text: 'text' + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/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 + '/ReceiveSendFeeManagement/FD_PayManage/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 == 'FD_PayManage' && data[id]) { + keyValue = data[id].PId; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + if (!!processId) { + var res = {}; + res.code = 200; + if (!!callBack) { + callBack(res, i); + } + + } else { + if (!$('body').lrValidform()) { + return false; + } + var postData = {}; + var strEntity = $('body').lrGetFormData(); + if (!!processId) { + strEntity.PProcessId = processId; + } + strEntity.PType = ptype; + postData.strEntity = JSON.stringify(strEntity); + + $.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/SaveForm?keyValue=' + keyValue, postData, function (res) { + + if (!!processId) { + var res = {}; + res.code = 200; + if (!!callBack) { + callBack(res, i); + } + + } else { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, strEntity, i); + } + } + }); + } + }; + + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.cshtml new file mode 100644 index 000000000..7c34a04d0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "基本承包经费支出"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+ +
+
付款方式*
+
+
+
+
收款单位
+ +
+
+
开户银行
+ +
+
+
银行账号
+ +
+
+
收款人
+ +
+
+
开卡银行
+ +
+
+
卡号
+ +
+
+
开卡银行
+ +
+
+
卡号
+ +
+
+
资金支出用途
+ +
+
+
报销金额*
+ +
+
+
+ @ViewBag.Name 剩余金额:@ViewBag.Amount +
+
+
附件上传
+
+
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.js new file mode 100644 index 000000000..02e8e65c7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.js @@ -0,0 +1,166 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 14:18 + * 描 述:支出预算管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +//报销类型 +var ptype = request('ptype'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#PFile').lrUploader(); + $('#PType').lrDataItemSelect({ + code: 'payReimburseType', select: function (item) { + if (item) { + if (item.id == '1') { + //基本承包经费外支出 + $('#PTopSource').removeAttr("readonly"); + $('#PIncomeId').removeAttr("readonly"); + } else { + //基本承包经费支出不需要选择资金支出来源 + //$('#PTopSource').html(''); + //$('#PIncomeId').html(''); + $('#PTopSource').attr('readonly', 'readonly'); + $('#PIncomeId').attr('readonly', 'readonly'); + } + } + } + }); + $('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); + $('#PTopSource').lrDataItemSelect({ + code: 'fdPaySource', select: function (item) { + var budgetType = ''; + var financeBudgetType = ''; + if (item) { + if (item.id == '1' || item.id == '2') { + //学校经费 部门专项经费,都走公用经费 + budgetType = '0'; + financeBudgetType = '1'; + } else if (item.id == '3') { + //财政专项经费 + budgetType = '0'; + financeBudgetType = '2'; + } else if (item.id == '4') { + //培训收入 + budgetType = '2'; + } + + } + + //财政专项名称 + $('#PIncomeId').lrselectRefresh({ + placeholder: "请选择财政专项名称", + allowSearch: true, + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType, + value: 'value', + text: 'text' + }); + //if (item) { + // if (item.id == '3') { + // $('#PIncomeId').removeAttr("readonly"); + // } else { + // $('#PIncomeId').attr('readonly', 'readonly'); + // } + //} + } + }); + + //财政专项名称 + $('#PIncomeId').lrselect({ + placeholder: "请选择财政专项名称", + allowSearch: true, + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=', + value: 'value', + text: 'text' + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/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 + '/ReceiveSendFeeManagement/FD_PayManage/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 == 'FD_PayManage' && data[id]) { + keyValue = data[id].PId; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + if (!$('body').lrValidform()) { + return false; + } + var postData = {}; + var strEntity = $('body').lrGetFormData(); + if (!!processId) { + strEntity.PProcessId = processId; + } + strEntity.PType = ptype; + postData.strEntity = JSON.stringify(strEntity); + + $.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/SaveForm?keyValue=' + keyValue, postData, function (res) { + if (!!processId) { + var res = {}; + res.code = 200; + if (!!callBack) { + callBack(res, i); + } + + } else { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, strEntity, i); + } + } + }); + }; + + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.cshtml new file mode 100644 index 000000000..81eb85d91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.cshtml @@ -0,0 +1,71 @@ +@{ + ViewBag.Title = "支出预算管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
类型
+
+
+
+
+
+
+
+
+
+
+
+
报销类型
+
+
+
+
付款方式
+
+
+
+
收款单位
+ +
+
+
收款人
+ +
+
+
资金支出用途
+ +
+
+
资金支出来源
+
+
+
+
支出金额
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js new file mode 100644 index 000000000..dae2a4e39 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js @@ -0,0 +1,305 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 14:18 + * 描 述:支出预算管理 + */ +var refreshGirdData; +var processId = ''; +var ptype = ''; +var url = ''; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + page.initTree(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#PType').lrDataItemSelect({ code: 'payReimburseType' }); + $('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); + $('#PTopSource').lrDataItemSelect({ code: 'fdPaySource' }); + // 刷新 + $('#lr_refresh').on('click', function () { + refreshGirdData(); + }); + // 查看 + $('#lr_eye').on('click', function () { + page.eye(); + }); + // 新增 + $('#lr_add').on('click', function () { + if (!ptype) { + learun.alert.warning("请选择类型!"); + return; + } + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + url + '?ptype=' + ptype, + width: 800, + height: 600, + callBack: function (id) { + return top[id].save('', refreshGirdData()); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PId'); + var status = $('#gridtable').jfGridValue('PStatus'); + if (status != 0) { + learun.alert.warning("当前项目已提交,不可编辑!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + url + '?keyValue=' + keyValue + '&ptype=' + ptype, + width: 800, + height: 600, + callBack: function (id) { + return top[id].save('', refreshGirdData()); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PId'); + var status = $('#gridtable').jfGridValue('PStatus'); + if (status != 0) { + learun.alert.warning("当前项目已提交,不可删除!"); + return; + } + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + //$('#gridtable').jqprintTable(); + var keyValue = $('#gridtable').jfGridValue('PId'); + var processId = $('#gridtable').jfGridValue('PProcessId'); + var status = $('#gridtable').jfGridValue('PStatus'); + if (status == '0') { + learun.alert.warning("请先提交当前项目!"); + return; + } + if (learun.checkrow(keyValue)) { + var type = $('#gridtable').jfGridValue('PType'); + //PType 1:基本承包经费外支出--专用经费报销流程; 2:基本承包经费支出--公用经费报销流程 + if (type == '1') { + //基本承包经费外支出 + learun.frameTab.open({ F_ModuleId: keyValue, F_Icon: 'fa magic', F_FullName: '打印【基本承包经费外支出】', F_UrlAddress: '/ReceiveSendFeeManagement/FD_PayManage/PrintSpecial?keyValue=' + keyValue + "&processId=" + processId }); + } + else { + learun.frameTab.open({ F_ModuleId: keyValue, F_Icon: 'fa magic', F_FullName: '打印【基本承包经费支出】', F_UrlAddress: '/ReceiveSendFeeManagement/FD_PayManage/PrintPublic?keyValue=' + keyValue + "&processId=" + processId }); + } + } + }); + //  提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('PId'); + if (learun.checkrow(keyValue)) { + var status = $('#gridtable').jfGridValue('PStatus'); + if (status != 0) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + var PType = $('#gridtable').jfGridValue('PType'); + + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + refreshGirdData(res, {}, PType); + }); + } + }); + } + }); + }, + initTree: function () { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPTypeTree', + nodeClick: function (item) { + ptype = item.value; + url = '/ReceiveSendFeeManagement/FD_PayManage/Form'; + if (ptype == '2') { + //基本承包经费外支出 + url = '/ReceiveSendFeeManagement/FD_PayManage/FormPublic'; + } + page.search({ PType: ptype }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPageList', + headData: [ + { + label: "报销类型", + name: "PType", + width: 160, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'payReimburseType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "报销部门", + name: "PDept", + 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: 'PTime', width: 200, align: "left" }, + { + label: "付款方式", + name: "PPayType", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'fdPayType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "发起人", name: "PUserName", width: 100, align: "left" }, + { label: "收款单位", name: "PPayee", width: 100, align: "left" }, + { label: "开户银行", name: "PPayeeBank", width: 100, align: "left" }, + { label: "银行账号", name: "PPayeeBankAccount", width: 100, align: "left" }, + { label: "收款人", name: "PCollectionUser", width: 100, align: "left" }, + { label: "开卡银行", name: "PCollectionBank1", width: 100, align: "left" }, + { label: "卡号", name: "PCollectionBankAccount1", width: 100, align: "left" }, + { label: "开卡银行", name: "PCollectionBank2", width: 100, align: "left" }, + { label: "卡号", name: "PCollectionBankAccount2", width: 100, align: "left" }, + { label: "资金支出用途", name: "PPurpose", width: 100, align: "left" }, + { + label: "资金支出来源", + name: "PTopSource", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', + { + key: value, + code: 'fdPaySource', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "财政专项名称", + name: "PIncomeId", + width: 100, + align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList', + key: value, + keyId: 'iid', + callback: function (_data) { + callback(_data['iname']); + } + }); + } + }, + { label: "支出金额", name: "PAmount", width: 100, align: "left" }, + { + label: "状态", name: "PStatus", width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '草稿'; + } else if (cellvalue == '1') { + return '进行中'; + } else if (cellvalue == '2') { + return '已审批'; + } + } + } + ], + mainId: 'PId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('PProcessId') || ''; + + if (learun.checkrow(processId)) { + learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看【支出预算】', F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); + } + } + }; + //refreshGirdData = function () { + // $('#gridtable').jfGridSet('reload'); + //}; + refreshGirdData = function (res, postData, PType) { + if (res && res.code && res.code == 200) { + // 发起流程 + var schemeCode = ''; + //PType 1:基本承包经费外支出--专用经费报销流程; 2:基本承包经费支出--公用经费报销流程 + if (PType == '1') + schemeCode = 'specialUseFunds'; + else + schemeCode = 'publicFunds'; + + if (schemeCode) { + var postData = { + schemeCode: schemeCode,// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + + } + page.search(); + }; + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.cshtml new file mode 100644 index 000000000..b02cfd654 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.cshtml @@ -0,0 +1,59 @@ +@{ + ViewBag.Title = "基本承包经费支出打印"; + Layout = "~/Views/Shared/_SimpleForm.cshtml"; +} + + + +
+
北京金隅科技学校资金支出报销单
+

(基本承包经费支出)

+ + + +
+ + +
+
打印
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.js", "/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.js new file mode 100644 index 000000000..7bb2b9aeb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.js @@ -0,0 +1,246 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 14:18 + * 描 述:支出预算管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var processId = request('processId'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var tableData; +var processInfo; +var html = ''; +var processhtml = ''; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + + }, + bind: function () { + + // 打印 + $('#lr_print').on('click', function () { + $('#content').jqprint(); + + }); + + }, + initData: function () { + $('#t1').html(''); + page.getTableData(keyValue, function (data) { + if (data && data.FD_PayManage) { + tableData = data.FD_PayManage; + //部门 + var deptName = ''; + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: tableData.PDept, + keyId: 'id', + callback: function (_data) { + deptName = _data['name']; + } + }); + //付款方式 + var PPayType = ''; + learun.clientdata.getAsync('dataItem', + { + key: tableData.PPayType, + code: 'fdPayType', + callback: function (_data) { + PPayType = _data.text; + } + }); + + //资金支出来源 + var topSource = ''; + learun.clientdata.getAsync('dataItem', + { + key: tableData.PTopSource, + code: 'fdPaySource', + callback: function (_data) { + topSource = _data.text; + } + }); + //财政专项名称 + var pIncome = ''; + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList', + key: tableData.PIncomeId, + keyId: 'iid', + callback: function (_data) { + pIncome = _data['iname']; + } + }); + + html += ''; + html += '报销部门'; + html += '' + deptName + ''; + html += '报销日期'; + html += '' + tableData.PTime + ''; + html += ''; + html += ''; + html += '付款方式'; + html += '' + PPayType + ''; + html += ''; + html += '汇款信息汇 入 收 款 单 位'; + html += '汇款信息汇 入 个 人 账 户'; + html += ''; + html += ''; + html += '单位名称' + tableData.PPayee + ''; + html += '收 款 人' + tableData.PCollectionUser + ''; + html += ''; + html += ''; + html += '开户银行' + tableData.PPayeeBank + ''; + html += '开卡银行'; + html += '' + tableData.PCollectionBank1 + '' + tableData.PCollectionBank2 + ''; + html += ''; + html += ''; + html += '账    号' + tableData.PPayeeBankAccount + ''; + html += '卡    号' + tableData.PCollectionBankAccount1 + '' + tableData.PCollectionBankAccount2 + ''; + html += ''; + + html += ''; + html += '资金支出用途' + tableData.PPurpose + ''; + html += ''; + html += ''; + html += '报销金额'; + html += '大写:' + smalltoBIG(tableData.PAmount) + ''; + html += '小写¥:' + tableData.PAmount + ''; + html += ''; + html += ''; + html += '报销审批'; + if (tableData.PRemarks == null || tableData.PRemarks == 'null') { + tableData.PRemarks = ''; + } + html += '补充说明:' + tableData.PRemarks + ''; + html += '经 办 人:' + tableData.PUserName + ''; + html += ''; + + $('#t1').append(html); + } + if (data && data.TaskLogList) { + processInfo = data.TaskLogList; + //部门领导 + var bmld = ''; + var bmldyj = ''; + var cwcz = ''; + var cwczyj = ''; + processInfo.forEach((item, index) => { + if (item && item.F_NodeId) { + //部门领导 + if (item.F_NodeId == '14c32eaf-9394-4d78-370f-e82e4fc9c73b') { + bmld = item.F_TaskUserName; + if (item.F_Des) { + bmldyj = item.F_Des; + } else { + bmldyj = item.F_OperationName; + } + } + //财务处长审核 + if (item.F_NodeId == '0edd8daa-59ce-60f7-9a99-2f9ed7e62db3') { + cwcz = item.F_TaskUserName; + if (item.F_Des) { + cwczyj = item.F_Des; + } else { + cwczyj = item.F_OperationName; + } + } + } + }); + + + processhtml += ''; + processhtml += '审核意见:' + bmldyj + ''; + processhtml += '部门领导:' + bmld + ''; + processhtml += ''; + + processhtml += ''; + processhtml += '支付意见:' + cwczyj + ''; + processhtml += '财务处长:' + cwcz + ''; + processhtml += ''; + + processhtml += ''; + processhtml += '所附单据:'; + processhtml += '1.申请   份2.发票   张3.真伪查验    张4.入库单   张5.资产验收单   张'; + processhtml += ''; + + processhtml += ''; + processhtml += ''; + processhtml += '6.差旅费保修单    张7.其他    张'; + processhtml += ''; + processhtml += ''; + processhtml += '资金支付'; + processhtml += '出纳:'; + processhtml += '复核:'; + processhtml += ''; + + $('#t1').append(processhtml); + } + }); + + }, + getTableData: function (keyValue, callback) { + learun.httpAsync('GET', top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPrintData', { keyValue: keyValue, processId: processId }, function (data) { + callback && callback(data); + }); + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + + }; + + page.init(); + function smalltoBIG(n) { + var fraction = ['角', '分']; + var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; + var unit = [ + ['元', '万', '亿'], + ['', '拾', '佰', '仟'] + ]; + var head = n < 0 ? '欠' : ''; + n = Math.abs(n); + + var s = ''; + + for (var i = 0; i < fraction.length; i++) { + s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); + } + s = s || '整'; + n = Math.floor(n); + + for (var i = 0; i < unit[0].length && n > 0; i++) { + var p = ''; + for (var j = 0; j < unit[1].length && n > 0; j++) { + p = digit[n % 10] + unit[1][j] + p; + n = Math.floor(n / 10); + } + s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; + } + return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.cshtml new file mode 100644 index 000000000..3b846cd0c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.cshtml @@ -0,0 +1,63 @@ +@{ + ViewBag.Title = "支出预算管理"; + Layout = "~/Views/Shared/_SimpleForm.cshtml"; +} + + +
+
北京金隅科技学校资金支出报销单
+

(基本承包经费外支出)

+ + + +
+ +
+
打印
+@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.js", "/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.js new file mode 100644 index 000000000..3e2c37122 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.js @@ -0,0 +1,290 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-28 14:18 + * 描 述:支出预算管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var processId = request('processId'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var tableData; +var processInfo; +var html = ''; +var processhtml = ''; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + + }, + bind: function () { + $('#PType').lrDataItemSelect({ code: 'payReimburseType' }); + $('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); + $('#PTopSource').lrDataItemSelect({ + code: 'fdPaySource', select: function (item) { + var budgetType = ''; + var financeBudgetType = ''; + if (item) { + if (item.text == '学校经费' || item.text == '部门专项经费') { + budgetType = '0'; + financeBudgetType = '1'; + } else if (item.text == '财政专项经费') { + budgetType = '0'; + financeBudgetType = '2'; + } else { + budgetType = '2'; + } + } + + //财政专项名称 + $('#PIncomeId').lrselectRefresh({ + placeholder: "请选择财政专项名称", + allowSearch: true, + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType, + value: 'value', + text: 'text' + }); + } + }); + + //财政专项名称 + $('#PIncomeId').lrselect({ + placeholder: "请选择财政专项名称", + allowSearch: true, + url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=', + value: 'value', + text: 'text' + }); + + // 打印 + $('#lr_print').on('click', function () { + $('#content').jqprint(); + + }); + + }, + initData: function () { + $('#t1').html(''); + page.getTableData(keyValue, function (data) { + if (data && data.FD_PayManage) { + tableData = data.FD_PayManage; + //部门 + var deptName = ''; + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: tableData.PDept, + keyId: 'id', + callback: function (_data) { + deptName = _data['name']; + } + }); + //付款方式 + var PPayType = ''; + learun.clientdata.getAsync('dataItem', + { + key: tableData.PPayType, + code: 'fdPayType', + callback: function (_data) { + PPayType = _data.text; + } + }); + + //资金支出来源 + var topSource = ''; + learun.clientdata.getAsync('dataItem', + { + key: tableData.PTopSource, + code: 'fdPaySource', + callback: function (_data) { + topSource = _data.text; + } + }); + //财政专项名称 + var pIncome = ''; + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList', + key: tableData.PIncomeId, + keyId: 'iid', + callback: function (_data) { + pIncome = _data['iname']; + } + }); + + html += ''; + html += '报销部门'; + html += '' + deptName + ''; + html += '报销日期'; + html += '' + tableData.PTime + ''; + html += ''; + html += ''; + html += '付款方式'; + html += '' + PPayType + ''; + html += ''; + html += '汇款信息 汇 入 收 款 单 位 '; + html += '汇款信息汇 入 个 人 账 户'; + html += ''; + html += ''; + html += '单位名称' + tableData.PPayee + ''; + html += '收 款 人' + tableData.PCollectionUser + ''; + html += ''; + html += ''; + html += '开户银行' + tableData.PPayeeBank + ''; + html += '开卡银行'; + html += '' + tableData.PCollectionBank1 + '' + tableData.PCollectionBank2 + ''; + html += ''; + html += ''; + html += '账    号' + tableData.PPayeeBankAccount + ''; + html += '卡    号' + tableData.PCollectionBankAccount1 + '' + tableData.PCollectionBankAccount2 + ''; + html += ''; + + html += ''; + html += '资金支出用途' + tableData.PPurpose + ''; + html += ''; + html += ''; + html += '资金支出来源' + topSource + ''; + html += ''; + html += ''; + html += '财政专项名称' + pIncome + ''; + html += ''; + html += ''; + html += '支付金额'; + html += '大写:' + smalltoBIG(tableData.PAmount) + ''; + html += '小写¥:' + tableData.PAmount + ''; + html += ''; + html += ''; + html += '报销审批'; + if (tableData.PRemarks == null || tableData.PRemarks == 'null') { + tableData.PRemarks = ''; + } + html += '补充说明:' + tableData.PRemarks + ''; + html += '经 办 人:' + tableData.PUserName + ''; + html += ''; + + $('#t1').append(html); + } + if (data && data.TaskLogList) { + processInfo = data.TaskLogList; + //部门领导 + var bmld = ''; + var bmldyj = ''; + var zgxz = ''; + var zgxzyj = ''; + var cwcz = ''; + var cwczyj = ''; + var xz = ''; + var xzyj = ''; + processInfo.forEach((item, index) => { + if (item && item.F_NodeId) { + //部门领导 + if (item.F_NodeId == '4dff56c9-2a91-af36-a384-9da4c6ae85df') { + bmld = item.F_TaskUserName; + if (item.F_Des) { + bmldyj = item.F_Des; + } else { + bmldyj = item.F_OperationName; + } + } + //主管校长审核 + if (item.F_NodeId == '1eb9fdfc-279b-f95f-0696-cd6cfabfb21a') { + zgxz = item.F_TaskUserName; + if (item.F_Des) { + zgxzyj = item.F_Des; + } else { + zgxzyj = item.F_OperationName; + } + } + //财务处长审核 + if (item.F_NodeId == '1d0a2118-e461-9600-e3f4-2a6a6dce7a04') { + cwcz = item.F_TaskUserName; + if (item.F_Des) { + cwczyj = item.F_Des; + } else { + cwczyj = item.F_OperationName; + } + } + //校长审核 + if (item.F_NodeId == 'd96de9d6-8a9c-6142-0cbf-1089e39a5189') { + xz = item.F_TaskUserName; + if (item.F_Des) { + xzyj = item.F_Des; + } else { + xzyj = item.F_OperationName; + } + } + } + }); + + processhtml += ''; + processhtml += '审核意见:' + bmldyj + ''; + processhtml += '部门领导:' + bmld + ''; + processhtml += ''; + + processhtml += ''; + processhtml += '审核意见:' + zgxzyj + ''; + processhtml += '主管校长:' + zgxz + ''; + processhtml += ''; + processhtml += ''; + processhtml += ' 支付意见:' + cwczyj + ''; + processhtml += ' 财务处长:' + cwcz + ''; + processhtml += ''; + + processhtml += ''; + processhtml += '校长批示:' + xzyj + ''; + processhtml += '校    长:' + xz + ''; + processhtml += ''; + processhtml += ''; + processhtml += '所附单据:'; + processhtml += '1.申请   份2.合同   张3.发票   张4.证伪查验   张5.入库单     张'; + processhtml += ''; + + processhtml += ''; + processhtml += ''; + processhtml += '6.资产验收单   张7.差旅费保修单   张8.其他   张'; + processhtml += ''; + processhtml += ''; + processhtml += '资金支付'; + processhtml += '出纳:'; + processhtml += '复核:'; + processhtml += ''; + + $('#t1').append(processhtml); + } + }); + + }, + getTableData: function (keyValue, callback) { + learun.httpAsync('GET', top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPrintData', { keyValue: keyValue, processId: processId }, function (data) { + callback && callback(data); + }); + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + + }; + + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index a6d9feb5a..07cda77eb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -484,6 +484,7 @@ + @@ -493,6 +494,9 @@ + + + @@ -1437,6 +1441,8 @@ + + @@ -1471,6 +1477,16 @@ + + + + + + + + + + @@ -7300,6 +7316,19 @@ + + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 07d86039f..dc4144c0e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -208,6 +208,7 @@ + @@ -314,6 +315,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/FD_BudgetFileMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/FD_BudgetFileMap.cs new file mode 100644 index 000000000..500e87d56 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/FD_BudgetFileMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-08-11 11:57 + /// 描 述:基础信息采集 + /// + public class FD_BudgetFileMap : EntityTypeConfiguration + { + public FD_BudgetFileMap() + { + #region 表、主键 + //表 + this.ToTable("FD_BUDGETFILE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_BudgetBasicsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_BudgetBasicsMap.cs new file mode 100644 index 000000000..a5c7b1fcd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_BudgetBasicsMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 17:42 + /// 描 述:基础信息上报 + /// + public class FD_BudgetBasicsMap : EntityTypeConfiguration + { + public FD_BudgetBasicsMap() + { + #region 表、主键 + //表 + this.ToTable("FD_BUDGETBASICS"); + //主键 + this.HasKey(t => t.BId); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_IncomeManageMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_IncomeManageMap.cs new file mode 100644 index 000000000..f02951039 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_IncomeManageMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 10:40 + /// 描 述:收入预算管理 + /// + public class FD_IncomeManageMap : EntityTypeConfiguration + { + public FD_IncomeManageMap() + { + #region 表、主键 + //表 + this.ToTable("FD_INCOMEMANAGE"); + //主键 + this.HasKey(t => t.IId); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_PayManageMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_PayManageMap.cs new file mode 100644 index 000000000..f1e4319bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/ReceiveSendFeeManagement/FD_PayManageMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 14:18 + /// 描 述:支出预算管理 + /// + public class FD_PayManageMap : EntityTypeConfiguration + { + public FD_PayManageMap() + { + #region 表、主键 + //表 + this.ToTable("FD_PAYMANAGE"); + //主键 + this.HasKey(t => t.PId); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 2c3ff147e..a513cab29 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -338,6 +338,10 @@ + + + + @@ -397,6 +401,18 @@ + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileBLL.cs new file mode 100644 index 000000000..7af3fb68e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-08-11 11:57 + /// 描 述:基础信息采集 + /// + public class FD_BudgetFileBLL : FD_BudgetFileIBLL + { + private FD_BudgetFileService fD_BudgetFileService = new FD_BudgetFileService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable 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); + } + } + } + + /// + /// 获取FD_BudgetFile表实体数据 + /// + /// 主键 + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + fD_BudgetFileService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileEntity.cs new file mode 100644 index 000000000..67fa63fa8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileEntity.cs @@ -0,0 +1,87 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-08-11 11:57 + /// 描 述:基础信息采集 + /// + public class FD_BudgetFileEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 年份 + /// + [Column("YEARNO")] + public int? YearNo { get; set; } + /// + /// MouthNo + /// + [Column("MOUTHNO")] + public int? MouthNo { get; set; } + /// + /// DeptId + /// + [Column("DEPTID")] + public string DeptId { get; set; } + /// + /// FileName + /// + [Column("FILENAME")] + public string FileName { get; set; } + /// + /// Url + /// + [Column("URL")] + public string Url { get; set; } + /// + /// Remark + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime=DateTime.Now; + this.CreateUserId = LoginUserInfo.Get().userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileIBLL.cs new file mode 100644 index 000000000..735f560cb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-08-11 11:57 + /// 描 述:基础信息采集 + /// + public interface FD_BudgetFileIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取FD_BudgetFile表实体数据 + /// + /// 主键 + /// + FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, FD_BudgetFileEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileService.cs new file mode 100644 index 000000000..89dc6904c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/FD_BudgetFile/FD_BudgetFileService.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-08-11 11:57 + /// 描 述:基础信息采集 + /// + public class FD_BudgetFileService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FD_BudgetFile表实体数据 + /// + /// 主键 + /// + public FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsBLL.cs new file mode 100644 index 000000000..88aceed40 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsBLL.cs @@ -0,0 +1,165 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 17:42 + /// 描 述:基础信息上报 + /// + public class FD_BudgetBasicsBLL : FD_BudgetBasicsIBLL + { + private FD_BudgetBasicsService fD_BudgetBasicsService = new FD_BudgetBasicsService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return fD_BudgetBasicsService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FD_BudgetBasics表实体数据 + /// + /// 主键 + /// + public FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue) + { + try + { + return fD_BudgetBasicsService.GetFD_BudgetBasicsEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FD_BudgetBasics表实体数据 + /// + /// 主键 + /// + public FD_BudgetBasicsEntity GetFormDataByProcessId(string processId) + { + try + { + return fD_BudgetBasicsService.GetFormDataByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + fD_BudgetBasicsService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity) + { + try + { + fD_BudgetBasicsService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + fD_BudgetBasicsService.ChangeStatusById(keyValue, status, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsEntity.cs new file mode 100644 index 000000000..394f9fc91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsEntity.cs @@ -0,0 +1,101 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 17:42 + /// 描 述:基础信息上报 + /// + public class FD_BudgetBasicsEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("BID")] + public string BId { get; set; } + /// + /// 姓名 + /// + [Column("BNAME")] + public string BName { get; set; } + /// + /// 部门 + /// + [Column("BDEPT")] + public string BDept { get; set; } + /// + /// 当前时间 + /// + [Column("BCREATETIME")] + public DateTime? BCreateTime { get; set; } + /// + /// 附件 + /// + [Column("BFILE")] + public string BFile { get; set; } + /// + /// 备注 + /// + [Column("BREMARKS")] + public string BRemarks { get; set; } + /// + /// 状态 0草稿,1审批中,2已审批,3已拒绝 + /// + [Column("BSTATUS")] + public int? BStatus { get; set; } + /// + /// 流程Id + /// + [Column("BPROCESSID")] + public string BProcessId { get; set; } + /// + /// 是否删除 + /// + [Column("BISDELETE")] + public bool? BIsDelete { get; set; } + /// + /// 删除时间 + /// + [Column("BDELETETIME")] + public DateTime? BDeleteTime { get; set; } + /// + /// 删除用户 + /// + [Column("BDELETEUSER")] + public string BDeleteUser { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.BId = Guid.NewGuid().ToString(); + var userinfo = LoginUserInfo.Get(); + this.BName = userinfo.realName; + this.BDept = userinfo.departmentId; + this.BCreateTime = DateTime.Now; + this.BIsDelete = false; + this.BStatus = 0; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.BId = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsIBLL.cs new file mode 100644 index 000000000..2aa733291 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 17:42 + /// 描 述:基础信息上报 + /// + public interface FD_BudgetBasicsIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取FD_BudgetBasics表实体数据 + /// + /// 主键 + /// + FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue); + /// + /// 获取FD_BudgetBasics表实体数据 + /// + /// + /// + FD_BudgetBasicsEntity GetFormDataByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity); + + void ChangeStatusById(string keyValue, int status, string processId); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsService.cs new file mode 100644 index 000000000..70d432174 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_BudgetBasics/FD_BudgetBasicsService.cs @@ -0,0 +1,195 @@ +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.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 17:42 + /// 描 述:基础信息上报 + /// + public class FD_BudgetBasicsService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.BId, + t.BName, + t.BDept, + t.BCreateTime, + t.BRemarks,t.BStatus,t.BProcessId + "); + strSql.Append(" FROM FD_BudgetBasics t "); + strSql.Append(" WHERE 1=1 and BIsDelete=0 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.BCreateTime >= @startTime AND t.BCreateTime <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FD_BudgetBasics表实体数据 + /// + /// 主键 + /// + public FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FD_BudgetBasics表实体数据 + /// + /// 流程 + /// + public FD_BudgetBasicsEntity GetFormDataByProcessId(string processId) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.BProcessId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.BId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, FD_BudgetBasicsEntity 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); + } + } + } + + + /// + /// 修改审批状态 + /// + /// + /// + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + BaseRepository("CollegeMis").ExecuteBySql("update FD_BudgetBasics set BStatus=" + status + ",BProcessId='" + processId + "' where BId='" + keyValue + "'", null); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageBLL.cs new file mode 100644 index 000000000..5f3b45742 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageBLL.cs @@ -0,0 +1,205 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 10:40 + /// 描 述:收入预算管理 + /// + public class FD_IncomeManageBLL : FD_IncomeManageIBLL + { + private FD_IncomeManageService fD_IncomeManageService = new FD_IncomeManageService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return fD_IncomeManageService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 获取FD_IncomeManage表实体数据 + /// + /// 主键 + /// + public IEnumerable GetIncomeList(string budgetType, string financeBudgetType) + { + try + { + return fD_IncomeManageService.GetIncomeList(budgetType, financeBudgetType); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FD_IncomeManage表实体数据 + /// + /// 主键 + /// + public FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue) + { + try + { + return fD_IncomeManageService.GetFD_IncomeManageEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + /// + /// 获取左侧树形数据 + /// + /// + public List GetTree() + { + try + { + DataTable list = fD_IncomeManageService.GetSqlTree("BudgetType"); + DataTable childlist = fD_IncomeManageService.GetSqlTree("financeBudgetType"); + List treeList = new List(); + + foreach (DataRow item in list.Rows) + { + TreeModel node = new TreeModel + { + id = item["f_itemdetailid"].ToString(), + text = item["f_itemname"].ToString(), + value = item["f_itemvalue"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "" + }; + treeList.Add(node); + } + foreach (DataRow item in childlist.Rows) + { + TreeModel node = new TreeModel + { + id = item["f_itemdetailid"].ToString(), + text = item["f_itemname"].ToString(), + value = item["f_itemvalue"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "6f52162a-1886-457a-a080-6f8d1156c5df" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + fD_IncomeManageService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, FD_IncomeManageEntity entity) + { + try + { + fD_IncomeManageService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageEntity.cs new file mode 100644 index 000000000..34d84a47e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageEntity.cs @@ -0,0 +1,136 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 10:40 + /// 描 述:收入预算管理 + /// + public class FD_IncomeManageEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("IID")] + public string IId { get; set; } + /// + /// 一级分类 + /// + [Column("ITOPTYPE")] + public string ITopType { get; set; } + /// + /// 二级分类 + /// + [Column("ISECONDTYPE")] + public string ISecondType { get; set; } + /// + /// 项目名称 + /// + [Column("INAME")] + public string IName { get; set; } + /// + /// 项目编号 + /// + [Column("IENCODE")] + public string IEnCode { get; set; } + /// + /// 人数 + /// + [Column("IPEOPLENUM")] + public int? IPeopleNum { get; set; } + /// + /// 定额/申报金额/年度预计收入 + /// + [Column("IQUOTA")] + public decimal? IQuota { get; set; } + /// + /// 年度实际收入 + /// + [Column("IACTUAL")] + public decimal? IActual { get; set; } + /// + /// 金额/批复金额 + /// + [Column("IAMOUNT")] + public decimal? IAmount { get; set; } + /// + /// 使用金额 + /// + [Column("IUSEAMOUNT")] + public decimal? IUseAmount { get; set; } + /// + /// 剩余金额 + /// + [Column("ISURPLUSAMOUNT")] + public decimal? ISurplusAmount { get; set; } + /// + /// 备注 + /// + [Column("IREMARKS")] + public string IRemarks { get; set; } + + /// + /// 创建时间 + /// + [Column("ICREATETIME")] + public DateTime? ICreateTime { get; set; } + /// + /// 创建用户 + /// + [Column("ICREATEUSERNAME")] + public string ICreateUserName { get; set; } + /// + /// 创建用户 + /// + [Column("ICREATEUSERID")] + public string ICreateUserId { get; set; } + /// + /// 是否删除 + /// + [Column("IISDELETE")] + public bool? IIsDelete { get; set; } + /// + /// 删除时间 + /// + [Column("IDELETETIME")] + public DateTime? IDeleteTime { get; set; } + /// + /// 删除用户 + /// + [Column("IDELETEUSER")] + public string IDeleteUser { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.IId = Guid.NewGuid().ToString(); + this.IIsDelete = false; + this.ICreateTime=DateTime.Now; + var userinfo = LoginUserInfo.Get(); + this.ICreateUserId = userinfo.userId; + this.ICreateUserName = userinfo.realName; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.IId = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageIBLL.cs new file mode 100644 index 000000000..2a4ab7b72 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageIBLL.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 10:40 + /// 描 述:收入预算管理 + /// + public interface FD_IncomeManageIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + + IEnumerable GetIncomeList(string budgetType, string financeBudgetType); + /// + /// 获取FD_IncomeManage表实体数据 + /// + /// 主键 + /// + FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue); + /// + /// 左侧树结构 + /// + /// + List GetTree(); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, FD_IncomeManageEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageService.cs new file mode 100644 index 000000000..e87523d9d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_IncomeManage/FD_IncomeManageService.cs @@ -0,0 +1,237 @@ +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.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 10:40 + /// 描 述:收入预算管理 + /// + public class FD_IncomeManageService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.IId, + t.IEnCode, + t.IName, + t.ITopType, + t.ISecondType, + t.IPeopleNum, + t.IQuota, + t.IAmount, + t.IActual, + t.IRemarks, +isnull(t.IUseAmount,0) as IUseAmount, +isnull(t.ISurplusAmount,0) as ISurplusAmount + "); + strSql.Append(" FROM FD_IncomeManage t "); + strSql.Append(" WHERE 1=1 and IIsDelete<>1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["IEnCode"].IsEmpty()) + { + dp.Add("IEnCode", "%" + queryParam["IEnCode"].ToString() + "%", DbType.String); + strSql.Append(" AND t.IEnCode Like @IEnCode "); + } + if (!queryParam["IName"].IsEmpty()) + { + dp.Add("IName", "%" + queryParam["IName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.IName Like @IName "); + } + if (!queryParam["ITopType"].IsEmpty()) + { + dp.Add("ITopType", queryParam["ITopType"].ToString(), DbType.String); + strSql.Append(" AND t.ITopType = @ITopType "); + } + if (!queryParam["ISecondType"].IsEmpty()) + { + dp.Add("ISecondType", queryParam["ISecondType"].ToString(), DbType.String); + strSql.Append(" AND t.ISecondType = @ISecondType "); + } + if (!queryParam["IQuota"].IsEmpty()) + { + dp.Add("IQuota", "%" + queryParam["IQuota"].ToString() + "%", DbType.String); + strSql.Append(" AND t.IQuota Like @IQuota "); + } + if (!queryParam["IAmount"].IsEmpty()) + { + dp.Add("IAmount", "%" + queryParam["IAmount"].ToString() + "%", DbType.String); + strSql.Append(" AND t.IAmount Like @IAmount "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取FD_IncomeManage列表 + /// + /// + /// + public IEnumerable GetIncomeList(string budgetType, string financeBudgetType) + { + try + { + var sql = "select IId,ITopType,ISurplusAmount,ISecondType,IName,IEnCode from [dbo].[FD_IncomeManage] WHERE IIsDelete=0 "; + if (!string.IsNullOrEmpty(budgetType)) + sql += $" and ITopType='{budgetType}' "; + if (!string.IsNullOrEmpty(financeBudgetType)) + sql += $" and ISecondType='{financeBudgetType}'"; + + return this.BaseRepository("CollegeMIS").FindList(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FD_IncomeManage表实体数据 + /// + /// 主键 + /// + public FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 获取树形数据 + /// + /// + public DataTable GetSqlTree(string ItemCode) + { + try + { + return this.BaseRepository().FindTable($" SELECT * FROM dbo.LR_Base_DataItemDetail WHERE F_ItemId= (SELECT F_ItemId FROM dbo.LR_Base_DataItem WHERE F_ItemCode ='{ItemCode}') "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.IId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, FD_IncomeManageEntity 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageBLL.cs new file mode 100644 index 000000000..7551a326d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageBLL.cs @@ -0,0 +1,231 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 14:18 + /// 描 述:支出预算管理 + /// + public class FD_PayManageBLL : FD_PayManageIBLL + { + private FD_PayManageService fD_PayManageService = new FD_PayManageService(); + + #region 获取数据 + + /// + /// 获取左侧树形数据 + /// + /// + public List GetTree() + { + try + { + DataTable list = fD_PayManageService.GetSqlTree(); + List treeList = new List(); + foreach (DataRow item in list.Rows) + { + TreeModel node = new TreeModel + { + id = item["f_itemvalue"].ToString(), + text = item["f_itemname"].ToString(), + value = item["f_itemvalue"].ToString(), + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return fD_PayManageService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FD_PayManage表实体数据 + /// + /// 主键 + /// + public FD_PayManageEntity GetFD_PayManageEntity(string keyValue) + { + try + { + return fD_PayManageService.GetFD_PayManageEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取FD_PayManage表实体数据 + /// + /// + public FD_PayManageEntity GetFormDataByProcessId(string processId) + { + try + { + return fD_PayManageService.GetFormDataByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + fD_PayManageService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, FD_PayManageEntity entity) + { + try + { + fD_PayManageService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 提交 + /// + /// + /// + /// + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + fD_PayManageService.ChangeStatusById(keyValue, status, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + fD_PayManageService.ChangeStatusByProcessId(processId, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageEntity.cs new file mode 100644 index 000000000..56c3cd68a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageEntity.cs @@ -0,0 +1,188 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 14:18 + /// 描 述:支出预算管理 + /// + public class FD_PayManageEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("PID")] + public string PId { get; set; } + /// + /// 支出报销类型 + /// + [Column("PTYPE")] + public string PType { get; set; } + /// + /// 报销部门 + /// + [Column("PDEPT")] + public string PDept { get; set; } + /// + /// 报销时间 + /// + [Column("PTIME")] + public DateTime? PTime { get; set; } + /// + /// 报销用户 + /// + [Column("PUSERNAME")] + public string PUserName { get; set; } + /// + /// 报销用户 + /// + [Column("PUSERID")] + public string PUserId { get; set; } + /// + /// 付款方式 + /// + [Column("PPAYTYPE")] + public string PPayType { get; set; } + /// + /// 付款类型,收款单位/个人账户 + /// + [Column("PPAYMOLD")] + public int? PPayMold { get; set; } + /// + /// 收款单位名称 + /// + [Column("PPAYEE")] + public string PPayee { get; set; } + /// + /// 收款单位银行 + /// + [Column("PPAYEEBANK")] + public string PPayeeBank { get; set; } + /// + /// 收款单位账户 + /// + [Column("PPAYEEBANKACCOUNT")] + public string PPayeeBankAccount { get; set; } + /// + /// 收款人 + /// + [Column("PCOLLECTIONUSER")] + public string PCollectionUser { get; set; } + /// + /// 收款人银行1 + /// + [Column("PCOLLECTIONBANK1")] + public string PCollectionBank1 { get; set; } + /// + /// 收款人银行账号1 + /// + [Column("PCOLLECTIONBANKACCOUNT1")] + public string PCollectionBankAccount1 { get; set; } + /// + /// 收款人银行2 + /// + [Column("PCOLLECTIONBANK2")] + public string PCollectionBank2 { get; set; } + /// + /// 收款人银行账号2 + /// + [Column("PCOLLECTIONBANKACCOUNT2")] + public string PCollectionBankAccount2 { get; set; } + /// + /// 资金支出用途 + /// + [Column("PPURPOSE")] + public string PPurpose { get; set; } + /// + /// 资金支出来源类型 + /// + [Column("PTOPSOURCE")] + public string PTopSource { get; set; } + /// + /// 资金支出来源类型2 + /// + [Column("PSECONDSOURCE")] + public string PSecondSource { get; set; } + /// + /// 资金支出来源 + /// + [Column("PINCOMEID")] + public string PIncomeId { get; set; } + /// + /// 支出金额 + /// + [Column("PAMOUNT")] + public decimal? PAmount { get; set; } + /// + /// 备注 + /// + [Column("PREMARKS")] + public string PRemarks { get; set; } + /// + /// 附件 + /// + [Column("PFILE")] + public string PFile { get; set; } + /// + /// 状态 0草稿,1审批中,2已通过,3已拒绝 + /// + [Column("PSTATUS")] + public int? PStatus { get; set; } + /// + /// 流程Id + /// + [Column("PPROCESSID")] + public string PProcessId { get; set; } + + /// + /// 是否删除 + /// + [Column("PISDELETE")] + public bool? PIsDelete { get; set; } + /// + /// 删除时间 + /// + [Column("PDELETETIME")] + public DateTime? PDeleteTime { get; set; } + /// + /// 删除用户 + /// + [Column("PDELETEUSER")] + public string PDeleteUser { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.PId = Guid.NewGuid().ToString(); + this.PIsDelete = false; + this.PStatus = 0; + this.PTime = DateTime.Now; + var userinfo = LoginUserInfo.Get(); + this.PDept = userinfo.departmentId; + this.PUserName = userinfo.realName; + this.PUserId = userinfo.userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.PId = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageIBLL.cs new file mode 100644 index 000000000..b7214a035 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageIBLL.cs @@ -0,0 +1,68 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 14:18 + /// 描 述:支出预算管理 + /// + public interface FD_PayManageIBLL + { + #region 获取数据 + /// + /// 获取左侧树结构 + /// + /// + List GetTree(); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取FD_PayManage表实体数据 + /// + /// 主键 + /// + FD_PayManageEntity GetFD_PayManageEntity(string keyValue); + FD_PayManageEntity GetFormDataByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, FD_PayManageEntity entity); + + /// + /// 提交 修改状态 + /// + /// + /// + /// + void ChangeStatusById(string keyValue, int status, string processId); + + /// + /// 流程--审核 + /// + /// + /// + void ChangeStatusByProcessId(string processId, int status); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs new file mode 100644 index 000000000..41ee377a0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FD_PayManage/FD_PayManageService.cs @@ -0,0 +1,308 @@ +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.ReceiveSendFeeManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-28 14:18 + /// 描 述:支出预算管理 + /// + public class FD_PayManageService : RepositoryFactory + { + #region 获取数据 + /// + /// 获取树形数据 + /// + /// + public DataTable GetSqlTree() + { + try + { + return this.BaseRepository().FindTable(" SELECT * FROM dbo.LR_Base_DataItemDetail WHERE F_ItemId= (SELECT F_ItemId FROM dbo.LR_Base_DataItem WHERE F_ItemCode ='payReimburseType') "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.PId, + t.PType, + t.PPayType, + t.PPayee, + t.PPayeeBank, + t.PPayeeBankAccount, + t.PCollectionUser, + t.PCollectionBank1, + t.PCollectionBankAccount1, + t.PCollectionBank2, + t.PCollectionBankAccount2, + t.PPurpose, + t.PTopSource, + t.PIncomeId, + t.PAmount, + t.PStatus, +t.PProcessId, +t.PDept, +t.PTime,t.PUserName + "); + strSql.Append(" FROM FD_PayManage t "); + strSql.Append(" WHERE 1=1 and PIsDelete<>1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["PType"].IsEmpty()) + { + dp.Add("PType", queryParam["PType"].ToString(), DbType.String); + strSql.Append(" AND t.PType = @PType "); + } + if (!queryParam["PPayType"].IsEmpty()) + { + dp.Add("PPayType", queryParam["PPayType"].ToString(), DbType.String); + strSql.Append(" AND t.PPayType = @PPayType "); + } + if (!queryParam["PPayee"].IsEmpty()) + { + dp.Add("PPayee", "%" + queryParam["PPayee"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PPayee Like @PPayee "); + } + if (!queryParam["PCollectionUser"].IsEmpty()) + { + dp.Add("PCollectionUser", "%" + queryParam["PCollectionUser"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PCollectionUser Like @PCollectionUser "); + } + if (!queryParam["PPurpose"].IsEmpty()) + { + dp.Add("PPurpose", "%" + queryParam["PPurpose"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PPurpose Like @PPurpose "); + } + if (!queryParam["PTopSource"].IsEmpty()) + { + dp.Add("PTopSource", queryParam["PTopSource"].ToString(), DbType.String); + strSql.Append(" AND t.PTopSource = @PTopSource "); + } + if (!queryParam["PAmount"].IsEmpty()) + { + dp.Add("PAmount", "%" + queryParam["PAmount"].ToString() + "%", DbType.String); + strSql.Append(" AND t.PAmount Like @PAmount "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取FD_PayManage表实体数据 + /// + /// 主键 + /// + public FD_PayManageEntity GetFD_PayManageEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 获取FD_PayManage表实体数据 + /// + /// + public FD_PayManageEntity GetFormDataByProcessId(string processId) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.PProcessId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.PId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, FD_PayManageEntity 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); + } + } + } + + /// + /// 修改状态 + /// + /// + /// + /// + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + string sql = "update FD_PayManage set PStatus=" + status + ",PProcessId='" + processId + + "' where PId='" + keyValue + "'"; + BaseRepository("CollegeMis").ExecuteBySql(sql); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + + + /// + /// 修改审批状态 + /// + /// + /// + public void ChangeStatusByProcessId(string processId, int status) + { + var db = BaseRepository("CollegeMIS").BeginTrans(); + try + { + var entity = db.FindEntity(x => x.PProcessId == processId); + //审批通过操作 + if (status == 2) + { + var incomeEntity = db.FindEntity(x => x.IId == entity.PIncomeId); + if (incomeEntity != null) + { + //使用金额 + if ((incomeEntity.IUseAmount + entity.PAmount) <= incomeEntity.IAmount) + { + incomeEntity.IUseAmount += entity.PAmount; + incomeEntity.ISurplusAmount = incomeEntity.IAmount - incomeEntity.IUseAmount; + db.Update(incomeEntity); + } + else + { + status = 0; + } + } + else + { + status = 0; + } + } + + entity.PStatus = status; + db.Update(entity); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + throw ExceptionEx.ThrowServiceException(ex); + } + } + #endregion + + } +}