@@ -62,6 +62,16 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormFiveView() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
/// <summary> | /// <summary> | ||||
@@ -0,0 +1,79 @@ | |||||
@{ | |||||
ViewBag.Title = "心理咨询回复"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">学号</div> | |||||
<input id="StuNo" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="StuName" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">系部</div> | |||||
<div id="DeptNo" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">专业</div> | |||||
<div id="MajorNo" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">身份证号</div> | |||||
<input id="IdentityCardNo" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">性别</div> | |||||
<div id="GenderNo" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">是否单亲</div> | |||||
<div id="IsSingle" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">联系电话</div> | |||||
<input id="mobile" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">校内电话</div> | |||||
<input id="InSchoolTelephone" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||||
<div class="lr-form-item-title">现住址</div> | |||||
<input id="InSchoolAddress" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">提交日期</div> | |||||
<input id="CreateTime" type="text" class="form-control" readonly /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">咨询内容</div> | |||||
<textarea id="Concent" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">咨询附件</div> | |||||
<div id="StuUrl"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">教师操作<font face="宋体">*</font></div> | |||||
<div id="ReplyType" isvalid="yes" checkexpession="NotNull" readonly></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">指派教师</div> | |||||
<div id="Appointor" readonly > </div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">回复内容</div> | |||||
<textarea id="ReplyContent" class="form-control" style="height:100px;" readonly></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Url"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/PsychologyReplyInfo/FormFiveView.js") |
@@ -0,0 +1,101 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-03-06 12:21 | |||||
* 描 述:心理咨询回复 | |||||
*/ | |||||
var acceptClick; | |||||
var PsychologyInfoId = request('PsychologyInfoId'); | |||||
var type = request('type'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var objectId = '1b3b9b47-450e-45ab-8264-14ef89106f83'; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#ReplyUser').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||||
$('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#Appointor').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||||
$('#ReplyType').lrselect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList', | |||||
param: { itemCode: 'ReplyType' }, | |||||
value: 'F_ItemValue', | |||||
text: 'F_ItemName' | |||||
}); | |||||
//$('#ReplyType').lrselect({ | |||||
// url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList', | |||||
// param: { itemCode: 'ReplyType' }, | |||||
// value: 'F_ItemValue', | |||||
// text: 'F_ItemName', | |||||
// select: | |||||
// function (item) { | |||||
// if (item) { | |||||
// if (item.F_ItemValue == '1') { | |||||
// //上报 | |||||
// $('#ReplyContent').attr('readonly', 'readonly'); | |||||
// $('#ReplyContent').val(''); | |||||
// $('#ReplyContent').prev().html('回复内容'); | |||||
// $('#ReplyContent').removeAttr('isvalid'); | |||||
// $('#Appointor').removeAttr('readonly'); | |||||
// //$('#Appointor').prev().html('指派教师<font face="宋体">*</font>'); | |||||
// //$('#Appointor').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||||
// } else { | |||||
// //回复 | |||||
// $('#ReplyContent').removeAttr('readonly'); | |||||
// $('#ReplyContent').prev().html('回复内容<font face="宋体">*</font>'); | |||||
// $('#ReplyContent').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||||
// $('#Appointor').attr('readonly', 'readonly'); | |||||
// $('#Appointor').lrselectSet(''); | |||||
// //$('#Appointor').remove(); | |||||
// //$('#Appointor').removeAttr('isvalid'); | |||||
// } | |||||
// } | |||||
// } | |||||
//}); | |||||
$('#Url').lrUploader(); | |||||
$('#StuUrl').lrUploader({ isUpload: false }); | |||||
}, | |||||
initData: function () { | |||||
if (!!PsychologyInfoId) { | |||||
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetFormDataByPsychologyInfoId?PsychologyInfoId=' + PsychologyInfoId + '&type=' + type, function (data) { | |||||
console.log(data, "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 strEntity = $('body').lrGetFormData(); | |||||
strEntity.ReplyUser = learun.clientdata.get(['userinfo']).account; | |||||
strEntity.ReplyTime = learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'); | |||||
var postData = { | |||||
strEntity: JSON.stringify(strEntity) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'formview', | id: 'formview', | ||||
title: '查看', | title: '查看', | ||||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormView?PsychologyInfoId=' + PsychologyInfoId, | |||||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormFiveView?PsychologyInfoId=' + PsychologyInfoId, | |||||
width: 800, | width: 800, | ||||
height: 700, | height: 700, | ||||
btn: null, | btn: null, | ||||
@@ -1510,6 +1510,7 @@ | |||||
<Content Include="Areas\LR_Desktop\Views\LoginStatistics\Index.js" /> | <Content Include="Areas\LR_Desktop\Views\LoginStatistics\Index.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.js" /> | <Content Include="Areas\LR_Desktop\Views\MessageRind\Form.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.js" /> | <Content Include="Areas\LR_Desktop\Views\MessageRind\Index.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFiveView.js" /> | |||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormSix.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormSix.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormView.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormView.js" /> | ||||
@@ -8091,6 +8092,7 @@ | |||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index4.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index4.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormSix.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormSix.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFiveView.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -138,14 +138,16 @@ where a.Id='{keyValue}'"; | |||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" | strSql.Append(@" | ||||
info.StuNo,info.createtime as SubmitTime,info.Concent | info.StuNo,info.createtime as SubmitTime,info.Concent | ||||
,t.ReplyUser,t.ReplyContent,t.ReplyTime,a.ReplyType,t.url,info.[state],info.id as PsychologyInfoId ,info.url as StuUrl | |||||
,t.ReplyUser,t.ReplyContent,t.ReplyTime,a.ReplyType,ss.Appointor,t.url,info.[state],info.id as PsychologyInfoId ,info.url as StuUrl | |||||
FROM PsychologyInfo info "); | FROM PsychologyInfo info "); | ||||
strSql.Append(@" join StuInfoBasic s on info.StuNo=s.StuNo | strSql.Append(@" join StuInfoBasic s on info.StuNo=s.StuNo | ||||
left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | ||||
"); | "); | ||||
strSql.Append($" left join (select * from PsychologyReplyInfo where [state]='{type}' ) a on a.PsychologyInfoid=info.id "); | strSql.Append($" left join (select * from PsychologyReplyInfo where [state]='{type}' ) a on a.PsychologyInfoid=info.id "); | ||||
strSql.Append($" left join(select * from PsychologyReplyInfo where [state]= 6)ss on ss.PsychologyInfoid = info.id "); | |||||
strSql.Append($" WHERE 1=1 and info.[state]>=2 and info.Id='{PsychologyInfoId}'"); | strSql.Append($" WHERE 1=1 and info.[state]>=2 and info.Id='{PsychologyInfoId}'"); | ||||
return this.BaseRepository("CollegeMIS").FindList<PsychologyReplyInfoEntity>(strSql.ToString()).FirstOrDefault(); | return this.BaseRepository("CollegeMIS").FindList<PsychologyReplyInfoEntity>(strSql.ToString()).FirstOrDefault(); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||