interface FormItem {
    prop?: string;
    label?: string;
    placeholder?: string;
    type: string;
    isCopy?: boolean;
    optionProps?: any;
    startPlaceholder?: string;
    endPlaceholder?: string;
    options?: any;
    isArray?: boolean;
    isTime?: boolean; //用于切割日期数组
    startDate?: string; //开始时间(传入后台需要的参数)
    endDate?: string; //结束时间(传入后台需要的参数)
    startProp?: string;
    endProp?: string;
}
export const FORM_DATA: FormItem[] = [
    {
        startProp: "boxBeginNo",
        endProp: "boxEndNo",
        startPlaceholder: "箱码区间值",
        endPlaceholder: "箱码区间值",
        type: "inputs",
        label: "箱码: "
    },
    {
        prop: "status",
        placeholder: "请选择装箱状态",
        type: "select",
        label: "装箱状态: ",
        options: [
            {
                label: "已完成",
                value: 2
            },
            {
                label: "未完成",
                value: 1
            },
            {
                label: "未使用",
                value: 0
            }
        ]
    },

    {
        prop: "Time",
        type: "daterange",
        options: [],
        startPlaceholder: "日期",
        endPlaceholder: "日期",
        startDate: "createBeginDate",
        endDate: "createEndDate",
        label: "箱号生成日期: "
    },
    {
        prop: "Time1",
        type: "daterange",
        options: [],
        startPlaceholder: "日期",
        endPlaceholder: "日期",
        startDate: "cartonBeginDate",
        endDate: "cartonEndDate",
        label: "装箱完成日期: "
    },
    {
        prop: "materialNumber",
        placeholder: "请输入物料名称/规格型号/编码",
        type: "input",
        label: "物料: "
    },
    {
        prop: "serialNumbers",
        placeholder: "请输入序列号",
        type: "input",
        isArray: true,
        label: "序列号: "
    },
    {
        prop: "boxPrintStatus",
        placeholder: "请选择打印状态",
        type: "select",
        options: [
            {
                label: "打印",
                value: "true"
            },
            {
                label: "未打印",
                value: "false"
            }
        ],
        label: "箱号打印状态: "
    },
    {
        prop: "supplierOrOrg",
        placeholder: "请输入供应商",
        type: "selectRemote",
        options: [],
        label: "供应商: "
    },
    {
        prop: "createUser",
        placeholder: "请输入生成人",
        type: "input",
        label: "生成人: "
    }
];

export const RULE_FORM = {
    pageNo: 1,
    pageSize: 50,
    createUser: ""
};

export const NUM_RULE_FORM = {
    number: null,
    orgCode: 0
};
//numberRules
export const NUM_RULES = {
    number: [
        { required: true, message: "數量不能为空 !", trigger: "blur" }
        // { min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" }
    ]
};

// export const PACKING_RULE_FORM = {
//     boxCodeNumber: "",
//     isCarton: false
// };
