Compare commits
3 Commits
cec3803e54
...
6870eb3602
Author | SHA1 | Date |
---|---|---|
|
6870eb3602 | |
|
804891979b | |
|
39719f98a7 |
|
@ -0,0 +1,63 @@
|
||||||
|
package zcgj.zcdev.zcdev.fs.plugin.form;
|
||||||
|
|
||||||
|
import kd.bos.bill.AbstractBillPlugIn;
|
||||||
|
import kd.bos.bill.BillShowParameter;
|
||||||
|
import kd.bos.context.RequestContext;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.entity.operate.Submit;
|
||||||
|
import kd.bos.form.ShowType;
|
||||||
|
import kd.bos.form.control.EntryGrid;
|
||||||
|
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||||
|
import kd.bos.form.events.HyperLinkClickEvent;
|
||||||
|
import kd.bos.form.events.HyperLinkClickListener;
|
||||||
|
import kd.bos.form.field.BasedataEdit;
|
||||||
|
import kd.bos.form.field.RefBillEdit;
|
||||||
|
import kd.bos.logging.Log;
|
||||||
|
import kd.bos.logging.LogFactory;
|
||||||
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
|
import kd.sdk.plugin.Plugin;
|
||||||
|
import zcgj.zcdev.zcdev.fs.utils.OrgCheckUtils;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.EventObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预付单关联申请插件
|
||||||
|
*/
|
||||||
|
public class PrepaybillWriteoffapplyPlugin extends AbstractBillPlugIn implements Plugin, HyperLinkClickListener {
|
||||||
|
|
||||||
|
private static final Log log = LogFactory.getLog(PrepaybillWriteoffapplyPlugin.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerListener(EventObject e) {
|
||||||
|
super.registerListener(e);
|
||||||
|
EntryGrid control = this.getControl("zcgj_writeoffapply");
|
||||||
|
control.addHyperClickListener(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void hyperLinkClick(HyperLinkClickEvent hyperLinkClickEvent) {
|
||||||
|
String fieldName = hyperLinkClickEvent.getFieldName();
|
||||||
|
EntryGrid entryGrid = getView().getControl("zcgj_writeoffapply");
|
||||||
|
int[] selectRows = entryGrid.getSelectRows();
|
||||||
|
if(selectRows != null && selectRows.length == 1){
|
||||||
|
DynamicObjectCollection dynamicObjectCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_writeoffapply");
|
||||||
|
DynamicObject dynamicObject = dynamicObjectCollection.get(selectRows[0]);
|
||||||
|
String zcgjApplybillno = dynamicObject.getString("zcgj_applybillno");
|
||||||
|
long sourceapplybillid = dynamicObject.getLong("zcgj_sourceapplybillid");
|
||||||
|
if(sourceapplybillid != 0){
|
||||||
|
//弹出发票详情
|
||||||
|
BillShowParameter showParameter = new BillShowParameter();
|
||||||
|
showParameter.setPkId(sourceapplybillid);
|
||||||
|
showParameter.setFormId("er_dailyapplybill");
|
||||||
|
showParameter.getOpenStyle().setShowType(ShowType.MainNewTabPage); //打开方式
|
||||||
|
getView().showForm(showParameter);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.getView().showTipNotification("请选择一条关联申请数据。");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -65,7 +65,8 @@ public class TripreimbursebillIsInvoiceDateCheckOp extends AbstractOperationServ
|
||||||
if(costcompanyObj!=null && costdeptObj != null){
|
if(costcompanyObj!=null && costdeptObj != null){
|
||||||
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
DynamicObject costcompany = (DynamicObject)costcompanyObj;
|
||||||
long costcompanyId = costcompany.getLong("id");
|
long costcompanyId = costcompany.getLong("id");
|
||||||
if(OrgCheckUtils.isKS(costcompanyId)){
|
String number = costcompany.getString("number");
|
||||||
|
if(OrgCheckUtils.isKS(costcompanyId) && !number.equals("10006476")){
|
||||||
List<String> errorList = new ArrayList<>();
|
List<String> errorList = new ArrayList<>();
|
||||||
//行程明细,会有多个明细
|
//行程明细,会有多个明细
|
||||||
DynamicObjectCollection tripentry = dataEntity.getDynamicObjectCollection("tripentry");
|
DynamicObjectCollection tripentry = dataEntity.getDynamicObjectCollection("tripentry");
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package zcgj.zcdev.zcdev.fs.plugin.other;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.bos.dataentity.utils.OrmUtils;
|
||||||
|
import kd.bos.entity.ExtendedDataEntity;
|
||||||
|
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
|
||||||
|
import kd.bos.entity.botp.plugin.args.AfterBuildDrawFilterEventArgs;
|
||||||
|
import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs;
|
||||||
|
import kd.bos.entity.botp.plugin.args.BeforeBuildRowConditionEventArgs;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预付单上拉费用申请单botp插件
|
||||||
|
*/
|
||||||
|
public class PrepaybillWriteoffapplyBotpPlugin extends AbstractConvertPlugIn {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterBuildDrawFilter(AfterBuildDrawFilterEventArgs e) {
|
||||||
|
//选单过滤
|
||||||
|
super.afterBuildDrawFilter(e);
|
||||||
|
System.out.println("afterBuildDrawFilter——>");
|
||||||
|
QFilter plugFilter = e.getPlugFilter();//插件追加的选单条件
|
||||||
|
String sourceLayout = e.getSourceLayout();//获取插件设置的选单时打开的源单列表布局
|
||||||
|
DynamicObject targetDataEntity = e.getTargetDataEntity();//当前数据包
|
||||||
|
DynamicObjectCollection writeoffapplyCollection = targetDataEntity.getDynamicObjectCollection("zcgj_writeoffapply");
|
||||||
|
List<Long> ids = new ArrayList<>();
|
||||||
|
for (DynamicObject dynamicObject : writeoffapplyCollection) {
|
||||||
|
long aLong = dynamicObject.getLong("zcgj_sourceapplybillid");
|
||||||
|
ids.add(aLong);
|
||||||
|
}
|
||||||
|
QFilter filter = new QFilter("id", QCP.not_in, ids);
|
||||||
|
e.setPlugFilter(filter);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue