@@ -1,4 +1,5 @@ | |||
using Learun.Util; | |||
using System; | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
@@ -44,6 +45,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexRecive() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormReceive() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormViewReceive() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormViewReceiveData() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -126,11 +149,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
Sys_PsychologicalCounseEntity entity = strEntity.ToObject<Sys_PsychologicalCounseEntity>(); | |||
sys_PsychologicalCounseIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 心理咨询回复 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveReceiveForm(string keyValue, string strEntity) | |||
{ | |||
Sys_PsychologicalCounseEntity entity = strEntity.ToObject<Sys_PsychologicalCounseEntity>(); | |||
entity.ReplyFlag = true; | |||
entity.ReplyTime = DateTime.Now; | |||
entity.ReplyUserId = LoginUserInfo.Get().userId; | |||
sys_PsychologicalCounseIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -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" value="@ViewBag.Code" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询内容<font face="宋体">*</font></div> | |||
@@ -3,13 +3,17 @@ | |||
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="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" /> | |||
</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 class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</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="ReplyContent" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormReceive.js") |
@@ -39,7 +39,7 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SaveReceiveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -0,0 +1,19 @@ | |||
@{ | |||
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" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</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="ReplyContent" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormViewReceive.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(); | |||
} |
@@ -0,0 +1,27 @@ | |||
@{ | |||
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" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse"> | |||
<div class="lr-form-item-title">回复内容</div> | |||
<textarea id="ReplyContent" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse"> | |||
<div class="lr-form-item-title">回复时间</div> | |||
<input id="ReplyTime" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse"> | |||
<div class="lr-form-item-title">回复人</div> | |||
<input id="ReplyUserId" type="text" class="form-control" readonly="readonly" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormViewReceiveData.js") |
@@ -0,0 +1,60 @@ | |||
/* * 版 本 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]); | |||
} | |||
if (data["Sys_PsychologicalCounse"].ReplyUserId) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: data["Sys_PsychologicalCounse"].ReplyUserId, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
$('#ReplyUserId').val(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
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(); | |||
} |
@@ -11,7 +11,7 @@ | |||
<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> | |||
<div class="lr-form-item-title">咨询编号</div> | |||
<input id="Code" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
@@ -37,7 +37,12 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.SendFlag !== false) { | |||
learun.alert.warning("选中记录已提交,不能编辑!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -53,7 +58,12 @@ var bootstrap = function ($, learun) { | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.SendFlag !== false) { | |||
learun.alert.warning("选中记录已提交,不能删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/DeleteForm', { keyValue: keyValue }, function () { | |||
@@ -63,16 +73,11 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//// 打印 | |||
//$('#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; | |||
@@ -98,23 +103,23 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 回复情况 | |||
$('#lr_reply').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SComplaintId'); | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.SendFlag !== 1) { | |||
learun.alert.warning("当前投诉意见未提交,请先提交!"); | |||
if (selectedRow.SendFlag !== true) { | |||
learun.alert.warning("当前咨询未提交,请先提交!"); | |||
return false; | |||
} | |||
if (selectedRow.ReplyFlag !== 1) { | |||
learun.alert.warning("当前投诉意见未回复!"); | |||
if (selectedRow.ReplyFlag !== true) { | |||
learun.alert.warning("当前咨询未回复!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'replylistSys_SendComplaint', | |||
id: 'formviewreceive', | |||
title: '回复情况', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendComplaint/ReplyList?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/FormViewReceiveData?keyValue=' + keyValue, | |||
width: 700, | |||
height: 500, | |||
btn: null | |||
}); | |||
} | |||
@@ -142,7 +147,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "回复状态", name: "ReplyFlag", 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>'; | |||
@@ -158,6 +163,8 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
var uid = learun.clientdata.get(['userinfo']).userId; | |||
param.SqlParameter = " and CreateUserId='" + uid + "'"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -2,7 +2,7 @@ | |||
ViewBag.Title = "心理咨询"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
@@ -11,17 +11,17 @@ | |||
<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> | |||
<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 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> | |||
@@ -1,147 +1,154 @@ | |||
/* * 版 本 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(); | |||
} | |||
/* * 版 本 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_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formviewreceive', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/FormViewReceive?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
// 回复 | |||
$('#lr_receive').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.ReplyFlag !== false) { | |||
learun.alert.warning("当前咨询已回复!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formreceive', | |||
title: '回复', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/FormReceive?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
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: "ReplyFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === true) { | |||
return '<span class=\"label label-success\">已回复</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未回复</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "回复时间", name: "ReplyTime", width: 150, align: "left" }, | |||
{ | |||
label: "回复人", name: "ReplyUserId", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
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\FormViewReceiveData.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormViewReceive.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" /> | |||
@@ -7825,6 +7827,8 @@ | |||
<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" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormViewReceive.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormViewReceiveData.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -49,6 +49,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("Concent", "%" + queryParam["Concent"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Concent Like @Concent "); | |||
} | |||
if (!queryParam["ReplyContent"].IsEmpty()) | |||
{ | |||
dp.Add("ReplyContent", "%" + queryParam["ReplyContent"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ReplyContent Like @ReplyContent "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository().FindList<Sys_PsychologicalCounseEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||