123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371 |
- /* ---------------------------------------------------------------------
- ???????????????????????????? (SMMRJ00200_????????????????????????????.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By taebum
- : 2009-12-07 ???? 10:05:51
- ---------------------------------------------------------------------- */
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : xforms-ready?? ???????? */
- /* return : */
- /* --------------------------------------------------*/
- var isFirst = "Y";
- function fInit() {
- ipt_reqfromstnddd.value = getNewDate().getAddDate(-2, "D").getDateFormat("YYYYMMDD").substr(0, 8);
- ipt_reqtostnddd.value = getCurrentDate().substr(0, 8);
- emrfGetCodeList(new Array("J000000001","J000000002","J000000003","J000000004","J000000005","J000000010","J000000014"), new Array("/root/init/J000000001","/root/init/J000000002","/root/init/J000000003","/root/init/J000000004","/root/init/J000000005","/root/init/J000000010","/root/init/J000000014"));
- // isFirst = "N";
- fGetOpenPatInfo();
- // fSearchPatNm();
- model.refresh();
- }
- function fInitMainList() {
- model.resetInstanceNode("/root/main/educordlists/educordlist");
- model.removeNodeset("/root/main/educcntslists/educcntslist");
- model.refresh();
- }
- function fGetOpenPatInfo(){
- var pid = "";
- var orddd = "";
- var cretno = "";
- var hngnm = "";
- var ioflag= "";
-
- if (isPopup() == true) {
- // param ????????
- pid = opener.javascript.getParameter("SMMRJ00200_pid");
- orddd = opener.javascript.getParameter("SMMRJ00200_orddd");
- cretno = opener.javascript.getParameter("SMMRJ00200_cretno");
- hngnm = opener.javascript.getParameter("SMMRJ00200_hngnm");
- ioflag = opener.javascript.getParameter("SMMRJ00200_ioflag");
- }
-
- if ( pid == null ) { pid == ""; }
- if ( orddd == null ) { orddd == ""; }
- if ( cretno == null ) { cretno == ""; }
- if ( hngnm == null ) { hngnm == ""; }
- if ( ioflag == null ) { ioflag == ""; }
- if ( pid != "" && orddd !="" && cretno!="" && hngnm != "" && ioflag!= "") {
- model.setValue("/root/send/reqdata/pid", pid);
- model.setValue("/root/send/reqdata/ordtype", ioflag);
- input1.refresh();
-
- model.makeValue("/root/init/condition/pid", pid);
- model.makeValue("/root/init/condition/orddd", orddd);
- model.makeValue("/root/init/condition/cretno", cretno);
-
- model.setValue("/root/send/reqdata/pnm", hngnm);
- input2.refresh();
- fSearchOrdList();
-
- if(pid != "" && hngnm =="" ){
- model.setValue("/root/send/reqdata/pid", pid);
- fSearchPatNm();
- }
- } else {
- if(pid != "" && hngnm == ""){
- model.setValue("/root/send/reqdata/pid", pid);
- fSearchPatNm();
- }
- }
-
- if ( pid == null || pid == "" ) {
- // ???? ????????
- var node = getGlobalVariable("paminfo");
- model.removeNodeset("/root/init/paminfo/list");
- setCSVToNode("/root/init/paminfo", node);
- pid = model.getValue("/root/init/paminfo/list/pid");
- model.makeValue("/root/send/reqdata/pid", pid);
- hngnm = model.getValue("/root/init/paminfo/list/hngnm");
- model.makeValue("/root/send/reqdata/pnm", hngnm);
- ioflag = model.getValue("/root/init/paminfo/list/ioflag");
- if(ioflag == "I"||ioflag == "D"||ioflag == "E"){
- ioflag = "I";
- }
- else if(ioflag == "O"){
- ioflag = "O";
- }
- else{
- ioflag = "ALL";
- }
-
-
- if(ioflag == "I"){
- orddd = model.getValue("/root/init/paminfo/list/indd");
- } else {
- orddd = model.getValue("/root/init/paminfo/list/orddd");
- }
- cretno = model.getValue("/root/init/paminfo/list/cretno");
-
- // orddd = "20060428";
- // cretno = "800339501";
-
- if ( pid == null ) { pid == ""; }
- if ( hngnm == null ) { hngnm == ""; }
- if ( orddd == null ) { orddd == ""; }
- if ( cretno == null ) { cretno == ""; }
- if ( pid != "" && orddd !="" && cretno!="" && hngnm != "") {
-
- model.makeValue("/root/init/condition/pid", pid);
- model.makeValue("/root/init/condition/orddd", orddd);
- model.makeValue("/root/init/condition/cretno", cretno);
- model.setValue("/root/send/reqdata/ordtype", ioflag);
-
- fSearchOrdList();
- } else {
- model.setFocus("input1")
- }
- }
- }
- function fSearchPatNm(){
- if(model.getValue("/root/send/reqdata/pid")==""){
- return;
- }else{
- fGetPid("/root/send/reqdata/pid", "/root/send/reqdata/pnm");
- }
- input2.refresh();
- }
- function fSearchOrdList(){
- model.removeNodeset("/root/init/ordlists");
- fInitMainList();
- model.refresh();
- var ordtype = radio2.value;
- if(!(model.getValue("/root/send/reqdata/pnm")=="")){
- model.setValue("/root/send/reqdata/ordtype",ordtype);
- submit("TRMRJ00102");
-
- if("" == model.getValue("/root/init/condition/pid") && "" == model.getValue("/root/init/condition/orddd") && "" == model.getValue("/root/init/condition/cretno") ){
- combo1.select(0);
- } else {
- fChangeValueOrdList("open");
- }
- }
- }
- function fOtherCheck(source, target){
- var inOtherYn = isSearchString(document.controls(source).value, "999");
- if(!inOtherYn){
- document.controls(target).value = "";
- }
- document.controls(target).visible=inOtherYn;
- }
- /**
- * @desc : ???????????? ???? ????
- * @
- * @param : refPid - ???????? ???? node path
- * refPnm - ?????? ???? node path
- * @return :
- * @authur : ?????? 2008.03.18
- * @---------------------------------------------------
- */
- function fGetPid(refPid, refPnm)
- {
- model.setValue("/root/send/reqdata/pnm","");
- input2.refresh();
- model.removeNodeset("/root/init/ordlists");
- fInitMainList();
- combo1.refresh();
- model.makeNode("/root/main/patinfo/patinfolist");
- //?????????? 1???? ???? ???????? ???? ??????.
- model.makeValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
- model.makeValue("/root/hidden/tmp/pidpopupinfo/autoflag", "Y");
- model.makeValue("/root/hidden/tmp/pidpopupinfo/pid", model.getValue(refPid));
- // model.makeValue("/root/hidden/tmp/pidpopupinfo/hngnm", model.getValue(refPnm));
- if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){
- model.makeValue("/root/hidden/tmp/pidpopupinfo/srchcond", '1');
- }
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
- model.resetInstanceNode("/root/source");
- //???????? copy
- var popupendflag = model.getValue("/root/main/popupendflag");
- if (popupendflag == "ok")
- {
- model.makeValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid"));
- if (refPnm == null) { refPnm = "" }
- if (refPnm != "") {
- model.makeValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm"));
- }
- model.refresh();
- fSearchOrdList();
- }
- }
- function fChangeValueOrdList(value){
- var ordtype = "";
- var i = 0;
-
- if( value == "open" && model.getValue("/root/init/condition/pid") !="" && model.getValue("/root/init/condition/orddd") != "" && model.getValue("/root/init/condition/cretno") != ""){
- for(i=1;i<=combo1.length; i++ ){
- if(model.getValue("/root/init/ordlists/ordlist["+i+"]/suminfo") == model.getValue("/root/init/condition/pid")+model.getValue("/root/init/condition/orddd")+model.getValue("/root/init/condition/cretno")){
- model.removenode("/root/init/condition");
- combo1.select(i-1);
- }
- }
-
- }else{
- model.setValue("/root/search/pid" , model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/pid"));
- model.setValue("/root/search/orddd" , model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/orddd"));
- model.setValue("/root/search/cretno" ,model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/cretno"));
- model.setValue("/root/search/ordtype" ,model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/ordtype"));
- model.setValue("/root/search/fromdd" ,model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/orddd"));
- ordtype = model.getValue("/root/init/ordlists/ordlist["+(combo1.focusIndex+1)+"]/ordtype");
-
- if(ordtype == "I"){
- checkbox1.deselect(0);
- }else{
- checkbox1.select(0);
- }
-
- fSelectOrdCntsList();
- }
-
- }
- function fSelectOrdCntsList(){
- fInitMainList();
-
- submit("TRMRJ00201");
- fCheckOtherYn(ipt_eduwho9 ,chk_eduwho9.value);
- fCheckOtherYn(ipt_eduhandcap9 ,chk_eduhandcap9ck.value);
- fCheckOtherYn(ipt_eduway9 ,chk_eduway9ck.value);
- fCheckOtherYn(ipt_eduneed9 ,chk_eduneed9ck.value);
-
- if(rdo_eduwill.value== "999"){
- fCheckOtherYn(ipt_eduwill9,"Y");
- }else{
- fCheckOtherYn(ipt_eduwill9,"N");
- }
- fColDisableChk();
- }
- function fClickDeleteBtn(){
- var cur_row = datagrid1.row; // ?? ???? ????????
-
- if (getUserId()!=model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/fstrgstrid")&&model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/fstrgstrid")!=""){
- alert("???? ?????? ?????? ???????? ??????????...!");
- return;
- }
- if (model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/linkcd")!="-"&&model.getValue("/root/main/educcntslists/educcntslist["+cur_row+"]/fstrgstrid")!=""){
- alert("???? ???????? ?????? ?????????? ???? ?????? ?????? ??????...!");
- return;
- }
- var iStatus = datagrid1.rowstatus(cur_row);
- if(cur_row <= 0 || cur_row =="undefined") {
- alert("?????? ???? ?????????? ????????...");
- return;
- }
- if (iStatus == 1 || iStatus == 3){ // ???? ?????? ??????
- datagrid1.deleteitem(cur_row);
- }else if (iStatus == 4){ // ?????? ?????? ??????
- datagrid1.removestatus(cur_row, "delete");
- }else{
- datagrid1.addStatus(cur_row, "delete");
- }
- }
- function fGetAddPopup(){
- vPid = model.getValue("/root/search/pid");
- vOrddd = model.getValue("/root/search/orddd");
- vCretno = model.getValue("/root/search/cretno");
- setParameter("SPMRJ00200_pid" ,vPid);
- setParameter("SPMRJ00200_orddd" ,vOrddd);
- setParameter("SPMRJ00200_cretno",vCretno);
- modal("SPMRJ00200");
- /*
- * ???? ???? ???? ?????? ???? ???? ?????? ????
- */
- // modal("SPMRJ00200", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; min:hidden, max:hidden;");
- fSelectOrdCntsList();
- }
- function fCheckOtherYn(ipt, param){
-
- if(param=="Y"){
- ipt.visible = true;
- }else{
- ipt.visible = false;
- ipt.value = "";
- }
-
- }
- function fColDisableChk(){
- var rowSize = datagrid1.rows
- for (i=1;i <rowSize; i++){
- if (getUserId()!=model.getValue("/root/main/educcntslists/educcntslist["+i+"]/fstrgstrid")||model.getValue("/root/main/educcntslists/educcntslist["+i+"]/linkcd")!="-"){
- datagrid1.cellAttribute("disabled", i, 1, i, 8) = "true";
- datagrid1.cellstyle("background-color", i,1,i,8) = "#E6E6E6";
- }
- }
- }
- function fClose(){
- window.close();
- }
- function fGetSearchNeed(row)
- {
- model.removeNode("root/searchneed");
- model.makeNode("root/searchneed");
- model.makeValue("root/searchneed/instcd",model.getValue("root/main/educorddaylists/educorddaylist["+row+"]/instcd"));
- model.makeValue("root/searchneed/pid",model.getValue("root/main/educorddaylists/educorddaylist["+row+"]/pid"));
- model.makeValue("root/searchneed/orddd",model.getValue("root/main/educorddaylists/educorddaylist["+row+"]/orddd"));
- model.makeValue("root/searchneed/cretno",model.getValue("root/main/educorddaylists/educorddaylist["+row+"]/cretno"));
- model.makeValue("root/searchneed/histno",model.getValue("root/main/educorddaylists/educorddaylist["+row+"]/histno"));
-
- submit("TRMRJ00203");
-
- fCheckOtherYn(ipt_eduwho9 ,chk_eduwho9.value);
- fCheckOtherYn(ipt_eduhandcap9 ,chk_eduhandcap9ck.value);
- fCheckOtherYn(ipt_eduway9 ,chk_eduway9ck.value);
- fCheckOtherYn(ipt_eduneed9 ,chk_eduneed9ck.value);
-
- if(rdo_eduwill.value== "999"){
- fCheckOtherYn(ipt_eduwill9,"Y");
- }else{
- fCheckOtherYn(ipt_eduwill9,"N");
- }
- }
|