修改上拉后的采购需求数据
This commit is contained in:
parent
864353f230
commit
6c80808102
|
@ -0,0 +1,32 @@
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue