From 5d59561e83bf79448cead32eb4cc7ef281d1bd08 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 28 Dec 2021 16:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E9=97=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B4=9F=E8=B4=A3=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Department/Form.cshtml | 20 +++--- .../Views/Department/Form.js | 11 ++- .../Views/Department/Index.js | 67 ++++++++----------- 3 files changed, 45 insertions(+), 53 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml index 3309d0b52..41aadd3c9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml @@ -22,10 +22,6 @@
部门性质
-
-
-
是否虚拟部门
-
上级部门
@@ -33,17 +29,17 @@
负责人
- -
+
+
分管校长
-
- +
+ +
+
+
公告类别
+
- @*
-
公告类别
-
-
*@
电话号
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js index 893d0e625..1f06e8ae0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js @@ -21,8 +21,6 @@ var bootstrap = function ($, learun) { bind: function () { // 部门性质 $('#F_Nature').lrDataItemSelect({ code: 'DepartmentNature', maxHeight: 230 }); - $('#F_IsVirtualization').lrDataItemSelect({ code: 'YesOrNoBit' }); - $('#F_IsVirtualization').lrselectSet(false); // 上级部门 $('#F_ParentId').lrDepartmentSelect({ companyId: companyId, maxHeight: 160 }); $("#F_SchoolMasterId").lrformselect({ @@ -39,8 +37,15 @@ var bootstrap = function ($, learun) { } } }); + //部门负责人 + $("#F_Manager").lrformselect({ + layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', + layerUrlW: 400, + layerUrlH: 300, + dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' + }); - //$('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); + $('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); }, initData: function () { if (!!selectedRow) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index 29741f684..6ea627085 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -61,6 +61,19 @@ var bootstrap = function ($, learun) { }); } }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_DepartmentId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/LR_OrganizationModule/Department/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); // 公告发布权限设置 $('#lr_permission').on('click', function () { var keyValue = $('#gridtable').jfGridValue('F_DepartmentId'); @@ -77,22 +90,6 @@ var bootstrap = function ($, learun) { }); } }); - - - - // 删除 - $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('F_DepartmentId'); - if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { - if (res) { - learun.deleteForm(top.$.rootUrl + '/LR_OrganizationModule/Department/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - } - }); - } - }); }, inittree: function () { $('#companyTree').lrtree({ @@ -116,37 +113,31 @@ var bootstrap = function ($, learun) { { label: "部门简称", name: "F_ShortName", width: 100, align: "left" }, { label: "部门性质", name: "F_Nature", width: 100, align: "left" }, { - label: "是否虚拟部门", name: "F_IsVirtualization", width: 100, align: "left", formatter: function (cellvalue) { - if (cellvalue) { - return ''; - } else{ - return ''; - } + label: "负责人", name: "F_Manager", width: 100, align: "left", + 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: "F_Manager", width: 100, align: "left" }, + { label: "分管校长", name: "F_SchoolMaster", width: 100, align: "left" }, { - label: "分管校长", name: "F_SchoolMasterId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', { + label: "公告类别", name: "NoticeCategory", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getsAsync('dataItem', { key: value, + code: 'NoticeCategory', callback: function (_data) { - callback(_data.name); + callback(_data); } }); } }, - //{ - // label: "公告类别", name: "NoticeCategory", width: 200, align: "left" , - // formatterAsync: function (callback, value, row, op, $cell) { - // learun.clientdata.getsAsync('dataItem', { - // key: value, - // code: 'NoticeCategory', - // callback: function (_data) { - // callback(_data); - // } - // }); - // } - //}, { label: "电话号", name: "F_OuterPhone", width: 100, align: "left" }, { label: "分机号", name: "F_InnerPhone", width: 60, align: "center" }, { label: "排序", name: "F_Order", width: 60, align: "center" },