Browse Source

增加打印条形码按钮

liyr 1 năm trước cách đây
mục cha
commit
058cc98063

+ 7 - 0
mmpac/mmpac/src/client/nc/ui/hr/frame/button/AbstractBtnReg.java

@@ -81,6 +81,7 @@ public abstract class AbstractBtnReg
   public static final int USERBTN_PUSHPARYBILL = 75;
   public static final int USERBTN_PUSHTRANSTOR = 76;
   public static final int USERBTN_PUSHTOCG = 77;
+  public static final int USERBTN_PRINTBARCODE = 78;
   public static final int USERBTN_PURCHASEREQUISITION = 43;
   protected AbstractBtnReg()
   {
@@ -166,6 +167,7 @@ public abstract class AbstractBtnReg
     getAllBtnID().add(Integer.valueOf(75));
     getAllBtnID().add(Integer.valueOf(76));
     getAllBtnID().add(Integer.valueOf(77));
+    getAllBtnID().add(Integer.valueOf(78));
     getAllBtnID().add(Integer.valueOf(43));
   }
 
@@ -596,6 +598,11 @@ public abstract class AbstractBtnReg
         btnVO.setHintStr("更新采购需求");
         btnVO.setBtnCode("更新采购需求");
         break;
+    case 78:
+        btnVO.setBtnName("打印条形码");
+        btnVO.setHintStr("打印条形码");
+        btnVO.setBtnCode("打印条形码");
+        break;
         
     case 43:
     	btnVO.setBtnName("请购单");

+ 38 - 0
mmpac/mmpac/src/client/u8c/ui/mmpac/action/PrintBarcodeAction.java

@@ -0,0 +1,38 @@
+package u8c.ui.mmpac.action;
+
+import java.awt.Desktop;
+import java.net.URI;
+
+import nc.ui.hr.frame.FrameUI;
+import nc.ui.hr.frame.action.AbstractAction;
+import nc.ui.hr.frame.impl.MainBillMgrPanel;
+import nc.ui.pub.beans.MessageDialog;
+import nc.vo.hr.tools.pub.HRAggVO;
+import u8c.ui.mmpac.panel.OrderTestUI;
+import u8c.vo.OrderMainVO;
+
+public class PrintBarcodeAction extends AbstractAction {
+	OrderTestUI frameUI = null;
+	public PrintBarcodeAction(FrameUI frameUI) {
+		super(frameUI);
+		this.frameUI = (OrderTestUI) frameUI;
+	}
+
+	@Override
+	public void execute() throws Exception {
+		MainBillMgrPanel mainMgrPanel = (MainBillMgrPanel) getMainPanel();
+		HRAggVO [] s = (HRAggVO[]) mainMgrPanel.getMainBillListPanel().getDeleteData();
+		if(s != null) {
+			for (int i = 0; i < s.length; i++) {
+				OrderMainVO headvo = (OrderMainVO) s[i].getParentVO();
+				String vbillno = headvo.getVbillno();
+				try {
+					Desktop.getDesktop().browse(new URI("http://106.14.224.133:8085/jmreport/view/893491202215731200?vbillcode="+vbillno));
+				}catch(Exception e) {
+					MessageDialog.showHintDlg(frameUI, "提示", "打印出错");
+				}
+			}
+		}
+	}
+
+}

+ 5 - 1
mmpac/mmpac/src/client/u8c/ui/mmpac/panel/OrderTestUI.java

@@ -23,6 +23,7 @@ import u8c.ui.mmpac.action.OrderQueryAction;
 import u8c.ui.mmpac.action.OrderReturnFromCardToListAction;
 import u8c.ui.mmpac.action.OrderSaveAction;
 import u8c.ui.mmpac.action.OrderUnApproveAction;
+import u8c.ui.mmpac.action.PrintBarcodeAction;
 import u8c.ui.mmpac.action.PushMaterialAction;
 import u8c.ui.mmpac.action.PushOtherInAction;
 import u8c.ui.mmpac.action.PushOtherOutAction;
@@ -62,6 +63,7 @@ public class OrderTestUI extends FrameUI{
 		getBtnManager().addButtonByID(AbstractBtnReg.USERBTN_GENOUTIN);//生成出入库页签
 		getBtnManager().addButtonByID(AbstractBtnReg.USERBTN_boExportImport); //导出/导入
 		getBtnManager().addButtonByID(AbstractBtnReg.USERBTN_ADDPRAYBILL); //生单
+		getBtnManager().addButtonByID(AbstractBtnReg.USERBTN_PRINTBARCODE); //打印条形码
 		getBtnManager().addChildButtonsByIDs(AbstractBtnReg.USERBTN_ADDPRAYBILL , 
 				new int []{AbstractBtnReg.USERBTN_PUSHMATERIAL,AbstractBtnReg.USERBTN_PUSHPRODUCT,
 				AbstractBtnReg.USERBTN_PUSHOTHEROUT,AbstractBtnReg.USERBTN_PUSHOTHERIN,AbstractBtnReg.USERBTN_PUSHSALEOUT});
@@ -93,6 +95,7 @@ public class OrderTestUI extends FrameUI{
 		getBtnManager().regCmd(AbstractBtnReg.USERBTN_PUSHOTHEROUT, new PushOtherOutAction(this));
 		getBtnManager().regCmd(AbstractBtnReg.USERBTN_PUSHOTHERIN, new PushOtherInAction(this));
 		getBtnManager().regCmd(AbstractBtnReg.USERBTN_PUSHSALEOUT, new PushSaleOutAction(this));
+		getBtnManager().regCmd(AbstractBtnReg.USERBTN_PRINTBARCODE, new PrintBarcodeAction(this));
 		
 		getBtnManager().adjustButtonOrder(new int[] {
 				AbstractBtnReg.SYSBTN_ADD,
@@ -117,7 +120,8 @@ public class OrderTestUI extends FrameUI{
 				AbstractBtnReg.USERBTN_ADDPRAYBILL,
 				AbstractBtnReg.USERBTN_PUSHOTHEROUT,
 				AbstractBtnReg.USERBTN_PUSHOTHERIN,
-				AbstractBtnReg.USERBTN_PUSHSALEOUT
+				AbstractBtnReg.USERBTN_PUSHSALEOUT,
+				AbstractBtnReg.USERBTN_PRINTBARCODE
 				}
 				);
 	}

+ 4 - 3
mmpac/mmpac/src/client/u8c/ui/mytest/button/MyBtnStateReg.java

@@ -27,7 +27,8 @@ public class MyBtnStateReg extends ManageBtnStateReg {
         btnStateVO = new ButtonStateVO();
         btnStateVO.setStateID(StateRegister.STATE_LINE_SELECTED);
         btnStateVO.setEnableBtnIDs(new int[]{AbstractBtnReg.SYSBTN_EXAMINE_OPS,AbstractBtnReg.SYSBTN_QUERY, AbstractBtnReg.SYSBTN_ADD, 
-        		AbstractBtnReg.SYSBTN_EDIT, AbstractBtnReg.SYSBTN_DELETE,AbstractBtnReg.SYSBTN_EXAMINE,AbstractBtnReg.SYSBTN_CANCELEXAMINE,AbstractBtnReg.USERBTN_boExportImport,AbstractBtnReg.SYSBTN_IMPORT,AbstractBtnReg.SYSBTN_EXPORT,AbstractBtnReg.USERBTN_PUSHOTHEROUT,AbstractBtnReg.USERBTN_PUSHOTHERIN});
+        		AbstractBtnReg.SYSBTN_EDIT, AbstractBtnReg.SYSBTN_DELETE,AbstractBtnReg.SYSBTN_EXAMINE,AbstractBtnReg.SYSBTN_CANCELEXAMINE,AbstractBtnReg.USERBTN_boExportImport,AbstractBtnReg.SYSBTN_IMPORT,
+        		AbstractBtnReg.SYSBTN_EXPORT,AbstractBtnReg.USERBTN_PUSHOTHEROUT,AbstractBtnReg.USERBTN_PUSHOTHERIN,AbstractBtnReg.USERBTN_PRINTBARCODE});
         btnStateVO.setVisibleBtnIDs(new int[]{});
         btnStateVO.setInvisiableBtnIDs(new int[]{AbstractBtnReg.USERBTN_ADDPRAYBILL});
         addStateVO(btnStateVO.getStateID(), btnStateVO);
@@ -39,7 +40,7 @@ public class MyBtnStateReg extends ManageBtnStateReg {
             AbstractBtnReg.SYSBTN_RETURN,AbstractBtnReg.SYSBTN_EXAMINE,AbstractBtnReg.SYSBTN_CANCELEXAMINE,AbstractBtnReg.SYSBTN_IMPORT,
             AbstractBtnReg.SYSBTN_EXPORT,AbstractBtnReg.USERBTN_PUSHMATERIAL,
             AbstractBtnReg.USERBTN_PUSHPRODUCT,AbstractBtnReg.USERBTN_boExportImport,AbstractBtnReg.USERBTN_ADDPRAYBILL,AbstractBtnReg.USERBTN_PUSHOTHEROUT,AbstractBtnReg.USERBTN_PUSHOTHERIN,
-            AbstractBtnReg.USERBTN_GENOUTIN,AbstractBtnReg.USERBTN_PUSHSALEOUT});
+            AbstractBtnReg.USERBTN_GENOUTIN,AbstractBtnReg.USERBTN_PUSHSALEOUT,AbstractBtnReg.USERBTN_PRINTBARCODE});
         btnStateVO.setVisibleBtnIDs(new int[]{AbstractBtnReg.SYSBTN_EXAMINE_OPS,AbstractBtnReg.SYSBTN_QUERY, AbstractBtnReg.SYSBTN_REFRESH});
         addStateVO(btnStateVO.getStateID(), btnStateVO);
         
@@ -51,7 +52,7 @@ public class MyBtnStateReg extends ManageBtnStateReg {
                 AbstractBtnReg.SYSBTN_RETURN,AbstractBtnReg.SYSBTN_EXAMINE,AbstractBtnReg.SYSBTN_CANCELEXAMINE,AbstractBtnReg.SYSBTN_IMPORT,
                 AbstractBtnReg.SYSBTN_EXPORT,AbstractBtnReg.USERBTN_PUSHMATERIAL,
                 AbstractBtnReg.USERBTN_PUSHPRODUCT,AbstractBtnReg.USERBTN_boExportImport,AbstractBtnReg.USERBTN_ADDPRAYBILL,AbstractBtnReg.USERBTN_PUSHOTHEROUT,AbstractBtnReg.USERBTN_PUSHOTHERIN,
-                AbstractBtnReg.USERBTN_GENOUTIN,AbstractBtnReg.USERBTN_PUSHSALEOUT});
+                AbstractBtnReg.USERBTN_GENOUTIN,AbstractBtnReg.USERBTN_PUSHSALEOUT,AbstractBtnReg.USERBTN_PRINTBARCODE});
             btnStateVO.setVisibleBtnIDs(new int[]{AbstractBtnReg.SYSBTN_EXAMINE_OPS,AbstractBtnReg.SYSBTN_QUERY, AbstractBtnReg.SYSBTN_REFRESH});
             addStateVO(btnStateVO.getStateID(), btnStateVO);
 	}