package nckd.jxccl.swc.mas.plugin.form.base;

import kd.bos.entity.datamodel.RowDataEntity;
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.sdk.plugin.Plugin;
import nckd.jxccl.base.common.constant.FormConstant;
import nckd.jxccl.swc.constants.MasConstant;

/**
* 延期支付比例
* 实体标识：nckd_deferpayratioconf
* @author W.Y.C
* @date 2026/1/14 14:28
* @version 1.0
*/
public class DeferPayratioConfFormPlugin extends AbstractFormPlugin implements Plugin {

    @Override
    public void afterAddRow(AfterAddRowEventArgs e) {
        int rowCount = this.getModel().getEntryRowCount(FormConstant.NCKD_ENTRYENTITY);
        for (RowDataEntity rowDataEntity : e.getRowDataEntities()) {
            int rowIndex = rowDataEntity.getRowIndex();
            this.getModel().setValue(MasConstant.NCKD_TIMES, rowCount, rowIndex);
        }
    }
}