@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询编号</div> | |||
<input id="Code" type="text" class="form-control" value="@ViewBag.Code" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询内容<font face="宋体">*</font></div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/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(); | |||
} |
@@ -5,7 +5,7 @@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询编号</div> | |||
<input id="Code" type="text" class="form-control" value="@ViewBag.Code" /> | |||
<input id="Code" type="text" class="form-control" readonly="readonly" value="@ViewBag.Code" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询内容<font face="宋体">*</font></div> | |||
@@ -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 '<span class=\"label label-success\">已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">编号</div> | |||
<input id="Code" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<input id="Concent" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">回复内容</div> | |||
<input id="ReplyContent" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_receive" class="btn btn-default"><i class="fa fa-plus"></i> 回复</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/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(); | |||
} |
@@ -1099,6 +1099,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElective\QueryStuSelectResultForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\IndexRecive.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormReceive.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.cshtml" /> | |||
@@ -7821,6 +7823,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormReceive.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\IndexRecive.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -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) | |||