package nckd.jxccl.hr.hdm.plugin.form.transfer;

import kd.bos.bill.BillShowParameter;
import kd.bos.form.ShowType;
import kd.bos.form.events.AfterDoOperationEventArgs;
import kd.bos.list.plugin.AbstractListPlugin;
import nckd.jxccl.hr.hdm.common.transfer.TransferApplyBillConstant;

/**
 *
 * @entity:
 * @author: jtd
 * @date: 2026/1/13 20:05
 */
public class TransferApplyBillListPlugin extends AbstractListPlugin {

    @Override
    public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
        super.afterDoOperation(afterDoOperationEventArgs);

        String operateKey = afterDoOperationEventArgs.getOperateKey();
        switch (operateKey) {
            case TransferApplyBillConstant.SECONDARY_UNIT_TRANSFER_OP:
            case TransferApplyBillConstant.CROSS_SECONDARY_UNIT_TRANSFER_OP:
                BillShowParameter billShowParameter = new BillShowParameter();
                billShowParameter.setFormId(TransferApplyBillConstant.HDM_TRANSFERAPPLY);
                billShowParameter.getOpenStyle().setShowType(ShowType.Modal);
                billShowParameter.setCustomParam("OperateKey", operateKey);
                getView().showForm(billShowParameter);
        }
    }
}
