|
@@ -2,6 +2,7 @@ package fi.em.formPlugin;
|
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
+import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
|
|
import kd.bos.entity.operate.result.OperationResult;
|
|
|
import kd.bos.form.control.EntryGrid;
|
|
|
import kd.bos.form.events.AfterDoOperationEventArgs;
|
|
@@ -25,18 +26,65 @@ public class TravelTotalPlugin extends AbstractFormPlugin {
|
|
|
private static String entryentity="nckd_entryentity";
|
|
|
private static String invoiceandexpense="nckd_invoiceandexpense";
|
|
|
|
|
|
- @Override
|
|
|
- public void beforeDoOperation(BeforeDoOperationEventArgs args) {
|
|
|
- super.beforeDoOperation(args);
|
|
|
- AbstractOperate op = (AbstractOperate)args.getSource();
|
|
|
- String operateKey = op.getOperateKey();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void propertyChanged(PropertyChangedArgs e) {
|
|
|
+ String fieldKey = e.getProperty().getName();
|
|
|
|
|
|
DynamicObject dynamicObject=this.getModel().getDataEntity(true);
|
|
|
|
|
|
DynamicObjectCollection nckd_entryentity=dynamicObject.getDynamicObjectCollection(entryentity);
|
|
|
|
|
|
Map<DynamicObject,BigDecimal> allMap=new HashMap<>();
|
|
|
- if (bar_save.equals(operateKey)) {
|
|
|
+
|
|
|
+ if (fieldKey.equals("nckd_amountfield4")) {
|
|
|
|
|
|
DynamicObjectCollection dynamicObjectCollection=dynamicObject.getDynamicObjectCollection("tripentry");
|
|
|
|
|
@@ -73,4 +121,5 @@ public class TravelTotalPlugin extends AbstractFormPlugin {
|
|
|
this.getView().updateView("nckd_entryentity");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|