This commit is contained in:
parent
65b8e7df58
commit
5117f2075c
|
|
@ -57,9 +57,13 @@ namespace NP.BO.Controllers
|
|||
vm.Lects = new List<Lect>() { };
|
||||
vm.FileList = new List<File>() { };
|
||||
vm.CMPRs = new List<CMPR>() { };
|
||||
vm.Councels = new List<Councel>() { };
|
||||
vm.ComCodes2 = GetComCodes("bldgcat");
|
||||
if (vm.intval > 0)
|
||||
{
|
||||
vm.User = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", vm.intval } , { "includesysadmin", 1 } }).First();
|
||||
vm.Councel = new Councel() { };
|
||||
vm.Councels = Dao.Get<Councel>("users.councels", new System.Collections.Hashtable() { { "userno", vm.intval } });
|
||||
LogSet(new ActLog() { logtype = 20, logtarget = 21, logdata = vm.User.username + "("+vm.User.userid+")", userno = vm.User.userno, uno = SUserInfo.UserNo, uip = GetUserIP() });
|
||||
if (vm.viewname == "user")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -293,41 +293,79 @@
|
|||
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="panel panel-default" id="boardbox" style="display: none;">
|
||||
<div class="table-responsive" id="excel3">
|
||||
<table class="table table-striped b-t b-light">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20">No</th>
|
||||
<th>기수</th>
|
||||
<th>과정분류</th>
|
||||
<th>강좌명(분반)</th>
|
||||
<th>강의기간</th>
|
||||
<th>강의료</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="data" id="tbody3">
|
||||
@foreach (var item in Model.CMPRs)
|
||||
{
|
||||
<div id="boardbox" style="display: none;">
|
||||
<section class="panel panel-default">
|
||||
<header class="panel-heading font-bold">상담내용입력</header>
|
||||
<div class="panel-body">
|
||||
<form id="mform2" method="post" class="form-horizontal" enctype="multipart/form-data">
|
||||
@Html.HiddenFor(m => m.Councel.bno)
|
||||
<input type="hidden" id="intval2" name="intval2" value="@Model.intval" />
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">문의구분</label>
|
||||
<div class="col-lg-10">
|
||||
@Html.Partial("./Partial/Select", Model.ComCodes2, new ViewDataDictionary { {"class","form-control"} ,{ "name", "Councel.bldgcat" }, { "selected", null }, { "style", "width: 30%;padding:3px 5px;" }, { "df", ":선택" } })
|
||||
</div>
|
||||
</div>
|
||||
<div class="line line-dashed line-lg pull-in"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">문의내용</label>
|
||||
<div class="col-lg-10">
|
||||
@Html.TextAreaFor(m=>m.Councel.qtext, new { @class = "form-control",@rows="2", @style = "resize:none; width:90%;padding:3px 5px;" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="line line-dashed line-lg pull-in"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">답변내용</label>
|
||||
<div class="col-lg-10">
|
||||
@Html.TextAreaFor(m=>m.Councel.atext, new {@class="form-control", @rows = "2", @style="resize:none; width:90%; padding:3px 5px;" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="line line-dashed line-lg pull-in"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-10">
|
||||
<a href="#" class="btn btn-info" id="btnadd" onclick="save2();">등록</a>
|
||||
<a href="#" class="btn btn-primary" style="display:none;" id="btnsave" onclick="save2();">저장</a>
|
||||
<a href="#" class="btn btn-danger" style="display:none;" id="btndelete" onclick="del2();">삭제</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
<section class="panel panel-default">
|
||||
<header class="panel-heading font-bold">상담이력</header>
|
||||
<div class="table-responsive" id="excel4">
|
||||
<table class="table table-striped b-t b-light">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>@item.rnorvt</td>
|
||||
<td>@item.tmname</td>
|
||||
<td>@item.cgname</td>
|
||||
<td class="text-left">@item.cname (@item.classno)</td>
|
||||
<td>@string.Format("{0} ~{1}", item.sstime == null ? "" : item.sstime.Value.ToString("yy-MM-dd"), item.setime == null ? "" : item.setime.Value.ToString("yy-MM-dd"))</td>
|
||||
<td><input type="text" class="pfee form-control int text-right" data-cmno="@item.cmno" value="@item.pfee.ToString("#,0")" /></td>
|
||||
<th width="20">No</th>
|
||||
<th>기수</th>
|
||||
<th>과정분류</th>
|
||||
<th>강좌명(분반)</th>
|
||||
<th>강의기간</th>
|
||||
<th>강의료</th>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="botfixempty"> </div>
|
||||
<div class="form-group botfix">
|
||||
<a href="#" class="btn btn-primary" onclick="savepfee();">저장</a>
|
||||
<a href="#" class="btn btn-select" onclick="prt();">인쇄</a>
|
||||
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
||||
</div>
|
||||
</section>
|
||||
</thead>
|
||||
<tbody class="data" id="tbody4">
|
||||
@foreach (var item in Model.Councels)
|
||||
{
|
||||
<tr data-bno="@item.bno" data-bldgcat="@item.bldgcat">
|
||||
<td>@item.rnorvt</td>
|
||||
<td>@item.bldgcatname</td>
|
||||
<td class="qt">@item.qtext</td>
|
||||
<td class="link at"><a href="#" onclick="javascript:councelup(this);">@item.atext</a></td>
|
||||
<td>@item.cdtymdnlhms</td>
|
||||
<td>@(item.coname) (@(item.coid))</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="botfixempty"> </div>
|
||||
<div class="form-group botfix">
|
||||
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<form id="dform" method="post" action="/user/@(Model.viewname)s">
|
||||
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
|
||||
</form>
|
||||
|
|
@ -346,15 +384,19 @@
|
|||
{
|
||||
@Html.Partial("./Partial/Summernote")
|
||||
}
|
||||
<style type="text/css">
|
||||
tr.red{border: 2px solid red;}
|
||||
</style>
|
||||
}
|
||||
@section scripts{
|
||||
<script>
|
||||
function gotab(idx) {
|
||||
$("#tabidx").val(idx);
|
||||
$("#lectbox, #regbox, #profbox, #boardbox").hide();
|
||||
if (idx == 0) { $("#regbox").show(); }
|
||||
if (idx == 0) { $("#regbox").show();}
|
||||
else if (idx == 1) { $("#lectbox").show(); }
|
||||
else if (idx == 2) { $("#profbox").show(); }
|
||||
else if (idx == 2) { $("#boardbox").show(); }
|
||||
else if (idx == 3) { $("#boardbox").show(); }
|
||||
}
|
||||
function bindAssign(data) {
|
||||
var v = data.split(':')[0];
|
||||
|
|
@ -367,6 +409,7 @@
|
|||
setv("User_asno", "");
|
||||
}
|
||||
$(document).ready(function () {
|
||||
gotab(@Model.tabidx);
|
||||
if ('@(Model.User.userno)' != '0') {
|
||||
$("#User_userid").attr("readonly", "readonly");
|
||||
}
|
||||
|
|
@ -484,5 +527,70 @@
|
|||
msgok(1);
|
||||
}
|
||||
}
|
||||
function councelup(obj) {
|
||||
$("#tbody4").find("tr").removeClass("red");
|
||||
$("#btnadd").hide();
|
||||
$("#btnsave").hide();
|
||||
$("#btndelete").hide();
|
||||
//선택된거면 해제(등록모드로 변경)
|
||||
if ($("#Councel_bno").val() == $(obj).closest("tr").attr("data-bno")) {
|
||||
$("#btnadd").show();
|
||||
$("#Councel_bno").val(0);
|
||||
$("#Councel_bldgcat").val("");
|
||||
$("#Councel_qtext").val("");
|
||||
$("#Councel_atext").val("");
|
||||
} else {
|
||||
$("#btnsave").show();
|
||||
$("#btndelete").show();
|
||||
$("#Councel_bno").val($(obj).closest("tr").attr("data-bno"));
|
||||
$("#Councel_bldgcat").val($(obj).closest("tr").attr("data-bldgcat"));
|
||||
$("#Councel_qtext").val($(obj).closest("tr").find("td.qt").text());
|
||||
$("#Councel_atext").val($(obj).closest("tr").find("td.at").text());
|
||||
$(obj).closest("tr").addClass("red");
|
||||
}
|
||||
}
|
||||
function save2() {
|
||||
if ($("#Councel_bldgcat") == "") { msg("문의구분을 선택하세요."); }
|
||||
else if (check("Councel_qtext", null, "문의내용을 입력하세요.")) { }
|
||||
else if (check("Councel_atext", null, "답변내용을 입력하세요.")) { }
|
||||
else {
|
||||
if ($("#Councel_bno").val() > 0) {
|
||||
if (confirm("변경하시겠습니까?")) {
|
||||
capfileform("/acommon/councelsave", "mform2", "cbsave2");
|
||||
}
|
||||
} else {
|
||||
if (confirm("등록하시겠습니까?")) {
|
||||
capfileform("/acommon/councelsave", "mform2", "cbsave2");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function cbsave2() {
|
||||
if (capResult.code == 1000) {
|
||||
msgok(1, "", true);
|
||||
$("#dform_tabidx").val(3);
|
||||
$("#dform").attr("#action","/user/@(Model.viewname)reg").submit();
|
||||
} else {
|
||||
msgdev();
|
||||
}
|
||||
}
|
||||
function del2(){
|
||||
if ($("#Councel_bno").val() > 0) {
|
||||
if (confirm("삭제하시겠습니까?")) {
|
||||
capp("/acommon/counceldel", { bno: $("#Councel_bno").val() }, "cbdel2");
|
||||
}
|
||||
} else {
|
||||
msg("삭제할 상담을 선택하세요.");
|
||||
}
|
||||
}
|
||||
function cbdel2() {
|
||||
if (capResult.code == 1000) {
|
||||
msgok(0, "", true);
|
||||
$("#dform_tabidx").val(3);
|
||||
$("#dform").attr("action", "/user/@(Model.viewname)reg").submit();
|
||||
} else {
|
||||
msgdev();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
<th>핸드폰</th>
|
||||
<th style="width:60px;">상태</th>
|
||||
<th>최근로그인</th>
|
||||
<th>상담하기</th>
|
||||
<th>입장</th>
|
||||
}
|
||||
else if (Model.viewname == "professor")
|
||||
|
|
@ -83,6 +84,7 @@ else if (Model.viewname == "admin")
|
|||
<td>@item.mobile</td>
|
||||
<td>@item.statusname</td>
|
||||
<td>@item.logintime.ToString("yy-MM-dd HH:mm")</td>
|
||||
<td><a href="#" onclick="gocouncel(@item.userno)">[상담하기]</a></td>
|
||||
<td><a href="#" onclick="ee(@item.userno)">[입장]</a></td>
|
||||
</tr>
|
||||
}
|
||||
|
|
@ -244,6 +246,11 @@ else if (Model.viewname == "admin")
|
|||
msg("업로드가 실패했습니다.<br /><br /><br />" + capResult.msg, null, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function gocouncel(no) {
|
||||
setv("dform_intval", no);
|
||||
$("#dform_tabidx").val(3);
|
||||
$("#dform").attr("action","/user/@(Model.viewname)reg").submit();
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
|
@ -55,8 +55,8 @@
|
|||
<!--<add key="talk" value="https://alimtalk-api.bizmsg.kr/v2/sender/send,?,?,?,?,?,023103312" />-->
|
||||
|
||||
<!--<add key="configpath" value="Product" />-->
|
||||
<!--<add key="configpath" value="ProductDev" />-->
|
||||
<add key="configpath" value="Staging" />
|
||||
<add key="configpath" value="ProductDev" />
|
||||
<!--<add key="configpath" value="Staging" />-->
|
||||
|
||||
|
||||
<add key="lgdacomConfigPath" value="D:\3rdparti\lgdacomyicte" />
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -216,6 +216,27 @@ namespace NP.Base.Controllers
|
|||
{
|
||||
return JsonOK(Dao.Save("users.exitjoin", new Hashtable() { { "usernos", usernos }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } }));
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult CouncelSave(VMUser vm)
|
||||
{
|
||||
vm.Councel.uno = SUserInfo.UserNo; vm.Councel.uip = GetUserIP();
|
||||
vm.Councel.userno = vm.intval2;
|
||||
//수정
|
||||
if(vm.Councel.bno < 1)
|
||||
{
|
||||
Dao.Insert("councel.in", vm.Councel);
|
||||
return JsonOK(vm.Councel.bno);
|
||||
}
|
||||
else
|
||||
{
|
||||
return JsonOK(Dao.Save("councel.up", vm.Councel));
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult CouncelDel(int bno)
|
||||
{
|
||||
return JsonOK(Dao.Save("councel.del",new Hashtable(){ {"bno",bno },{"uno",SUserInfo.UserNo },{"uip",GetUserIP() } }));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1479,5 +1479,6 @@ create table councel (
|
|||
bldgcat smallint not null,
|
||||
qtext mediumtext DEFAULT NULL,
|
||||
atext mediumtext DEFAULT NULL,
|
||||
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
|
||||
isdel tinyint not null default 0,
|
||||
cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
|
||||
,primary key(bno));
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
<typeAlias alias="assignfee" type="NP.Model.AssignFee, NP.Model" />
|
||||
<typeAlias alias="assignman" type="NP.Model.AssignMan, NP.Model" />
|
||||
<typeAlias alias="users.lect" type="NP.Model.Lect, NP.Model" />
|
||||
<typeAlias alias="councel" type="NP.Model.Councel, NP.Model" />
|
||||
</alias>
|
||||
|
||||
<cacheModels>
|
||||
|
|
@ -686,6 +687,39 @@
|
|||
,snsid=#snsid# ,jointype=#jointype#
|
||||
where userno=#userno#
|
||||
</update>
|
||||
|
||||
<select id="users.councels" parameterClass="hashtable" resultClass="councel">
|
||||
select a.bno,a.qtext,a.atext
|
||||
,a.bldgcat
|
||||
,b.cname bldgcatname
|
||||
,a.cdt,c.username coname,c.userid coid
|
||||
,row_number() over(order by a.cdt desc) rno
|
||||
,count(a.cno) over() pagetotalcount
|
||||
from councel a
|
||||
inner join users c on c.userno = a.cno
|
||||
left outer join comcode b on b.ccode = a.bldgcat
|
||||
where a.userno = #userno# and a.isdel = 0
|
||||
</select>
|
||||
|
||||
<insert id="councel.in" parameterClass="hashtable">
|
||||
insert into councel(userno,bldgcat,qtext,atext,<include refid="sql.inc"></include>)
|
||||
values (#userno#,#bldgcat#,#qtext#,#atext#,<include refid="sql.inv"></include>);
|
||||
<selectKey type="post" property="bno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
|
||||
</insert>
|
||||
|
||||
<update id="councel.up" parameterClass="hashtable">
|
||||
update councel set <include refid="sql.up"></include>
|
||||
,bldgcat = #bldgcat#
|
||||
,qtext = #qtext#
|
||||
,atext = #atext#
|
||||
where bno=#bno#
|
||||
</update>
|
||||
|
||||
<update id="councel.del" parameterClass="hashtable">
|
||||
update councel set <include refid="sql.up"></include>
|
||||
,isdel = 1
|
||||
where bno = #bno#
|
||||
</update>
|
||||
</statements>
|
||||
</sqlMap>
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.CodeDom;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
namespace NP.Model
|
||||
|
|
@ -660,4 +661,30 @@ namespace NP.Model
|
|||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Councel : BaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 상담번호
|
||||
/// </summary>
|
||||
public int bno { get; set; }
|
||||
/// <summary>
|
||||
/// 구분
|
||||
/// </summary>
|
||||
public int userno { get; set; }
|
||||
/// <summary>
|
||||
/// 질문
|
||||
/// </summary>
|
||||
public String qtext { get; set; }
|
||||
/// <summary>
|
||||
/// 답변
|
||||
/// </summary>
|
||||
public String atext { get; set; }
|
||||
public int bldgcat { get; set; }
|
||||
public String bldgcatname { get; set; }
|
||||
public String coname{get; set;}
|
||||
public String coid{get; set;}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ namespace NP.Model
|
|||
public String ru { get; set; }
|
||||
public int userno { get; set; }
|
||||
public int pwcallno { get; set; }
|
||||
public Councel Councel{get; set;}
|
||||
public IList<Councel> Councels{get; set;}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue