123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- /***********************************************************************************************************************************************
- * create date : 2007.12.29
- * author : dhkim
- * file name : SMMNA01700.js
- * desc : 혈액폐기물리스트를 조회한다.
- ***********************************************************************************************************************************************/
-
- var xCondPath = '/root/cond'; //조회 xPath
- var xSendPath = '/root/send/reqdata'; //request xPath
- var currentDate = getCurrentDate(); //현재일자
-
- /*
- * 혈액폐기물 내역을 조회한다.
- */
- function fSearch(){
-
- var sdate = model.getValue(xCondPath + '/fromdd');
- var edate = model.getValue(xCondPath + '/todd');
-
- if(sdate > edate){
- messageBox('조회시작일자를 조회종료일자보다 이전으로', 'C001');
- return false;
- }
-
- model.removeNodeset(xSendPath);
- model.makeValue(xSendPath+'/ddflag', model.getValue(xCondPath + '/ddflag'));
- model.makeValue(xSendPath+'/fromdd', model.getValue(xCondPath + '/fromdd'));
- model.makeValue(xSendPath+'/todd', model.getValue(xCondPath + '/todd'));
- submit('TRMNA01701');
- }
-
- /**
- * 조회조건 초기화
- */
- function fInit(){
- fChangeDDFlag('dd');
- model.refresh();
- fSearch();
- }
-
-
- /**
- * 년,월,일별 검색조건에 따라 조회시작, 종료 날짜 컴퍼넌트를 년,월,일 형식에 맞게 바꿔준다.
- *
- */
- function fChangeDDFlag(ddflag){
-
- model.removeNodeset(xCondPath);
- model.makeNode(xCondPath + '/ddflag');
- model.makeNode(xCondPath + '/fromdd');
- model.makeNode(xCondPath + '/todd');
-
- var condDate = currentDate;
-
- if(ddflag == 'dd'){
- cap_date.value = '기준일자 : ';
- ipt_fromdd.attribute("width") = "95";
- ipt_todd.attribute("width") = "95";
- ipt_fromdd.attribute('format') = 'yyyy-mm-dd';
- ipt_todd.attribute('format') = 'yyyy-mm-dd';
- }else if(ddflag == 'mm'){
- condDate = condDate.substring(0, 6);
- cap_date.value = '기준년월 : ';
- ipt_fromdd.attribute("width") = "80";
- ipt_todd.attribute("width") = "80";
- ipt_fromdd.attribute('format') = 'yyyy-mm';
- ipt_todd.attribute('format') = 'yyyy-mm';
- }else if(ddflag == 'yy'){
- condDate = condDate.substring(0, 4);
- cap_date.value = '기준년도 : ';
- ipt_fromdd.attribute("width") = "60";
- ipt_todd.attribute("width") = "60";
- ipt_fromdd.attribute('format') = 'yyyy';
- ipt_todd.attribute('format') = 'yyyy';
- }
-
-
- model.setValue(xCondPath + '/ddflag', ddflag);
- model.setValue(xCondPath + '/fromdd', condDate);
- model.setValue(xCondPath + '/todd', condDate);
-
- model.refresh();
-
- }
|