|
@@ -1,5 +1,6 @@
|
|
package nc.pub.filesystem.newui;
|
|
package nc.pub.filesystem.newui;
|
|
import nc.vo.arap.utils.StringUtil;
|
|
import nc.vo.arap.utils.StringUtil;
|
|
|
|
+
|
|
import java.awt.BorderLayout;
|
|
import java.awt.BorderLayout;
|
|
import java.awt.Color;
|
|
import java.awt.Color;
|
|
import java.awt.Component;
|
|
import java.awt.Component;
|
|
@@ -66,6 +67,7 @@ import javax.swing.tree.TreeNode;
|
|
import javax.swing.tree.TreePath;
|
|
import javax.swing.tree.TreePath;
|
|
|
|
|
|
import nc.bs.framework.common.NCLocator;
|
|
import nc.bs.framework.common.NCLocator;
|
|
|
|
+import nc.bs.framework.common.RuntimeEnv;
|
|
import nc.bs.logging.Logger;
|
|
import nc.bs.logging.Logger;
|
|
import nc.bs.pub.filesystem.IFileSystemActionConst;
|
|
import nc.bs.pub.filesystem.IFileSystemActionConst;
|
|
import nc.bs.pub.filesystem.IFileSystemService;
|
|
import nc.bs.pub.filesystem.IFileSystemService;
|
|
@@ -93,7 +95,6 @@ import nc.ui.pub.beans.UITree;
|
|
import nc.ui.pub.beans.table.VOTableModel;
|
|
import nc.ui.pub.beans.table.VOTableModel;
|
|
import nc.ui.pub.bill.BillCardPanel;
|
|
import nc.ui.pub.bill.BillCardPanel;
|
|
import nc.ui.pub.filesystem.FileManageServletClient;
|
|
import nc.ui.pub.filesystem.FileManageServletClient;
|
|
-import nc.ui.uif2.editor.BillForm;
|
|
|
|
import nc.uitheme.ui.ThemeResourceCenter;
|
|
import nc.uitheme.ui.ThemeResourceCenter;
|
|
import nc.vo.pub.BusinessException;
|
|
import nc.vo.pub.BusinessException;
|
|
import nc.vo.pub.ValueObject;
|
|
import nc.vo.pub.ValueObject;
|
|
@@ -118,7 +119,8 @@ public class ThFileContentPanel extends JPanel {
|
|
public static final int BROWSESINGLEICON_STATE =2;
|
|
public static final int BROWSESINGLEICON_STATE =2;
|
|
//缩略图浏览
|
|
//缩略图浏览
|
|
public static final int BROWSESMALLICON_STATE =3;
|
|
public static final int BROWSESMALLICON_STATE =3;
|
|
- protected BillForm editor_;
|
|
|
|
|
|
+
|
|
|
|
+ public BillCardPanel fpcpanel;
|
|
private int colnumbtnpane =5 ;
|
|
private int colnumbtnpane =5 ;
|
|
private int colnumbtnbrow =1;
|
|
private int colnumbtnbrow =1;
|
|
protected String rootDirStr = "dir1/dir2/ewei";
|
|
protected String rootDirStr = "dir1/dir2/ewei";
|
|
@@ -196,10 +198,10 @@ public class ThFileContentPanel extends JPanel {
|
|
setUIEnable();
|
|
setUIEnable();
|
|
initUI();
|
|
initUI();
|
|
}
|
|
}
|
|
- public ThFileContentPanel(String root,BillForm editor) {
|
|
|
|
|
|
+ public ThFileContentPanel(String root,BillCardPanel cpanel) {
|
|
super();
|
|
super();
|
|
rootDirStr = root ;
|
|
rootDirStr = root ;
|
|
- editor_ = editor;
|
|
|
|
|
|
+ this.fpcpanel=cpanel;
|
|
//设置权限
|
|
//设置权限
|
|
initUI();
|
|
initUI();
|
|
}
|
|
}
|
|
@@ -1741,7 +1743,8 @@ public class ThFileContentPanel extends JPanel {
|
|
getPatchInfoTable().setRowSelectionInterval(rowindex,
|
|
getPatchInfoTable().setRowSelectionInterval(rowindex,
|
|
rowindex);
|
|
rowindex);
|
|
if (MessageDialog.showOkCancelDlg(ThFileContentPanel.this,
|
|
if (MessageDialog.showOkCancelDlg(ThFileContentPanel.this,
|
|
- NCLangRes.getInstance().getStrByID("sftemp", "FileContentPanel-0011")/*确认删除*/, NCLangRes.getInstance().getStrByID("sftemp", "FileContentPanel-0012")/*确定要删除文件?*/) == MessageDialog.ID_OK) {
|
|
|
|
|
|
+ NCLangRes.getInstance().getStrByID("sftemp", "FileContentPanel-0011")/*确认删除*/,
|
|
|
|
+ NCLangRes.getInstance().getStrByID("sftemp", "FileContentPanel-0012")/*确定要删除文件?*/) == MessageDialog.ID_OK) {
|
|
int row = getPatchInfoTable().getSelectedRow();
|
|
int row = getPatchInfoTable().getSelectedRow();
|
|
NCFileVO filevo = (NCFileVO) getfiletablemodel().getVO(
|
|
NCFileVO filevo = (NCFileVO) getfiletablemodel().getVO(
|
|
row);
|
|
row);
|
|
@@ -1754,6 +1757,10 @@ public class ThFileContentPanel extends JPanel {
|
|
|
|
|
|
service
|
|
service
|
|
.deleteNCFileNodes(new String[] { filepath });
|
|
.deleteNCFileNodes(new String[] { filepath });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
// 刷新table
|
|
// 刷新table
|
|
getfiletablemodel().removeVO(row);
|
|
getfiletablemodel().removeVO(row);
|
|
@@ -1770,6 +1777,18 @@ public class ThFileContentPanel extends JPanel {
|
|
} catch (BusinessException ex) {
|
|
} catch (BusinessException ex) {
|
|
Logger.error(ex.getMessage(), ex);
|
|
Logger.error(ex.getMessage(), ex);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //删除home发票文件夹里的对应发票 add by ZTH
|
|
|
|
+ String deletefilepath = RuntimeEnv.getInstance().getNCHome()
|
|
|
|
+ +File.separator +"uploadfile" + File.separator+ filepath; // 文件保存的路径
|
|
|
|
+
|
|
|
|
+ File file = new File(deletefilepath);
|
|
|
|
+
|
|
|
|
+ if (file.delete()) {
|
|
|
|
+ MessageDialog.showHintDlg(ThFileContentPanel.this, "提示","删除成功!");
|
|
|
|
+ } else {
|
|
|
|
+ MessageDialog.showErrorDlg(ThFileContentPanel.this, "提示","删除操作失败。");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|