32 lines
1.3 KiB
Java
32 lines
1.3 KiB
Java
package shkd.repc.rebm.formplugin;
|
|
|
|
import kd.bos.bill.AbstractBillPlugIn;
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
import kd.bos.entity.datamodel.IDataModel;
|
|
import kd.bos.form.events.AfterDoOperationEventArgs;
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
/**
|
|
* 单据界面插件
|
|
*/
|
|
public class UpdateDrawPurDataPlugin extends AbstractBillPlugIn implements Plugin {
|
|
|
|
@Override
|
|
public void afterDoOperation(AfterDoOperationEventArgs args) {
|
|
super.afterDoOperation(args);
|
|
String operateKey = args.getOperateKey();
|
|
if ("draw".equals(operateKey)) {
|
|
IDataModel model = this.getModel();
|
|
int rowIndex = model.getEntryCurrentRowIndex("bidsection");
|
|
DynamicObjectCollection bidSections = model.getEntryEntity("bidsection");
|
|
DynamicObject dynamicObject1 = bidSections.get(rowIndex);
|
|
DynamicObject dynamicObject2 = bidSections.get(bidSections.size() - 1);
|
|
|
|
DynamicObjectCollection projectEntries = dynamicObject1.getDynamicObjectCollection("projectentry");
|
|
projectEntries.addAll(dynamicObject2.getDynamicObjectCollection("projectentry"));
|
|
model.deleteEntryRow("bidsection", bidSections.size() - 1);
|
|
this.getView().updateView("projectentry");
|
|
}
|
|
}
|
|
} |