供方入围可添加供应商修订版1.0

This commit is contained in:
zengweihai 2024-11-21 17:07:22 +08:00
parent 756428b3e2
commit 0c6a43235f
1 changed files with 44 additions and 12 deletions

View File

@ -11,8 +11,11 @@ import kd.bos.entity.datamodel.IDataModel;
import kd.bos.entity.datamodel.IEntryOperate; import kd.bos.entity.datamodel.IEntryOperate;
import kd.bos.entity.datamodel.events.ChangeData; import kd.bos.entity.datamodel.events.ChangeData;
import kd.bos.entity.datamodel.events.PropertyChangedArgs; import kd.bos.entity.datamodel.events.PropertyChangedArgs;
import kd.bos.form.control.Button;
import kd.bos.form.control.Control; import kd.bos.form.control.Control;
import kd.bos.form.control.EntryGrid; import kd.bos.form.control.EntryGrid;
import kd.bos.form.control.events.BeforeItemClickEvent;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.events.AfterDoOperationEventArgs; import kd.bos.form.events.AfterDoOperationEventArgs;
import kd.bos.form.events.BeforeDoOperationEventArgs; import kd.bos.form.events.BeforeDoOperationEventArgs;
import kd.bos.form.operate.FormOperate; import kd.bos.form.operate.FormOperate;
@ -37,27 +40,24 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit {
private HashMap<Long, DynamicObject> projectSectionMap = new HashMap(); private HashMap<Long, DynamicObject> projectSectionMap = new HashMap();
List<String> isCheckList = new ArrayList(); List<String> isCheckList = new ArrayList();
@Override @Override
public void beforeDoOperation(BeforeDoOperationEventArgs args) { public void registerListener(EventObject e) {
super.beforeDoOperation(args); super.registerListener(e);
FormOperate source = (FormOperate) args.getSource(); addItemClickListeners("supplierenrolltoolbar");
String operateKey = source.getOperateKey();
if ("addsupplierdetail".equals(operateKey)){
}
} }
@Override @Override
public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { public void beforeItemClick(BeforeItemClickEvent evt) {
super.afterDoOperation(afterDoOperationEventArgs); super.beforeItemClick(evt);
String operateKey = afterDoOperationEventArgs.getOperateKey(); String itemKey = evt.getItemKey();
DynamicObject bidproject = (DynamicObject) this.getModel().getValue("bidproject"); DynamicObject bidproject = (DynamicObject) this.getModel().getValue("bidproject");
if ("addsupplierdetail".equals(operateKey)){ if ("addsupplierdetail".equals(itemKey)){
EntryGrid SEEntryGrid = this.getControl("supplierenrollentry"); EntryGrid SEEntryGrid = this.getControl("supplierenrollentry");
DynamicObjectCollection SEEntry = this.getModel().getEntryEntity("supplierenrollentry"); DynamicObjectCollection SEEntry = this.getModel().getEntryEntity("supplierenrollentry");
int[] selectRows = SEEntryGrid.getSelectRows(); int[] selectRows = SEEntryGrid.getSelectRows();
this.getView().showTipNotification(String.valueOf(selectRows[0]));
for (int selectRow : selectRows) { for (int selectRow : selectRows) {
this.getView().showTipNotification("beforedo:"+String.valueOf(selectRow));
DynamicObject dy = SEEntry.get(selectRow); DynamicObject dy = SEEntry.get(selectRow);
DynamicObject enrollsupplier = dy.getDynamicObject("enrollsupplier");//报名供应商 DynamicObject enrollsupplier = dy.getDynamicObject("enrollsupplier");//报名供应商
if (enrollsupplier != null){ if (enrollsupplier != null){
@ -72,8 +72,40 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit {
} }
} }
} }
@Override
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
super.beforeDoOperation(args);
// FormOperate source = (FormOperate) args.getSource();
// String operateKey = source.getOperateKey();
// DynamicObject bidproject = (DynamicObject) this.getModel().getValue("bidproject");
// if ("addsupplierdetail".equals(operateKey)){
// EntryGrid SEEntryGrid = this.getControl("supplierenrollentry");
// DynamicObjectCollection SEEntry = this.getModel().getEntryEntity("supplierenrollentry");
// int[] selectRows = SEEntryGrid.getSelectRows();
// for (int selectRow : selectRows) {
// this.getView().showTipNotification("beforedo:"+String.valueOf(selectRow));
// DynamicObject dy = SEEntry.get(selectRow);
// DynamicObject enrollsupplier = dy.getDynamicObject("enrollsupplier");//报名供应商
// if (enrollsupplier != null){
// Object enrollsupplierPkValue = enrollsupplier.getPkValue();
// boolean flag = checkSupplierCollection(enrollsupplierPkValue,bidproject);
// if (!flag){
// this.createRespMyTender(enrollsupplierPkValue);
// DynamicObject dataEntity = this.getModel().getDataEntity();
// SaveServiceHelper.save(new DynamicObject[]{dataEntity});
// }
// }
//
// }
// }
}
@Override @Override
public void propertyChanged(PropertyChangedArgs args) { public void propertyChanged(PropertyChangedArgs args) {
ChangeData changeData = args.getChangeSet()[0]; ChangeData changeData = args.getChangeSet()[0];