123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531 |
- <%--
- - Author(s) : Hyung min Son
- - Date : 2014.07.07
- - Description: 연기 사유 팝업
- --%>
- <%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
- <%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@ page import="java.text.SimpleDateFormat" %>
- <%@ page import="java.util.Date" %>
- <%@ page import="kr.co.udapsoft.common.*" %>
- <%@ page import="kr.co.udapsoft.common.code.*" %>
- <%@ page import="com.udapsoft.waf.system.*" %>
- <%@ page import="com.udapsoft.waf.common.*" %>
- <%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
- <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
- <%@ page import="kr.co.hsnc.common.util.*"%>
- <%@ page import="kr.co.hsnc.common.util.ValueObject" %>
- <%@ page import="kr.co.hsnc.common.sql.*" %>
- <%@ page import="kr.co.hsnc.common.sql.RowSet" %>
- <%@ page import="kr.co.hsnc.common.sql.util.*" %>
- <%@ page import="com.udapsoft.waf.common.ui.*" %>
- <%@ page import="kr.co.udapsoft.common.code.*" %>
- <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
- <%-- <%@ include file="/jsp/work/taglib.jsp" %> --%>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
- <%
- ctx.init(request, response);
- HandlerStorage storage = ctx.getHandlerStorage();
- ValueObject params = storage.getParams();
- ValueObject user = ctx.getUser();
- String p_stamp_duty_id = params.get("p_stamp_duty_id");
- String p_move = params.get("p_move");
-
- RowSet CODE911 = storage.getRowSet("CODE911");
- RowSet dutyIssueRow = CommCodeManager.getCodeRowsetStatic("STAMP_DUTY_ISSUE_GB", "CHG_CODE01", "Y");
- RowSet exchangeRow = CommCodeManager.getCodeRowsetStatic("911");
- %>
- <%@ page contentType="text/html; charset=utf-8" %>
- <SCRIPT language="JavaScript">
-
- function doPageInit() {
- if("<%=p_move%>" == "d"){
- var f = document.form1;
- submitXmlRequest("/cont/stamptax/SalNewPop_form.screen", "SELECT_DATA", f, "VALUEOBJECT");
- }
-
- //계약금액 포커스 탈출시 통화구분에 맞춰서 소수점 자리를 맞춘다.
- jQuery("#p_cont_amt").blur(function () {
-
- var p_cont_amt = jQuery("#p_cont_amt").val().replace(/(\,|\:)/g,"");
-
- //통화구분에 맞춰서 소수점 자리와, 천단위 쉼표를 맞춘다.
- if(jQuery("#digit").val() != ""){
- p_cont_amt = Number(p_cont_amt).toFixed(jQuery("#digit").val())
- jQuery("#p_cont_amt").val(Number(p_cont_amt).toFixed(jQuery("#digit").val()));
- jQuery("#p_cont_amt").val(jQuery("#p_cont_amt").val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
- }
-
- //정수자리 제한 검사
- var strArray = p_cont_amt.split(".");
- if(strArray[0].length > 12){
- alert("소수점 아랫부분을 제외한 정수는 12자리까지만 입력 가능합니다.");
- //jQuery("#p_cont_amt").val("");
- }
-
- });
-
- jQuery("#p_corp_name").blur(function () {
- if ( stringByteSize4UTF($("#p_corp_name").val()) > 200 ) {
- alert("한글은 66자 영문,숫자는 200자 까지만 입력 가능합니다.");
- jQuery("#p_corp_name").focus();
- return;
- }
- });
- jQuery("#p_stamp_duty_no").blur(function () {
- if ( stringByteSize4UTF($("#p_stamp_duty_no").val()) > 50 ) {
- alert("한글은 16자 영문,숫자는 50자 까지만 입력 가능합니다.");
- jQuery("#p_stamp_duty_no").focus();
- return;
- }
- });
- jQuery("#p_cont_no").blur(function () {
- if ( stringByteSize4UTF($("#p_cont_no").val()) > 30 ) {
- alert("한글은 10자 영문,숫자는 30자 까지만 입력 가능합니다.");
- jQuery("#p_cont_no").focus();
- return;
- }
- });
- jQuery("#p_cont_name").blur(function () {
- if ( stringByteSize4UTF($("#p_cont_name").val()) > 200 ) {
- alert("한글은 66자 영문,숫자는 200자 까지만 입력 가능합니다.");
- jQuery("#p_cont_name").focus();
- return;
- }
- });
- jQuery("#p_remark").blur(function () {
- if ( stringByteSize4UTF($("#p_remark").val()) > 500 ) {
- alert("한글은 166자 영문,숫자는 500자 까지만 입력 가능합니다.");
- jQuery("#p_remark").focus();
- return;
- }
- });
- }
- function doSave(){
-
- if(jQuery("#p_corp_name").val() == ""){
- alert("발주처 입력은 필수 입니다. ");
- jQuery("#p_corp_name").focus();
- return;
- }
-
- if(jQuery("#p_corp_reg_no1").val() == ""){
- alert("사업자등록번호 입력은 필수 입니다. ");
- jQuery("#p_corp_reg_no1").focus();
- return;
- }
- if(jQuery("#p_corp_reg_no2").val() == ""){
- alert("사업자등록번호 입력은 필수 입니다. ");
- jQuery("#p_corp_reg_no2").focus();
- return;
- }
- if(jQuery("#p_corp_reg_no3").val() == ""){
- alert("사업자등록번호 입력은 필수 입니다. ");
- jQuery("#p_corp_reg_no3").focus();
- return;
- }
-
- if(jQuery("#p_stamp_duty_no").val() == ""){
- alert("고유식별번호 입력은 필수 입니다. ");
- jQuery("#p_stamp_duty_no").focus();
- return;
- }
-
- if(jQuery("#p_cont_no").val() == ""){
- alert("계약번호 입력은 필수 입니다. ");
- jQuery("#p_cont_no").focus();
- return;
- }
-
- if(jQuery("#p_cont_name").val() == ""){
- alert("계약명 입력은 필수 입니다. ");
- jQuery("#p_cont_name").focus();
- return;
- }
-
- if(jQuery("#p_currency_gb").val() == ""){
- alert("통화구분 입력은 필수 입니다. ");
- jQuery("#p_currency_gb").focus();
- return;
- }
-
- if(jQuery("#p_cont_amt").val() == "" || jQuery("#p_cont_amt").val() == 0){
- alert("계약금액 입력은 필수 입니다. ");
- jQuery("#p_cont_amt").focus();
- return;
- }
-
- if(jQuery("#p_stamp_duty_tax").val() == "" || jQuery("#p_stamp_duty_tax").val() == 0){
- alert("인지세액 입력은 필수 입니다. ");
- jQuery("#p_stamp_duty_tax").focus();
- return;
- }
-
- if(jQuery("#p_stamp_duty_date").val() == ""){
- alert("발행일자 입력은 필수 입니다. ");
- jQuery("#p_stamp_duty_date").focus();
- return;
- }
-
- if(jQuery("#attach_file_view_stamp li").length == 0){
- alert("인지세사본 첨부는 필수 입니다.");
- return;
- }
- if(confirm("저장하시겠습니까?")){
- var f = document.form1;
- submitXmlRequest("/cont/stamptax/SalNewPop_form.screen", "INSERT_DATA", f);
- }
- }
-
- function doUpdate(){
-
- if(jQuery("#p_corp_name").val() == ""){
- alert("발주처 입력은 필수 입니다. ");
- jQuery("#p_corp_name").focus();
- return;
- }
-
- if(jQuery("#p_corp_reg_no1").val() == ""){
- alert("사업자등록번호 입력은 필수 입니다. ");
- jQuery("#p_corp_reg_no1").focus();
- return;
- }
- if(jQuery("#p_corp_reg_no2").val() == ""){
- alert("사업자등록번호 입력은 필수 입니다. ");
- jQuery("#p_corp_reg_no2").focus();
- return;
- }
- if(jQuery("#p_corp_reg_no3").val() == ""){
- alert("사업자등록번호 입력은 필수 입니다. ");
- jQuery("#p_corp_reg_no3").focus();
- return;
- }
-
- if(jQuery("#p_stamp_duty_no").val() == ""){
- alert("고유식별번호 입력은 필수 입니다. ");
- jQuery("#p_stamp_duty_no").focus();
- return;
- }
-
- if(jQuery("#p_cont_no").val() == ""){
- alert("계약번호 입력은 필수 입니다. ");
- jQuery("#p_cont_no").focus();
- return;
- }
-
- if(jQuery("#p_cont_name").val() == ""){
- alert("계약명 입력은 필수 입니다. ");
- jQuery("#p_cont_name").focus();
- return;
- }
-
- if(jQuery("#p_currency_gb").val() == ""){
- alert("통화구분 입력은 필수 입니다. ");
- jQuery("#p_currency_gb").focus();
- return;
- }
-
- if(jQuery("#p_cont_amt").val() == "" || jQuery("#p_cont_amt").val() == 0){
- alert("계약금액 입력은 필수 입니다. ");
- jQuery("#p_cont_amt").focus();
- return;
- }
-
- if(jQuery("#p_stamp_duty_tax").val() == "" || jQuery("#p_stamp_duty_tax").val() == 0){
- alert("인지세액 입력은 필수 입니다. ");
- jQuery("#p_stamp_duty_tax").focus();
- return;
- }
-
- if(jQuery("#p_stamp_duty_date").val() == ""){
- alert("발행일자 입력은 필수 입니다. ");
- jQuery("#p_stamp_duty_date").focus();
- return;
- }
-
- if(jQuery("#attach_file_view_stamp li").length == 0){
- alert("인지세사본 첨부는 필수 입니다.");
- return;
- }
-
- if(confirm("수정하시겠습니까?")){
- var f = document.form1;
- submitXmlRequest("/cont/stamptax/SalNewPop_form.screen", "UPDATE_DATA", f);
- }
-
-
- }
-
- function doCancle() {
- closeSearch();
- }
-
- function doDel() {
- if(confirm("삭제하시겠습니까?")){
- var f = document.form1;
- submitXmlRequest("/cont/stamptax/SalNewPop_form.screen", "DELETE_DATA", f);
- }
- }
-
- function closeSearch(){
- parent.doSearch();
- winClose();
- }
-
-
- function doChange(){
- <%
- for(int i=0;i < CODE911.size();i++){
- ValueObject Vo = RowSetUtility.getValueObject(CODE911.getRow(i));
- %>
- if($("#p_currency_gb").val() == "<%=Vo.get("DETAILCD")%>"){
- jQuery("#digit").val("<%=Vo.get("CHG_CODE01")%>");
- }
- <%}%>
- }
-
-
- function doResult(resultObj) {
- try {
- if( resultObj.getRequestEvent() == "SELECT_DATA") {
- if( resultObj.getSuccess() ) {
- var vo = resultObj.getValueObject();
-
- $("#p_stamp_duty_issue").val(vo.get("STAMP_DUTY_ISSUE_GB"));
- $("#p_corp_name").val(vo.get("CORP_NAME"));
- $("#p_corp_reg_no1").val(vo.get("CORP_REG_NO1"));
- $("#p_corp_reg_no2").val(vo.get("CORP_REG_NO2"));
- $("#p_corp_reg_no3").val(vo.get("CORP_REG_NO3"));
- $("#p_stamp_duty_no").val(vo.get("STAMP_DUTY_NO"));
- $("#p_cont_no").val(vo.get("CONT_NO"));
- $("#p_mod_no").val(vo.get("MOD_NO"));
- $("#p_cont_name").val(vo.get("CONT_NAME"));
- $("#p_cont_amt").val(vo.get("CONT_AMT"));
- $("#p_currency_gb").val(vo.get("CURRENCY_GB"));
- $("#p_stamp_duty_tax").val(vo.get("STAMP_DUTY_TAX"));
- $("#p_stamp_duty_date").val(vo.get("STAMP_DUTY_DATE"));
- $("#p_remark").val(vo.get("REMARK"));
- }
- else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- if( resultObj.getRequestEvent() == "INSERT_DATA") {
- if( resultObj.getSuccess() ) {
- alert("저장이 완료되었습니다.");
- closeSearch();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- if( resultObj.getRequestEvent() == "UPDATE_DATA") {
- if( resultObj.getSuccess() ) {
- alert("수정이 완료되었습니다.");
- closeSearch();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- if( resultObj.getRequestEvent() == "DELETE_DATA") {
- if( resultObj.getSuccess() ) {
- alert("삭제이 완료되었습니다.");
- closeSearch();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
-
- function doAttachStampFile(obj){
- if(obj != ''){
- parent.doAttachStampFilePop('SAL_STAMP_DUTY', obj.value, document.getElementById("attach_file_view_stamp"), "Y", "cont/stamp/<%=p_stamp_duty_id%>");
- }
- }
-
- /**
- * 첨부파일 예약 함수
- */
- function fileDown(file_id){
- var url="/common/file/FileDownloadServlet";
- url += "?file_id=" + file_id;
-
- 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")
- }
-
-
- 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');
- }
-
- document.body.onload = doPageInit;
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <FORM name="form1" method="post">
- <INPUT type="hidden" name="digit" id="digit" value="">
- <INPUT type="hidden" name="p_move" id="p_move" value="<%=p_move%>">
- <INPUT type="hidden" name="p_stamp_duty_id" id="p_stamp_duty_id" value="<%=p_stamp_duty_id%>">
- <TABLE class="screen_title_table">
- <TR height="2"><TD colspan="2"></TD>
- </TR>
- <TR height="25"><TD>
- <!-- 제목 및 버튼 -->
- <table id="t1" width="100%" class="ftit_table">
- <colgroup>
- <col width="*" />
- <col width="150" />
- </colgroup>
- <tr>
- <th>
- </th>
- <td align="right">
- <%if(p_move == ""){%>
- <span class="btnSearch center"><a href="javascript:doSave();">저장</a></span>
- <%}else{%>
- <span class="btnSearch center"><a href="javascript:doUpdate();">수정</a></span>
- <%}%>
- <span class="btnSearch center"><a href="javascript:doCancle();">취소</a></span>
- <%if(p_move != ""){%>
- <span class="btnSearch center"><a href="javascript:doDel();">삭제</a></span>
- <%}%>
- </td>
- </tr>
- </table>
- </TD>
- </TR>
- <tr>
- <td>
- <!-- 버튼 영역 : 시작 -->
- <!-- 발주의뢰정보 : 시작 -->
- <TABLE class="form-table">
- <colgroup>
- <col width="150" />
- <col width="270" />
- <col width="100" />
- <col width="*" />
- </colgroup>
- <TR height="25">
- <TH class=" required">발행처</TH>
- <TD colspan="3">
- <%= HTMLMaker.getSelectTag(dutyIssueRow, "DETAILCD", "DETAILNM", "p_stamp_duty_issue", "width:150px;height=18;", "<option value=''>선택</option>", "") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">발주처</TH>
- <TD colspan="3">
- <%= InputText.get("p_corp_name", "", 35, 200, "required,persize,string") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">사업자등록번호</TH>
- <TD colspan="3">
- <%= InputText.get("p_corp_reg_no1", "", 4, 3, "Number,required,persize,string") %> -
- <%= InputText.get("p_corp_reg_no2", "", 3, 2, "Number,required,persize,string") %> -
- <%= InputText.get("p_corp_reg_no3", "", 8, 5, "Number,required,persize,string") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">고유식별번호</TH>
- <TD colspan="3">
- <%= InputText.get("p_stamp_duty_no", "", 35, 50, "required,persize,string") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">계약번호</TH>
- <TD >
- <%= InputText.get("p_cont_no", "", 60, 30, "required,persize,string") %>
- </TD>
- <TH >변경차수</TH>
- <TD >
- <%= InputText.get("p_mod_no", "", 20, 2, "Number,required,persize,string") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">계약명</TH>
- <TD colspan="3">
- <%= InputText.get("p_cont_name", "", 35, 200, "required,persize,string") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">통화</TH>
- <TD colspan="3">
- <%= HTMLMaker.getSelectTag(exchangeRow, "CODE", "NAME", "p_currency_gb", "style='width:150px;' onChange='doChange();'", "<option value=''>선택</option>", "") %>
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">계약금액</TH>
- <TD colspan="3">
- <%= InputText.get("p_cont_amt", "", 35, 16, "Float,Right,required,persize","float") %> (VAT포함)
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">인지세액</TH>
- <TD colspan="3">
- <%= InputText.get("p_stamp_duty_tax", "", 35, 12, "Number,Right,required,persize,string","float") %> 원
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">발행일자</TH>
- <TD colspan="3">
- <%= InputText.get("p_stamp_duty_date","" , 13, 10, "center,desc=발행일자,readOnly") %>
- <IMG name="calendar_sitedescdate" id="calendar_sitedescdate" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('p_stamp_duty_date');">
- </TD>
- </TR>
- <TR height="25">
- <TH >비고</TH>
- <TD colspan="3">
- <%= InputText.get("p_remark", "", 90, 250, "required,persize,string") %>
- <!-- <input type="text" name="p_remark" id="p_remark" value="" style="width: 250px;" /> -->
- </TD>
- </TR>
- <TR height="25">
- <TH class=" required">인지세사본<a href="javascript:stampDesc()"><IMG src='/img/buyer/button/q.gif' align="absmiddle"></a></TH>
- <TD colspan="3">
- <div id="attach_file_view_stamp" class="attach_file_view" style="width:80%; text-overflow:ellipsis; white-space: nowrap; overflow: hidden; float: left;">
- <%=FileManager.getFileListForDiv("SAL_STAMP_DUTY", p_stamp_duty_id) %>
- </div>
- <div style="text-align: right;">
- <IMG id='search_spot_button_stamp' onClick="doAttachStampFile(document.form1.p_stamp_duty_id);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
- </div>
- </TD>
- </TR>
- </TABLE>
- </td>
- </tr>
- </TABLE>
- </FORM>
|