From e01a1f073d6b4075f5224a171aebb6142449c25c Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 20 Jul 2021 14:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E8=B5=84=E9=87=91?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E3=80=81=E7=BB=93=E7=AE=97=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ProjectManageController.cs | 9 + .../ProjectProcessManageController.cs | 9 + .../Views/ProjectManage/Form.cshtml | 2 +- .../Views/ProjectManage/Index.js | 3 +- .../Views/ProjectManage/Index1.cshtml | 61 ++++ .../Views/ProjectManage/Index1.js | 280 ++++++++++++++++++ .../ProjectProcessManage/IndexData1.cshtml | 32 ++ .../Views/ProjectProcessManage/IndexData1.js | 181 +++++++++++ .../Learun.Application.Web.csproj | 4 + 9 files changed, 579 insertions(+), 2 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs index 7974befd9..dd91c921d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs @@ -31,6 +31,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers return View(); } /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index1() + { + return View(); + } + /// /// 表单页 /// /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs index d1762e680..c15c71e59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectProcessManageController.cs @@ -46,6 +46,15 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers { return View(); } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult IndexData1() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml index e2d256575..e16daf758 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.cshtml @@ -16,7 +16,7 @@
-
项目费用
+
项目金额
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js index 32a67074e..e7dd16994 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js @@ -151,11 +151,12 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/GetPageList', headData: [ { label: "项目名称", name: "Name", width: 200, align: "left" }, { label: "项目周期", name: "Period", width: 100, align: "left" }, + { label: "项目金额", name: "ItemAmount", width: 100, align: "left" }, { label: "负责部门", name: "DepartmentId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.cshtml new file mode 100644 index 000000000..d88f5453f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.cshtml @@ -0,0 +1,61 @@ +@{ + /**/ + + ViewBag.Title = "项目管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
类型
+
+
+
+
+
+
+ 未选择类型 - 列表信息 +
+
+
+
+
+
+
+
项目名称
+ +
+
+
负责部门
+
+
+
+
负责人
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectManage/Index1.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.js new file mode 100644 index 000000000..e7dd16994 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index1.js @@ -0,0 +1,280 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-21 15:49 + * 描 述:项目管理 + */ +var refreshGirdData; +var PTId; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.inittree(); + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DepartmentId').lrDepartmentSelect(); + $('#ManagerId').lrUserSelect(0); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + if (!PTId) { + learun.alert.warning('请选择类型!'); + return false; + } + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/Form?PTId=' + PTId, + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != '0') { + return learun.alert.warning('选中项目已审核,不可编辑!'); + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/Form?keyValue=' + keyValue, + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != '0') { + return learun.alert.warning('选中项目已审核,不可删除!'); + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 审核 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认审核该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 去审 + $('#lr_nosubmit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认去审该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/UpdateStatus', { keyValue: keyValue, Status: 0 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 归档,将状态改为2 + $('#lr_file').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认归档该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + + //设置上传项目资料 + $('#lr_data').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != '0') { + return learun.alert.warning('选中项目已审核,不可设置!'); + } + learun.layerForm({ + id: 'ProjectDataManageIndex', + title: '项目资料管理', + url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Index?PId=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + }, + inittree: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/GetTree', + nodeClick: page.treeNodeClick + }); + }, + treeNodeClick: function (item) { + PTId = item.id; + $('#titleinfo').text(item.text); + page.search(); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/GetPageList', + headData: [ + { label: "项目名称", name: "Name", width: 200, align: "left" }, + { label: "项目周期", name: "Period", width: 100, align: "left" }, + { label: "项目金额", name: "ItemAmount", width: 100, align: "left" }, + { + label: "负责部门", name: "DepartmentId", 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: "ManagerId", 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: "Status", width: 100, align: "left", + formatter: function (value) { + if (value == 0) { + return '草稿'; + } else if (value == 1) { + return '进行中'; + } else if (value == 2) { + return '已完成'; + } + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + var PId = rowItem.Id; + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetList', + headData: [ + { name: "Name", width: 150, align: "left" } + ], + mainId: 'Id', + isPage: false, + sidx: 'Sort', + sord: 'ASC', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetList', + headData: [ + { label: "项目资料名称", name: "Name", width: 200, align: "left" }, + { + label: "负责部门", name: "DepartmentId", 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: "ManagerId", 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: "FileStatus", width: 130, align: "left", + formatter: function (value) { + return value == '1' ? '' : ''; + } + }, + { label: "上传时间", name: "FileTime", width: 130, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: false, + }); + var param; + param = param || {}; + param.PPId = rowItem.Id; + param.PId = PId; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }); + var param; + param = param || {}; + //param.BId = rowItem.Id; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.PTId = PTId; + $('#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/LogisticsManagement/Views/ProjectProcessManage/IndexData1.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.cshtml new file mode 100644 index 000000000..6a76c7135 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.cshtml @@ -0,0 +1,32 @@ +@{ + /**/ + + ViewBag.Title = "项目进展情况管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
类型
+
+
+
+
+
+
+ 未选择类型 - 列表信息 +
+
+ +
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.js new file mode 100644 index 000000000..863aebbd3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectProcessManage/IndexData1.js @@ -0,0 +1,181 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-21 15:49 + * 描 述:项目管理 + */ +var refreshGirdData; +var PTId; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.inittree(); + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DepartmentId').lrDepartmentSelect(); + $('#ManagerId').lrUserSelect(0); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + //填写项目进展情况 + $('#lr_data').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 1) { + return learun.alert.warning('只有进行中状态才可填写!'); + } + learun.layerForm({ + id: 'ProjectDataManageIndex', + title: '项目进展情况管理', + url: top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/Index?PId=' + keyValue, + width: 1000, + height: 800, + btn: ['确定'], + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + inittree: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectTypeManage/GetTree', + nodeClick: page.treeNodeClick + }); + }, + treeNodeClick: function (item) { + PTId = item.id; + $('#titleinfo').text(item.text); + page.search(); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectManage/GetPageList', + headData: [ + { label: "项目名称", name: "Name", width: 200, align: "left" }, + { label: "项目周期", name: "Period", width: 100, align: "left" }, + { + label: "负责部门", name: "DepartmentId", 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: "ManagerId", 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: "Status", width: 100, align: "left", + formatter: function (value) { + if (value == 0) { + return '草稿'; + } else if (value == 1) { + return '进行中'; + } else if (value == 2) { + return '完成'; + } + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + var PId = rowItem.Id; + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetList', + headData: [ + { name: "Name", width: 150, align: "left" } + ], + mainId: 'Id', + isPage: false, + sidx: 'Sort', + sord: 'ASC', + isSubGrid: true, // 是否有子表单 + subGridExpanded: function (subContentId, rowItem) { + $('#' + subContentId).jfGrid({ + url: top.$.rootUrl + '/LogisticsManagement/ProjectProcessManage/GetList', + headData: [ + { label: "项目进展情况", name: "Progress", width: 200, align: "left" }, + { + label: "时间", name: "ProcessTime", width: 100, align: "left", + formatter: function (value) { + return learun.formatDate(value, 'yyyy-MM-dd'); + } + }, + { + label: "创建人", name: "CreateUserId", 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: "CreateTime", width: 200, align: "left" , + //formatter: function (value) { + // return learun.formatDate(value, 'yyyy-MM-dd'); + //} + } + ], + mainId: 'Id', + isPage: false, + }); + var param; + param = param || {}; + param.PPId = rowItem.Id; + param.PId = PId; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }); + var param; + param = param || {}; + //param.BId = rowItem.Id; + $('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.PTId = PTId; + //param.SqlParameter = " and [Status]=1"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index b8e3e30c2..223241240 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 @@ -1221,8 +1221,10 @@ + + @@ -7387,6 +7389,8 @@ + +