+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js
index 3c36fd670..e8968a4af 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js
@@ -8,6 +8,7 @@ var acceptClick;
var keyValue = request('keyValue');
var PPId = request("PPId");//项目阶段id
var PId = request("PId");//项目Id
+var type = request("type");//项目Id
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -40,7 +41,7 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/LogisticsManagement/ProjectPhaseManage/GetTree',
select: function (item) {
if (item != null && item != undefined) {
-
+
}
}
});
@@ -48,20 +49,50 @@ var bootstrap = function ($, learun) {
$('#PPId').lrselectSet(PPId);
}
$('#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 () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
- $('#' + id ).jfGridSet('refreshdata', data[id]);
+ $('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
+
});
}
}
@@ -74,12 +105,21 @@ var bootstrap = function ($, learun) {
var postData = {
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();
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
index 9ff098575..a7c36d14d 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
@@ -7,6 +7,7 @@
var refreshGirdData;
var PPId;
var PId = request("PId");//项目Id
+var type = request("type");//type==2,上传项目资料
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -49,7 +50,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'ProjectDataManageform',
title: '编辑',
- url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?keyValue=' + keyValue,
+ url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?keyValue=' + keyValue + '&type=' + type,
width: 800,
height: 600,
callBack: function (id) {
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml
new file mode 100644
index 000000000..09e668ffb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.cshtml
@@ -0,0 +1,53 @@
+@{
+ /**/
+
+ ViewBag.Title = "项目管理";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js
new file mode 100644
index 000000000..9aec74d39
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/IndexData.js
@@ -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
+ ? '
草稿'
+ : '
完成';
+ }
+ },
+ { 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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
index 97f812dd9..1985ac23e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
@@ -33,9 +33,32 @@ var bootstrap = function ($, learun) {
if (!!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 () {
if (!!keyValue) {
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
index 6880ecba7..67c5cc520 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.cshtml
@@ -47,7 +47,9 @@
删除