SMMNA01030.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /***********************************************************************************************************************************************
  2. * create date : 2008.02.12
  3. * author : dhkim
  4. * file name : SMMNA01030.js
  5. * desc : 문진 부적격 기록대장
  6. ***********************************************************************************************************************************************/
  7. var xDnorPath = '/root/main/dnorinfo';
  8. var xCondPath = '/root/cond';
  9. var xReqPath = '/root/send/reqdata';
  10. var currentDate = getCurrentDate();
  11. /*
  12. * 초기화
  13. */
  14. function fInit(){
  15. model.removeNodeset(xDnorPath);
  16. model.setValue(xCondPath + '/fromdd', currentDate);
  17. var getlastDate = currentDate.substring(0, 6) + getLastDay(currentDate.substring(0, 4), currentDate.substring(4, 6));
  18. model.setValue(xCondPath + '/todd', getlastDate);
  19. grd_dnorlist.extendLastCol = true;
  20. fSearch();
  21. }
  22. /*
  23. * 문진부적격 리스트를 조회한다.
  24. */
  25. function fSearch(){
  26. var fromdd = model.getValue(xCondPath+'/fromdd');
  27. var todd = model.getValue(xCondPath+'/todd');
  28. if(fromdd == '')
  29. fromdd = currentDate;
  30. if(todd == '')
  31. todd = currentDate;
  32. model.removeNodeset(xDnorPath + "/dnorlist");
  33. model.removeNodeset(xReqPath);
  34. model.makeValue(xReqPath + '/fromdd', fromdd);
  35. model.makeValue(xReqPath + '/todd', todd);
  36. if(!submit('TRMNA01031')){
  37. messageBox('조회를', 'E009');
  38. }
  39. }
  40. /*
  41. * 엑셀출력
  42. */
  43. function fExcel(){
  44. var pGrd = grd_dnorlist;
  45. if (pGrd.rows > pGrd.fixedrows ) {
  46. var fileName = window.fileDialog("save", ",", false, "문진부적격기록_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  47. if (fileName != "") {
  48. pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false);
  49. messageBox("엑셀저장이 ", "I002", ""); //I002 : 완료되었습니다.
  50. }
  51. } else {
  52. messageBox("자료가 존재하지 않습니다.", "E999", "");
  53. }
  54. }