import {upcloud_base_wh,upcloud_base_common} from "@/config/serviceSettings";
// 逻辑区 ——> 依赖 库区

export const warehouseLogic = {

    remoteUrl: { url: upcloud_base_wh+'/baseWmsWarehouseLogic/page2', method: 'get' },


    // 组件用于form组件时，隐藏表单项含id code
    items: [
        { hidden: true, type: 'input', name: 'warehouseLogicId', label: 'ID', value: '' },
        { hidden: true, type: 'input', name: 'warehouseLogicCode', label: '编码', value: '' },
    ],

    // seach-modal配置
    defSearchConfig: {
        name: 'warehouseLogicName',
        label: '逻辑区',
        title: '逻辑区',
        value: '',
        rowKey: 'warehouseLogicId',
        destroyOnClose: true,
        targetClick: true,
        targetValueKey: 'warehouseLogicName',
    },

    // modal的搜索栏
    defToolBar: {
        items: [
            { type: 'input', name: 'warehouseLogicName', label: '名称', value: '' },
            { type: 'input', name: 'warehouseLogicCode', label: '编码', value: '' }
        ]
    },

    // modal的table配置
    defTableCol: [
        { dataIndex: 'warehouseLogicId', title: 'ID', hidden: true },
        { dataIndex: 'warehouseLogicName', title: '逻辑区名称' },
        { dataIndex: 'warehouseLogicCode', title: '逻辑区编码' },
        {
            dataIndex: 'warehouseLogicType', title: '逻辑区类型',
            remoteUrl: { url: upcloud_base_common+'/dict/listbytype?dicttypeCodes=stroragegroup', method: 'post' },
            replaceFields: {
                value: 'dictCode',
                label: 'dictName'
            }
        }
    ]

};

