123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <list>
- <pumlist>
- <cdacntcd/>
- <deptcd/>
- <olddeptcd/>
- <dutplcedeptcd/>
- <emplno/>
- <emplnm/>
- <amt/>
- <transfacntno/>
- <rmrk/>
- <pumgubun/>
- <pumno/>
- <serial/>
- <yesno/>
- <deptnm/>
- <chulseq/>
- </pumlist>
- </list>
- <list1>
- <empllist>
- <buseocode/>
- <sabun/>
- <emplnm/>
- <serial/>
- <amt/>
- <rmrk/>
- </empllist>
- </list1>
- <chulempllst>
- <chulempinfo/>
- </chulempllst>
- </main>
- <send>
- <code/>
- <save>
- <pumlist/>
- </save>
- <plusamt/>
- </send>
- <init>
- <combo1>
- <codeinfo>
- <code/>
- <codename/>
- </codeinfo>
- </combo1>
- <combo2>
- <deptinfo>
- <deptcd/>
- <deptnm/>
- </deptinfo>
- </combo2>
- </init>
- <pop1data>
- <pumgubun/>
- <pumno/>
- <cdacntcd/>
- <pumamt/>
- <irow/>
- <instcd/>
- <chulseq/>
- </pop1data>
- </root>
- </instance>
- <submission id="TRRAD01509" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/pop1data" resultref="/root/main/list"/>
- <submission id="TRRAD01510" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/pop1data" resultref="/root/init/combo1"/>
- <submission id="TRRAD01511" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/pop1data" resultref="/root/init/combo2"/>
- <submission id="TRRAD01512" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list1"/>
- <submission id="TXRAD01502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden"/>
- <bind id="bind_totamt" ref="/root/hidden/totamt" calculate="(/root/main/orch_one/paytotamt) - (/root/main/orch_one/incmtax) -(/root/main/orch_one/resdntax)"/>
- <bind id="bind_amt" ref="/root/hidden/orchreturn/amt" calculate="sum(/root/main/list/orchlist/paytotamt)"/>
- <bind id="bind_incmtax" ref="/root/hidden/orchreturn/incmtax" calculate="sum(/root/main/list/orchlist/incmtax)"/>
- <bind id="bind_resdntax" ref="/root/hidden/orchreturn/resdntax" calculate="sum(/root/main/list/orchlist/resdntax)"/>
- <submission id="TRRPD08005" mediatype="application/x-www-form-urlencoded" method="get" ref="/root/pop1data" replace="instance" resultref="/root/main/chulempllst"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.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/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../mis/paybaseinfomngtweb/js/RWC001.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fInitialize()
- {
- submit("TRRAD01510");
- submit("TRRAD01511");
- //model.resetInstanceNode("/root/main/list/pumlist");
- misfGridInit(datagrid1);
- misfGridInit(datagrid2);
- misfMsterDetailSet(datagrid1,null, "TRRAD01509" ,"Y");
- var instcd = getUserInfo("dutplceinstcd");
- model.makeValue("/root/pop1data/instcd", instcd);
- if (submit("TRRAD01509")){
- if (model.getValue("/root/main/list/pumlist/yesno") == "Y"){
- caption1.visible = true;
- button1.disabled = true;
- group2.disabled = true;
- btn_grdaddpaydedulist.disabled = true;
- btn_grddelpaydedulist.disabled = true;
- btn_inputexcel.disabled = true;
- }
- }
- if(datagrid1.rows < 2){
- //2011.09.05 cyw 출장품의
- if( model.getValue("/root/pop1data/chulseq") != "" ){
- fgetChulemplst();
- }else{
- btn_grdaddpaydedulist.dispatch("DOMActivate");
- btn_close.disabled = true;
- }
- }
-
-
- var amt = 0;
- for(var i = 1; i < datagrid1.rows; i++){
- amt += parseInt(datagrid1.valueMatrix(i, datagrid1.colRef("amt")));
- }
- model.setValue("/root/send/plusamt", amt);
-
- model.refresh();
- }
-
- // 2011.09.05 CYW 출장비 품의일 경우 등록한 출장내역 자동으로 행생성해주기.
- function fgetChulemplst(){
- if( submit("TRRPD08005") ){
- var EmpCnt = getNodesetCount("/root/main/chulempllst/chulempinfo");
- for( var i = 1; i <= EmpCnt ; i++ ){
- misfGridIUD(datagrid1, "A");
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/cdacntcd", model.getValue("/root/pop1data/cdacntcd"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/pumgubun", model.getValue("/root/pop1data/pumgubun"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/pumno", model.getValue("/root/pop1data/pumno"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/amt", model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/chulkeum"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/deptcd", model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/dutplcedeptcd"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/emplno", model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/sabun"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/emplnm", model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/name"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/rmrk", model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/banknm") + " " + model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/bankno") );
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/chulseq", model.getValue("/root/main/chulempllst/chulempinfo[" + i + "]/chulseq"));
-
- }
-
- if( EmpCnt < 1 ){
- btn_grdaddpaydedulist.dispatch("DOMActivate");
- btn_close.disabled = true;
- }
- model.refresh();
- }
- }
-
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="900" pageheight="550" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group1" style="left:0px; top:0px; width:698px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:190px; height:14px; ">품의사용내역</caption>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:16px; width:865px; height:429px; ">
- <datagrid id="datagrid1" nodeset="/root/main/list/pumlist" caption="계정과목^사용부서^olddeptcd^dutplcedeptcd^사용자^성명^금액^계좌번호^비고^품의번호^caption1^caption2^caption3^caption4" colsep="^" colwidth="93, 149, 100, 100, 100, 100, 110, 130, 268, 34, 32, 39, 37, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:0px; width:863px; height:428px; ">
- <col ref="cdacntcd"/>
- <col editmode="inputsearch" ref="deptcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/combo2/deptinfo">
- <label ref="deptnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="olddeptcd" visibility="hidden"/>
- <col ref="dutplcedeptcd" visibility="hidden"/>
- <col disabled="true" ref="emplno" type="inputbutton"/>
- <col ref="emplnm"/>
- <col ref="amt" type="input" format="(-)#,###" style="text-align:right; "/>
- <col ref="transfacntno" type="input" visibility="hidden" style="text-align:left; "/>
- <col ref="rmrk" type="input"/>
- <col ref="pumgubun" visibility="hidden" style="text-align:center; "/>
- <col ref="pumno" visibility="hidden"/>
- <col ref="serial" visibility="hidden"/>
- <col ref="yesno" visibility="hidden"/>
- <col ref="deptnm" visibility="hidden"/>
- <col ref="chulseq" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if (datagrid1.colAttribute(datagrid1.col,"ref") == "emplno" ) { //계산기준코드
- var recv_list = "emplno,emplnm,deptcd,transfacntno,dutplcedeptcd";
-
- rpbfOpenPopUpList("SPRPB00101", datagrid1, recv_list,"","N");
- model.setValue("/root/main/list/pumlist["+ datagrid1.row +"]/deptcd", model.getValue("/root/main/list/pumlist["+ datagrid1.row +"]/dutplcedeptcd"));
- model.setValue("/root/main/list/pumlist["+ datagrid1.row +"]/olddeptcd", model.getValue("/root/main/list/pumlist["+ datagrid1.row +"]/deptcd"));
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (datagrid1.colAttribute(datagrid1.col,"ref") == "emplno" ) { //계산기준코드
- var recv_list = "emplno,emplnm";
- misfValidationCheck("01-1", "", recv_list);
- model.refresh();
- }else if(datagrid1.col == datagrid1.colRef("amt")){
- var amt = 0;
- for(var i = 1; i < datagrid1.rows; i++){
- amt += parseInt(datagrid1.valueMatrix(i, datagrid1.colRef("amt")));
- }
- model.setValue("/root/send/plusamt", amt);
- model.refresh();
- }
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:498px; width:865px; height:27px; ">
- <button id="btn_close" class="btn4_letter2" navindex="6" style="left:800px; top:3px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var totamt = 0;
- for (var i = 1; i < datagrid1.rows; i++){
- var amt = model.getValue("/root/main/list/pumlist[" + i + "]/amt");
- if (isNaN(amt) || amt == ""){
- amt = 0;
- }
- /*
- if (amt == 0){
- messageBox(i + "번째 금액은 필수 입력항목입니다.", "E999", "");
- return;
- }
- */
- var deptcd = model.getValue("/root/main/list/pumlist["+ i +"]/deptcd");
- var emplno = model.getValue("/root/main/list/pumlist["+ i +"]/emplno");
- if (deptcd == ""){
- messageBox(i + "번째 부서코드는 필수 입력항목입니다.", "E999", "");
- return;
- }
- if (emplno == ""){
- messageBox(i + "번째 사원번호는 필수 입력항목입니다.", "E999", "");
- return;
- }
- if (datagrid1.rowStatus(i) != 4 && datagrid1.rowStatus(i) != 5 && datagrid1.rowStatus(i) != 6){
- totamt = parseFloat(totamt) + parseFloat(amt);
- }
- }
- var totamt1 = parseFloat(model.getValue("/root/pop1data/pumamt"));
- if (totamt != totamt1){
- messageBox("품의금액과 사용내역 총금액이 상이합니다." , "E999", "");
- //if( messageBox("품의금액과 사용내역 총금액이 상이합니다. 계속진행하시겠습니까" , "Q99" ) != 6 ){
- return;
- //}
- }
- window.close();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" navindex="6" style="left:740px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var pmcnt = 0;
- var deptpm = "";
- var emplpm = "";
-
- var totamt = 0;
- for (var i = 1; i < datagrid1.rows; i++){
- pmcnt = 0;
- deptpm = "";
- emplpm = "";
- // 2011.06.30 cyw
- for (var s = 1; s < datagrid1.rows; s++){
- if( model.getValue("/root/main/list/pumlist[" + i + "]/deptcd") == model.getValue("/root/main/list/pumlist[" + s + "]/deptcd")
- && model.getValue("/root/main/list/pumlist[" + i + "]/emplno") == model.getValue("/root/main/list/pumlist[" + s + "]/emplno") ){
- pmcnt++;
- deptpm = datagrid1.labelMatrix(i, datagrid1.colRef("deptcd"));
- emplpm = datagrid1.labelMatrix(i, datagrid1.colRef("emplnm"));
- }
- }
-
- //2011.06.29 사용부서와 사용자가 같은 사람이 존재하면 Return;
- if ( pmcnt > 1 ){
- messageBox("사용부서와 사용자가 동일한 데이터가 2건이상 있습니다. \n [ " + deptpm + " / " + emplpm + " ]", "I007");
- return;
- }
- var amt = model.getValue("/root/main/list/pumlist[" + i + "]/amt");
- if (isNaN(amt) || amt == ""){
- amt = 0;
- }
- /*
- if (amt == 0){
- messageBox(i + "번째 금액은 필수 입력항목입니다.", "E999", "");
- return;
- }
- */
- var deptcd = model.getValue("/root/main/list/pumlist["+ i +"]/deptcd");
- var emplno = model.getValue("/root/main/list/pumlist["+ i +"]/emplno");
- if (deptcd == ""){
- messageBox(i + "번째 부서코드는 필수 입력항목입니다.", "E999", "");
- return;
- }
- if (emplno == ""){
- messageBox(i + "번째 사원번호는 필수 입력항목입니다.", "E999", "");
- return;
- }
- if (datagrid1.rowStatus(i) != 4 && datagrid1.rowStatus(i) != 5 && datagrid1.rowStatus(i) != 6){
- totamt = parseFloat(totamt) + parseFloat(amt);
- }
- }
-
- var totamt1 = parseFloat(model.getValue("/root/pop1data/pumamt"));
- if (totamt != totamt1){
- messageBox("품의금액과 사용내역 총금액이 상이합니다." , "E999", "");
- //if( messageBox("품의금액과 사용내역 총금액이 상이합니다. 계속진행하시겠습니까" , "Q99" ) != 6 ){
- return;
- //}
- }
- if (misfSave("TXRAD01502")){
- submit("TRRAD01509");
- button3.dispatch("DOMActivate");
- var irow = model.getValue("/root/pop1data/irow");
- if (totamt != totamt1){
- //opener.javascript.model.setValue("/root/main/grnt/grntlist2[" + irow + "]/pumamt", totamt);
- //opener.javascript.grd_grntpsn1.rowStatus(irow) = 2;
- //opener.javascript.model.setValue("/root/send/paydedu/stat", "U");
- //opener.javascript.model.setValue("/root/main/grnt/grntlist1/iudgb", "U");
- //opener.javascript.grd_grntpsn1.col = 6;
- //opener.javascript.grd_grntpsn1.dispatch("xforms-value-changed");
- opener.javascript.button5.dispatch("DOMActivate");
- window.close();
- }else{
- window.close();
- }
- }
- ]]>
- </script>
- </button>
- <button id="btn_grddelpaydedulist" class="btn2_letter3" style="left:684px; top:5px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(datagrid1, "D");
- var amt = 0;
- for(var i = 1; i < datagrid1.rows; i++){
- amt += parseInt(datagrid1.valueMatrix(i, datagrid1.colRef("amt")));
- }
- model.setValue("/root/send/plusamt", amt);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grdaddpaydedulist" class="btn2_letter3" style="left:628px; top:5px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(datagrid1, "A");
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/cdacntcd", model.getValue("/root/pop1data/cdacntcd"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/pumgubun", model.getValue("/root/pop1data/pumgubun"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/pumno", model.getValue("/root/pop1data/pumno"));
- model.setValue("/root/main/list/pumlist[" + datagrid1.row + "]/amt", model.getValue("/root/pop1data/pumamt"));
- var amt = 0;
- for(var i = 1; i < datagrid1.rows; i++){
- amt += parseInt(datagrid1.valueMatrix(i, datagrid1.colRef("amt")));
- }
- model.setValue("/root/send/plusamt", amt);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button3" class="btn2_letter3" style="left:570px; top:5px; width:53px; height:19px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( messageBox("출력하시겠습니까" , "Q99" ) == 6 ){
- exeReportPreview("RPRAD01505", "XMLSTR" , "" , "" , "true" , "", "", "", "", "true","","","","","","","","false");
- }
- ]]>
- </script>
- </button>
- </group>
- <select1 id="combo1" ref="/root/send/code" appearance="minimal" style="left:10px; top:450px; width:270px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/combo1/codeinfo">
- <label ref="codename"/>
- <value ref="code"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- submit("TRRAD01512");
- ]]>
- </script>
- </select1>
- <datagrid id="datagrid2" nodeset="/root/main/list1/empllist" visibility="hidden" caption="caption1^caption2^caption3^caption4^caption5^caption6" colsep="^" colwidth="102, 82, 74, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:225px; top:270px; width:590px; height:150px; ">
- <col ref="buseocode"/>
- <col ref="sabun"/>
- <col ref="emplnm"/>
- <col ref="serial"/>
- <col ref="amt"/>
- <col ref="rmrk"/>
- </datagrid>
- <caption id="caption1" visibility="hidden" style="left:670px; top:466px; width:200px; height:25px; font-size:16pt; font-weight:bold; color:#ff0000; text-align:right; ">승인된 자료입니다.</caption>
- <button id="btn_inputexcel" class="btn2_letter8" style="left:305px; top:450px; width:64px; height:19px; ">
- <caption>약속정보 COPY</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // if (datagrid1.rows > 1){
- // messageBox("기존 자료가 존재합니다 .삭재후 처리하세요!!!!!!!!!... ", "E999", "");
- // return;
- // }
- var k = parseInt(datagrid1.rows) - 1;
- for (i = 1; i < datagrid2.rows; i++){
- k = parseInt(k) + 1;
- datagrid1.addRow();
- //k = datagrid1.row;
- model.setValue("/root/main/list/pumlist[" + k + "]/cdacntcd", model.getValue("/root/pop1data/cdacntcd"));
- model.setValue("/root/main/list/pumlist[" + k + "]/pumgubun", model.getValue("/root/pop1data/pumgubun"));
- model.setValue("/root/main/list/pumlist[" + k + "]/pumno", model.getValue("/root/pop1data/pumno"));
- model.setValue("/root/main/list/pumlist[" + k + "]/deptcd", model.getValue("/root/main/list1/empllist[" + i + "]/buseocode"));
- model.setValue("/root/main/list/pumlist[" + k + "]/emplno", model.getValue("/root/main/list1/empllist[" + i + "]/sabun"));
- model.setValue("/root/main/list/pumlist[" + k + "]/emplnm", model.getValue("/root/main/list1/empllist[" + i + "]/emplnm"));
- model.setValue("/root/main/list/pumlist[" + k + "]/serial", model.getValue("/root/main/list1/empllist[" + i + "]/serial"));
- model.setValue("/root/main/list/pumlist[" + k + "]/amt", model.getValue("/root/main/list1/empllist[" + i + "]/amt"));
- model.setValue("/root/main/list/pumlist[" + k + "]/rmrk", model.getValue("/root/main/list1/empllist[" + i + "]/rmrk"));
- datagrid1.rowStatus(k) = 1;
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption2" style="left:425px; top:468px; width:105px; height:25px; font-size:14pt; font-weight:bold; ">품의금액 :</caption>
- <output id="output1" ref="/root/pop1data/pumamt" format="(-)#,###" style="left:530px; top:470px; width:140px; height:19px; font-size:14pt; font-weight:bold; text-align:center; "/>
- <caption id="caption3" style="left:425px; top:447px; width:105px; height:25px; font-size:14pt; font-weight:bold; ">사용금액 :</caption>
- <output id="output2" ref="/root/send/plusamt" format="(-)#,###" style="left:530px; top:449px; width:140px; height:19px; font-size:14pt; font-weight:bold; text-align:center; "/>
- </xhtml:body>
- </xhtml:html>
|