taxList.jsp 27 KB

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