1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[// header파일 중 SMRSC05303.js 파일 시작
- /* ---------------------------------------------------------------------
- SMRSC05303_기관물품코드등록.xrw (SMRSC05303.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By HR Choi
- : 2015.05.02
- ---------------------------------------------------------------------- */
- var vGoodNew = "U"; //U:UPDATE, N:NEW
- // --------------------------------------------------
- //화면 Control을 초기화한다
- // --------------------------------------------------
- function fInitForm() {
- fCheckAuth();
- fInitialize();
- fOpenForm();
- }
- // --------------------------------------------------
- // 사용자권한 Check
- // --------------------------------------------------
- function fCheckAuth() {
- group3.grp_title.btn_search.enable = frmf_checkAuth("R") ; // disabled --> enable
- group3.btn_save.enable = frmf_checkAuth("X") ; // disabled --> enable
- }
- // --------------------------------------------------
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- // --------------------------------------------------
- function fInitialize(pFlag) {
- //이창록 추가 2009-08-25( group3.btn_instgood.selected ="true"설정)
- group3.btn_instgood.selected ="true";
- group3.btn_instgood.click(); //.dispatch("DOMActivate");
- ds_send.clearData(); ds_send.addRow();
- ds_send_save_setautoins.setColumn( 0, "setyn","N");
- ds_send_goodlist.setColumn( 0, "instcd", sysf_getUserInfo("dutplceinstcd")); // Login 사용자 기관코드 //ds_send_goodlist
- ds_send_goodlist.setColumn( 0, "userinstcd", sysf_getUserInfo("dutplceinstcd")); // Login 사용자 기관코드 //model.setValue(group3.grp_title.ipt_userinstcd.attribute("ref"),
- rszfGoodFlagListByPgmGubn("grp_detail.cmb_goodflag","1","N");
-
- misfComboCopyItemSet("grp_detail.cmb_goodflag", "" , "group3.grp_title.cmb_goodflag_search", ""); //물품구분
-
- rszfUserReqFlagList("grp_detail.cmb_reqflag",sysf_getUserInfo("dutplceinstcd"),sysf_getUserInfo("userid"),"1","P" );
- // 2010.06.09 CHR GROUP 구분 이용희선생님요구
- misfComboComCdList("R0068",grp_detail.cmb_proddrugsetflag, "Y");
- misfComboComCdListMulti("R0092,R0069,R0047,R0035,R0106,R0093,R0095,R0110,R0111,R0107,C0048,C0048,030M0001,R0450"
- ,"grp_detail.cmb_reqmthd,grp_detail.cmb_stocmngtflag,grp_detail.cmb_curncyunit,grp_detail.cmb_prodplce,group3.switch2.case2.grp_etcgood.cmb_plceordqtycretflag,grp_detail.cmb_reqprid,grp_detail.cmb_conflag,grp_detail.cmb_setplceordflag,grp_detail.cmb_purcflag,group3.switch2.case2.grp_etcgood.cmb_plceordbase,group3.grp_title.cmb_instcd,group3.switch2.case4.grp_instcopy.cmb_instcopy,grp_detail.cmb_wareflag,grp_detail.cmb_mainusedeptcd");
-
- //기관코드 읽어오는 부분 넣기
- var instcd = sysf_getUserInfo("dutplceinstcd");
- var instnm = sysf_getUserInfo("dutplceinstnm");
- if(instcd.length > 0) ds_init.setColumn( 0, "instcd", instcd); //.setValue(group3.opt_instcd.attribute("ref"),
- if(instnm.length > 0) ds_init.setColumn( 0, "instnm", instnm); //model.setValue(group3.opt_instnm.attribute("ref"),
- ds_main_list_goodlists_goodlist.clearData(); //model.removeNodeset(switch1.case6.grd_goodlist.nodeset );
- ds_main_list_gooddet_gooddetlist.clearData(); //model.removeNodeset(grd_gooddetlist.nodeset );
- ds_main_list_gooddet_goodconstlist.clearData(); //model.removeNodeset(group3.switch2.case1.grd_costhistinfo.nodeset);
- ds_main_list_gooddet_goodinstlist.clearData(); //model.removeNodeset(group3.switch2.case4.grd_instinfo.nodeset );
- ds_main_list_gooddet_oldcdinfo.clearData(); //model.removeNodeset(group3.switch2.case3.grd_oldcdinfo.nodeset );
- ds_main_list_gooddet_rscdgchglist.clearData(); //model.removeNodeset(group3.switch2.case5.grd_rscdgchglist.nodeset);
- var Node = ds_main_list_gooddet_gooddetlist; //instance1.selectNodes("ds_main_list_gooddet_gooddetlist");
- if(pFlag =="init") {
- if(Node.rowcount > 0) {
- misfGridIUD(grd_gooddetlist, "A");
- }
- } else {
- misfGridIUD(grd_gooddetlist, "A");
- }
- // 단위셋팅 초기화
- ds_temp_currentunit.clearData();
- dsf_makeValue( ds_temp_currentunit, "instcd", "string", "");
- dsf_makeValue( ds_temp_currentunit, "goodflag", "string", "");
- // 대분류 코드 콤보 설정.
- frmf_addComboItem( "group3.grp_title.cmb_goodflag_search", "- 전 체 -", "", "above");
- //물품구분일 경우 첫번째 index 자동 설정
- if(ds_init_goodflag.rowcount > 0) group3.grp_title.cmb_goodflag_search.index = 0; //group3.grp_title.cmb_goodflag_search.length>
- //rszfLMSComboList(model.getValue(group3.grp_title.cmb_goodflag_search.attribute("ref")), "", "", "group3.grp_title.cmb_lrgcd_search", "", "L", "Y", "Y");
- if(pFlag =="init"){
- if(Node.length > 0){
- ds_main_list_gooddet_gooddetlist.setColumn( 0, "goodflag", ds_send_goodlist.getColumn(0, "goodflag"));
- ds_main_gooddet_gooddetlist.copyData(ds_main_list_gooddet_gooddetlist);
- dsf_setDefaultVal(ds_main_gooddet_gooddetlist, "all");
- }
- }else{
- ds_main_list_gooddet_gooddetlist.setColumn(0, "goodflag", ds_send_goodlist.getColumn(0, "goodflag"));
- ds_main_gooddet_gooddetlist.copyData(ds_main_list_gooddet_gooddetlist);
- dsf_setDefaultVal(ds_main_gooddet_gooddetlist, "all");
- }
- misfMsterDetailSet("switch1.case6.grd_goodlist" ,null , "TRRSC05309" ,"Y", "byrow");
- misfMsterDetailSet("grd_gooddetlist" ,"switch1.case6.grd_goodlist", "TRRSC05302" ,"Y", "byrow");
- misfMsterDetailSet("group3.switch2.case1.grd_costhistinfo", "switch1.case6.grd_goodlist", "TRRSC05302" ,"N", "byrow");
- misfMsterDetailSet("group3.switch2.case4.grd_instinfo" ,"switch1.case6.grd_goodlist", "TRRSC05302" ,"N", "byrow");
- misfMsterDetailSet("group3.switch2.case3.grd_oldcdinfo", "switch1.case6.grd_goodlist", "TRRSC05302" ,"N", "byrow");
- misfMsterDetailSet("group3.switch2.case5.grd_rscdgchglist", "switch1.case6.grd_goodlist", "TRRSC03702" ,"N");
- // 물품구분별 권한
- fSetGoodFlagAuth();
- //group3.grp_title.rbo_instflag.select(1);
- ds_send_goodlist.setColumn(0, "instcdcopy", instcd); // Login 사용자 기관코드 //model.setValue(group3.switch2.case4.grp_instcopy.cmb_instcopy.attribute("ref"),
- ds_send_goodlist.setColumn( 0, "instflag", "Y");
- //switch1.case6.grd_goodlist.explorerbar = "sortshow";
- group3.grp_title.ipt_goodcd_search.setFocus();
- //model.refresh();
- }
- // --------------------------------------------------
- // 화면이 다른 폼에 의해 불려졌을때 실행!!
- // --------------------------------------------------
- // function fOpenForm()
- // {
- // if (frmf_checkOpener()) {
- // if (opener.frmf_getScreenID() == "SMPIC00100") {
- // //입력및 저장관련 컨트롤 설정.
- // fOpenFormControlSetting(true);
- //
- // //dsf_makeValue( ds_temp, "good", "string", "" );
- // //model.copyNode("ds_temp_good", opener.root.main.item1.mchrginfo);
- // ds_temp_good.copyData(opener.ds_main_item1_mchrginfo);
- //
- // ds_send_goodlist.setColumn( 0, "goodcd", ds_temp_good.getColumn(0, "calcscorcd"));
- //
- // //팝업으로 띄워졌을경우 물품구분 콤보에 "전체" Item을 추가
- // //품목세부사항의 단위 콤보를 설정하기 위해 넘어온 goodcd의 물품구분을 가져와서 설정함.
- // if (ds_send_goodlist.getColumn(0, "goodcd") != "")
- // {
- // frmf_addComboItem("group3.grp_title.cmb_goodflag_search", "", "", "above");
- // var goodcdflag = ds_send_goodlist.getColumn(0, "goodcd");
- //
- // var flag = goodcdflag.substring(0,1);
- //
- // group3.grp_title.cmb_goodflag_search.value = flag;
- //
- // //group3.grp_title.cmb_goodflag_search.refresh();
- // //group3.grp_title.cmb_goodflag_search.select(0);
- //
- // fRetrGoodList(false);
- // }
- // }else if (opener.frmf_getScreenID() == "SMRSI02600"){ // 평화드림 월정산에서 로드했을시....
- // if (ds_temp.getColumn(0, "goodcd") != "")
- // {
- // group3.grp_title.cmb_goodflag_search.value = ds_temp.getColumn(0, "goodflag");
- // group3.grp_title.ipt_goodcd_search.value = ds_temp.getColumn(0, "goodcd");
- //
- // group3.grp_title.btn_search.click(); //.dispatch("DOMActivate");
- // }
- // }
- // }
- // }
- // --------------------------------------------------
- // 화면이 Button Control
- // --------------------------------------------------
- // function fOpenFormControlSetting(fBool) {
- //
- // fBool = !fBool; // 기본값을 변경하여 처리 //2017.01.31 kimdo3
- // group3.btn_save.enable = fBool;
- // group3.btn_sgsave.enable = fBool;
- // group3.button2.enable = fBool;
- // group3.btn_choidel.enable = fBool;
- // group3.btn_insert.enable = fBool;
- // grp_detail.btn_photinfo.enable = fBool;
- // //btn_goodcdcopy.enable = fBool;
- // grp_detail.btn_useinstinfo.enable = fBool;
- // grp_detail.btn_allsizergst.enable = fBool;
- // grp_detail.btn_goodsetrgst.enable = fBool;
- // }
- // --------------------------------------------------
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- // 화면 전체 조회
- // --------------------------------------------------
- function fRetrGoodList(nodecopy) {
- ds_main_gooddet_gooddetlist.clearData(); ds_main_gooddet_gooddetlist.addRow();
- misfMsterDetailRetrieve("grd_gooddetlist", group3.btn_save);
- if (nodecopy == true) fAfterRetrGoodList();
- else if(nodecopy == false && grd_gooddetlist.rowcount == 0) group3.btn_insert.click(); //.dispatch("DOMActivate"); //.rows - grd_gooddetlist.fixedRows== 0
- }
- // --------------------------------------------------
- // 물품구분별 권한체크.
- // --------------------------------------------------
- function fSetGoodFlagAuth() {
- // group3.btn_save.enable = false;
- // group3.btn_sgsave.enable = false;
- // rszfGetPurcGoodFlagAuthInfo(group3.opt_instcd.value , group3.grp_title.cmb_goodflag_search.value, sysf_getUserInfo("userid"), "%");
- //
- // if (rszfGetGoodFlagAuthInfoByCond("goodflagauth") =="Y")
- // {
- // group3.btn_save.enable = true;
- // //group3.btn_sgsave.enable = true;
- // }
- }
- // --------------------------------------------------
- // Save Data Check
- // --------------------------------------------------
- // function fCheckSaveData()
- // {
- // if ((vGoodNew == "U") &&
- // (ds_send_goodlist.getColumn( 0, "userinstcd") != ds_main_gooddet_gooddetlist.getColumn(0, "instcd")) { // model.getValue(group3.grp_title.ipt_userinstcd.attribute("ref"))
- // sysf_messageBox("선생님 기관물품이 아닌 물품을 저장","E001");
- // grp_detail.ipt_fromconterm.setFocus();
- // return false;
- // }
- // if ((vGoodNew == "N") && //U:UPDATE, N:NEW
- // ((ds_send_goodlist.getColumn( 0, "userinstcd") != ds_send_goodlist.getColumn(0, "instcd")) { //model.getValue(group3.grp_title.cmb_instcd.attribute("ref"))))
- // sysf_messageBox("선생님 기관물품이 아닌 물품을 저장","E001");
- // grp_detail.ipt_fromconterm.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "goodcd") == "" ) { //model.getValue(grp_detail.ipt_goodcd.attribute("ref")).length == 0
- // sysf_messageBox("물품코드는" ,"I003");
- // grp_detail.ipt_goodcd.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "goodnm") == "" ) { //model.getValue(grp_detail.ipt_goodnm.attribute("ref")).length== 0
- // sysf_messageBox("물품코드명은" ,"I003");
- // grp_detail.ipt_goodnm.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "lrgcd") == "" ) { //model.getValue(grp_detail.cmb_lrgcd.attribute("ref")).length== 0
- // sysf_messageBox("대분류코드는" ,"I003");
- // grp_detail.cmb_lrgcd.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "winacnt") == "" ) {
- // sysf_messageBox("비용계정은" ,"I003");
- // grp_detail.ipt_winacnt.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "mngtdeptcd") == "" ) { // model.getValue(grp_detail.ipt_mngtdeptcd.attribute("ref")).length== 0
- // sysf_messageBox("주관리부서는" ,"I003");
- // grp_detail.ipt_mngtdeptcd.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqmthd") == "" ) { //model.getValue(grp_detail.cmb_reqmthd.attribute("ref")).length== 0
- // sysf_messageBox("청구방법은" ,"I003");
- // grp_detail.cmb_reqmthd.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_purcunit.getColumn(0, "reqmthd") == "" ) { //model.getValue(grp_detail.cmb_purcunit.attribute("ref")).length== 0
- // sysf_messageBox("구매단위은" ,"I003");
- // grp_detail.cmb_purcunit.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "exchqty") == "") { // model.getValue(grp_detail.ipt_exchqty.attribute("ref")).length== 0
- // sysf_messageBox("환산수량은" ,"I003");
- // grp_detail.ipt_exchqty.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "deliveunit") == "") { // model.getValue(grp_detail.cmb_deliveunit.attribute("ref")).length== 0
- // sysf_messageBox("불출단위는" ,"I003");
- // grp_detail.cmb_deliveunit.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "stocmngtflag") == "") { // model.getValue(grp_detail.cmb_stocmngtflag.attribute("ref")).length== 0 )
- // sysf_messageBox("재고관리기준은" ,"I003");
- // grp_detail.cmb_stocmngtflag.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqmthd") == "") { // model.getValue(grp_detail.cmb_reqmthd.attribute("ref")).length== 0 ) {
- // sysf_messageBox("청구방법은" ,"I003");
- // grp_detail.cmb_reqmthd.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "purcflag") == "" ) {
- // sysf_messageBox("구매구분은" ,"I003");
- // grp_detail.cmb_purcflag.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "insuyn") == "" || ds_main_gooddet_gooddetlist.getColumn(0, "insuyn") == "N" ) { //
- // sysf_messageBox("수가여부는" ,"I003");
- // grp_detail.rdo_insuyn.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "maincustlastsuplplce") == "" ) { //model.getValue(grp_detail.ipt_maincustlastsuplplce.attribute("ref")).length== 0
- // sysf_messageBox("주거래처는" ,"I003");
- // grp_detail.ipt_maincustlastsuplplce.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "suppcustcd") == "" ) { //model.getValue(grp_detail.ipt_suppcustcd.attribute("ref")).length== 0
- // sysf_messageBox("보조거래처는" ,"I003");
- // grp_detail.ipt_suppcustcd.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "minexch") == "" ) { //model.getValue(grp_detail.ipt_minexch.attribute("ref")).length== 0
- // sysf_messageBox("최소청구량은" ,"I003");
- // grp_detail.ipt_minexch.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqprid") == "" ) { //model.getValue(grp_detail.cmb_reqprid.attribute("ref")).length== 0 ) {
- // sysf_messageBox("청구주기는" ,"I003");
- // grp_detail.cmb_reqprid.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "tmpreqflag") == "" ) { //model.getValue(grp_detail.rdo_reqflag.attribute("ref")).length== 0 ) {
- // sysf_messageBox("임의청구구분은" ,"I003");
- // grp_detail.rdo_reqflag.setFocus();
- // return false;
- // }
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "allsizeyny") == "" || ds_main_gooddet_gooddetlist.getColumn(0, "allsizeyny") == "N" ) { // model.getValue(grp_detail.rdo_allsizeyny.attribute("ref")).length== 0 ) {
- // sysf_messageBox("ALLSIZE 유무는" ,"I003");
- // grp_detail.rdo_allsizeyny.setFocus();
- // return false;
- // }
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "reqflag") == "" ) { //model.getValue(grp_detail.cmb_reqflag.attribute("ref")).length== 0 ) {
- // sysf_messageBox("청구구분은" ,"I003");
- // grp_detail.cmb_reqflag.setFocus();
- // return false;
- // }
- // //김병국 추가 2009-08-26
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "goodunitcost") == "" ) { //model.getValue(grp_detail.ipt_goodunitcost.attribute("ref")).length== 0 ) {
- // sysf_messageBox("제품단가는" ,"I003");
- // grp_detail.ipt_goodunitcost.setFocus();
- // return false;
- // }
- // //박진억 추가 2012-11-28
- // if((ds_main_gooddet_gooddetlist.getColumn(0, "mainusedeptcd") == "" || String(ds_main_gooddet_gooddetlist.getColumn(0, "mainusedeptcd")).length > 2)
- // && ( ds_main_gooddet_gooddetlist.getColumn(0, "wareflag") == "1" || ds_main_gooddet_gooddetlist.getColumn(0, "wareflag") == "2"))
- // {
- // sysf_messageBox("물류관리창고, 진료재료창고 물품은 사용부서가" ,"I003");
- // grp_detail.cmb_mainusedeptcd.setFocus();
- // return false;
- // }
- //
- // /* if(model.getValue(cmb_asetflag.attribute("ref")).length== 0 ) {
- // sysf_messageBox("자산구분은" ,"I003");
- // cmb_asetflag.setFocus();
- // return false;
- // } */
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "reuseyn") == "Y" && ds_main_gooddet_gooddetlist.getColumn(0, " divusenvalqty") == 0)
- // {
- // sysf_messageBox("분할사용여부를 선택하신 경우에는 분할사용수치가 " ,"I003");
- // grp_detail.ipt_divusenvalqty.setFocus();
- // return false;
- // }
- //
- // if((ds_main_gooddet_gooddetlist.getColumn(0, "todd") != "" && ds_main_gooddet_gooddetlist.getColumn(0, "todd") <= utlf_getCurrentDate()) || ds_main_gooddet_gooddetlist.getColumn(0, "todd") == "")
- // {
- // // model.getValue(grp_detail.ipt_nonusetretdd.attribute("ref")).length > 0 &&
- // // model.getValue(ipt_nonusetretdd.attribute("ref")) <= getCurrentDate() &&
- //
- // sysf_messageBox("코드 불용일자를 선택하신 경우에는 불용사유가 " ,"I003");
- // grp_detail.ipt_nonusetretresn.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "conflag") != "")
- // {
- // //model.getValue(grp_detail.cmb_conflag.attribute("ref")).length > 0
- // /*
- // if(model.getValue(grp_detail.ipt_fromconterm.attribute("ref")).length == 0 )
- // {
- // sysf_messageBox("계약구분을 선택하신 경우에는 계약시작일자가 " ,"I003");
- // grp_detail.ipt_fromconterm.setFocus();
- // return false;
- // }
- // if(model.getValue(grp_detail.ipt_toconterm.attribute("ref")).length == 0 )
- // {
- // sysf_messageBox("계약구분을 선택하신 경우에는 계약종료일자가 " ,"I003");
- // grp_detail.ipt_toconterm.setFocus();
- // return false;
- // }
- // grp_detail.ipt_nonusetretresn.setFocus();
- // */
- // }
- // else
- // {
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") != "" || ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") != "" )
- // {
- // // model.getValue(grp_detail.ipt_fromconterm.attribute("ref")).length > 0 ||
- // // model.getValue(grp_detail.ipt_toconterm.attribute("ref")).length > 0
- // sysf_messageBox("계약기간을 입력하신 경우에는 계약구분이 " ,"I003");
- // grp_detail.cmb_conflag.setFocus();
- // return false;
- // }
- // }
- //
- // if( ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") != "" && ( ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") < ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") ) )
- // {
- // //model.getValue(grp_detail.ipt_toconterm.attribute("ref")).length > 0 &&
- // // model.getValue(grp_detail.ipt_toconterm.attribute("ref")) < model.getValue(grp_detail.ipt_fromconterm.attribute("ref"))
- // sysf_messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
- // grp_detail.ipt_fromconterm.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") != "" && ( ds_main_gooddet_gooddetlist.getColumn(0, "toconterm") < ds_main_gooddet_gooddetlist.getColumn(0, "fromconterm") ) )
- // {
- // //model.getValue(grp_detail.ipt_fromconterm.attribute("ref")).length > 0 &&
- // //(model.getValue(grp_detail.ipt_toconterm.attribute("ref")) < model.getValue(grp_detail.ipt_fromconterm.attribute("ref")))
- // sysf_messageBox("계약시작일자는 계약 종료일자보다 크게 설정","E001");
- // grp_detail.ipt_toconterm.setFocus();
- // return false;
- // }
- //
- // if(ds_main_gooddet_gooddetlist.getColumn(0, "purcflag") != "" && ds_main_gooddet_gooddetlist.getColumn(0, "lastpurcdd") == "" )
- // {
- // /*
- // sysf_messageBox("구매구분이 설정되었을 경우에는 최종 구매일자가 " ,"I003");
- // grp_detail.cmb_purcflag.setFocus();
- // return false;
- // */
- // }
- //
- // return true;
- //}
- //
- function fAfterRetrGoodList() {
- // if (grd_gooddetlist.rows == 0 )group3.btn_insert.dispatch("DOMActivate");
-
- var iRow = ds_main_list_gooddet_gooddetlist.rowposition;
- ds_main_gooddet_gooddetlist.copyRow( 0, ds_main_list_gooddet_gooddetlist, iRow);
- if (ds_main_gooddet_gooddetlist.getColumn( 0, "todd") != "" &&
- ds_main_gooddet_gooddetlist.getColumn( 0, "todd") < utlf_getCurrentDate())
- grp_detail.ipt_nonusetretdd.style.backgroundColor = "#c0c0c0ff";
- else
- grp_detail.ipt_nonusetretdd.style.backgroundColor = "#ffffffff";
- //grp_detail.refresh();
- //group3.switch2.case2.grp_etcgood.refresh();
- ds_main_list_gooddet_gooddetlist.rowposition = 0; //grd_gooddetlist.row = 1;
- grp_detail.ipt_goodcd.setFocus();
- fSetOldGoodList();
- }
- //
- function fSetOldGoodList() {
- var sPath = ds_main_gooddet_gooddetlist;
- var tPath = ds_init_oldgoodlist;
- tPath.copyData(sPath);
- // eval(tPath).clearData();
- // eval(tPath).addRow();
- // model.setValue(tPath, vData);
- }
- //
- function fSetDataCopy(){
- if(ds_main_list_gooddet_gooddetlist.rowcount > 0)
- ds_main_list_gooddet_gooddetlist.rowposition = 0; //.row = 1;
- fGoodOldNewCompare(); // 변경Column Check
- misfGridRowStatusChange(grd_gooddetlist, ds_main_list_gooddet_gooddetlist, ds_main_gooddet_gooddetlist);
- var iRow = ds_main_list_gooddet_gooddetlist.rowposition ;
- if (ds_main_list_gooddet_gooddetlist.getRowType(iRow) != Dataset.ROWTYPE_INSERT){
- // 수가전송 리스트에 올리기 위한 flag
- // 기관에서 수가여부,allsize여부,단가,최소처방수량,코드불용일_사유를 수정했을시에는 수가전송 필요
- var TranFlag = ds_tmp_calcscorinfo.getColumn(0, "calcscorinfotranyn");
- if(TranFlag =="N"){
- ds_main_list_gooddet_gooddetlist.setColumn(iRow, "calcscorinfotranyn","N");
- }else{
- ds_main_list_gooddet_gooddetlist.setColumn(iRow, "calcscorinfotranyn","-");
- }
- }
- //grp_detail.refresh();
- }
- function fDefaultSetting()
- {
- var iRow = ds_main_list_gooddet_gooddetlist.rowposition;
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "goodflag" , ds_send_goodlist.getColumn( 0, "goodflag"));
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "goodcd" , "");
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "fromdd" , utlf_getCurrentDate());
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "lrgcd" , ds_send_goodlist.getColumn( 0, "lrgcd"));
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "mdlcd" , ds_send_goodlist.getColumn( 0, "mdlcd"));
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "smlcd" , ds_send_goodlist.getColumn( 0, "smlcd"));
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "prodcmpycd" , ds_send_goodlist.getColumn( 0, "prodcmpy"));
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "prodcmpynm" ,ds_send_goodlist.getColumn( 0, "prodcmpynm"));
- ds_main_list_gooddet_gooddetlist.setColumn( iRow, "asetflag", "1");
- // ds_main_gooddet_gooddetlist.setColumn( 0, "asetflag" , '1'); // 자산구부 : '1' 재고자산
- }
- function fChkSaveData(pgrid_name, ptarget_node, psource_node) {
- var node1 = ptarget_node;
- var node2 = psource_node;
- for (var i = 0; i < node1.rowcount; i++) {
- for (var j = 0; j < node2.rowcount; j++) {
- for(var k = 0; k < node1.colcount; k++) {
- for(var m = 0; m < node2.colcount; m++) {
-
- if (node1.getColumnInfo(k).name == node2.getColumnInfo(m).name) {
- if( node1.getColumn( i, k) == node2.getColumn( j, m)) {
- return true;
- }
- }
- }
- }
- }
- }
- // var nextnode1 = instance1.selectNodes(ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]" + "/*");
- // var nextnode2 = instance1.selectNodes(psource_node + "/" + node2.item(j).nodeName + "/*");
- //
- // var copytarget = ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]";
- // var copysource = psource_node + "/" + node2.item(j).nodeName;
- //
- // for (var k = 0; k < nextnode1.length; k++) {
- // for (var p = 0; p < nextnode2.length; p++) {
- // if (nextnode1.item(k).nodeName == nextnode2.item(p).nodeName) {
- // if (model.getValue(ptarget_node + "/" + node1.item(i).nodeName + "[" + (pgrid_name.row - pgrid_name.fixedRows + 1) + "]" + "/" + nextnode1.item(k).nodeName) !=
- // model.getValue(psource_node + "/" + node2.item(j).nodeName + "/" + nextnode2.item(p).nodeName))return true;
- // }
- // }
- // }
- // }
- // }
- // }
- return false;
- }
- function fCheckRetrieveData()
- {
- if(ds_send_goodlist.getColumn(0, "goodflag")=="") {
- if (group3.grp_title.cmb_goodflag_search.text != "- 전 체 -") {
- sysf_messageBox("물품구분을 " ,"C002");
- group3.grp_title.cmb_goodflag_search.setFocus();
- return false;
- }
- }
- return true;
- }
- function fInstGoodCdCopy()
- {
- if(ds_main_list_goodlists_goodlist.rowcount <= 0)return;
- group3.btn_insert.click();
-
- var row = ds_main_list_goodlists_goodlist.rowposition;
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodcd", ds_main_list_goodlists_goodlist.getColumn( row, "goodcd"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodnm", ds_main_list_goodlists_goodlist.getColumn( row, "goodnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodhngnm", ds_main_list_goodlists_goodlist.getColumn( row, "goodhngnm"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodengnm", ds_main_list_goodlists_goodlist.getColumn( row, "goodengnm"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodspec", ds_main_list_goodlists_goodlist.getColumn( row, "goodspec" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodmodel", ds_main_list_goodlists_goodlist.getColumn( row, "goodmodel"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "lrgcd", ds_main_list_goodlists_goodlist.getColumn( row, "lrgcd" ));
- //frmf_inputEnterKey("grp_detail.cmb_lrgcd", "ontextchanged", new TextChangedEventInfo); // 선택한 대분류에 대한 중분류 값을 얻기 위한 action
- ds_main_gooddet_gooddetlist.setColumn( 0, "mdlcd", ds_main_list_goodlists_goodlist.getColumn( row, "mdlcd"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "smlcd",ds_main_list_goodlists_goodlist.getColumn( row, "smlcd"));
- //model.refresh();
- grp_detail.ipt_winacnt.setFocus();
- }
- function fGoodCdCopy()
- {
- if(utlf_isNull(ds_send_goodlist.getColumn( 0, "goodflag")))
- {
- sysf_messageBox("물품구분을 " ,"C002");
- grp_detail.cmb_goodflag.setFocus();
- return false;
- }
- if(utlf_isNull(ds_main_gooddet_gooddetlist.getColumn(0, "lrgcd")))
- {
- sysf_messageBox("대분류코드를 " ,"C002");
- grp_detail.cmb_lrgcd.setFocus();
- return false;
- }
- if(utlf_isNull(ds_main_gooddet_gooddetlist.getColumn(0, "mdlcd")))
- {
- sysf_messageBox("중분류코드를 " ,"C002");
- cmb_mdlcd.setFocus();
- return false;
- }
- ds_send_goodcopy.setColumn( 0, "goodflag", ds_send_goodlist.getColumn( 0, "goodflag"));
- ds_send_goodcopy.setColumn( 0, "lrgcd" , ds_main_gooddet_gooddetlist.getColumn(0, "lrgcd"));
- ds_send_goodcopy.setColumn( 0, "mdlcd" , ds_main_gooddet_gooddetlist.getColumn(0, "mdlcd"));
- //submit("TRRSC05303");
- var oParam = {};
- oParam.id = "TRRSC05303";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetNewGoodCd";
- oParam.inds = "req=ds_send_goodcopy";
- oParam.outds = "ds_main_goodcopy_goodlist=goodlist";
- oParam.async = false;
- tranf_submit(oParam);
- var goodcd = ds_main_goodcopy_goodlist.getColumn(0, "goodcd");
- if(goodcd.length == 0)goodcd = model.getValue(group3.grp_title.cmb_goodflag_search.attribute("ref")) + model.getValue(grp_detail.cmb_lrgcd.attribute("ref")) + model.getValue(cmb_mdlcd.attribute("ref")) + "0001";
- model.setValue(grp_detail.ipt_goodcd.attribute("ref"), goodcd);
- //grp_detail.refresh();
- }
- function fGoodMastSet() {
- // var vPath = "ds_main_gooddet_gooddetlist";
- //
- // model.resetInstanceNode(vPath);
- ds_main_gooddet_gooddetlist.clearData();
- ds_main_gooddet_gooddetlist.addRow();
-
- model.removeNodeset(ds_main_list_gooddet_gooddetlist);
-
- ds_main_list_gooddet_gooddetlist.clearData();
- ds_main_list_gooddet_gooddetlist.addRow();
-
- group3.btn_insert.click();
-
- var row = ds_main_list_goodlists_goodlist.rowposition;
- //alert(ds_main_list_goodlists_goodlist.getColumn( row, "goodcd")));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodcd" , ds_main_list_goodlists_goodlist.getColumn( row, "goodcd"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodflag" , ds_main_list_goodlists_goodlist.getColumn( row, "goodflag" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodnm" , ds_main_list_goodlists_goodlist.getColumn( row, "goodnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodhngnm" , ds_main_list_goodlists_goodlist.getColumn( row, "goodhngnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodengnm" , ds_main_list_goodlists_goodlist.getColumn( row, "goodengnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodspec" , ds_main_list_goodlists_goodlist.getColumn( row, "goodspec" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodmodel" , ds_main_list_goodlists_goodlist.getColumn( row, "goodmodel" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "asetflag" , ds_main_list_goodlists_goodlist.getColumn( row, "asetflag" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "prodcmpycd", ds_main_list_goodlists_goodlist.getColumn( row, "prodcmpycd"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "prodcmpynm", ds_main_list_goodlists_goodlist.getColumn( row, "prodcmpynm"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "edicd" , ds_main_list_goodlists_goodlist.getColumn( row, "edicd" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "lrgcd" , ds_main_list_goodlists_goodlist.getColumn( row, "lrgcd" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "lrgnm" , ds_main_list_goodlists_goodlist.getColumn( row, "lrgnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "mdlcd" , ds_main_list_goodlists_goodlist.getColumn( row, "mdlcd" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "mdlnm" , ds_main_list_goodlists_goodlist.getColumn( row, "mdlnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "smlcd" , ds_main_list_goodlists_goodlist.getColumn( row, "smlcd" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "smlnm" , ds_main_list_goodlists_goodlist.getColumn( row, "smlnm" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "instcd" , ds_main_list_goodlists_goodlist.getColumn( row, "instcd" ));
- ds_main_gooddet_gooddetlist.setColumn( 0, "allsizecnt", ds_main_list_goodlists_goodlist.getColumn( row, "allsizecnt"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "mngtflag" , ds_main_list_goodlists_goodlist.getColumn( row, "mngtflag" ));
- // ds_main_gooddet_gooddetlist.setColumn( 0, "mngtflagnm", ds_main_list_goodlists_goodlist.getColumn( row, "mngtflagnm"));
- var vGoodflag = ds_main_list_goodlists_goodlist.getColumn( row, "goodflag" );
- ds_main_gooddet_gooddetlist.setColumn( 0, "insuyn", N);
- ds_main_gooddet_gooddetlist.setColumn( 0, "winacnt", 1000);
- ds_main_gooddet_gooddetlist.setColumn( 0, "winacntnm", 자산);
- ds_main_gooddet_gooddetlist.setColumn( 0, "goodunitcost", 0);
- ds_main_gooddet_gooddetlist.setColumn( 0, "purcflag", 1);
- ds_main_gooddet_gooddetlist.setColumn( 0, "addtaxrate", 10);
- ds_main_gooddet_gooddetlist.setColumn( 0, "allsizeyn", N);
- ds_main_gooddet_gooddetlist.setColumn( 0, "mainmngtdeptcd" ,sysf_getUserInfo("dutplcecd"));
- ds_main_gooddet_gooddetlist.setColumn( 0, "prcpunit", EA);
- ds_main_gooddet_gooddetlist.setColumn( 0, "deliveunit", EA);
- ds_main_gooddet_gooddetlist.setColumn( 0, "purcunit", EA);
- ds_main_gooddet_gooddetlist.setColumn( 0, "prcpexchqty", 1);
- ds_main_gooddet_gooddetlist.setColumn( 0, "exchqty", 1);
- ds_main_gooddet_gooddetlist.setColumn( 0, "reqflag",((vGoodflag == "A" ||vGoodflag == "B"||vGoodflag == "C"||vGoodflag == "D"||vGoodflag == "E"||vGoodflag == "F"||vGoodflag == "G"||vGoodflag == "H"||vGoodflag == "N"||vGoodflag == "P"||vGoodflag == "S" ) ? "A" : ((vGoodflag == "J"||vGoodflag == "K"||vGoodflag == "L"||vGoodflag == "M"||vGoodflag == "R"||vGoodflag == "U"||vGoodflag == "X"||vGoodflag == "Z") ? "B" : "C")));
- ds_main_gooddet_gooddetlist.setColumn( 0, "reqmthd", 3);
- ds_main_gooddet_gooddetlist.setColumn( 0, "reqprid", 1);
- ds_main_gooddet_gooddetlist.setColumn( 0, "tmpreqflag", N);
- ds_main_gooddet_gooddetlist.setColumn( 0, "mmavgusescheqty", 1);
- ds_main_gooddet_gooddetlist.setColumn( 0, "stocmngtflag", 3);
- ds_main_gooddet_gooddetlist.setColumn( 0, "minexch", 1);
- ds_main_gooddet_gooddetlist.setColumn( 0, "calcscorinfotranyn", N);
- ds_main_gooddet_gooddetlist.setColumn( 0, "maincustlastsuplplce", 9999);
- ds_main_gooddet_gooddetlist.setColumn( 0, "maincustlastsuplplcenm" ,"-");
- ds_main_gooddet_gooddetlist.setColumn( 0, "suppcustcd", 9999);
- ds_main_gooddet_gooddetlist.setColumn( 0, "suppcustnm","-");
- //model.refresh();
- }
- function fSaveGoodInstCopy()
- {
- var tPath = "ds_send_save_goodinstcopy";
- if (ds_main_gooddet_gooddetlist.getColumn(0, "goodcd") == "") return;
- var vData = "goodcd" + "▦" // 물품코드
- + "fromdd" + "▦" // 사용시작일
- + "frinstcd" + "▦" // 기관코드에서복사
- + "toinstcd" + "▩" // 기관코드에복사
- + ds_main_gooddet_gooddetlist.getColumn(0, "goodcd") + "▦" // 물품코드
- + ds_main_gooddet_gooddetlist.getColumn(0, "fromdd") + "▦" // 사용시작일
- + ds_main_gooddet_gooddetlist.getColumn(0, "instcd") + "▦" // 기관코드에서복사
- + group3.switch2.case4.grp_instcopy.cmb_instcopy.value + "▩"; // 기관코드에복사
- //
- ds_send_save_goodinstcopy.clearData();
- ds_send_save_goodinstcopy.addRow();
- dsf_setCSVToDs("ds_send_save_goodinstcopy",vData);
- //submit("TXRSC05306");
- var oParam = {};
- oParam.id = "TXRSC05306";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqExeRscdgoodInstCopy";
- oParam.inds = "goodinstcopy=ds_send_save_goodinstcopy";
- oParam.outds = "";
- oParam.async = false;
- tranf_submit(oParam);
- if(arErrorCode.pop("TXRSC05306") > -1) {
- group3.switch2.case4.grp_instcopy.visible = false;
- }
- else {
- alert("저장 실패!!! 확인요.");
- return;
- }
- misfGridIUD(group3.switch2.case4.grd_instinfo,"A" );
- addRow = ds_main_list_gooddet_goodinstlist.rowcount - 1;
- ds_main_list_gooddet_goodinstlist.setColumn( addRow, "instcd", ds_send_goodlist.getColumn( 0, "instcdcopy"));
- ds_main_list_gooddet_goodinstlist.setColumn( addRow, "instnm", group3.switch2.case4.grp_instcopy.cmb_instcopy.text);
- //group3.switch2.case4.grd_instinfo.refresh();
- }
-
- function cf_TXRSC05306(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- //----------------------------------------------------------
- // Column별 변경이력정보를 비교하는 구분
- // 2010.08.31 wareflag,costconyn,costcondd,usge 추가
- //----------------------------------------------------------
- var GoodColumnData = "goodcd" +"*goodcd" +"*GOODCD" +"*물품코드" +"*V#" // 01 물품코드 VARCHAR2(12)
- + "fromdd" +"*fromdd" +"*FROMDD" +"*사용시작일" +"*V#" // 02 사용시작일 VARCHAR2(8)
- + "instcd" +"*instcd" +"*INSTCD" +"*기관코드" +"*V#" // 03 기관코드 VARCHAR2(3)
- + "useyn" +"*useyn" +"*USEYN" +"*사용여부" +"*V#" // 04 사용여부 VARCHAR2(1)
- + "todd" +"*todd" +"*TODD" +"*사용끝일자" +"*V#" // 05 사용끝일자 VARCHAR2(8)
- + "goodflag" +"*goodflagnm" +"*GOODFLAG" +"*물품구분" +"*V#" // 06 물품구분 VARCHAR2(1)
- + "goodnm" +"*goodnm" +"*GOODNM" +"*물품명" +"*V#" // 07 물품명 VARCHAR2(200)
- + "goodhngnm" +"*goodhngnm" +"*GOODHNGNM" +"*물품한글명" +"*V#" // 08 영문명 VARCHAR2(200)
- + "goodengnm" +"*goodengnm" +"*GOODENGNM" +"*물품영문명" +"*V#" // 09 물품명 VARCHAR2(200)
- + "goodspec" +"*goodspec" +"*GOODSPEC" +"*물품규격" +"*V#" // 10 물품규격 VARCHAR2(100)
- + "goodmodel" +"*goodmodel" +"*GOODMODEL" +"*모델" +"*V#" // 11 모델 VARCHAR2(100)
- + "asetflag" +"*asetflagnm" +"*ASETFLAG" +"*자산구분" +"*V#" // 12 자산구분(R0043) VARCHAR2(1)
- + "lrgcd" +"*lrgnm" +"*LRGCD" +"*대분류코드" +"*V#" // 13 대분류코드 VARCHAR2(2)
- + "mdlcd" +"*mdlnm" +"*MDLCD" +"*중분류코드" +"*V#" // 14 중분류코드 VARCHAR2(3)
- + "smlcd" +"*smlnm" +"*SMLCD" +"*소분류코드" +"*V#" // 15 소분류코드 VARCHAR2(2)
- + "oldcd" +"*oldcd" +"*OLDCD" +"*구코드" +"*V#" // 16 구코드 VARCHAR2(12)
- + "proddrugsetflag" +"*proddrugsetflagnm" +"*PRODDRUGSETFLAG" +"*GROUP구분" +"*V#" // 17 1:제제약,2:CSRSET,3:진료재료SET VARCHAR2(1)
- + "winacnt" +"*winacntnm" +"*WINACNT" +"*계정코드" +"*V#" // 18 계정코드 VARCHAR2(8)
- + "amtacnt" +"*amtacntnm" +"*AMTACNT" +"*비용계정" +"*V#" // 19 비용계정 VARCHAR2(8)
- + "mainmngtdeptcd" +"*mainmngtdeptnm" +"*MAINMNGTDEPTCD" +"*주관리부서코드" +"*V#" // 20 주관리부서코드 VARCHAR2(10)
- + "mainusedeptcd" +"*mainusedeptnm" +"*MAINUSEDEPTCD" +"*주사용부서코드" +"*V#" // 21 주사용부서코드 VARCHAR2(10)
- + "stocmngtflag" +"*stocmngtflagnm" +"*STOCMNGTFLAG" +"*재고관리기준" +"*V#" // 23 재고관리기준 VARCHAR2(1)
- + "purcunit" +"*purcunit" +"*PURCUNIT" +"*입고단위" +"*V#" // 24 입고단위(R0039) VARCHAR2(12)
- + "putrunitcost" +"*putrunitcost" +"*PUTRUNITCOST" +"*납품가" +"*N#" // 24 납품가 NUMBER(9)
- + "deliveunit" +"*deliveunit" +"*DELIVEUNIT" +"*수불단위" +"*V#" // 25 수불단위(R0039) VARCHAR2(12)
- + "exchqty" +"*exchqty" +"*EXCHQTY" +"*환산배수" +"*N#" // 26 환산배수 NUMBER(9)
- + "minexch" +"*minexch" +"*MINEXCH" +"*최소환산수량" +"*N#" // 27 최소환산수량 NUMBER(9)
- + "reuseyn" +"*reuseynnm" +"*REUSEYN" +"*재사용구분" +"*V#" // 28 -:None,1:재사용,2:분할사용 VARCHAR2(1)
- + "divusenvalqty" +"*divusenvalqty" +"*DIVUSENVALQTY" +"*분할사용수치" +"*V#" // 29 분할사용수치 VARCHAR2(30)
- + "calcscorinfoacptstat" +"*calcscorinfoacptstat" +"*CALCSCORINFOACPTSTAT" +"*수가정보등록상태" +"*V#" // 30 수가정보등록상태 VARCHAR2(1)
- + "calcscorinfoacptdd" +"*calcscorinfoacptdd" +"*CALCSCORINFOACPTDD" +"*수가정보등록일자" +"*V#" // 31 수가정보등록일자 VARCHAR2(8)
- + "insuyn" +"*insuyn" +"*INSUYN" +"*보험여부" +"*V#" // 32 보험여부 VARCHAR2(1)
- + "edicd" +"*edicd" +"*EDICD" +"*EDI코드" +"*V#" // 33 EDI코드 VARCHAR2(16)
- + "newrgstdd" +"*newrgstdd" +"*NEWRGSTDD" +"*신규등록일자" +"*V#" // 34 신규등록일자 VARCHAR2(8)
- + "reqdeptcd" +"*reqdeptnm" +"*REQDEPTCD" +"*신청부서코드" +"*V#" // 35 신청부서코드 VARCHAR2(10)
- + "reqpsn" +"*reqpsnnm" +"*REQPSN" +"*신청자ID" +"*V#" // 36 신청자ID VARCHAR2(10)
- + "reqflag" +"*reqflagnm" +"*REQFLAG" +"*청구기준" +"*V#" // 37 청구기준 VARCHAR2(1)
- + "tmpreqflag" +"*tmpreqflag" +"*TMPREQFLAG" +"*임의청구구분" +"*V#" // 38 임의청구구분 VARCHAR2(1)
- + "reqmthd" +"*reqmthdnm" +"*REQMTHD" +"*청구구분" +"*V#" // 39 처방집계,정량보충,일반청구 VARCHAR2(1)
- + "reqprid" +"*reqpridnm" +"*REQPRID" +"*청구주기" +"*V#" // 40 청구주기 VARCHAR2(2)
- + "iopsnflag" +"*iopsnflag" +"*IOPSNFLAG" +"*내외자구분" +"*V#" // 41 내외자구분 VARCHAR2(1)
- + "prodplce" +"*prodplcenm" +"*PRODPLCE" +"*제조국" +"*V#" // 42 제조국 VARCHAR2(3)
- + "prodcmpycd" +"*prodcmpynm" +"*PRODCMPYCD" +"*제조회사코드" +"*V#" // 43 제조회사코드 VARCHAR2(5)
- + "maincustlastsuplplce" +"*maincustlastsuplplcenm" +"*MAINCUSTLASTSUPLPLCE" +"*최종공급처" +"*V#" // 44 최종공급처 VARCHAR2(10)
- + "suppcustcd" +"*suppcustnm" +"*SUPPCUSTCD" +"*최종공급처" +"*V#" // 45 보조거래처코드 VARCHAR2(10)
- + "conflag" +"*conflagnm" +"*CONFLAG" +"*계약구분" +"*V#" // 46 계약구분 VARCHAR2(1)
- + "fromconterm" +"*fromconterm" +"*FROMCONTERM" +"*계약기간From" +"*V#" // 47 계약기간From VARCHAR2(8)
- + "toconterm" +"*toconterm" +"*TOCONTERM" +"*계약기간To" +"*V#" // 48 계약기간To VARCHAR2(8)
- + "estmamt" +"*estmamt" +"*ESTMAMT" +"*견적가" +"*N#" // 49 견적가 NUMBER(14,2)
- + "forgncurncyunitcost" +"*forgncurncyunitcost" +"*FORGNCURNCYUNITCOST" +"*외화단가" +"*N#" // 50 외화단가 NUMBER(14,2)
- + "curncyunit" +"*curncyunitnm" +"*CURNCYUNIT" +"*화폐단위" +"*V#" // 51 화폐단위 VARCHAR2(3)
- + "goodunitcost" +"*goodunitcost" +"*GOODUNITCOST" +"*제품단가" +"*N#" // 52 제품단가 NUMBER(14,2)
- + "purcflag" +"*purcflagnm" +"*PURCFLAG" +"*구매구분" +"*V#" // 53 구매구분(구매,수탁,위탁) VARCHAR2(1)
- + "allsizeyn" +"*allsizeyn" +"*ALLSIZEYN" +"*ALLSIZE유무" +"*V#" // 54 ALLSIZE유무 VARCHAR2(1)
- + "setplceordflag" +"*setplceordflagnm" +"*SETPLCEORDFLAG" +"*SET발주구분" +"*V#" // 55 SET발주구분 VARCHAR2(1)
- + "plceordbase" +"*plceordbase" +"*PLCEORDBASE" +"*발주기준" +"*V#" // 56 XX 발주기준 VARCHAR2(1)
- + "plceordqtycretflag" +"*plceordqtycretflag" +"*PLCEORDQTYCRETFLAG" +"*발주량생성구분" +"*V#" // 57 XX 발주량생성구분 VARCHAR2(1)
- + "plceordnonusedd" +"*plceordnonusedd" +"*PLCEORDNONUSEDD" +"*발주불용일자" +"*V#" // 58 발주불용일자 VARCHAR2(8)
- + "addtaxrate" +"*addtaxrate" +"*ADDTAXRATE" +"*부가세율" +"*V#" // 59 부가세율 VARCHAR2(3)
- + "lastpurcdd" +"*lastpurcdd" +"*LASTPURCDD" +"*최종구매일자" +"*V#" // 60 최종구매일자 VARCHAR2(8)
- + "nonusetretresn" +"*nonusetretresn" +"*NONUSETRETRESN" +"*불용처리사유" +"*V#" // 61 불용처리사유(reason) VARCHAR2(60)
- + "mngtflag" +"*mngtflag" +"*MNGTFLAG" +"*관리구분" +"*V#" // 62 관리구분(고가약품,..) VARCHAR2(1)
- + "bnscd" +"*bnscd" +"*BNSCD" +"*보나에스코드" +"*V#" // 63 보나에스코드 VARCHAR2(12)
- + "cntrdrugyn" +"*cntrdrugyn" +"*CNTRDRUGYN" +"*규제약품여부" +"*V#" // 64 규제약품여부 VARCHAR2(1)
- + "narcflag" +"*narcflag" +"*NARCFLAG" +"*마약향정구분" +"*V#" // 65 마약_향정구분 VARCHAR2(1)
- + "expnyn" +"*expnyn" +"*EXPNYN" +"*고가여부" +"*V#" // 66 고가여부 VARCHAR2(1)
- + "cntsunit" +"*cntsunit" +"*CNTSUNIT" +"*함량단위" +"*V#" // 67 함량단위 VARCHAR2(12)
- + "cntsqty" +"*cntsqty" +"*CNTSQTY" +"*함량용량" +"*V#" // 68 함량용량 VARCHAR2(20)
- + "specvol" +"*specvol" +"*SPECVOL" +"*규격용량" +"*V#" // 69 규격용량 VARCHAR2(20)
- + "drugkind" +"*drugkind" +"*DRUGKIND" +"*약품종류" +"*V#" // 70 약품종류 VARCHAR2(3)
- + "cooppurcyn" +"*cooppurcyn" +"*COOPPURCYN" +"*공동구매여부" +"*V#" // 71 공동구매여부 VARCHAR2(1)
- + "autrampharm" +"*autrampharm" +"*AUTRAMPHARM" +"*자동이송약국" +"*V#" // 72 자동이송-약국 VARCHAR2(1)
- + "keepmthd" +"*keepmthd" +"*KEEPMTHD" +"*보관방법" +"*V#" // 73 보관방법 VARCHAR2(1)
- + "specldrug" +"*specldrug" +"*SPECLDRUG" +"*특별약품" +"*V#" // 74 특별약품 VARCHAR2(1)
- + "gnrlspcl" +"*gnrlspcl" +"*GNRLSPCL" +"*일반-전문" +"*V#" // 75 일반-전문 VARCHAR2(1)
- + "welfprt" +"*welfprtnm" +"*WELFPRT" +"*복지부분류" +"*V#" // 76 복지부분류 VARCHAR2(3)
- + "goodtype" +"*goodtype" +"*GOODTYPE" +"*제형" +"*V#" // 77 제형 VARCHAR2(3)
- + "com" +"*com" +"*COM" +"*성분" +"*V#" // 78 성분 VARCHAR2(10)
- + "limdrugyn" +"*limdrugyn" +"*LIMDRUGYN" +"*제한약품여부" +"*V#" // 79 제한약품여부 VARCHAR2(1)
- + "cmt" +"*cmt" +"*CMT" +"*비고" +"*V#" // 80 비고 VARCHAR2(200)
- + "safestocappdd" +"*safestocappdd" +"*SAFESTOCAPPDD" +"*안전재고적용일자" +"*V#" // 81 안전재고적용일자 VARCHAR2(8)
- + "safestocqty" +"*safestocqty" +"*SAFESTOCQTY" +"*안전재고량" +"*N#" // 82 안전재고량 NUMBER(14,2)
- + "ddavguseqty" +"*ddavguseqty" +"*DDAVGUSEQTY" +"*일평균사용량" +"*N#" // 83 일평균사용량 NUMBER(14,2)
- + "mmavgusescheqty" +"*mmavgusescheqty" +"*MMAVGUSESCHEQTY" +"*월평균사용예정량" +"*N#" // 84 월평균사용예정량 NUMBER(14,2)
- + "mmavguseqty" +"*mmavguseqty" +"*MMAVGUSEQTY" +"*월평균사용량" +"*N#" // 85 월평균사용량 NUMBER(14,2)
- + "prprtystocpossndayno" +"*prprtystocpossndayno" +"*PRPRTYSTOCPOSSNDAYNO" +"*적정재고보유일수" +"*N#" // 86 적정재고보유일수 NUMBER(9)
- + "prcpunit" +"*prcpunit" +"*PRCPUNIT" +"*수가단위" +"*V#" // 87 수가단위 VARCHAR2(12)
- + "prcpexchqty" +"*prcpexchqty" +"*PRCPEXCHQTY" +"*수불환산수량" +"*N#" // 88 수불환산수량 NUMBER(11,2)
- + "insucost" +"*insucost" +"*INSUCOST" +"*보험단가" +"*N#" // 89 보험단가 NUMBER(14,2)
- + "specunit" +"*specunit" +"*SPECUNIT" +"*규격단위" +"*V#" // 90 규격단위 VARCHAR2(12)
- + "pemtkeepmthd" +"*pemtkeepmthd" +"*PEMTKEEPMTHD" +"*허가보관방법" +"*V#" // 91 허가보관방법 VARCHAR2(100)
- + "orgloc" +"*orgloc" +"*ORGLOC" +"*원산지(영양)" +"*V#" // 92 원산지(영양) VARCHAR2(30)
- + "comnm" +"*comnm" +"*COMNM" +"*성분명칭" +"*V#" // 93 성분명칭 VARCHAR2(200)
- + "purcqty" +"*purcqty" +"*PURCQTY" +"*포장수량" +"*N#" // 94 포장수량 NUMBER(9)
- + "prcpqty" +"*prcpqty" +"*PRCPQTY" +"*처방수량" +"*N#" // 95 처방수량 NUMBER(9)
- + "goodpurccost" +"*goodpurccost" +"*GOODPURCCOST" +"*구입가" +"*N#" // 96 구입가 NUMBER(14,2)
- + "wareflag" +"*wareflagnm" +"*WAREFLAG" +"*창고구분" +"*V#" // 97 창고구분
- + "costconyn" +"*costconyn" +"*COSTCONYN" +"*단가계약여부" +"*V#" // 98 단가계약여부
- + "costcondd" +"*costcondd" +"*COSTCONDD" +"*단가계약일자" +"*V#" // 99 단가계약일자
- + "usge" +"*usge" +"*USGE" +"*용도" +"*V#" // 100 용도
- + "purcacntcd" +"*purcacntcd" +"*PURCACNTCD" +"*구매계정코드" +"*V#" // 101 구매계정코드 VARCHAR2(3)
- + "goodposcd" +"*goodposcd" +"*GOODPOSCD" +"*물품위치코드" +"*V#" // 102 물품위치코드
- + "reqmutpleqty" +"*reqmutpleqty" +"*REQMUTPLEQTY" +"*청구수량고정배수" +"*V" ; // 103 청구수량고정배수
- var GoodColumn = GoodColumnData.split("#");
- //
- function fGoodOldNewCompare() {
- var DefCnt = 0;
- var vOldPath = ds_init_oldgoodlist;
- var vNewPath = ds_main_gooddet_gooddetlist;
- var vSndPath = ds_send_save_goodchange;
- var vHeadData = "instcd" +"▦" // 01 기관코드
- + "tabname" +"▦" // 02 테이블명
- + "changefl" +"▦" // 03 변경분류 물품분류
- + "changecd" +"▦" // 04 변경코드 물품코드
- + "colname" +"▦" // 05 컬럼명
- + "colcomt" +"▦" // 06 컬럼코멘드
- + "oldvalue" +"▦" // 07 변경전변경값
- + "oldvalnm" +"▦" // 08 변경전변경명
- + "newvalue" +"▦" // 09 변경후변경값
- + "newvalnm" +"▦" // 10 변경후변경명
- + "colflag" +"▦" // 11 컬럼구분 V:VARCHAR,D:DATE,N:NUMBER,T:TIMESTAMP
- + "userid" +"▩"; // 14 변경작업자
- if (vGoodNew == "N") {
- vSndPath.clearData();
- vSndPath.addRow();
- dsf_setCSVToDs("ds_send_save_goodchange",vHeadData);
-
- return;
- }
- var vBodyData = "";
- var vInstcd = sysf_getUserInfo("dutplceinstcd");
- var vUserId = sysf_getUserInfo("userid") ;
- var vTabName = "RSCDGOOD" ;
- var vGoodcd = vNewPath.getColumn(0, "goodcd" );
- var vGoodFalg = vNewPath.getColumn(0, "goodflag");
- ds_send_save_histinfo_histflag.clearData();
- ds_tmp_calcscorinfo_calcscorinfotranyn.clearData();
- for (var i=0; i < GoodColumn.length; i++){
- var vColumn = GoodColumn[i].split("*");
- if (vOldPath.getColumn( 0, vColumn[0]) != vNewPath.getColumn( 0, vColumn[0])) {
- DefCnt++;
- vBodyData += vInstcd + "▦" // 01 기관코드
- + vTabName + "▦" // 02 테이블명
- + vGoodFalg + "▦" // 03 변경분류 물품분류
- + vGoodcd + "▦" // 04 변경코드 물품코드
- + vColumn[2] + "▦" // 05 컬럼명
- + vColumn[3] + "▦" // 06 컬럼코멘드
- + model.getValue(vOldPath+vColumn[0]) + "▦" // 07 변경전변경값
- + model.getValue(vOldPath+vColumn[1]) + "▦" // 08 변경전변경명
- + model.getValue(vNewPath+vColumn[0]) + "▦" // 09 변경후변경값
- + model.getValue(vNewPath+vColumn[1]) + "▦" // 10 변경후변경명
- + vColumn[4] + "▦" // 11 컬럼구분 V:VARCHAR,D:DATE,N:NUMBER,T:TIMESTAMP
- + vUserId + "▩"; // 14 변경작업자
- // 이력을 남기기 위한 flag(화면에서 노란색으로 표시된 컬럼들 변경시 적용일자 변경시 이력 쌓이는 것처럼 변경)
- // 최소처방수량 추가
- if((vColumn[2] =="GOODUNITCOST")
- ||(vColumn[2] =="PURCFLAG")||(vColumn[2] =="INSUYN")
- ||(vColumn[2] =="MAINCUSTLASTSUPLPLCE")||(vColumn[2] =="SUPPCUSTCD")
- ||(vColumn[2] =="ALLSIZEYN")||(vColumn[2] =="PRCPUNIT")
- ||(vColumn[2] =="DELIVEUNIT")||(vColumn[2] =="PURCUNIT")
- ||(vColumn[2] =="PRCPEXCHQTY")||(vColumn[2] =="EXCHQTY")
- ||(vColumn[2] =="REQFLAG")||(vColumn[2] =="REQMTHD")
- ||(vColumn[2] =="REQPRID")||(vColumn[2] =="STOCMNGTFLAG")||(vColumn[2] =="MINEXCH")
- ||(vColumn[2] =="WAREFLAG")||(vColumn[2] =="COSTCONYN")||(vColumn[2] =="CONFLAG")
- ||(vColumn[2] =="COSTCONDD")
- ) {
- dsf_makeValue( ds_send_save_histinfo, "histflag", "string", "Y");
- }else{
- if(ds_send_save_histinfo.getColumn(0, "histflag")!="Y"){
- dsf_makeValue( ds_send_save_histinfo, "histflag", "string", "N");
- }
- }
- // 수가전송 리스트에 올리기 위한 flag
- // 기관에서 수가여부,allsize여부,단가,최소처방수량,코드불용일_사유를 수정했을시에는 수가전송 필요
- if((vColumn[2] =="GOODUNITCOST")
- ||(vColumn[2] =="ALLSIZEYN")||(vColumn[2] =="INSUYN")
- ||(vColumn[2] =="MINEXCH") ||(vColumn[2] =="TODD")
- ){
- dsf_makeValue( ds_tmp_calcscorinfo, "calcscorinfotranyn", "string", "N");
- }else {
- if((ds_tmp_calcscorinfo.getColumn(0, "calcscorinfotranyn")!="N")
- ||(ds_tmp_calcscorinfo.getColumn(0, "calcscorinfotranyn")=="")){
- dsf_makeValue( ds_tmp_calcscorinfo, "calcscorinfotranyn", "string", "-");
- }
- }
- }
- }
-
-
- vSndPath.clearData();
- vSndPath.addRow();
- //model.setValue(vSndPath, vHeadData+vBodyData);
-
- dsf_setCSVToDs("ds_send_save_goodchange",vHeadData+vBodyData);
- }
- //
- function fNewDoubleClick(pGrid)
- {
- var pGridDs = pGrid.binddataset;
- var row = pGridDs.rowposition;
-
- var vGoodcd = pGridDs.getColumn( row, "goodcd");
- if (!utlf_isNull(ds_main_list_goodlists_goodlist.lookupExpr( "goodcd == '" + vGoodcd + "'", "goodcd"))) {
- sysf_messageBox("동일 물품코드가 이미 존재하여 추가 " ,"E001");
- return false;
- }
- vGoodNew = "N";
- switch1.case6.grd_goodlist.setFocus();
- group3.btn_instgood.selected = true;
- group3.btn_instgood.click();
- misfGridIUD(switch1.case6.grd_goodlist, "A");
- ds_main_list_goodlists_goodlist.copyRow( 0, pGridDs, row);
- ds_main_list_goodlists_goodlist.rowposition = 0;
- //switch1.case6.grd_goodlist.refresh();
- switch1_case6_grd_goodlist_onrowchanged();
-
- }
- /**
- * _desc : 그리드 확대하기
- * _
- * _return :
- * _author : 이창록 2009-08-25 추가
- * _---------------------------------------------------
- */
- function fChgGridExt()
- {
- var minWidth = 535;
- var maxWidth = 1195;
- if(group3.btn_ext.text == "확대보기") {
- switch1.position.width = maxWidth;
- switch1.case10.line6.position.width = maxWidth - 2; //.attribute("x2") --> width
- switch1.case6.grd_goodlist.position.width = maxWidth - 2;
- switch1.case7.grd_instgoodlist.position.width = maxWidth - 2;
- switch1.case9.grd_appinstgoodlist.position.width = maxWidth - 2;
- switch1.case10.grd_rscdtchglist2.position.width = maxWidth - 2;
- group3.btn_ext.text = "기본보기";
- } else {
- switch1.case6.grd_goodlist.position.width = minWidth - 2;
- switch1.case7.grd_instgoodlist.aposition.width = minWidth - 2;
- switch1.case9.grd_appinstgoodlist.v = minWidth - 2;
- switch1.case10.grd_rscdtchglist2.position.width = minWidth - 2;
- switch1.position.width = minWidth;
- switch1.case10.line6.position.width = minWidth - 2;
- group3.btn_ext.text = "확대보기";
- }
- }
- function fInitUnit(instcd,goodflag)
- {
- var vPath = ds_temp_currentunit;
-
- if(vPath.getColumn( 0, "instcd") != instcd || vPath.getColumn( 0, "goodflag") != goodflag){
- rszfComboUnitList (grp_detail.cmb_prcpunit, instcd, goodflag);
- misfComboCopyItemSet(grp_detail.cmb_prcpunit, "", grp_detail.cmb_purcunit, ""); //포장단위
- misfComboCopyItemSet(grp_detail.cmb_prcpunit, "", grp_detail.cmb_deliveunit, ""); //수불단위
- vPath.setColumn(0, "instcd", instcd);
- vPath.setColumn(0, "goodflag", goodflag);
- }
- }
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
- // header파일 중 SMRSC05303.js 파일 끝]]></Script>
|