123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518 |
- <?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>
- <list1>
- <nuclcdlist/>
- </list1>
- <list2>
- <nuclcdapplist/>
- </list2>
- </main>
- <send>
- <suppdeptcd/>
- <mon/>
- <tue/>
- <wed/>
- <thu/>
- <fri/>
- <sat/>
- <nuclcd/>
- <basedd/>
- <nuclcdapplist/>
- <bdioflag>I</bdioflag>
- <itemflag>N</itemflag>
- <globalinstance>
- <instance1/>
- </globalinstance>
- </send>
- <init>
- <P0152list>
- <P0152>
- <cdid/>
- <cdnm/>
- </P0152>
- </P0152list>
- <CurrentDate/>
- </init>
- <hidden>
- <calendar>
- <year/>
- <month/>
- <weeklist>
- <list>
- <sun/>
- <mon/>
- <tue/>
- <wed/>
- <thu/>
- <fri/>
- <sat/>
- <sun_memo/>
- <mon_memo/>
- <tue_memo/>
- <wed_memo/>
- <thu_memo/>
- <fri_memo/>
- <sat_memo/>
- </list>
- </weeklist>
- <todate/>
- </calendar>
- </hidden>
- <tmp>
- <list1/>
- <suplcustcd/>
- <suplcustnm/>
- </tmp>
- <combo/>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
- <script type="javascript">
- <![CDATA[
-
- /*** 초기화 ***/
- function fInitialize() {
-
- aezfSetSuppDeptcd();
-
- var dutplcecd = getUserInfo("dutplcecd");
- var selectplcecd = getScreenPrestDeptCd();
-
- if ( selectplcecd == "" ) {
- selectplcecd = dutplcecd;
- }
-
- model.setValue("/root/send/suppdeptcd", selectplcecd);
-
- var nowDate = getCurrentDate();
- // 현재 요일
- var nowDay = getCurrentWeek();
- // 현재일자가 포함된 월요일 구하기
- nowDay = ((nowDay * 1) * -1) +1 ;
- // 기준일자 생성
- model.makeValue("/root/init/CurrentDate",nowDate);
-
- opt_date.value = "[ 현재일 : " + nowDate.substring(0,4) + "." + nowDate.substring(4,6) + "." + nowDate.substring(6,8) +" ]";
-
- // 주가일정 생성
- setCalendar(nowDate, nowDay );
-
- submit("TRAEB01802");
- }
-
-
- /*** 주간 일정 타이틀 생성 및 조회 ***/
- function setCalendar(setDate, setDay) {
-
- model.removenode("/root/main/list1");
- model.removenode("/root/main/list2");
-
- // 일자
- var stDay = "";
- // 요일
- var stDate = "";
-
- var strString = "";
- var maxDay = 0;
-
- maxDay = (setDay * -1);
- maxDay = (6 - ((setDay*-1)+maxDay) ) + maxDay;
- var num = 1;
- // 현재일 기준의 주간 날짜와 요일 생성
- for (var i=setDay; i<maxDay; i++) {
- // 현재일자
- var nowDate = setDate.toDate("YYYYMMDD");
- var sysDate = nowDate.getAddDate(i,"D");
- stDate = getDateTime(sysDate,"D");
- stDay = getDateTime(sysDate,"W");
- strString = strString + "^" + stDate.substring(2,4) + "." + stDate.substring(4,6) + "." + stDate.substring(6,8) + "("+ stDay + ")" + "^" + stDate.substring(2,4) + "." + stDate.substring(4,6) + "." + stDate.substring(6,8) + "("+ stDay + ")";
- if (num == 1) {
- model.setValue("/root/send/mon",stDate);
- model.setValue("/root/send/basedd",stDate);
- } else if (num == 2) {
- model.setValue("/root/send/tue",stDate);
- } else if (num == 3) {
- model.setValue("/root/send/wed",stDate);
- } else if (num == 4) {
- model.setValue("/root/send/thu",stDate);
- } else if (num == 5) {
- model.setValue("/root/send/fri",stDate);
- } else if (num == 6) {
- model.setValue("/root/send/sat",stDate);
- }
- num++;
- }
-
- grd_nuclcdlist.attribute("caption") = "±^핵종코드^구분"+ strString + "^총용량^신청량^확인량|±^핵종코드^구분^검사수^핵종량^검사수^핵종량^검사수^핵종량^검사수^핵종량^검사수^핵종량^검사수^핵종량^총용량^신청량^확인량";
- grd_nuclcdlist.rebuild();
-
- submit("TRAEB02701");
-
- grd_nuclcdlist.rebuild();
- setTree(grd_nuclcdlist, 0, 0, true);
- for (var i=1; i<grd_nuclcdlist.rows; i++) {
- var chk = grd_nuclcdlist.valueMatrix(i, grd_nuclcdlist.colRef("seq"));
- if (chk == "1") {
- grd_nuclcdlist.rowStyle(i,"data","font-weight")="bold";
- grd_nuclcdlist.rowstyle(i, "data", "color") = "#0000ff";
- }
- }
- model.refresh();
- }
-
-
- /*** 주간 단위 핵종 신청량 조회 ***/
- function fNuclAppSrch() {
-
- var row = grd_nuclcdlist.row;
- var nuclcd = model.getValue("/root/main/list1/nuclcdlist["+ row + "]/nuclcd");
- model.removenode("/root/main/list2");
- model.setValue("/root/send/nuclcd", nuclcd);
- submit("TRAEB02702");
- model.refresh();
- }
- /*** 주간 단위 핵종 신청량저장 ***/
- function chkUpdatedData() {
- if ( messageBox("", "Q002") == 6 ) {
-
- var row = grd_nuclcdlist.row;
-
- var nodeCnt = getNodesetCount("/root/main/list2/nuclcdapplist");
- nodeCnt = (nodeCnt*1) +1;
-
- for (var i=1; i<nodeCnt; i++) {
- var appdd = model.getValue("/root/main/list2/nuclcdapplist["+ i + "]/appdd");
- if (appdd == "") {
- messageBox("신청일자는 필수 입력입니다.", "I");
- return;
- }
-
- // 비고 size 제한 255
- var rem = model.getValue("/root/main/list2/nuclcdapplist["+ i + "]/rem");
- var iRemLength = getStringLength(rem);
-
- if (iRemLength > 255) {
- messageBox("비고 내용이 입력 범위를 초과하였습니다.", "I");
- return;
- }
-
- // true => Y , false=> N 변경 [DB size :CHARACTER(1)]
- var cnfmyn = model.getValue("/root/main/list2/nuclcdapplist["+ i + "]/cnfmyn");
- if (cnfmyn == "true") {
- model.setValue("/root/main/list2/nuclcdapplist["+ i + "]/cnfmyn","Y");
- } else {
- model.setValue("/root/main/list2/nuclcdapplist["+ i + "]/cnfmyn","N");
- }
- }
-
- var update = getGridUpdateData(grd_nuclcdapplist);
-
- if ( update == "" ) {
- messageBox("업데이트 정보가 없습니다.", "I");
- return;
- } else {
- model.setValue("/root/send/nuclcdapplist", update);
-
- if ( submit("TXAEB02701") ) {
- // 저장 후 재 조회
- if (submit("TRAEB02702")) {
- if (submit("TRAEB02701")) {
- grd_nuclcdlist.row = row;
- }
- }
- }
- model.refresh();
- }
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- //group1.attribute("height") = 0;
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRAEB02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list1"/>
- <submission id="TRAEB02702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list2"/>
- <submission id="TRAEB01802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/combo/nuclcd"/>
- <submission id="TXAEB02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1101;2,786;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1100px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">핵종 사용량 관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:15px; width:1100px; height:740px; ">
- <datagrid id="grd_nuclcdlist" nodeset="/root/main/list1/nuclcdlist" allowuserresize="true" caption="±^핵종코드^구분^12/09(월)^12/09(월)^12/10(화)^12/10(화)^12/11(수)^12/11(수)^12/12(목)^12/12(목)^12/13(금)^12/13(금)^12/14(토)^12/14(토)^총용량^신청량^확인량|±^핵종코드^구분^검사수^핵종량^검사수^핵종량^검사수^핵종량^검사수^핵종량^검사수^핵종량^검사수^핵종량^총용량^신청량^확인량" colsep="^" colwidth="22, 0, 245, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 70, 70, 70" ellipsis="true" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:29px; width:1098px; height:541px; ">
- <col ref="seq" style="text-align:left; "/>
- <col ref="nuclcd" visibility="hidden"/>
- <col ref="nuclcdnm"/>
- <col ref="moncnt" type="output" format="#,###" style="text-align:right; "/>
- <col ref="monqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="tuecnt" type="output" format="#,###" style="text-align:right; "/>
- <col ref="tueqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="wedcnt" type="output" format="#,###" style="text-align:right; "/>
- <col ref="wedqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="thucnt" type="output" format="#,###" style="text-align:right; "/>
- <col ref="thuqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="fricnt" type="output" format="#,###" style="text-align:right; "/>
- <col ref="friqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="satcnt" type="output" format="#,###" style="text-align:right; "/>
- <col ref="satqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="totqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="appqty" type="output" format="#,###.00" style="text-align:right; "/>
- <col ref="cnfmqty" type="output" format="#,###.00" style="text-align:right; "/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_nuclcdlist.isCell(event.target) && grd_nuclcdlist.row >= grd_nuclcdlist.fixedRows) {
-
- var col = grd_nuclcdlist.col;
-
- if (col != grd_nuclcdlist.colRef("seq")) {
- fNuclAppSrch();
- }
-
- // var nuclcdnm = grd_nuclcdlist.valueMatrix(row, grd_nuclcdlist.colRef("nuclcdnm"));
- // var nuclcd = grd_nuclcdlist.valueMatrix(row, grd_nuclcdlist.colRef("nuclcd"));
- // alert(" nuclcdnm : " + nuclcdnm);
- // alert(" nuclcd : " + nuclcd);
- //
- // // 핵종코드일 경우에만
- // if (chk == "1") {
- // // 주간단위 핵종 신청량 조회
- // fNuclAppSrch(row);
- // }
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_Next" class="icon_next" style="left:1085px; top:5px; width:13px; height:15px; ">
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- // 기준일자
- var setDate = model.getValue("/root/init/CurrentDate");
- var sysDate = setDate.toDate("YYYYMMDD");
-
- // 이전 주
- var nowDate = sysDate.getAddDate(7,"D");
- nowDate = nowDate.getDateFormat("YYYYMMDD");
-
- // 이전 주의 월요일
- var nowDay = sysDate.getDayOfWeek("N")
- nowDay = ((nowDay * 1) * -1) +1 ;
- // 기준일자 생성
- model.makeValue("/root/init/CurrentDate",nowDate);
-
- // 주간일정 생성 및 조회
- setCalendar(nowDate, nowDay );
-
- ]]>
- </script>
- <caption/>
- </button>
- <button id="btn_Previous" class="icon_pre" style="left:926px; top:5px; width:13px; height:15px; ">
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // 기준일자
- var setDate = model.getValue("/root/init/CurrentDate");
- var sysDate = setDate.toDate("YYYYMMDD");
-
- // 다음 주
- var nowDate = sysDate.getAddDate(-7,"D");
- nowDate = nowDate.getDateFormat("YYYYMMDD");
-
- // 다음 주의 월요일
- var nowDay = sysDate.getDayOfWeek("N")
- nowDay = ((nowDay * 1) * -1) +1 ;
- // 기준일자 생성
- model.makeValue("/root/init/CurrentDate",nowDate);
-
- // 주간일정 생성 및 조회
- setCalendar(nowDate, nowDay );
- ]]>
- </script>
- <caption/>
- </button>
- <caption id="caption1" class="tit_2" style="left:0px; top:10px; width:149px; height:14px; ">주간 핵종 사용 예정량</caption>
- <line id="line1" class="line_1" style="x1:1px; y1:24px; x2:1099px; y2:24px; "/>
- <datagrid id="grd_nuclcdapplist" nodeset="/root/main/list2/nuclcdapplist" caption="기준일자^지원부서코드^일련번호^신청일^핵종^판매회사^판매회사명^신청량^확인^비고" colsep="^" colwidth="100, 100, 100, 100, 120, 100, 150, 100, 53, 433" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:600px; width:1098px; height:135px; ">
- <col ref="basedd" visibility="hidden"/>
- <col ref="suppdeptcd" visibility="hidden"/>
- <col ref="seqno" visibility="hidden"/>
- <col ref="appdd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="nuclcd" type="combo">
- <choices>
- <itemset nodeset="/root/combo/itemlist/item">
- <label ref="itemnm"/>
- <value ref="itemcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="suplcmpy" type="inputbutton">
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- misfOpenPopUpList("14", ipt_suplcmpy, "", "suplcustcd,suplcustnm");
- model.refresh();
- var selectedrow = grd_nuclcdapplist.selectedCells.item(0).row;
- model.setValue("/root/main/list2/nuclcdapplist[" + selectedrow + "]/suplcmpy", model.getValue("/root/tmp/suplcustcd"));
- model.setValue("/root/main/list2/nuclcdapplist[" + selectedrow + "]/suplcmpynm", model.getValue("/root/tmp/suplcustnm"));
- model.refresh();
- ]]>
- </script>
- </col>
- <col ref="suplcmpynm" type="output"/>
- <col ref="appqty" type="input" format="#,###.00" maxlength="10" style="text-align:right; "/>
- <col ref="cnfmyn" type="checkbox"/>
- <col ref="rem" type="input"/>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:0px; top:580px; width:149px; height:13px; ">핵종별 신청내역</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:594px; x2:1098px; y2:594px; "/>
- <button id="btn_grddel" class="btn2_letter3" style="left:1045px; top:574px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_nuclcdapplist.row;
- grd_nuclcdapplist.deleteRow(row);
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter3" style="left:988px; top:574px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var row = grd_nuclcdlist.row;
- var chk = grd_nuclcdlist.valueMatrix(row, grd_nuclcdlist.colRef("seq"));
- var nuclcd = grd_nuclcdlist.valueMatrix(row, grd_nuclcdlist.colRef("nuclcd"));
- var nuclcdnm = grd_nuclcdlist.valueMatrix(row, grd_nuclcdlist.colRef("nuclcdnm"));
- var totqty = grd_nuclcdlist.valueMatrix(row, grd_nuclcdlist.colRef("totqty"));
-
- grd_nuclcdapplist.addRow();
-
- row = grd_nuclcdapplist.rows;
- row = row -1;
-
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/basedd",model.getValue("/root/send/mon"));
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/suppdeptcd",model.getValue("/root/send/suppdeptcd"));
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/appdd",getCurrentDate());
-
- // 핵종코드일 경우에만
- if (chk == "1") {
-
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/nuclcd",nuclcd);
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/nuclcdnm",nuclcdnm);
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/cnfmyn",'N');
- model.makeValue("/root/main/list2/nuclcdapplist["+ row + "]/appqty",totqty);
- model.refresh();
-
- }
-
- ]]>
- </script>
- </button>
- <output id="opt_date" class="output_fix" style="left:945px; top:3px; width:135px; height:19px; text-align:center; "/>
- <button id="button4" class="btn2_letter7" style="left:270px; top:3px; width:97px; height:19px; ">
- <caption>핵종기준량관리</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // 개인별예약조회
- modal("SMAEB02600", "", "200", "200", "SMAEB02600","","");
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" style="left:0px; top:757px; width:1100px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1100px; y2:0px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:928px; top:4px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- chkUpdatedData();
- ]]>
- </script>
- </button>
- <button id="btn_close" class="btn4_letter2" style="left:1043px; top:4px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
-
- ]]>
- </script>
- </button>
- <button id="btn_print" class="btn4_letter2" style="left:985px; top:4px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.copyNode("/root/tmp/list1", "/root/main/list1");
-
- var rowcnt = getNodesetCount("/root/tmp/list1/nuclcdlist");
- rowcnt = (rowcnt*1) +1;
-
- var seq = "";
- var monnm = grd_nuclcdlist.valueMatrix(0, 3);
- var tuenm = grd_nuclcdlist.valueMatrix(0, 5);
- var wednm = grd_nuclcdlist.valueMatrix(0, 7);
- var thunm = grd_nuclcdlist.valueMatrix(0, 9);
- var frinm = grd_nuclcdlist.valueMatrix(0, 11);
- var satnm = grd_nuclcdlist.valueMatrix(0, 13);
- for (var i=1; i<rowcnt; i++) {
- seq = model.getValue("/root/tmp/list1/nuclcdlist["+ i + "]/seq");
- if (seq == "1") {
- model.setValue("/root/tmp/list1/nuclcdlist["+ i + "]/seq","▣");
- } else if (seq == "2") {
- model.setValue("/root/tmp/list1/nuclcdlist["+ i + "]/seq","-");
- }
- if (i == 1) {
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/monnm",monnm);
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/tuenm",tuenm);
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/wednm",wednm);
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/thunm",thunm);
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/frinm",frinm);
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/satnm",satnm);
- model.makeValue("/root/tmp/list1/nuclcdlist["+ i + "]/todate",opt_date.label);
- }
- }
-
- exeReportPreview("RPAEB02700", "XMLSTR", "/root/tmp/list1");
- ]]>
- </script>
- </button>
- <input id="ipt_suplcmpynm" ref="/root/tmp/suplcustnm" visibility="hidden" style="left:610px; top:0px; width:90px; height:19px; "/>
- <input id="ipt_suplcmpy" ref="/root/tmp/suplcustcd" visibility="hidden" style="left:390px; top:0px; width:85px; height:19px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|