From 09edc892ee7f25b87dc0178cfcca6a4c7f8a11bf Mon Sep 17 00:00:00 2001 From: kdh0120 Date: Thu, 18 Nov 2021 04:46:01 +0000 Subject: [PATCH] =?UTF-8?q?<=EA=B8=B0=EB=8A=A5=EA=B0=9C=EC=84=A0>=20?= =?UTF-8?q?=ED=86=B5=ED=95=A9=ED=85=8C=EC=8A=A4=ED=8A=B8=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20.=20548=20=EA=B3=84=EC=82=B0=EC=84=9C=EC=88=98=EC=A0=95?= =?UTF-8?q?=EA=B1=B4=20=EA=B0=9C=EB=B0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Views/croom/tax.cshtml | 51 +++++++++++++++++++++++++++++---- BO/Views/croom/taxdetail.cshtml | 2 +- Base/Controller/ACommonCRoom.cs | 13 +++++++++ Dao/MyBatis/Maps/CRoom.xml | 23 ++++++++++++++- Model/Pay.cs | 2 +- 5 files changed, 83 insertions(+), 8 deletions(-) diff --git a/BO/Views/croom/tax.cshtml b/BO/Views/croom/tax.cshtml index 169c9ad..f744dd8 100644 --- a/BO/Views/croom/tax.cshtml +++ b/BO/Views/croom/tax.cshtml @@ -41,7 +41,7 @@ 검색어 - @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":발행상태;0:미발행;1:발행;2:발행취소" }, { "name", "stringval3" }, { "selected", Model.stringval3 } }) + @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":발행상태;0:미발행;3:미발행(임시저장);1:발행;2:발행취소" }, { "name", "stringval3" }, { "selected", Model.stringval3 } }) @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":결제상태;p21:결제대기;p22:입금대기;p1:결제완료;rf1:환불요청;r1:부분환불;r2:전액환불;p41,42,43:결제취소" }, { "name", "stringval10" }, { "selected", Model.stringval10 } }) @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":확인상태;1:확인;0:미확인" }, { "name", "stringval12" }, { "selected", Model.stringval12 } }) @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":전체검색;username:신청자이름;userid:신청자ID;manname:담당자이름;itemname:상품명;cname:교육과정명;paynos:결제번호;asname:회사명" }, { "name", "stringval4" }, { "selected", Model.stringval4 } }) @@ -58,6 +58,7 @@ @Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } }) @*엑셀다운로드*@ 엑셀다운로드 + 일괄발행취소 일괄확인 일괄확인취소 @@ -67,7 +68,7 @@ - No + No 결제번호 회사명 신청자(ID) @@ -80,7 +81,7 @@ 실제날짜 발행한날 영수구분 - 상태 + 상태 확인상태 @@ -88,7 +89,7 @@ @foreach (var d in Model.PayTaxes) { - + @d.rno @d.payno @Html.Raw(string.Format("{1} {2}", d.isjoin, d.isjoin == 1 ? "정" : "비", d.asname)) @@ -102,7 +103,7 @@ @(d.taxdate == null ? "" : d.taxdate.Value.ToString("yyyy-MM-dd")) @(d.realtaxdate == null ? "" : d.realtaxdate.Value.ToString("yyyy-MM-dd")) @(d.isreceipt == 0 ? "청구" : "영수") - @(d.status) + @(d.status) @(d.ischeckname) } @@ -236,5 +237,45 @@ msgdev(); } } + function taxcancel() { + if ($("#tbody1 tr td input.autocheck:checked").length < 1) { + msg("발행 취소 할 요청서가 없습니다."); + } else { + var taxnos = ""; + var chk = false; + var cnt = 0; + $.each($("#tbody1 tr td input.autocheck:checked"), function (i, c) { + if ($(c).attr("data-state") == 0) { + chk = true; + cnt++; + taxnos += "," + $(c).val(); + } else { + chk = false; + return false; + } + }); + if (chk == false) { + msg("발행완료, 발행취소 건이 포함되어 있습니다. 다시 확인해주세요."); + } else { + if (confirm("선택한 " + cnt + "건을 일괄로 발행취소 처리 하시겠습니까?")) { + capp("/acommon/taxcancel", { taxnos: taxnos.substr(1) }, "cbtaxcancel"); + } + } + } + } + function cbtaxcancel() { + if (capResult.code == 1000) { + if (capResult.obj == -1) { + msg("발행취소 할 요청서가 없습니다."); + } else if (capResult.obj == -2) { + //우연의 확률.. + msg("발행완료, 발행취소 건이 포함되어 있습니다. 다시 확인해주세요.", null, null, null, null, "submit()"); + } else { + msg("일괄 발행취소 처리 되었습니다.", null, null, null, null, "submit();"); + } + } else { + msgdev(); + } + } } \ No newline at end of file diff --git a/BO/Views/croom/taxdetail.cshtml b/BO/Views/croom/taxdetail.cshtml index 2be3582..b9a7477 100644 --- a/BO/Views/croom/taxdetail.cshtml +++ b/BO/Views/croom/taxdetail.cshtml @@ -49,7 +49,7 @@ @(d.taxdate == null ? "" : d.taxdate.Value.ToString("yyyy-MM-dd")) @(d.realtaxdate == null ? "" : d.realtaxdate.Value.ToString("yyyy-MM-dd")) @(d.isreceipt == 0 ? "청구" : "영수") - @(d.status) + @(d.status) @(d.ischeckname) } diff --git a/Base/Controller/ACommonCRoom.cs b/Base/Controller/ACommonCRoom.cs index 81c55d7..08f214a 100644 --- a/Base/Controller/ACommonCRoom.cs +++ b/Base/Controller/ACommonCRoom.cs @@ -1521,5 +1521,18 @@ namespace NP.Base.Controllers } return JsonOK(Dao.Save("pay.taxcheck", new Hashtable() { { "taxnos", taxnos }, { "taxno", taxno }, {"ischeck",ischeck }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); } + [HttpPost] + public JsonResult taxcancel(String taxnos, int? taxno) + { + if (string.IsNullOrEmpty(taxnos) && taxno == null) + { + return JsonBack(new JsonRtn() { code = 1000, obj = -1 }); + } + if (Dao.Get("cr.paytax.byisstate", new Hashtable() { { "taxnos", taxnos }, { "taxno", taxno }, { "state", 0 } }).FirstOrDefault() > 0) + { + return JsonBack(new JsonRtn() { code = 1000, obj = -2 }); + } + return JsonOK(Dao.Save("pay.taxcancel", new Hashtable() { { "taxnos", taxnos }, { "taxno", taxno }, { "uno", SUserInfo.UserNo }, { "uip", GetUserIP() } })); + } } } \ No newline at end of file diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index 35a7aa7..fddc006 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -1318,8 +1318,9 @@ ifnull(a.iscancel,0)=#iscancel# a.cdt >= #cdts# a.cdt <= #cdte# - ifnull(a.statecode,0) < 300 + ifnull(a.statecode,0) = 0 a.statecode >= 300 + a.statecode = 100 u.username like concat('%',#username#,'%') u.userid like concat('%',#userid#,'%') a.manname like concat('%',#manname#,'%') @@ -1383,6 +1384,26 @@ a.taxno = #taxno# + + + update paytax a + set a.iscancel = 1 + ,a.udt = now() + ,a.uno = #uno# + ,a.uip = #uip# + + a.taxno in ($taxnos$) + a.taxno = #taxno# + +