2025-07-31 10:07:09 +00:00
|
|
|
package tqq9.lc123.cloud.app.plugin.form.conm;
|
|
|
|
|
|
|
|
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.events.ClosedCallBackEvent;
|
|
|
|
import kd.bos.form.plugin.AbstractFormPlugin;
|
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
|
2025-08-01 05:10:07 +00:00
|
|
|
import java.util.EventObject;
|
2025-07-31 10:07:09 +00:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
2025-08-01 05:10:07 +00:00
|
|
|
* 采购合同表单插件
|
|
|
|
* 点击按钮新增返利规则
|
2025-07-31 10:07:09 +00:00
|
|
|
*/
|
|
|
|
public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements Plugin {
|
2025-08-01 05:10:07 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void registerListener(EventObject e) {
|
|
|
|
super.registerListener(e);
|
|
|
|
this.addItemClickListeners("tqq9_pur_rebate");
|
|
|
|
}
|
2025-07-31 10:07:09 +00:00
|
|
|
@Override
|
|
|
|
public void beforeItemClick(BeforeItemClickEvent evt) {
|
|
|
|
super.beforeItemClick(evt);
|
|
|
|
String itemKey = evt.getItemKey();
|
|
|
|
if ("tqq9_pur_rebate".equals(itemKey)) {
|
|
|
|
FormShowParameter param = new FormShowParameter();
|
|
|
|
param.setFormId("tqq9_pur_rebate");
|
|
|
|
param.setCloseCallBack(new CloseCallBack(this, "syncFilter"));
|
|
|
|
param.getOpenStyle().setShowType(ShowType.Modal);
|
|
|
|
this.getView().showForm(param);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) {
|
|
|
|
super.closedCallBack(closedCallBackEvent);
|
|
|
|
if (closedCallBackEvent.getActionId().equals("syncFilter")) {
|
|
|
|
Object returnData = closedCallBackEvent.getReturnData();
|
|
|
|
if (returnData != null) {
|
|
|
|
Map data = (Map) returnData;
|
|
|
|
//调用接口同步数据
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|