This commit is contained in:
hyunho 2020-11-17 08:36:55 +00:00
parent 734bed43e3
commit 9694c617e4
5 changed files with 260 additions and 162 deletions

View File

@ -452,6 +452,33 @@ namespace NP.Base.Controllers
return JsonBack(new JsonRtn() { code = 1000, obj = Dao.Get<Users>("users.users.foroffby", usernos) }); return JsonBack(new JsonRtn() { code = 1000, obj = Dao.Get<Users>("users.users.foroffby", usernos) });
} }
[HttpPost]
public JsonResult PayRfdSaveFinal(PayRfd p)
{
p.uno = SUserInfo.UserNo; p.uip = GetUserIP();
Int64? fgnor = (Int64?)null;
if (Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0)
{
fgnor = SetFile(Request.Files.GetMultiple("file2").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payrfd", "fgnor");
}
Int64? fgnob = (Int64?)null;
if (Request.Files.GetMultiple("file3").Where(w => !string.IsNullOrEmpty(w.FileName)).Count() > 0)
{
fgnob = SetFile(Request.Files.GetMultiple("file3").Where(w => !string.IsNullOrEmpty(w.FileName)).ToList(), 0, "payrfd", "fgnob");
}
p.fgnor = fgnor;
p.fgnob = fgnob;
return JsonOK(Dao.Save("pay.payrfd.up", p));
}
[HttpPost]
public JsonResult PayRfdSelfCancel(PayRfd p)
{
p.uno = SUserInfo.UserNo; p.uip = GetUserIP();
p.rstatus = 4; //자진취소
return JsonOK(Dao.Save("pay.payrfdcancel.up", p));
}
} }

View File

@ -670,6 +670,7 @@
from payrfd a from payrfd a
<dynamic prepend="where"> <dynamic prepend="where">
<isNotNull property="payno" prepend="and">a.payno=#payno#</isNotNull> <isNotNull property="payno" prepend="and">a.payno=#payno#</isNotNull>
<isNotNull property="rstatus" prepend="and">a.rstatus&gt;&lt;#rstatus#</isNotNull>
</dynamic> </dynamic>
order by a.cdt desc order by a.cdt desc
</select> </select>
@ -760,10 +761,12 @@
order by d.rfdno,b.rstatus,ispast,b.pino order by d.rfdno,b.rstatus,ispast,b.pino
</select> </select>
<insert id="pay.payrfd.in" parameterClass="payrfd"> <insert id="pay.payrfd.in" parameterClass="payrfd">
insert into payrfd(payno,rtext,bankname,bankno,bankowner,isowner,rstatus,<include refid="sql.inc"></include>) insert into payrfd(payno,rtext,bankname,bankno,bankowner,isowner,rstatus,ruser,rphone,rreason,fgnor,fgnob,<include refid="sql.inc"></include>)
select distinct #payno#,#rtext#,#bankname# select distinct #payno#,#rtext#,#bankname#
,HEX(AES_ENCRYPT(#bankno#, <include refid="sql.digest"></include>)) ,HEX(AES_ENCRYPT(#bankno#, <include refid="sql.digest"></include>))
,#bankowner#,#isowner#,#rstatus#,<include refid="sql.inv"></include> ,#bankowner#,#isowner#,#rstatus#,#ruser#
,HEX(AES_ENCRYPT(#rphone#, <include refid="sql.digest"></include>))
,#rreason#,#fgnor#,#fgnob#,<include refid="sql.inv"></include>
from pay a from pay a
inner join payitem b on b.payno=a.payno and b.pino in ($pinos$) and a.pstatus=1 and a.rstatus=0 inner join payitem b on b.payno=a.payno and b.pino in ($pinos$) and a.pstatus=1 and a.rstatus=0
left outer join cm c0 on b.ptype in (0,4) and c0.cmno=b.itemno and ifnull(c0.retime,date_add(now(), interval 1 day)) &gt; now() left outer join cm c0 on b.ptype in (0,4) and c0.cmno=b.itemno and ifnull(c0.retime,date_add(now(), interval 1 day)) &gt; now()
@ -782,6 +785,16 @@
left outer join exam c3 on b.ptype=3 and c3.exno=b.itemno and c3.retime &gt; now() left outer join exam c3 on b.ptype=3 and c3.exno=b.itemno and c3.retime &gt; now()
where a.payno=#payno# and a.userno=#uno# and a.pstatus=1 and a.rstatus &lt; 2 and (b.ptype=2 or c0.cmno is not null or c3.exno is not null) where a.payno=#payno# and a.userno=#uno# and a.pstatus=1 and a.rstatus &lt; 2 and (b.ptype=2 or c0.cmno is not null or c3.exno is not null)
</update> </update>
<update id="pay.payrfd.up" parameterClass="hashtable">
update payrfd
set fgnor=#fgnor#,fgnob=#fgnob#,udt=now(),uno=#uno#,uip=#uip#
where payno=#payno#
</update>
<update id="pay.payrfdcancel.up" parameterClass="hashtable">
update payrfd
set rstatus=#rstatus#,udt=now(),uno=#uno#,uip=#uip#
where payno=#payno#
</update>
<update id="pay.unpay" parameterClass="hashtable"> <update id="pay.unpay" parameterClass="hashtable">
update examuser a update examuser a
inner join pay b on b.payno=a.payno and b.pstatus=22 and b.ptype=3 and b.ispg=1 <!--and b.paylimit &lt; now()--> and b.isunpay is null and b.userno=a.userno inner join pay b on b.payno=a.payno and b.pstatus=22 and b.ptype=3 and b.ispg=1 <!--and b.paylimit &lt; now()--> and b.isunpay is null and b.userno=a.userno

View File

@ -245,10 +245,29 @@ namespace NP.FO.Controllers
vm.PayItems = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }); vm.PayItems = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } });
vm.PayItem = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }).FirstOrDefault(); vm.PayItem = Dao.Get<PayItem>("pay.mypayitem", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo }, { "payno", vm.payno } }).FirstOrDefault();
vm.intval3 = Dao.Get<PayRfd>("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno },{ "rstatus", 0} }).Count(); vm.intval3 = Dao.Get<PayRfd>("pay.mypayrfd", new System.Collections.Hashtable() { { "payno", vm.Pay.payno },{ "rstatus", 0} }).Count();
vm.PayRfd = null;
if (vm.intval3 > 0) if (vm.intval3 > 0)
{ {
vm.PayRfd = Dao.Get<PayRfd>("pay.mypayrfdinfo", new System.Collections.Hashtable() {{ "payno", vm.payno } }).FirstOrDefault(); vm.PayRfd = Dao.Get<PayRfd>("pay.mypayrfdinfo", new System.Collections.Hashtable() {{ "payno", vm.payno }, { "rstatus", 4 } }).FirstOrDefault();
vm.FileList = new List<File>() { };
if (vm.PayRfd.fgnor != null)
{
var fgnos = "";
if (vm.PayRfd.fgnor != null)
{
fgnos += "," + vm.PayRfd.fgnor;
}
if (vm.PayRfd.fgnob != null)
{
fgnos += "," + vm.PayRfd.fgnob;
}
if (fgnos != "")
{
vm.FileList = GetFiles(fgnos.Substring(1));
}
}
} }
return View(vm); return View(vm);
} }
public ActionResult QNAs(VMCC vm) public ActionResult QNAs(VMCC vm)

View File

@ -4,7 +4,7 @@
} }
<style> <style>
.confirmokbutton { .confirmokbutton {
color:white; color: white;
} }
</style> </style>
<h4 class="bskTitle">주문상품 정보</h4> <h4 class="bskTitle">주문상품 정보</h4>
@ -17,7 +17,7 @@
<span class="blu">강좌</span> <span class="blu">강좌</span>
<span class="ppl">@Model.PayItem.cshapename</span> <span class="ppl">@Model.PayItem.cshapename</span>
@Html.Raw(Model.PayItem.isrebate == 1 ? "<span class=\"grn\">환급</span>" : "") @Html.Raw(Model.PayItem.isrebate == 1 ? "<span class=\"grn\">환급</span>" : "")
<b style="color:@(Model.PayItem.pstatus==22?"red":"")">@Model.PayItem.itemname</b> <b style="color:@(Model.PayItem.pstatus == 22 ? "red" : "")">@Model.PayItem.itemname</b>
</h5> </h5>
<dl> <dl>
<dd>학습기간 : <span class="red">@(Convert.ToDateTime(Model.PayItem.sstime).ToShortDateString()) ~ @(Convert.ToDateTime(Model.PayItem.setime).ToShortDateString())</span></dd> <dd>학습기간 : <span class="red">@(Convert.ToDateTime(Model.PayItem.sstime).ToShortDateString()) ~ @(Convert.ToDateTime(Model.PayItem.setime).ToShortDateString())</span></dd>
@ -58,21 +58,24 @@
<tr> <tr>
<th>환불상태</th> <th>환불상태</th>
<td> <td>
@if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null)) @if (Model.intval3 > 0)
{ {
<label>서류접수대기</label> <a href="#" style="color:blue">[서류등록/취소]</a> <a href="#" style="color:blue">[신청서출력]</a> if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null))
} {
else if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) <label>서류접수대기</label> <a href="#" style="color:blue" onclick="refund();">[서류등록/취소]</a> <a href="#" style="color:blue">[신청서출력]</a>
{ }
<label>접수완료</label><label id="rfdDate">(@Model.PayRfd.udt) 서류심사중</label> <a href="#" style="color:blue">[상세내용조회/취소]</a> <a href="#" style="color:blue">[신청서출력]</a> else if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null))
} {
else if (Model.PayRfd.rstatus == 1 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) <label>접수완료</label><label id="rfdDate">(@Model.PayRfd.udt) 서류심사중</label> <a href="#" style="color:blue" onclick="refund();">[상세내용조회/취소]</a> <a href="#" style="color:blue">[신청서출력]</a>
{ }
<label>환불불가</label><label id="rfdDate">(@Model.PayRfd.udt)</label> <a href="#" style="color:blue">[상세내용조회]</a> <a href="#" style="color:blue">[신청서출력]</a> else if (Model.PayRfd.rstatus == 1 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null))
} {
else if (Model.PayRfd.rstatus == 2 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null)) <label>환불불가</label><label id="rfdDate">(@Model.PayRfd.udt)</label> <a href="#" style="color:blue" onclick="refund();">[상세내용조회]</a> <a href="#" style="color:blue">[신청서출력]</a>
{ }
<label>환불완료</label><label id="rfdDate">(@Model.PayRfd.udt)</label> <a href="#" style="color:blue">[상세내용조회]</a> <a href="#" style="color:blue">[신청서출력]</a> else if (Model.PayRfd.rstatus == 2 && (Model.PayRfd.fgnob != null && Model.PayRfd.fgnor != null))
{
<label>환불완료</label><label id="rfdDate">(@Model.PayRfd.udt)</label> <a href="#" style="color:blue" onclick="refund();">[상세내용조회]</a> <a href="#" style="color:blue">[신청서출력]</a>
}
} }
</td> </td>
</tr> </tr>
@ -94,7 +97,15 @@
} }
@if (Model.Pay.pstatus == 1 && Model.Pay.rstatus != 2 && Model.PayItems.Where(w => w.rstatus == 0).Count() > 0) @if (Model.Pay.pstatus == 1 && Model.Pay.rstatus != 2 && Model.PayItems.Where(w => w.rstatus == 0).Count() > 0)
{ {
<li><a href="#" onclick="refund()" class="bk">환불요청</a></li> if (Model.intval3 > 0 && (Model.PayRfd.rstatus == 0 || Model.PayRfd.rstatus == 1))
{
<li><a href="#" onclick="refund()" class="bk" style="display:none">환불요청</a></li>
}
else
{
<li><a href="#" onclick="refund()" class="bk">환불요청</a></li>
}
} }
@if (Model.Pay.rstatus < 2 && Model.Pay.pstatus == 22) @if (Model.Pay.rstatus < 2 && Model.Pay.pstatus == 22)
{ {
@ -218,22 +229,22 @@
<form id="mform2" method="post"> <form id="mform2" method="post">
<input type="hidden" id="pinos2" name="pinos" value="@Model.PayItem.pino" /> <input type="hidden" id="pinos2" name="pinos" value="@Model.PayItem.pino" />
<input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" /> <input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" />
<input type="hidden" name="ptype" id="ptype" value="0" /> @*ptype은 0만 쓰기로*@ <input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" />
<h4 class="bskTitle">환불정보</h4> <h4 class="bskTitle">환불정보</h4>
<table class="odrTable th150"> <table class="odrTable th150">
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")"> <tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;" : "")">
<th>환불은행</th> <th>환불은행</th>
<td><input type="text" name="bankname" id="bankname" maxlength="30" value="" /></td> <td><input type="text" name="bankname" id="bankname" maxlength="30" value="" /></td>
</tr> </tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")"> <tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;" : "")">
<th>예금주</th> <th>예금주</th>
<td><input type="text" name="bankowner" id="bankowner" maxlength="30" /></td> <td><input type="text" name="bankowner" id="bankowner" maxlength="30" /></td>
</tr> </tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")"> <tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;" : "")">
<th>환불계좌</th> <th>환불계좌</th>
<td><input type="text" name="bankno" id="bankno" maxlength="30" value="" /></td> <td><input type="text" name="bankno" id="bankno" maxlength="30" value="" /></td>
</tr> </tr>
<tr style="@(Model.Pay.ptype == 1 ? "display:none;":"")"> <tr style="@(Model.Pay.ptype == 1 ? "display:none;" : "")">
<th>개인계좌여부</th> <th>개인계좌여부</th>
<td> <td>
<input type="hidden" name="isowner" id="isowner" /> <input type="hidden" name="isowner" id="isowner" />
@ -270,132 +281,103 @@
</tr> </tr>
</table> </table>
<p class="odrpDesc" style="color:red">
※ 위 신청서를 작성한 이후, 신청서를 날인/스캔하여 통장사본과 같이 업로드를 해주셔야 합니다.
</p>
<h4 class="bskTitle">환불규정</h4>
<div>평생교육법 제28조 제4항에 따른 학습비의 반환사유가 발생할 때에는 평생교육시행령 23조의 별표 3의 반환기준에 따라 학습 비 등을 반환사유가 발생한 날부터 5일 이내에 반환하여야 한다.</div>
<br />
</form>
<ul class="odrChk"><li><input type="checkbox" id="chkrefund" /><label for="chkrefund">영남건설기술교육원 환불규정에 동의하고 수강취소 및 환불을 요청합니다.</label></li></ul>
<ul class="odrPopBtn col2">
<li><a href="#" class="bk" onclick="save2()">환불요청</a></li>
<li><a href="#" onclick="mpgPopClose()">취소</a></li>
</ul>
</div><!-- clsPopCont -->
</div>
</div><!-- clsPopWrap -->
</div>
</div>
</div>
<div class="mpgPop mpgPopFull" style="display:none;" id="pop3">
<div>
<div>
<div class="mpgPopWrap wdth750">
<div class="mpgPopTitle">
<h5>취소/환불요청</h5>
<a href="javascript:mpgPopClose();"></a>
</div>
<div class="mpgPopScroll">
<div class="odrPop pop1box">
<h4 class="bskTitle">상품선택</h4>
<table class="odrTable th150">
<tr><th>총결제액/입금일</th><td>@(Model.Pay.payamt.ToString("#,0"))원 (@(Model.Pay.payoktime == null ? "" : Model.Pay.payoktime.Value.ToString("yy-MM-dd HH:mm")))</td></tr>
<tr><th>결제방법</th><td>@Model.Pay.ptypename (@(Model.Pay.ispg == 1 ? "PG" : "현장결제"))</td></tr>
<tr><th>요청강좌</th><td><ul class="odrChk" id="pibox2"></ul></td></tr>
</table>
<form id="mform3" method="post">
<input type="hidden" name="payno" id="payno" value="@Model.Pay.payno" />
<input type="hidden" name="ptype" id="ptype" value="@Model.Pay.ptype" />
<h4 class="bskTitle">환불정보</h4>
<table class="odrTable th150">
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불은행</th>
<td>@Model.PayRfd.bankname</td>
</tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>예금주</th>
<td>@Model.PayRfd.bankowner</td>
</tr>
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>환불계좌</th>
<td>@Model.PayRfd.bankno</td>
</tr>
<tr style="@(Model.Pay.ptype == 1 ? "display:none;":"")">
<th>개인계좌여부</th>
<td>
@if (Model.PayRfd.isowner == 1)
{
<label>예</label>
}
else
{
<label>아니오</label>
}
</td>
</tr>
<tr class="pd5">
<th>담당자</th>
<td>@Model.PayRfd.ruser</td>
</tr>
<tr class="pd5">
<th>담당자연락처</th>
<td>@Model.PayRfd.rphone</td>
</tr>
<tr>
<th>환불요청사유</th>
<td>
@Model.PayRfd.rreasonname
</td>
</tr>
<tr class="pd5">
<th>메모</th>
<td>
@Model.PayRfd.rtext
</td>
</tr>
<tr>
<td>
<p class="odrpDesc" style="color:red">
※ 내용 변경을 원하실 경우 신청을 취소하고 다시 환불요청해주셔야 합니다.
</p>
</td>
</tr>
</table>
<h4 class="bskTitle">첨부서류</h4> @if (Model.intval3 > 0 && Model.PayRfd.rstatus == 0)
<table class="odrTable th150"> {
<tr class="pd5" style="@(Model.Pay.ptype == 1 ? "display:none;":"")"> if (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null)
<th>환불은행</th> {
<td>@Model.PayRfd.bankname</td> <p class="odrpDesc" style="color:red">
</tr> ※ 내용 변경을 원하실 경우 신청을 취소하고 다시 환불요청해주셔야 합니다.
</table> </p>
<h4 class="bskTitle">첨부서류</h4>
<table class="odrTable th150">
<tr class="pd5">
<th>환불신청서</th>
<td><input type="file" name="file2" id="file2" value="" /></td>
</tr>
<tr class="pd5">
<th>통장사본</th>
<td><input type="file" name="file3" id="file3" value="" /></td>
</tr>
</table>
}
}
else if (Model.intval3 > 0 && Model.PayRfd.rstatus == 0)
{
if (Model.PayRfd.fgnob != null || Model.PayRfd.fgnor != null)
{
<h4 class="bskTitle">첨부서류</h4>
<table class="odrTable th150">
<tr class="pd5">
<th>환불신청서</th>
<td><a class="file" href="/focommon/downfile?fno=@(@Model.FileList.Where(x => x.fgno == Model.PayRfd.fgnor).FirstOrDefault().fileno)">@(@Model.FileList.Where(x => x.fgno == Model.PayRfd.fgnor).FirstOrDefault().orgname)</a></td>
</tr>
<tr class="pd5">
<th>통장사본</th>
<td><a class="file" href="/focommon/downfile?fno=@(@Model.FileList.Where(x => x.fgno == Model.PayRfd.fgnob).FirstOrDefault().fileno)">@(@Model.FileList.Where(x => x.fgno == Model.PayRfd.fgnob).FirstOrDefault().orgname)</a></td>
</tr>
</table>
<h4 class="bskTitle">검토결과</h4>
<table class="odrTable th150">
<tr class="pd5">
<th>검토상태</th>
<td>@Model.PayRfd.rstatusname</td>
</tr>
<tr class="pd5">
<th>검토의견</th>
<td>@Model.PayRfd.rback</td>
</tr>
</table>
}
}
@if (Model.intval3 > 0 && Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null))
{
<p class="odrpDesc" style="color:red">
※ 위 신청서를 작성한 이후, 신청서를 날인/스캔하여 통장사본과 같이 업로드를 해주셔야 합니다.
</p>
<h4 class="bskTitle">환불규정</h4>
<div>평생교육법 제28조 제4항에 따른 학습비의 반환사유가 발생할 때에는 평생교육시행령 23조의 별표 3의 반환기준에 따라 학습 비 등을 반환사유가 발생한 날부터 5일 이내에 반환하여야 한다.</div>
<br />
<ul class="odrChk"><li><input type="checkbox" id="chkrefund" /><label for="chkrefund">영남건설기술교육원 환불규정에 동의하고 수강취소 및 환불을 요청합니다.</label></li></ul>
}
</form> </form>
<p class="odrpDesc" style="color:red">
※ 위 신청서를 작성한 이후, 신청서를 날인/스캔하여 통장사본과 같이 업로드를 해주셔야 합니다. @if (Model.intval3 > 0)
</p> {
<h4 class="bskTitle">환불규정</h4> <ul class="odrPopBtn col2">
<div>평생교육법 제28조 제4항에 따른 학습비의 반환사유가 발생할 때에는 평생교육시행령 23조의 별표 3의 반환기준에 따라 학습 비 등을 반환사유가 발생한 날부터 5일 이내에 반환하여야 한다.</div> @if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob == null || Model.PayRfd.fgnor == null))
<br /> {
<ul class="odrChk"><li><input type="checkbox" id="chkrefund" /><label for="chkrefund">영남건설기술교육원 환불규정에 동의하고 수강취소 및 환불을 요청합니다.</label></li></ul> <li><a href="#" class="bk" onclick="save3()">환불 최종요청</a></li>
<ul class="odrPopBtn col2"> }
<li><a href="#" class="bk" onclick="">환불 최종요청</a></li> @if (Model.PayRfd.rstatus == 0 && (Model.PayRfd.fgnob != null || Model.PayRfd.fgnor != null))
<li><a href="#" class="bk" onclick="">환불신청 취소</a></li> {
<li><a href="#" onclick="mpgPopClose()">닫기</a></li> <li><a href="#" class="bk" onclick="cancelRfd()">환불신청 취소</a></li>
</ul> }
<li><a href="#" onclick="mpgPopClose()">닫기</a></li>
</ul>
}
else
{
<ul class="odrPopBtn col2">
<li><a href="#" class="bk" onclick="save2()">환불요청</a></li>
<li><a href="#" onclick="mpgPopClose()">닫기</a></li>
</ul>
}
</div><!-- clsPopCont --> </div><!-- clsPopCont -->
</div> </div>
</div><!-- clsPopWrap --> </div><!-- clsPopWrap -->
</div> </div>
</div> </div>
</div> </div>
@section scriptsHeader{ @section scriptsHeader{
@Html.Partial("./Partial/filescript")
} }
@section scripts{ @section scripts{
<script> <script>
$(document).ready(function () { $(document).ready(function () {
}); });
function viewdvr(isdvr, dvrcode) { function viewdvr(isdvr, dvrcode) {
if (isdvr == 1 && dvrcode != '') { if (isdvr == 1 && dvrcode != '') {
@ -455,7 +437,7 @@
function gogo() { function gogo() {
capfileform('/fcommon/paytaxsave','mform', 'cbgogo'); capfileform('/fcommon/paytaxsave','mform', 'cbgogo');
} }
function cbgogo() { function cbgogo() {
if (capResult.code == 1000) { if (capResult.code == 1000) {
msg("접수되었습니다."); msg("접수되었습니다.");
@ -467,33 +449,52 @@
} }
} }
function refund() { function refund() {
if ('@(Model.Pay.rstatus < 2 && Model.Pay.pstatus == 1?1:0)' == '1') { $('html, body').addClass('lock');
$("#pibox2").html(""); $("#pop2").fadeIn("fast", function () {
sett("prerefundamt", "0원"); $(".pop1box").scrollTop(0);
});
if (@Model.intval3 > 0) {
@*if (@Model.PayRfd != null) {
$("#bankname").val("@Model.PayRfd.bankname").attr("readonly", true);
$("#bankowner").val("@Model.PayRfd.bankowner").attr("readonly", true);
$("#bankno").val("@Model.PayRfd.bankno").attr("readonly", true);
if (@Model.PayRfd.isowner == 0) {
$("input:radio[name=isowners]:radio[value=0]").prop('checked', true);
}
else {
$("input:radio[name=isowners]:radio[value=1]").prop('checked', true);
}
if (@Model.PayRfd.rreason == 0) { $("input:radio[name=rreason]:radio[value=0]").prop('checked', true); }
else if (@Model.PayRfd.rreason == 1) { $("input:radio[name=rreason]:radio[value=0]").prop('checked', true); }
else if (@Model.PayRfd.rreason == 2) { $("input:radio[name=rreason]:radio[value=0]").prop('checked', true); }
else if (@Model.PayRfd.rreason == 9) { $("input:radio[name=rreason]:radio[value=0]").prop('checked', true); }
$("#ruser").val("@Model.PayRfd.ruser").attr("readonly", true);
$("#rphone").val("@Model.PayRfd.rphone").attr("readonly", true);
$("#rtext").val("@Model.PayRfd.rtext").attr("readonly", true).css("background-color", "#f5f5f5");
$("input:radio[name=isowners]").attr('disabled', true);
$("input:radio[name=rreason]").attr('disabled', true);
}*@
}
@*if ('@(Model.Pay.rstatus < 2 && Model.Pay.pstatus == 1?1:0)' == '1') {
capp("/fcommon/payrefundget", { payno: @Model.Pay.payno}, "cbpayrefundget"); capp("/fcommon/payrefundget", { payno: @Model.Pay.payno}, "cbpayrefundget");
} else { } else {
msg("결제완료내역만 계산서요청하실 수 있습니다."); msg("결제완료내역만 계산서요청하실 수 있습니다.");
} }*@
}
function cbpayrefundget() {
var h = capResult.obj.h;
var d = capResult.obj.d;
if (h != null && h.pstatus == 1 && d.length > 0) {
sett("prerefundamt", commaset(h.refundamt) + "원");
$.each(d, function (i, pi) {
$("#pibox2").append("<li><input type=\"checkbox\" " + ((pi.rfdno < 1 || pi.rfdrstatus < 0) && pi.ispast < 1 && pi.rstatus < 1 && pi.pstatus == 1 ? "" : "disabled") +
" class=\"pi\" id=\"pi" + pi.pino + "\" value=\"" + pi.payamt + "\" data-pino=\"" + pi.pino + "\" /><label for=\"pi" + pi.pino + "\">" +
(pi.rstatus > 0 ? "[완료]" : pi.rfdrstatus == 0 ? "[요청]" : pi.rfdrstatus == -1 ? "[반려]" : pi.rfdrstatus == 2 ? "[환불]" : pi.ispast > 0 ? "[종료]" :"[정상]")+(pi.ptype == 2 ? "[교재]" : pi.ptype == 3 ? "[시험]" : "[강좌]") + pi.itemname + "(" + (pi.ptype == 2 || h.isgroup == 0 ? (pi.pcnt + "개") : pi.username) + ", " +
commaset(pi.payamt) + "원)</label></li>");
});
$('html, body').addClass('lock');
$("#pop2").fadeIn("fast", function () {
$(".pop1box").scrollTop(0);
});
} else {
msg("이미 전액환불된 결제내역입니다. 운영자에게 문의해주세요.");
}
} }
//function cbpayrefundget() {
// var h = capResult.obj.h;
// var d = capResult.obj.d;
// if (h != null && h.pstatus == 1 && d.length > 0) {
// $('html, body').addClass('lock');
// $("#pop2").fadeIn("fast", function () {
// $(".pop1box").scrollTop(0);
// });
// } else {
// msg("이미 전액환불된 결제내역입니다. 운영자에게 문의해주세요.");
// }
//}
function save2() { function save2() {
if ('@(Model.Pay.ptype)' != '1' && check("bankname", null, "환불은행명을 입력해주세요.")) { } if ('@(Model.Pay.ptype)' != '1' && check("bankname", null, "환불은행명을 입력해주세요.")) { }
else if ('@(Model.Pay.ptype)' != '1' && check("bankowner", null, "예금주를 입력해주세요.")) { } else if ('@(Model.Pay.ptype)' != '1' && check("bankowner", null, "예금주를 입력해주세요.")) { }
@ -524,5 +525,39 @@
function gocancel() { function gocancel() {
capp("/fcommon/paycancel", { payno: @Model.Pay.payno}, "cbgogo"); capp("/fcommon/paycancel", { payno: @Model.Pay.payno}, "cbgogo");
} }
function save3() {
if ($("#chkrefund:checked").length < 1) { msg("환불규정에 동의 후 요청해주세요."); }
else if ($("#file2").val() == "") { msg("환불신청서를 등록해주세요."); }
else if ($("#file3").val() == "") { msg("통장사본을 등록해주세요."); }
else {
confirmtoggle(true, "환불요청하시겠습니까?", "gogo3()");
}
}
function gogo3() {
capfileform('/fcommon/PayRfdSaveFinal', 'mform2', 'cbgogo3');
}
function cbgogo3() {
if (capResult.code == 1000) {
msg("환불요청이 성공적으로 접수되었습니다.<br />내부 담당자가 검토 후 연락드릴 예정입니다.", null, null, null, "mpgPopClose();refresh();");
} else {
msg("환불신청이 불가한 결제상품입니다. 운영자에게 문의해주세요.");
}
}
function cancelRfd() {
confirmtoggle(true, "환불신청을 취소하시겠습니까?", "gogoSelfCancel()");
}
function gogoSelfCancel() {
capp("/fcommon/PayRfdSelfCancel", { payno: @Model.Pay.payno}, "cbgogoSelfCancel");
}
function cbgogoSelfCancel() {
if (capResult.code == 1000) {
msg("환불신청이 취소되었습니다.");
setTimeout(function () {
$("#mform").attr("action", "/My/Paies").submit()
}, 1000);
} else if (capResult.code == -1) {
msg("개발자에게 문의하십시오.");
}
}
</script> </script>
} }

View File

@ -973,6 +973,10 @@ namespace NP.Model
/// 환불통장사본 /// 환불통장사본
/// </summary> /// </summary>
public long? fgnob { get; set; } public long? fgnob { get; set; }
/// <summary>
/// 환불검토의견
/// </summary>
public String rback { get; set; }
} }
//[Serializable] //[Serializable]