diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs index 9ada6b114..87c88b9d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ConferenceRoomController.cs @@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } #endregion @@ -61,6 +61,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList() + { + var data = conferenceRoomIBLL.GetList(); + return Success(data); + } /// /// 获取表单数据 /// @@ -69,8 +82,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var ConferenceRoomData = conferenceRoomIBLL.GetConferenceRoomEntity( keyValue ); - var jsonData = new { + var ConferenceRoomData = conferenceRoomIBLL.GetConferenceRoomEntity(keyValue); + var jsonData = new + { ConferenceRoom = ConferenceRoomData, }; return Success(jsonData); @@ -102,9 +116,21 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { ConferenceRoomEntity entity = strEntity.ToObject(); - conferenceRoomIBLL.SaveEntity(keyValue,entity); + conferenceRoomIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoEnable(string keyValue, string status) + { + conferenceRoomIBLL.DoEnable(keyValue, status); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml index a3fb208a8..1681fddb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.cshtml @@ -3,25 +3,29 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
名称
- +
+
场地名称*
+
-
-
地点
- +
+
地点*
+
-
+
状态
- +
-
+
可容纳人数
- +
-
+
备注
- + +
+
+
添加时间*
+
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js index b15f2bae5..a120d0a51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Form.js @@ -15,6 +15,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $("#Status").lrDataItemSelect({ code: 'EnableStatus' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml index 567b03b95..9fdbd0799 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.cshtml @@ -11,12 +11,12 @@
-
名称
+
场地名称
状态
- +
@@ -31,6 +31,10 @@  修改  删除
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js index 6a78a0faf..e7eac8a91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ConferenceRoom/Index.js @@ -16,18 +16,19 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); + $("#Status").lrDataItemSelect({ code: 'EnableStatus' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/Form', - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -41,8 +42,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/Form?keyValue=' + keyValue, - width: 600, - height: 400, + width: 800, + height: 600, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -53,9 +54,45 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 启用 + $('#lr_enable').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == "1") { + learun.alert.warning("当前项已启用!"); + return false; + } + learun.layerConfirm('是否确认启用该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DoEnable', { keyValue: keyValue, status: "1" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 禁用 + $('#lr_disable').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "1") { + learun.alert.warning("当前项未启用!"); + return false; + } + learun.layerConfirm('是否确认禁用该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/DoEnable', { keyValue: keyValue, status: "0" }, function () { refreshGirdData(); }); } @@ -68,20 +105,25 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetPageList', headData: [ - { label: "名称", name: "Name", width: 100, align: "left"}, - { label: "地点", name: "Address", width: 100, align: "left"}, - { label: "状态", name: "Status", width: 100, align: "left"}, - { label: "可容纳人数", name: "Scale", width: 100, align: "left"}, - { label: "备注", name: "Remark", width: 100, align: "left"}, + { label: "场地名称", name: "Name", width: 200, align: "left" }, + { label: "地点", name: "Address", width: 200, align: "left" }, + { + label: "状态", name: "Status", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == 1 ? "启用" : "禁用"; + } + }, + { label: "可容纳人数", name: "Scale", width: 100, align: "left" }, + { label: "添加时间", name: "CreateTime", width: 100, align: "left" }, ], - mainId:'ID', - isPage: true + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { 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 b992ae750..85a6c1fe6 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 @@ -537,6 +537,8 @@ + + @@ -1731,9 +1733,15 @@ + + + + + + @@ -8275,6 +8283,12 @@ + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index 1d8fe3921..c77251941 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -221,6 +221,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 5989d7280..cc022206f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -243,6 +243,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 9192d228a..b7defa8f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -482,6 +482,14 @@ + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs index ca1279998..b63387e01 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomBLL.cs @@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList() + { + try + { + return conferenceRoomService.GetList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取ConferenceRoom表实体数据 /// 主键 @@ -118,6 +141,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + public void DoEnable(string keyValue, string status) + { + try + { + conferenceRoomService.DoEnable(keyValue, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs index 051acded0..5675ffc25 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomEntity.cs @@ -20,7 +20,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("ID")] public string ID { get; set; } /// - /// 名字 + /// 场地名称 /// [Column("NAME")] public string Name { get; set; } @@ -44,6 +44,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("REMARK")] public string Remark { get; set; } + /// + /// 添加时间 + /// + [Column("CREATETIME")] + public DateTime CreateTime { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs index e90950420..a3d867e8c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomIBLL.cs @@ -21,6 +21,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(); /// /// 获取ConferenceRoom表实体数据 /// 主键 @@ -43,6 +50,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// void SaveEntity(string keyValue, ConferenceRoomEntity entity); + + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + void DoEnable(string keyValue, string status); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs index 4ca9d204b..c84795e65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ConferenceRoom/ConferenceRoomService.cs @@ -29,15 +29,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.Name, - t.Address, - t.Status, - t.Scale, - t.Remark - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM ConferenceRoom t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -50,10 +42,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } if (!queryParam["Status"].IsEmpty()) { - dp.Add("Status", "%" + queryParam["Status"].ToString() + "%", DbType.String); - strSql.Append(" AND t.Status Like @Status "); + if (queryParam["Status"].ToString() == "1") + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } + else + { + strSql.Append(" AND t.Status != '1' "); + } } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -68,6 +67,33 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList() + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM ConferenceRoom t "); + strSql.Append(" WHERE 1=1 and t.Status = '1' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取ConferenceRoom表实体数据 /// 主键 @@ -105,7 +131,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); } catch (Exception ex) { @@ -153,6 +179,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 启用禁用实体数据 + /// 主键 + /// + /// + public void DoEnable(string keyValue, string status) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update ConferenceRoom set Status='" + status + "' where ID='" + keyValue + "' "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/scanCode.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/scanCode.vue new file mode 100644 index 000000000..6404d64b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/scanCode.vue @@ -0,0 +1,77 @@ + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index b99095f1f..ee6e5e0b6 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -7,15 +7,15 @@ export default { "enableSignUp": true, //请求数据的接口地址;可以配置多个,开发环境下登录页会出现选择菜单供您选择 //黑龙江正式地址 - "apiHost": [ - "http://1.190.222.34:9001/" - ], - "webHost":"http://1.190.222.34:9000/", - //本地: // "apiHost": [ - // "http://localhost:9003/" + // "http://1.190.222.34:9001/" // ], - // "webHost":"http://localhost:8000/", + // "webHost":"http://1.190.222.34:9000/", + //本地: + "apiHost": [ + "http://localhost:8088/" + ], + "webHost":"http://localhost:8087/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ { username: "system", password: "www.qj.com" }