123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- /**
- * @desc : KNUH
- * @authur : 이윤주
- */
-
-
- function fInit()
- {
-
- var MENUPARAM = getScreenMenuParameter();
-
- mmbfGetHardCodeInfo("/root/send/reqdata", "/root/ini/mibiuser", 5801);
-
- var userid = getUserInfo("userid");
- var mibiuserCnt = getNodesetCnt(model, "/root/ini/mibiuser/hardcd[hardcd = '" + userid + "']"); //미비 관리용 통계 대상자
-
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "A");
- addComboItem("cmb_orddeptcd", "전체", "-", "above");
- addComboItem("cmb_medispclid", "전체", "-", "above");
-
- cmb_orddeptcd.disabled = true;
-
- model.toggle("case1");
-
- if (MENUPARAM == "A" || mibiuserCnt > 0) {
- btn_sw2.attribute("visibility") = "visible";
- cmb_orddeptcd.disabled = false;
- }
-
- if (MENUPARAM == "A" ) {
- model.setValue("/root/main/cond/orddeptcd", "-");
- model.setValue("/root/main/cond/medispclid", "-");
- }
- else {
- model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd"));
- model.setValue("/root/main/cond/medispclid", getUserInfo("userid"));
- cmb_orddeptcd.dispatch("xforms-value-changed");
- }
-
- model.setValue("/root/main/cond/datediff", 1);
- fAddDateReq("1");
-
- if (MENUPARAM == "A"){
- return;
- }
- else {
- fSearch();
- }
-
- }
- function fAddDateReq(termflag)
- {
- var todd = getCurrentDate();
- var today = todd.toDate();
- var fromday = new Date();
-
-
- var todd = getCurrentDate();
- var today = todd.toDate();
-
- if ( termflag == "1") {
- fromday = today.getAddDate(-30);
- fromdd = fromday.getDateFormat();
- }
- else if (termflag == "2") {
- todd = getCurrentDate();
- fromdd = todd.substr(0,4)+"0101" ;
- }
- else if (termflag == "3") {
- fromday = today.getAddDate(-1,"Y");
- fromdd = fromday.getDateFormat();
- todd = fromdd.substr(0,4)+"1231";
- fromdd = todd.substr(0,4)+"0101";
- }
- else if (termflag == "4") {
- fromday = today.getAddDate(-2,"Y");
- fromdd = fromday.getDateFormat();
- todd = fromdd.substr(0,4)+"1231";
- fromdd = todd.substr(0,4)+"0101";
- }
-
- model.setValue("/root/main/cond/fromdd", fromdd);
- model.setValue("/root/main/cond/todd", todd);
-
- model.refresh();
- }
- function fSearch() {
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
-
- if (switch1.selectedIndex == 0) {
- submit("TRMRI01303");
- }
- else{
- submit("TRMRI01304");
- }
- }
- function fExcel() {
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
-
- if (switch1.selectedIndex == 0) {
- //datagrid1.saveExcel(fileName, "colhiddenextend:false;col_0:label;col_1:label;col_2:label;col_3:label;col_4:label;col_5:label;col_6:label;col_7:label;col_8:label;col_9:label;col_10:label;col_11:label;col_12:label;col_13:label;col_14:label;col_15:label;col_16:label;col_17:label;col_18:label;col_19:label;col_20:label;col_21:label;col_22:label;col_23:label;col_24:label;col_25:label;col_26:label;col_27:label;col_28:label;col_29:label;col_30:label;col_31:label;col_32:label;col_33:label;col_34:label;");
- datagrid1.saveExcel(fileName);
- }
- else{
- datagrid2.saveExcel(fileName);
- }
-
- }
|