package nckd.jxccl.swc.onlineperf.plugin.form;

import kd.bos.form.events.AfterDoOperationEventArgs;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.sdk.plugin.Plugin;
import nckd.jxccl.base.common.constant.FormConstant;

/**
 * 标准单据列表插件
 */
public class OnlinePerfListPlugin extends AbstractListPlugin implements Plugin {

    @Override
    public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
        if(afterDoOperationEventArgs.getOperationResult() != null && afterDoOperationEventArgs.getOperationResult().isSuccess()){
            String operateKey = afterDoOperationEventArgs.getOperateKey();
            if(operateKey.equalsIgnoreCase("unlock")){
                this.getView().invokeOperation(FormConstant.REFRESH_OP);
            }
        }
    }
}