import { SubmitCustomerFeeSetModel } from "@/api/customerfee/CustomerFeeSetModel"
import { reactive } from "vue";

export default function useBaseModel() {
    //表单验证
    const rules = reactive({       
        productId:[{
            required: true,
            message: '请选择产品',
            trigger:'change'
        },       
        ],
        feeSetName:[
            {required: true, message: '请填写费用名称',trigger:'change'},          
        ],
        feeSetType:[{
            required: true,
            message: '请选择费用类型',
            trigger:'change'
        },       
        ],       
        beginDate:[
            {required: true, message: '请选择日期',trigger:'change'}
        ]
    });
    //表单数据
    const dialogModel = reactive<SubmitCustomerFeeSetModel>({
        id: '',       
        productId: '',
        productName:'',
        feeSetName:'',  
        groupId:'',
        orgId:'',
        orgName:'',
        customerId:'',
        feeSetType:0,
        beginDate:'',
        endDate:'',
        isLast:false,
        remark:'',
        activeFlag:false,
        createUserId:0,
        createTime:'',
        updateUserId:0,
        updateTime:'',
        feeBasicData:'',
        feeItemComputeList:[],
        feeItemComputeDetailsList:[],
        partitionList:[],
        parentId:'',
        type:"0"
    })

    return {
        rules,
        dialogModel
    }
}