Browse Source

调整项目管理功能

金隅分支
zhangli 3 years ago
parent
commit
fef774d65b
21 changed files with 650 additions and 29 deletions
  1. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs
  2. +13
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs
  3. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectPhaseManageController.cs
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.cshtml
  5. +50
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js
  6. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
  7. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml
  8. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js
  9. +26
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
  10. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
  11. +109
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
  12. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  13. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageBLL.cs
  14. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageEntity.cs
  15. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageIBLL.cs
  16. +56
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs
  17. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs
  18. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs
  19. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs
  20. +36
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs
  21. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageService.cs

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectDataManageController.cs View File

@@ -38,6 +38,16 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{ {
return View(); return View();
} }
/// <summary>
/// 上传项目资料
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexData()
{
return View();
}
#endregion #endregion


#region 获取数据 #region 获取数据
@@ -62,6 +72,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
records = paginationobj.records records = paginationobj.records
}; };
return Success(jsonData); return Success(jsonData);
}/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson)
{
var data = projectDataManageIBLL.GetList(queryJson);
return Success(data);
} }
/// <summary> /// <summary>
/// 获取表单数据 /// 获取表单数据
@@ -114,6 +137,27 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers


return Success("保存成功!"); return Success("保存成功!");
} }
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveData(string keyValue, string strEntity)
{
ProjectDataManageEntity pentity = strEntity.ToObject<ProjectDataManageEntity>();
var entity= projectDataManageIBLL.GetProjectDataManageEntity(keyValue);
entity.Files = pentity.Files;
entity.Name = pentity.Name;
entity.Remark = pentity.Remark;
projectDataManageIBLL.SaveEntity(keyValue, entity);

return Success("保存成功!");
}
#endregion #endregion


} }


+ 13
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectManageController.cs View File

@@ -123,12 +123,23 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
public ActionResult SaveForm(string keyValue, string strEntity) public ActionResult SaveForm(string keyValue, string strEntity)
{ {
ProjectManageEntity entity = strEntity.ToObject<ProjectManageEntity>(); ProjectManageEntity entity = strEntity.ToObject<ProjectManageEntity>();
entity.CreateTime = DateTime.Now;
entity.CreateUserId = LoginUserInfo.Get().userId;
projectManageIBLL.SaveEntity(keyValue, entity); projectManageIBLL.SaveEntity(keyValue, entity);


return Success("保存成功!"); return Success("保存成功!");
} }
/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue,string Status)
{
projectManageIBLL.UpdateStatus(keyValue, Status);
return Success("操作成功!");
}
#endregion #endregion


} }


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/ProjectPhaseManageController.cs View File

@@ -63,6 +63,19 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
}; };
return Success(jsonData); return Success(jsonData);
} }
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = projectPhaseManageIBLL.GetList(queryJson);
return Success(data);
}
/// <summary> /// <summary>
/// 获取表单数据 /// 获取表单数据
/// </summary> /// </summary>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.cshtml View File

@@ -15,7 +15,7 @@
<div class="lr-form-item-title">项目资料名称<font face="宋体">*</font></div> <div class="lr-form-item-title">项目资料名称<font face="宋体">*</font></div>
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> <input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage">
<div class="col-xs-12 lr-form-item" data-table="ProjectDataManage" id="FilesDiv" style="display: none;">
<div class="lr-form-item-title">资料文件</div> <div class="lr-form-item-title">资料文件</div>
<div id="Files"></div> <div id="Files"></div>
</div> </div>


+ 50
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js View File

@@ -8,6 +8,7 @@ var acceptClick;
var keyValue = request('keyValue'); var keyValue = request('keyValue');
var PPId = request("PPId");//项目阶段id var PPId = request("PPId");//项目阶段id
var PId = request("PId");//项目Id var PId = request("PId");//项目Id
var type = request("type");//项目Id
var bootstrap = function ($, learun) { var bootstrap = function ($, learun) {
"use strict"; "use strict";
var page = { var page = {
@@ -40,7 +41,7 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetTree', url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetTree',
select: function (item) { select: function (item) {
if (item != null && item != undefined) { if (item != null && item != undefined) {
} }
} }
}); });
@@ -48,20 +49,50 @@ var bootstrap = function ($, learun) {
$('#PPId').lrselectSet(PPId); $('#PPId').lrselectSet(PPId);
} }
$('#Files').lrUploader(); $('#Files').lrUploader();
$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);
$('#DepartmentId').lrDataSourceSelect({
code: 'classdata',
value: 'id',
text: 'name',
select: function (item) {
var DeptCode = $('#DepartmentId').lrselectGet();
if (DeptCode != null && DeptCode != "" && DeptCode != undefined) {
$('#ManagerId').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=BaseUser',
value: 'f_userid',
text: 'f_realname',
param: { strWhere: " 1=1 and f_departmentid in ('" + DeptCode + "')" },
maxHeight: 200,
});
}
}
});
$('#ManagerId').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=BaseUser',
value: 'f_userid',
text: 'f_realname',
param: { strWhere: " 1=2 " },
maxHeight: 200,
});

if (type == '2') {
$('#FilesDiv').attr('style', 'display: block');

$('#DepartmentId').attr('readonly', 'readonly');
$('#ManagerId').attr('readonly', 'readonly');
}
}, },
initData: function () { initData: function () {
if (!!keyValue) { if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetFormData?keyValue=' + keyValue, function (data) { $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) { for (var id in data) {
if (!!data[id].length && data[id].length > 0) { if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
} }
else { else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]); $('[data-table="' + id + '"]').lrSetFormData(data[id]);
} }
} }

}); });
} }
} }
@@ -74,12 +105,21 @@ var bootstrap = function ($, learun) {
var postData = { var postData = {
strEntity: JSON.stringify($('body').lrGetFormData()) strEntity: JSON.stringify($('body').lrGetFormData())
}; };
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
if (type == 2) {
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/SaveData?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
} else {
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
}; };
page.init(); page.init();
} }

+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js View File

@@ -7,6 +7,7 @@
var refreshGirdData; var refreshGirdData;
var PPId; var PPId;
var PId = request("PId");//项目Id var PId = request("PId");//项目Id
var type = request("type");//type==2,上传项目资料
var bootstrap = function ($, learun) { var bootstrap = function ($, learun) {
"use strict"; "use strict";
var page = { var page = {
@@ -49,7 +50,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({ learun.layerForm({
id: 'ProjectDataManageform', id: 'ProjectDataManageform',
title: '编辑', title: '编辑',
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?keyValue=' + keyValue,
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?keyValue=' + keyValue + '&type=' + type,
width: 800, width: 800,
height: 600, height: 600,
callBack: function (id) { callBack: function (id) {


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml View File

@@ -0,0 +1,53 @@
@{
/**/

ViewBag.Title = "项目管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">类型</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择类型</span> - <span class="lrlt">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">负责部门</div>
<div id="DepartmentId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">负责人</div>
<div id="ManagerId"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_data" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 上传项目资料</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js")

+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js View File

@@ -0,0 +1,173 @@
/* * 版 本 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)) {
learun.layerForm({
id: 'ProjectDataManageIndex',
title: '项目资料管理',
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Index?PId=' + keyValue + '&type=2',
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: "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) {
return value == 0
? '<span class=\"label label-warning\">草稿</span>'
: '<span class=\"label label-success\">完成</span>';
}
},
{ 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: "CreateTime", 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;
param.SqlParameter = " and [Status]=1";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 26
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js View File

@@ -33,9 +33,32 @@ var bootstrap = function ($, learun) {
if (!!PTId) { if (!!PTId) {
$('#PTId').lrselectSet(PTId); $('#PTId').lrselectSet(PTId);
} }

$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);
$('#DepartmentId').lrDataSourceSelect({
code: 'classdata',
value: 'id',
text: 'name',
select: function (item) {
var DeptCode = $('#DepartmentId').lrselectGet();
if (DeptCode != null && DeptCode != "" && DeptCode != undefined) {
$('#ManagerId').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=BaseUser',
value: 'f_userid',
text: 'f_realname',
param: { strWhere: " 1=1 and f_departmentid in ('" + DeptCode + "')" },
maxHeight: 200,
});
}
}
});
$('#ManagerId').lrselect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=BaseUser',
value: 'f_userid',
text: 'f_realname',
param: { strWhere: " 1=2 " },
maxHeight: 200,
});
//$('#DepartmentId').lrDepartmentSelect();
//$('#ManagerId').lrUserSelect(0);
}, },
initData: function () { initData: function () {
if (!!keyValue) { if (!!keyValue) {


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml View File

@@ -47,7 +47,9 @@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a> <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div> </div>
<div class=" btn-group btn-group-sm" learun-authorize="yes"> <div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_data" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 上传项目资料</a>
<a id="lr_data" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 设置上传项目资料</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 审核</a>
<a id="lr_nosubmit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 去审</a>
</div> </div>
</div> </div>
</div> </div>


+ 109
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js View File

@@ -45,6 +45,10 @@ var bootstrap = function ($, learun) {
$('#lr_edit').on('click', function () { $('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id'); var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != '0') {
return learun.alert.warning('选中项目已审核,不可编辑!');
}
learun.layerForm({ learun.layerForm({
id: 'form', id: 'form',
title: '编辑', title: '编辑',
@@ -61,6 +65,10 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () { $('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id'); var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != '0') {
return learun.alert.warning('选中项目已审核,不可删除!');
}
learun.layerConfirm('是否确认删除该项!', function (res) { learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) { if (res) {
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/DeleteForm', { keyValue: keyValue }, function () { learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/ProjectManage/DeleteForm', { keyValue: keyValue }, function () {
@@ -70,10 +78,41 @@ var bootstrap = function ($, learun) {
}); });
} }
}); });
//  上传项目资料
// 审核
$('#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();
});
}
});
}
});
//设置上传项目资料
$('#lr_data').on('click', function () { $('#lr_data').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id'); var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != '0') {
return learun.alert.warning('选中项目已审核,不可设置!');
}
learun.layerForm({ learun.layerForm({
id: 'ProjectDataManageIndex', id: 'ProjectDataManageIndex',
title: '项目资料管理', title: '项目资料管理',
@@ -128,12 +167,79 @@ var bootstrap = function ($, learun) {
}); });
} }
}, },
{ label: "项目状态", name: "Status", width: 100, align: "left" },
{
label: "项目状态", name: "Status", width: 100, align: "left",
formatter: function (value) {
return value == 0
? '<span class=\"label label-warning\">草稿</span>'
: '<span class=\"label label-success\">完成</span>';
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" }, { label: "备注", name: "Remark", width: 100, align: "left" },
], ],
mainId: 'Id', mainId: 'Id',
isPage: true, isPage: true,
sidx: 'CreateTime desc'
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: "CreateTime", 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(); page.search();
}, },


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1210,6 +1210,7 @@
<Content Include="Areas\LogisticsManagement\Views\CompanyNews\Index.js" /> <Content Include="Areas\LogisticsManagement\Views\CompanyNews\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\Form.js" /> <Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\Index.js" /> <Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\IndexData.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectPhaseManage\Form.js" /> <Content Include="Areas\LogisticsManagement\Views\ProjectPhaseManage\Form.js" />
<Content Include="Areas\LogisticsManagement\Views\ProjectPhaseManage\Index.js" /> <Content Include="Areas\LogisticsManagement\Views\ProjectPhaseManage\Index.js" />
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\AppForm.js" /> <Content Include="Areas\LR_AuthorizeModule\Views\Authorize\AppForm.js" />
@@ -7361,6 +7362,7 @@
<Content Include="Areas\LR_Desktop\Views\QualityReport\Form.cshtml" /> <Content Include="Areas\LR_Desktop\Views\QualityReport\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" /> <Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" /> <Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\ProjectDataManage\IndexData.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> <None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" /> <Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> <None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageBLL.cs View File

@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
} }
} }


/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectDataManageEntity> GetList(string queryJson)
{
try
{
return projectDataManageService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary> /// <summary>
/// 获取ProjectDataManage表实体数据 /// 获取ProjectDataManage表实体数据
/// </summary> /// </summary>


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageEntity.cs View File

@@ -73,6 +73,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
public void Create() public void Create()
{ {
this.Id = Guid.NewGuid().ToString(); this.Id = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
this.CreateUserId = LoginUserInfo.Get().userId;
} }
/// <summary> /// <summary>
/// 编辑调用 /// 编辑调用


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageIBLL.cs View File

@@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <returns></returns> /// <returns></returns>
IEnumerable<ProjectDataManageEntity> GetPageList(Pagination pagination, string queryJson); IEnumerable<ProjectDataManageEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary> /// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ProjectDataManageEntity> GetList(string queryJson);
/// <summary>
/// 获取ProjectDataManage表实体数据 /// 获取ProjectDataManage表实体数据
/// </summary> /// </summary>
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>


+ 56
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectDataManage/ProjectDataManageService.cs View File

@@ -75,7 +75,62 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
} }
} }
} }

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ProjectDataManageEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM ProjectDataManage t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Name Like @Name ");
}
if (!queryParam["DepartmentId"].IsEmpty())
{
dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.DepartmentId = @DepartmentId ");
}
if (!queryParam["ManagerId"].IsEmpty())
{
dp.Add("ManagerId", queryParam["ManagerId"].ToString(), DbType.String);
strSql.Append(" AND t.ManagerId = @ManagerId ");
}
if (!queryParam["PId"].IsEmpty())
{
dp.Add("PId", queryParam["PId"].ToString(), DbType.String);
strSql.Append(" AND t.PId = @PId ");
}
if (!queryParam["PPId"].IsEmpty())
{
dp.Add("PPId", queryParam["PPId"].ToString(), DbType.String);
strSql.Append(" AND t.PPId = @PPId ");
}
return this.BaseRepository("CollegeMIS").FindList<ProjectDataManageEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary> /// <summary>
/// 获取ProjectDataManage表实体数据 /// 获取ProjectDataManage表实体数据
/// </summary> /// </summary>


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageBLL.cs View File

@@ -143,6 +143,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
} }
} }



/// <summary>
/// 提交
/// </summary>
/// <returns></returns>
public void UpdateStatus(string keyValue, string Status)
{
try
{
projectManageService.UpdateStatus(keyValue, Status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion #endregion


} }


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageEntity.cs View File

@@ -73,6 +73,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
public void Create() public void Create()
{ {
this.Id = Guid.NewGuid().ToString(); this.Id = Guid.NewGuid().ToString();
this.Status = "0";
this.CreateTime = DateTime.Now;
this.CreateUserId = LoginUserInfo.Get().userId;
} }
/// <summary> /// <summary>
/// 编辑调用 /// 编辑调用


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageIBLL.cs View File

@@ -50,6 +50,14 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
/// <param name="entity">实体</param> /// <param name="entity">实体</param>
void SaveEntity(string keyValue, ProjectManageEntity entity); void SaveEntity(string keyValue, ProjectManageEntity entity);

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="Status"></param>
void UpdateStatus(string keyValue, string Status);

#endregion #endregion


} }


+ 36
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectManage/ProjectManageService.cs View File

@@ -43,20 +43,25 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
} }
if (!queryParam["DepartmentId"].IsEmpty()) if (!queryParam["DepartmentId"].IsEmpty())
{ {
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String);
dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String);
strSql.Append(" AND t.DepartmentId = @DepartmentId "); strSql.Append(" AND t.DepartmentId = @DepartmentId ");
} }
if (!queryParam["ManagerId"].IsEmpty()) if (!queryParam["ManagerId"].IsEmpty())
{ {
dp.Add("ManagerId",queryParam["ManagerId"].ToString(), DbType.String);
dp.Add("ManagerId", queryParam["ManagerId"].ToString(), DbType.String);
strSql.Append(" AND t.ManagerId = @ManagerId "); strSql.Append(" AND t.ManagerId = @ManagerId ");
} }
if (!queryParam["PTId"].IsEmpty()) if (!queryParam["PTId"].IsEmpty())
{ {
dp.Add("PTId",queryParam["PTId"].ToString(), DbType.String);
dp.Add("PTId", queryParam["PTId"].ToString(), DbType.String);
strSql.Append(" AND t.PTId = @PTId "); strSql.Append(" AND t.PTId = @PTId ");
} }
return this.BaseRepository("CollegeMIS").FindList<ProjectManageEntity>(strSql.ToString(),dp, pagination);

if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}
return this.BaseRepository("CollegeMIS").FindList<ProjectManageEntity>(strSql.ToString(), dp, pagination);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -88,7 +93,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
var queryParam = queryJson.ToJObject(); var queryParam = queryJson.ToJObject();
// 虚拟参数 // 虚拟参数
var dp = new DynamicParameters(new { }); var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<ProjectManageEntity>(strSql.ToString(), dp); return this.BaseRepository("CollegeMIS").FindList<ProjectManageEntity>(strSql.ToString(), dp);
} }
catch (Exception ex) catch (Exception ex)
@@ -127,7 +132,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
} }
} }
} }
#endregion #endregion


#region 提交数据 #region 提交数据
@@ -140,7 +145,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
{ {
try try
{ {
this.BaseRepository("CollegeMIS").Delete<ProjectManageEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<ProjectManageEntity>(t => t.Id == keyValue);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -188,6 +193,30 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
} }
} }


/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, string Status)
{
try
{
var sql = $"update ProjectManage set [Status]='{Status}' where Id='{keyValue}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion #endregion


} }


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ProjectPhaseManage/ProjectPhaseManageService.cs View File

@@ -82,6 +82,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
dp.Add("IsEnabled", queryParam["IsEnabled"].ToBool(), DbType.Boolean); dp.Add("IsEnabled", queryParam["IsEnabled"].ToBool(), DbType.Boolean);
strSql.Append(" AND t.IsEnabled = @IsEnabled "); strSql.Append(" AND t.IsEnabled = @IsEnabled ");
} }

strSql.Append(" order by sort");
return this.BaseRepository("CollegeMIS").FindList<ProjectPhaseManageEntity>(strSql.ToString(), dp); return this.BaseRepository("CollegeMIS").FindList<ProjectPhaseManageEntity>(strSql.ToString(), dp);
} }
catch (Exception ex) catch (Exception ex)


Loading…
Cancel
Save