| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- /* ---------------------------------------------------------------------
- *
- * SMRSG06000_(재고자산)BarCode출력.xrw
- *
- * - Version :
- * 1) : Ver.1.00.01
- * : Create By
- * : 2009.08.02
- ---------------------------------------------------------------------- */
- function fInitialize()
- {
- misfGridInit(grd_cpstokasetcnfmlist); // 재고자산 (바코드)List
- misfComboComCdListMulti("R0069,R0111,Z0007","cmb_stocmngtflag,cmb_purcflag,cmb_instcd");
- model.setValue(ipt_execyymm.attribute("ref") , getCurrentDate());
- model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
- fSetPrintUseCheck();
- rszfLMSComboList(model.getValue(cmb_goodflag.attribute("ref")), "", "", "cmb_lrgcd", "", "L", "", "Y");
- addComboItem( "cmb_lrgcd" , "전체", "", "above");
- addComboItem( "cmb_stocmngtflag" , "전체", "", "above");
- addComboItem( "cmb_purcflag" , "전체", "", "above");
- model.removeNodeset("/root/main/list/stokasetcnfminfo");
- model.makeValue("/root/send/scrnid", getScreenID());
- submit("TRRPZ00701");
- //misfMakeBrcdPrntObjHanDo("CommAX");
- model.refresh();
-
- }
- function fSetPrintUseCheck(){
- var instcd = model.getValue(cmb_instcd.attribute("ref")).getTrim();
- if (instcd == "014"){
- btn_prntset.visible = "false";
- }else{
- btn_prntset.visible = "true";
- }
- model.refresh();
- }
- function fStokAsetLabel_DrvType() {
- misfGridInit(grd_cpstokasetcnfmlist); // 재고자산 (바코드)List
- var instcd = model.getValue(cmb_instcd.attribute("ref"));
- if (instcd == '014'){
- var node = instance1.selectSingleNode("/root/main/list/stokasetcnfminfo/stokasetcnfmlist[chk='Y']");
-
- if (node == null){
-
- messageBox("선택할 데이터가","I004");
- return false;
-
- }
-
- for (var i = grd_stokasetcnfmlist.fixedRows;i<grd_stokasetcnfmlist.rows;i++){
- var chk = grd_stokasetcnfmlist.valueMatrix(i, grd_stokasetcnfmlist.colRef("chk")).getTrim();
-
- if (chk == "Y"){
-
- var goodcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodcd" )).getTrim();
- var allsizespecid = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecid" )).getTrim();
- var goodnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodnm" )).getTrim();
- var allsizespecidnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecidnm")).getTrim();
- var goodmodel = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodmodel" )).getTrim();
- var prodcmpynm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("prodcmpynm" )).getTrim();
- var subcustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("subcustnm" )).getTrim();
-
- var goodflag = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodflag" )).getTrim();
- var instcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("instcd" )).getTrim();
- var maincustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("maincustnm" )).getTrim();
- var goodcd2;
-
- if (allsizespecid == "-"){
- goodcd2 = goodcd;
- }else{
- goodcd2 = goodcd + " - " + allsizespecid;
- }
-
- grd_cpstokasetcnfmlist.addRow();
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("goodnm" )) = goodnm; // 물품명
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("allsizespecidnm" )) = allsizespecidnm; // 규격
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("goodmodel" )) = goodmodel; // 모델
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("prodcmpynm" )) = prodcmpynm; // 제조원
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("subcustnm" )) = subcustnm; // 거래처
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("goodcd2" )) = goodcd2; // 물품코드
- grd_cpstokasetcnfmlist.valueMatrix(grd_cpstokasetcnfmlist.row, grd_cpstokasetcnfmlist.colRef("barcode" )) = goodcd + allsizespecid; // 바코드
-
- }
- }
- exeReportPreview("RPRSG06000","XMLSTR");
-
- }else{
-
-
- }
- }
- function fStokAsetLabel_CmdType(){
- misfMakeBrcdPrntObjHanDo("CommAX");
-
- var ref = "/root/main/list/stokasetcnfminfo/stokasetcnfmlist/"
- var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
- var sPrntKind = model.getValue(barcdRef + "[1]/prntkind");
- var portOpenCheck = "";
- var LCount = 0;
- var iXPos = 0;
- var iYPos = 0;
- var sSndMsg = "";
-
- if (sPrntKind == 0) return;
-
- var sCommKind = model.getValue(barcdRef + "[1]/commkind");
- var sLeftBank = model.getValue(barcdRef + "[1]/blank/left");
- var sTopBank = model.getValue(barcdRef + "[1]/blank/top");
- for (var i=grd_stokasetcnfmlist.fixedRows; i<= grd_stokasetcnfmlist.rows; i++){
- var chk = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("chk" )).getTrim();
- if (chk == "Y"){
- var goodcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodcd" )).getTrim();
- var allsizespecid = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecid" )).getTrim();
- var goodnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodnm" )).getTrim();
- var allsizespecidnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("allsizespecidnm")).getTrim();
- var goodmodel = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodmodel" )).getTrim();
- var prodcmpynm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("prodcmpynm" )).getTrim();
- var subcustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("subcustnm" )).getTrim();
-
- var goodflag = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("goodflag" )).getTrim();
- var instcd = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("instcd" )).getTrim();
- var maincustnm = grd_stokasetcnfmlist.valueMatrix(i , grd_stokasetcnfmlist.colRef("maincustnm" )).getTrim();
- var goodcd2;
- if (allsizespecid == "-"){
- goodcd2 = goodcd;
- }else{
- goodcd2 = goodcd + " - " + allsizespecid;
- }
-
- if (sLeftBank == "" || sLeftBank == "-") sLeftBank = 0;
- if (sTopBank == "" || sTopBank == "-") sTopBank = 0;
-
- sSndMsg = "AA108500500"; // 시작위치 셋팅
-
- iXPos = Number(sLeftBank);
- iYPos = Number(sTopBank);
-
- // SATO CL408e
-
- iYPos = Number(sTopBank) + 90;
- sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "물품명 : " + goodnm);
-
- iYPos = Number(sTopBank) + 120;
- sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "규격 : " + allsizespecidnm);
-
- iYPos = Number(sTopBank) + 150;
- sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "모델 : " + goodmodel);
-
- iYPos = Number(sTopBank) + 180;
- sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "제조원 : " + prodcmpynm);
-
- iYPos = Number(sTopBank) + 210;
- sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "거래처 : " + subcustnm);
-
- iYPos = Number(sTopBank) + 270;
- sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, "물품코드 : " + goodcd2);
- //iXPos = Number(sLeftBank) + 20;
- iYPos = Number(sTopBank) + 310;
- //sSndMsg += "V" + iYPos + "H" + iXPos + "BG02100" + goodcd + allsizespecid; // 바코드
- sSndMsg += "V" + iYPos + "H" + iXPos + "BG02090" + goodcd + allsizespecid; // 바코드
- sSndMsg += "Q" + "1" + "Z";
-
- CommAX.SendMsg(sSndMsg);
- }
-
-
- }
-
- }
- //SATO CL408e
- ////////////////////////////////////////// 별첨부 사토 프린터 명령어
- /*사토 프린터 명령어
- 1. A : 출력물 시작
- 2. A1aaaabbbb : 출력 용지 규격
- aaaa : 세로 크기(최대 2848)
- bbbb : 가로 크기(최대 832)
- - CT400의 경우 가운데 정렬
- CL408e의 경우 우측(출력물기준 좌측) 정렬
- 3. Qx : 출력물 출력수량
- x 범위 - 1-999999
- 4. Z : 출력물 종료
- 5. Vaaaa : Y좌표 시작점
- 6. Haaaa : X좌표 시작점
- 7. Laabb : 배율
- aa : 가로배율
- bb : 세로배율
- 8 %a : 회전
- a : 0 - 회전안함
- 1 - 90도
- 2 - 180도
- 3 - 270도
- 9. U, S, M : 문자열 출력(영문)
- U에서 M 순으로 폰트가 커짐
- ex)
- A
- A103500500
- V200H300L0202%2MHello world!!!
- Q10
- Z
- 700 x 400 용지를 설정하고 그 곳의
- 300, 200 위치에
- 2배 확대된
- "Hello world!!!"를 뒤집어서
- 10장을 반복해 찍는다*/
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|