123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMAHA00300.xrw
- * 설 명 : 단체예약/접수(종건/일건)
- * 설 계 자 : 박원희
- * 작 성 자 : 박원희
- * 작 성 일 : 2007.07.12
- * 수정이력 : 손범성
- * 기 타 :
- -->
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>단체예약접수</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <uploadlst>
- <item>
- <chk/>
- <hngnm/>
- <rrgstno1/>
- <rrgstno2/>
- <hopedd/>
- <email/>
- <telno/>
- <mpphon/>
- <zipcd11/>
- <zipcd12/>
- <detladdr1/>
- <testcd/>
- <healexamplacecd/>
- <choiflag/>
- <cmpycd/>
- <remcnts/>
- <clntpos/>
- <fmhngnm/>
- <fmrgstno1/>
- <fmrgstno2/>
- <fmrelacd/>
- <clntdeptnm/>
- <clntcmpynm/>
- <clntempid/>
- <testnm/>
- <sex/>
- <brthdd/>
- <age/>
- <forgneryn/>
- <emailid/>
- <emailtype/>
- <statflag/>
- <healexamflag/>
- <healexamdetlflag/>
- <conseq/>
- <conhistseq/>
- <pkgcd/>
- </item>
- </uploadlst>
- </main>
- <send>
- <srch>
- <rrgstno/>
- </srch>
- <save>
- <cmpyrsrv/>
- </save>
- <clscd/>
- <etccd/>
- </send>
- <init>
- <baseinfo>
- <empflag/>
- <plceflag/>
- <choiflaglst/>
- <healexamplacelst/>
- <chedetlflaglst/>
- <ghedetlflaglst/>
- <hedetlflaglst>
- <item/>
- </hedetlflaglst>
- <detlcodelst/>
- </baseinfo>
- <send>
- <healexamflag/>
- <healexamdetlflag/>
- <cmpycd/>
- <cmpynm/>
- <conseq/>
- <conhistseq/>
- <pkgcd/>
- <pkgnm/>
- <healexamplacecd/>
- <choiflag/>
- </send>
- </init>
- <hidden>
- <coninfo/>
- <duprrgstnolst>
- <item/>
- </duprrgstnolst>
- <testlst/>
- </hidden>
- <tmp/>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../ast/healexamweb/js/AHA001.js"/>
- <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
- <script type="javascript" src="../../../ast/healthexambaseweb/js/healcombolist.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var sFlag = getScreenMenuParameter();
- if(sFlag != "") {
- m_vHealexamflag = sFlag.substr(0,1);
- m_vHealexamdetlflag = sFlag;
- }
- fGetBaseInfo();
- fInit();
- model.refresh();
-
- //기본코드관리의 상세코드 호출
- model.setValue("/root/send/clscd", "G" ); //공통코드
- model.setValue("/root/send/etccd", "G14"); //건진가족관계 Setting
- submit("TRAHB00602");
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- var m_vHealexamflag = "";
- var m_vHealexamdetlflag = "";
- /**
- *기본정보 가져오기
- */
- function fGetBaseInfo(){
- zbcfGetCodeList( new Array("A0069","A0070", "A0113","A0110","A0116"),
- new Array("/root/init/baseinfo/chedetlflaglst"
- , "/root/init/baseinfo/ghedetlflaglst"
- , "/root/init/baseinfo/empflag"
- ,"/root/init/baseinfo/plceflag"
- ,"/root/init/baseinfo/choiflaglst") );
-
- healGetCodeList( new Array("S600")
- , new Array("/root/init/baseinfo/healexamplacelst") );
- model.removenode("/root/init/baseinfo/healexamplacelst/S600[1]");
-
- //선택검사에 빈칸을 추가한다.
- addComboItem("combo1"," ","","above");
- copyNodesetType("/root/init/baseinfo/hedetlflaglst/item","/root/init/baseinfo/chedetlflaglst/A0069","after");
- copyNodesetType("/root/init/baseinfo/hedetlflaglst/item","/root/init/baseinfo/ghedetlflaglst/A0070","after");
-
- model.refresh();
- }
-
- /********************************************************************************************************************************************************
- * 초기화 작업
- ********************************************************************************************************************************************************/
- function fInit() {
- model.setValue("/root/init/send/healexamflag" , m_vHealexamflag);
- model.setValue("/root/init/send/healexamdetlflag" , m_vHealexamdetlflag);
- rdo_healexamplace.select(0);
- grd_cupload.fixedcellcheckbox(0 , grd_cupload.colRef("chk")) = true;
- }
-
- /********************************************************************************************************************************************************
- * 파일 업로드
- ********************************************************************************************************************************************************/
-
- function fFileUpload(){
- var healexamdeltflag = model.getValue("/root/init/baseinfo/healexamdetlflag" );
- var fileName = window.fileDialog("open", ",", false, "", "xls", "Excel Files(*.xls)|*.xls|Dat Files(*.dat)|*.dat|All Files (*.*)|*.*");
- var regExp = /.dat$/gi;
-
- var vGrd = null;
-
- //model.setValue("/root/hidden/save/filename" , fileName);
-
- // 엑셀, dat파일 구분
- if(regExp.test(fileName)) {
- /*var fso,ts,tsr;
- fso = new ActiveXObject("Scripting.FileSystemObject");
- ts = fso.OpenTextFile(fileName);
- model.setValue("/root/send/linkdata",ts.ReadAll());
- ts.Close();
- if(submit("TRAHA00304",false)) {
- if(model.getValue("/root/main/linklst/cmpy/cmpyrgstyn") == 0) {
- submit("TXAHA00303");
- }
- model.toggle("case_linkup");
- } */
- }else {
- //model.toggle("case_cup");
- grd_cupload.loadExcel(fileName, 1, true);
- var cnt = grd_cupload.rows;
- var i = 0;
- for( i = 1; i < cnt +1 ; i++)
- {
- grd_cupload.addStatus(i, "insert");
- }
- grd_cupload.deleteRow(1);
- grd_cupload.rebuildStyle();
- grd_cupload.refresh();
- }
- }
- /********************************************************************************************************************************************************
- * Dat 파일 화면셋팅
- ********************************************************************************************************************************************************/
- function fSetDatFile(vLine) {
- var nodeSet = "/root/hidden/linkflag/flag";
- var nodeList = instance1.selectNodes(nodeSet);
-
- for(var i=1; i <= nodeList.length; i++) {
- var linkCntsFlag = model.getValue(nodeSet + "[" + i + "]/linkcntsflag");
- var start = model.getValue(nodeSet + "[" + i + "]/colmstart");
- var size = model.getValue(nodeSet + "[" + i + "]/colmsize");
- // 시작구분 조회
- if(linkCntsFlag == "FF") {
- var startFlag = model.getValue(nodeSet + "[" + i + "]/linkcntscd"); // 시작구분
- if(startFlag == vLine.substr(start -1, size)) {
- var srcFlag = model.getValue(nodeSet + "[" + i + "]/linkdetlflag"); // 찾기 사업장,영업소,부서,검진대상자 구분
- for(var j=1; j<nodeList.length; j++) {
- var desFlag = model.getValue(nodeSet + "[" + j + "]/linkdetlflag"); // 목적 사업장,영업소,부서,검진대상자 구분
- if(desFlag != '4') {
- if(srcFlag == desFlag) { //사업장,영업소,부서,
- var desStart = model.getValue(nodeSet + "[" + j + "]/colmstart");
- var desSize = model.getValue(nodeSet + "[" + j + "]/colmsize");
- var desMapp = model.getValue(nodeSet + "[" + j + "]/mappcolm");
- //alert("desStart : " + desStart + " desSize : " + desSize + " desMapp : " + desMapp + " value : " + vLine.substr(desStart,desSize));
- for(var x=0; x < grd_linkcmpy.cols; x++) {
- if(desMapp == grd_linkcmpy.colAttribute(x,"ref")) {
- grd_linkcmpy.valueMatrix(grd_linkcmpy.rows - 1 , x) = vLine.substr(desStart - 1, desSize);
- }
- }
- }
- }else { // 검진대상자
- if(srcFlag == desFlag) {
- var desStart = model.getValue(nodeSet + "[" + j + "]/colmstart");
- var desSize = model.getValue(nodeSet + "[" + j + "]/colmsize");
- var desMapp = model.getValue(nodeSet + "[" + j + "]/mappcolm");
- //alert("desStart : " + desStart + " desSize : " + desSize + " desMapp : " + desMapp + " value : " + vLine.substr(desStart,desSize));
- for(var y=0; y < grd_linktrgt.cols; y++ ) {
- if(desMapp == grd_linktrgt.colAttribute(y,"ref")) {
- grd_linktrgt.valueMatrix(grd_linktrgt.rows - 1 , y) = vLine.substr(desStart - 1, desSize);
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- // 나중에 CSV로 upload할때 사용예정
- /*
- function fCsvUpload(){
- var rowSep = "$";
- var colSep = ",";
- var fileName = window.fileDialog("open", ",", false, "", "txt", "Text Files(*.txt)|*.txt|All Files (*.*)|*.*");
- grd_cupload.loadText(fileName, rowSep, colSep);
-
- var cnt = grd_cupload.rows;
- var i = 0;
- for( i = 1; i < cnt +1 ; i++)
- {
- grd_cupload.addStatus(i, "insert");
- }
- //grd_cupload.deleteRow(1);
- grd_cupload.refresh();
-
- }
- */
- /********************************************************************************************************************************************************
- * 단체 예약 종합건진접수 등록
- ********************************************************************************************************************************************************/
- function fSaveCmpyRsrvAcpt() {
- var hopeDDCnt = 0;
- var pkgCnt = 0;
- var contCnt = 0;
- var healexamplaceCnt = 0;
-
- for(var i=1; i < grd_cupload.rows; i++) {
- if(grd_cupload.valueMatrix(i , grd_cupload.colRef("chk") ) == "Y" ) {
- if(grd_cupload.valueMatrix(i , grd_cupload.colRef("hopedd") ) == "") {
- hopeDDCnt++;
- }
- if(grd_cupload.valueMatrix(i , grd_cupload.colRef("pkgcd") ) == "") {
- pkgCnt++;
- }
- if(grd_cupload.valueMatrix(i , grd_cupload.colRef("cmpycd") ) == "" || grd_cupload.valueMatrix(i , grd_cupload.colRef("conseq") ) == "" || grd_cupload.valueMatrix(i , grd_cupload.colRef("conhistseq") ) == "") {
- contCnt++
- }
- if(grd_cupload.valueMatrix(i , grd_cupload.colRef("healexamplacecd") ) == "") {
- healexamplaceCnt++;
- }
-
- }
- }
-
- // 등록정보 체크
- var cur_date = getCurrentDate();
- var rsv_cnt = grd_cupload.rows ;
- var sNode = grd_cupload.nodeset+ "[";
-
- for( var i = 1; i < rsv_cnt ; i++){
- if(model.getValue(sNode + i + "]/hopedd") != ""){
- if(model.getValue(sNode + i + "]/hopedd" ) < cur_date) {
- messageBox("건진일자는 현재 일자보다 미래의 일자 이어야 합니다.","C001");
- return;
- }
- }
- }
- if(model.getValue("/root/init/send/healexamflag") == "") {
- messageBox("건진구분 정보를", "C001");
- return;
- }
- if(model.getValue("/root/init/send/healexamdetlflag") == "" ) {
- messageBox("건진상세구분 정보를", "C001");
- return;
- }
- if(hopeDDCnt > 0) {
- messageBox("건진일을 모두 ", "C001");
- return;
- }
-
- if(contCnt > 0) {
- messageBox("계약 정보를 모두" , "C001");
- return;
- }
-
- if(pkgCnt > 0) {
- messageBox("패키지코드를 모두 ", "C001");
- return;
- }
- if(healexamplaceCnt > 0) {
- messageBox("건진장소 구분을 모두 ", "C001");
- return;
- }
-
-
- // 초기화
- var rsrvCnt = 0;
- var healexamflag = model.getValue("/root/init/send/healexamflag");
- var healexamdetlflag = model.getValue("/root/init/send/healexamdetlflag");
- grd_cupload.clearStatus();
-
- for (var i=1; i<grd_cupload.rows; i++) {
-
- if(grd_cupload.valueMatrix(i , grd_cupload.colRef("chk") ) == "Y" ){
- var rrgstno = grd_cupload.valueMatrix(i , grd_cupload.colRef("rrgstno1")) + grd_cupload.valueMatrix(i , grd_cupload.colRef("rrgstno2"));
- grd_cupload.addStatus(i,"insert");
- var email = grd_cupload.valueMatrix(i , grd_cupload.colRef("email")).split("@");
- grd_cupload.valueMatrix(i , grd_cupload.colRef("sex")) = fGetRrgstNo(rrgstno,"S");
- grd_cupload.valueMatrix(i , grd_cupload.colRef("brthdd")) = fGetRrgstNo(rrgstno,"B");
- grd_cupload.valueMatrix(i , grd_cupload.colRef("age")) = fGetRrgstNo(rrgstno,"A");
- grd_cupload.valueMatrix(i , grd_cupload.colRef("forgeryn")) = fGetRrgstNo(rrgstno,"F");
- grd_cupload.valueMatrix(i , grd_cupload.colRef("statflag")) = "A";
- grd_cupload.valueMatrix(i , grd_cupload.colRef("emailid")) = email[0];
- grd_cupload.valueMatrix(i , grd_cupload.colRef("emailtype")) = email[1];
- grd_cupload.valueMatrix(i , grd_cupload.colRef("healexamflag")) = healexamflag;
- grd_cupload.valueMatrix(i , grd_cupload.colRef("healexamdetlflag")) = healexamdetlflag;
- }
- }
-
- var cmpyrsrv = getGridUpdateData(grd_cupload);
- if(cmpyrsrv != "") {
- model.setValue("/root/send/save/cmpyrsrv" , cmpyrsrv);
- openLoadingBar("일괄 예약/접수");
- submit("TXAHA00301");
- messageBox("정상적으로 저장되었습니다", "I001", "");
- closeLoadingBar();
- }else {
- messageBox("저장할 내역이 " , "E014");
- return;
- }
- }
-
- function fGetContInfoLst(vOpenerID, vFlag , vCond, vCdnm , vDesXPathCd , vDesXPathNm , vDesXPath ){
- clearParameter("SPAHA00310_PARAM1");
- clearParameter("SPAHA00310_PARAM2");
- clearParameter("SPAHA00310_PARAM3");
- clearParameter("SPAHA00310_PARAM4");
- clearParameter("SPAHA00310_PARAM5");
- clearParameter("SPAHA00310_PARAM6");
- clearParameter("SPAHA00310_PARAM7");
- clearParameter("SPAHA00310_PARAM8");
-
- setParameter ("SPAHA00310_PARAM1", vFlag);
- setParameter ("SPAHA00310_PARAM2", vCond);
- setParameter ("SPAHA00310_PARAM3", vCdnm);
- setParameter ("SPAHA00310_PARAM4", getUserInfo("dutplceinstcd"));
- setParameter ("SPAHA00310_PARAM5", vOpenerID);
- setParameter ("SPAHA00310_PARAM6", vDesXPathCd);
- setParameter ("SPAHA00310_PARAM7", vDesXPathNm);
- setParameter ("SPAHA00310_PARAM8", vDesXPath);
- modal("SPAHA003100", "", "", "", "", "/root/source", "/root/target");
- }
-
- /********************************************************************************************************************************************************
- * 해당값을 구분자로 구분하여 배열에 등록한다.
- *vSpiltValue:구분할값 vMode:모드 vDel:구분자
- ********************************************************************************************************************************************************/
- String.prototype.fSplit = function(vMode,vDel) {
- if(vDel == "") vDel = "-";
- var vSplit = this;
- var chk = vSplit.search(eval("/[" + vDel + "]/g"));
- var vDelValue = new Array();
- if(chk > -1) {
- vDelValue = vSplit.split(vDel);
- }else {
- if(vMode == "R") {
- // 주민번호
- vDelValue[0] = vSplit.substr(0,6);
- vDelValue[1] = vSplit.substr(6,7);
- } else if(vMode == "Z") {
- // 우편번호
- vDelValue[0] = vSplit.substr(0,3);
- vDelValue[1] = vSplit.substr(3,3);
- } else if(vMode == "E") {
- //Email
- vDelValue = vSplit.split('@');
- }
- }
- return vDelValue;
- }
-
- /********************************************************************************************************************************************************
- * 주민번호를 이용하여
- *S:성별 A:나이 B:생년월일 F:외국인여부
- ********************************************************************************************************************************************************/
- function fGetRrgstNo(vRstno,vMode) {
- var rstno = vRstno.replace("-","");
- var sex = rstno.substr(6,1);
- var YY = "";
- // 성별
- if(vMode == "S") {
- if(sex == "2" || sex == "4" || sex == "6" || sex == "8") {
- return "F";
- }else if(sex == "1" || sex == "3" || sex == "5" || sex == "7") {
- return "M";
- }
- }else if(vMode == "A") { // 나이
- if(sex == "1" || sex == "2" || sex == "5" || sex == "6") {
- YY = "19"
- }else if(sex == "3" || sex == "4" || sex == "7" || sex == "8") {
- YY = "20"
- }
- var toYear = getNewDate().getFullYear();
- var bornday = YY + rstno.substr(0,2);
-
- return parseInt(toYear) - parseInt(bornday);
- }else if(vMode == "B") {
- if(sex == "1" || sex == "2" || sex == "5" || sex == "6") {
- YY = "19"
- }else if(sex == "3" || sex == "4" || sex == "7" || sex == "8") {
- YY = "20"
- }
- return YY + rstno.substr(0,6);
- }else if(vMode == "F") {
- var forgnerYN = "N";
- if(sex == "5" || sex == "6" || sex == "7" || sex == "8") {
- forgnerYN = "Y";
- }
- return forgnerYN;
- }
- }
- /********************************************************************************************************************************************************
- * 추가검사 선택을 그리드에 등록
- ********************************************************************************************************************************************************/
- function fSetAddTest(vGrd , vNodeSet) {
- if(vGrd == null ) return;
- if(vNodeSet == null ) return;
-
- var nodeList = instance1.selectNodes(vNodeSet);
- var testcdList = vGrd.valueMatrix( vGrd.row , vGrd.colRef("testcd"));
- var testnmList = vGrd.valueMatrix( vGrd.row , vGrd.colRef("testnm"));
-
- model.makeNode("/root/hidden/tmptest/addtest");
-
- for(var i=1; i <= nodeList.length; i++) {
- var testcd = model.getValue(vNodeSet + "[" + i + "]/testcd");
- var testnm = model.getValue(vNodeSet + "[" + i + "]/testnm");
- var groupflag = model.getValue(vNodeSet + "[" + i + "]/grupflag");
-
- // 중복체크 로직
- if(testcdList != "") {
- if ( fCheckDup(testcdList , testcd) ) {
- if( messageBox("중복되는 검사코드[" + testcd + " - " + testnm +"] 를 추가 ", "S001") != 6 ){
- continue ;
- }
- }
- }
-
- // 패키지 내부검사 중복여부 체크
- model.removeNodeset("/root/hidden/send");
- model.makeValue("/root/hidden/send/pkgcd" , testcd);
- model.makeValue("/root/hidden/send/grupflag" , "-");
- model.makeValue("/root/hidden/send/srchpkgcd" , vGrd.valueMatrix( vGrd.row , vGrd.colRef("pkgcd")) );
- model.makeValue("/root/hidden/send/healexamflag" , model.getValue("/root/init/send/healexamflag") );
- model.makeValue("/root/hidden/send/cmpycd" , vGrd.valueMatrix( vGrd.row , vGrd.colRef("cmpycd")) );
- model.makeValue("/root/hidden/send/conseq" , vGrd.valueMatrix( vGrd.row , vGrd.colRef("conseq")) );
- model.makeValue("/root/hidden/send/conhistseq" , vGrd.valueMatrix( vGrd.row , vGrd.colRef("conhistseq")) );
-
- //패키지내 중복 체크*/
- if(submit("TRAHA00013",false)) {
- var dupTestnm = model.getValue("/root/tmp/testcount/testcount/testnm")
-
- if(dupTestnm != "") {
-
- if( messageBox("패키지의 [" + testnm + "]검사와 중복됩니다. 추가 ", "S001") != 6 ){
- continue ;
- }
- }
-
- if(testcdList != "") {
- testcdList += "," + testcd;
- testnmList += "," + testnm ;
- }else {
- testcdList += testcd != "" && nodeList.length>i ? "," + testcd : testcd;
- testnmList += testnm != "" &&nodeList.length>i ? "," + testnm: testnm;
- }
- }
- }
- vGrd.valueMatrix(vGrd.row,vGrd.colRef("testcd")) = testcdList;
- vGrd.valueMatrix(vGrd.row,vGrd.colRef("testnm")) = testnmList;
- }
-
- /********************************************************************************************************************************************************
- * 추가검사 중복선택 체크여부
- ********************************************************************************************************************************************************/
- function fCheckDup(testList , desTestCd) {
- var sTestCd = testList.split(",");
- var chk = false;
-
- for(var j=0; j < sTestCd.length; j++) {
- var srcTestCd = sTestCd[j];
- if(srcTestCd == desTestCd) {
- chk = true;
- }
- }
- return chk;
- }
- /********************************************************************************************************************************************************
- * 데이터 포맷을 체크한다.
- * R : 주민번호 Z: 우편번호 D: 날짜 E: e-mail T: 전화번호 M:핸드폰
- ********************************************************************************************************************************************************/
- function fChkValue(vChkValue,vMode,vDel) {
- var ret = false;
- var regExp = "";
- if(typeof(vDel) == "undefined" || vDel == null) {
- vDel = "";
- }
-
-
- if(vMode == "R1") {
- regExp = "/[0-9]{2}[01]{1}[0-9]{1}[0123]{1}[0-9]{1}$/g";
- }else if(vMode == "R2") {
- regExp = "/[12345678]{1}[0-9]{6}$/g";
- }else if(vMode == "Z1") {
- regExp = "/^[0-9]{3}$/g";
- }else if(vMode == "Z2") {
- regExp = "/^[0-9]{3}$/g";
-
- }else if(vMode == "D") {
- regExp = "/[0-9]{4}" + vDel + "[01]{1}[0-9]{1}" + vDel + "[0123]{1}[0-9]{1}/g";
-
- }else if(vMode == "E") {
- regExp = "/[_0-9a-zA-Z]+([-+.0-9a-zA-Z_]+)*@[_0-9a-zA-Z]+([-+.0-9a-zA-Z_]+)*.[a-zA-Z]{2,4}$/g";
-
- }else if(vMode == "T") {
- regExp = "/(02|0[3-9]{1}[0-9]{1})" + vDel + "[1-9]{1}[0-9]{2,3}" + vDel + "[0-9]{4}$/g";
-
- }else if(vMode == "M") {
- regExp = "/01[016789]" + vDel + "[1-9]{1}[0-9]{2,3}" + vDel + "[0-9]{4}$/g";
-
- }
- if(vChkValue == "") {
- return true;
- }else {
- return ret = eval(regExp).test(vChkValue);
- }
- }
- /********************************************************************************************************************************************************
- * 그리드의 데이터 체크
- ********************************************************************************************************************************************************/
- function fChkData(vGrd) {
- // 초기화
- vGrd.rebuildStyle();
- var nodeSet = vGrd.nodeset;
- var chkCnt = 0;
-
- for( i = 1; i < vGrd.rows-1 ; i++ ){
- //주민번호 check
- var rrgstno1 = model.getValue(nodeSet+"[" + i + "]/rrgstno1");
- if(!fChkValue(rrgstno1,"R1")) {
- fDispGrd(vGrd,"E",i,vGrd.colRef("rrgstno1"));
- chkCnt++;
- }
-
- var rrgstno2 = model.getValue(nodeSet+"[" + i + "]/rrgstno2");
- if(!fChkValue(rrgstno2,"R2")) {
- fDispGrd(vGrd,"E",i,vGrd.colRef("rrgstno2"));
- chkCnt++;
- }
-
- // 우편번호
- var zip1 = model.getValue(nodeSet+"[" + i + "]/zipcd11");
- if(!fChkValue(zip1,"Z1")) {
- fDispGrd(vGrd,"E",i,vGrd.colRef("zipcd11"));
- chkCnt++;
- }
-
- var zip2 = model.getValue(nodeSet+"[" + i + "]/zipcd12");
- if(!fChkValue(zip2,"Z2")) {
- fDispGrd(vGrd,"E",i,vGrd.colRef("zipcd12"));
- chkCnt++;
- }
-
- // 전화번호
- var telno = model.getValue(nodeSet+"[" + i + "]/telno");
- if(!fChkValue(telno,"T","-")) {
- fDispGrd(vGrd,"E",i +1,vGrd.colRef("telno"));
- chkCnt++;
- }
-
- // 핸드폰번호
- var mpno = model.getValue(nodeSet + "[" + i + "]/mpno");
- if(!fChkValue(mpno,"M","-")) {
- fDispGrd(vGrd,"E",i +1,vGrd.colRef("mpno"));
- chkCnt++;
- }
-
- // 예약 체크
- var hopedd = model.getValue(nodeSet + "[" + i + "]/hopedd").replace(/-/g,"");
- if(!fChkValue(hopedd,"D","")) {
- fDispGrd(vGrd,"E",i +1,vGrd.colRef("hopedd"));
- chkCnt++;
- }
-
- //email주소
- var email = model.getValue(nodeSet+ "[" + i + "]/email");
- if(!fChkValue(email,"E")) {
- fDispGrd(vGrd,"E",i + 1,vGrd.colRef("email"));
- chkCnt++;
- }
- }
- vGrd.refresh();
- return chkCnt;
- }
- /********************************************************************************************************************************************************
- * 그리드의 상태 Style을 변경한다.
- * vGrd: 그리드객체 vMode: 모드 vRow: 변경할 row vCol: 변경할 col
- ********************************************************************************************************************************************************/
- function fDispGrd(vGrd,vMode,vRow,vCol) {
- if(vMode == "E") {
- if(vCol !="") {
- vGrd.cellStyle("background-color",vRow,vCol) = "#f7a08b";
- vGrd.isReadOnly(vRow,vCol) = false;
- }else {
- vGrd.cellStyle("background-color",vRow,0,vRow,vGrd.cols - 1) = "#f7a08b";
- //vGrd.isReadOnly(vRow,0,vRow,vGrd.cols - 1) = true;
- }
- }
- }
- /********************************************************************************************************************************************************
- * 주민등록 중복 된 대상자를 조회한다.
- ********************************************************************************************************************************************************/
- function fChkDupRrgstno(vGrd) {
- vGrd.clearStatus();
- for(var i=1; i < vGrd.rows; i++) {
- if(vGrd.valueMatrix(i , vGrd.colRef("chk") )== "Y" ) {
- vGrd.addStatus(i,"insert");
- }
- }
- model.makeValue("/root/send/srch/rrgstno" , getGridUpdateData(vGrd) );
-
- if(submit("TRAHA04091")) {
- var rrgstCnt = getNodesetCount("/root/hidden/duprrgstnolst/item");
- for(var j=1; j < vGrd.rows; j++) {
- var srchrrgstno1 = vGrd.valueMatrix(j ,vGrd.colRef("rrgstno1"));
- var srchrrgstno2 = vGrd.valueMatrix(j ,vGrd.colRef("rrgstno2"));
- for(var k=1; k <= rrgstCnt ; k++) {
- var desrrgstno1 = model.getValue("/root/hidden/duprrgstnolst/item[" + k + "]/rrgstno1");
- var desrrgstno2 = model.getValue("/root/hidden/duprrgstnolst/item[" + k + "]/rrgstno2");
- if(srchrrgstno1 == desrrgstno1 && srchrrgstno2 == desrrgstno2) {
- vGrd.valueMatrix( j , vGrd.colRef("chk") ) = "N";
- vGrd.cellStyle("background-color", j , vGrd.colRef("hngnm")) = "#f7a08b";
- }
- }
- }
- }
-
- return rrgstCnt;
- }
-
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TRAHA00001"/>
- <submission id="TRAHA00301" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TXAHA00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" replace="instance" resultref="/root/hidden"/>
- <submission id="TXAHA00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" replace="instance" resultref="/root/hidden"/>
- <submission id="TRAHA00304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/linklst"/>
- <submission id="TXAHA00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/linklst/cmpy" resultref="/root/hidden"/>
- <submission id="TRAHA00013" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/send" resultref="/root/tmp"/>
- <submission id="TRAHA04091" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" resultref="/root/hidden/duprrgstnolst"/>
- <submission id="TRAHB00602" ref="/root/send" resultref="/root/init/baseinfo/detlcodelst"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1193;2,784;2,756;" style="border-left-style:none; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <script type="javascript" ev:event="onmenu">
- <![CDATA[
- if(event.description == "deladdtest")
- {
- grd_cupload.valueMatrix( grd_cupload.row , grd_cupload.colRef("testcd")) = "";
- grd_cupload.valueMatrix( grd_cupload.row , grd_cupload.colRef("testnm")) = "";
- }
- ]]>
- </script>
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:159px; height:14px; ">단체예약/접수</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <caption id="caption2" class="tit_2" style="left:8px; top:12px; width:151px; height:13px; ">단체 예약/접수</caption>
- <line id="line17" class="line_1" style="x1:4px; y1:29px; x2:1189px; y2:29px; "/>
- <button id="btn_upload" class="btn2_letter5" style="left:966px; top:9px; width:75px; height:19px; ">
- <caption>파일업로드</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- openLoadingBar("파일 업로드");
- fFileUpload();
- closeLoadingBar();
- ]]>
- </script>
- </button>
- <output id="output1" ref="/root/init/send/cmpynm" class="output_fix" style="left:757px; top:34px; width:284px; height:19px; "/>
- <button id="button4" class="icon_search" style="left:736px; top:35px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetPkgCd("SMAHA00300", "C", "N","cd" , ipt_cmpycd2.currentText ,model.getValue("/root/init/send/healexamdetlflag") ,"", "/root/hidden/coninfo","Y","" ,"" );
- model.setValue("/root/init/send/cmpycd" , model.getValue("/root/hidden/coninfo/cmpycd"));
- model.setValue("/root/init/send/cmpynm" , model.getValue("/root/hidden/coninfo/pkgnm"));
- model.setValue("/root/init/send/conseq" , model.getValue("/root/hidden/coninfo/conseq"));
- model.setValue("/root/init/send/conhistseq" , model.getValue("/root/hidden/coninfo/conhistseq"));
- model.setValue("/root/init/send/pkgcd" , model.getValue("/root/hidden/coninfo/pkgcd"));
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption5" class="cell_1" style="left:564px; top:34px; width:85px; height:20px; vertical-align:middle; ">단체계약정보</caption>
- <input id="ipt_cmpycd2" ref="/root/init/send/cmpycd" class="input_essential" style="left:652px; top:34px; width:78px; height:19px; "/>
- <caption id="caption47" class="cell_1" style="left:183px; top:34px; width:73px; height:20px; vertical-align:middle; ">건진장소</caption>
- <button id="button10" class="btn2_letter4" style="left:1124px; top:9px; width:64px; height:19px; ">
- <caption>일괄적용</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for(var i =1; i < grd_cupload.rows; i++) {
- grd_cupload.valueMatrix( i , grd_cupload.colRef("healexamplacecd")) = model.getValue("/root/init/send/healexamplacecd");
- grd_cupload.valueMatrix( i , grd_cupload.colRef("conseq")) = model.getValue("/root/init/send/conseq");
- grd_cupload.valueMatrix( i , grd_cupload.colRef("conhistseq")) = model.getValue("/root/init/send/conhistseq");
- grd_cupload.valueMatrix( i , grd_cupload.colRef("pkgcd")) = model.getValue("/root/init/send/pkgcd");
- grd_cupload.valueMatrix( i , grd_cupload.colRef("healexamflag")) = model.getValue("/root/init/send/healexamflag");
- grd_cupload.valueMatrix( i , grd_cupload.colRef("healexamdetlflag")) = model.getValue("/root/init/send/healexamdetlflag");
- //선택검사와 업체코드를 따로 적용시킴
- var vchoiflag = model.getValue("/root/init/send/choiflag");
- var vcmpycd = model.getValue("/root/init/send/cmpycd");
-
- if(vchoiflag == "" && vcmpycd == ""){
- return;
- }
- else if (vchoiflag == "" && vcmpycd != ""){
- grd_cupload.valueMatrix( i , grd_cupload.colRef("cmpycd")) = model.getValue("/root/init/send/cmpycd");
- }
- else if (vchoiflag != "" && vcmpycd == ""){
- grd_cupload.valueMatrix( i , grd_cupload.colRef("choiflag")) = model.getValue("/root/init/send/choiflag");
- }
- else if (vchoiflag != "" && vcmpycd != ""){
- grd_cupload.valueMatrix( i , grd_cupload.colRef("choiflag")) = model.getValue("/root/init/send/choiflag");
- grd_cupload.valueMatrix( i , grd_cupload.colRef("cmpycd")) = model.getValue("/root/init/send/cmpycd");
- }
- }
- ]]>
- </script>
- </button>
- <caption id="caption3" class="cell_1" style="left:4px; top:34px; width:64px; height:20px; vertical-align:middle; ">건진구분</caption>
- <select1 id="cmb_healexamdetlflag" ref="/root/init/send/healexamdetlflag" class="combo_search" disabled="true" appearance="minimal" style="left:70px; top:34px; width:110px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/baseinfo/hedetlflaglst/item">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="rdo_healexamplace" ref="/root/init/send/healexamplacecd" overflow="visible" appearance="full" cols="2" rows="1" style="left:258px; top:34px; width:108px; height:20px; border-style:none; ">
- <choices>
- <itemset nodeset="/root/init/baseinfo/healexamplacelst/S600">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_chkdata" class="btn2_letter5" style="left:1045px; top:9px; width:75px; height:19px; ">
- <caption>데이터확인</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var chkCnt = 0;
- grd_cupload.isReadOnly(1 , grd_cupload.colRef("pname") , grd_cupload.rows -1 , grd_cupload.cols - 1) = true;
- chkCnt = fChkData(grd_cupload);
- dupRrgstCnt = fChkDupRrgstno(grd_cupload);
- messageBox("데이터 확인이 처리되었습니다.\n주민번호 중복[" + dupRrgstCnt + "]건과 \n" + "["+ chkCnt +"]건의 오류항목이 ","E005");
- ]]>
- </script>
- </button>
- <datagrid id="grd_cupload" nodeset="/root/main/uploadlst/item" allowselection="true" autoresize="true" caption="선택^성명^주민번호^주민번호^건진일^이메일주소^전화번호^핸드폰^우편번호^우편번호^주 소^추가검사^건진장소^선택검사^단체코드^비고^직위^관계자이름^관계자주민등록번호^관계자주민등록번호^관계^부서^소속^사번^추가검사명^sex^brthdd^age^forgneryn^emailid^emailtype^statflag^healexamflag^healexamdetlflag^conseq^conhistseq^pkgcd" colsep="^" colwidth="50, 80, 70, 70, 90, 150, 110, 110, 35, 35, 250, 200, 80, 100, 100, 180, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="listbox" subtotalposition="below" style="left:4px; top:59px; width:1185px; height:679px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="hngnm" style="left:94px; top:43px; width:61px; height:23px; "/>
- <col disabled="true" ref="rrgstno1" type="input" style="left:118px; top:23px; width:114px; height:23px; "/>
- <col disabled="true" ref="rrgstno2" type="input"/>
- <col ref="hopedd" type="inputdate" format="yyyy-mm-dd"/>
- <col disabled="true" ref="email" type="input"/>
- <col disabled="true" ref="telno" type="input"/>
- <col disabled="true" ref="mpphon" type="input"/>
- <col disabled="true" ref="zipcd11" type="input"/>
- <col disabled="true" ref="zipcd12" type="input"/>
- <col disabled="true" ref="detladdr1" style="left:1001px; top:43px; width:250px; height:23px; "/>
- <col ref="testcd" type="inputbutton"/>
- <col ref="healexamplacecd" type="combo">
- <choices>
- <itemset nodeset="/root/init/baseinfo/healexamplacelst/S600">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="choiflag" type="combo">
- <choices>
- <itemset nodeset="/root/init/baseinfo/choiflaglst/A0116">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="cmpycd" visibility="visible"/>
- <col ref="remcnts" type="input"/>
- <col ref="clntpos" type="input"/>
- <col ref="fmhngnm" type="input"/>
- <col ref="fmrgstno1" type="input"/>
- <col ref="fmrgstno2" type="input"/>
- <col ref="fmrelacd" type="combo">
- <choices>
- <itemset nodeset="/root/init/baseinfo/detlcodelst/item">
- <label ref="etcdetlnm"/>
- <value ref="etcdetlcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="clntdeptnm" type="input"/>
- <col ref="clntcmpynm" type="input"/>
- <col ref="clntempid" type="input"/>
- <col ref="testnm" visibility="hidden"/>
- <col ref="sex" visibility="hidden"/>
- <col ref="brthdd" visibility="hidden"/>
- <col ref="age" visibility="hidden"/>
- <col ref="forgneryn" visibility="hidden"/>
- <col ref="emailid" visibility="hidden"/>
- <col ref="emailtype" visibility="hidden"/>
- <col ref="statflag" visibility="hidden"/>
- <col ref="healexamflag" visibility="hidden"/>
- <col ref="healexamdetlflag" visibility="hidden"/>
- <col ref="conseq" visibility="hidden"/>
- <col ref="conhistseq" visibility="hidden"/>
- <col ref="pkgcd" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //fSetBatApp(grd_cupload);
- ]]>
- </script>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var col = grd_cupload.col;
- var row = grd_cupload.row;
-
- // 패키지검사
- if(col == grd_cupload.colRef("pkgcd")) {
- if(model.getValue("/root/send/srchhealexamdetlflag") == "" ) {
- messageBox("건진구분 정보를", "C001");
- return;
- }
-
- model.resetInstanceNode("/root/hidden/pkglst/list");
-
- var rgstno = grd_cupload.valueMatrix(row, grd_cupload.colRef("rrgstno1")) + grd_cupload.valueMatrix(row, grd_cupload.colRef("rrgstno2")); // 주민번호
-
- fGetPkgCd("SMAHA00300", "P", "Y","nm" , "",model.getValue("/root/send/srchhealexamdetlflag") , fGetRrgstNo(rgstno,"S"), "/root/hidden/pkglst","Y","" ,fGetRrgstNo(rgstno,"A") );
-
- if(model.getValue("/root/temp/okflag") == "ok") {
- fSetPkg(grd_cupload , "/root/hidden/pkglst/list");
- //fSetAddTest(grd_cupload);
- }
- //fSetBatApp(grd_cupload);
- }else if( col == grd_cupload.colRef("testcd")) {
-
- model.resetInstanceNode("/root/hidden/testlst/list");
-
- var rgstno = grd_cupload.valueMatrix(row, grd_cupload.colRef("rrgstno1")) + grd_cupload.valueMatrix(row, grd_cupload.colRef("rrgstno2")); // 주민번호
-
- fGetPkgCd("SMAHA00300", "A", "Y","nm" , "",model.getValue("/root/send/srchhealexamdetlflag") , fGetRrgstNo(rgstno,"S"), "/root/hidden/testlst","Y","" ,fGetRrgstNo(rgstno,"A") );
-
- if(model.getValue("/root/temp/okflag") == "ok") {
- fSetAddTest(grd_cupload , "/root/hidden/testlst/list");
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onmousedown">
- <![CDATA[
- if(event.button == 3){
- if(grd_cupload.isCell(event.target) && grd_cupload.mouseRow >= grd_cupload.fixedrows){
- window.setPopupMenu(true, "/root/popup/item", "label", "func", true);
- }else{
- window.setPopupMenu(false);
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_cupload.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_cupload.col == 5){
- //alert(grd_cupload.valueMatrix(grd_cupload.row, grd_cupload.col));
- }
- ]]>
- </script>
- </datagrid>
- <line id="line1" class="line_1" style="x1:4px; y1:55px; x2:1189px; y2:55px; "/>
- <output id="output2" ref="/root/init/send/pkgcd" class="output_fix" style="left:1046px; top:34px; width:90px; height:19px; "/>
- <caption id="caption1" class="cell_1" style="left:368px; top:34px; width:73px; height:20px; vertical-align:middle; ">선택검사</caption>
- <select1 id="combo1" ref="/root/init/send/choiflag" appearance="minimal" style="left:445px; top:34px; width:115px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/baseinfo/choiflaglst/A0116">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_excelsave" class="btn6_letter4" visibility="hidden" style="left:865px; top:4px; width:80px; height:22px; ">
- <caption>액셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- grd_cupload.saveExcel(fileName, "SheetName", true, true, "", "", false);
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" style="left:0px; top:756px; width:1195px; height:28px; ">
- <button id="button8" class="btn4_letter4" style="left:1110px; top:6px; width:80px; height:22px; ">
- <caption>예약처리</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveCmpyRsrvAcpt();
- ]]>
- </script>
- </button>
- <button id="button33" class="btn4_letter3" style="left:1040px; top:6px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.reset();
- ]]>
- </script>
- </button>
- <button id="button27" class="btn3_letter6" visibility="hidden" style="left:0px; top:5px; width:104px; height:22px; ">
- <caption>개인예약/접수</caption>
- </button>
- <button id="button25" class="btn3_letter4" visibility="hidden" style="left:106px; top:5px; width:80px; height:22px; ">
- <caption>정산관리</caption>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|