import { reactive } from 'vue'

export const formData = reactive({
    acreg: '',
    af: 0,
    airConditioning: undefined,
    airStarter: undefined,
    aircaraftoperator: '',
    customerSignImg: '',
    date: '',
    diversion: 0,
    flightNoIn: '',
    flightNoOut: '',
    groundPower: undefined,
    id: 0,
    legs: '',
    model: '',
    nickname: '',
    onCall: 0,
    others1: '',
    others2: '',
    pf: 0,
    remark: '',
    returnFlight: 0,
    serviceAf: 0,
    servicePf: 0,
    serviceTr: 0,
    station: '',
    towPus: undefined,
    tr: 1,
    username: ''
})

export const rules = reactive({
    station: [
        {
            required: true,
            message: '请选择航站',
            trigger: ['blur', 'change']
        }
    ],
    date: [
        {
            type: 'number',
            required: true,
            message: '请选择日期',
            trigger: ['blur', 'change']
        }
    ],
    acreg: [
        {
            required: true,
            message: '请选择机号',
            trigger: ['blur', 'change']
        }
    ],
    aircaraftoperator: [
        {
            required: true,
            message: '请选择飞机所属单位',
            trigger: ['blur', 'change']
        }
    ],
    model: [
        {
            required: true,
            message: '请选择机型',
            trigger: ['blur', 'change']
        }
    ],
    flightNoIn: [
        {
            required: true,
            message: '请选择进港航班号',
            trigger: ['blur', 'change']
        }
    ]
})
