工会经费申请单功能开发
This commit is contained in:
parent
e04af0f287
commit
0da2db8313
|
@ -0,0 +1,40 @@
|
|||
package zcgj.zcdev.zcdev.fs.plugin.form;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.LocaleString;
|
||||
import kd.bos.form.field.ComboEdit;
|
||||
import kd.bos.form.field.ComboItem;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 费用申请单插件
|
||||
*/
|
||||
public class DailyapplybillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||
|
||||
@Override
|
||||
public void afterBindData(EventObject e) {
|
||||
super.afterBindData(e);
|
||||
DynamicObject costcompany = (DynamicObject) this.getModel().getValue("costcompany");
|
||||
if(costcompany != null) {
|
||||
if("10007186".equals(costcompany.getString("number"))){
|
||||
List<ComboItem> comboList = new ArrayList<>();
|
||||
comboList.add(new ComboItem(new LocaleString("采购申请"), "purchase_apply"));
|
||||
comboList.add(new ComboItem(new LocaleString("固定资产采购申请"), "gdzc_apply"));
|
||||
comboList.add(new ComboItem(new LocaleString("车辆维修保养申请"), "vehicle_maintain"));
|
||||
comboList.add(new ComboItem(new LocaleString("维修保养申请-非车辆"), "maintain_apply"));
|
||||
comboList.add(new ComboItem(new LocaleString("租车申请"), "car_rental"));
|
||||
comboList.add(new ComboItem(new LocaleString("派车单"), "dispatch_car"));
|
||||
comboList.add(new ComboItem(new LocaleString("费用申请单(兖州机关)"), "zc_morren"));
|
||||
comboList.add(new ComboItem(new LocaleString("工会经费申请"), "union_funding"));
|
||||
ComboEdit comboEdit = getView().getControl("zcgj_apply_type");
|
||||
comboEdit.setComboItems(comboList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package zcgj.zcdev.zcdev.fs.plugin.form;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.LocaleString;
|
||||
import kd.bos.dataentity.metadata.IDataEntityProperty;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.ComboEdit;
|
||||
import kd.bos.form.field.ComboItem;
|
||||
import kd.bos.form.field.RefBillEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工会经费申请单插件
|
||||
*/
|
||||
public class TradefundsPlugin extends AbstractBillPlugIn implements BeforeF7SelectListener {
|
||||
|
||||
@Override
|
||||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
BasedataEdit project = this.getView().getControl("zcgj_funding_apply");//设备维修确认单
|
||||
project.addBeforeF7SelectListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||
ListShowParameter formShowParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
||||
IDataEntityProperty property = beforeF7SelectEvent.getProperty();//过滤字段信息
|
||||
String propertyName = property.getName();//过滤字段标识
|
||||
|
||||
if("zcgj_funding_apply".equals(propertyName)){ //经费申请过滤
|
||||
DynamicObject costcompany = (DynamicObject)this.getModel().getValue("createorg");//创建组织过滤
|
||||
List<QFilter> qFilter = new ArrayList<>();
|
||||
|
||||
/*if(costcompany!=null){
|
||||
Long companyId = costcompany.getLong("id");
|
||||
qFilter.add(new QFilter("zcgj_costcompany", QCP.equals, companyId));
|
||||
}*/
|
||||
|
||||
|
||||
qFilter.add(new QFilter("zcgj_billstatus", QCP.equals, "E"));
|
||||
qFilter.add(new QFilter("zcgj_apply_type", QCP.equals, "union_funding"));
|
||||
formShowParameter.getListFilterParameter().setQFilters(qFilter);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue