无合同付款单和无合同预付单,单据title问题处理

This commit is contained in:
zhangzhiguo 2025-09-08 09:42:45 +08:00
parent e1f8ead743
commit 19d0e21b5f
3 changed files with 37 additions and 4 deletions

View File

@ -28,6 +28,13 @@ public class PrepaybillNoContractPlugin extends AbstractBillPlugIn {
this.getView().setFormTitle(new LocaleString("无合同预付单"));
}
}
Object billtitle = this.getView().getFormShowParameter().getCustomParam("billtitle");
if(null!=billtitle){
this.getModel().setValue("zcgj_billtitle",billtitle);
}else{
this.getModel().setValue("zcgj_billtitle","【预付单】");
}
}
@Override
@ -37,6 +44,12 @@ public class PrepaybillNoContractPlugin extends AbstractBillPlugIn {
if(isec){
this.getView().setFormTitle(new LocaleString("无合同预付单"));
}
Object billtitle = this.getView().getFormShowParameter().getCustomParam("billtitle");
if(null!=billtitle){
this.getModel().setValue("zcgj_billtitle",billtitle);
}else{
this.getModel().setValue("zcgj_billtitle","【预付单】");
}
}
@Override

View File

@ -14,6 +14,7 @@ import kd.bos.list.events.BeforeShowBillFormEvent;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.bos.mvc.list.ListView;
import kd.bos.orm.query.QFilter;
import kd.bos.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
@ -29,11 +30,13 @@ public class PublicreimbursebillNoContractListPlugin extends AbstractListPlugin
public void setFilter(SetFilterEvent e) {
ListShowParameter param = (ListShowParameter) this.getView().getFormShowParameter();
String isec = param.getCustomParam("isec");
String billtitle = param.getCustomParam("billtitle");
if (isec!=null) {
if(isec.equals("true")) {
this.getView().setVisible(false, "tblnew");
}
e.addCustomQFilter(new QFilter("zcgj_isec", "=", Boolean.valueOf(isec)));
}else{
e.addCustomQFilter(new QFilter("zcgj_isec", "=", false));
this.getView().setVisible(false, "zcgj_newecbill");
@ -43,14 +46,23 @@ public class PublicreimbursebillNoContractListPlugin extends AbstractListPlugin
@Override
public void beforeShowBill(BeforeShowBillFormEvent e) {
FormShowParameter formShowParameter = this.getView().getFormShowParameter();
if(null!=formShowParameter && current_opkey.equals("zcgj_newecbill")){
if(null!=formShowParameter){
Map<String, Object> customParams =formShowParameter.getCustomParams();
if(null!=customParams){
customParams.put("isec",true);
if(current_opkey.equals("zcgj_newecbill")){
//customParams.put("isec",true);
e.getParameter().setCustomParams(customParams);
}
}
current_opkey ="";
}
/*if(StringUtils.isBlank(billtitle)) {
this.getModel().setValue("zcgj_billtitle","【对公报销】");
}else{
this.getModel().setValue("zcgj_billtitle",billtitle);
}*/
super.beforeShowBill(e);
}

View File

@ -48,7 +48,7 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl
Object isecObj = this.getView().getFormShowParameter().getCustomParam("isec");
if(null!=isecObj){
boolean isec1 = (boolean)isecObj;
boolean isec1 = Boolean.parseBoolean(isecObj+"");
IDataModel model = this.getModel();
model.setValue("zcgj_isec", isec1);
editTitle = isec1;
@ -57,6 +57,13 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl
this.getView().setFormTitle(new LocaleString("无合同付款申请单"));
}
}
Object billtitle = this.getView().getFormShowParameter().getCustomParam("billtitle");
if(null!=billtitle){
this.getModel().setValue("zcgj_billtitle",billtitle);
}else{
this.getModel().setValue("zcgj_billtitle","【对公报销】");
}
}
@Override
@ -87,6 +94,7 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl
ComboEdit comboEdit = getView().getControl("payertype");
comboEdit.setComboItems(comboList);
}
BillShowParameter bsp=(BillShowParameter)this.getView().getFormShowParameter();
if(bsp.getStatus()!=OperationStatus.ADDNEW){
if(isec){