payRequest.jsp 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242
  1. <%--
  2. - FileName : payRequest.jsp
  3. - Author(s) : ok
  4. - Date : 2014.06.17
  5. - Copyright : Copyright (c) 2014 www.udapsoft.co.kr, Inc.
  6. - Description: 대금신청상세(구매)
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  14. <%@ include file="/jsp/work/taglib.jsp"%>
  15. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  16. <%
  17. ctx.init(request, response);
  18. HandlerStorage storage = ctx.getHandlerStorage();
  19. ValueObject params = storage.getParams();
  20. ValueObject user = storage.getUser();
  21. String event = storage.getEvent();
  22. /*
  23. RowSet perpayReqDivComboList = storage.getRowSet("perpayReqDivComboList"); //신청구분 ComboList Data
  24. ValueObject prePayment = storage.getValueObject("prePayment"); //기본정보, 세금계산서정보, 선급금정보
  25. ValueObject contOutWarr = storage.getValueObject("contOutWarr"); //보증정보
  26. ValueObject file_giveup = storage.getValueObject("PREPAYMENTS_GIVEUP");
  27. ValueObject file_taxbill = storage.getValueObject("TAX_BILL");
  28. */
  29. String check1 = "";
  30. String check2 = "";
  31. //if("2".equals(prePayment.get("TAX_METHOD_CD"))){
  32. if("2".equals("2")){
  33. check2 = "checked";
  34. }else{
  35. check1 = "checked";
  36. }
  37. String digit = "2"; //(String)prePayment.get("digit");
  38. int intDigit = Integer.parseInt(digit);
  39. //기타 첨부서류
  40. RowSet purchaseFileRow = storage.getRowSet("purchaseFileRow");
  41. %>
  42. <SCRIPT language="JavaScript">
  43. /*예약함수*/
  44. var sheet1;
  45. var sheet1Row;
  46. var sheet1PageNo = 1;
  47. var pageLastRowIndex = 1;
  48. var validationResult = false;
  49. var filterShow = false;
  50. var g_digit = <%= intDigit %>; // 소숫점 이하 자릿수
  51. function _onReady(){
  52. //리스트 페이지 이동
  53. jQuery("#btnList").click(function() {
  54. jQuery("#fevent").val("");
  55. jQuery("#form1").attr("action", "/payment/outside/AdvencePaymentList.screen");
  56. jQuery("#form1").attr("target", "_self");
  57. jQuery("#form1").attr("method", "post");
  58. jQuery("#form1").submit();
  59. });
  60. jQuery("#btnDelete").click(function() {
  61. var f = document.form1;
  62. //필수 입력항목 check
  63. if(jQuery("#prepayId").val() == ""){
  64. alert("삭제되었습니다.");
  65. return;
  66. }
  67. //입력데이터 저장
  68. if (confirm("삭제 하시겠습니까?")) {
  69. jQuery("#fevent").val("DELETE_DATA");
  70. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "DELETE_DATA", f, "SUCCESS");
  71. }
  72. });
  73. jQuery("#btnSave").click(function() {
  74. var f = document.form1;
  75. jQuery("#fevent").val("SAVE_DATA");
  76. //필수 입력항목 check
  77. if(requiredItemsCheck() == false){
  78. return;
  79. }
  80. //입력데이터 저장
  81. if (confirm("저장 하시겠습니까?")) {
  82. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "SAVE_DATA", f, "SUCCESS");
  83. }
  84. });
  85. jQuery("#btnAppReq").click(function() {
  86. var f = document.form1;
  87. jQuery("#btnAppReqSelect").val("1"); //0:저장처리, 1:기성신청처리
  88. jQuery("#fevent").val("SAVE_DATA");
  89. //필수 입력항목 check
  90. if(requiredItemsCheck() == false){
  91. return;
  92. }
  93. //입력데이터 저장
  94. if (confirm(jQuery("#btnText").text()+" 하시겠습니까?")) {
  95. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "SAVE_DATA", f, "SUCCESS");
  96. }
  97. });
  98. //반려
  99. jQuery("#btnRejection").click(function() {
  100. var param = "";
  101. var param = "?prepayId=" + jQuery("#prepayId").val();
  102. param = param + "&pageDiv=0"; //0:선급, 1:기성
  103. var url = "/payment/outside/RejectionPopup.screen"+param;
  104. result = window.showModalDialog(url,'rejection','dialogWidth:600px;dialogHeight:250px;center:yes;help:no;status:no;scroll:no;resizable:no');
  105. if(result != null){
  106. if(result[0] == "1"){
  107. reDisplay();
  108. //goList();
  109. }
  110. }
  111. });
  112. //결재
  113. jQuery("#btnApproval").click(function() {
  114. if (!dlgConfirm("기성결재를 진행하시겠습니까?")) {
  115. return;
  116. }
  117. /* var acmp_id = f.acmp_id.value;
  118. var completion_count = 0; //준공계약수
  119. var acmp_count = 0; //기성계약수
  120. var sign_class_cd = 'exprogresspayment';
  121. // var uri = '/subcontract/SUBAcmpSign.screen?acmp_id=' + acmp_id + '^dept_cd=' + f.q_dept_cd.value + '^dept_nm=' + encodeURIComponent(f.q_dept_nm.value) + '^acmp_yyyymm=' + f.q_acmp_yyyymm.value;
  122. var uri = '/subcontract/SUBAcmpSign.screen?acmp_id=' + acmp_id + '^dept_cd=' + f.q_dept_cd.value + '^acmp_yyyymm=' + f.q_acmp_yyyymm.value;
  123. var url = "/subcontract/SUBAcmpSign_form.screen";
  124. url += "?sign_class_cd=" + sign_class_cd;
  125. url += "&uri=" + uri;
  126. url += "&acmp_id=" + acmp_id;
  127. url += "&dept_cd=" + f.q_dept_cd.value;
  128. url += "&acmp_yyyymm=" + f.q_acmp_yyyymm.value; */
  129. //openWindowCenter(url, "sign_form", 200, 100, "");
  130. alert("확인후 개발할것 일단 완료 상태로 변경함.");
  131. var f = document.form1;
  132. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "APPROVAL", f, "SUCCESS");
  133. });
  134. jQuery("#reqPrepaySupplyTamt, #reqPrepaySupplyNamt").blur(function () {
  135. var reqPrepaySupplyTamt = jQuery("#reqPrepaySupplyTamt").val();
  136. reqPrepaySupplyTamt = reqPrepaySupplyTamt.replace(/(\,|\:)/g,""); //신청금액 과세
  137. var subPrepaySupplyTamt = jQuery("#subPrepaySupplyTamt").val();
  138. subPrepaySupplyTamt = subPrepaySupplyTamt.replace(/(\,|\:)/g,""); //선급금액 과세
  139. if(Number(subPrepaySupplyTamt) < Number(reqPrepaySupplyTamt)){
  140. alert('선급금보다 신청금액이 큽니다.');
  141. reqPrepaySupplyTamt = subPrepaySupplyTamt;
  142. jQuery("#reqPrepaySupplyTamt").val(subPrepaySupplyTamt);
  143. jQuery("#giveSupplyTamt").val("0");
  144. jQuery('#reqPrepaySupplyTamt').focus();
  145. }else{
  146. var giveSupplyTamt = subPrepaySupplyTamt - reqPrepaySupplyTamt;
  147. jQuery("#giveSupplyTamt").val(giveSupplyTamt);
  148. jQuery("#giveSupplyTamt").each(function(index){
  149. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  150. });
  151. }
  152. var reqPrepaySupplyNamt = jQuery("#reqPrepaySupplyNamt").val();
  153. reqPrepaySupplyNamt = reqPrepaySupplyNamt.replace(/(\,|\:)/g,""); //신청금액 면세
  154. var subPrepaySupplyNamt = jQuery("#subPrepaySupplyNamt").val();
  155. subPrepaySupplyNamt = subPrepaySupplyNamt.replace(/(\,|\:)/g,""); //선급금액 면세
  156. if(Number(subPrepaySupplyNamt) < Number(reqPrepaySupplyNamt)){
  157. alert('신청금액 면세가 선급금액 면세보다 큽니다.');
  158. jQuery("#reqPrepaySupplyNamt").val(subPrepaySupplyNamt);
  159. jQuery("#giveSupplyNamt").val("0");
  160. jQuery('#reqPrepaySupplyNamt').focus();
  161. }else{
  162. var giveSupplyNamt = subPrepaySupplyNamt - reqPrepaySupplyNamt;
  163. jQuery("#giveSupplyNamt").val(giveSupplyNamt);
  164. jQuery("#giveSupplyNamt").each(function(index){
  165. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  166. });
  167. }
  168. //부가세
  169. var reqPrepaySurtaxAmt = (reqPrepaySupplyTamt * 10) / 100;
  170. var subPrepaySurtaxAmt = jQuery("#subPrepaySurtaxAmt").val();
  171. subPrepaySurtaxAmt = subPrepaySurtaxAmt.replace(/(\,|\:)/g,""); //선급금액 부과세
  172. var giveSurtaxAmt = subPrepaySurtaxAmt - reqPrepaySurtaxAmt;
  173. jQuery("#reqPrepaySurtaxAmt").val(reqPrepaySurtaxAmt);
  174. jQuery("#reqPrepaySurtaxAmt").each(function(index){
  175. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  176. });
  177. jQuery("#giveSurtaxAmt").val(giveSurtaxAmt);
  178. jQuery("#giveSurtaxAmt").each(function(index){
  179. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  180. });
  181. //신청금액을 구한다.
  182. var reqPrepayAmt = Number(reqPrepaySupplyTamt) + Number(reqPrepaySupplyNamt) + Number(reqPrepaySurtaxAmt);
  183. var perpayAmt = jQuery("#perpayAmt").val();
  184. perpayAmt = perpayAmt.replace(/(\,|\:)/g,""); //선급금액
  185. var giveAmt = perpayAmt - reqPrepayAmt;
  186. jQuery("#reqPrepayAmt").val(reqPrepayAmt);
  187. jQuery("#reqPrepayAmt").each(function(index){
  188. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  189. });
  190. jQuery("#giveAmt").val(giveAmt);
  191. jQuery("#giveAmt").each(function(index){
  192. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  193. });
  194. //요율
  195. var conAmt = jQuery("#conAmt").val();
  196. conAmt = conAmt.replace(/(\,|\:)/g,"");
  197. var reqPrepayPercent = (reqPrepayAmt / conAmt) * 100; //신청금액 요율
  198. var givePercent = (giveAmt / conAmt) * 100; //포기금액 요율
  199. jQuery("#reqPrepayPercent").val(reqPrepayPercent.toFixed(1));
  200. jQuery("#givePercent").val(givePercent.toFixed(1));
  201. //입력한 선급금 과세가 빈값일 경우 0으로 셋팅
  202. if(reqPrepaySupplyTamt == ""){
  203. reqPrepaySupplyTamt = "0";
  204. jQuery("#reqPrepaySupplyTamt").val("0");
  205. }
  206. //입력한 선급금 면세가 빈값일 경우 0으로 셋팅
  207. if(reqPrepaySupplyNamt == ""){
  208. reqPrepaySupplyNamt = "0";
  209. jQuery("#reqPrepaySupplyNamt").val("0");
  210. }
  211. if(reqPrepaySupplyTamt == "0" && reqPrepaySupplyNamt == "0"){ //선급포기
  212. jQuery("#perpayReqDiv").val("3");
  213. jQuery("#btnText").text("선급포기신청요청");
  214. //포기일때 보증정보는 필요없으므로 숨김처ㅣ
  215. warrCtr('H'); //S:보이기, H:숨기기
  216. }else if(Number(reqPrepaySupplyTamt) == Number(subPrepaySupplyTamt) && Number(reqPrepaySupplyNamt) == Number(subPrepaySupplyNamt)) { //신청
  217. jQuery("#perpayReqDiv").val("1");
  218. jQuery("#btnText").text("선급신청요청");
  219. //포기일때 보증정보는 필요없으므로 숨김처ㅣ
  220. warrCtr('S'); //S:보이기, H:숨기기
  221. }else{
  222. jQuery("#perpayReqDiv").val("2");
  223. jQuery("#btnText").text("부분신청요청");
  224. //포기일때 보증정보는 필요없으므로 숨김처ㅣ
  225. warrCtr('S'); //S:보이기, H:숨기기
  226. }
  227. giveDataSet();
  228. //}//end if
  229. });
  230. //보증정보팝업 호출
  231. jQuery("#contOutWarr").click(function() {
  232. if(jQuery("#prepayId").val() == ""){
  233. alert("데이터를 저장 후, 보증정보를 입력할 수가 있습니다.");
  234. return;
  235. }
  236. var param = "";
  237. var param = "?subContModId=" + jQuery("#subContModId").val();
  238. var param = param + "&warrGubun=3";
  239. //var param = param + "&warrSeq=" + jQuery("#warrSeq").val();
  240. var param = param + "&warrSeq=1";
  241. var url = "/payment/outside/ContOutWarrPopup.screen"+param;
  242. result = window.showModalDialog(url,'contOutWarr','dialogWidth:550px;dialogHeight:540px;center:yes;help:no;status:no;scroll:no;resizable:no');
  243. callback_getContWarr();
  244. });
  245. pageinit();
  246. }
  247. //페이지 초기처리
  248. function pageinit(){
  249. //계약 선급금을 신청선급에 초기 셋팅(신청상태)
  250. //setAmountData();
  251. //작성일자(증빙일자)
  252. //seTaxDate();
  253. //신청구분 선택불가
  254. //appDivSet();
  255. //입력항목 초기처리
  256. //inputDataSet();
  257. //발행방법에 따른 페이지 셋팅
  258. //taxDataSet();
  259. //버튼표시 셋팅
  260. //btnCtr();
  261. //상태에 따른 입력항목 readOnly
  262. //inputReadOnlyset();
  263. }
  264. //신청대상일때 계약선급금액을 선급신청금액에 초기 입력한다.
  265. function setAmountData() {
  266. if(jQuery("#statusCd").val() == "00"){ //신청대상
  267. var subPrepaySupplyTamtValue = jQuery("#subPrepaySupplyTamt").val(); //계약 선급금액
  268. jQuery("#reqPrepaySupplyTamt").val(subPrepaySupplyTamtValue); //선급 신청금액
  269. var subPrepaySupplyNamtValue = jQuery("#subPrepaySupplyNamt").val(); //계약 면세금액
  270. jQuery("#reqPrepaySupplyNamt").val(subPrepaySupplyNamtValue); //선급 면세금액
  271. }
  272. }
  273. function appDivSet() {
  274. jQuery("#perpayReqDiv").attr("disabled", true);
  275. jQuery("#reqPrepaySupplyTamt, #reqPrepaySupplyNamt").blur();
  276. }
  277. function seTaxDate(){
  278. var newDay = new Date( get_year(), get_month(), "");
  279. var lastDay = newDay.getDate();
  280. var yyyymmdd = get_year() +'-'+ get_month() +"-"+ lastDay;
  281. if(jQuery('#date1').val() == ""){
  282. jQuery('#date1').val(yyyymmdd);
  283. }
  284. }
  285. function btnCtr(){
  286. //alert(jQuery("#statusCd").val());
  287. if(jQuery("#statusCd").val() == "00" || jQuery("#statusCd").val() == ""){ //00:작성상태는 목록, 저장버튼 표시
  288. jQuery("#btnAppReq").hide();
  289. jQuery("#btnDelete").hide();
  290. jQuery("#btnRejection").hide();
  291. jQuery("#btnApproval").hide();
  292. }
  293. if(jQuery("#statusCd").val() == "10"){ //10:작성상태는 목록, 저장, 선급신청버튼 표시
  294. jQuery("#btnDelete").hide();
  295. jQuery("#btnRejection").hide();
  296. jQuery("#btnApproval").hide();
  297. }
  298. if(jQuery("#statusCd").val() == "20"){ //20:선급신청요청상태는 목록, 저장, 선급신청 버튼 표시
  299. jQuery("#btnDelete").hide();
  300. jQuery("#btnRejection").hide();
  301. jQuery("#btnApproval").hide();
  302. }
  303. if(jQuery("#statusCd").val() == "21"){ //21:선급포기요청상태는 목록, 저장, 선급신청 버튼 표시
  304. jQuery("#btnDelete").hide();
  305. jQuery("#btnRejection").hide();
  306. jQuery("#btnApproval").hide();
  307. }
  308. if(jQuery("#statusCd").val() == "30"){ //30:선급신청상태는 목록 버튼 표시
  309. jQuery("#btnAppReq").hide();
  310. jQuery("#btnDelete").hide();
  311. }
  312. if(jQuery("#statusCd").val() == "40"){ //40:결재중상태는 목록 버튼 표시
  313. jQuery("#btnAppReq").hide();
  314. jQuery("#btnDelete").hide();
  315. }
  316. if(jQuery("#statusCd").val() == "50"){ //50:선급완료상태는 목록 버튼 표시
  317. jQuery("#btnSave").hide();
  318. jQuery("#btnAppReq").hide();
  319. jQuery("#btnDelete").hide();
  320. jQuery("#btnRejection").hide();
  321. jQuery("#btnApproval").hide();
  322. }
  323. if(jQuery("#statusCd").val() == "51"){ //51:선급포기상태는 목록 버튼 표시
  324. jQuery("#btnSave").hide();
  325. jQuery("#btnAppReq").hide();
  326. jQuery("#btnDelete").hide();
  327. jQuery("#btnRejection").hide();
  328. jQuery("#btnApproval").hide();
  329. }
  330. if(jQuery("#statusCd").val() == "91"){ //91:반려상태는 목록, 저장 버튼 표시
  331. //jQuery("#btnAppReq").hide();
  332. jQuery("#btnDelete").hide();
  333. jQuery("#btnRejection").hide();
  334. jQuery("#btnApproval").hide();
  335. }
  336. }
  337. function inputReadOnlyset() {
  338. if (jQuery("#statusCd").val() == "30" || jQuery("#statusCd").val() == "40" || jQuery("#statusCd").val() == "50" || jQuery("#statusCd").val() == "51") { //입력불가상태
  339. jQuery("#userName").attr("readonly", true);
  340. jQuery("#userName").css({'background-color' : '#dedede'});
  341. jQuery("#userName").css({'border' : '1px solid #bcbcbc'});
  342. jQuery("#hp").attr("readonly", true);
  343. jQuery("#hp").css({'background-color' : '#dedede'});
  344. jQuery("#hp").css({'border' : '1px solid #bcbcbc'});
  345. jQuery("#eMail").attr("readonly", true);
  346. jQuery("#eMail").css({'background-color' : '#dedede'});
  347. jQuery("#eMail").css({'border' : '1px solid #bcbcbc'});
  348. jQuery("#reqPrepaySupplyTamt").attr("readonly", true);
  349. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  350. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  351. jQuery("#reqPrepaySupplyNamt").attr("readonly", true);
  352. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  353. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  354. }
  355. }
  356. function taxDataSet(){
  357. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val(); //세금계산서 발행방법
  358. if(radioCheck == "1"){
  359. jQuery("#taxAttachments").hide();
  360. jQuery("#taxTrRow").hide();
  361. }else{
  362. jQuery("#taxAttachments").show();
  363. jQuery("#taxTrRow").show();
  364. }
  365. }
  366. function giveDataSet(){
  367. if(jQuery("#perpayReqDiv option:selected").val() == "1"){
  368. jQuery("#giveAttachments").hide();
  369. }else{
  370. jQuery("#giveAttachments").show();
  371. }
  372. }
  373. function inputDataSet(){
  374. jQuery("#perpayReqDiv").attr("disabled",true);
  375. if(jQuery("#perpayReqDiv option:selected").val() == "1"){
  376. jQuery("#giveAmt").val("0"); //선급_포기금액_합계
  377. jQuery("#reqPrepayAmt").attr("readonly",true);
  378. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  379. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  380. jQuery("#reqPrepayAmt").val(jQuery("#perpayAmt").val());
  381. jQuery("#giveSupplyTamt").val("0"); //선급_포기금액_과세
  382. jQuery("#reqPrepaySupplyTamt").attr("readonly",true);
  383. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  384. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  385. jQuery("#reqPrepaySupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  386. jQuery("#giveSupplyNamt").val("0"); //선급_포기금액_면세
  387. jQuery("#reqPrepaySupplyNamt").attr("readonly",true);
  388. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  389. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  390. jQuery("#reqPrepaySupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  391. jQuery("#giveSurtaxAmt").val("0"); //선급_포기금액_부가세
  392. jQuery("#reqPrepaySurtaxAmt").attr("readonly",true);
  393. jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  394. jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  395. jQuery("#reqPrepaySurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  396. jQuery("#givePercent").val("0.0");
  397. var reqPrepayAmt = jQuery("#reqPrepayAmt").val();
  398. reqPrepayAmt = reqPrepayAmt.replace(/(\,|\:)/g,"");
  399. var conAmt = jQuery("#conAmt").val();
  400. conAmt = conAmt.replace(/(\,|\:)/g,"");
  401. var givePercent = (reqPrepayAmt / conAmt) * 100;
  402. jQuery("#reqPrepayPercent").val(givePercent.toFixed(1));
  403. giveDataSet();
  404. warrCtr('S'); //S:보이기, H:숨기기
  405. }else if(jQuery("#perpayReqDiv option:selected").val() == "2"){
  406. //jQuery("#giveAmt").val("0");
  407. jQuery("#reqPrepayAmt").attr("readonly",true);
  408. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  409. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  410. //jQuery("#reqPrepayAmt").val(jQuery("#perpayAmt").val());
  411. //jQuery("#giveSupplyTamt").val("0");
  412. jQuery("#reqPrepaySupplyTamt").attr("readonly",false);
  413. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#ffffff'});
  414. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #595a5a'});
  415. //jQuery("#reqPrepaySupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  416. if(jQuery("#conSupplyNamt").val() == "0"){
  417. //jQuery("#giveSupplyNamt").val("0");
  418. jQuery("#reqPrepaySupplyNamt").attr("readonly",true);
  419. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  420. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  421. //jQuery("#reqPrepaySupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  422. }else{
  423. //jQuery("#giveSupplyNamt").val("0");
  424. jQuery("#reqPrepaySupplyNamt").attr("readonly",false);
  425. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#ffffff'});
  426. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #595a5a'});
  427. //jQuery("#reqPrepaySupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  428. }
  429. //jQuery("#giveSurtaxAmt").val("0");
  430. jQuery("#reqPrepaySurtaxAmt").attr("readonly",true);
  431. jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  432. jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  433. //jQuery("#reqPrepaySurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  434. /* jQuery("#givePercent").val("0");
  435. var reqPrepayAmt = jQuery("#reqPrepayAmt").val();
  436. reqPrepayAmt = reqPrepayAmt.replace(/(\,|\:)/g,"");
  437. var conAmt = jQuery("#conAmt").val();
  438. conAmt = conAmt.replace(/(\,|\:)/g,"");
  439. var givePercent = (reqPrepayAmt / conAmt) * 100;
  440. jQuery("#reqPrepayPercent").val(givePercent.toFixed(1)); */
  441. jQuery("#reqPrepaySupplyTamt").val(jQuery("#orgReqPrepaySupplyTamt").val());
  442. jQuery("#reqPrepaySupplyNamt").val(jQuery("#orgReqPrepaySupplyNamt").val());
  443. jQuery("#reqPrepaySupplyTamt").blur();
  444. giveDataSet();
  445. warrCtr('S'); //S:보이기, H:숨기기
  446. }else if(jQuery("#perpayReqDiv option:selected").val() == "3"){
  447. jQuery("#reqPrepayAmt").val("0"); //선급_신청금액_합계
  448. jQuery("#reqPrepayAmt").attr("readonly",true);
  449. jQuery("#reqPrepayAmt").css({'background-color' : '#dedede'});
  450. jQuery("#reqPrepayAmt").css({'border' : '1px solid #bcbcbc'});
  451. jQuery("#giveAmt").val(jQuery("#perpayAmt").val());
  452. jQuery("#reqPrepaySupplyTamt").val("0"); //선급_신청금액_과세
  453. jQuery("#reqPrepaySupplyTamt").attr("readonly",true);
  454. jQuery("#reqPrepaySupplyTamt").css({'background-color' : '#dedede'});
  455. jQuery("#reqPrepaySupplyTamt").css({'border' : '1px solid #bcbcbc'});
  456. jQuery("#giveSupplyTamt").val(jQuery("#subPrepaySupplyTamt").val());
  457. jQuery("#reqPrepaySupplyNamt").val("0"); //선급_신청금액_면세
  458. jQuery("#reqPrepaySupplyNamt").attr("readonly",true);
  459. jQuery("#reqPrepaySupplyNamt").css({'background-color' : '#dedede'});
  460. jQuery("#reqPrepaySupplyNamt").css({'border' : '1px solid #bcbcbc'});
  461. jQuery("#giveSupplyNamt").val(jQuery("#subPrepaySupplyNamt").val());
  462. jQuery("#reqPrepaySurtaxAmt").val("0"); //선급_신청금액_부가세
  463. jQuery("#reqPrepaySurtaxAmt").attr("readonly",true);
  464. jQuery("#reqPrepaySurtaxAmt").css({'background-color' : '#dedede'});
  465. jQuery("#reqPrepaySurtaxAmt").css({'border' : '1px solid #bcbcbc'});
  466. jQuery("#giveSurtaxAmt").val(jQuery("#subPrepaySurtaxAmt").val());
  467. jQuery("#reqPrepayPercent").val("0.0");
  468. var giveAmt = jQuery("#giveAmt").val();
  469. giveAmt = giveAmt.replace(/(\,|\:)/g,"");
  470. var conAmt = jQuery("#conAmt").val();
  471. conAmt = conAmt.replace(/(\,|\:)/g,"");
  472. var givePercent = (giveAmt / conAmt) * 100;
  473. jQuery("#givePercent").val(givePercent.toFixed(1));
  474. giveDataSet();
  475. //포기일때 보증정보는 필요없으므로 숨김처ㅣ
  476. warrCtr('H'); //S:보이기, H:숨기기
  477. }
  478. }
  479. function warrCtr(gubun){
  480. if (gubun == "H") { //숨김
  481. var warrWamt = jQuery("#warrWamt").val().replace(/(\,|\:)/g, "");
  482. if(warrWamt == "0" || warrWamt == ""){
  483. jQuery('#warr1').slideUp();
  484. jQuery('#warr2').slideUp();
  485. }else{
  486. alert("보증정보가 존재합니다.");
  487. //jQuery("#reqPrepaySupplyTamt").val(jQuery("#warrWamt").val());
  488. }
  489. } else {
  490. jQuery('#warr1').show("slow");
  491. jQuery('#warr2').show("slow");
  492. }
  493. }
  494. function reDisplay() {
  495. jQuery("#fevent").val("");
  496. jQuery("#form1").attr("action", "/payment/outside/AdvencePayment.screen");
  497. jQuery("#form1").attr("target", "_self");
  498. jQuery("#form1").attr("method", "post");
  499. jQuery("#form1").submit();
  500. }
  501. //저장 및 선급금 신청시 필수항목 Check
  502. function requiredItemsCheck(){
  503. var date1 = jQuery('#date1').val(); //작성일자(증빙일자)
  504. var userName = jQuery('#userName').val(); //담당자명
  505. var hp = jQuery('#hp').val(); //담당자 핸드폰번호
  506. var eMail = jQuery('#eMail').val(); //담당자 이메일
  507. if(date1 == "" ){
  508. alert("입력필수입니다.");
  509. jQuery('#date1').focus();
  510. return false;
  511. }
  512. if(userName == ""){
  513. alert("담당자명은 입력필수입니다.");
  514. jQuery('#userName').focus();
  515. return false;
  516. }
  517. if(hp == ""){
  518. alert("담당자 핸드폰 번호는 입력필수입니다.");
  519. jQuery('#hp').focus();
  520. return false;
  521. }else{
  522. var rgEx = /(01[016789])[-](\d{4}|\d{3})[-]\d{4}$/g;
  523. var strValue = hp;
  524. var chkFlg = rgEx.test(strValue);
  525. if(!chkFlg){
  526. alert("올바른 휴대폰번호가 아닙니다.");
  527. jQuery('#hp').focus();
  528. return false;
  529. }
  530. }
  531. if(eMail == ""){
  532. alert("담당자 이메일은 입력필수입니다.");
  533. jQuery('#eMail').focus();
  534. return false;
  535. }else{
  536. var regEmail = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
  537. if(!regEmail.test(eMail)) {
  538. alert('올바른 이메일 주소가 아닙니다.');
  539. jQuery('#eMail').focus();
  540. return false;
  541. }
  542. }
  543. if(jQuery("#btnAppReqSelect").val() == "1"){ //선급금신청요청시에는 해당하는 첨부파일이 모드 등록되어있어야함.
  544. //10:작성중, 20:선급금 신청요청, 21:선금금 포기요청, 30:선급금 신청, 40:결재중, 50:선금완료, 51:포기완료, 91:반려
  545. if (jQuery("#perpayReqDiv").val() == "1") { //선급신청
  546. jQuery("#selectStatusCd").val("20");
  547. } else if (jQuery("#perpayReqDiv").val() == "2") { //부분신청
  548. jQuery("#selectStatusCd").val("20");
  549. } else if (jQuery("#perpayReqDiv").val() == "3") { //포기신청
  550. jQuery("#selectStatusCd").val("21");
  551. } else {
  552. alert("신청구분을 선택하세요");
  553. return;
  554. }
  555. /*
  556. var radioCheck = jQuery(':radio[name="chk_info"]:checked').val();
  557. if(radioCheck == "2"){ //순발행일때 세금계산서 첨부파일이 등록되어있어야함.
  558. var fileName2 = jQuery('#p_AttachFile2').val();
  559. if(fileName2 == ""){
  560. alert("세금계산서 첨부파일 필수입니다.");
  561. return false;
  562. }
  563. }
  564. var reqDivGubun = jQuery("#perpayReqDiv option:selected").val();
  565. if(reqDivGubun == "2" || reqDivGubun == "3"){
  566. var fileName1 = jQuery('#p_AttachFile1').val();
  567. if(fileName1 == ""){
  568. alert("선급금 포기각서 첨부파일 필수입니다.");
  569. return false;
  570. }
  571. }
  572. if(reqDivGubun == "1" || reqDivGubun == "2"){
  573. var subContId = jQuery('#subContId').val();
  574. if(subContId == ""){
  575. alert("보증정보 입력 필수입니다.");
  576. return false;
  577. }
  578. }
  579. */
  580. //보증정보 첨부확인Check
  581. alert("기능신청시 첨부파일 확인 처리 개발중 일단 진행");
  582. }
  583. }
  584. function doResult(resultObj) {
  585. try {
  586. if( resultObj.getRequestEvent() == "SAVE_DATA" ) {
  587. if( resultObj.getSuccess() ) {
  588. document.form1.isSubmit = false;
  589. if(jQuery("#btnAppReqSelect").val() == "0"){
  590. alert("저장되었습니다.");
  591. //jQuery("#btnList").click();
  592. reDisplay();
  593. }else{
  594. jQuery("#btnAppReqSelect").val("0");
  595. btnAppReqProcess();
  596. }
  597. }else {
  598. dlgErrorMsg(resultObj);
  599. }
  600. document.form1.isSubmit = false;
  601. }
  602. if( resultObj.getRequestEvent() == "DELETE_DATA" ) {
  603. if( resultObj.getSuccess() ) {
  604. alert("삭제되었습니다.");
  605. jQuery("#btnList").click();
  606. }else {
  607. dlgErrorMsg(resultObj);
  608. }
  609. document.form1.isSubmit = false;
  610. }
  611. if( resultObj.getRequestEvent() == "REQ_DATA" ) {
  612. if( resultObj.getSuccess() ) {
  613. alert("신청요청하였습니다.");
  614. jQuery("#btnList").click();
  615. }else {
  616. dlgErrorMsg(resultObj);
  617. }
  618. document.form1.isSubmit = false;
  619. }
  620. if( resultObj.getRequestEvent() == "APPROVAL" ) {
  621. if( resultObj.getSuccess() ) {
  622. alert("선급금 결재 완료하였습니다..");
  623. jQuery("#btnList").click();
  624. }else {
  625. dlgErrorMsg(resultObj);
  626. }
  627. document.form1.isSubmit = false;
  628. }
  629. if( resultObj.getRequestEvent() == "GET_DATA" ) {
  630. if( resultObj.getSuccess() ) {
  631. var subContId = resultObj.getValueObject().get("SUB_CONT_ID");
  632. if(subContId != ""){
  633. jQuery("#subContId").val(subContId);
  634. var warrGubun = resultObj.getValueObject().get("WARR_GUBUN");
  635. jQuery("#warrGubun").val(warrGubun);
  636. var warrSeq = resultObj.getValueObject().get("WARR_SEQ");
  637. jQuery("#warrSeq").val(warrSeq);
  638. var causeCode = resultObj.getValueObject().get("CAUSECODE");
  639. jQuery("#causeCode").val("당초");
  640. var guarOnoffYn = resultObj.getValueObject().get("GUAR_ONOFF_YN");
  641. jQuery("#guarOnoffYn").val(guarOnoffYn);
  642. var warrGoffice = resultObj.getValueObject().get("WARR_GOFFICE");
  643. jQuery("#warrGoffice").val(warrGoffice);
  644. var guarStatus = resultObj.getValueObject().get("GUAR_STATUS");
  645. jQuery("#guarStatus").val(guarStatus);
  646. var paperDate = resultObj.getValueObject().get("PAPERDATE");
  647. jQuery("#paperDate").val(paperDate);
  648. var warrWgno = resultObj.getValueObject().get("WARR_WGNO");
  649. jQuery("#warrWgno").val(warrWgno);
  650. var warrWamt = resultObj.getValueObject().get("WARR_WAMT");
  651. jQuery("#warrWamt").val(warrWamt);
  652. jQuery("#warrWamt").each(function(index){
  653. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  654. });
  655. var warrSdateEdate = resultObj.getValueObject().get("WARR_SDATE_EDATE");
  656. jQuery("#warrSdateEdate").val(warrSdateEdate);
  657. }
  658. }else {
  659. dlgErrorMsg(resultObj);
  660. }
  661. document.form1.isSubmit = false;
  662. }
  663. }
  664. catch(errorObject) {
  665. showErrorDlg("doResult()", errorObject);
  666. }
  667. }
  668. //저장 후 기성시청 처리
  669. function btnAppReqProcess(){
  670. var f = document.form1;
  671. jQuery("#fevent").val("REQ_DATA");
  672. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "REQ_DATA", f, "SUCCESS");
  673. }
  674. function doKeyPress() {
  675. if( event.keyCode == 13 ) {
  676. doSearch(document.all.sheet1)
  677. }
  678. }
  679. function calendar(thisDayObj){
  680. dlgCalendar(thisDayObj);
  681. }
  682. //첨부파일
  683. function doAttachFile(obj,No) {
  684. //alert(obj.value);
  685. if(obj.value == ''){
  686. //alert("After you have saved, you can attach a file.");
  687. alert("데이터를 저장 후, 파일을 첨부할 수가 있습니다.");
  688. }
  689. else if(obj.value != ''){
  690. if(No == 1){
  691. //viewFileList('PREPAYMENTS_GIVEUP', obj.value, document.form1.p_AttachFile1, "N", "N", "Y", "N");
  692. viewFileListNew('PURCHASE_'+obj.value, No, document.form1.p_AttachFile, "Y", "cont/cont-1001");
  693. }else{
  694. //alert(No);
  695. var upLoadFlg = "Y";
  696. if(jQuery("#statusCd").val() == "03" || jQuery("#statusCd").val() == "10"){ //상태값이 기성신청(03), 기성완료(10) 일때는 첨부파일 다운로드만 가능
  697. upLoadFlg = "N";
  698. }
  699. viewFileListNew('PURCHASE_'+obj.value, No, document.form1.p_AttachFile, upLoadFlg, "cont/cont-1001");
  700. }
  701. }
  702. //기성첨부파일 목록 조회
  703. getFileListForTextarea();
  704. }
  705. //첨부목록 조회
  706. function getFileListForTextarea(){
  707. document.form1.p_AttachFile.value = "";
  708. var f = document.form1;
  709. jQuery("#fevent").val("GET_ATTACHFILE");
  710. submitXmlRequest("/portal/payment/ResolutionRequest_form.screen", "GET_ATTACHFILE", f, "VALUEOBJECT");
  711. }
  712. //보증정보 조회
  713. function callback_getContWarr(){
  714. //alert("보증정보 조회");
  715. fLayerPopClose('contOutWarrPop');
  716. var f = document.form1;
  717. jQuery("#fevent").val("GET_DATA");
  718. submitXmlRequest("/portal/payment/AdvencePayRequest_form.screen", "GET_DATA", f, "VALUEOBJECT");
  719. }
  720. function fileCheck(checkObj, val){
  721. var f = document.form1;
  722. //alert(checkObj.value);
  723. //alert(checkObj.checked);
  724. //alert(val);
  725. var obj = eval("document.getElementById('" + val + "')");
  726. if(obj.style.display == "none"){
  727. obj.style.display = "inline";
  728. checkObj.checked = true;
  729. }else{
  730. obj.style.display = "none";
  731. checkObj.checked = false;
  732. }
  733. }
  734. //보증정보 조회
  735. function callback_getContWarr(){
  736. var f = document.form1;
  737. jQuery("#fevent").val("GET_DATA");
  738. submitXmlRequest("/payment/outside/AdvencePayment_form.screen", "GET_DATA", f, "VALUEOBJECT");
  739. }
  740. </SCRIPT>
  741. <modular:search id="form1">
  742. <modular:key id="fevent" />
  743. </modular:search>
  744. <form id="form1" name="form1" method="post" modular:type="search">
  745. <INPUT type="hidden" name="fevent" id="fevent" value="">
  746. <INPUT type="hidden" name="payreqId" id="payreqId" value="">
  747. <%-- <INPUT type="hidden" name="selectSubContModId" id="selectSubContModId" value="<%=params.get("selectSubContModId") %>">
  748. <INPUT type="hidden" name="subContModId" id="subContModId" value="<%=prePayment.get("SUB_CONT_MOD_ID") %>">
  749. <INPUT type="hidden" name="prepayId" id="prepayId" value="<%=prePayment.get("PREPAY_ID") %>">
  750. <INPUT type="hidden" name="corpId" id="corpId" value="<%=prePayment.get("CON_CORP_ID") %>">
  751. <INPUT type="hidden" name="orgReqPrepaySupplyTamt" id="orgReqPrepaySupplyTamt" value="<%=prePayment.get("REQ_PREPAY_SUPPLY_TAMT") %>">
  752. <INPUT type="hidden" name="orgReqPrepaySupplyNamt" id="orgReqPrepaySupplyNamt" value="<%=prePayment.get("REQ_PREPAY_SUPPLY_NAMT") %>">
  753. <INPUT type="hidden" name="statusCd" id="statusCd" value="<%=prePayment.get("STATUS_CD") %>">
  754. <INPUT type="hidden" name="subContId" id="subContId" value="<%=prePayment.get("SUB_CONT_ID") %>">
  755. <INPUT type="hidden" name="warrGubun" id="warrGubun" value="<%=contOutWarr.get("WARR_GUBUN") %>">
  756. <INPUT type="hidden" name="warrSeq" id="warrSeq" value="<%=contOutWarr.get("WARR_SEQ") %>">
  757. <INPUT type="hidden" name="btnAppReqSelect" id="btnAppReqSelect" value="0">
  758. <!-- 기성신청상태구분 -->
  759. <INPUT type="hidden" name="selectStatusCd" id="selectStatusCd" value="">
  760. <!-- 리스트 페이지 검색 조건 -->
  761. <INPUT type='hidden' id="searchBuildName" name="searchBuildName" value="<%=params.get("searchBuildName") %>"> <!-- 계약명 -->
  762. <INPUT type='hidden' id="searchStatusCd" name="searchStatusCd" value="<%=params.get("searchStatusCd") %>"> <!-- 상태값 -->
  763. <INPUT type='hidden' id="dept_cd" name="dept_cd" value="<%=params.get("dept_cd") %>">
  764. <INPUT type='hidden' id="dept_nm" name="dept_nm" value="<%=params.get("dept_nm") %>"> --%>
  765. <!-- 제목 및 버튼 -->
  766. <table width="100%">
  767. <colgroup>
  768. <col width="500" />
  769. <col width="*" />
  770. </colgroup>
  771. <tr>
  772. <th>
  773. <div align="left" id="title">
  774. <ul>
  775. <%-- <li>선급금관리 상세(<%=prePayment.get("STATUS_NM")%>)</li> --%>
  776. <li>선급금관리 상세(상태값)</li>
  777. </ul>
  778. </div>
  779. </th>
  780. <td align="right">
  781. <span class="btnSearch center"><a href="javascript:void(0);" id="btnList">목록</a></span>
  782. <span class="btnSearch center"><a href="javascript:void(0);" id="btnDelete">삭제</a></span>
  783. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSave">저장</a></span>
  784. <span class="btnSearch center"><a href="javascript:void(0);" id="btnRejection">반려</a></span>
  785. <span class="btnSearch center"><a href="javascript:void(0);" id="btnApproval">결재</a></span>
  786. <span class="btnSearch center"><a href="javascript:void(0);" id="btnAppReq"><span id="btnText">선급신청요청</span></a></span></td>
  787. </td>
  788. </tr>
  789. </table>
  790. <%
  791. //if(!prePayment.get("RTN_REASON").equals("")){
  792. %>
  793. <%-- <div class="application-info magT10">
  794. <div class="application-sub-title">
  795. <span class="title">반려정보</span>
  796. </div>
  797. <div class="application-location"></div>
  798. </div>
  799. <TABLE class="form-table">
  800. <colgroup>
  801. <col width="13%" />
  802. <col width="*" />
  803. </colgroup>
  804. <TR height="25">
  805. <th style="text-align: left;">반려일</th>
  806. <TD><%=prePayment.get("RTN_DATE")%></TD>
  807. </TR>
  808. <TR>
  809. <th style="text-align: left;">반려사유</th>
  810. <TD><%=prePayment.get("RTN_REASON")%></TD>
  811. </TR>
  812. </TABLE> --%>
  813. <%
  814. //}
  815. %>
  816. <div class="application-info magT10">
  817. <div class="application-sub-title">
  818. <span class="title">계약정보</span>
  819. </div>
  820. <div class="application-location"></div>
  821. </div>
  822. <TABLE class="form-table">
  823. <colgroup>
  824. <col width="13%" />
  825. <col width="20%" />
  826. <col width="13%" />
  827. <col width="20%" />
  828. <col width="13%" />
  829. <col width="*" />
  830. </colgroup>
  831. <TR height="25">
  832. <th style="text-align: left;">현장명</th>
  833. <TD><%= InputText.get("deptName", "테스트현장명", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  834. <th style="text-align: left;">계약명</th>
  835. <TD><%= InputText.get("buildName", "테스트계약", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  836. <th style="text-align: left;">통화</th>
  837. <TD><%= InputText.get("conCurCd", "KRW", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  838. </TR>
  839. <TR>
  840. <th style="text-align: left;">사업자번호</th>
  841. <TD><%= InputText.get("vendCd", "119-81-874847", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  842. <th style="text-align: left;">계약업체명</th>
  843. <TD><%= InputText.get("memberName", "유답소프트(주)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  844. <th style="text-align: left;">대표이사</th>
  845. <TD><%= InputText.get("bossName", "윤웅희", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  846. </TR>
  847. <TR>
  848. <th style="text-align: left;">계약기간</th>
  849. <TD><%= InputText.get("startEndWorkDate", "2014-01-01 ~ 2014-12-31", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  850. <th style="text-align: left;">계약금액</th>
  851. <TD><%= InputText.get("conConAmt", Formatter2.currency("5845000", intDigit)+" (부가세 별도)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  852. <th style="text-align: left;">선급금액</th>
  853. <TD><%= InputText.get("conPrepayAmt", Formatter2.currency("584500", intDigit)+" (부가세 별도)", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  854. </TR>
  855. <TR height="55">
  856. <th style="text-align: left;">대금지불방법</th>
  857. <TD colspan="5"><textarea name="" id="" style="width:98%; height:53px; overflow-y:auto" maxlength="100" class="input byteChk ctrlTarget">계약금:계약 후 30%(현금)<Br>중도금:납품 후60%(전자어음)<br>잔 금:시운전 후 10%(전자어음)</textarea></TD>
  858. </TR>
  859. </TABLE>
  860. <!-- 계약정보 : 끝 -->
  861. <div class="application-info magT10">
  862. <div class="application-sub-title">
  863. <span class="title">대금정보</span>
  864. </div>
  865. <div class="application-location">
  866. </div>
  867. </div>
  868. <TABLE class="form-table">
  869. <colgroup>
  870. <col width="13%" />
  871. <col width="20%" />
  872. <col width="13%" />
  873. <col width="20%" />
  874. <col width="13%" />
  875. <col width="*" />
  876. </colgroup>
  877. <TR height="25">
  878. <th style="text-align: left;">대금구분</th>
  879. <TD><%= InputText.get("deptName", "납품", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  880. <th style="text-align: left;">지급구분</th>
  881. <TD><%= InputText.get("buildName", "선급금", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  882. <th style="text-align: left;">지급차수</th>
  883. <TD><%= InputText.get("conCurCd", "1", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  884. </TR>
  885. </TABLE>
  886. <img src="/img/com/blank.gif" height="10px" />
  887. <TABLE class="form-table">
  888. <colgroup>
  889. <col width="13%" />
  890. <col width="20%" />
  891. <col width="13%" />
  892. <col width="20%" />
  893. <col width="13%" />
  894. <col width="*" />
  895. </colgroup>
  896. <TR>
  897. <th style="text-align: left;">선급금 청구금액</th>
  898. <TD colspan="3">
  899. 합계금액:<%= InputText.get("vendCd", "", 20, 16, "number, right, perSize, readonly, tabIndex=-1", "number") %>
  900. (청구금액:<%= InputText.get("vendCd", "", 20, 16, "number, right, perSize, readonly, tabIndex=-1", "number") %>
  901. ,부가세:<%= InputText.get("vendCd", "", 20, 16, "number, right, perSize, readonly, tabIndex=-1", "number") %>
  902. )
  903. </TD>
  904. <th style="text-align: left;">업체신청일시</th>
  905. <TD><%= InputText.get("memberName", "미서명", 100, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %></TD>
  906. </TR>
  907. </TABLE>
  908. <!-- 대금정보 : 끝 -->
  909. <div class="application-info magT10">
  910. <div class="application-sub-title">
  911. <span class="title">세금계산서 정보</span>
  912. </div>
  913. <div class="application-location">
  914. </div>
  915. </div>
  916. <!-- 세금계산서정보 : 시작 -->
  917. <TABLE class="form-table">
  918. <colgroup>
  919. <col width="13%" />
  920. <col width="20%" />
  921. <col width="13%" />
  922. <col width="20%" />
  923. <col width="13%" />
  924. <col width="*" />
  925. </colgroup>
  926. <TR>
  927. <th style="text-align: left;">세금계산서 발행방법</th>
  928. <TD colspan="3">
  929. <input type="radio" id="chk_1" name="chk_info" value="1" onclick="taxDataSet();" <%= check1 %>>역발행(SGC이앤씨 발행)
  930. &nbsp;<input type="radio" id="chk_2" name="chk_info" value="2" onclick="taxDataSet();" <%= check2 %>>순발행(업체직접 발행)
  931. </TD>
  932. <th style="text-align: left;">작성일자(증빙일자)</th>
  933. <TD><%= InputText.get("date1", Formatter2.formatDate("20141231", "-"), 30, 10, "Center, date, PerSize, readonly", "date", "") %>
  934. <!-- <A href="JavaScript:calendar('date1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A> -->
  935. </TD>
  936. </TR>
  937. <TR>
  938. <th class="required" style="text-align: left;">담당자명</th>
  939. <TD><%= InputText.get("userName", "김대금", 100, 6, "string, left, perSize", "string") %></TD>
  940. <th class="required" style="text-align: left;">담당자 핸드폰번호</th>
  941. <TD>
  942. <input type="text" id="hp" name="hp" value="010-9878-9878" style="width: 44%" size="13" maxlength="13" alt="left">&nbsp;ex)010-0000-0000</TD>
  943. <th class="required" style="text-align: left;">담당자 이메일</th>
  944. <TD><%= InputText.get("eMail", "EMAIL@NC.COM", 100, 40, "string, left, perSize", "string") %></TD>
  945. </TR>
  946. </TABLE>
  947. <!-- 세금계산서정보 : 끝 -->
  948. <div class="application-info magT10">
  949. <div class="application-sub-title">
  950. <span class="title">첨부 및 기타서류</span>
  951. </div>
  952. <div class="application-location">
  953. </div>
  954. <TABLE class="form-table">
  955. <colgroup>
  956. <col width="25%" />
  957. <col width="*" />
  958. <col width="20%" />
  959. <col width="20%" />
  960. </colgroup>
  961. <TR>
  962. <th style="text-align: Center;" colspan="2">첨부서류</th>
  963. <th style="text-align: Center;" colspan="1">파일첨부</th>
  964. <th style="text-align: Center;" colspan="1">특기사항</th>
  965. </TR>
  966. <TR height="140">
  967. <TD colspan="2">
  968. <TABLE class="inner_table" border="0" >
  969. <%
  970. if(purchaseFileRow.size() > 0){
  971. int i_mod = 0;
  972. for(int i = 0; purchaseFileRow.size() > i; i++){
  973. i_mod = i%3;
  974. if(i_mod == 0){ %>
  975. <TR>
  976. <% } %>
  977. <td width="2%">
  978. <input type="checkbox" name="doc_cd" value="<%=purchaseFileRow.getRow(i).get("DETAILCD") %>" style="cursor:pointer;" onClick="fileCheck(this,'<%=purchaseFileRow.getRow(i).get("DETAILCD") %>')" <%if(!purchaseFileRow.getRow(i).get("DOC_CD").equals("")){out.print("checked");} %>>
  979. </td>
  980. <td width="20%">
  981. <%-- <%=acmpFileRow.getRow(i).get("DETAILNM").replace(" ", "<BR>") %> --%>
  982. <%=purchaseFileRow.getRow(i).get("DETAILNM") %>
  983. </td>
  984. <td width="7%" height="24">
  985. <IMG src="/img/supplier/button/bt_attach_file.gif" id="<%=purchaseFileRow.getRow(i).get("DETAILCD") %>" alt="첨부파일 관리" align="top" style="display:<%if(!purchaseFileRow.getRow(i).get("DOC_CD").equals("")){out.print("inline");}else{out.print("none");} %>" onClick="doAttachFile(document.form1.payreqId, '<%=purchaseFileRow.getRow(i).get("DETAILCD") %>');" class="button">
  986. </td>
  987. <% if(i_mod == 2) { %>
  988. </TR>
  989. <% } %>
  990. <%
  991. }
  992. for(int i=i_mod+1; i<3; i++){ %>
  993. <td></td>
  994. <% }
  995. if(i_mod == 0 || i_mod == 1){ %>
  996. </TR>
  997. <% }
  998. }
  999. %>
  1000. </TABLE>
  1001. </TD>
  1002. <TD><TEXTAREA name="p_AttachFile" id="p_AttachFile" rows="12" readOnly class="input ctrlTarget" style="width:98%; height: 98%; overflow-y:auto"></TEXTAREA></TD>
  1003. <TD><TEXTAREA name="acmp_remark" id="acmp_remark" rows="12" maxlength="1000" class="input byteChk ctrlTarget" style="width:98%; height: 98%; overflow-y:auto"></TEXTAREA></TD>
  1004. </TR>
  1005. </TABLE>
  1006. <!-- 세금계산서정보 : 끝 -->
  1007. </div>
  1008. </FORM>