diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js index 8e28755ab..46adbfe42 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Form.js @@ -33,7 +33,7 @@ var bootstrap = function ($, learun) { //}); $('#MPDepartment').lrselect({ - type: 'tree', + type: 'treemultiple', // 展开最大高度 maxHeight: 200, // 是否允许搜索 @@ -41,10 +41,18 @@ var bootstrap = function ($, learun) { // 访问数据接口地址 url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', select: function (val) { - var departmentIds = val.id; - $('#MPReceiveUser').lrselectRefresh({ - url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds - }) + if (val && val.length > 0) { + var departmentIds = ''; + for (var i = 0; i < val.length; i++) { + departmentIds += val[i].id; + if (i < val.length - 1) { + departmentIds += ','; + } + } + $('#MPReceiveUser').lrselectRefresh({ + url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds + }) + } } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Index.js index 4123f86a4..01fd17cc8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/Index.js @@ -139,8 +139,10 @@ var bootstrap = function ($, learun) { } }); + if (i < deptarr.length - 1) { + content += ','; + } } - content = content.substring(0, content.length - 1); callback(content); } else { learun.clientdata.getAsync('custmerData', @@ -192,13 +194,16 @@ var bootstrap = function ($, learun) { success: function (res) { var bb = ''; $.each(res.data, function (i, item) { - bb += '' + item.F_FileName + - ',   '; - }) + '   '; + + if (i < res.data.length - 1) { + bb += ',   '; + } + }); callback(bb); } }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js index 3430a1a73..f31165adc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_ManagementPlan/IndexManagement.js @@ -42,7 +42,7 @@ var bootstrap = function ($, learun) { //$('#MPMonth').lrselectSet(jsdate.getMonth() + 1); $('#MPDepartment').lrselect({ - type: 'tree', + type: 'treemultiple', // 展开最大高度 maxHeight: 200, // 是否允许搜索 @@ -50,11 +50,17 @@ var bootstrap = function ($, learun) { // 访问数据接口地址 url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', select: function (val) { - if (val) { - var departmentIds = val.id; + if (val && val.length > 0) { + var departmentIds = ''; + for (var i = 0; i < val.length; i++) { + departmentIds += val[i].id; + if (i < val.length - 1) { + departmentIds += ','; + } + } $('#MPReceiveUser').lrselectRefresh({ url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds - }); + }) } } }); @@ -156,6 +162,11 @@ var bootstrap = function ($, learun) { $('#lr_qualified').on('click', function () { var keyValue = $('#gridtable').jfGridValue('MPId'); if (learun.checkrow(keyValue)) { + var MPConclusion = $('#gridtable').jfGridValue('MPConclusion'); + if (MPConclusion == 1) { + learun.alert.warning("当前项已合格"); + return false; + } learun.layerConfirm('是否确认合格!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/Qqualified', { keyValue: keyValue, status: true }, function () { @@ -169,6 +180,11 @@ var bootstrap = function ($, learun) { $('#lr_noqualified').on('click', function () { var keyValue = $('#gridtable').jfGridValue('MPId'); if (learun.checkrow(keyValue)) { + var MPConclusion = $('#gridtable').jfGridValue('MPConclusion'); + if (MPConclusion != 1) { + learun.alert.warning("当前项已不合格"); + return false; + } learun.layerConfirm('是否确认不合格!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/Qqualified', { keyValue: keyValue, status: false }, function () { @@ -225,8 +241,10 @@ var bootstrap = function ($, learun) { } }); + if (i < deptarr.length - 1) { + content += ','; + } } - content = content.substring(0, content.length - 1); callback(content); } else { learun.clientdata.getAsync('custmerData', diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs index 854af67d5..7570ece5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_ManagementPlan/MP_ManagementPlanService.cs @@ -30,30 +30,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.MPId, - t.MPAcademicYearNo, - t.MPSemester, - t.MPFile, - t.MPType, - t.MPUploader, - t.MPRemark, - t.MPDepartment, - t.MPProjectName, - t.MPFileTwo, - t.MPUploadTimes, - t.MPOverTime, - t.MPStatus, - t.MPConclusion, - t.ParentId, - t.SUpdateTime, - t.MPFileTwoRemark, - t.MPUploaderTwo, - t.MPMonth, - t.MPReceiveUser, - t.MPUploadTime - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM MP_ManageMentPlan t "); strSql.Append(" WHERE 1=1 "); strSql.Append($" AND MPType={MPType} ");