import { ermsMiddelGoodsEdit } from "@/services/proto/delivery";
import { ErmsMiddelGoodsEditReq } from "@/services/proto/delivery/interface";
import { reactive, ref, UnwrapRef } from "vue";
import { FormState } from './interface';
/**
 * 表单
 * @returns 
 */
export function handleForm() {
    const formRef = ref();
    const formState: UnwrapRef<FormState> = reactive({
        needhedgeratio: null,
    })
    const rules = {
        needhedgeratio: [{ required: true, message: '请输入套保比例', trigger: 'blur', type: 'number' }],
    }
    return { rules, formState, formRef }
}

export function modifyAction(param: ErmsMiddelGoodsEditReq) {
    ermsMiddelGoodsEdit(param)
}