diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.cshtml new file mode 100644 index 000000000..d996f4155 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "心理咨询"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
咨询编号
+ +
+
+
咨询内容*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.js new file mode 100644 index 000000000..4585ba5d7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-05-09 11:23 + * 描 述:心理咨询 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml index aacd8bafe..4a633a747 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml @@ -5,7 +5,7 @@
咨询编号
- +
咨询内容*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js index d93ad0d59..481184177 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js @@ -72,7 +72,8 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('Id'); selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { - if (selectedRow.SendFlag !== 0) { + console.log('selectedRow.SendFlag', selectedRow.SendFlag); + if (selectedRow.SendFlag !== false) { learun.alert.warning("选中记录已提交!"); return false; } @@ -130,7 +131,7 @@ var bootstrap = function ($, learun) { { label: "提交状态", name: "SendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { - if (cellvalue === 1) { + if (cellvalue === true) { return '已提交'; } else { return '草稿'; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.cshtml new file mode 100644 index 000000000..ecb4f65d2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "心理咨询"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
编号
+ +
+
+
咨询内容
+ +
+
+
回复内容
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.js new file mode 100644 index 000000000..31d5b3c9c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/IndexRecive.js @@ -0,0 +1,147 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-05-09 11:23 + * 描 述:心理咨询 + */ +var refreshGirdData; +var selectedRow; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //// 打印 + //$('#lr_print').on('click', function () { + // $('#gridtable').jqprintTable(); + //}); + // 提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + console.log('selectedRow.SendFlag', selectedRow.SendFlag); + if (selectedRow.SendFlag !== false) { + learun.alert.warning("选中记录已提交!"); + return false; + } + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SubmitForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/FormView?keyValue=' + keyValue, + width: 600, + height: 400, + btn: null + }); + } + }); + // 回复情况 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SComplaintId'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.SendFlag !== 1) { + learun.alert.warning("当前投诉意见未提交,请先提交!"); + return false; + } + if (selectedRow.ReplyFlag !== 1) { + learun.alert.warning("当前投诉意见未回复!"); + return false; + } + learun.layerForm({ + id: 'replylistSys_SendComplaint', + title: '回复情况', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendComplaint/ReplyList?keyValue=' + keyValue, + width: 600, + height: 400, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/GetPageList', + headData: [ + { label: "咨询编号", name: "Code", width: 150, align: "left" }, + { label: "咨询内容", name: "Concent", width: 250, align: "left" }, + { label: "回复时间", name: "ReplyTime", width: 150, align: "left" }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = " and SendFlag=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/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 61eed15c8..ff97b803c 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 @@ -1099,6 +1099,8 @@ + + @@ -7821,6 +7823,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs index e43dcdb76..e933c4b7f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs @@ -123,7 +123,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - string sql = $"update Sys_PsychologicalCounse set SendFlag=1 where Id='{keyValue}'"; + string sql = $"update Sys_PsychologicalCounse set SendFlag=1,SendTime=getdate() where Id='{keyValue}'"; this.BaseRepository().ExecuteBySql(sql); } catch (Exception ex)