EAS系统单据上如何加图片
1、实体上新增字段类型为byteArray
2、对应的数据库表上增加字段数据类型为blob,跟实体上的字段绑定
3、UI界面上增加KDLabel
2、EditUI上增加实现代码
//双击选择图片@Overrideprotected void lbphoto_mouseClicked(MouseEvent e) throws Exception { int count = e.getClickCount(); if (count == 2) { selectPhoto(); }}//选择图片private void selectPhoto() throws Exception{ KDFileChooser fileChooser = new KDFileChooser(); fileChooser.setFileFilter(new PictureFilter()); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); int result = fileChooser.showOpenDialog(this); if(result == 0) { java.io.File file = fileChooser.getSelectedFile(); byte[] bt = HRUtil.convertFileTOBytes(file); Image image = ImageIO.read(new ByteArrayInputStream(bt));// ImageIcon icon = new ImageIcon(image); KDImageIcon icon = new KDImageIcon(image); lbphoto.setIcon(icon); editData.setPhoto(bt); } }//打开单据加载图片@Overridepublic void onShow() throws Exception { super.onShow(); if (UIRuleUtil.isNotNull(editData.getPhoto())) { Image image = ImageIO.read(new ByteArrayInputStream(editData.getPhoto())); lbphoto.setIcon(new KDImageIcon(image)); }}//删除图片代码@Overrideprotected void btndelphoto_actionPerformed(ActionEvent e) throws Exception { int i = MsgBox.showConfirm2(this, "是否确认删除图片?"); if (MsgBox.OK == i) { lbphoto.setIcon(null); editData.setPhoto(null); }}//选择图片按钮@Overrideprotected void btnupphoto_actionPerformed(ActionEvent e) throws Exception { selectPhoto();}
EAS系统单据上如何加图片
1、实体上新增字段类型为byteArray2、对应的数据库表上增加字段数据类型为blob,跟实体上的字段绑定3、UI界面上增加KDLabel2、EditUI上增加...
点击下载文档
上一篇:EAS BOS-editui界面常用代码下一篇:EAS单据显示图片字段
本文2024-09-16 22:51:58发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-50878.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
- 鼎捷EAI整合規範文件V3.1.07 (集團).pdf
- 鼎捷OpenAPI應用場景說明_基礎資料.pdf
- 鼎捷OpenAPI應用場景說明_財務管理.pdf
- 鼎捷T100 API設計器使用手冊T100 APIDesigner(V1.0).docx
- 鼎新e-GoB2雲端ERP B2 線上課程E6-2應付票據整批郵寄 領取.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A4使用者建立權限設定.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程C3會計開帳與會計傳票.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程E6-1應付票據.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A5-1進銷存參數設定(初階篇).pdf
- 鼎新e-GoB2雲端ERP B2 線上課程D2帳款開帳與票據開帳.pdf
热门文章