123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 단문메시지형식관리 (ZMS00200.js)
- - Version :
- 1) : Ver.1.00.00
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공통코드스크립트호출
- * @return :
- * @---------------------------------------------------
- */
- function fInitcomcd() {
- // 공통코드 스크립트 호출
- //zbcfGetKindCodeList( new Array("Z0001Z000901"), new Array("/root/init/comcd"));
- zbcfGetKindCodeList(new Array("Z0001"), new Array("Z0009"), new Array("/root/init/comcd"), false, new Array("cdnm"), new Array("asc"));
- fInsertInstance("Z0001Z0009", "전체", "-");
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize() {
- model.removeNodeset("/root/main/list/msgfrmtlist");
- model.resetInstanceNode("/root/send");
- model.resetInstanceNode("/root/main/item");
- // 공통코드 스크립트 호출
- //zbcfGetCodeList( new Array("Z0001Z000901"), new Array("/root/init/comcd"));
- model.refresh();
- cmb_bizabbr.select(0);
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드에 있는 데이터를 하단으로 옮겨옴
- * @return :
- * @---------------------------------------------------
- */
- function fUpdateGrid() {
- var cur_row = grd_msgformatlist.row;
- var temp;
- var formatID;
- if ( cur_row > 0 ) {
- model.copyNode("/root/main/item","/root/main/list/msgfrmtlist["+cur_row+"]");
- formatID = model.getValue("/root/main/list/msgfrmtlist["+cur_row+"]/msgfrmtid");
- temp = formatID.split(".");
- model.setValue("/root/hidden/serial", temp[2]);
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드의 데이터를 하단에 반영
- * @return :
- * @---------------------------------------------------
- */
- function fFetchFromGrid() {
- var cur_row = grd_msgformatlist.row;
- var temp;
- var formatID;
- if ( cur_row > 0 ) {
- model.copyNode("/root/main/item","/root/main/list/msgfrmtlist["+cur_row+"]");
- formatID = model.getValue("/root/main/list/msgfrmtlist["+cur_row+"]/msgfrmtid");
- temp = formatID.split(".");
- model.setValue("/root/hidden/serial", temp[2]);
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 하단폼에 입력된 값들을 체크한다.
- * @return :
- * @---------------------------------------------------
- */
- function fCheckFormField() {
- // 각 필드값을 체크한다.
- if(model.getValue("/root/main/item/bizabbr").getTrim()=="")
- {
- messageBox("업무시스템 ", "I003");
- model.setFocus("cmb_syscdinput");
- return false;
- }
- if(model.getValue("/root/hidden/serial").getTrim()=="")
- {
- messageBox("메시지형식번호는 ", "I003");
- model.setFocus("ipt_serial");
- return false;
- }
- if(model.getValue("/root/main/item/replytelno").getTrim()=="")
- {
- messageBox("회신번호는 ", "I003");
- model.setFocus("ipt_replytelno");
- return false;
- }
- if(model.getValue("/root/main/item/rsrvtime").getTrim()=="")
- {
- messageBox("예약발송시간은 ", "I003");
- model.setFocus("ipt_rsrvtime");
- return false;
- }
- if(model.getValue("/root/main/item/rsrvtime").length != 4)
- {
- messageBox("예약발송시간이 mm:ss 형식과 ", "E004");
- model.setFocus("ipt_rsrvtime");
- return false;
- }
- if(model.getValue("/root/main/item/msgfrmtcnts").getTrim()=="")
- {
- messageBox("메시지형식은 ", "I003");
- model.setFocus("tar_msgformat");
- return false;
- }
- return true;
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 업무시스템명과 일련번호를 조합하여 조회조건에 포함될 메시지형식을 만든다.
- * @return :
- * @---------------------------------------------------
- */
- function fSetMsgFormatID()
- {
- var bizabbr = model.getValue("/root/main/item/bizabbr");
- var serial = model.getValue("/root/hidden/serial");
- switch(serial.length) {
- case 1 :
- serial = "000"+serial;
- break
- case 2 :
- serial = "00"+serial;
- break
- case 3 :
- serial = "0"+serial;
- break
- default:
-
- }
- model.setValue("/root/hidden/serial", serial);
- model.setValue("/root/main/item/msgfrmtid", "sms."+bizabbr+"."+serial);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 업무시스템명과 일련번호를 조합하여 메시지형식을 만든다.
- * @return :
- * @---------------------------------------------------
- */
- function fChkBizCombo()
- {
- var bizabbr = model.getValue("/root/send/bizabbr");
- var serial = model.getValue("/root/send/serial");
- if (bizabbr == "-")
- {
- model.setValue("/root/send/msgfrmtid", "");
- model.setValue("/root/send/serial", "");
- ipt_msgfrmtno.disabled = true;
- model.refresh();
- return;
- }
- else
- {
- ipt_msgfrmtno.disabled = false;
- }
- if(serial.getTrim()=="")
- model.setValue("/root/send/msgfrmtid", "");
- else
- model.setValue("/root/send/msgfrmtid", "sms."+bizabbr+"."+serial);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 업무시스템명과 일련번호를 조합하여 메시지형식을 만든다.
- * @return :
- * @---------------------------------------------------
- */
- function fChkMsgFormatID()
- {
- var bizabbr = model.getValue("/root/send/bizabbr");
- var serial = model.getValue("/root/send/serial");
- if(bizabbr.getTrim()=="-")
- {
- messageBox("업무시스템을", "C002");
- model.setFocus("cmb_bizabbr");
- return;
- }
- if(serial.getTrim()=="")
- model.setValue("/root/send/msgfrmtid", "");
- else
- model.setValue("/root/send/msgfrmtid", "sms."+bizabbr+"."+serial);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 지정된 인스턴스를 삽입
- * @return :
- * @---------------------------------------------------
- */
- function fInsertInstance(cdGroupID, codeName, codeID) {
- model.refresh();
-
- model.copyNode("/root/hidden/comcd","/root/init/comcd");
- var nodelist = instance1.selectNodes("/root/hidden/comcd/"+cdGroupID);
- var newNode = instance1.createNode("element", cdGroupID, "");
- var childnode1 = instance1.createNode("element", "cdnm", "");
- var childnode2 = instance1.createNode("element", "cdengabbrnm", "");
- newNode.appendChild(childnode1);
- newNode.appendChild(childnode2);
- if (nodelist.length > 0)
- {
- var currNode = root.hidden.comcd.insertBefore(newNode, nodelist.item(0));
- model.setValue("/root/hidden/comcd/"+cdGroupID+"[1]/cdnm", codeName);
- model.setValue("/root/hidden/comcd/"+cdGroupID+"[1]/cdengabbrnm", codeID);
- }
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @return :
- * @---------------------------------------------------
- */
- function fChkFormatID() {
- var cond = model.getValue("/root/main/item/msgfrmtid");
- model.setValue("/root/send/checkcond", cond);
- if(submit("TXZMS00202"))
- {
- messageBox(model.getValue("/root/hidden/msg/info/contents"), "I999");
- }
- /*
- model.resetInstanceNode("/root/send");
- model.resetInstanceNode("/root/main/item");
- fInsertInstance("bizabbr", "전체", "-");
- model.refresh();
- cmb_bizabbr.select(0);
- */
- }
- /**
- * @group :
- * @ver : 2006.12.20
- * @by : 이상준
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드데이터 저장
- * @return :
- * @---------------------------------------------------
- */
- function fSaveGrid() {
- model.setValue("/root/send/msgfrmtlist",grd_msgformatlist.getUpdateData());
- if ( submit("TXZMS00201") ) {
- grd_msgformatlist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- }
- }
|