SPRIS00210.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. *
  3. * @param :
  4. * @return :
  5. * @author : 이윤주
  6. * @---------------------------------------------------
  7. */
  8. function fIni(){
  9. var projcd = opener.window.javascript.getParameter("SPRIS00210_projcd");
  10. model.setValue("/root/init/projcd",projcd);
  11. fSearch();
  12. model.refresh();
  13. }
  14. function fSearch() {
  15. model.makeValue("/root/send/reqdata/projcd",model.getValue("/root/init/projcd"));
  16. submit("TRRIS00103");
  17. }
  18. function fAddRow() {
  19. //행추가, 데이터 복사
  20. datagrid1.addRow();
  21. datagrid1.valueMatrix( datagrid1.row, datagrid1.colRef("projcd")) = model.getValue("/root/init/projcd");
  22. }
  23. function fDelRow() {
  24. var delrow = datagrid1.row;
  25. var fstrgstrid = model.getValue("/root/result/cnrtlist[" + delrow + "]/fstrgstrid");
  26. if (fstrgstrid == "")
  27. {
  28. datagrid1.deleteRow(delrow);
  29. }
  30. else
  31. {
  32. datagrid1.addStatus(delrow, "delete");
  33. }
  34. }
  35. function fSave() {
  36. for (i=1; i<datagrid1.rows ; i++)
  37. {
  38. if (datagrid1.rowStatus(i)== 0) {
  39. datagrid1.addStatus(i, "insert");
  40. }
  41. }
  42. //마스터
  43. model.makeValue("/root/send/reqdata/projcd",model.getValue("/root/init/projcd"));
  44. //계약이력
  45. model.makeValue("/root/send/reqdata/cntrlist", datagrid1.getUpdateData());
  46. submit("TXRIS00210");
  47. var cntrcnt = model.getValue("/root/hidden/cntrcnt/cnt");
  48. fSearch();
  49. }