export const handleAddDisNo = (datas: any) => {
    datas.formData.forEach((item: any) => {
        item.disabled = false;
    });
    datas.formData1.forEach((item: any) => {
        item.disabled = false;
    });

    datas.formData3.forEach((item: any) => {
        item.disabled = false;
    });
};
export const handleGenerateDisYes = (datas: any) => {
    datas.formData.forEach((item: any) => {
        item.disabled = true;
    });
    datas.formData1.forEach((item: any) => {
        item.disabled = true;
    });

    datas.formData3.forEach((item: any) => {
        item.disabled = true;
    });
};

export const initFormData = (datas: any) => {
    for (let key in datas.ruleForm) {
        datas.ruleForm[key] = "";
    }
};

export const initNumberCode = (datas: any) => {
    datas.formData4[0].startDisabled = true;
    datas.ruleForm.beginNumber = "";
    datas.ruleForm.endNumber = "";
};
export const getEndNumber = (datas: any) => {
    if (datas.ruleForm.productQty && datas.ruleForm.beginNumber) {
        let endNumber = Number(datas.ruleForm.productQty) + Number(datas.ruleForm.beginNumber);
        datas.ruleForm.endNumber = endNumber - 1;
    }
};
export const setStartDisabled = (datas: any) => {
    datas.formData4[0].startDisabled = false;
};
