日志打印

This commit is contained in:
xiaoshi 2025-06-27 15:20:14 +08:00
parent 10be8d1cf8
commit 906fdadf32
2 changed files with 33 additions and 1 deletions

View File

@ -2,14 +2,18 @@ package zcgj.zcdev.zcdev.pr.plugin.form;
import kd.bos.bill.AbstractBillPlugIn; import kd.bos.bill.AbstractBillPlugIn;
import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.entity.DynamicObjectCollection;
import kd.bos.dataentity.entity.LocaleString; import kd.bos.dataentity.entity.LocaleString;
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.entity.operate.Submit;
import kd.bos.form.events.BeforeDoOperationEventArgs;
import kd.bos.form.field.ComboEdit; import kd.bos.form.field.ComboEdit;
import kd.bos.form.field.ComboItem; import kd.bos.form.field.ComboItem;
import kd.sdk.plugin.Plugin; import kd.sdk.plugin.Plugin;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.EventObject;
import java.util.List; import java.util.List;
/** /**
@ -86,4 +90,32 @@ public class ContractPublicBillRevisionPlugin extends AbstractBillPlugIn impleme
} }
} }
} }
@Override
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
super.beforeDoOperation(args);
if(args.getSource() instanceof Submit){
Submit source = (Submit) args.getSource();
if (source.getOperateKey().equals("submit")) {
Object jjfs = this.getModel().getValue("zcgj_pricetype");
if(jjfs.toString().equals("gddj")){
DynamicObjectCollection entrys = (DynamicObjectCollection) this.getModel().getValue("treelistentry");
if(entrys.size()==0){
this.getView().showTipNotification("固定单价时合同清单不能为空!");
args.setCancel(true);
}
}
}
}
}
@Override
public void registerListener(EventObject e) {
super.registerListener(e);
}
@Override
public void click(EventObject evt) {
super.click(evt);
}
} }

View File

@ -44,7 +44,7 @@ public class OutContractFromPlugin extends AbstractBillPlugIn implements Plugin
comboList.add(new ComboItem(new LocaleString("零星租赁"), "F")); comboList.add(new ComboItem(new LocaleString("零星租赁"), "F"));
comboList1.add(new ComboItem(new LocaleString("固定单价"), "gddj")); comboList1.add(new ComboItem(new LocaleString("固定单价"), "gddj"));
comboList1.add(new ComboItem(new LocaleString("总价包干"), "zjbg")); comboList1.add(new ComboItem(new LocaleString("总价包干"), "zjbg"));
} else if (number.equals("ZCHLX02")) { } else if (number.equals("ZCHLX02") ||number.equals("wzcg01")) {
comboList1.add(new ComboItem(new LocaleString("固定单价"), "gddj")); comboList1.add(new ComboItem(new LocaleString("固定单价"), "gddj"));
comboList1.add(new ComboItem(new LocaleString("不定量不定价"), "bdlbdj")); comboList1.add(new ComboItem(new LocaleString("不定量不定价"), "bdlbdj"));
comboList.add(new ComboItem(new LocaleString("全面合作"), "A")); comboList.add(new ComboItem(new LocaleString("全面合作"), "A"));