package com.yem.wm.syn.eas.form.im;

import kd.bos.bill.AbstractBillPlugIn;
import kd.bos.entity.datamodel.IDataModel;
import kd.bos.form.IFormView;
import kd.bos.form.control.events.BeforeItemClickEvent;

import java.util.EventObject;

/**
 * 配件询价单表单插件
 */
public class ImInQuirylistPJFrom extends AbstractBillPlugIn {

    @Override
    public void addItemClickListeners(String... keys) {
        super.addItemClickListeners(keys);
      //  this.addItemClickListeners("bar_unsubmit");
    }

    @Override
    public void beforeItemClick(BeforeItemClickEvent evt) {
        super.beforeItemClick(evt);
        String itemKey = evt.getItemKey();
        if (!"bar_unsubmit".equals(itemKey)){
            return;
        }
        IFormView view = this.getView();
        IDataModel model = view.getModel();
        Boolean yemIseas = (Boolean) model.getValue("yem_iseas");
        if (yemIseas){
            view.showTipNotification("已同步EAS不允许手动撤销");
            evt.setCancel(true);
        }

    }
}
