diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsApplyController.cs index 7227168c3..b925643ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsApplyController.cs @@ -39,6 +39,24 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { return View(); } + /// + /// 查看 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexView() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsController.cs index c3c32e258..ca2858daf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsController.cs @@ -5,6 +5,8 @@ using System.Web.Mvc; using Learun.Application.TwoDevelopment.LR_CodeDemo; using System.Collections.Generic; using Learun.Application.Base.SystemModule; +using System; +using System.IO; namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { @@ -29,7 +31,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -38,7 +40,34 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); + } + /// + /// 表单查看页 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// + /// 导入表单页 + /// + /// + [HttpGet] + public ActionResult ImportForm() + { + return View(); + } + /// + /// 主页面【老师】 + /// + /// + [HttpGet] + public ActionResult IndexOfTeacher() + { + return View(); } #endregion @@ -74,8 +103,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var Ass_FixAssetsData = ass_FixAssetsIBLL.GetAss_FixAssetsEntity( keyValue ); - var jsonData = new { + var Ass_FixAssetsData = ass_FixAssetsIBLL.GetAss_FixAssetsEntity(keyValue); + var jsonData = new + { Ass_FixAssets = Ass_FixAssetsData, }; return Success(jsonData); @@ -89,8 +119,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult GetFormDataByProcessId(string processId) { - var Ass_FixAssetsData = ass_FixAssetsIBLL.GetEntityByProcessId( processId ); - var jsonData = new { + var Ass_FixAssetsData = ass_FixAssetsIBLL.GetEntityByProcessId(processId); + var jsonData = new + { Ass_FixAssets = Ass_FixAssetsData, }; return Success(jsonData); @@ -123,12 +154,58 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { Ass_FixAssetsEntity entity = strEntity.ToObject(); - ass_FixAssetsIBLL.SaveEntity(keyValue,entity); + var model = ass_FixAssetsIBLL.GetEntityByCode(entity.FACode); if (string.IsNullOrEmpty(keyValue)) { + if (model != null) + { + return Fail("资产编号已存在!"); + } + } + else + { + if (model != null && model.FAId != keyValue) + { + return Fail("资产编号已存在!"); + } } + ass_FixAssetsIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ChangeStatusById(string keyValue, int status, string processId) + { + ass_FixAssetsIBLL.ChangeStatusById(keyValue, status, processId); + return Success("操作成功!"); + } + + /// + /// 下载文件 + /// + /// + public ActionResult DownTemplate() + { + FileStreamResult result = null; + try + { + var path = Server.MapPath("~/Content/excel/"); + var pathoffull = path + "AssFixAssetsImport.xls"; + FileStream fsread = fsread = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.ReadWrite); + result = File(fsread, "application/ms-excel", "固定资产导入模板.xls"); + + return result; + } + catch (Exception) + { + return null; + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.cshtml index 9a9137d97..a91283313 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.cshtml @@ -38,7 +38,7 @@
财务入账日期*
- +
价值类型*
@@ -98,15 +98,15 @@
累计折旧*
- +
已提折旧月数*
- +
月折旧额*
- +
折旧方法*
@@ -114,7 +114,7 @@
净值*
- +
采购组织形式
@@ -129,8 +129,8 @@
-
存放地点
-
+
存放地点*
+
销售商
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js index 11d4cd5b6..aea782ba9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js @@ -40,6 +40,7 @@ var bootstrap = function ($, learun) { $('.lr-form-wrap').lrscroll(); page.bind(); page.initData(); + page.computed(); }, bind: function () { $('#ATGId').lrselect({ @@ -59,7 +60,7 @@ var bootstrap = function ($, learun) { } } }); - $('#ATId').lrselect({ allowSearch: true}); + $('#ATId').lrselect({ allowSearch: true }); $('#ValueType').lrDataItemSelect({ code: 'ValueType' }); $('#GetWay').lrDataItemSelect({ code: 'GetWay' }); $('#UseCondition').lrDataItemSelect({ code: 'AssState' }); @@ -91,6 +92,92 @@ var bootstrap = function ($, learun) { } }); } + }, + computed: function () { + //财政拨款 + $('#FinancialAppropriation').on('blur', function () { + FinancialAppropriationBlur(); + }); + //非财政拨款 + $('#NonFinancialAppropriation').on('blur', function () { + FinancialAppropriationBlur(); + }); + let FinancialAppropriationBlur = function () { + let fa = $('#FinancialAppropriation').val(); + let nfa = $('#NonFinancialAppropriation').val(); + //计算:价值 + let value = calcValue(fa, nfa); + $('#Value').val(value); + //计算:月折旧额 + let depreciationLife = $('#DepreciationLife').val(); + let monthlyDepreciation = calcMonthlyDepreciation(value, depreciationLife); + $('#MonthlyDepreciation').val(monthlyDepreciation); + //计算:累计折旧 + let haveDepreciationMonths = $('#HaveDepreciationMonths').val(); + let accumulatedDepreciation = calcAccumulatedDepreciation(monthlyDepreciation, haveDepreciationMonths); + $('#AccumulatedDepreciation').val(accumulatedDepreciation); + //计算:净值 + let netValue = calcNetValue(value, accumulatedDepreciation); + $('#NetValue').val(netValue); + netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); + }; + //折旧年限 + $('#DepreciationLife').on('blur', function () { + //计算:月折旧额 + let value = $('#Value').val(); + let depreciationLife = $('#DepreciationLife').val(); + let monthlyDepreciation = calcMonthlyDepreciation(value, depreciationLife); + $('#MonthlyDepreciation').val(monthlyDepreciation); + //计算:累计折旧 + let haveDepreciationMonths = $('#HaveDepreciationMonths').val(); + let accumulatedDepreciation = calcAccumulatedDepreciation(monthlyDepreciation, haveDepreciationMonths); + $('#AccumulatedDepreciation').val(accumulatedDepreciation); + //计算:净值 + let netValue = calcNetValue(value, accumulatedDepreciation); + $('#NetValue').val(netValue); + netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); + }); + //入账时间 + $('#FinanceEntryDate').on('change', function () { + //计算:已提折旧月数 + let financeEntryDate = $(this).val().trim(); + let haveDepreciationMonths = 0; + if (!!financeEntryDate) { + let compareDate = new Date(financeEntryDate); + haveDepreciationMonths = getDistanceMonth(compareDate.getFullYear(), compareDate.getMonth() + 1, compareDate.getDate()) - 1; + if (haveDepreciationMonths < 0) { + haveDepreciationMonths = 0; + } + } + $('#HaveDepreciationMonths').val(haveDepreciationMonths); + //计算:累计折旧 + let monthlyDepreciation = $('#MonthlyDepreciation').val(); + let accumulatedDepreciation = calcAccumulatedDepreciation(monthlyDepreciation, haveDepreciationMonths); + $('#AccumulatedDepreciation').val(accumulatedDepreciation); + //计算:净值 + let value = $('#Value').val(); + let netValue = calcNetValue(value, accumulatedDepreciation); + $('#NetValue').val(netValue); + netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); + }); + + //计算:价值数据=财政拨款 + 非财政拨款 + let calcValue = function (a, b) { + return Number(a) + Number(b); + }; + //计算:月折旧额=价值/折旧年限 + let calcMonthlyDepreciation = function (a, b) { + return Number(b) > 0 ? (Number(a) / Number(b)).toFixed(2) : 0; + } + //计算:累计折旧=月折旧额*已提折旧月数 + let calcAccumulatedDepreciation = function (a, b) { + return (Number(a) * Number(b)).toFixed(2); + } + //计算:净值=价值-累计折旧 + let calcNetValue = function (a, b) { + return (Number(a) - Number(b)) > 0 ? (Number(a) - Number(b)) : 0; + } + } }; // 设置表单数据 @@ -137,3 +224,22 @@ var bootstrap = function ($, learun) { }; page.init(); } + +//某日期-今 的相差月数 +function getDistanceMonth(compareYear, compareMonth, compareDay) { + let date = new Date() + let year = date.getFullYear() + let month = date.getMonth() + 1 + let day = date.getDate() + //console.log(year + "-" + month + "-" + day); + let yearToMonth = (year - compareYear) * 12 + let monthToMonth = month - compareMonth + let dateToMonth = 0 + if (day >= compareDay) { + dateToMonth = 0 + } else { + dateToMonth = -1 + } + return yearToMonth + monthToMonth + dateToMonth; +} +//console.log(getDistanceMonth(2022, 1, 30)); \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.cshtml new file mode 100644 index 000000000..503b8ebdc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.cshtml @@ -0,0 +1,160 @@ +@{ + ViewBag.Title = "固定资产"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
资产编号*
+ +
+
+
资产名称*
+ +
+
+
资产国标大类*
+
+
+
+
资产分类*
+
+
+
+
财务入账日期*
+ +
+
+
价值类型*
+
+
+
+
价值*
+ +
+
+
取得方式*
+
+
+
+
取得日期*
+ +
+
+
使用状况*
+
+
+
+
使用部门*
+
+
+
+
管理部门*
+
+
+
+
使用人*
+
+
+
+
数量*
+ +
+
+
制单人*
+ +
+
+
制单时间*
+ +
+
+
所属单位*
+
+
+
+
卡片状态*
+
+
+
+
折旧年限*
+ +
+
+
累计折旧*
+ +
+
+
已提折旧月数*
+ +
+
+
月折旧额*
+ +
+
+
折旧方法*
+
+
+
+
净值*
+ +
+
+
采购组织形式
+ +
+
+
品牌
+ +
+
+
规格型号
+ +
+
+
存放地点*
+
+
+
+
销售商
+
+
+
+
使用权面积/建筑面积*
+ +
+
+
财政拨款*
+ +
+
+
非财政拨款*
+ +
+
+
会计凭证号*
+ +
+
+
折旧/摊销状态*
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.js new file mode 100644 index 000000000..0fa8a9adc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/FormView.js @@ -0,0 +1,246 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-05 14:37 + * 描 述:固定资产 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + page.computed(); + }, + bind: function () { + $('#ATGId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType', + param: { strWhere: "ATPTId='0' " }, + value: "atid", + text: "aname", + select: function (item) { + if (!!item) { + $('#ATId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType', + param: { strWhere: "ATPTId='" + item.atid + "' " }, + value: "atid", + text: "aname" + }); + } + } + }); + $('#ATId').lrselect({ allowSearch: true }); + $('#ValueType').lrDataItemSelect({ code: 'ValueType' }); + $('#GetWay').lrDataItemSelect({ code: 'GetWay' }); + $('#UseCondition').lrDataItemSelect({ code: 'AssState' }); + $('#UseDepartment').lrDepartmentSelect(); + $('#ManageDepartment').lrDepartmentSelect(); + $('#UsePeople').lrformselect({ + layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', + layerUrlW: 400, + layerUrlH: 300, + dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' + }); + $('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); + $('#DepreciationMothod').lrDataItemSelect({ code: 'DepreciationMothod' }); + $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#SupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); + $('#DepreciationStatus').lrDataItemSelect({ code: 'DepreciationStatus' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/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]); + } + } + }); + } + }, + computed: function () { + //财政拨款 + $('#FinancialAppropriation').on('blur', function () { + FinancialAppropriationBlur(); + }); + //非财政拨款 + $('#NonFinancialAppropriation').on('blur', function () { + FinancialAppropriationBlur(); + }); + let FinancialAppropriationBlur = function () { + let fa = $('#FinancialAppropriation').val(); + let nfa = $('#NonFinancialAppropriation').val(); + //计算:价值 + let value = calcValue(fa, nfa); + $('#Value').val(value); + //计算:月折旧额 + let depreciationLife = $('#DepreciationLife').val(); + let monthlyDepreciation = calcMonthlyDepreciation(value, depreciationLife); + $('#MonthlyDepreciation').val(monthlyDepreciation); + //计算:累计折旧 + let haveDepreciationMonths = $('#HaveDepreciationMonths').val(); + let accumulatedDepreciation = calcAccumulatedDepreciation(monthlyDepreciation, haveDepreciationMonths); + $('#AccumulatedDepreciation').val(accumulatedDepreciation); + //计算:净值 + let netValue = calcNetValue(value, accumulatedDepreciation); + $('#NetValue').val(netValue); + netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); + }; + //折旧年限 + $('#DepreciationLife').on('blur', function () { + //计算:月折旧额 + let value = $('#Value').val(); + let depreciationLife = $('#DepreciationLife').val(); + let monthlyDepreciation = calcMonthlyDepreciation(value, depreciationLife); + $('#MonthlyDepreciation').val(monthlyDepreciation); + //计算:累计折旧 + let haveDepreciationMonths = $('#HaveDepreciationMonths').val(); + let accumulatedDepreciation = calcAccumulatedDepreciation(monthlyDepreciation, haveDepreciationMonths); + $('#AccumulatedDepreciation').val(accumulatedDepreciation); + //计算:净值 + let netValue = calcNetValue(value, accumulatedDepreciation); + $('#NetValue').val(netValue); + netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); + }); + //入账时间 + $('#FinanceEntryDate').on('change', function () { + //计算:已提折旧月数 + let financeEntryDate = $(this).val().trim(); + let haveDepreciationMonths = 0; + if (!!financeEntryDate) { + let compareDate = new Date(financeEntryDate); + haveDepreciationMonths = getDistanceMonth(compareDate.getFullYear(), compareDate.getMonth() + 1, compareDate.getDate()) - 1; + if (haveDepreciationMonths < 0) { + haveDepreciationMonths = 0; + } + } + $('#HaveDepreciationMonths').val(haveDepreciationMonths); + //计算:累计折旧 + let monthlyDepreciation = $('#MonthlyDepreciation').val(); + let accumulatedDepreciation = calcAccumulatedDepreciation(monthlyDepreciation, haveDepreciationMonths); + $('#AccumulatedDepreciation').val(accumulatedDepreciation); + //计算:净值 + let value = $('#Value').val(); + let netValue = calcNetValue(value, accumulatedDepreciation); + $('#NetValue').val(netValue); + netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); + }); + + //计算:价值数据=财政拨款 + 非财政拨款 + let calcValue = function (a, b) { + return Number(a) + Number(b); + }; + //计算:月折旧额=价值/折旧年限 + let calcMonthlyDepreciation = function (a, b) { + return Number(b) > 0 ? (Number(a) / Number(b)).toFixed(2) : 0; + } + //计算:累计折旧=月折旧额*已提折旧月数 + let calcAccumulatedDepreciation = function (a, b) { + return (Number(a) * Number(b)).toFixed(2); + } + //计算:净值=价值-累计折旧 + let calcNetValue = function (a, b) { + return (Number(a) - Number(b)) > 0 ? (Number(a) - Number(b)) : 0; + } + + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + console.log('formview@'+processId); + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/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 == 'Ass_FixAssets' && data[id]) { + keyValue = data[id].FAId; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} + +//某日期-今 的相差月数 +function getDistanceMonth(compareYear, compareMonth, compareDay) { + let date = new Date() + let year = date.getFullYear() + let month = date.getMonth() + 1 + let day = date.getDate() + //console.log(year + "-" + month + "-" + day); + let yearToMonth = (year - compareYear) * 12 + let monthToMonth = month - compareMonth + let dateToMonth = 0 + if (day >= compareDay) { + dateToMonth = 0 + } else { + dateToMonth = -1 + } + return yearToMonth + monthToMonth + dateToMonth; +} +//console.log(getDistanceMonth(2022, 1, 30)); \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.cshtml new file mode 100644 index 000000000..cdf42b7f4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.cshtml @@ -0,0 +1,24 @@ +@{ + ViewBag.Title = "Form"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + + +@Html.AppendCssFile("/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.css") +
+
+
上传文件
+
下载模板
+
+
+
+
+ +
+
+

试试将电脑里的文件拖拽到此上传

+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.css new file mode 100644 index 000000000..04b556b7a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.css @@ -0,0 +1,136 @@ +.lr-form-layout-body { + padding:0 5px 5px 5px; +} +.lr-form-file-queue-wrap { + position:relative; + width:100%; + height:100%; + border:1px solid #ddd; + border-radius:4px; +} +.lr-form-file-queue { + position:relative; +} +.lr-form-file-queue { + position:relative; +} +.lr-form-file-queue-item { + position:relative; + width:100%; + height:50px; + border-bottom:1px solid #ddd; + padding-left:60px; + +} +.lr-file-image { + position:absolute; + top:5px; + left:5px; +} +.lr-file-image img { + width:40px; + height:40px; +} +.lr-file-name{ + line-height:50px; + +} +.lr-msg { + position:absolute; + top:0; + right:5px; + font-size: 25px; + line-height:50px; +} +.lr-msg .fa-check-circle{ + color: #5cb85c; +} +.lr-msg .fa-exclamation-circle { + color: #b94a48; +} +.lr-msg2 { + position:absolute; + top:0; + right:5px; + line-height:50px; +} +.lr-msg2 span { + color:#333; + font-size:14px; + margin-right:5px; +} + +.lr-tool-bar { + position:absolute; + top:0; + right:35px; + font-size: 25px; + line-height:50px; + color:#666; + cursor:pointer; +} +.lr-tool-bar > i { + margin-left:8px; +} + +.lr-tool-bar .fa-minus-circle { + color: #b94a48; +} +.lr-tool-bar .fa-cloud-download { + color: #3498db; +} + +.lr-uploader-progress { + position:absolute; + bottom:2px; + left:60px; + height:4px; + width:500px; + width:calc(100% - 90px); +} +.lr-uploader-progress-bar { + position:relative; + height:100%; + background-color:#039cfd; + border-radius:4px; +} + + +.lr-form-file-queue-bg { + position:absolute; + top:50%; + left:50%; + width:300px; + height:30px; + line-height:30px; + + margin:-15px 0 0 -150px; +} +.lr-form-file-queue-bg h1 { + color: #666; + font-size: 20px; + font-family: Microsoft Yahei; + padding-bottom: 2px; + margin: 0; +} +#lr_down_file_btn { + position:absolute; + right:5px; + background:#fff; + border:1px solid #ddd; + color:#333; +} +#lr_down_file_btn:hover { + color:#337ab7; +} +/*对百度插件的样式重写*/ +.webuploader-container { + position:absolute; +} +.webuploader-pick { + padding:8px 15px; + background-color:#039cfd; +} +.webuploader-pick-hover { + background-color:#027dcb; +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.js new file mode 100644 index 000000000..9275f3bc0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/ImportForm.js @@ -0,0 +1,240 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2023.03.01 + * 描 述:导入固定资产信息 + */ +var id = request('id'); + +var keyVaule = ''; + +var bootstrap = function ($, learun) { + "use strict"; + + var page1 = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + $('#lr_add_format').on('click', function () { + currentColRow = null; + learun.layerForm({ + id: 'FormatForm', + title: '添加', + url: top.$.rootUrl + '/LR_SystemModule/CodeRule/FormatForm', + width: 450, + height: 310, + callBack: function (id) { + return top[id].acceptClick(function (data) { + $('#gridtable').jfGridSet('addRow', { row: data }); + }); + } + }); + }); + $('#lr_edit_format').on('click', function () { + currentColRow = $('#gridtable').jfGridGet('rowdata'); + var _id = currentColRow ? currentColRow.itemTypeName : ''; + if (learun.checkrow(_id)) { + learun.layerForm({ + id: 'FormatForm', + title: '修改', + url: top.$.rootUrl + '/LR_SystemModule/CodeRule/FormatForm', + width: 450, + height: 310, + callBack: function (id) { + return top[id].acceptClick(function (data) { + $('#gridtable').jfGridSet('updateRow', { row: data }); + }); + } + }); + } + + }); + $('#lr_delete_format').on('click', function () { + currentColRow = null; + var row = $('#gridtable').jfGridGet('rowdata'); + var _id = row ? row.itemTypeName : ''; + if (learun.checkrow(_id)) { + learun.layerConfirm('是否确认删除该项!', function (res, index) { + if (res) { + $('#gridtable').jfGridSet('removeRow'); + top.layer.close(index); //再执行关闭 + } + }); + } + }); + + $('#gridtable').jfGrid({ + headData: [ + { label: "前缀", name: "itemTypeName", width: 120, align: "left" }, + { label: "格式", name: "formatStr", width: 120, align: "left" }, + { label: "步长", name: "stepValue", width: 100, align: "left" }, + { label: "初始值", name: "initValue", width: 120, align: "left" }, + { label: "说明", name: "description", width: 180, align: "left" } + ] + }); + + /*检测重复项*/ + $('#F_EnCode').on('blur', function () { + $.lrExistField(keyValue, 'F_EnCode', top.$.rootUrl + '/LR_SystemModule/CodeRule/ExistEnCode'); + }); + $('#F_FullName').on('blur', function () { + $.lrExistField(keyValue, 'F_FullName', top.$.rootUrl + '/LR_SystemModule/CodeRule/ExistFullName'); + }); + }, + initData: function () { + if (!!selectedRow) { + keyValue = selectedRow.F_RuleId; + $('#form').lrSetFormData(selectedRow); + var formatdata = JSON.parse(selectedRow.F_RuleFormatJson); + $('#gridtable').jfGridSet('refreshdata', formatdata); + } + } + }; + + var fileInfo = {}; + + // 触发合并文件碎片 + var mergeFileChunks = function (file) { + + + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + param['fileId'] = fileInfo[file.id].fileGuid; + param['chunks'] = fileInfo[file.id].chunks; + param['ext'] = file.ext; + param['templateId'] = id; + learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/ExcelImport/Ass_FixAssetsImport", param, function (res) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress').remove(); + if (res.code == learun.httpCode.success) { + if (res.data.Success != '0') { + learun.alert.success('导入成功' + res.data.Success + '条'); + } + // 文件保存成功后 + $fileItem.append('
' + res.data.Success + '/' + res.data.Fail + '
'); + // 如果有失败 + if (res.data.Fail != '0') + { + learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' }); + } + } + else { + $fileItem.append('
'); + } + }); + } + // 触发清楚文件碎片 + var reomveFileChunks = function (file) { + var param = {}; + param['__RequestVerificationToken'] = $.lrToken; + param['fileGuid'] = fileInfo[file.id].fileGuid; + param['chunks'] = fileInfo[file.id].chunks; + learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { }); + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress').remove(); + $fileItem.append('
'); + } + + var page = { + uploader: null, + init: function () { + /*模板下载*/ + $('#lr_down_file_btn').on('click', function () { + learun.download({ url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/DownTemplate', param: { keyValue: id, __RequestVerificationToken: $.lrToken }, method: 'POST' }); + }); + if (!WebUploader.Uploader.support()) { + alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器'); + throw new Error('WebUploader does not support the browser you are using.'); + } + + page.uploader = WebUploader.create({ + auto: true, + swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf', + // 文件接收服务端。 + server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk", + // 选择文件的按钮。可选。 + // 内部根据当前运行是创建,可能是input元素,也可能是flash. + pick: '#lr_add_file_btn', + dnd: '#lr_form_file_queue', + paste: 'document.body', + disableGlobalDnd: true, + accept: { + extensions: "xls,xlsx" + }, + multiple: true, + // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传! + resize: false, + // 文件分片上传 + chunked: true, + chunkRetry: 3, + prepareNextFile: true, + chunkSize: '1048576', + // 上传参数 + formData: { + __RequestVerificationToken: $.lrToken + } + }); + page.uploader.on('fileQueued', page.fileQueued); + page.uploader.on('uploadStart', page.uploadStart); + page.uploader.on('uploadBeforeSend', page.uploadBeforeSend); + page.uploader.on('uploadProgress', page.uploadProgress); + page.uploader.on('uploadSuccess', page.uploadSuccess); + page.uploader.on('uploadError', page.uploadError); + page.uploader.on('uploadComplete', page.uploadComplete); + page.uploader.on('error', page.error); + + $('#lr_form_file_queue').lrscroll(); + + }, + fileQueued: function (file) {// 文件加载到队列 + fileInfo[file.id] = { name: file.name }; + $('#lr_form_file_queue .lr-form-file-queue-bg').hide(); + // 添加一条文件记录 + var $item = $('
'); + $item.append('
'); + $item.append('' + file.name + '(' + learun.countFileSize(file.size) + ')'); + + $('#lr_form_file_queue_list').append($item); + }, + uploadStart: function (file) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.append('
'); + }, + uploadBeforeSend: function (object, data, headers) { + data.chunk = data.chunk || 0; + data.chunks = data.chunks || 1; + fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid(); + data.fileGuid = fileInfo[data.id].fileGuid; + fileInfo[data.id].chunks = data.chunks; + }, + uploadProgress: function (file, percentage) { + var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id); + $fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%')); + }, + uploadSuccess: function (file, res) { + if (res.code == 200) {// 上传成功 + mergeFileChunks(file); + } + else {// 上传失败 + reomveFileChunks(file); + } + }, + uploadError: function (file, code) { + reomveFileChunks(file); + }, + uploadComplete: function (file) { + }, + error: function (type) { + switch (type) { + case 'Q_TYPE_DENIED': + learun.alert.error('当前文件类型不允许上传'); + break; + }; + } + }; + page.init(); + +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.cshtml index e05c2432f..056972acc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.cshtml @@ -86,6 +86,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js index edf30e14d..c31dbc26c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js @@ -16,13 +16,29 @@ var bootstrap = function ($, learun) { bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 350, 450); - $('#ATGId').lrDataSourceSelect({ code: 'Ass_AssetsType', value: 'atid', text: 'aname' }); - $('#ATId').lrDataSourceSelect({ code: 'Ass_AssetsType', value: 'atid', text: 'aname' }); + }, 350, 500); + $('#ATGId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType', + param: { strWhere: "ATPTId='0' " }, + value: "atid", + text: "aname", + select: function (item) { + if (!!item) { + $('#ATId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType', + param: { strWhere: "ATPTId='" + item.atid + "' " }, + value: "atid", + text: "aname" + }); + } + } + }); + $('#ATId').lrselect({ allowSearch: true }); $('#GetWay').lrDataItemSelect({ code: 'GetWay' }); $('#UseCondition').lrDataItemSelect({ code: 'AssState' }); - $('#UseDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); - $('#ManageDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#UseDepartment').lrDepartmentSelect(); + $('#ManageDepartment').lrDepartmentSelect(); $('#UsePeople').lrUserSelect(0); $('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); @@ -95,14 +111,14 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); + page.search(); }); } }); } }); - // 查看申请 + // 查看 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('FAId'); if (learun.checkrow(keyValue)) { @@ -129,18 +145,32 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认提交该项!', function (res) { if (res) { processId = learun.newGuid(); - learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { + learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/ChangeStatusById', { keyValue: keyValue, status: 1, processId: processId }, function (res) { refreshGirdData(res, {}); }); } }); } }); - + ///上传 + $('#lr_import').on('click', + function () { + learun.layerForm({ + id: 'form', + title: '导入', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/ImportForm', + width: 600, + height: 400, + btn: null, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/GetPageList', headData: [ { label: "资产编号", name: "FACode", width: 100, align: "left" }, @@ -171,7 +201,11 @@ var bootstrap = function ($, learun) { }); } }, - { label: "财务入账日期", name: "FinanceEntryDate", width: 100, align: "left" }, + { + label: "财务入账日期", name: "FinanceEntryDate", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue ? cellvalue.slice(0, 11) : ""; + } + }, { label: "价值类型", name: "ValueType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -291,7 +325,11 @@ var bootstrap = function ($, learun) { }); } }, - { label: "净值", name: "NetValue", width: 100, align: "left" }, + { + label: "净值", name: "NetValue", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue <= 0 ? "0" : cellvalue; + } + }, { label: "采购组织形式", name: "PurchaseOrganizationForm", width: 100, align: "left" }, { label: "品牌", name: "Brand", width: 100, align: "left" }, { label: "规格型号", name: "SpecificationModel", width: 100, align: "left" }, @@ -337,10 +375,24 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '已提交'; + } else if (cellvalue === 2) { + return '审批通过'; + } else if (cellvalue === 3) { + return '审核未通过'; + } else { + return '草稿'; + } + } + } ], mainId: 'FAId', isPage: true, - sidx:'CreateTime desc' + sidx: 'CreateTime desc' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.cshtml new file mode 100644 index 000000000..bacc1fcbb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.cshtml @@ -0,0 +1,90 @@ +@{ + ViewBag.Title = "固定资产"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
+
+
+
+
资产编号
+ +
+
+
资产名称
+ +
+
+
资产国标大类
+
+
+
+
资产分类
+
+
+
+
取得方式
+
+
+
+
使用状况
+
+
+
+
使用部门
+
+
+
+
管理部门
+
+
+
+
使用人
+
+
+
+
卡片状态
+
+
+
+
采购组织形式
+ +
+
+
存放地点
+
+
+
+
折旧/摊销状态
+
+
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js new file mode 100644 index 000000000..5ff1b913a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js @@ -0,0 +1,300 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-05 14:37 + * 描 述:固定资产 + */ +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 350, 500); + $('#ATGId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType', + param: { strWhere: "ATPTId='0' " }, + value: "atid", + text: "aname", + select: function (item) { + if (!!item) { + $('#ATId').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType', + param: { strWhere: "ATPTId='" + item.atid + "' " }, + value: "atid", + text: "aname" + }); + } + } + }); + $('#ATId').lrselect({ allowSearch: true }); + $('#GetWay').lrDataItemSelect({ code: 'GetWay' }); + $('#UseCondition').lrDataItemSelect({ code: 'AssState' }); + $('#UseDepartment').lrDepartmentSelect(); + $('#ManageDepartment').lrDepartmentSelect(); + $('#UsePeople').lrUserSelect(0); + $('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); + $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#DepreciationStatus').lrDataItemSelect({ code: 'DepreciationStatus' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('FAId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formAss_FixAssets', + title: '查看固定资产', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/FormView?keyValue=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/GetPageList', + headData: [ + { label: "资产编号", name: "FACode", width: 100, align: "left" }, + { label: "资产名称", name: "FAName", width: 100, align: "left" }, + { + label: "资产国标大类", name: "ATGId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', + key: value, + keyId: 'atid', + callback: function (_data) { + callback(_data['aname']); + } + }); + } + }, + { + label: "资产分类", name: "ATId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', + key: value, + keyId: 'atid', + callback: function (_data) { + callback(_data['aname']); + } + }); + } + }, + { + label: "财务入账日期", name: "FinanceEntryDate", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue ? cellvalue.slice(0, 11) : ""; + } + }, + { + label: "价值类型", name: "ValueType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'ValueType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "价值", name: "Value", width: 100, align: "left" }, + { + label: "取得方式", name: "GetWay", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'GetWay', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "取得日期", name: "GetDate", width: 100, align: "left" }, + { + label: "使用状况", name: "UseCondition", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'AssState', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "使用部门", name: "UseDepartment", 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: "ManageDepartment", 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: "UsePeople", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "数量", name: "Amount", width: 100, align: "left" }, + { label: "制单人", name: "MakePeople", width: 100, align: "left" }, + { label: "制单时间", name: "MakeDate", width: 100, align: "left" }, + { + label: "所属单位", name: "Unit", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { + label: "卡片状态", name: "CardStatus", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'CardStatus', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "折旧年限", name: "DepreciationLife", width: 100, align: "left" }, + { label: "累计折旧", name: "AccumulatedDepreciation", width: 100, align: "left" }, + { label: "已提折旧月数", name: "HaveDepreciationMonths", width: 100, align: "left" }, + { label: "月折旧额", name: "MonthlyDepreciation", width: 100, align: "left" }, + { + label: "折旧方法", name: "DepreciationMothod", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'DepreciationMothod', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "净值", name: "NetValue", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue <= 0 ? "0" : cellvalue; + } + }, + { label: "采购组织形式", name: "PurchaseOrganizationForm", width: 100, align: "left" }, + { label: "品牌", name: "Brand", width: 100, align: "left" }, + { label: "规格型号", name: "SpecificationModel", width: 100, align: "left" }, + { + label: "存放地点", name: "StorageId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, + { + label: "销售商", name: "SupplierId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, + { label: "使用权面积/建筑面积", name: "UseArea", width: 100, align: "left" }, + { label: "财政拨款", name: "FinancialAppropriation", width: 100, align: "left" }, + { label: "非财政拨款", name: "NonFinancialAppropriation", width: 100, align: "left" }, + { label: "会计凭证号", name: "AccountDocumentNumber", width: 100, align: "left" }, + { + label: "折旧/摊销状态", name: "DepreciationStatus", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'DepreciationStatus', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '已提交'; + } else if (cellvalue === 2) { + return '审批通过'; + } else if (cellvalue === 3) { + return '审核未通过'; + } else { + return '草稿'; + } + } + } + ], + mainId: 'FAId', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.IsTeacher = "1";//控制老师查看的参数 + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.cshtml index 540fb71e6..bf7fdbf6f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.cshtml @@ -3,45 +3,50 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
申请人
-
+
联系方式
- +
-
+
接收人*
-
+
-
+
联系方式*
- +
-
+
+
是否归还*
+
+
+
卡片编号*
- + +
-
+
资产名称*
- +
-
+
现存放地点*
-
+
-
+
存放地点新*
-
+
-
+
申请事由*
- +
-
+
附件说明
-
+
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js index 11cac0c54..861bc798a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js @@ -45,26 +45,71 @@ var bootstrap = function ($, learun) { $('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; $('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); $('#ContactWay').val(learun.clientdata.get(['userinfo']).mobile); - $('#UsePeople').lrGirdSelect({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain', - selectWord: 'name', - value: 'id', - text: 'name', + $('#FACode').lrGirdSelect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_FixAssets', + param: { strWhere: " 1=1 and usepeople ='" + learun.clientdata.get(['userinfo']).userId + "' " }, + selectWord: 'faname', + value: 'facode', + text: 'faname', headData: [ - { label: "公式", name: "result", width: 300, align: "left" }, - { label: "公式名称", name: "name", width: 300, align: "left" } + { label: "主键", name: "faid", width: 300, align: "left", ishide: true }, + { label: "资产编号", name: "facode", width: 150, align: "left" }, + { label: "资产名称", name: "faname", width: 150, align: "left" }, + { + label: "存放地点", name: "storageid", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, + { + label: "使用人", name: "usepeople", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + + ], select: function (item) { //赋值 - $("#StuName").val(item.stuname); - $("#StuId").val(item.stuno); - $("#ClassNo").val(item.classno); + $("#FACode").val(item.facode); + $("#FAName").val(item.faname); + $("#FAId").val(item.faid); + //存放地点 + $("#StorageId").lrselectSet(item.storageid); + $("#StorageIdNew").lrselectSet(item.storageid); } }); - $('#UsePeople').lrDataItemSelect({ code: '' }); - //$('#StorageId').lrDataItemSelect({ code: '' }); - //$('#StorageIdNew').lrDataItemSelect({ code: '' }); + $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#StorageIdNew').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#UsePeople').lrDataSourceSelect({ + code: 'teacheruserdata', value: 'f_userid', text: 'f_realname', + select: function (item) { + if (item) { + $("#ContactWayNew").val(item.f_mobile); + } + } + }); + $('#IsMark').lrselect({ + data: [{ text: "是", value: "1" }, { text: "否", value: "0" }], + text: "text", + value: "value" + }) $('#Files').lrUploader(); }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.cshtml new file mode 100644 index 000000000..376217d8e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.cshtml @@ -0,0 +1,59 @@ +@{ + ViewBag.Title = "Ass_FixAssetsApply"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
申请人
+ +
+
+
联系方式
+ +
+
+
接收人*
+
+
+
+
联系方式*
+ +
+
+
是否归还*
+
+
+
+
卡片编号*
+ +
+
+
资产名称*
+ +
+
+
现存放地点*
+
+
+
+
存放地点新*
+
+
+
+
申请事由*
+ +
+
+
附件说明
+
+
+
+
部门负责人意见*
+ +
+
+
资产负责人意见*
+ +
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.js new file mode 100644 index 000000000..8a4bda5a0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/FormView.js @@ -0,0 +1,158 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-05 14:52 + * 描 述:Ass_FixAssetsApply + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + //$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); + //$('#ContactWay').val(learun.clientdata.get(['userinfo']).mobile); + //$('#FACode').lrGirdSelect({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_FixAssets', + // selectWord: 'faname', + // value: 'facode', + // text: 'faname', + // headData: + // [ + // { label: "主键", name: "faid", width: 300, align: "left", ishide: true }, + // { label: "资产编号", name: "facode", width: 150, align: "left" }, + // { label: "资产名称", name: "faname", width: 150, align: "left" }, + // { + // label: "存放地点", name: "storageid", width: 150, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + // key: value, + // keyId: 'sid', + // callback: function (_data) { + // callback(_data['sname']); + // } + // }); + // } + // }, + + // ], + // select: function (item) { + // //赋值 + // $("#FACode").val(item.facode); + // $("#FAName").val(item.faname); + // $("#FAId").val(item.faid); + // //存放地点 + // $("#StorageId").lrselectSet(item.storageid); + // $("#StorageIdNew").lrselectSet(item.storageid); + // } + //}); + $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#StorageIdNew').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#UsePeople').lrDataSourceSelect({ + code: 'teacheruserdata', value: 'f_userid', text: 'f_realname', + select: function (item) { + if (item) { + $("#ContactWayNew").val(item.f_mobile); + } + } + }); + $('#IsMark').lrselect({ + data: [{ text: "是", value: "1" }, { text: "否", value: "0" }], + text: "text", + value: "value" + }) + $('#Files').lrUploader({ isUpload: false }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/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 + '/AssetManagementSystem/Ass_FixAssetsApply/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 == 'Ass_FixAssetsApply' && data[id]) { + keyValue = data[id].ID; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.cshtml index 22a07acf5..003fe9c60 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.cshtml @@ -13,11 +13,11 @@
-
+ @*
申请人
-
-
+
*@ +
接收人
@@ -31,7 +31,7 @@
卡片编号
- +
资产名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js index 7444d0250..05a14a8e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js @@ -45,11 +45,11 @@ var bootstrap = function ($, learun) { }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 220, 400); - $('#CreateUser').lrUserSelect(0); - $('#UsePeople').lrDataItemSelect({ code: '' }); - $('#StorageIdNew').lrDataItemSelect({ code: '' }); - $('#StorageId').lrDataItemSelect({ code: '' }); + }, 250, 400); + $('#CreateUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + $('#UsePeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#StorageIdNew').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { id: 'form', title: '新增', url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/Form', - width: 600, + width: 800, height: 400, callBack: function (id) { var res = false; @@ -68,8 +68,9 @@ var bootstrap = function ($, learun) { res = top[id].validForm(); // 保存数据 if (res) { - processId = learun.newGuid(); - res = top[id].save(processId, refreshGirdData); + res = top[id].save('', function () { + page.search(); + }); } return res; } @@ -79,11 +80,21 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项目不可编辑!"); + return; + } + var user = $('#gridtable').jfGridValue('CreateUser'); + if (user != learun.clientdata.get(['userinfo']).userId) { + learun.alert.warning("当前项目不可编辑!"); + return; + } learun.layerForm({ id: 'form', title: '编辑', url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/Form?keyValue=' + keyValue, - width: 600, + width: 800, height: 400, callBack: function (id) { var res = false; @@ -104,10 +115,20 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status > 0) { + learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); + return; + } + var user = $('#gridtable').jfGridValue('CreateUser'); + if (user != learun.clientdata.get(['userinfo']).userId) { + learun.alert.warning("当前项目不可删除!"); + return; + } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); + page.search(); }); } }); @@ -115,30 +136,47 @@ var bootstrap = function ($, learun) { }); //提交 $('#lr_submit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); + var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - var FlowNo = $('#gridtable').jfGridValue('FlowNo'); - if (FlowNo != 0) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { learun.alert.warning("当前项目已提交,请耐心等待审批!"); return; } + var user = $('#gridtable').jfGridValue('CreateUser'); + if (user != learun.clientdata.get(['userinfo']).userId) { + learun.alert.warning("当前项目不可删除!"); + return; + } learun.layerConfirm('是否确认提交该项!', function (res) { if (res) { processId = learun.newGuid(); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/ModifyStatus/ModifyStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) { + learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/ModifyStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) { refreshGirdData(res, {}); }); } }); } }); - //  查看 + // 查看申请 $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formAss_FixAssets', + title: '查看', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/FormView?keyValue=' + keyValue, + width: 800, + height: 600, + btn: null + }); + } }); + }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').lrAuthorizeJfGridLei({ url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/GetPageList', headData: [ { @@ -156,26 +194,28 @@ var bootstrap = function ($, learun) { { label: "接收人", name: "UsePeople", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', key: value, - code: '', + keyId: 'f_userid', callback: function (_data) { - callback(_data.text); + callback(_data['f_realname']); } }); } }, { label: "联系方式", name: "ContactWayNew", width: 100, align: "left" }, - { label: "卡片编号", name: "CardNumber", width: 200, align: "left" }, + { label: "卡片编号", name: "FACode", width: 200, align: "left" }, { label: "资产名称", name: "FAName", width: 200, align: "left" }, { - label: "现存放地点", name: "StorageId", width: 200, align: "left", + label: "存放地点", name: "StorageId", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', key: value, - code: '', + keyId: 'sid', callback: function (_data) { - callback(_data.text); + callback(_data['sname']); } }); } @@ -183,11 +223,12 @@ var bootstrap = function ($, learun) { { label: "存放地点新", name: "StorageIdNew", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', key: value, - code: '', + keyId: 'sid', callback: function (_data) { - callback(_data.text); + callback(_data['sname']); } }); } @@ -205,16 +246,17 @@ var bootstrap = function ($, learun) { cache: false, success: function (res) { var bb = ''; + //$.each(res.data, function (i, item) { + // bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + //}) $.each(res.data, function (i, item) { - bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + bb += '' + + //item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + + item.F_FileName + + ',   '; }) - //$.each(res.data, function(i, item) { - // bb += '' + - // item.F_FileName.substring(0,item.F_FileName.indexOf(".")) + - // ',   '; - //}) callback(bb); } }); @@ -224,7 +266,7 @@ var bootstrap = function ($, learun) { label: "审批状态", name: "Status", width: 100, align: "center", formatter: function (cellvalue, row) { if (cellvalue == 0) { - return '草稿'; + return '草稿'; } if (cellvalue == 1) { return '审批中'; } else if (cellvalue == 2) { @@ -234,13 +276,16 @@ var bootstrap = function ($, learun) { } ], mainId: 'ID', - isPage: true + isPage: true, + sidx: 'CreateUser,Status', + sord: 'desc', }); }, search: function (param) { param = param || {}; param.StartTime = startTime; param.EndTime = endTime; + param.CreateUser = learun.clientdata.get(['userinfo']).userId; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; @@ -249,7 +294,7 @@ var bootstrap = function ($, learun) { if (res.code == 200) { // 发起流程 var postData = { - schemeCode: '',// 填写流程对应模板编号 + schemeCode: 'Ass_FixAssetsApply',// 填写流程对应模板编号 processId: processId, level: '1', }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.cshtml new file mode 100644 index 000000000..66114794c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.cshtml @@ -0,0 +1,57 @@ +@{ + ViewBag.Title = "Ass_FixAssetsApply"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
申请人
+
+
+
+
接收人
+
+
+
+
存放地点新
+
+
+
+
现存放地点
+
+
+
+
卡片编号
+ +
+
+
资产名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.js new file mode 100644 index 000000000..9ffc1cd96 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/IndexView.js @@ -0,0 +1,214 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-05 14:52 + * 描 述:Ass_FixAssetsApply + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var processId = ''; + 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(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 250, 400); + $('#CreateUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + $('#UsePeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + $('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + $('#StorageIdNew').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看申请 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formAss_FixAssets', + title: '查看', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/FormView?keyValue=' + keyValue, + width: 800, + height: 600, + btn: null + }); + } + }); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/GetPageList', + headData: [ + { + label: "申请人", name: "CreateUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "联系方式", name: "ContactWay", width: 100, align: "left" }, + { + label: "接收人", name: "UsePeople", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "联系方式", name: "ContactWayNew", width: 100, align: "left" }, + { label: "卡片编号", name: "FACode", width: 200, align: "left" }, + { label: "资产名称", name: "FAName", width: 200, align: "left" }, + { + label: "存放地点", name: "StorageId", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, + { + label: "存放地点新", name: "StorageIdNew", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + }, + { label: "申请事由", name: "ApplyReasons", width: 240, align: "left" }, + { + label: "附件说明", name: "Files", 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 = ''; + //$.each(res.data, function (i, item) { + // bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + //}) + $.each(res.data, function (i, item) { + bb += '' + + //item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + + item.F_FileName + + ',   '; + }) + callback(bb); + } + }); + } + }, + { + label: "审批状态", name: "Status", width: 100, align: "center", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '草稿'; + } if (cellvalue == 1) { + return '审批中'; + } else if (cellvalue == 2) { + return '审批通过'; + } + } + } + ], + mainId: 'ID', + isPage: true, + sidx: 'CreateUser,Status', + sord: 'desc', + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = " and Status != 0 "; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (!!res) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'Ass_FixAssetsApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); + } + }; + page.init(); +} +function downLoad(fileId, fileTwo) { + if (fileTwo) { + + top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () { + + }); + } + top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs new file mode 100644 index 000000000..1e9208d94 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs @@ -0,0 +1,136 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineController : MvcControllerBase + { + private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); + + #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 = lessonInfoOfElectiveOnlineIBLL.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 LessonInfoOfElectiveOnlineData = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(keyValue); + var jsonData = new + { + LessonInfoOfElectiveOnline = LessonInfoOfElectiveOnlineData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + lessonInfoOfElectiveOnlineIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + LessonInfoOfElectiveOnlineEntity entity = strEntity.ToObject(); + lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoLock(string keyValue, string status) + { + lessonInfoOfElectiveOnlineIBLL.DoLock(keyValue, status); + return Success("操作成功!"); + } + + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs index f3d599e7d..663b70d7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs @@ -43,6 +43,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// 表单页【查看】 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// /// 表单页 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs index aef4ec08f..fccd18f63 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuFellowshipController.cs @@ -49,6 +49,26 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers ViewBag.ClassNo = ClassNos.TrimEnd(','); return View(); } + /// + /// 表单页【查看】 + /// + /// + [HttpGet] + public ActionResult FormView() + { + var logUser = LoginUserInfo.Get(); + var ClassNos = ""; + var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList(); + if (Classinfo.Any()) + { + foreach (var item in Classinfo) + { + ClassNos += item.ClassNo + ","; + } + } + ViewBag.ClassNo = ClassNos.TrimEnd(','); + return View(); + } /// /// 主页面【二级学院】 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml index fea0cf3c8..d04c88482 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.cshtml @@ -35,5 +35,9 @@
心理负责人
+
+
资助审核人
+
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CdDept/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js index 3ea4c4113..4cfeac5d7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Form.js @@ -18,6 +18,7 @@ var bootstrap = function ($, learun) { $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#DeptDirector').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); $('#DeptpSychology').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); + $('#DeptSubsidizer').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js index ecb0572bf..246e9be25 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/CdDept/Index.js @@ -114,6 +114,18 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "资助审核人", name: "DeptSubsidizer", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_encode', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, ], mainId: 'DeptId', isMultiselect: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LanMail/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LanMail/Index.js index 0dac2821c..a0c21088f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LanMail/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LanMail/Index.js @@ -296,7 +296,7 @@ var bootstrap = function ($, learun) { var $parent = $this.parent(); $parent.find('.active').removeClass('active'); $this.addClass('active'); - var data_value = $this.context.dataset.value; + var data_value = $this[0].dataset.value; switch (data_value) { case "1"://写邮件 $("#lr_edit").hide(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml new file mode 100644 index 000000000..0f5563f91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml @@ -0,0 +1,32 @@ +@{ + ViewBag.Title = "线上课程"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
课程编号*
+ +
+
+
课程名称*
+ +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
建课教师*
+
+ +
+
+
建课学校*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js new file mode 100644 index 000000000..6c560bbd4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js @@ -0,0 +1,73 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-29 14:28 + * 描 述:线上课程 + */ +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 () { + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrDataSourceSelect({ + code: 'EmpInfo', value: 'empno', text: 'empname', select: function (item) { + if (!!item) { + $('#EmpName').val(item.empname); + } + } + }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company',value: 'f_companyid',text: 'f_fullname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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 + '/EducationalAdministration/LessonInfoOfElectiveOnline/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml new file mode 100644 index 000000000..c06354218 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "线上课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
学年
+
+
+
+
学期
+
+
+
+
建课教师
+
+
+
+
是否启用
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js new file mode 100644 index 000000000..fa643b217 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js @@ -0,0 +1,186 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-29 14:28 + * 描 述:线上课程 + */ +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); + }, 300, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + $('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark === "1") { + learun.alert.warning("当前课程已启用不能编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark === "1") { + learun.alert.warning("当前课程已启用不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //启用 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark == "1") { + learun.alert.warning("当前课程已启用!"); + return; + } + learun.layerConfirm('是否确认启用该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "1" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //停用 + $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != "1") { + learun.alert.warning("当前课程未启用无法停用!"); + return; + } + learun.layerConfirm('是否确认停用该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "0" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetPageList', + headData: [ + { label: "课程编号", name: "LessonNo", width: 150, align: "left" }, + { label: "课程名称", name: "LessonName", width: 150, align: "left" }, + { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { + label: "建课教师", name: "EmpNo", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "建课学校", name: "F_SchoolId", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { + label: "是否启用", name: "CheckMark", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "" : ""; + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'MakeDate desc' + }); + 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/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml index a856f552d..08c305911 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Form.cshtml @@ -88,7 +88,7 @@
备注
-
+
附件
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.cshtml new file mode 100644 index 000000000..ca8576f9b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.cshtml @@ -0,0 +1,95 @@ +@{ + ViewBag.Title = "校级奖学金"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
姓名*
+ +
+
+
学号*
+ +
+
+
所属院系
+
+
+
+
所属班级
+
+
+
+
身份证件类型*
+
+
+
+
身份证件号
+ +
+
+
学年
+ +
+
+
学期
+ +
+
+
班级总人数*
+ +
+
+
成绩排名名次*
+ +
+
+
开户银行
+
+
+
+
开户行账号
+ +
+
+
开户行号
+ +
+
+
资助等级*
+
+
+
+
资助标准*
+ +
+
+
应发金额*
+ +
+
+
实发金额*
+ +
+
+
申请日期
+ +
+
+
发放日期*
+ +
+
+
申请理由*
+ +
+
+
备注
+ +
+
+
附件
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.js new file mode 100644 index 000000000..81014d164 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormView.js @@ -0,0 +1,97 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-16 11:49 + * 描 述:校级奖学金 + */ +var acceptClick; +var bindData; +var keyValue = request('keyValue'); +var Step = request('Step');//第几步 +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.hide(); + page.bind(); + page.initData(); + }, + hide: function () { + if (Step == "2") {//第二步:二级学院审核,时附件显示且必填; + $('#FilesDiv').show(); + $('#Url').attr('isvalid', 'yes'); + $('#Url').attr('checkexpession', 'NotNull'); + $('#Url').prev().html('附件*'); + } else { + $('#Url').removeAttr('isvalid'); + $('#Url').removeAttr('checkexpession'); + $('#Url').prev().html('附件'); + $('#FilesDiv').hide(); + } + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); + $('#IdCardType').lrselectSet("01"); + $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); + $('#FundingLevel').lrDataItemSelect({ + code: 'SchoolFundingLevel', + select: function (item) { + if (!!item) { + $('#FundingCriteria').val(item.id); + $('#ShoudAmount').val(item.id); + $('#ActualAmount').val(item.id); + } + } + }); + $('#Url').lrUploader({ isUpload: false }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/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 + '/EducationalAdministration/SchoolLevelScholarship/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + bindData = function (data) { + if (!!data) { + $('#StuName').val(data.StuName); + $('#StuNo').val(data.StuNo); + $('#DeptNo').lrselectSet(data.DeptNo); + $('#ClassNo').lrselectSet(data.ClassNo); + $('#IdCard').val(data.IdCard); + $('#AcademicYearNo').val(data.AcademicYearNo); + $('#Semester').val(data.Semester); + $('#CalssNum').val(data.StuNum); + $('#ClassRank').val(data.Num); + $('#DepositBank').lrselectSet(data.DepositBank); + $('#BankCard').val(data.BankCard); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.cshtml index 6bbf19b1f..33c57b804 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.cshtml @@ -63,6 +63,7 @@  新增  编辑  删除 +  查看
 提交二级学院 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.js index d4b664336..a8d685594 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/Index.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -62,7 +62,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -72,8 +72,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#FundingLevel').lrDataItemSelect({ code: 'SchoolFundingLevel' }); // 刷新 $('#lr_refresh').on('click', function () { @@ -149,6 +169,20 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormView?keyValue=' + keyValue, + width: 1100, + height: 700, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { @@ -168,7 +202,7 @@ var bootstrap = function ($, learun) { } }); }}, - { label: "所属班级", name: "ClassNo", width: 100, align: "left", + { label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -183,7 +217,7 @@ var bootstrap = function ($, learun) { label: "身份证件类型", name: "IdCardType", width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -299,6 +333,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'CreateTime desc' }); + page.search(); }, search: function (param) { param = param || {}; @@ -306,6 +341,9 @@ var bootstrap = function ($, learun) { param.EndTime = endTime; param.StartTimeRelease = startTimeRelease; param.EndTimeRelease = endTimeRelease; + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.CreateUserNo = learun.clientdata.get(['userinfo']).account;//辅导员 + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml index f38db1f3b..5adf005ab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml @@ -58,6 +58,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js index 2c259d786..f6843e3d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -62,7 +62,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -72,48 +72,86 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#FundingLevel').lrDataItemSelect({ code: 'SchoolFundingLevel' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormView?keyValue=' + keyValue, + width: 1100, + height: 700, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetPageList', headData: [ - { label: "学号", name: "StuNo", width: 100, align: "left"}, - { label: "姓名", name: "StuName", width: 100, align: "left"}, - { label: "所属院系", name: "DeptNo", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', - key: value, - keyId: 'deptno', - callback: function (_data) { - callback(_data['deptname']); - } - }); - }}, - { label: "所属班级", name: "ClassNo", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', - key: value, - keyId: 'classno', - callback: function (_data) { - callback(_data['classname']); - } - }); - }}, + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "所属院系", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "所属班级", name: "ClassNo", width: 120, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, { label: "身份证件类型", name: "IdCardType", width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -121,24 +159,26 @@ var bootstrap = function ($, learun) { }); } }, - { label: "身份证件号", name: "IdCard", width: 100, align: "left"}, + { label: "身份证件号", name: "IdCard", width: 100, align: "left" }, { label: "学年", name: "AcademicYearNo", width: 50, align: "left" }, { label: "学期", name: "Semester", width: 50, align: "left" }, - { label: "成绩排名总人数", name: "CalssNum", width: 100, align: "left"}, - { label: "成绩排名名次", name: "ClassRank", width: 100, align: "left"}, - { label: "资助等级", name: "FundingLevel", width: 70, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'SchoolFundingLevel', - callback: function (_data) { - callback(_data.text); - } - }); - }}, - { label: "资助标准", name: "FundingCriteria", width: 70, align: "left"}, - { label: "应发金额", name: "ShoudAmount", width: 70, align: "left"}, - { label: "实发金额", name: "ActualAmount", width: 70, align: "left"}, + { label: "成绩排名总人数", name: "CalssNum", width: 100, align: "left" }, + { label: "成绩排名名次", name: "ClassRank", width: 100, align: "left" }, + { + label: "资助等级", name: "FundingLevel", width: 70, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'SchoolFundingLevel', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "资助标准", name: "FundingCriteria", width: 70, align: "left" }, + { label: "应发金额", name: "ShoudAmount", width: 70, align: "left" }, + { label: "实发金额", name: "ActualAmount", width: 70, align: "left" }, { label: "申请日期", name: "ApplyDate", width: 100, align: "left", formatter: function (cellvalue) { @@ -151,7 +191,7 @@ var bootstrap = function ($, learun) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, - { label: "申请理由", name: "ApplyAccount", width: 100, align: "left"}, + { label: "申请理由", name: "ApplyAccount", width: 100, align: "left" }, { label: "开户银行", name: "DepositBank", width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { @@ -164,8 +204,8 @@ var bootstrap = function ($, learun) { }); } }, - { label: "开户行账号", name: "BankCard", width: 100, align: "left"}, - { label: "开户行号", name: "BankCode", width: 100, align: "left"}, + { label: "开户行账号", name: "BankCard", width: 100, align: "left" }, + { label: "开户行号", name: "BankCode", width: 100, align: "left" }, { label: "备注说明", name: "Remark", width: 100, align: "left" }, { label: '审核状态', name: 'Status', width: 100, align: "left", formatter: function (cellvalue) { @@ -225,10 +265,11 @@ var bootstrap = function ($, learun) { }, { label: '学工部审核时间', name: 'SecondCheckTime', width: 130, align: "left" }, ], - mainId:'Id', + mainId: 'Id', isPage: true, sidx: 'CreateTime desc' }); + page.search(); }, search: function (param) { param = param || {}; @@ -236,7 +277,10 @@ var bootstrap = function ($, learun) { param.EndTime = endTime; param.StartTimeRelease = startTimeRelease; param.EndTimeRelease = endTimeRelease; - param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 + param.Status = 3; + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.cshtml index 6e464c0e4..5f8ec8365 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.cshtml @@ -64,6 +64,10 @@  退回辅导员  退回二级学院
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.js index 2e025029b..bde93c94a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfThree.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -62,7 +62,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -72,8 +72,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#FundingLevel').lrDataItemSelect({ code: 'SchoolFundingLevel' }); // 刷新 $('#lr_refresh').on('click', function () { @@ -133,6 +153,38 @@ var bootstrap = function ($, learun) { }); } }); + // 取消归档 + $('#lr_submitCancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "3") { + learun.alert.warning("当前项不属于归档状态,无法取消归档!"); + return false; + } + learun.layerConfirm('是否确认取消归档该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/DoBack', { keyValue: keyValue, status: '2', step: '3' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormView?Step=2&keyValue=' + keyValue, + width: 1100, + height: 700, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { @@ -152,7 +204,7 @@ var bootstrap = function ($, learun) { } }); }}, - { label: "所属班级", name: "ClassNo", width: 100, align: "left", + { label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -167,7 +219,7 @@ var bootstrap = function ($, learun) { label: "身份证件类型", name: "IdCardType", width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -283,6 +335,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'FirstCheckTime desc' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.cshtml index 87fe78d02..9e5f04fa3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.cshtml @@ -60,7 +60,8 @@
 提交学工部 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.js index e8851aea9..618c95aab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfTwo.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -62,7 +62,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -72,8 +72,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#FundingLevel').lrDataItemSelect({ code: 'SchoolFundingLevel' }); // 刷新 $('#lr_refresh').on('click', function () { @@ -90,7 +110,7 @@ var bootstrap = function ($, learun) { } learun.layerForm({ id: 'formOfTwo', - title: '审核', + title: '上传附件', url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/Form?Step=2&keyValue=' + keyValue, width: 1100, height: 700, @@ -136,6 +156,20 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormView?Step=2&keyValue=' + keyValue, + width: 1100, + height: 700, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { @@ -155,7 +189,7 @@ var bootstrap = function ($, learun) { } }); }}, - { label: "所属班级", name: "ClassNo", width: 100, align: "left", + { label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -170,7 +204,7 @@ var bootstrap = function ($, learun) { label: "身份证件类型", name: "IdCardType", width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -286,6 +320,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'SubmitTime desc' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.cshtml index e271a1275..82dd8bd2c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.cshtml @@ -44,7 +44,7 @@
开户行号*
- +
资助等级*
@@ -78,7 +78,7 @@
备注说明
-
+
附件
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js index b96bedcef..f6252475f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Form.js @@ -13,7 +13,7 @@ if (Types != null && Types != undefined && Types != "") { } var strWhere = "";//点击学号弹出框条件 if (classs != "" && classs != undefined && classs != null) { - strWhere = " and classno in (" + classs + ") "; + strWhere = " and classno in ('" + classs.replaceAll(",", "','") + "') "; } var bootstrap = function ($, learun) { "use strict"; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormView.cshtml new file mode 100644 index 000000000..f493ad86d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormView.cshtml @@ -0,0 +1,87 @@ +@{ + ViewBag.Title = "定制功能助学金"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+ +
+
学号*
+
+
+
+
姓名
+ +
+
+
院系
+
+
+
+
班级
+
+
+
+
身份证件类型*
+
+
+
+
身份证件号
+ +
+
+
开户银行
+
+
+
+
开户卡账号
+ +
+
+
开户行号*
+ +
+
+
资助等级*
+
+
+
+
资助标准*
+ +
+
+
应发金额*
+ +
+
+
实发金额*
+ +
+
+
申请日期*
+ +
+
+
发放日期*
+ +
+
+
申请理由*
+ +
+
+
备注说明
+ +
+
+
附件
+
+
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuFellowship/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormView.js new file mode 100644 index 000000000..2dc593e8f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/FormView.js @@ -0,0 +1,119 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-13 10:37 + * 描 述:定制功能助学金 + */ +var acceptClick; +var keyValue = request('keyValue'); +var Step = request('Step');//第几步 +var Types = request('Types');//助学金类型:1国家助学金,2校级助学金 +if (Types != null && Types != undefined && Types != "") { + $('#Types').val(Types); +} +var strWhere = "";//点击学号弹出框条件 +if (classs != "" && classs != undefined && classs != null) { + strWhere = " and classno in ('" + classs.replaceAll(",", "','") + "') "; +} +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.hide(); + page.bind(); + page.initData(); + }, + hide: function () { + if (Step == "2") {//第二步:二级学院审核,时附件显示且必填; + $('#FilesDiv').show(); + $('#Files').attr('isvalid', 'yes'); + $('#Files').attr('checkexpession', 'NotNull'); + $('#Files').prev().html('附件*'); + } else { + $('#Files').removeAttr('isvalid'); + $('#Files').removeAttr('checkexpession'); + $('#Files').prev().html('附件'); + $('#FilesDiv').hide(); + } + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); + $('#IdCardType').lrselectSet("01"); + $('#OpenBank').lrDataItemSelect({ code: 'DepositBank' }); + //判断登录用户所带班级:学生弹框显示所带班级学生 + $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuno' }); + + //判断助学金类型:1国家助学金,2校级助学金 + if (Types == "1") { + $('#SubsidizeType').lrDataItemSelect({ + code: 'StateStipend', + select: function (item) { + //系统自动带出标准、应发金额和实发金额 + if (item != null && item != undefined) { + $("#FunderNationStandard").val(item.id); + $("#FinalPayingAmount").val(item.id); + $("#AmountPayable").val(item.id); + } + } + }); + } else if (Types == "2") { + $('#SubsidizeType').lrDataItemSelect({ + code: 'SchoolStipend', + select: function (item) { + //系统自动带出标准、应发金额和实发金额 + if (item != null && item != undefined) { + $("#FunderNationStandard").val(item.id); + $("#FinalPayingAmount").val(item.id); + $("#AmountPayable").val(item.id); + } + } + }); + } + + $('#Files').lrUploader({ isUpload: false }); + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/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]); + } + //判断身份证件类型为空时,默认选择“居民身份证” + if (data[id].IdCardType == null || data[id].IdCardType == "" || data[id].IdCardType == undefined) { + $('#IdCardType').lrselectSet("01"); + } + } + + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + var postDatas = { + strEntity: JSON.stringify(postData) + }; + + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/SaveForm?keyValue=' + keyValue, postDatas, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.cshtml index 9d16ca32c..ff8a5a798 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.cshtml @@ -67,10 +67,11 @@
-
+
 提交二级学院 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js index f1149bfd7..c1f95dd0f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/Index.js @@ -37,7 +37,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -74,8 +74,28 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 350, 400); //下拉框绑定 - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); //判断助学金类型:1国家助学金,2校级助学金 if (types == "1") { @@ -158,6 +178,20 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormView?Types=' + types + '&keyValue=' + keyValue, + width: 1000, + height: 600, + btn:null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -179,7 +213,7 @@ var bootstrap = function ($, learun) { } }, { - label: "所属班级", name: "ClassNo", width: 100, align: "left", + label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -195,7 +229,7 @@ var bootstrap = function ($, learun) { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -309,6 +343,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'CreateTime desc' }); + page.search(); }, search: function (param) { param = param || {}; @@ -317,6 +352,9 @@ var bootstrap = function ($, learun) { param.EndTime = endTime; param.StartTimeRelease = startTimeRelease; param.EndTimeRelease = endTimeRelease; + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.CreateUserNo = learun.clientdata.get(['userinfo']).account;//辅导员 + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml index e70f405dc..34cbf57fc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.cshtml @@ -68,6 +68,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js index 367f5366f..b8004ef57 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfStudent.js @@ -37,7 +37,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -74,9 +74,29 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 350, 400); //下拉框绑定 - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); - + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); + //判断助学金类型:1国家助学金,2校级助学金 if (types == "1") { $('#SubsidizeType').lrDataItemSelect({ code: 'StateStipend' }); @@ -88,6 +108,20 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormView?Types=' + types + '&keyValue=' + keyValue, + width: 1000, + height: 600, + btn: null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -109,7 +143,7 @@ var bootstrap = function ($, learun) { } }, { - label: "所属班级", name: "ClassNo", width: 100, align: "left", + label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -125,7 +159,7 @@ var bootstrap = function ($, learun) { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -234,6 +268,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'SubmitTime desc' }); + page.search(); }, search: function (param) { param = param || {}; @@ -242,7 +277,10 @@ var bootstrap = function ($, learun) { param.EndTime = endTime; param.StartTimeRelease = startTimeRelease; param.EndTimeRelease = endTimeRelease; - param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 + param.Status = 3; + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.cshtml index ea1bf0713..f1da24fea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.cshtml @@ -72,6 +72,10 @@  退回辅导员  退回二级学院
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.js index 51b3aa2fa..2b0f3ad38 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfThree.js @@ -37,7 +37,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -74,8 +74,28 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 350, 400); //下拉框绑定 - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); //判断助学金类型:1国家助学金,2校级助学金 if (types == "1") { @@ -142,6 +162,38 @@ var bootstrap = function ($, learun) { }); } }); + // 取消归档 + $('#lr_submitCancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "3") { + learun.alert.warning("当前项不属于归档状态,无法取消归档!"); + return false; + } + learun.layerConfirm('是否确认取消归档该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuFellowship/DoBack', { keyValue: keyValue, status: '2', step: '3' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormView?Types=' + types + '&Step=2&keyValue=' + keyValue, + width: 1000, + height: 600, + btn: null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -163,7 +215,7 @@ var bootstrap = function ($, learun) { } }, { - label: "所属班级", name: "ClassNo", width: 100, align: "left", + label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -179,7 +231,7 @@ var bootstrap = function ($, learun) { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -288,6 +340,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'FirstCheckTime desc' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml index fb5bcafa7..e7ec46551 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.cshtml @@ -67,8 +67,9 @@
-
-  审核 +
 提交学工部 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js index 607e2e587..2eeaa1c5e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuFellowship/IndexOfTwo.js @@ -37,7 +37,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTimeRelease = begin; endTimeRelease = end; @@ -74,8 +74,28 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 350, 400); //下拉框绑定 - $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); //判断助学金类型:1国家助学金,2校级助学金 if (types == "1") { @@ -99,7 +119,7 @@ var bootstrap = function ($, learun) { } learun.layerForm({ id: 'formOfTwo', - title: '审核', + title: '上传附件', url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/Form?Types=' + types + '&Step=2&keyValue=' + keyValue, width: 1000, height: 600, @@ -145,6 +165,20 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/StuFellowship/FormView?Types=' + types + '&Step=2&keyValue=' + keyValue, + width: 1000, + height: 600, + btn: null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -166,7 +200,7 @@ var bootstrap = function ($, learun) { } }, { - label: "所属班级", name: "ClassNo", width: 100, align: "left", + label: "所属班级", name: "ClassNo", width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -182,7 +216,7 @@ var bootstrap = function ($, learun) { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left" , formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -291,6 +325,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'SubmitTime desc' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js index d7de85a9a..e961cc2ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js @@ -1922,7 +1922,11 @@ var bootstrap = function ($, learun) { } if (!!iframeObj.$) { - callback(iframeObj, formData); + //callback(iframeObj, formData); + //优化审批页面‘表单信息’选项卡中的数据无法回显问题; + setTimeout(function () { + callback(iframeObj, formData); + }, 10); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs index e20bf1982..d9de38493 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs @@ -7,6 +7,7 @@ using Learun.Application.Base.SystemModule; using System; using System.Drawing; using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.AssetManagementSystem; namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers { @@ -22,7 +23,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers private ExcelImportIBLL excelImportIBLL = new ExcelImportBLL(); private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); - + private Ass_FixAssetsIBLL ass_FixAssetsIBLL = new Ass_FixAssetsBLL(); + #region 视图功能 /// /// 导入模板管理页面 @@ -209,10 +211,10 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers /// [HttpPost] [ValidateAntiForgeryToken] - public ActionResult ExecuteImportExcel(string templateId, string fileId, int chunks,string ext) + public ActionResult ExecuteImportExcel(string templateId, string fileId, int chunks, string ext) { UserInfo userInfo = LoginUserInfo.Get(); - string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "."+ ext, chunks, userInfo); + string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); if (!string.IsNullOrEmpty(path)) { DataTable dt = ExcelHelper.ExcelImport(path); @@ -239,14 +241,14 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers /// [HttpPost] [ValidateAntiForgeryToken] - public ActionResult ExecuteImportSaralExcel(string fileId, int chunks,string ext) + public ActionResult ExecuteImportSaralExcel(string fileId, int chunks, string ext) { UserInfo userInfo = LoginUserInfo.Get(); - string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "."+ ext, chunks, userInfo); + string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); if (!string.IsNullOrEmpty(path)) { DataTable dt = ExcelHelper.ExcelImport(path); - string res = excelImportIBLL.ImportSalaryInfo(dt,fileId); + string res = excelImportIBLL.ImportSalaryInfo(dt, fileId); var data = new { Success = res.Split('|')[0], @@ -269,14 +271,14 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers /// [HttpPost] [ValidateAntiForgeryToken] - public ActionResult EmpInfoImport(string fileId, int chunks,string ext) + public ActionResult EmpInfoImport(string fileId, int chunks, string ext) { UserInfo userInfo = LoginUserInfo.Get(); - string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "."+ ext, chunks, userInfo); + string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); if (!string.IsNullOrEmpty(path)) { DataTable dt = ExcelHelper.ExcelImport(path); - string res = excelImportIBLL.EmpInfoImport(dt,fileId); + string res = excelImportIBLL.EmpInfoImport(dt, fileId); var data = new { Success = res.Split('|')[0], @@ -300,14 +302,14 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers /// [HttpPost] [ValidateAntiForgeryToken] - public ActionResult StuInfoBasicImport(string fileId, int chunks, string ext,string classno) + public ActionResult StuInfoBasicImport(string fileId, int chunks, string ext, string classno) { UserInfo userInfo = LoginUserInfo.Get(); string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); if (!string.IsNullOrEmpty(path)) { DataTable dt = ExcelHelper.ExcelImport(path); - var res = stuInfoBasicIBLL.StuInfoBasicUpdateImport(dt, fileId,classno); + var res = stuInfoBasicIBLL.StuInfoBasicUpdateImport(dt, fileId, classno); var data = new { Success = res.snum, @@ -320,6 +322,38 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers return Fail("导入数据失败!"); } } + + /// + /// 工资条导入 + /// + /// 模板Id + /// 文件主键 + /// 分片数 + /// 文件扩展名 + /// + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Ass_FixAssetsImport(string fileId, int chunks, string ext) + { + UserInfo userInfo = LoginUserInfo.Get(); + string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo); + if (!string.IsNullOrEmpty(path)) + { + DataTable dt = ExcelHelper.ExcelImport(path); + string res = ass_FixAssetsIBLL.AssFixAssetsImport(dt, fileId); + var data = new + { + Success = res.Split('|')[0], + Fail = res.Split('|')[1] + }; + return JsonResult(data); + } + else + { + return Fail("导入数据失败!"); + } + } + /// /// 下载文件(导入文件未被导入的数据) /// @@ -327,7 +361,7 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers /// [HttpPost] [ValidateAntiForgeryToken] - public void DownImportErrorFile(string fileId,string fileName) + public void DownImportErrorFile(string fileId, string fileName) { //设置导出格式 ExcelConfig excelconfig = new ExcelConfig(); @@ -358,7 +392,7 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers }); } - + } ExcelHelper.ExcelDownload(dt, excelconfig); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs index 3498936af..a26799491 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/FamilyEconomyController.cs @@ -51,6 +51,26 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers return View(); } /// + /// 表单页【查看】 + /// + /// + [HttpGet] + public ActionResult FormView() + { + var logUser = LoginUserInfo.Get(); + var ClassNos = ""; + var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList(); + if (Classinfo.Any()) + { + foreach (var item in Classinfo) + { + ClassNos += item.ClassNo + ","; + } + } + ViewBag.ClassNo = ClassNos.TrimEnd(','); + return View(); + } + /// /// 主页面【二级学院】 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.cshtml index 812398c49..7e20bba19 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.cshtml @@ -24,8 +24,8 @@
-
院校
-
+
院系
+
班级
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.js index 49ffaf799..38dcfeb42 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Form.js @@ -9,7 +9,7 @@ var keyValue = request('keyValue'); var Step = request('Step');//第几步 var strWhere = "";//点击学号弹出框条件 if (classs != "" && classs != undefined && classs != null) { - strWhere = " and classno in (" + classs + ") "; + strWhere = " and classno in ('" + classs.replaceAll(",", "','") + "') "; } var bootstrap = function ($, learun) { "use strict"; @@ -34,7 +34,7 @@ var bootstrap = function ($, learun) { } }, bind: function () { - $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); $('#IdCardType').lrselectSet('01'); @@ -98,9 +98,9 @@ var bootstrap = function ($, learun) { { label: "年级", name: "grade", width: 100, align: "left" } ], select: function (item) { - //自动带出内容:姓名 院校 班级 身份证件号 身份证件类型 + //自动带出内容:姓名 院系 班级 身份证件号 身份证件类型 $("#StuName").val(item.stuname); - $("#F_SchoolId").lrselectSet(item.f_schoolid); + $("#DeptNo").lrselectSet(item.deptno); $("#ClassNo").lrselectSet(item.classno); $("#IdentityCardNo").val(item.identitycardno); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormView.cshtml new file mode 100644 index 000000000..8d076d0fc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormView.cshtml @@ -0,0 +1,195 @@ +@{ + ViewBag.Title = "家庭经济信息(辅导员)"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + + +
+
+
学号*
+
+
+
+
姓名
+ +
+
+
院系
+
+
+
+
班级
+
+
+
+
身份证件号
+ +
+
+
身份证件类型*
+
+
+
+
申请时间*
+ +
+
+
是否低保*
+
+
+
+
是否孤儿*
+
+
+
+
是否单亲家庭子女*
+
+
+
+
是否残疾人子女*
+
+
+
+
本人是否残疾*
+
+
+
+
残疾类别
+
+
+
+
是否父母丧失劳动能力*
+
+
+
+
是否家中有大病患者*
+
+
+
+
是否脱贫家庭学生*
+
+
+
+
是否脱贫不稳定家庭学生*
+
+
+
+
是否边缘易致贫家庭学生*
+
+
+
+
是否边突发严重困难学生*
+
+
+
+
是否低收入家庭*
+
+
+
+
烈士子女*
+
+
+
+
家庭人均年收入*
+ +
+
+
家庭主要收入来源类型*
+
+
+
+
家庭是否遭受自然灾害*
+
+
+
+
自然灾害具体情况描述
+ +
+
+
家庭是否遭受突发意外事件*
+
+
+
+
突发意外事件具体描述
+ +
+
+
家庭欠债金额*
+ +
+
+
家庭欠债原因
+ +
+
+
家庭人口数*
+ +
+
+
劳动力人口数*
+ +
+
+
家庭成员失业人数*
+ +
+
+
赡养人口数*
+ +
+
+
其他信息
+ +
+
+
是否特困供养*
+
+
+
+
其他*
+ +
+
+
家庭是否遭受疫情*
+
+
+
+
家庭遭受疫情具体情况描述
+ +
+
+
认定困难级别名称
+
+
+
+
认定时间
+ +
+
+
认定原因
+ +
+
+
班级认定意见
+ +
+
+
年级认定意见
+ +
+
+
附件
+
+
+
+@Html.AppendJsFile("/Areas/StudentWork/Views/FamilyEconomy/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormView.js new file mode 100644 index 000000000..d6ce5f346 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/FormView.js @@ -0,0 +1,142 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-16 17:18 + * 描 述:家庭经济信息(辅导员) + */ +var acceptClick; +var keyValue = request('keyValue'); +var Step = request('Step');//第几步 +var strWhere = "";//点击学号弹出框条件 +if (classs != "" && classs != undefined && classs != null) { + strWhere = " and classno in ('" + classs.replaceAll(",", "','") + "') "; +} +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.hide(); + page.bind(); + page.initData(); + }, + hide: function () { + if (Step == "2") {//第二步:二级学院审核,时附件显示且必填; + $('#FilesDiv').show(); + $('#Files').attr('isvalid', 'yes'); + $('#Files').attr('checkexpession', 'NotNull'); + $('#Files').prev().html('附件*'); + } else { + $('#Files').removeAttr('isvalid'); + $('#Files').removeAttr('checkexpession'); + $('#Files').prev().html('附件'); + $('#FilesDiv').hide(); + } + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); + $('#IdCardType').lrselectSet('01'); + //判断登录用户所带班级:学生弹框显示所带班级学生 + $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuno' }); + $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsDisabledChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsDisabled').lrDataItemSelect({ + code: 'YesOrNoBit', select: function(item) { + //“残疾类别”非必填项。若“本人是否残疾”项填“是”,则该项为必填。 + if (item != null && item.id == "true") { + $('#DisabledCategory').attr('isvalid', 'yes'); + $('#DisabledCategory').attr('checkexpession', 'NotNull'); + $('#DisabledCategory').prev().html('残疾类别*'); + } else { + $('#DisabledCategory').removeAttr('isvalid'); + $('#DisabledCategory').removeAttr('checkexpession'); + $('#DisabledCategory').prev().html('残疾类别'); + } + } + }); + $('#DisabledCategory').lrDataItemSelect({ code: 'DisabledCategory' }); + $('#IsParentsLoseWork').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsSeriouslyIllPatientInHome').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsOvercomePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsUnstablePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsEdgePovertyFamilyStudent').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsEdgeAcuteDifficultyStudent').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsLowIncomeFamily').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IsMartyrChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#FamilyIncomeSourceCategory').lrDataItemSelect({ code: 'FamilyIncomeSourceCategory' }); + $('#FamilyIsSufferNaturalDisaster').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#FamilyIsSufferUnexpectEvent').lrDataItemSelect({ + code: 'YesOrNoBit', select: function (item) { + //“突发意外事件具体描述”非必填项。若“家庭是否遭受突然意外事件”项填“是”,则该项为必填项。 + if (item != null && item.id == "true") { + $('#SufferUnexpectEventDescription').attr('isvalid', 'yes'); + $('#SufferUnexpectEventDescription').attr('checkexpession', 'NotNull'); + $('#SufferUnexpectEventDescription').prev().html('突发意外事件具体描述*'); + } else { + $('#SufferUnexpectEventDescription').removeAttr('isvalid'); + $('#SufferUnexpectEventDescription').removeAttr('checkexpession'); + $('#SufferUnexpectEventDescription').prev().html('突发意外事件具体描述'); + } + } + }); + $('#IsSpecialPovertySupport').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#FamilyIsSufferEpidemic').lrDataItemSelect({ code: 'YesOrNoBit' }); + $('#IdentifyDifficultyLevel').lrDataItemSelect({ code: 'DifficultyLevel' }); + //“家庭遭受疫情具体情况描述”该项如果填写,则“认定时间”、“认定原因”、“认定困难级别名称”也必须同时填写且同时通过校验 + $('#SufferEpidemicDescription').on('blur', function () { + if ($(this).val().trim() != null && $(this).val().trim() != undefined && $(this).val().trim() != "") { + $('#IdentifyDifficultyLevel').attr('isvalid', 'yes'); + $('#IdentifyDifficultyLevel').attr('checkexpession', 'NotNull'); + $('#IdentifyDifficultyLevel').prev().html('认定困难级别名称*'); + $('#IdentifyTime').attr('isvalid', 'yes'); + $('#IdentifyTime').attr('checkexpession', 'NotNull'); + $('#IdentifyTime').prev().html('认定时间*'); + $('#IdentifyReason').attr('checkexpession', 'LenStr'); + $('#IdentifyReason').prev().html('认定原因*'); + } else { + $('#IdentifyDifficultyLevel').removeAttr('isvalid'); + $('#IdentifyDifficultyLevel').removeAttr('checkexpession'); + $('#IdentifyDifficultyLevel').prev().html('认定困难级别名称'); + $('#IdentifyTime').removeAttr('isvalid'); + $('#IdentifyTime').removeAttr('checkexpession'); + $('#IdentifyTime').prev().html('认定时间'); + $('#IdentifyReason').attr('checkexpession', 'LenStrOrNull'); + $('#IdentifyReason').prev().html('认定原因'); + } + }); + $('#Files').lrUploader({ isUpload: false }); + + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + //判断:“是否单亲家庭子女”不能同时与“是否孤儿”同时填“是” + if ($('#IsOrphan').lrselectGet().toLowerCase() == "true") { + if ($('#IsSingleFamilyChildren').lrselectGet().toLowerCase() == "true") { + learun.alert.warning("“是否单亲家庭子女”不能同时与“是否孤儿”同时填“是”"); + return false; + } + } + if (!$('#form').lrValidform()) { + return false; + } + + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.cshtml index d78e7afa5..e7b18b595 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.cshtml @@ -26,8 +26,8 @@
-
院校
-
+
院系
+
班级
@@ -110,6 +110,7 @@  新增  编辑  删除 +  查看
 提交二级学院 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.js index 8f55fd451..7de7c8e8e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/Index.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -46,8 +46,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 450, 600); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); - $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); @@ -141,6 +161,21 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormView?keyValue=' + keyValue, + width: 1100, + height: 800, + btn:null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -149,20 +184,20 @@ var bootstrap = function ($, learun) { { label: '学号', name: 'StuNo', width: 100, align: "left" }, { label: '姓名', name: 'StuName', width: 150, align: "left" }, { - label: '院校', name: 'F_SchoolId', width: 120, align: "left", + label: '院系', name: 'DeptNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', key: value, - keyId: 'f_companyid', + keyId: 'deptno', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['deptname']); } }); } }, { - label: '班级', name: 'ClassNo', width: 100, align: "left", + label: '班级', name: 'ClassNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -177,7 +212,7 @@ var bootstrap = function ($, learun) { { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -410,11 +445,15 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'CreateTime desc' }); + page.search(); }, search: function (param) { param = param || {}; param.StartTime = startTime; param.EndTime = endTime; + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.CreateUserNo = learun.clientdata.get(['userinfo']).account;//辅导员 + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml index 8deea20ab..d20e96f20 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.cshtml @@ -26,8 +26,8 @@
-
院校
-
+
院系
+
班级
@@ -105,6 +105,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js index ebb975ad3..558341bb3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfStudent.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -46,8 +46,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 450, 600); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); - $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); @@ -69,6 +89,21 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormView?keyValue=' + keyValue, + width: 1100, + height: 800, + btn: null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -77,20 +112,20 @@ var bootstrap = function ($, learun) { { label: '学号', name: 'StuNo', width: 100, align: "left" }, { label: '姓名', name: 'StuName', width: 150, align: "left" }, { - label: '院校', name: 'F_SchoolId', width: 120, align: "left", + label: '院系', name: 'DeptNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', key: value, - keyId: 'f_companyid', + keyId: 'deptno', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['deptname']); } }); } }, { - label: '班级', name: 'ClassNo', width: 100, align: "left", + label: '班级', name: 'ClassNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -105,7 +140,7 @@ var bootstrap = function ($, learun) { { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -338,12 +373,16 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'SubmitTime desc' }); + page.search(); }, search: function (param) { param = param || {}; param.StartTime = startTime; param.EndTime = endTime; - param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 + if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { + param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 + param.Status = 3; + } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.cshtml index 4f2e38314..18d1aa76b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.cshtml @@ -26,8 +26,8 @@
-
院校
-
+
院系
+
班级
@@ -111,6 +111,10 @@  退回辅导员  退回二级学院
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.js index 9d08a0c17..0f80ca540 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfThree.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -46,8 +46,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 450, 600); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); - $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); @@ -123,6 +143,39 @@ var bootstrap = function ($, learun) { }); } }); + // 取消归档 + $('#lr_submitCancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "3") { + learun.alert.warning("当前项不属于归档状态,无法取消归档!"); + return false; + } + learun.layerConfirm('是否确认取消归档该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/StudentWork/FamilyEconomy/DoBack', { keyValue: keyValue, status: '2', step: '3' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormView?Step=2&keyValue=' + keyValue, + width: 1100, + height: 800, + btn: null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -131,20 +184,20 @@ var bootstrap = function ($, learun) { { label: '学号', name: 'StuNo', width: 100, align: "left" }, { label: '姓名', name: 'StuName', width: 150, align: "left" }, { - label: '院校', name: 'F_SchoolId', width: 120, align: "left", + label: '院系', name: 'DeptNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', key: value, - keyId: 'f_companyid', + keyId: 'deptno', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['deptname']); } }); } }, { - label: '班级', name: 'ClassNo', width: 100, align: "left", + label: '班级', name: 'ClassNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -159,7 +212,7 @@ var bootstrap = function ($, learun) { { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -392,6 +445,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'FirstCheckTime desc' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.cshtml index ecf3ca08a..0cc8d8357 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.cshtml @@ -26,8 +26,8 @@
-
院校
-
+
院系
+
班级
@@ -107,7 +107,8 @@
 提交学工部 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.js index f850ee738..7f275a92f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/FamilyEconomy/IndexOfTwo.js @@ -36,7 +36,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '-1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -46,8 +46,28 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 450, 600); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); - $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + if (!!item) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "deptno='" + item.deptno + "' order by classno " }, + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + }); + } + } + }); + $('#ClassNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: "1=1 order by classno " }, + value: "classno", + text: "classname" + }); $('#IsLowIncome').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsOrphan').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#IsSingleFamilyChildren').lrDataItemSelect({ code: 'YesOrNoBit' }); @@ -81,7 +101,7 @@ var bootstrap = function ($, learun) { } learun.layerForm({ id: 'formOfTwo', - title: '审核', + title: '上传附件', url: top.$.rootUrl + '/StudentWork/FamilyEconomy/Form?Step=2&keyValue=' + keyValue, width: 1100, height: 800, @@ -127,6 +147,21 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/StudentWork/FamilyEconomy/FormView?Step=2&keyValue=' + keyValue, + width: 1100, + height: 800, + btn: null + }); + } + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -135,20 +170,20 @@ var bootstrap = function ($, learun) { { label: '学号', name: 'StuNo', width: 100, align: "left" }, { label: '姓名', name: 'StuName', width: 150, align: "left" }, { - label: '院校', name: 'F_SchoolId', width: 120, align: "left", + label: '院系', name: 'DeptNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', key: value, - keyId: 'f_companyid', + keyId: 'deptno', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['deptname']); } }); } }, { - label: '班级', name: 'ClassNo', width: 100, align: "left", + label: '班级', name: 'ClassNo', width: 120, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', @@ -163,7 +198,7 @@ var bootstrap = function ($, learun) { { label: '身份证件类型', name: 'IdCardType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { - key: value, + key: (value == null || value == "" || value == undefined) ? "01" : value, code: 'IdCardType', callback: function (_data) { callback(_data.text); @@ -396,6 +431,7 @@ var bootstrap = function ($, learun) { isPage: true, sidx: 'SubmitTime desc' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/AssFixAssetsImport.xls b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/AssFixAssetsImport.xls new file mode 100644 index 000000000..9fefd8689 Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/AssFixAssetsImport.xls differ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index f47e7bfed..f345c635c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -502,7 +502,7 @@ namespace Learun.Application.Web.Controllers /// [HttpPost] [AjaxOnly] - [HandlerValidateAntiForgeryToken] + //[HandlerValidateAntiForgeryToken] public ActionResult CheckLogin(string username, string password, string verifycode, string up) { 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 19d35088b..924eee613 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 @@ -884,6 +884,7 @@ + @@ -956,6 +957,12 @@ + + + + + + @@ -999,10 +1006,12 @@ + + @@ -1710,6 +1719,7 @@ + @@ -6761,6 +6771,10 @@ + + + + @@ -8163,6 +8177,15 @@ + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index 24bc003ef..15466786c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -39,6 +39,7 @@ + @@ -89,6 +90,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.cs new file mode 100644 index 000000000..68466b799 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineMap : EntityTypeConfiguration + { + public LessonInfoOfElectiveOnlineMap() + { + #region 表、主键 + //表 + this.ToTable("LESSONINFOOFELECTIVEONLINE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + 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 a7bca05f1..55da82aa7 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 @@ -615,6 +615,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsBLL.cs index caa6dff4f..95db15d63 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsBLL.cs @@ -91,6 +91,30 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } + /// + /// 获取主表实体数据 + /// + /// 资产编号 + /// + public Ass_FixAssetsEntity GetEntityByCode(string code) + { + try + { + return ass_FixAssetsService.GetEntityByCode(code); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 @@ -142,6 +166,64 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } + /// + /// 修改审批状态 + /// + /// + /// + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + ass_FixAssetsService.ChangeStatusById(keyValue, status, processId); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + + /// + /// 修改审批状态 + /// + /// + /// + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + ass_FixAssetsService.ChangeStatusByProcessId(processId, status); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + + /// + /// 导入 + /// + /// + /// + /// + public string AssFixAssetsImport(DataTable dt, string fileId) + { + try + { + return ass_FixAssetsService.AssFixAssetsImport(dt, fileId); + } + 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/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs index e9c5005bb..5aca0cd43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs @@ -229,6 +229,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem ///
[Column("PROCESSID")] public string ProcessId { get; set; } + /// + /// 自动更新已提折旧月数时间 + /// + [Column("AUTOUPDATETIME")] + public DateTime? AutoUpdateTime { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsIBLL.cs index 700b6c243..2572330d8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsIBLL.cs @@ -34,6 +34,13 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// 流程实例ID /// Ass_FixAssetsEntity GetEntityByProcessId(string processId); + + /// + /// 获取主表实体数据 + /// + /// 资产编号 + /// + Ass_FixAssetsEntity GetEntityByCode(string code); #endregion #region 提交数据 @@ -49,6 +56,26 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// 主键 /// 实体 void SaveEntity(string keyValue, Ass_FixAssetsEntity entity); + /// + /// 修改审批状态 + /// + /// + /// + void ChangeStatusById(string keyValue, int status, string processId); + /// + /// 修改审批状态 + /// + /// + /// + void ChangeStatusByProcessId(string processId, int status); + + /// + /// 固定资产导入 + /// + /// + /// + /// + string AssFixAssetsImport(DataTable dt, string fileId); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs index 82ddd8beb..c4e94b75a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs @@ -1,9 +1,14 @@ using Dapper; +using Learun.Application.Base.SystemModule; +using Learun.Application.Organization; +using Learun.Cache.Base; +using Learun.Cache.Factory; using Learun.DataBase.Repository; using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.AssetManagementSystem @@ -17,6 +22,9 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem ///
public class Ass_FixAssetsService : RepositoryFactory { + private DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); + private DataItemIBLL dataItemIBLL = new DataItemBLL(); + #region 获取数据 /// @@ -48,42 +56,42 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } if (!queryParam["ATGId"].IsEmpty()) { - dp.Add("ATGId",queryParam["ATGId"].ToString(), DbType.String); + dp.Add("ATGId", queryParam["ATGId"].ToString(), DbType.String); strSql.Append(" AND t.ATGId = @ATGId "); } if (!queryParam["ATId"].IsEmpty()) { - dp.Add("ATId",queryParam["ATId"].ToString(), DbType.String); + dp.Add("ATId", queryParam["ATId"].ToString(), DbType.String); strSql.Append(" AND t.ATId = @ATId "); } if (!queryParam["GetWay"].IsEmpty()) { - dp.Add("GetWay",queryParam["GetWay"].ToString(), DbType.String); + dp.Add("GetWay", queryParam["GetWay"].ToString(), DbType.String); strSql.Append(" AND t.GetWay = @GetWay "); } if (!queryParam["UseCondition"].IsEmpty()) { - dp.Add("UseCondition",queryParam["UseCondition"].ToString(), DbType.String); + dp.Add("UseCondition", queryParam["UseCondition"].ToString(), DbType.String); strSql.Append(" AND t.UseCondition = @UseCondition "); } if (!queryParam["UseDepartment"].IsEmpty()) { - dp.Add("UseDepartment",queryParam["UseDepartment"].ToString(), DbType.String); + dp.Add("UseDepartment", queryParam["UseDepartment"].ToString(), DbType.String); strSql.Append(" AND t.UseDepartment = @UseDepartment "); } if (!queryParam["ManageDepartment"].IsEmpty()) { - dp.Add("ManageDepartment",queryParam["ManageDepartment"].ToString(), DbType.String); + dp.Add("ManageDepartment", queryParam["ManageDepartment"].ToString(), DbType.String); strSql.Append(" AND t.ManageDepartment = @ManageDepartment "); } if (!queryParam["UsePeople"].IsEmpty()) { - dp.Add("UsePeople",queryParam["UsePeople"].ToString(), DbType.String); + dp.Add("UsePeople", queryParam["UsePeople"].ToString(), DbType.String); strSql.Append(" AND t.UsePeople = @UsePeople "); } if (!queryParam["CardStatus"].IsEmpty()) { - dp.Add("CardStatus",queryParam["CardStatus"].ToString(), DbType.String); + dp.Add("CardStatus", queryParam["CardStatus"].ToString(), DbType.String); strSql.Append(" AND t.CardStatus = @CardStatus "); } if (!queryParam["PurchaseOrganizationForm"].IsEmpty()) @@ -93,15 +101,32 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } if (!queryParam["StorageId"].IsEmpty()) { - dp.Add("StorageId",queryParam["StorageId"].ToString(), DbType.String); + dp.Add("StorageId", queryParam["StorageId"].ToString(), DbType.String); strSql.Append(" AND t.StorageId = @StorageId "); } if (!queryParam["DepreciationStatus"].IsEmpty()) { - dp.Add("DepreciationStatus",queryParam["DepreciationStatus"].ToString(), DbType.String); + dp.Add("DepreciationStatus", queryParam["DepreciationStatus"].ToString(), DbType.String); strSql.Append(" AND t.DepreciationStatus = @DepreciationStatus "); } - return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + + //判断是否是普通教师的列表:若是,则二级判断;若不是,则无; + //二级判断登录用户是否是部门负责人:若是,则使用部门=本部门,或者使用人=本人;若不是,则使用人=本人; + if (!queryParam["IsTeacher"].IsEmpty() && queryParam["IsTeacher"].ToString() == "1") + { + var departmentList = this.BaseRepository().FindList($"select * from LR_Base_Department where F_DeleteMark=0 and F_EnabledMark=1 and F_Manager='{LoginUserInfo.Get().userId}' "); + if (departmentList.Any()) + { + var departmentIds = departmentList.Select(x => x.F_DepartmentId).ToArray(); + strSql.Append($" AND (t.UseDepartment in ('{string.Join("','", departmentIds)}') or t.UsePeople='{LoginUserInfo.Get().userId}' )"); + } + else + { + strSql.Append($" AND t.UsePeople='{LoginUserInfo.Get().userId}' "); + } + } + + return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -149,7 +174,31 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - return this.BaseRepository().FindEntity(t=>t.ProcessId == processId); + return this.BaseRepository().FindEntity(t => t.ProcessId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 资产编号 + /// + public Ass_FixAssetsEntity GetEntityByCode(string code) + { + try + { + return this.BaseRepository().FindEntity(t => t.FACode == code); } catch (Exception ex) { @@ -176,7 +225,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - this.BaseRepository().Delete(t=>t.FAId == keyValue); + this.BaseRepository().Delete(t => t.FAId == keyValue); } catch (Exception ex) { @@ -225,7 +274,317 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } + /// + /// 修改审批状态 + /// + /// + /// + public void ChangeStatusById(string keyValue, int status, string processId) + { + try + { + this.BaseRepository().ExecuteBySql("update Ass_FixAssets set Status=" + status + ",ProcessId='" + processId + "',SubmitTime='" + DateTime.Now + "',SubmitUserId='" + LoginUserInfo.Get().userId + "' where FAId='" + keyValue + "'", null); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + + /// + /// 修改审批状态 + /// + /// + /// + public void ChangeStatusByProcessId(string processId, int status) + { + try + { + this.BaseRepository().ExecuteBySql("update Ass_FixAssets set Status=" + status + " where ProcessId='" + processId + "'", null); + } + catch (Exception ex) + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + + #region 缓存定义 + private ICache cache = CacheFactory.CaChe(); + private string cacheKey = "Learun_adms_excelError_"; // +公司主键 #endregion + /// + /// 导入 + /// + /// + /// + /// + public string AssFixAssetsImport(DataTable dt, string fileId) + { + try + { + int snum = 0; + int fnum = 0; + if (dt.Rows.Count > 0) + { + DataTable failDt = new DataTable(); + dt.Columns.Add("导入错误", typeof(string)); + foreach (DataColumn dc in dt.Columns) + { + failDt.Columns.Add(dc.ColumnName, dc.DataType); + } + var db = this.BaseRepository().BeginTrans(); + + IEnumerable Ass_FixAssetsHistory = db.FindList("select * from Ass_FixAssets"); + List Ass_FixAssetsinsert = new List(); + + // 循环遍历导入 + foreach (DataRow dr in dt.Rows) + { + try + { + #region 必填项空验证 + if (dr["资产编号"].ToString().IsEmpty()) + { + throw (new Exception("资产编号不能为空")); + } + if (dr["资产名称"].ToString().IsEmpty()) + { + throw (new Exception("资产名称不能为空")); + } + if (dr["资产国标大类"].ToString().IsEmpty()) + { + throw (new Exception("资产国标大类不能为空")); + } + if (dr["资产分类"].ToString().IsEmpty()) + { + throw (new Exception("资产分类不能为空")); + } + if (dr["财务入账日期"].ToString().IsEmpty()) + { + throw (new Exception("财务入账日期不能为空")); + } + if (dr["价值类型"].ToString().IsEmpty()) + { + throw (new Exception("价值类型不能为空")); + } + if (dr["价值"].ToString().IsEmpty()) + { + throw (new Exception("价值不能为空")); + } + if (dr["取得方式"].ToString().IsEmpty()) + { + throw (new Exception("取得方式不能为空")); + } + if (dr["取得日期"].ToString().IsEmpty()) + { + throw (new Exception("取得日期不能为空")); + } + if (dr["使用状况"].ToString().IsEmpty()) + { + throw (new Exception("使用状况不能为空")); + } + if (dr["使用部门"].ToString().IsEmpty()) + { + throw (new Exception("使用部门不能为空")); + } + if (dr["管理部门"].ToString().IsEmpty()) + { + throw (new Exception("使用人不能为空")); + } + if (dr["使用人"].ToString().IsEmpty()) + { + throw (new Exception("使用人不能为空")); + } + if (dr["数量"].ToString().IsEmpty()) + { + throw (new Exception("数量不能为空")); + } + if (dr["制单人"].ToString().IsEmpty()) + { + throw (new Exception("制单人不能为空")); + } + if (dr["制单时间"].ToString().IsEmpty()) + { + throw (new Exception("制单时间不能为空")); + } + if (dr["所属单位"].ToString().IsEmpty()) + { + throw (new Exception("卡片状态不能为空")); + } + if (dr["卡片状态"].ToString().IsEmpty()) + { + throw (new Exception("卡片状态不能为空")); + } + if (dr["折旧年限"].ToString().IsEmpty()) + { + throw (new Exception("折旧年限不能为空")); + } + if (dr["累计折旧"].ToString().IsEmpty()) + { + throw (new Exception("累计折旧不能为空")); + } + if (dr["已提折旧月数"].ToString().IsEmpty()) + { + throw (new Exception("已提折旧月数不能为空")); + } + if (dr["月折旧额"].ToString().IsEmpty()) + { + throw (new Exception("月折旧额不能为空")); + } + if (dr["折旧方法"].ToString().IsEmpty()) + { + throw (new Exception("折旧方法不能为空")); + } + if (dr["净值"].ToString().IsEmpty()) + { + throw (new Exception("净值不能为空")); + } + if (dr["存放地点"].ToString().IsEmpty()) + { + throw (new Exception("存放地点不能为空")); + } + if (dr["使用权面积/建筑面积"].ToString().IsEmpty()) + { + throw (new Exception("使用权面积/建筑面积不能为空")); + } + if (dr["财政拨款"].ToString().IsEmpty()) + { + throw (new Exception("财政拨款不能为空")); + } + if (dr["非财政拨款"].ToString().IsEmpty()) + { + throw (new Exception("非财政拨款不能为空")); + } + if (dr["会计凭证号"].ToString().IsEmpty()) + { + throw (new Exception("会计凭证号不能为空")); + } + if (dr["折旧/摊销状态"].ToString().IsEmpty()) + { + throw (new Exception("折旧/摊销状态不能为空")); + } + #endregion + //判断资产编号是否重复 + if (Ass_FixAssetsHistory.Count(x => x.FACode == dr["资产编号"].ToString() && x.Status != 0) > 0) + { + throw (new Exception("资产编号已存在,并已审核,不可替换")); + } + if (Ass_FixAssetsinsert.Count(s => s.FACode == dr["资产编号"].ToString()) > 0) + { + throw (new Exception("导入数据中资产编号重复")); + } + + //写入要导入替换的数据 + Ass_FixAssetsEntity Ass_FixAssetsEntity = new Ass_FixAssetsEntity + { + FAId = Guid.NewGuid().ToString(), + FACode = dr["资产编号"].ToString(), + ATGId = dataSourceIBLL.GetKeyByValue("Ass_AssetsType", "aname", dr["资产国标大类"].ToString(), "atid"), + ATId = dataSourceIBLL.GetKeyByValue("Ass_AssetsType", "aname", dr["资产分类"].ToString(), "atid"), + FAName = dr["资产名称"].ToString(), + FinanceEntryDate = Convert.ToDateTime(dr["财务入账日期"]), + ValueType = FindDataItemValue(dataItemIBLL.GetDetailList("ValueType"), dr["价值类型"].ToString(), "价值类型", false), + Value = dr["价值"].ToDecimal(), + GetWay = FindDataItemValue(dataItemIBLL.GetDetailList("GetWay"), dr["取得方式"].ToString(), "取得方式", false), + GetDate = Convert.ToDateTime(dr["取得日期"]), + UseCondition = FindDataItemValue(dataItemIBLL.GetDetailList("AssState"), dr["使用状况"].ToString(), "使用状况", false), + UseDepartment = dataSourceIBLL.GetKeyByValue("classdata", "name", dr["使用部门"].ToString(), "id"), + ManageDepartment = dataSourceIBLL.GetKeyByValue("classdata", "name", dr["管理部门"].ToString(), "id"), + UsePeople = dataSourceIBLL.GetKeyByValue("teacheruserdata", "f_realname", dr["使用人"].ToString(), "f_userid"), + Amount = dr["数量"].ToInt(), + MakePeople = dr["制单人"].ToString(), + MakeDate = Convert.ToDateTime(dr["制单时间"]), + Unit = dataSourceIBLL.GetKeyByValue("company", "f_fullname", dr["所属单位"].ToString(), "f_companyid"), + CardStatus = FindDataItemValue(dataItemIBLL.GetDetailList("CardStatus"), dr["卡片状态"].ToString(), "卡片状态", false), + DepreciationLife = dr["折旧年限"].ToInt(), + AccumulatedDepreciation = dr["累计折旧"].ToDecimal(), + HaveDepreciationMonths = dr["已提折旧月数"].ToInt(), + MonthlyDepreciation = dr["月折旧额"].ToDecimal(), + DepreciationMothod = FindDataItemValue(dataItemIBLL.GetDetailList("DepreciationMothod"), dr["折旧方法"].ToString(), "折旧方法", false), + NetValue = dr["净值"].ToDecimal(), + PurchaseOrganizationForm = dr["采购组织形式"].ToString(), + Brand = dr["品牌"].ToString(), + SpecificationModel = dr["规格型号"].ToString(), + StorageId = dataSourceIBLL.GetKeyByValue("Ass_StorageData", "sname", dr["存放地点"].ToString(), "sid"), + SupplierId = dataSourceIBLL.GetKeyByValue("Ass_SupplierData", "sname", dr["销售商"].ToString(), "sid"), + UseArea = dr["使用权面积/建筑面积"].ToDecimal(), + FinancialAppropriation = dr["财政拨款"].ToDecimal(), + NonFinancialAppropriation = dr["非财政拨款"].ToDecimal(), + AccountDocumentNumber = dr["会计凭证号"].ToString(), + DepreciationStatus = FindDataItemValue(dataItemIBLL.GetDetailList("DepreciationStatus"), dr["折旧/摊销状态"].ToString(), "折旧/摊销状态", false), + + //默认数据 + CreateTime = DateTime.Now, + CreateUserId = LoginUserInfo.Get().userId, + ModifyTime = DateTime.Now, + ModifyUserId = LoginUserInfo.Get().userId, + Status = 0, + ProcessId = Guid.NewGuid().ToString(), + }; + + Ass_FixAssetsinsert.Add(Ass_FixAssetsEntity); + var FACode = dr["资产编号"].ToString(); + db.Delete(x => x.FACode == FACode && x.Status == 0); + snum++; + } + catch (Exception ex) + { + fnum++; + dr["导入错误"] = ex.Message; + failDt.Rows.Add(dr.ItemArray); + } + } + //执行导入 + db.Insert(Ass_FixAssetsinsert); + db.Commit(); + if (failDt.Rows.Count > 0) + { + string errordt = failDt.ToJson(); + cache.Write(cacheKey + fileId, errordt, CacheId.excel); + } + } + return snum + "|" + fnum; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + /// + /// 数据字典查找Value + /// + /// 数据字典数据 + /// 项目名 + /// 列名 + /// + private string FindDataItemValue(List dataItemList, string itemName, string colName, bool IsMandatory) + { + DataItemDetailEntity dataItem = dataItemList.Find(t => t.F_ItemName == itemName); + if (dataItem != null) + { + return dataItem.F_ItemValue; + } + else + { + if (IsMandatory) + { + throw (new Exception("【" + colName + "】数据字典找不到对应值")); + } + else + { + return ""; + } + } + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyEntity.cs index 2b86afa76..f6a2d0bab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyEntity.cs @@ -22,6 +22,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// /// 资产编号 /// + [Column("FAID")] + public string FAId { get; set; } + /// + /// 资产编号 + /// [Column("FACODE")] public string FACode { get; set; } /// @@ -109,6 +114,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// [Column("PROCESSID")] public string ProcessId { get; set; } + [Column("DEPARTMENT")] + public string Department { get; set; } + [Column("ASSETSMANAGEMENT")] + public string AssetsManagement { get; set; } + [Column("ISMARK")] + public int? IsMark { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyService.cs index 797dcdad1..7ffc1ba98 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyService.cs @@ -63,17 +63,21 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem dp.Add("StorageId", queryParam["StorageId"].ToString(), DbType.String); strSql.Append(" AND t.StorageId = @StorageId "); } - if (!queryParam["CardNumber"].IsEmpty()) + if (!queryParam["FACode"].IsEmpty()) { - dp.Add("CardNumber", "%" + queryParam["CardNumber"].ToString() + "%", DbType.String); - strSql.Append(" AND t.CardNumber Like @CardNumber "); + dp.Add("FACode", "%" + queryParam["FACode"].ToString() + "%", DbType.String); + strSql.Append(" AND t.FACode Like @FACode "); } if (!queryParam["FAName"].IsEmpty()) { dp.Add("FAName", "%" + queryParam["FAName"].ToString() + "%", DbType.String); strSql.Append(" AND t.FAName Like @FAName "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -97,7 +101,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + return this.BaseRepository().FindEntity(keyValue); } catch (Exception ex) { @@ -121,7 +125,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId); + return this.BaseRepository().FindEntity(t => t.ProcessId == processId); } catch (Exception ex) { @@ -148,7 +152,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem { try { - this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); + this.BaseRepository().Delete(t => t.ID == keyValue); } catch (Exception ex) { @@ -176,12 +180,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); - this.BaseRepository("CollegeMIS").Update(entity); + this.BaseRepository().Update(entity); } else { entity.Create(); - this.BaseRepository("CollegeMIS").Insert(entity); + this.BaseRepository().Insert(entity); } } catch (Exception ex) @@ -234,6 +238,13 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var entity = this.BaseRepository().FindEntity(a => a.ProcessId == processId); entity.Status = pastatus; this.BaseRepository().Update(entity); + if (pastatus == 2) + { + var Ass_FixAssetsentity = this.BaseRepository().FindEntity(x => x.FAId == entity.FAId); + Ass_FixAssetsentity.UsePeople = entity.UsePeople; + Ass_FixAssetsentity.StorageId = entity.StorageIdNew; + this.BaseRepository().Update(Ass_FixAssetsentity); + } } catch (Exception e) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptEntity.cs index cf8bbe651..430f7a81d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptEntity.cs @@ -77,6 +77,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("SYNCFLAG")] public bool? SyncFlag { get; set; } + /// + /// 资助审核人 + /// + [Column("DEPTSUBSIDIZER")] + public string DeptSubsidizer { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs index 27ca50651..06988eb79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs @@ -81,13 +81,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration empSql += $@" and EPLId = T.EPLId FOR XML PATH('') ), 1, 1, '') AS empno FROM Exam_ExamPlanRoom AS T where EPLId ='{queryParam["EPLId"].ToString()}'"; var obj = this.BaseRepository("CollegeMIS").FindList(empSql).Select(x => x.EmpNo).Distinct().ToList(); - if (!string.IsNullOrEmpty(obj[0])) + if (obj.Count() > 0) { - //if (obj[0].IsEmpty()) - //{ var empNo = string.Join("','", obj[0].ToString().Split(',').Distinct()); strSql.Append($" AND t.EmpNo not in ('{empNo}')"); - //} } //筛选掉考试时间冲突的老师和专业课的代课老师 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs new file mode 100644 index 000000000..d9fa9559c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs @@ -0,0 +1,153 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineBLL : LessonInfoOfElectiveOnlineIBLL + { + private LessonInfoOfElectiveOnlineService lessonInfoOfElectiveOnlineService = new LessonInfoOfElectiveOnlineService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return lessonInfoOfElectiveOnlineService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue) + { + try + { + return lessonInfoOfElectiveOnlineService.GetLessonInfoOfElectiveOnlineEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + lessonInfoOfElectiveOnlineService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, LessonInfoOfElectiveOnlineEntity entity) + { + try + { + lessonInfoOfElectiveOnlineService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + public void DoLock(string keyValue, string status) + { + try + { + lessonInfoOfElectiveOnlineService.DoLock(keyValue, 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/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs new file mode 100644 index 000000000..7c2a43aa7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs @@ -0,0 +1,275 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// MakeDate + /// + [Column("MAKEDATE")] + public DateTime? MakeDate { get; set; } + /// + /// AcademicYearNo + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// LessonNo + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// PartCode + /// + [Column("PARTCODE")] + public string PartCode { get; set; } + /// + /// LessonName + /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// + /// LessonSortNo + /// + [Column("LESSONSORTNO")] + public string LessonSortNo { get; set; } + /// + /// LessonSortDetailNo + /// + [Column("LESSONSORTDETAILNO")] + public string LessonSortDetailNo { get; set; } + /// + /// LessonSection + /// + [Column("LESSONSECTION")] + public string LessonSection { get; set; } + /// + /// LessonTime + /// + [Column("LESSONTIME")] + public string LessonTime { get; set; } + /// + /// StudyScore + /// + [Column("STUDYSCORE")] + public decimal? StudyScore { get; set; } + /// + /// StartWeek + /// + [Column("STARTWEEK")] + public int? StartWeek { get; set; } + /// + /// EndWeek + /// + [Column("ENDWEEK")] + public int? EndWeek { get; set; } + /// + /// StartDate + /// + [Column("STARTDATE")] + public DateTime? StartDate { get; set; } + /// + /// EndDate + /// + [Column("ENDDATE")] + public DateTime? EndDate { get; set; } + /// + /// CheckStyleNo + /// + [Column("CHECKSTYLENO")] + public string CheckStyleNo { get; set; } + /// + /// ScoreRecordStyleNo + /// + [Column("SCORERECORDSTYLENO")] + public string ScoreRecordStyleNo { get; set; } + /// + /// EmpNo + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// EmpName + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// ClassRoomNo + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// CheckMark + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + /// + /// StuNumMax + /// + [Column("STUNUMMAX")] + public int? StuNumMax { get; set; } + /// + /// StuNum + /// + [Column("STUNUM")] + public int? StuNum { get; set; } + /// + /// ModifyTime + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { get; set; } + /// + /// ModifyUserId + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// ModifyUserName + /// + [Column("MODIFYUSERNAME")] + public string ModifyUserName { get; set; } + /// + /// F_SchoolId + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + /// + /// TeachMajorNo + /// + [Column("TEACHMAJORNO")] + public string TeachMajorNo { get; set; } + /// + /// OrdinaryScoreScale + /// + [Column("ORDINARYSCORESCALE")] + public decimal? OrdinaryScoreScale { get; set; } + /// + /// TermInScoreScale + /// + [Column("TERMINSCORESCALE")] + public decimal? TermInScoreScale { get; set; } + /// + /// TermEndScoreScale + /// + [Column("TERMENDSCORESCALE")] + public decimal? TermEndScoreScale { get; set; } + /// + /// OtherScoreScale + /// + [Column("OTHERSCORESCALE")] + public decimal? OtherScoreScale { get; set; } + /// + /// PracticeHour + /// + [Column("PRACTICEHOUR")] + public string PracticeHour { get; set; } + /// + /// HaveBeforeLesson + /// + [Column("HAVEBEFORELESSON")] + public string HaveBeforeLesson { get; set; } + /// + /// BeforeLesson + /// + [Column("BEFORELESSON")] + public string BeforeLesson { get; set; } + /// + /// IsAllowEdit + /// + [Column("ISALLOWEDIT")] + public bool? IsAllowEdit { get; set; } + /// + /// State + /// + [Column("STATE")] + public int? State { get; set; } + /// + /// ClassroomType + /// + [Column("CLASSROOMTYPE")] + public int? ClassroomType { get; set; } + /// + /// ClassroomPracticeType + /// + [Column("CLASSROOMPRACTICETYPE")] + public int? ClassroomPracticeType { get; set; } + /// + /// CheckMarkDept + /// + [Column("CHECKMARKDEPT")] + public string CheckMarkDept { get; set; } + /// + /// TeachingBookNo + /// + [Column("TEACHINGBOOKNO")] + public string TeachingBookNo { get; set; } + /// + /// TestMark + /// + [Column("TESTMARK")] + public int? TestMark { get; set; } + /// + /// StuSortNo + /// + [Column("STUSORTNO")] + public string StuSortNo { get; set; } + /// + /// 是否可选 + /// + [Column("ISALLOWSELECT")] + public int? IsAllowSelect { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.MakeDate = DateTime.Now; + this.CheckMark = "0";//停用 + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + this.ModifyTime = DateTime.Now; + this.ModifyUserId = LoginUserInfo.Get().userId; + this.ModifyUserName = LoginUserInfo.Get().realName; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs new file mode 100644 index 000000000..0dc23b21f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs @@ -0,0 +1,58 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public interface LessonInfoOfElectiveOnlineIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, LessonInfoOfElectiveOnlineEntity entity); + #endregion + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + void DoLock(string keyValue, string status); + + + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs new file mode 100644 index 000000000..1a3c1e19c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs @@ -0,0 +1,199 @@ +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.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM LessonInfoOfElectiveOnline t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LessonNo Like @LessonNo "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LessonName Like @LessonName "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["CheckMark"].IsEmpty()) + { + dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); + strSql.Append(" AND t.CheckMark = @CheckMark "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(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, LessonInfoOfElectiveOnlineEntity 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 + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + public void DoLock(string keyValue, string status) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update LessonInfoOfElectiveOnline set CheckMark='{status}' where Id='{keyValue}' "); + } + 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/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs index ea8d7a621..b2d558bb2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs @@ -85,8 +85,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { //不查看状态为草稿的记录 strSql.Append(" AND t.Status > 0 "); - //二级学院审核专员==系部负责人==登录用户 - strSql.Append($" and d.DeptDirector='{LoginUserInfo.Get().account}' "); + //二级学院审核专员==系部的资助审核人==登录用户,系统管理员除外 + if (LoginUserInfo.Get().account.ToLower() != "system") + { + strSql.Append($" and d.DeptSubsidizer='{LoginUserInfo.Get().account}' "); + } } if (!queryParam["Step"].IsEmpty() && queryParam["Step"].ToString() == "3")//第三步:学工部审核 { @@ -98,6 +101,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Status", queryParam["Status"].ToString(), DbType.String); strSql.Append(" AND t.Status = @Status "); } + if (!queryParam["CreateUserNo"].IsEmpty()) + { + dp.Add("CreateUserNo", queryParam["CreateUserNo"].ToString(), DbType.String); + strSql.Append(" AND t.CreateUserNo = @CreateUserNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); } catch (Exception ex) @@ -245,7 +253,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { this.BaseRepository("CollegeMIS").ExecuteBySql($"update SchoolLevelScholarship set FirstCheckTime='{DateTime.Now}',FirstCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); } - else if (step == "3")//第三步:退回辅导员、退回二级学院 + else if (step == "3")//第三步:退回辅导员、退回二级学院、取消归档 { this.BaseRepository("CollegeMIS").ExecuteBySql($"update SchoolLevelScholarship set SecondCheckTime='{DateTime.Now}',SecondCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs index a8152800f..a0225a3b4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuFellowship/StuFellowshipService.cs @@ -75,7 +75,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - + if (!queryParam["Types"].IsEmpty())//助学金类型:1国家助学金,2校级助学金 { dp.Add("Types", queryParam["Types"].ToString(), DbType.String); @@ -132,8 +132,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { //不查看状态为草稿的记录 strSql.Append(" AND t.Status > 0 "); - //二级学院审核专员==系部负责人==登录用户 - strSql.Append($" and d.DeptDirector='{LoginUserInfo.Get().account}' "); + //二级学院审核专员==系部的资助审核人==登录用户,系统管理员除外 + if (LoginUserInfo.Get().account.ToLower() != "system") + { + strSql.Append($" and d.DeptSubsidizer='{LoginUserInfo.Get().account}' "); + } } if (!queryParam["Step"].IsEmpty() && queryParam["Step"].ToString() == "3")//第三步:学工部审核 { @@ -145,6 +148,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Status", queryParam["Status"].ToString(), DbType.String); strSql.Append(" AND t.Status = @Status "); } + if (!queryParam["CreateUserNo"].IsEmpty()) + { + dp.Add("CreateUserNo", queryParam["CreateUserNo"].ToString(), DbType.String); + strSql.Append(" AND t.CreateUserNo = @CreateUserNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -293,7 +301,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuFellowship set FirstCheckTime='{DateTime.Now}',FirstCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); } - else if (step == "3")//第三步:退回辅导员、退回二级学院 + else if (step == "3")//第三步:退回辅导员、退回二级学院、取消归档 { this.BaseRepository("CollegeMIS").ExecuteBySql($"update StuFellowship set SecondCheckTime='{DateTime.Now}',SecondCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); } 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 289ed801a..f53437c44 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 @@ -1883,6 +1883,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyEntity.cs index e83ecc81d..aca10e307 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyEntity.cs @@ -374,11 +374,11 @@ namespace Learun.Application.TwoDevelopment.StudentWork [NotMapped] public string StuName { get; set; } /// - /// 院校 + /// 院系 /// /// [NotMapped] - public string F_SchoolId { get; set; } + public string DeptNo { get; set; } /// /// 班级 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs index eb0327239..ffa057f94 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/FamilyEconomy/FamilyEconomyService.cs @@ -138,7 +138,7 @@ namespace Learun.Application.TwoDevelopment.StudentWork var dp = new DynamicParameters(new { }); var strSql = new StringBuilder(); - strSql.Append("SELECT t.*,s.StuName,s.F_SchoolId,s.ClassNo,s.IdentityCardNo "); + strSql.Append("SELECT t.*,s.StuName,s.DeptNo,s.ClassNo,s.IdentityCardNo "); strSql.Append(" FROM FamilyEconomy t "); strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo "); strSql.Append(" left join ClassInfo c on t.CreateUserNo=c.ClassTutorNo and s.ClassNo=c.ClassNo "); @@ -149,15 +149,15 @@ namespace Learun.Application.TwoDevelopment.StudentWork dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); strSql.Append(" AND t.StuNo like @StuNo "); } - if (!queryParam["F_SchoolId"].IsEmpty()) + if (!queryParam["DeptNo"].IsEmpty()) { - dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); - strSql.Append(" AND t.F_SchoolId = @F_SchoolId "); + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND s.DeptNo = @DeptNo "); } if (!queryParam["ClassNo"].IsEmpty()) { dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); - strSql.Append(" AND t.ClassNo = @ClassNo "); + strSql.Append(" AND s.ClassNo = @ClassNo "); } if (!queryParam["IsLowIncome"].IsEmpty()) { @@ -247,8 +247,11 @@ namespace Learun.Application.TwoDevelopment.StudentWork { //不查看状态为草稿的记录 strSql.Append(" AND t.Status > 0 "); - //二级学院审核专员==系部负责人==登录用户 - strSql.Append($" and d.DeptDirector='{LoginUserInfo.Get().account}' "); + //二级学院审核专员==系部的资助审核人==登录用户,系统管理员除外 + if (LoginUserInfo.Get().account.ToLower() != "system") + { + strSql.Append($" and d.DeptSubsidizer='{LoginUserInfo.Get().account}' "); + } } if (!queryParam["Step"].IsEmpty() && queryParam["Step"].ToString() == "3")//第三步:学工部审核 { @@ -260,6 +263,11 @@ namespace Learun.Application.TwoDevelopment.StudentWork dp.Add("Status", queryParam["Status"].ToString(), DbType.String); strSql.Append(" AND t.Status = @Status "); } + if (!queryParam["CreateUserNo"].IsEmpty()) + { + dp.Add("CreateUserNo", queryParam["CreateUserNo"].ToString(), DbType.String); + strSql.Append(" AND t.CreateUserNo = @CreateUserNo "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } @@ -407,7 +415,7 @@ namespace Learun.Application.TwoDevelopment.StudentWork { this.BaseRepository("CollegeMIS").ExecuteBySql($"update FamilyEconomy set FirstCheckTime='{DateTime.Now}',FirstCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); } - else if (step == "3")//第三步:退回辅导员、退回二级学院 + else if (step == "3")//第三步:退回辅导员、退回二级学院、取消归档 { this.BaseRepository("CollegeMIS").ExecuteBySql($"update FamilyEconomy set SecondCheckTime='{DateTime.Now}',SecondCheckUserId='{LoginUserInfo.Get().userId}',Status='{status}' where Id='{keyValue}' "); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj index 5b21f6490..a4c2ff42a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj @@ -95,6 +95,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs new file mode 100644 index 000000000..df962bcbf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Learun.Application.TwoDevelopment.AssetManagementSystem; + +namespace Learun.Application.WorkFlow +{ + public class Ass_FixAssetsMethod : IWorkFlowMethod + { + Ass_FixAssetsIBLL asset = new Ass_FixAssetsBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + asset.ChangeStatusByProcessId(parameter.processId, 2); + } + else + { + asset.ChangeStatusByProcessId(parameter.processId, 3); + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue index 671a8eb32..c39ddb445 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home.vue @@ -375,11 +375,18 @@ export default { id: item.F_Id, }).then((data) => { if (data && data.value) { - const { value } = data; + let { value } = data; + if(value&&value.length){ + value = value.sort((a,b)=>{ + return new Date(b.f_time).valueOf() - new Date(a.f_time).valueOf() + }) + } this.noticeData.push({ title: item.F_Name, + F_Sort:item.F_Sort, content: value, }); + this.noticeData = this.noticeData.sort((a,b)=>a.F_Sort - b.F_Sort) } }) ), diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config index 3c93e65ef..fcd31f727 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config @@ -5,9 +5,9 @@
- + - + diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj index eb413c8ba..ca9328004 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj @@ -20,6 +20,7 @@ + false publish\ true Disk @@ -32,7 +33,6 @@ true 0 1.0.0.%2a - false false true