parent
f6b3c01b15
commit
7530eb6f0d
|
@ -9,6 +9,7 @@ import kd.bos.entity.EntityMetadataCache;
|
|||
import kd.bos.entity.EntityType;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
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.PropertyChangedArgs;
|
||||
import kd.bos.form.control.Button;
|
||||
|
@ -74,33 +75,38 @@ 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});
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
FormOperate source = (FormOperate) args.getSource();
|
||||
String operateKey = source.getOperateKey();
|
||||
if ("deleteentry1".equals(operateKey)){
|
||||
EntryGrid SEEntryGrid = this.getControl("supplierenrollentry");
|
||||
DynamicObjectCollection SEEntry = this.getModel().getEntryEntity("supplierenrollentry");
|
||||
int[] selectRows = SEEntryGrid.getSelectRows();
|
||||
int flag = 0;
|
||||
for (int selectRow : selectRows) {
|
||||
DynamicObject dy = SEEntry.get(selectRow);
|
||||
boolean qeug_isaddnew = dy.getBoolean("qeug_isaddnew");
|
||||
if (!qeug_isaddnew){
|
||||
flag++;
|
||||
}
|
||||
}
|
||||
if (flag > 0){
|
||||
args.setCancel(true);
|
||||
this.getView().showTipNotification("选择供应商存在非新增供应商,请重新选择!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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
|
||||
public void propertyChanged(PropertyChangedArgs args) {
|
||||
|
|
Loading…
Reference in New Issue