123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <%--
- - Author(s) : 김예진
- - Date : 2015.01.08
- - 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;
-
- /* function _onReady(){
-
- } */
-
- /**
- * 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", EditLen:"50"},
- {Header:'인지세액', Type:"AutoSum", SaveName:"STAMP_DUTY_TAX", Width:80, Align:"right", EditLen:"12"},
- {Header:'발행일자', Type:"Date", SaveName:"STAMP_DUTY_DATE", Width:70, Align:"Center", Format:"Ymd"},
- {Header:'비고', Type:"Text", SaveName:"REMARK", Width:150, Align:"Left", EditLen:"500"},
- {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 + "/cont/purchase/StampList_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 30, "");
- }
- function doSaveStamp() {
- jQuery("#fevent").val("SAVE_STAMP_LIST");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/StampList_sheet.screen";
- Modular.view.IBSheet7.doSave(sheet2, url, jQuery("#form1"), false);
- }
-
- /**
- * 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);
- }
- }
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- function sheet2_OnSaveEnd(code, msg) {
- if(code >= 0) {
- if(jQuery("#save_gb").val() != 'Y'){
- alert("인지세가 정상적으로 처리 되었습니다.");
- }
- } else {
- //alert(msg);
- alert("인지세 처리에 실패 하였습니다.");
- }
- doSearchStamp();
- }
-
- /**
- * 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자까지 입력하실 수 있습니다.");
- sheet2.SetCellValue(Row, "STAMP_DUTY_NO", "");
- return;
- }
- }
- if (sheet2.ColSaveName(Col) == "REMARK") {
- if(stringByteSize4UTF(sheet2.GetCellValue(Row, "REMARK")) > 500){
- alert("비고는 500자까지 입력하실 수 있습니다.");
- sheet2.SetCellValue(Row, "REMARK", "");
- return;
- }
- }
- }
-
- /*
- IBSheet Event : Mouse Right Menu
- */
- function sheet2_OnSelectMenu(Text, Code) {
- // text 또는 code값으로 Action수행
- switch(Text) {
- case "ExcelDown":
- jQuery("#btnExcel").click();
- break;
- }
- }
-
- function sheet2_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- 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' || jQuery("#p_issue_gb").val() == '00'){
- modify ='N'
- }
- viewFileListNew2('PUR_STAMP_DUTY', STAMP_DUTY_ID, "", modify, "cont/purchase/stamp/"+STAMP_DUTY_ID, "", "", "", "N");
- }
- }
- }
- 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 issue_gb_chg() {
- if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""){
- jQuery("#btnAdd").hide();
- }else{
- jQuery("#btnAdd").show();
- //jQuery("#btnSaveStamp").show();
- }
- }
-
- 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 += "&mode=fpDown";
- url += "&filePath=/userMenual";
- url += "&fileName=" + encodeURI("전자문서에_대한_인지세_납부방법_등에_관한_고시_(전문).hwp");
- url += "&fileRealName=stamp_duty.hwp";
-
- document.getElementById("fileDown").src=url;
- }
-
- /**
- * IBSheet size setting
- */
- function setGridSize2() {sheet2.FitColWidth();}
-
- document.body.onresize = addEvent( document.body.onresize, "setGridSize2()");
- </SCRIPT>
- <div class="application-info magT10">
- <div class="application-sub-title">
- <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>
- </div>
- </div>
- <!-- 검색조건 시작 -->
- <table id="search-table" class="search-form-table">
- <tr height="25">
- <td>인지세 발급 구분: <%= HTMLMaker.getSelectTag(issueGbRow, "CODE", "NAME", "p_issue_gb", "style='width:100px;' onChange='issue_gb_chg();'", "", ContInfo.get("STAMP_DUTY_GB")) %></td>
- <td class="button" align="right" style="text-align: center;width: 95px">
- <span class="btnSearch center" id="btnAdd" style="display: none;"><a href="javascript:void(0);">추가</a></span>
- <%-- <%if(isViewWrite != "W"){ %> --%>
- <span class="btnSearch center" id="btnSaveStamp" ><a href="javascript:void(0);">저장</a></span>
- <%-- <%} %> --%>
- </td>
- </tr>
- </table>
- <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>
|