diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs index 2202a05f2..49d6f0709 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs @@ -29,6 +29,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// + /// + /// + [HttpGet] + public ActionResult FormIndex() + { + return View(); + } + /// /// 表单页 /// /// @@ -119,6 +128,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { entity.State = 1; } + else if (entity.State == 1) + { + entity.State = 2; + } + if (string.IsNullOrEmpty(keyValue)) { } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml new file mode 100644 index 000000000..e0f819869 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "质量目标管理体系指标模块"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
核心工作模块
+ +
+
+
项目名称
+ +
+
+
填报周期
+
+
+
+
状态
+ +
+
+
填报人
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/FillinFrom/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js new file mode 100644 index 000000000..5d8695d6a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js @@ -0,0 +1,241 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-21 18:39 + * 描 述:质量目标管理体系指标模块 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle' }); + $('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/Form', + width: 500, + 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 State = $('#gridtable').jfGridValue('State'); + if (State !== 0) { + learun.alert.warning("当前项目已提交不能修改!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/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 State = $('#gridtable').jfGridValue('State'); + if (State !== 0) { + learun.alert.warning("当前项目已提交不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //撤回 + $('#lr_cancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var RStatus = $('#gridtable').jfGridValue('State'); + if (RStatus == 1) { + learun.alert.warning("已提交!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //设置公式 + $('#lr_formula').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var RStatus = $('#gridtable').jfGridValue('State'); + if (RStatus == 1) { + learun.alert.warning("已提交!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //设置填报人 + $('#lr_people').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var RStatus = $('#gridtable').jfGridValue('State'); + if (RStatus !== 1) { + learun.alert.warning("当前项不能设置填报人!"); + return false; + } + learun.layerForm({ + id: 'form', + title: '设置填报人', + url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/FormPeople?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + //隐藏撤下 + $('#lr_hide').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var RStatus = $('#gridtable').jfGridValue('State'); + if (RStatus == 1) { + learun.alert.warning("已提交!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Repair/DoSubmit', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/FillinFrom/GetPageList', + headData: [ + { label: "核心工作模块", name: "WorderModule", width: 300, align: "center" }, + { label: "序号", name: "SerialNo", width: 100, align: "center" }, + { label: "项目名称", name: "ProjectName", width: 300, align: "center" }, + { + label: "填报周期", name: "FillingCycle", width: 100, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'ThisCycle', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "填报时间", name: "FillingTime", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'CycleTime', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "填报部门", name: "FillingDept", width: 100, align: "center", + 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: "FillingPeople", width: 150, align: "center", + 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: "State", width: 150, align: "center", + formatter: function (cellvalue) { + if (cellvalue === 0) { + return '草稿'; + } else if (cellvalue === 1) { + return '待设置填报人'; + } else if (cellvalue === 2) { + return '待设置公式'; + } else { + return '已完成'; + } + } + }, + { label: "备注", name: "Demo", width: 300, align: "center" }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js index 788f0154b..dcb3a3885 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js @@ -15,7 +15,6 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - console.log($('#FillingDept').lrDataSourceSelect); $('#FillingDept').lrDataSourceSelect({ code: 'classdata', value: 'id', @@ -23,18 +22,16 @@ var bootstrap = function ($, learun) { select: function (item) { var DeptCode = $('#FillingDept').lrselectGet(); if (DeptCode != null && DeptCode != "" && DeptCode != undefined) { - $('#FillingPeople').lrDataSourceSelect({ + $('#FillingPeople').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=teacheruserdata', value: 'f_userid', text: 'f_realname', - param: { strWhere: " 1=1 and f_encode ='' " }, + param: { strWhere: " 1=1 and f_departmentid in ('" + DeptCode + "')" } }); } } - }); $("#FillingPeople").lrselect(); - $('#FillingPeople').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); //设置周期 $('#FillingCycle').lrDataItemSelect({ code: 'ThisCycle', 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 6b3cbb6d9..50faf9e4a 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 @@ -957,6 +957,7 @@ + @@ -7319,6 +7320,7 @@ +