|
@@ -1,94 +0,0 @@
|
|
|
-package nc.ui.pubapp.uif2app.actions;
|
|
|
-
|
|
|
-import java.awt.BorderLayout;
|
|
|
-import java.awt.event.ActionEvent;
|
|
|
-
|
|
|
-import nc.bs.pub.filesystem.IFileSystemActionConst;
|
|
|
-import nc.desktop.ui.WorkbenchEnvironment;
|
|
|
-import nc.ui.pub.beans.MessageDialog;
|
|
|
-import nc.ui.pub.beans.UIDialog;
|
|
|
-import nc.ui.pub.bill.BillCardPanel;
|
|
|
-import nc.ui.pub.filesystem.FileManageUI;
|
|
|
-import nc.ui.pub.filesystem.FileManageUIFactory;
|
|
|
-import nc.ui.pub.filesystem.TestFileManageUI;
|
|
|
-import nc.ui.pub.filesystem.ThFileManageUI;
|
|
|
-import nc.ui.uif2.editor.BillForm;
|
|
|
-import nc.ui.uif2.model.AbstractAppModel;
|
|
|
-import nc.ui.uif2.model.AbstractUIAppModel;
|
|
|
-import nc.vo.bd.meta.IBDObject;
|
|
|
-import nc.vo.pu.m25.entity.InvoiceVO;
|
|
|
-import nc.vo.uap.rbac.FuncSubInfo;
|
|
|
-import nc.vo.uap.rbac.profile.FunctionPermProfileManager;
|
|
|
-
|
|
|
-public class ViewAtacmtsAction extends FileDocManageAction implements IFileSystemActionConst{
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- */
|
|
|
- private static final long serialVersionUID = 7709321055117240146L;
|
|
|
- private AbstractUIAppModel model;
|
|
|
- public BillForm editor;
|
|
|
-
|
|
|
- public BillForm getEditor() {
|
|
|
- return editor;
|
|
|
- }
|
|
|
-
|
|
|
- public void setEditor(BillForm editor) {
|
|
|
- this.editor = editor;
|
|
|
- }
|
|
|
-
|
|
|
- public AbstractUIAppModel getModel() {
|
|
|
- return model;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public void setModel(AbstractUIAppModel model) {
|
|
|
- this.model = model;
|
|
|
- }
|
|
|
-
|
|
|
- public ViewAtacmtsAction(){
|
|
|
- super();
|
|
|
- this.setBtnName("·¢Æ±²é¿´");
|
|
|
- this.setCode("viewatmsaction");
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public void doAction(ActionEvent e) throws Exception {
|
|
|
- // TODO Auto-generated method stub
|
|
|
- Object selectedData = this.model.getSelectedData();
|
|
|
-// BillCardPanel cpanel=editor.getBillCardPanel();
|
|
|
- InvoiceVO aggvo= (InvoiceVO) selectedData;
|
|
|
- String rootPath="";
|
|
|
- Object objrootPath = aggvo.getParentVO().getVdef17();
|
|
|
- if(null!=objrootPath){
|
|
|
- rootPath=objrootPath.toString();
|
|
|
- }
|
|
|
- String userCode =
|
|
|
- WorkbenchEnvironment.getInstance().getLoginUser().getUser_code();
|
|
|
-
|
|
|
- String funcode = this.model.getContext().getNodeCode();
|
|
|
- String pk_group = this.model.getContext().getPk_group();
|
|
|
- FuncSubInfo funcsubinfo = FunctionPermProfileManager.getInstance().getProfile(userCode).getFuncSubInfo(funcode);
|
|
|
- TestFileManageUI ui = new TestFileManageUI(objrootPath.toString(),editor);
|
|
|
- setActionPermission(ui,funcsubinfo);
|
|
|
- ui.setTreeRootVisible(false);
|
|
|
- UIDialog dlg =
|
|
|
- new UIDialog(this.model.getContext().getEntranceUI(),"´«ORC·¢Æ±");
|
|
|
- dlg.getContentPane().setLayout(new BorderLayout());
|
|
|
- dlg.getContentPane().add(ui, BorderLayout.CENTER);
|
|
|
- dlg.setResizable(true);
|
|
|
- dlg.setSize(600, 400);
|
|
|
- dlg.showModal();
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @SuppressWarnings("unused")
|
|
|
- private static void setActionPermission(TestFileManageUI fui,FuncSubInfo funcsubinfo){
|
|
|
- fui.setUploadFileEnable(funcsubinfo.isValidButton(UPLOAD));
|
|
|
- fui.setCreateNewFolderEnable(funcsubinfo.isValidButton(UPLOAD));
|
|
|
- fui.setDownloadFileEnable(funcsubinfo.isValidButton(DOWNLOAD));
|
|
|
- fui.setShowFileEnable(funcsubinfo.isValidButton(BROWSE));
|
|
|
- fui.setDeleteNodeEnable(funcsubinfo.isValidButton(DELETE));
|
|
|
- fui.setRenameNodeEnable(funcsubinfo.isValidButton(RENAME));
|
|
|
- }
|
|
|
-}
|