|
@@ -1,9 +1,14 @@
|
|
|
package nckd.jimin.jyyy.hr.swc.hcss.formplugin.web.income.deal;
|
|
|
|
|
|
+import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.entity.datamodel.IDataModel;
|
|
|
+import kd.bos.form.control.AttachmentPanel;
|
|
|
import kd.bos.form.events.AfterDoOperationEventArgs;
|
|
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
|
|
+import kd.bos.servicehelper.AttachmentServiceHelper;
|
|
|
+import kd.hr.hbp.common.util.DomainFactory;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
+import kd.swc.hcss.business.service.income.IncomeProofBillService;
|
|
|
|
|
|
import java.util.EventObject;
|
|
|
|
|
@@ -14,13 +19,24 @@ import java.util.EventObject;
|
|
|
*/
|
|
|
public class IncomeProofBillDealPluginEx extends AbstractFormPlugin implements Plugin {
|
|
|
|
|
|
+ private IncomeProofBillService incomeProofBillService = (IncomeProofBillService) DomainFactory.getInstance(IncomeProofBillService.class);
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public void afterBindData(EventObject e) {
|
|
|
super.afterBindData(e);
|
|
|
dealIncomeInfo();
|
|
|
+ setAttachment();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setAttachment() {
|
|
|
+ DynamicObject billData = this.getModel().getDataEntity(true);
|
|
|
+ String name = this.incomeProofBillService.getBillNameByDataSource(billData.getString("datasource"));
|
|
|
+ AttachmentPanel attachment = (AttachmentPanel)this.getView().getControl("nckd_attachmentpanelap");
|
|
|
+ attachment.bindData(AttachmentServiceHelper.getAttachments(name, billData.getLong("id"), "nckd_attachmentpanelap"));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private void dealIncomeInfo() {
|
|
|
IDataModel model = this.getModel();
|
|
|
int rowCount = model.getEntryRowCount("entryentity");
|