SMRSG06000.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /* ---------------------------------------------------------------------
  2. *
  3. * SMRSG06000_(재고자산)BarCode출력.xrw
  4. *
  5. * - Version :
  6. * 1) : Ver.1.00.01
  7. * : Create By
  8. * : 2009.08.02
  9. ---------------------------------------------------------------------- */
  10. function fInitialize()
  11. {
  12. misfGridInit(grd_cpstokasetcnfmlist); // 재고자산 (바코드)List
  13. misfComboComCdListMulti("R0069,R0111,Z0007","cmb_stocmngtflag,cmb_purcflag,cmb_instcd");
  14. model.setValue(ipt_execyymm.attribute("ref") , getCurrentDate());
  15. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
  16. fSetPrintUseCheck();
  17. rszfLMSComboList(model.getValue(cmb_goodflag.attribute("ref")), "", "", "cmb_lrgcd", "", "L", "", "Y");
  18. addComboItem( "cmb_lrgcd" , "전체", "", "above");
  19. addComboItem( "cmb_stocmngtflag" , "전체", "", "above");
  20. addComboItem( "cmb_purcflag" , "전체", "", "above");
  21. model.removeNodeset("/root/main/list/stokasetcnfminfo");
  22. model.makeValue("/root/send/scrnid", getScreenID());
  23. submit("TRRPZ00701");
  24. //misfMakeBrcdPrntObjHanDo("CommAX");
  25. model.refresh();
  26. }
  27. function fSetPrintUseCheck(){
  28. var instcd = model.getValue(cmb_instcd.attribute("ref")).getTrim();
  29. if (instcd == "014"){
  30. btn_prntset.visible = "false";
  31. }else{
  32. btn_prntset.visible = "true";
  33. }
  34. model.refresh();
  35. }
  36. function fStokAsetLabel_DrvType() {
  37. misfGridInit(grd_cpstokasetcnfmlist); // 재고자산 (바코드)List
  38. var instcd = model.getValue(cmb_instcd.attribute("ref"));
  39. if (instcd == '014'){
  40. var node = instance1.selectSingleNode("/root/main/list/stokasetcnfminfo/stokasetcnfmlist[chk='Y']");
  41. if (node == null){
  42. messageBox("선택할 데이터가","I004");
  43. return false;
  44. }
  45. for (var i = grd_stokasetcnfmlist.fixedRows;i<grd_stokasetcnfmlist.rows;i++){
  46. var chk = grd_stokasetcnfmlist.valueMatrix(i, grd_stokasetcnfmlist.colRef("chk")).getTrim();
  47. if (chk == "Y"){
  48. var goodcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodcd" )).getTrim();
  49. var allsizespecid = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecid" )).getTrim();
  50. var goodnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodnm" )).getTrim();
  51. var allsizespecidnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecidnm")).getTrim();
  52. var goodmodel = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodmodel" )).getTrim();
  53. var prodcmpynm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("prodcmpynm" )).getTrim();
  54. var subcustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("subcustnm" )).getTrim();
  55. var goodflag = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodflag" )).getTrim();
  56. var instcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("instcd" )).getTrim();
  57. var maincustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("maincustnm" )).getTrim();
  58. var goodcd2;
  59. if (allsizespecid == "-"){
  60. goodcd2 = goodcd;
  61. }else{
  62. goodcd2 = goodcd + " - " + allsizespecid;
  63. }
  64. grd_cpstokasetcnfmlist.addRow();
  65. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("goodnm" )) = goodnm; // 물품명
  66. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("allsizespecidnm" )) = allsizespecidnm; // 규격
  67. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("goodmodel" )) = goodmodel; // 모델
  68. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("prodcmpynm" )) = prodcmpynm; // 제조원
  69. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("subcustnm" )) = subcustnm; // 거래처
  70. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("goodcd2" )) = goodcd2; // 물품코드
  71. grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("barcode" )) = goodcd + allsizespecid; // 바코드
  72. }
  73. }
  74. exeReportPreview("RPRSG06000","XMLSTR");
  75. }else{
  76. }
  77. }
  78. function fStokAsetLabel_CmdType(){
  79. misfMakeBrcdPrntObjHanDo("CommAX");
  80. var ref = "/root/main/list/stokasetcnfminfo/stokasetcnfmlist/"
  81. var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
  82. var sPrntKind = model.getValue(barcdRef + "[1]/prntkind");
  83. var portOpenCheck = "";
  84. var LCount = 0;
  85. var iXPos = 0;
  86. var iYPos = 0;
  87. var sSndMsg = "";
  88. if (sPrntKind == 0) return;
  89. var sCommKind = model.getValue(barcdRef + "[1]/commkind");
  90. var sLeftBank = model.getValue(barcdRef + "[1]/blank/left");
  91. var sTopBank = model.getValue(barcdRef + "[1]/blank/top");
  92. for (var i=grd_stokasetcnfmlist.fixedRows; i<= grd_stokasetcnfmlist.rows; i++){
  93. var chk = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("chk" )).getTrim();
  94. if (chk == "Y"){
  95. var goodcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodcd" )).getTrim();
  96. var allsizespecid = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecid" )).getTrim();
  97. var goodnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodnm" )).getTrim();
  98. var allsizespecidnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecidnm")).getTrim();
  99. var goodmodel = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodmodel" )).getTrim();
  100. var prodcmpynm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("prodcmpynm" )).getTrim();
  101. var subcustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("subcustnm" )).getTrim();
  102. var goodflag = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodflag" )).getTrim();
  103. var instcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("instcd" )).getTrim();
  104. var maincustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("maincustnm" )).getTrim();
  105. var goodcd2;
  106. if (allsizespecid == "-"){
  107. goodcd2 = goodcd;
  108. }else{
  109. goodcd2 = goodcd + " - " + allsizespecid;
  110. }
  111. if (sLeftBank == "" || sLeftBank == "-") sLeftBank = 0;
  112. if (sTopBank == "" || sTopBank == "-") sTopBank = 0;
  113. sSndMsg = "AA108500500"; // 시작위치 셋팅
  114. iXPos = Number(sLeftBank);
  115. iYPos = Number(sTopBank);
  116. // SATO CL408e
  117. iYPos = Number(sTopBank) + 90;
  118. sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "물품명 : " + goodnm);
  119. iYPos = Number(sTopBank) + 120;
  120. sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "규격 : " + allsizespecidnm);
  121. iYPos = Number(sTopBank) + 150;
  122. sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "모델 : " + goodmodel);
  123. iYPos = Number(sTopBank) + 180;
  124. sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "제조원 : " + prodcmpynm);
  125. iYPos = Number(sTopBank) + 210;
  126. sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "거래처 : " + subcustnm);
  127. iYPos = Number(sTopBank) + 270;
  128. sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "물품코드 : " + goodcd2);
  129. //iXPos = Number(sLeftBank) + 20;
  130. iYPos = Number(sTopBank) + 310;
  131. //sSndMsg += "V" + iYPos + "H" + iXPos + "BG02100" + goodcd + allsizespecid; // 바코드
  132. sSndMsg += "V" + iYPos + "H" + iXPos + "BG02090" + goodcd + allsizespecid; // 바코드
  133. sSndMsg += "Q" + "1" + "Z";
  134. CommAX.SendMsg(sSndMsg);
  135. }
  136. }
  137. }
  138. //SATO CL408e
  139. ////////////////////////////////////////// 별첨부 사토 프린터 명령어
  140. /*사토 프린터 명령어
  141. 1. A : 출력물 시작
  142. 2. A1aaaabbbb : 출력 용지 규격
  143. aaaa : 세로 크기(최대 2848)
  144. bbbb : 가로 크기(최대 832)
  145. - CT400의 경우 가운데 정렬
  146. CL408e의 경우 우측(출력물기준 좌측) 정렬
  147. 3. Qx : 출력물 출력수량
  148. x 범위 - 1-999999
  149. 4. Z : 출력물 종료
  150. 5. Vaaaa : Y좌표 시작점
  151. 6. Haaaa : X좌표 시작점
  152. 7. Laabb : 배율
  153. aa : 가로배율
  154. bb : 세로배율
  155. 8 %a : 회전
  156. a : 0 - 회전안함
  157. 1 - 90도
  158. 2 - 180도
  159. 3 - 270도
  160. 9. U, S, M : 문자열 출력(영문)
  161. U에서 M 순으로 폰트가 커짐
  162. ex)
  163. A
  164. A103500500
  165. V200H300L0202%2MHello world!!!
  166. Q10
  167. Z
  168. 700 x 400 용지를 설정하고 그 곳의
  169. 300, 200 위치에
  170. 2배 확대된
  171. "Hello world!!!"를 뒤집어서
  172. 10장을 반복해 찍는다*/
  173. /* ------------------------------------------------- */
  174. /* ------End Of List ------------------------------- */
  175. /* -------------------------------------------------- */