lc/lc123/cloud/app/plugin/form/conm/purconmAddRebateRulesPlugin...

54 lines
1.7 KiB
Java

package tqq9.lc123.cloud.app.plugin.form.conm;
import kd.bos.bill.BillShowParameter;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.form.CloseCallBack;
import kd.bos.form.FormShowParameter;
import kd.bos.form.ShowType;
import kd.bos.form.control.events.BeforeItemClickEvent;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.events.ClosedCallBackEvent;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.sdk.plugin.Plugin;
import java.util.EventObject;
import java.util.Map;
/**
* 采购合同表单插件
* 点击按钮新增返利规则
*/
public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements Plugin {
private final static Log logger = LogFactory.getLog(purconmAddRebateRulesPlugin.class);
@Override
public void registerListener(EventObject e) {
super.registerListener(e);
this.addItemClickListeners("tbmain");
}
@Override
public void itemClick(ItemClickEvent evt) {
super.itemClick(evt);
String itemKey = evt.getItemKey();
if ("tqq9_pur_rebate".equals(itemKey)) {
// FormShowParameter param = new FormShowParameter();
BillShowParameter param = new BillShowParameter();
param.setFormId("tqq9_pur_rebate");
param.setCustomParam("purcontract_billno", this.getModel().getValue("billno"));
param.setCloseCallBack(new CloseCallBack(this, "rebateSync"));
param.getOpenStyle().setShowType(ShowType.Modal);
this.getView().showForm(param);
}
}
}