123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[function fInitialize()
- {
- var indxflag = opener.frmf_getParameter("indxflag");
- ds_temp_condition.setColumn(0, "indxflag",indxflag);
- ds_init.setColumn(0, "today", utlf_getCurrentDate());
- var value = ds_temp_condition.getColumn(0, "indxflag");
- if(ds_temp_condition.getColumn(0, "indxflag") == "V")
- {
- fIndxListSrch();
- }
- else if(ds_temp_condition.getColumn(0, "indxflag") == "F")
- {
- fIndxListSrch();
- }
- else if(ds_temp_condition.getColumn(0, "indxflag") == "P")
- {
- fIndxListSrch();
- }
- else if(ds_temp_condition.getColumn(0, "indxflag") == "U")
- {
- fIndxListSrch();
- }
- }
- function fIndxListSrch()
- {
- dsf_makeValue(ds_send, "indxflag", "String", ds_temp_condition.getColumn(0, "indxflag"));
-
- var oParam = {};
- oParam.id = "TRMRF01901";
- oParam.service = "formmngtapp.IndxMngt";
- oParam.method = "reqGetIndxList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_indxlist_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF01901";
- tranf_submit(oParam);
- }
- function fIndxSelect()
- {
- if(ds_temp_condition.getColumn(0, "indxflag") == "V")
- {
- //model.toggle("case1");
- fIndxListSrch();
- }
- else if(ds_temp_condition.getColumn(0, "indxflag") == "F")
- {
- //model.toggle("case2");
- fIndxListSrch();
- }
- else if(ds_temp_condition.getColumn(0, "indxflag") == "P")
- {
- //model.toggle("case4");
- fIndxListSrch();
- }
- else if(ds_temp_condition.getColumn(0, "indxflag") == "U")
- {
- //model.toggle("case3");
- fIndxListSrch();
- }
- else if(utlf_isNull(ds_temp_condition.getColumn(0, "indxflag")))
- {
- //model.toggle("case1");
- ds_temp_condition.setColumn(0, "indxflag",'V');
- fIndxListSrch();
- }
- }
- function fDeptcdSplit()
- {
- fTreeSelect();
- var deptcd = ds_main_indxlist_item.getColumn(ds_main_indxlist_item.rowposition, "pathcd");
- var depth;
-
- depth = String(deptcd).split('.');
- var a1 = new Array(depth.length);
- var b1 = new Array(depth.length);
- var cc = deptcd.size;
- var count =0;
- for(var i=0; i < depth.length; i++)
- {
- b1[i]= depth[i];
- count++;
- }
- for(var i = 0; i < count; i++)
- {
- dsf_makeValue(ds_temp_condition, "depthcd"+(i+1), "Stirng", b1[i]);
- dsf_makeValue(ds_temp_condition, "depthcd"+(i+1), "String", b1[i]);
- dsf_makeValue(ds_main_indxinfo_imgindx, "depthcd"+(i+1) ,"String", ds_temp_condition.getColumn(0, "depthcd"+(i+1)));
- }
- ds_temp_condition.setColumn(0, "count",count);
- }
-
- function fTreeSelect()
- {
- fIndxInfoListSrch();
-
- var pathcd = ds_main_indxlist_item.getColumn(ds_main_indxlist_item.rowposition, "pathcd");
- var depth = pathcd.split('.');
-
- var a1 = new Array(depth.length);
- var b1 = new Array(depth.length);
- var cc = pathcd.size;
- var count =0;
-
- for(var i = 0; i < depth.length; i++)
- {
- b1[i]= ds_main_indxlist_item.lookup("itemindxseq", depth[i], "indxnm");
- count++;
- }
- var indx = ds_temp_condition.getColumn(0, "indxflag");
- var indxpath = null;
- if(indx=="V")
- {
- indxpath = "ds_main_indxinfo_valindx";
- }
- else if(indx=="F")
- {
- indxpath = "ds_main_indxinfo_formindx";
- }
- else if(indx=="P")
- {
- indxpath = "ds_main_indxinfo_imgindx";
- }
- else if(indx=="U")
- {
- indxpath = "ds_main_indxinfo_unitindx";
- }
- var ref = eval(indxpath)
- for(var i = 0; i < count; i++)
- {
- dsf_makeValue(ds_temp_condition, "depthnm"+(i+1), "string", b1[i]);
- dsf_makeValue(ref, "depthnm"+(i+1), "string" , ds_temp_condition.getColumn(0, "depthnm"+(i+1)));
- }
- }
-
- function fIndxInfoListSrch()
- {
- var iIndx = ds_main_indxlist_item.rowposition;
- var selIndxCd = ds_main_indxlist_item.getColumn(iIndx, "itemindxseq");
- ds_temp_condition.setColumn(0, "rowcnt", iIndx);
- ds_temp_condition.setColumn(0, "selectedindx", selIndxCd);
- ds_temp_condition.setColumn(0, "focusindx", iIndx);
-
- dsf_makeValue(ds_send, "itemindxseq", "string", selIndxCd );
- dsf_makeValue(ds_send, "indxflag", "string", ds_temp_condition.getColumn(0, "indxflag") );
- var oParam = {};
- oParam.id = "TRMRF01902";
- oParam.service = "formmngtapp.IndxMngt";
- oParam.method = "reqGetIndxInfo";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_indxinfo_valindx=valindx ds_main_indxinfo_formindx=formindx ds_main_indxinfo_imgindx=imgindx ds_main_indxinfo_unitindx=unitindx";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF01902";
- tranf_submit(oParam);
- }
- function findxConfirm()
- {
- iRow = ds_main_indxlist_item.rowposition;
-
- var indx = ds_temp_condition.getColumn(0, "indxflag");
- var indxnm;
- var indxpath;
-
- if(indx=="V")
- {
- indxnm = "valindxnm";
- indxpath = "ds_main_indxinfo_valindx";
- }
- else if(indx=="F")
- {
- indxnm = "formindxnm";
- indxpath = "ds_main_indxinfo_formindx";
- }
- else if(indx=="P")
- {
- indxnm = "imgindxnm";
- indxpath = "ds_main_indxinfo_imgindx";
- }
- for(var i=0; i < 5; i++ )
- {
- opener.frmf_setParameter("depthcd"+(i+1),"");
- opener.frmf_setParameter("depthnm"+(i+1),"");
- }
- var count = ds_temp_condition.getColumn(0, "count");
- var indxnm = eval(indxpath).getColumn(0, "indxnm");
-
- for(var i = 0; i < count; i++ )
- {
- opener.frmf_setParameter("depthnm"+(i+1), eval(indxpath).getColumn(0, "depthnm"+(i+1)));
- opener.frmf_setParameter("depthcd"+(i+1), eval(indxpath).getColumn(0, "depthcd"+(i+1)));
- }
- opener.frmf_setParameter("count",count);
- opener.frmf_setParameter("indexcode", ds_main_indxlist_item.getColumn(ds_main_indxlist_item.rowposition, "itemindxseq"));
- opener.frmf_setParameter("pathcd", ds_main_indxlist_item.getColumn(ds_main_indxlist_item.rowposition, "pathcd"));
- this.close();
- }
- function fClose()
- {
- opener.frmf_setParameter("unitnm", "");
- this.close();
- }
- ]]></Script>
|