import { upcloud_base_common,  } from "@/config/serviceSettings";
let grid = {
    labelCol: { span: 8 },
    span: 6
};

export const extendFormItems = [
    { type: 'input', name: 'rcvHeaderId', label: 'rcvHeaderId', value: '', hidden: true, },
    { type: 'input', name: 'srcMtlOwnerName', label: 'srcMtlOwnerName', value: '', hidden: true, },
    { type: 'input', name: 'srcMtlOwnerNum', label: 'srcMtlOwnerNum', value: '', hidden: true, },
    // { type: 'input', name: 'mtlOwnerName', label: 'mtlOwnerName', value: '', hidden: true, },
    { type: 'input', name: 'mtlOwnerNum', label: 'mtlOwnerNum', value: '', hidden: true, },

    { type: "input", name: "deliveryMan", label: "送货人", value: "", disabled: true, ...grid },
    { type: "input", name: "deliveryNum", label: "送货单号", value: "", disabled: true, ...grid },
    { type: "input", name: "deliveryDate", label: "送货时间", value: "", disabled: true, ...grid },

    { type: "input", name: "shipFromAdd", label: "发运地点", value: "", required: false, disabled: true, ...grid },
    {
        type: 'select', name: "shipType", label: "运输方式", value: "", autoLoad: true, ...grid, required: false,
        remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=transport_mode', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "input", name: "carriername", label: "运输单位", value: "", ...grid, required: false,
        // autoLoad: true, remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=transport_agency', method: 'post' },
        // replaceFields: {
        //     value: 'dictCode',
        //     label: 'dictName'
        // },
    },
    {
        type: "input", name: "transportationParty", label: "运输方", value: "", required: false,
        disabled: true, ...grid
    },
    {
        type: "number", name: "onPassageDays", label: "在途时限", value: "", required: false,
        min: 0, ...grid
    },
    {
        type: "date", name: 'shipFromDate', label: "起运时间", value: "", required: false,
        format: 'YYYY-MM-DD', ...grid
    },
    /* 分割 */
    { type: "row", name: "xxxxxxxxxx", label: "", value: "", labelCol: { span: 0 }, span: 24 },
    /* 分割 */
    {
        type: "date", name: 'shipDate', label: "启运时间", value: "", /* required: true, */ showTime: true,
        format: 'YYYY-MM-DD HH:mm', ...grid
    },
    {
        type: "date", name: "shipArriveTime", label: "到货时间", value: "", showTime: true,
        format: 'YYYY-MM-DD HH:mm', ...grid
    },
    {
        type: 'select', name: "tempcontrolMode", label: "温控方式", value: "", autoLoad: true, ...grid,
        remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=tempcontrol_mode', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "input", name: "deviceNo", label: "到货温度设备号", value: "",
        /* disabled: true, */ ...grid
    },
    {
        type: "number", name: 'shipTemPerature', label: "启运温度", value: "", /* precision: 0, */
        /* disabled: true, */ ...grid
    },
    {
        type: "number", name: 'shipArriveTemPerature', label: "到货温度", value: "", /* precision: 0, */
        /* disabled: true, */ ...grid
    },
    {
        type: "select", name: "tempcontrolStatus", label: "温控状态", value: "", autoLoad: true, ...grid,
        remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=tempcontrol_status', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
];
