123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>신용카드 사용신청</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <maindatalist>
- <instcd/>
- <lastupdtrid/>
- <requestdate/>
- <usebuseo/>
- <usebuseonm/>
- <seqno/>
- <adminjeamu/>
- <yskeum/>
- <silkeum/>
- <useplace/>
- <frdate/>
- <todate/>
- <requestcause/>
- <admindept/>
- <admindeptnm/>
- <pumno/>
- <cardno/>
- <receiptsabun/>
- <adminceo/>
- <lastupdtdt/>
- <fstrgstdt/>
- <attend/>
- </maindatalist>
- <printdata>
- <usebuseonm/>
- <yskeum/>
- <useplace/>
- <frdate/>
- <todate/>
- <requestcause/>
- <requestdate/>
- <admindeptnm/>
- </printdata>
- </main>
- <send>
- <instcd/>
- <frdate/>
- <todate/>
- </send>
- <hidden>
- <save/>
- </hidden>
- <init>
- <cardnolist>
- <label/>
- <value/>
- <jobposcd/>
- </cardnolist>
- </init>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- model.removenode( "/root/main/maindatalist");
- model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
-
- var dt = new Date();
- var lastdt = new Date(dt.getYear(), dt.getMonth()+1, 0);
- ipt_frdate.value = getCurrentDate().substr(0, 6) + "01";
- ipt_todate.value = getCurrentDate().substr(0, 6) + lastdt.getDate();
-
- model.setFocus("ipt_frdate");
-
- submit("TRRAR01202");
-
- button2.dispatch("DOMActivate");
-
- model.refresh();
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //조회
- function fGetMainDataList() {
- /*
- if (opt_seqline.value == ""){
- messageBox("일자별 SEQ ","C001");
- return false;
- }*/
- return true;
- }
-
- //저장시 입력data checking logic..
- function fSetChackValue()
- {
- var updtdata = getGridUpdateData(grd_main);
- if (updtdata == ""){
- messageBox("변경된 데이터가","I004");
- return false;
- }
- var row = grd_main.row;
- for ( var i = grd_main.fixedRows; i <= grd_main.rows; i++ ) {
- if ( grd_main.rowStatus(i)=='1' || grd_main.rowStatus(i)=='2' ) { //insert, update..
- //alert(grd_main.valueMatrix(i, grd_main.colRef("yskeum")).length+" / "+grd_main.valueMatrix(i, grd_main.colRef("useplace")).length +" / "+grd_main.valueMatrix(i, grd_main.colRef("requestcause")).length );
- if ( grd_main.valueMatrix(i, grd_main.colRef("pumno")).length>0 ){
- alert("품의번호가 있는 예산 합의가 종료된 자료의 변경은 불가 합니다!!");
- grd_main.row = i;
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("yskeum")).length==0 || grd_main.valueMatrix(i, grd_main.colRef("yskeum"))==0 ){
- messageBox("예상금액을" ,"C001");
- grd_main.row = i;
- grd_main.col = grd_main.colRef("yskeum");
- grd_main.editCell();
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("useplace")).length==0 ){
- messageBox("사용처를" ,"C001");
- grd_main.row = i;
- grd_main.col = grd_main.colRef("useplace");
- grd_main.editCell();
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("requestcause")).length==0 ){
- messageBox("신청사유를" ,"C001");
- grd_main.row = i;
- grd_main.col = grd_main.colRef("requestcause");
- grd_main.editCell();
- return false;
- }
- }
- }
-
-
- //rtn = messageBox("", "Q002");
- //if(rtn != "6" ) return false;
- return true;
- }
-
- //정렬 순서로 sort함.
- function fGetSortSeq(){
- var num = grd_main.rows- 1;
- if(rdo_seq.value == 1){
- grd_main.sort(1, 2, num, 2) = "asc";
- }else{
- grd_main.sort(1, 3, num, 3) = "asc";
- }
- model.refresh();
- }
-
- //출력물순서 저장
-
- //엑셀 입력
- function fInputExcel(pGrid) {
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != "") {
- pGrid.loadExcel(fileName, 1, true);
- pGrid.deleteRow(1);
-
- for(i = 1; i < pGrid.rows; i++) {
- pGrid.rowStatus(i) = 1;
- }
- pGrid.refresh();
- }
- }
-
-
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <submission id="TRRAR01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/maindatalist"/>
- <submission id="TRRAR01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/cardnolist"/>
- <submission id="TXRAR01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/save" resultref="/root/temp"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">신용카드 사용신청</caption>
- <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:38px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:38; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="button2" class="btn1_letter2" navindex="4" style="left:1123px; top:9px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fGetMainDataList() ) {
- //setAlertOn();
- submit("TRRAR01201");
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <line id="line5" class="line_4" style="x1:1107px; y1:8px; x2:1107px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
- <input id="ipt_frdate" ref="/root/send/frdate" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:100px; top:9px; width:100px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:11px; top:9px; width:89px; height:17px; ">신청일자 :</caption>
- <input id="ipt_todate" ref="/root/send/todate" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:220px; top:9px; width:100px; height:19px; "/>
- <caption id="caption2" style="left:205px; top:10px; width:15px; height:20px; ">~</caption>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
- <button id="button18" class="btn2_letter3" style="left:1137px; top:52px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( grd_main.valueMatrix(grd_main.row, grd_main.colRef("adminjeamu")) =="Y" ) {
- alert("재무팀에서 확인된 자료의 삭제 불가 합니다!!");
- }else if ( grd_main.valueMatrix(grd_main.row, grd_main.colRef("pumno")).length > 0 ) {
- alert("품의 번호가 있는 자료는 삭제 불가 합니다!!");
- }else{
- misfGridIUD(grd_main, "D");
- model.refresh();
-
- btn_save.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </button>
- <button id="btn_addrow" class="btn2_letter3" style="left:1080px; top:52px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var insert_cnt = 0;
- for ( var i = grd_main.fixedRows; i <= grd_main.rows; i++ ) {
- if ( grd_main.rowStatus(i)=='1' ) { //insert
- insert_cnt = insert_cnt + 1 ;
- }
- }
- if ( insert_cnt > 0) {
- alert("카드사용신청은 한번에 1건식 처리 가능합니다.\n\n1건만 저장 후 다시 해 주세요");
- }else{
- misfGridIUD(grd_main, "A");
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("instcd")) = getUserInfo("dutplceinstcd");
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("lastupdtrid")) = getUserInfo("userid"); //사용자
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("receiptsabun")) = getUserInfo("userid"); //카드수령자
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("usebuseo")) = getUserInfo("dutplcecd");
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("requestdate")) = getCurrentDate();
- if ( model.getValue("/root/init/cardnolist/jobposcd").length > 0 ) {
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("admindept")) = getUserInfo("userid");
- }
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_main" nodeset="/root/main/maindatalist" caption="사용자^신청일자^사용부서^사용부서명^일련번호^재무확인^예상금액^실사용금액^사용처^사용시작^사용종료^신청사유^참석인원^부서장^품의번호^카드번호^카드수령자^instcd" colsep="^" colwidth="60, 80, 80, 100, 60, 60, 80, 80, 190, 100, 100, 260, 250, 60, 90, 140, 70, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" tooltip="true" style="left:0px; top:80px; width:1194px; height:635px; ">
- <col ref="lastupdtrid" style="left:106px; top:23px; width:128px; height:23px; text-align:center; "/>
- <col class="input_s_essential" ref="requestdate" type="input" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="usebuseo" style="text-align:center; "/>
- <col ref="usebuseonm" style="text-align:left; vertical-align:middle; "/>
- <col ref="seqno" style="left:904px; top:23px; width:100px; height:23px; text-align:right; "/>
- <col checkvalue="Y,N" ref="adminjeamu" style="text-align:center; "/>
- <col class="input_s_essential" ref="yskeum" type="input" format="(-)#,###" style="text-align:right; "/>
- <col class="input_s_essential" ref="silkeum" type="input" format="(-)#,###" style="text-align:right; "/>
- <col class="input_s_essential" ref="useplace" type="input" style="text-align:left; "/>
- <col class="input_s_essential" ref="frdate" type="inputdate" format="yyyy-mm-dd" style="left:1099px; top:23px; width:100px; height:23px; text-align:left; "/>
- <col class="input_s_essential" ref="todate" type="inputdate" format="yyyy-mm-dd" style="text-align:left; "/>
- <col class="input_s_essential" ref="requestcause" type="input"/>
- <col class="input_s_essential" ref="attend" type="input"/>
- <col ref="admindept" style="text-align:center; "/>
- <col ref="pumno" style="text-align:center; "/>
- <col ref="cardno" style="left:1418px; top:23px; width:185px; height:23px; text-align:left; "/>
- <col ref="receiptsabun" style="text-align:center; "/>
- <col ref="instcd" style="left:1619px; top:23px; width:60px; height:23px; "/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_main.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption21" class="tit_2" style="left:5px; top:57px; width:131px; height:13px; ">출력 목록</caption>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
- <button id="btn_save" class="btn4_letter2" style="left:1132px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fSetChackValue() ) { //저장시 입력data checking logic..
- //입력하신 DATA를 저장 하시겠습니까?
- rtn = messageBox("Data변경이 일어났습니다.","Q002");
- if ( rtn == "6" ) {
- //입력,수정,삭제된 data save node 에 담기..
- model.setValue("/root/hidden/save",grd_main.getUpdateData());
- if(submit("TXRAR01201")) {
- button2.dispatch("DOMActivate");
- }
- }
- }
-
- ]]>
- </script>
- </button>
- <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_print" class="btn4_letter2" visibility="visible" style="left:1070px; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (grd_main.row < 1 ) {
- alert("프린트할 Data를 선택해 주세요.");
- }else{
- model.setValue("/root/main/printdata/usebuseonm", grd_main.valueMatrix(grd_main.row, grd_main.colRef("usebuseonm")) );
- model.setValue("/root/main/printdata/yskeum", grd_main.valueMatrix(grd_main.row, grd_main.colRef("yskeum")) );
- model.setValue("/root/main/printdata/useplace", grd_main.valueMatrix(grd_main.row, grd_main.colRef("useplace")) );
- model.setValue("/root/main/printdata/frdate", grd_main.valueMatrix(grd_main.row, grd_main.colRef("frdate")) );
- model.setValue("/root/main/printdata/todate", grd_main.valueMatrix(grd_main.row, grd_main.colRef("todate")) );
- model.setValue("/root/main/printdata/requestcause", grd_main.valueMatrix(grd_main.row, grd_main.colRef("requestcause")) );
- model.setValue("/root/main/printdata/requestdate", grd_main.valueMatrix(grd_main.row, grd_main.colRef("requestdate")) );
- model.setValue("/root/main/printdata/admindeptnm", grd_main.valueMatrix(grd_main.row, grd_main.colRef("admindeptnm")) );
- model.refresh();
- exeReportPreview("SMRAR01201", "XMLSTR");
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|