taxList.jsp 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. <%--
  2. - FileName : taxList.jsp
  3. - Author(s) : ok
  4. - Date : 2014.09.11
  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="kr.co.hsnc.common.util.Formatter"%>
  14. <%@ page import="com.udapsoft.waf.common.util.DateUtil"%>
  15. <%@ page import="kr.co.hsnc.common.config.WAFConfig"%>
  16. <%@ include file="/jsp/work/taglib.jsp" %>
  17. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  18. <%
  19. ctx.init(request, response);
  20. HandlerStorage storage = ctx.getHandlerStorage();
  21. ValueObject params = storage.getParams();
  22. ValueObject user = storage.getUser();
  23. String event = storage.getEvent();
  24. String _sBaseUrl = WAFConfig.get("waf.smb.url");
  25. String searchDateStart = params.get("searchDateStart");
  26. String searchDateEnd = params.get("searchDateEnd");
  27. //com.udapsoft.waf.common.util.DateUtil
  28. ValueObject defaultDate = DateUtil.getDefaultPeriod();
  29. if("".equals(searchDateStart)){
  30. searchDateStart = defaultDate.get("START_DATE");
  31. }
  32. if("".equals(searchDateEnd)){
  33. searchDateEnd = defaultDate.get("END_DATE");
  34. }
  35. %>
  36. <SCRIPT language="JavaScript">
  37. /*예약함수*/
  38. var sheet1;
  39. var sheet1Row;
  40. var sheet1PageNo = 1;
  41. var pageLastRowIndex = 1;
  42. var validationResult = false;
  43. var filterShow = false;
  44. function _onReady(){
  45. /**
  46. * IBSheet object initialize
  47. */
  48. gridInit(sheet1);
  49. /**
  50. * Application Initialize
  51. */
  52. jQuery("#btnSearch").click(function() {
  53. jQuery("#fevent").val("GET_LIST");
  54. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/TaxList_sheet.screen";
  55. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 10, "");
  56. });
  57. //역발행요청
  58. jQuery("#btnApProcess").click(function() {
  59. if(sheet1.RowCount("U") > 0) {
  60. if (confirm("역발행요청 하시겠습니까?")) {
  61. jQuery("#processDiv").val("1"); //역발행요청
  62. jQuery("#fevent").val("AP_PROCESS");
  63. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/TaxList_sheet.screen";
  64. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  65. }
  66. }else{
  67. alert("대상을 선택해주세요.");
  68. }
  69. });
  70. //2017.04.13 sms전송
  71. jQuery("#btnSMS").click(function() {
  72. if(sheet1.RowCount("U") > 0) {
  73. if (confirm("SMS전송 하시겠습니까?")) {
  74. jQuery("#fevent").val("SEND_SMS");
  75. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/TaxList_sheet.screen";
  76. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  77. }
  78. }else{
  79. alert("대상을 선택해주세요.");
  80. }
  81. });
  82. //역발행요청취소
  83. jQuery("#btnApProcessCancel").click(function() {
  84. });
  85. //수신승인
  86. jQuery("#btnApProcessApp").click(function() {
  87. if(sheet1.RowCount("U") > 0) {
  88. if (confirm("수신승인 하시겠습니까?")) {
  89. jQuery("#processDiv").val("2"); //수신승인
  90. jQuery("#fevent").val("AP_PROCESS");
  91. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/TaxList_sheet.screen";
  92. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  93. }
  94. }else{
  95. alert("대상을 선택해주세요.");
  96. }
  97. });
  98. jQuery("#btnApChg").click(function() {
  99. for(var i=1; i <= sheet1.RowCount(); i++){
  100. if (sheet1.GetCellValue(i+1,"STATUS_CD") != "2" && sheet1.GetCellValue(i+1,"CHECK") == "1"){
  101. <%if(user.get("right_name").equals("ACCOUNT") ||user.get("right_name").equals("ADMIN NEW") ){%> //회계팀만 가능 2018.05.31
  102. alert(sheet1.GetCellValue(i+1,"SUP_COM_NAME") + " ERP로 전표 이관되었습니다. 반드시 ERP전표를 삭제 하십시요.");
  103. <%}else{%>
  104. alert("회계전표가 이관되었으니 회계담당자에게 ERP전표 취소요청 해 주십시요.");
  105. return;
  106. <%}%>
  107. }
  108. }
  109. if(sheet1.RowCount("U") > 0) {
  110. if (confirm("순발행 변경 하시겠습니까?")) {
  111. jQuery("#processDiv").val("2"); //수신승인
  112. jQuery("#fevent").val("CHG_AP_PROCESS");
  113. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/TaxList_sheet.screen";
  114. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  115. }
  116. }else{
  117. alert("대상을 선택해주세요.");
  118. }
  119. });
  120. jQuery("#btnReSend").click(function() {
  121. if(sheet1.RowCount("U") > 0) {
  122. if (confirm("역발행 재전송 하시겠습니까?")) {
  123. jQuery("#processDiv").val("2"); //수신승인
  124. jQuery("#fevent").val("RE_AP_PROCESS");
  125. var url = Modular.model.PageContext.CONTEXT_ROOT + "/payment/purchase/TaxList_sheet.screen";
  126. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  127. }
  128. }else{
  129. alert("대상을 선택해주세요.");
  130. }
  131. });
  132. autoResize();
  133. pageinit();
  134. }
  135. /* function doResult(resultObj) {
  136. try {
  137. if (resultObj.getRequestEvent() == "AP_PROCESS") {
  138. alert();
  139. if (resultObj.getSuccess()) {
  140. document.form1.isSubmit = false;
  141. alert("역발행요청하였습니다.");
  142. jQuery("#btnSearch").click();
  143. } else {
  144. dlgErrorMsg(resultObj);
  145. }
  146. document.form1.isSubmit = false;
  147. }
  148. } catch (errorObject) {
  149. showErrorDlg("doResult()", errorObject);
  150. }
  151. } */
  152. function pageinit(){
  153. setSearchDate();
  154. jQuery("#btnSearch").click();
  155. }
  156. /**
  157. * IBSheet object initialize
  158. */
  159. function gridInit(sheetName){
  160. var init_sheet = {};
  161. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  162. init_sheet.Cols = [
  163. {Header:'상태|상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  164. {Header:'선택|선택', Type:"CheckBox", SaveName:"CHECK", Width:50, Align:"Center", HeaderCheck:1},
  165. {Header:'구분|구분', Type:"Combo", SaveName:"PAY_DIV", Width:100, Align:"Center", Edit:"false", ComboText:"선급금|대금지급(납품정산)|대금지급(계획분할)", ComboCode:"0|1|2"},
  166. {Header:'현장명|현장명', Type:"Text", SaveName:"DEPT_NAME", Width:150, Align:"Left", Edit:"false"},
  167. {Header:'계약명|계약명', Type:"Text", SaveName:"CST_DOC_NAME", Width:150, Align:"Left", Edit:"false"},
  168. {Header:'공급일자|공급일자', Type:"Text", SaveName:"DTI_WDATE", Width:70, Align:"Center", Edit:"false"},
  169. {Header:'계산서종류|계산서종류', Type:"Text", SaveName:"DTI_TYPE_NM", Width:70, Align:"Center", Edit:"false"},
  170. {Header:'공급자|사업자번호', Type:"Text", SaveName:"SUP_COM_REGNO_BAR", Width:100, Align:"Center", Edit:"false"},
  171. {Header:'공급자|업체명', Type:"Text", SaveName:"SUP_COM_NAME", Width:150, Align:"Left", Edit:"false"},
  172. {Header:'공급받는자|담당자', Type:"Text", SaveName:"USER_NAME", Width:70, Align:"Center", Edit:"false"},
  173. {Header:'합계금액|합계금액', Type:"Int", SaveName:"TOTAL_AMOUNT", Width:100, Align:"Right", Edit:"false", Format:"#,##0"},
  174. {Header:'상태|상태', Type:"Combo", SaveName:"DTI_STATUS", Width:70, Align:"Center", Edit:"false", ComboText:"역발행|역발행요청|정매출발행|수신미승인|수신승인|수신거부|역발행요청 취소|역발행요청 거부|공급자발행 취소요청|공급받는자 발행취소요청|취소완료", ComboCode:"A|V|S|I|C|R|W|T|N|M|O"},
  175. {Header:'국세청\n전송결과|국세청\n전송결과', Type:"Text", SaveName:"SEND_REQUEST_DESC", Width:50, Align:"Center", Edit:"false"},
  176. {Header:'국세청\n전송결과코드|국세청\n전송결과코드', Type:"Text", SaveName:"SEND_REQUEST", Width:50, Align:"Center", Hidden:"True"},
  177. {Header:'발행\n주체|발행\n주체', Type:"Text", SaveName:"DIRECTION_NM", Width:50, Align:"Center", Edit:"false"},
  178. {Header:'☞계산서\n보기|☞계산서\n보기', Type:"Image", SaveName:"BILL", Width:50, Align:"Center", Edit:"false", Cursor:'pointer'},
  179. {Header:'SUB_CONT_MOD_ID', Type:"Text", SaveName:"PUR_CONT_MOD_ID", Width:50, Align:"Center", Hidden:"True"},
  180. {Header:'CONVERSATION_ID', Type:"Text", SaveName:"CONVERSATION_ID", Width:50, Align:"Center", Hidden:"True"},
  181. {Header:'공급자스마트빌ID', Type:"Text", SaveName:"SUP_COM_ID", Width:50, Align:"Center", Hidden:"True"},
  182. {Header:'공급받는자스마트빌ID', Type:"Text", SaveName:"BYR_COM_ID", Width:50, Align:"Center", Hidden:"True"},
  183. {Header:'INTER_BATCHID', Type:"Text", SaveName:"INTERFACE_BATCH_ID", Width:50, Align:"Center", Hidden:"True"},
  184. {Header:'return_code|return_code', Type:"Text", SaveName:"RETURN_CODE", Width:50, Align:"Center", Hidden:"True"},
  185. {Header:'BYR_COM_REGNO|BYR_COM_REGNO', Type:"Text", SaveName:"BYR_COM_REGNO", Width:50, Align:"Center", Hidden:"True"},
  186. {Header:'PAYREQ_ID|PAYREQ_ID', Type:"Text", SaveName:"TMPSLIP_ID", Width:50, Align:"Center", Hidden:"True"},
  187. {Header:'PAY_KEY', Type:"Text", SaveName:"PAY_KEY", Width:50, Align:"Center", Hidden:"True"}
  188. ];
  189. init_sheet.HeaderMode = {Sort:1,HeaderCheck:0};
  190. IBS_InitSheet(sheetName, init_sheet);
  191. sheetName.SetImageList(1,"/img/buyer/button/btn_view.gif");
  192. sheetName.SetDataAutoTrim(0);
  193. //sheetName.SetEditable(false);
  194. //sheetName.SetDataLinkMouse("BUILD_NAME", 1);
  195. sheetName.SetActionMenu("ExcelDown");
  196. setGridSize();
  197. }
  198. function sheet1_OnSelectMenu(Text, Code) {
  199. // text 또는 code값으로 Action수행
  200. switch(Text) {
  201. case "ExcelDown":
  202. sheetExcelDown(sheet1,$('li').html());
  203. break;
  204. }
  205. }
  206. /**
  207. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  208. */
  209. function sheet1_OnSearchEnd(code, message) {
  210. if(code == 0) {
  211. if(sheet1.RowCount() > 0)
  212. {
  213. for(var i=1; i <= sheet1.RowCount(); i++)
  214. {
  215. if(sheet1.GetCellValue(i+1,"RETURN_CODE") != null && sheet1.GetCellValue(i+1,"RETURN_CODE") != "" && sheet1.GetCellValue(i+1,"RETURN_CODE") != "30000")
  216. {
  217. sheet1.SetRowBackColor(i+1,"#FFDCDC");
  218. }else if(sheet1.GetCellValue(i+1,"SEND_REQUEST") == "2" ||sheet1.GetCellValue(i+1,"SEND_REQUEST") == "3")
  219. {
  220. sheet1.SetRowBackColor(i+1,"#FFDCDC");
  221. }
  222. }
  223. }
  224. setGridSize();
  225. //sheet1.SetColFontColor("BUILD_NAME", "#0000ff");
  226. } else {
  227. //조회 에러 수행
  228. //alert(message);
  229. alert("조회 실패");
  230. }
  231. }
  232. function sheet1_OnSaveEnd(code, msg) {
  233. if(code >= 0) {
  234. if(jQuery("#fevent").val() == "AP_PROCESS"){
  235. var processDiv = jQuery("#processDiv").val();
  236. if(processDiv == "1"){
  237. //역발행요청처리
  238. sendApProc();
  239. }
  240. if(processDiv == "2"){
  241. //수신승인
  242. sendApAppr();
  243. }
  244. }
  245. } else {
  246. alert(msg);
  247. }
  248. jQuery("#btnSearch").click();
  249. }
  250. /**
  251. * IBSheet Event: Click
  252. */
  253. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  254. if (sheet1.ColSaveName(Col) == "CHECK" && Row > 0) { //세금계산서
  255. jQuery("#convId").val(sheet1.GetCellValue(Row, "CONVERSATION_ID"));
  256. }
  257. }
  258. /**
  259. * IBSheet size setting
  260. */
  261. function setGridSize() {
  262. sheet1.FitColWidth();
  263. }
  264. /**
  265. * IBSheet Event: DBLCLICK
  266. */
  267. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  268. if (sheet1.ColSaveName(Col) == "BILL") { //세금계산서
  269. var conversationId = sheet1.GetCellValue(Row, "CONVERSATION_ID");
  270. var popUrl = "/payment/purchase/taxInfoPop.screen?CONVERSATION_ID="+conversationId
  271. var popOption = "width=750, height=500, resizable=no, scrollbars=no, status=no;"; //팝업창 옵션(optoin)
  272. window.open(popUrl,"",popOption);
  273. }
  274. if( sheet1.ColSaveName(Col) == "PAY_DIV" ||
  275. sheet1.ColSaveName(Col) == "DEPT_NAME" ||
  276. sheet1.ColSaveName(Col) == "CST_DOC_NAME" ||
  277. sheet1.ColSaveName(Col) == "DTI_WDATE" ||
  278. sheet1.ColSaveName(Col) == "DTI_TYPE_NM" ||
  279. sheet1.ColSaveName(Col) == "SUP_COM_REGNO_BAR" ||
  280. sheet1.ColSaveName(Col) == "SUP_COM_NAME" ||
  281. sheet1.ColSaveName(Col) == "TOTAL_AMOUNT" ||
  282. sheet1.ColSaveName(Col) == "DTI_STATUS" ||
  283. sheet1.ColSaveName(Col) == "SEND_REQUEST_DESC" ||
  284. sheet1.ColSaveName(Col) == "DIRECTION_NM"
  285. )
  286. {
  287. if(sheet1.GetCellValue(Row,"RETURN_CODE") != null && sheet1.GetCellValue(Row,"RETURN_CODE") != "" && sheet1.GetCellValue(Row,"RETURN_CODE") != "30000")
  288. {
  289. var conversationId = sheet1.GetCellValue(Row, "CONVERSATION_ID");
  290. var win_id = "TaxErrorPop";
  291. var popUrl = "/payment/outside/TaxErrorPop.screen?pop_win_id="+win_id+"&ref_id="+conversationId;
  292. fLayerPop(win_id, popUrl, 780, 280, '', '', 'NO');
  293. document.form1.isSubmit = false;
  294. }else if(sheet1.GetCellValue(Row,"SEND_REQUEST") == 2 || sheet1.GetCellValue(Row,"SEND_REQUEST") == 3)
  295. {
  296. var interface_batch_id = sheet1.GetCellValue(Row, "INTERFACE_BATCH_ID");
  297. var byr_com_regno = sheet1.GetCellValue(Row, "BYR_COM_REGNO");
  298. var byr_com_id = sheet1.GetCellValue(Row, "BYR_COM_ID");
  299. var win_id = "TaxSendResultPop";
  300. var popUrl = "/payment/outside/TaxSendResultPop.screen?pop_win_id="+win_id+"&batch_id="+interface_batch_id+"&comregno="+byr_com_regno+"&id="+byr_com_id;
  301. fLayerPop(win_id, popUrl, 820, 380, '', '', 'NO');
  302. document.form1.isSubmit = false;
  303. }
  304. }
  305. }
  306. function doKeyPress() {
  307. if( event.keyCode == 13 ) {
  308. //jQuery("#btnSearch").click();
  309. }
  310. }
  311. function sheet1_OnSmartResize(Width, Height) {
  312. sheet1.FitColWidth();
  313. autoResize();
  314. }
  315. function autoResize(){
  316. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  317. var iframeHeight= document.body.scrollHeight - t1_height;
  318. var iframeWidth= document.body.scrollWidth;
  319. sheet1.SetSheetHeight(iframeHeight);
  320. }
  321. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  322. //달력팝업
  323. function calendar(thisDayObj){
  324. dlgCalendar(thisDayObj);
  325. }
  326. //검색 조건에 작성일 일자 설정
  327. function setSearchDate(){
  328. //검색조건 시작일
  329. var startDate = get_year() +'-'+ get_month() +'-'+ '01';
  330. if(jQuery('#searchDateStart').val() == ""){
  331. jQuery('#searchDateStart').val(startDate);
  332. }
  333. //검색조건 종료일
  334. var nowYearMonth = new Date( get_year(), get_month(), "");
  335. var lastDay = nowYearMonth.getDate();
  336. var endDate = get_year() +'-'+ get_month() +'-'+ lastDay;
  337. if(jQuery('#searchDateEnd').val() == ""){
  338. jQuery('#searchDateEnd').val(endDate);
  339. }
  340. }
  341. function billStatus(){
  342. var selectBillStatusVal = jQuery("#selectBillStatus option:selected").val();
  343. //2017.04.13 국세청 전송결과에 따라 SMS전송버튼 표기
  344. var sendSMS = jQuery("#selectSendRequest option:selected").val();
  345. if (sendSMS == "9"){
  346. jQuery("#spanSMS").show();
  347. }else{
  348. jQuery("#spanSMS").hide();
  349. }
  350. //alert(selectBillStatusVal);
  351. //상태값에 따른 버튼 컨트롤
  352. if(selectBillStatusVal == ""){ //전체
  353. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 숨김
  354. jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  355. jQuery("#spanApProcessApp").hide(); //수신승인
  356. jQuery("#spanApProcessRej").hide(); //수신거부
  357. jQuery("#spanApReSend").hide(); //역발행 재요청
  358. jQuery("#spanApChg").hide(); //순발행 변경
  359. }else if(selectBillStatusVal == "A"){ //역발행요청상태(최초등록상태)
  360. jQuery("#spanApProcess").show(); //역발행 요청 버튼 표시
  361. //jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  362. jQuery("#spanApProcessApp").hide(); //수신승인
  363. //jQuery("#spanApProcessRej").hide(); //수신거부
  364. jQuery("#spanApReSend").hide(); //역발행 재요청
  365. jQuery("#spanApChg").show(); //순발행 변경
  366. }else if(selectBillStatusVal == "V"){ //업체에 역발행 요청한
  367. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 표시
  368. //jQuery("#spanApProcessCancel").show(); //역발행 요청 취소 버튼 숨김
  369. jQuery("#spanApProcessApp").hide(); //수신승인
  370. //jQuery("#spanApProcessRej").hide(); //수신거부
  371. jQuery("#spanApReSend").hide(); //역발행 재요청
  372. jQuery("#spanApChg").hide(); //순발행 변경
  373. }else if(selectBillStatusVal == "I"){ //역발행 거부 상태
  374. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 표시
  375. //jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  376. jQuery("#spanApProcessApp").show(); //수신승인
  377. //jQuery("#spanApProcessRej").show(); //수신거부
  378. jQuery("#spanApReSend").hide(); //역발행 재요청
  379. jQuery("#spanApChg").hide(); //순발행 변경
  380. }else if(selectBillStatusVal == "W"){
  381. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 숨김
  382. jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  383. jQuery("#spanApProcessApp").hide(); //수신승인
  384. jQuery("#spanApProcessRej").hide(); //수신거부
  385. jQuery("#spanApReSend").hide(); //역발행 재요청
  386. jQuery("#spanApChg").show(); //순발행 변경
  387. }else if(selectBillStatusVal == "T"){
  388. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 숨김
  389. jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  390. jQuery("#spanApProcessApp").hide(); //수신승인
  391. jQuery("#spanApProcessRej").hide(); //수신거부
  392. jQuery("#spanApReSend").hide(); //역발행 재요청
  393. jQuery("#spanApChg").show(); //순발행 변경
  394. }else if(selectBillStatusVal == "O"){
  395. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 숨김
  396. jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  397. jQuery("#spanApProcessApp").hide(); //수신승인
  398. jQuery("#spanApProcessRej").hide(); //수신거부
  399. jQuery("#spanApReSend").hide(); //역발행 재요청
  400. jQuery("#spanApChg").show(); //순발행 변경
  401. }else if(selectBillStatusVal == "R"){
  402. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 숨김
  403. jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  404. jQuery("#spanApProcessApp").hide(); //수신승인
  405. jQuery("#spanApProcessRej").hide(); //수신거부
  406. jQuery("#spanApReSend").hide(); //역발행 재요청
  407. jQuery("#spanApChg").show(); //순발행 변경
  408. }else{
  409. jQuery("#spanApProcess").hide(); //역발행 요청 버튼 숨김
  410. jQuery("#spanApProcessCancel").hide(); //역발행 요청 취소 버튼 숨김
  411. jQuery("#spanApProcessApp").hide(); //수신승인
  412. jQuery("#spanApProcessRej").hide(); //수신거부
  413. jQuery("#spanApReSend").hide(); //역발행 재요청
  414. jQuery("#spanApChg").hide(); //순발행 변경
  415. }
  416. jQuery("#btnSearch").click();
  417. }
  418. function sendApProc() {
  419. jQuery("#fevent").val("RUN_AP_PROCESS");
  420. var f = document.form1;
  421. submitXmlRequest("/payment/purchase/TaxList_form.screen", "RUN_AP_PROCESS", f, "VALUEOBJECT");
  422. }
  423. function sendApAppr() {
  424. jQuery("#fevent").val("RUN_APP_PROCESS");
  425. var f = document.form1;
  426. submitXmlRequest("/payment/purchase/TaxList_form.screen", "RUN_APP_PROCESS", f, "VALUEOBJECT");
  427. }
  428. function doResult(resultObj) {
  429. try {
  430. if( resultObj.getRequestEvent() == "RUN_AP_PROCESS" ) {
  431. jQuery("#btnSearch").click();
  432. var vo = resultObj.getValueObject();
  433. var sParam = vo.get('result');
  434. var win_id = "TaxRequestResultPop";
  435. var link = "/payment/outside/TaxResultPop.screen";
  436. link += "?pop_win_id="+win_id;
  437. link += sParam;
  438. fLayerPop(win_id, link, 780, 380, '', '', 'NO');
  439. document.form1.isSubmit = false;
  440. }
  441. if( resultObj.getRequestEvent() == "RUN_APP_PROCESS" ) { //수신승인
  442. jQuery("#btnSearch").click();
  443. var vo = resultObj.getValueObject();
  444. var sParam = vo.get('result');
  445. var win_id = "TaxRequestResultPop";
  446. var link = "/payment/outside/TaxResultPop.screen";
  447. link += "?pop_win_id="+win_id;
  448. link += sParam;
  449. fLayerPop(win_id, link, 780, 380, '', '', 'NO');
  450. document.form1.isSubmit = false;
  451. }
  452. }
  453. catch(errorObject) {
  454. showErrorDlg("doResult()", errorObject);
  455. }
  456. }
  457. function viewhtml(){
  458. }
  459. /*function test(){
  460. //var conversationId = sheet1.GetCellValue(Row, "CONVERSATION_ID");
  461. //var popUrl = "http://211.38.140.131:10000/DTI/DTI_ERROR_DISPLAY.asp?CONVERSATION_ID="+conversationId+"&SBTYPE=AP";
  462. var popUrl = "http://211.38.140.131:10000/DTI/DTI_ERROR_DISPLAY.asp?ref_id=12345678912148189369201410074976103";
  463. var popOption = "width=750, height=500, resizable=no, scrollbars=no, status=no;"; //팝업창 옵션(optoin)
  464. window.open(popUrl,"",popOption);
  465. }*/
  466. function sheet1_OnMouseMove(Button, Shift, X, Y) {
  467. //마우스 위치가 2컬럼 일때만 마우스 손가락 모양
  468. var Row = sheet1.MouseRow();
  469. if(sheet1.GetCellValue(Row,"RETURN_CODE") != null && sheet1.GetCellValue(Row,"RETURN_CODE") != "" && sheet1.GetCellValue(Row,"RETURN_CODE") != "30000")
  470. {
  471. sheet1.SetMousePointer("Hand");
  472. }else{
  473. sheet1.SetMousePointer("Default");
  474. }
  475. }
  476. </SCRIPT>
  477. <modular:search id="form1">
  478. <modular:key id="fevent" />
  479. </modular:search>
  480. <BODY onresize="autoResize()" >
  481. <form id="form1" name="form1" method="post" modular:type="search">
  482. <INPUT type="hidden" name="fevent" id="fevent" value="">
  483. <INPUT type="hidden" name="batchId" id="batchId" value="">
  484. <INPUT type="hidden" name="convId" id="convId" value="">
  485. <INPUT type="hidden" name="processDiv" id="processDiv" value=""> <!-- 1:역발행요청, 2:수신승인 -->
  486. <!-- 프로그램 제목 -->
  487. <div align="left" id="title">
  488. <ul>
  489. <li>구매_세금계산서 발행현황</li>
  490. </ul>
  491. </div>
  492. <!-- 검색조건 시작 -->
  493. <table id="search-table" class="search-form-table">
  494. <colgroup>
  495. <col width="120px" />
  496. <col/>
  497. <col width="120px" />
  498. <col/>
  499. <col width="200px" />
  500. </colgroup>
  501. <tr>
  502. <th>구분</th>
  503. <td><%-- <INPUT type="text" id="searchBuildName" name="searchBuildName" value="<%=returnBuildName %>" maxlength="50" class="input" style="IME-MODE : active; width:80%;" desc='계약명' onKeyPress="doKeyPress();"> --%>
  504. <SELECT name="selectDiv">
  505. <OPTION value="">전체</OPTION>
  506. <OPTION value="0">선급금</OPTION>
  507. <OPTION value="1">대금지급(납품정산)</OPTION>
  508. <OPTION value="2">대금지급(계획분할)</OPTION>
  509. </SELECT>
  510. </td>
  511. <th>공급일자</th>
  512. <td>
  513. <%= InputText.get("searchDateStart", searchDateStart, 15, 10, "Center, date, PerSize, readonly", "date", "") %>
  514. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('searchDateStart');">
  515. &nbsp;~&nbsp;
  516. <%= InputText.get("searchDateEnd", searchDateEnd, 15, 10, "Center, date, PerSize, readonly", "date", "") %>
  517. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('searchDateEnd');">
  518. </td>
  519. <td class="button" rowspan="4">
  520. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  521. <span id="spanSMS" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnSMS">SMS전송</a></span>
  522. <span id="spanApProcess" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApProcess">역발행요청</a></span>
  523. <span id="spanApProcessCancel" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApProcessCancel">역발행요청취소</a></span>
  524. <span id="spanApProcessApp" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApProcessApp">수신승인</a></span>
  525. <span id="spanApProcessRej" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApProcessRej">수신거부</a></span>
  526. <span id="spanApReSend" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnReSend">역발행 재전송</a></span>
  527. <span id="spanApChg" class="btnSearch center" style="display: none"><a href="javascript:void(0);" id="btnApChg">순발행 변경</a></span>
  528. <!-- span id="TEST" class="btnSearch center"><a href="javascript:test();" id="test">test</a></span -->
  529. </td>
  530. </tr>
  531. <tr>
  532. <th>현장</th>
  533. <td>
  534. <%--<%=InputText.getSiteCode("searchDeptCd", "searchDeptNm", "", user, "", "")%> --%>
  535. <%=InputText.getSiteCodeNew("searchDeptCd", "searchDeptNm", "", user, "", "")%>
  536. </td>
  537. <th>계약명</th>
  538. <td><INPUT type="text" id="searchBuildName" name="searchBuildName" value="" maxlength="50" class="input" style="IME-MODE : active;width:95%;" desc='계약명' onKeyPress="doKeyPress();"></td>
  539. </tr>
  540. <tr>
  541. <th>사업자번호</th>
  542. <td><INPUT type="text" id="searchRegNo" name="searchRegNo" value="" maxlength="50" class="input" style="IME-MODE : active;width:95%;" desc='사업자번호' onKeyPress="doKeyPress();"></td>
  543. <th>업체명</th>
  544. <td><INPUT type="text" id="searchCorpNm" name="searchCorpNm" value="" maxlength="50" class="input" style="IME-MODE : active;width:95%;" desc='업체명' onKeyPress="doKeyPress();"></td>
  545. </tr>
  546. <tr>
  547. <th>상태</th>
  548. <td>
  549. <SELECT name="selectBillStatus" onchange="billStatus();">
  550. <OPTION value="">전체</OPTION>
  551. <OPTION value="A">역발행</OPTION>
  552. <OPTION value="V">역발행요청</OPTION>
  553. <!-- <OPTION value="S">정매출발행</OPTION> -->
  554. <OPTION value="I">수신미승인</OPTION>
  555. <OPTION value="C">수신승인</OPTION>
  556. <OPTION value="R">수신거부</OPTION>
  557. <OPTION value="W">역발행요청 취소</OPTION>
  558. <OPTION value="T">역발행요청 거부</OPTION>
  559. <OPTION value="N">공급자발행 취소요청</OPTION>
  560. <OPTION value="M">공급받는자 발행취소요청</OPTION>
  561. <OPTION value="O">취소완료</OPTION>
  562. </SELECT>
  563. </td>
  564. <th>국세청전송결과</th>
  565. <td>
  566. <SELECT name="selectSendRequest" onchange="billStatus();" style="width:210px">
  567. <OPTION value="">전체</OPTION>
  568. <OPTION value="9">미전송</OPTION>
  569. <OPTION value="0">전송중</OPTION>
  570. <OPTION value="1">국세청 처리중</OPTION>
  571. <OPTION value="2">전송실패(전송전 실패:검증오류)</OPTION>
  572. <OPTION value="3">전송실패(국세청 처리 후 실패)</OPTION>
  573. <OPTION value="7">전송완료</OPTION>
  574. </SELECT>
  575. </td>
  576. </tr>
  577. </table>
  578. <!-- 검색조건 종료 -->
  579. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 450px; overflow: auto;">
  580. <script>createIBSheet('sheet1','100%', '450px');</script>
  581. </div>
  582. </FORM>
  583. </body>