预付单关联申请插件
This commit is contained in:
parent
39719f98a7
commit
804891979b
|
@ -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("请选择一条关联申请数据。");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue