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

标准初始供应商不允许删除,新增初始为新增状态
This commit is contained in:
zengweihai 2024-11-22 14:18:32 +08:00
parent f6b3c01b15
commit 7530eb6f0d
1 changed files with 31 additions and 25 deletions

View File

@ -9,6 +9,7 @@ import kd.bos.entity.EntityMetadataCache;
import kd.bos.entity.EntityType; import kd.bos.entity.EntityType;
import kd.bos.entity.datamodel.IDataModel; import kd.bos.entity.datamodel.IDataModel;
import kd.bos.entity.datamodel.IEntryOperate; import kd.bos.entity.datamodel.IEntryOperate;
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
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.Button;
@ -74,33 +75,38 @@ public class SupplierInvitationFormPlugin extends SupplierInvitationBidNumEdit {
@Override @Override
public void beforeDoOperation(BeforeDoOperationEventArgs args) { public void beforeDoOperation(BeforeDoOperationEventArgs args) {
super.beforeDoOperation(args); super.beforeDoOperation(args);
// FormOperate source = (FormOperate) args.getSource(); FormOperate source = (FormOperate) args.getSource();
// String operateKey = source.getOperateKey(); String operateKey = source.getOperateKey();
// DynamicObject bidproject = (DynamicObject) this.getModel().getValue("bidproject"); if ("deleteentry1".equals(operateKey)){
// if ("addsupplierdetail".equals(operateKey)){ 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(); int flag = 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); boolean qeug_isaddnew = dy.getBoolean("qeug_isaddnew");
// DynamicObject enrollsupplier = dy.getDynamicObject("enrollsupplier");//报名供应商 if (!qeug_isaddnew){
// if (enrollsupplier != null){ flag++;
// Object enrollsupplierPkValue = enrollsupplier.getPkValue(); }
// boolean flag = checkSupplierCollection(enrollsupplierPkValue,bidproject); }
// if (!flag){ if (flag > 0){
// this.createRespMyTender(enrollsupplierPkValue); args.setCancel(true);
// DynamicObject dataEntity = this.getModel().getDataEntity(); this.getView().showTipNotification("选择供应商存在非新增供应商,请重新选择!");
// SaveServiceHelper.save(new DynamicObject[]{dataEntity}); }
// } }
// }
//
// }
// }
} }
@Override
public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
super.afterDoOperation(afterDoOperationEventArgs);
String operateKey = afterDoOperationEventArgs.getOperateKey();
if ("newentry1".equals(operateKey)){
DynamicObjectCollection supplierenrollentry = this.getModel().getEntryEntity("supplierenrollentry");
DynamicObject addNew = supplierenrollentry.get(supplierenrollentry.size() - 1);
addNew.set("qeug_isaddnew",true);
this.getView().updateView("supplierenrollentry");
}
}
@Override @Override
public void propertyChanged(PropertyChangedArgs args) { public void propertyChanged(PropertyChangedArgs args) {