123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <%--
- - Author(s) : 김예진
- - Date : 2015.02.01
- - Description: 외주_인지세
- --%>
-
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
- <%@ page import="com.udapsoft.waf.common.ui.*" %>
- <%@ page import="com.udapsoft.waf.common.ui.InitCombo" %>
- <%@ page import="kr.co.hsnc.common.util.*"%>
- <%@ page import="kr.co.hsnc.common.sql.*" %>
- <%@ page import="kr.co.udapsoft.common.code.CommCodeManager" %>
- <%-- <%@ include file="/jsp/work/taglib.jsp" %>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" /> --%>
- <%
-
- CommCodeManager commCodeManager = new CommCodeManager();
-
- RowSet issueGbRow = CommCodeManager.getCodeRowsetStatic("STAMP_DUTY_ISSUE_GB");
- InitCombo initCombo = new InitCombo();
- initCombo.makeComboData(CommCodeManager.getCodeRowsetStatic("STAMP_DUTY_ISSUE_GB", "CHG_CODE01", "Y"), "DETAILNM", "DETAILCD");
- /* initCombo.makeComboData(commCodeManager.getCodeRowSet("STAMP_DUTY_ISSUE_GB"), "NAME", "CODE"); */
- String ISSUE_GB_CD = initCombo.getCode();
- String ISSUE_GB_NM = initCombo.getCodeName();
-
- %>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet2;
- var sheet2Row;
- var sheet2PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
-
-
- /**
- * IBSheet object initialize
- */
- function gridInit2(sheetName){
- var init_sheet = {};
- init_sheet.Cfg = {SearchMode:2, Page:10};
- init_sheet.Cols = [
- {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:30, Align:"Center"},
- {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"true"},
- {Header:'인지세ID', Type:"Text", SaveName:"STAMP_DUTY_ID", Width:0, Align:"Center", Hidden:"true"},
- {Header:'발행주체', Type:"Combo", SaveName:"STAMP_DUTY_ISSUE_GB", Width:80, Align:"Center", ComboText:"<%=ISSUE_GB_NM%>", ComboCode:"<%=ISSUE_GB_CD%>"},
- {Header:'고유식별번호', Type:"Text", SaveName:"STAMP_DUTY_NO", Width:80, Align:"Center"},
- {Header:'인지세액', Type:"AutoSum", SaveName:"STAMP_DUTY_TAX", Width:60, Align:"Right"},
- {Header:'발행일자', Type:"Date", SaveName:"STAMP_DUTY_DATE", Width:70, Align:"Center"},
- {Header:'비고', Type:"Text", SaveName:"REMARK", Width:120, Align:"Left"},
- {Header:'☞사본', Type:"Text", SaveName:"FILE_YN", Width:30, Align:"Center", Edit:"false", Cursor:'pointer'},
- {Header:'FILE_ID', Type:"Text", SaveName:"FILE_ID", Width:0, Align:"Center", Hidden:"true"},
- ];
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetImageList(1,"/img/buyer/button/bt_change.gif");
- if(jQuery("#STATUS_CD").val() == '50'){
- sheet2.SetEditable(0);
- }
- //sheetName.SetActionMenu("ExcelDown");
- setGridSize2();
- }
-
- function doSearchStamp() {
- jQuery("#fevent").val("FORM_SHEET_SELECT");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/portal/cont/SuppStampList_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 30, "");
- }
-
- function sheet2_OnSaveEnd(code, msg) {
- if(code >= 0) {
- alert("정상적으로 처리 되었습니다.");
- } else {
- //alert(msg);
- alert("처리에 실패 하였습니다.");
- }
- doSearchStamp();
- }
-
- /**
- * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
- */
- function sheet2_OnSearchEnd(code, message) {
- var info = {Type: "Image"};
- if(code == 0) {
- setGridSize2();
- sheet2.SetColFontColor("FILE_YN", "#0000ff");
- sheet2.SetCellValue(sheet2.LastRow(), "DEL_CHECK", "합 계");
- sheet2.SetMergeCell(sheet2.LastRow(), 0, 1, 5);
-
- for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "FILE_ID")!=""){
- sheet2.InitCellProperty(i, "FILE_YN", info);
- }
- if(jQuery("#STATUS_CD").val() != '50' && sheet2.GetCellValue(i, "STAMP_DUTY_ISSUE_GB")=="10"){
- sheet2.SetRowEditable(i,0);
- }
- }
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- /*
- IBSheet Event : Mouse Right Menu
- */
- function sheet2_OnSelectMenu(Text, Code) {
- // text 또는 code값으로 Action수행
- switch(Text) {
- case "ExcelDown":
- jQuery("#btnExcel").click();
- break;
- }
- }
-
- /**
- * IBSheet Event Change
- */
- function sheet2_OnChange(Row, Col, Value, OldValue, RaiseFlag) {
- if (sheet2.ColSaveName(Col) == "STAMP_DUTY_NO") {
- if(stringByteSize4UTF(sheet2.GetCellValue(Row, "STAMP_DUTY_NO")) > 50){
- alert("고유식별번호는 50자까지 입력하실 수 있습니다.");
- return;
- }
- }
- if (sheet2.ColSaveName(Col) == "REMARK") {
- if(stringByteSize4UTF(sheet2.GetCellValue(Row, "REMARK")) > 500){
- alert("비고는 500자까지 입력하실 수 있습니다.");
- return;
- }
- }
- if (sheet2.ColSaveName(Col) == "STAMP_DUTY_ISSUE_GB") {
- if(sheet2.GetCellValue(Row, "STAMP_DUTY_ISSUE_GB") != '20'){
- alert("협력사만 선택 가능합니다.");
- sheet2.SetCellValue(Row, "STAMP_DUTY_ISSUE_GB", "20");
- return;
- }
- }
- }
-
- function sheet2_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- if(Row == 0)return;
- var STAMP_DUTY_ID = sheet2.GetCellValue(Row, "STAMP_DUTY_ID");
- var p_move = 'N';
- if(jQuery("#STATUS_CD").val() == '20' && jQuery("#p_issue_gb").val() == '20' && sheet2.GetCellValue(Row, "STAMP_DUTY_ISSUE_GB")=="20" ){
- p_move ='M';
- }
-
- var win_id = "_StampDutyPop";
- var link = "/cont/outside/stampDutyPop.screen";
- link += "?pop_win_id="+win_id
- link += "&p_stamp_duty_id="+ STAMP_DUTY_ID
- link += "&p_move="+p_move
- link += "&p_cont_mod_id="+"<%=ContInfo.get("SUB_CONT_MOD_ID")%>"
- link += "&p_who=P" ;
-
- fLayerPop(win_id, link, 700, 250, '', '', 'NO');
-
-
- /*2016.12.14 인지세 수정
- if(Row == 0)return;
- if (sheet2.ColSaveName(Col) == "FILE_YN") {
-
- if(sheet2.GetCellValue(Row, "STAMP_DUTY_ID")=='' || sheet2.GetCellValue(Row, "STATUS")=="I" || sheet2.GetCellValue(Row, "STATUS")=="U"){
- alert("입력한 내용을 저장을 한 후 파일을 첨부할 수 있습니다.");
- }
- else{
- var STAMP_DUTY_ID = sheet2.GetCellValue(Row, "STAMP_DUTY_ID")
- var modify = 'Y';
- if(jQuery("#STATUS_CD").val() == '50' || sheet2.GetCellValue(Row, "STAMP_DUTY_ISSUE_GB")=="10"){
- modify ='N'
- }
- viewFileListNew2('SUB_STAMP_DUTY', STAMP_DUTY_ID, "", modify, "portal/cont/stamp/"+STAMP_DUTY_ID, "", "", "", "N");
- doSearchStamp();
- }
- }*/
- }
-
- //2016.12.12
- function stampDutyPopClose(){
- doSearchStamp();
- }
- function doAttachStampFilePop(fileGB, obj, fObj, editFile, fileDir){
- if(obj != ''){
- viewFileListNew(fileGB, obj, fObj, editFile, fileDir, "_StampDutyPop", "", "", "N");
- }
- }
-
- //2016.12.14 미사용
- function viewFileListNew2(fileGB, id, obj, isModify, isDrectory, iframeID, user_filename, file_size, multi_yn) {
-
- var win_id = "_stampFileList";
- var link = "/common/file/FileListNew.screen";
- link += "?pop_win_id="+win_id;
- link += "&file_gb=" + fileGB;
- link += "&id=" + id;
-
- if( obj.id != null )
- link += "&obj_id=" + obj.id;
- if( iframeID != null )
- link += "&iframeID=" + iframeID;
-
- if( isModify != null )
- link += "&is_modify=" + isModify;
- if( isDrectory != null )
- link += "&sys_gb=" + isDrectory;
- if( file_size != null )
- link += "&file_size=" + file_size;
- if( multi_yn != null )
- link += "&multi_yn=" + multi_yn;
- if( user_filename != null )
- link += "&user_filename=" + encodeURIComponent(user_filename);
-
-
- fLayerPop(win_id, link, 750,430, '', '', 'NO', '200');
- }
-
- function fLayerPopClose(layerID){
- var oNode = document.getElementById(layerID);
- if(oNode != null)
- {
- $('#'+layerID+ '_divcontent').empty();
- $('#'+layerID).bPopup().close();
- document.body.removeChild(oNode);
- }
-
- if(layerID == "_stampFileList"){
- doSearchStamp();
- }
- }
- function stampDutyRowCheck() {
- for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "STATUS")!="R"){
- alert("인지세중 저장되지 않은 행이 존재합니다.");
- return false;
- }
- }
- return true;
- }
-
- function stampDesc()
- {
- var win_id = "_stampPopup";
- var link = "/cont/purchase/stampDescPopup.screen";
- link += "?pop_win_id="+win_id;
- fLayerPop(win_id, link, 400,210, '', '', 'NO');
- }
-
- function downStampFile(){
- var url="/common/file/FileDownloadServlet?mode=fpDown";
- url += "&filePath=/userMenual";
- url += "&fileName=" + encodeURI("전자문서에_대한_인지세_납부방법_등에_관한_고시_(전문).hwp");
- url += "&fileRealName=stamp_duty.hwp";
-
- //window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
- document.getElementById("fileDown").src=url;
- }
-
- /**
- * IBSheet size setting
- */
- function setGridSize2() {sheet2.FitColWidth();}
- document.body.onresize = addEvent( document.body.onresize, "setGridSize2()");
-
- </SCRIPT>
- <input type="hidden" name="p_issue_gb" id="p_issue_gb" value='<%=ContInfo.get("STAMP_DUTY_GB")%>'>
- <div class="application-info magT10" style="height:22px;">
- <div class="application-sub-title">
- <!--2015.3.25 <span class="title">인지세</span><a href="javascript:stampDesc()"><IMG src='/img/buyer/button/q.gif' align="absmiddle"></a> <font color="red">※ 전자문서 계약자가 인지세무(과소) 납부시 가산세가 300% 부가됨</font> <a href="javascript:downStampFile()"><IMG src='/img/buyer/button/bt_change.gif' align="absmiddle"></a> -->
- <span class="title">인지세<a href="javascript:downStampFile()"><IMG src='/img/buyer/button/q.gif' align="absmiddle"></a></span> <a href="http://www.e-revenuestamp.or.kr" target="_blank">전자수입인지사이트 바로가기(www.e-revenuestamp.or.kr)</a><font color="red"> ※ 전자문서 계약자가 인지세 무(과소)납부시 가산세가 300% 부가됨</font> <span class="btnSearch center" id="btnhelp" ><a href="javascript:stampDesc()">납부금액안내</a></span>
- </div>
- <div align="right">
- <span class="btnSearch center" id="btnAdd" style="display: none;"><a href="javascript:void(0);">추가</a></span>
- <span class="btnSearch center" id="btnSaveStamp" style="display: none;"><a href="javascript:void(0);">저장</a></span>
- </div>
- </div>
- <div id="sheet2_div" style="padding-top:5px; height: 157px; min-height: 157px; overflow: auto;">
- <!-- <div id="sheet2_div" style="padding-top:5px; height: auto; min-height: 100px; overflow: auto;"> -->
- <script>createIBSheet('sheet2','100%', '157px');</script>
- </div>
- <!-- <iframe id="fileDown" name="fileDown" style="display:none"></iframe> -->
|