123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- /**
- * @desc : 임산부보고서 화면 초기화
- * @
- * @param :
- * @return :
- * @author : 엄영만
- * @---------------------------------------------------
- */
- function fInitialize(){
- model.removeNodeset("/root/main/preglist");
-
- //조회날짜 받아옴
- var fromdd = ((getCurrentDate().toDate()).getAddDate(-30)).getDateFormat();
- var todd = getCurrentDate();
-
- //지난달을 보여줌
- model.makeValue("/root/main/cond/fromdd",fromdd);
- model.makeValue("/root/main/cond/todd",todd);
- fSearch();
- }
- /**
- * @desc : 임산부보고서 조회
- * @
- * @param :
- * @return :
- * @author : 엄영만
- * @---------------------------------------------------
- */
- function fSearch() {
- model.removeNodeset("/root/main/preglist");
- // 조회 조건을 셋팅 한다.
- var fromdd = model.getValue("/root/main/cond/fromdd");
- var todd = model.getValue("/root/main/cond/todd");
-
- model.setValue("/root/send/fromdd", fromdd);
- model.setValue("/root/send/todd", todd);
-
- submit("TRMNO04501");
- model.refresh();
- }
- /**
- * @desc : 임산부보고서 생성
- * @
- * @param :
- * @return :
- * @author : 엄영만
- * @---------------------------------------------------
- */
- function fCreate() {
- model.removeNodeset("/root/main/preglist");
- // 조회 조건을 셋팅 한다.
- var fromdd = model.getValue("/root/main/cond/fromdd");
- var todd = model.getValue("/root/main/cond/todd");
-
- model.setValue("/root/send/fromdd", fromdd);
- model.setValue("/root/send/todd", todd);
-
- submit("TRMNO04502");
-
- for(var i = grd_preg.fixedRows; i < grd_preg.rows; i++) {
- grd_preg.rowStatus(i) = 1;
- }
- model.refresh();
- }
- /**
- * @desc : 임산부보고서 저장
- * @
- * @param :
- * @return :
- * @author : 엄영만
- * @---------------------------------------------------
- */
- function fSave() {
- for(var iRow = grd_preg.fixedrows; iRow <= grd_preg.rows - grd_preg.fixedrows; iRow++){
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/indd") == ""){
- messageBox("진료일자를","C001");
- return;
- }
- else{
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/indd").length != 8){
- messageBox("8자리 진료일자를","C001");
- return;
- }
- }
-
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/pid") == ""){
- messageBox("환자번호를","C001");
- return;
- }
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/pname") == ""){
- messageBox("임산부명를","C001");
- return;
- }
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/rrgstno") == ""){
- messageBox("주민번호를","C001");
- return;
- }
- else{
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/rrgstno").length != 13){
- messageBox("13자리 주민번호를","C001");
- return;
- }
- }
-
- if(model.getValue("/root/main/preginfo/preglist["+iRow+"]/zipcd") != "" &&
- model.getValue("/root/main/preginfo/preglist["+iRow+"]/zipcd").length != 6){
- messageBox("6자리 우편번호를","C001");
- return;
- }
- }
- var updateData = grd_preg.getUpdateData();
- if(getArrayData(updateData,1,0) == ""){
- messageBox("저장할 데이터를 입력하지 ","E007");
- return;
- }
-
- if(messageBox("저장 " , "S001") == '6'){
- model.makeValue("/root/send/preglist",updateData);
- if(submit("TXMNO04501")){
- fSearch();
- }
- }
- }
|