import { api } from "../../../api/common/dictionaries-type";
import { abcType } from "./selects";

let grid = {
    labelCol: { span: 10 },
    wrapperCol: { span: 14 },
    span: 6
};

export const logistics = [
    {
        type: "select", name: "storeTemperature", label: "存储条件", value: "",
        ...grid,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=wms_storagecondition', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "select", name: "segment42", label: "贮藏条件", value: "",
        ...grid,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=wms_storagecondition', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "input", name: "storeUnit", label: "库存单位", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "select", name: "codeCollectMode", label: "码采集", value: "",
        ...grid,
        autoLoad: true,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=ettscodeflag', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "number", name: "shelfLifeDays", label: "保质期(天)", value: "", min: 0,
        ...grid
    },
    {
        type: "number", name: "unsaleDay", label: "滞销期(天)", value: "", min: 0,
        ...grid
    },
    {
        type: "input", name: "inStoreDay", label: "入库预警保质期", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "nearExpiryDate", label: "近效期(天)", value: "", maxLength: 10,
        ...grid
    },
//       //   todo 近效期(天)
//   {
//     type: 'number',
//     name: '近效期(天)',
//     label: '近效期(天)',
//     value: '',
//     min: 0,
//     ...grid,
//   },
    {
        type: "select", name: "expiryDateTrackLevel", label: "有效跟踪级别", value: "",
        ...grid,
        autoLoad: true,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=datetracklevel', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "select", name: "qcGroup", label: "质检分组", value: "",
        ...grid,
        autoLoad: true,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=qa_group', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "select", name: "palletPlacedRule", label: "托盘码放规则", value: "",
        ...grid,
        autoLoad: true,
        remoteUrl: { url: api.queryDictList + '?dicttypeCodes=stacktype', method: 'post' },
        replaceFields: {
            value: 'dictCode',
            label: 'dictName'
        },
    },
    {
        type: "input", name: "palletStdQuantity", label: "标准托盘量", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "stdCaseFactor", label: "标准箱系数", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "itemTemperatureHigh", label: "温控区间(上限)", value: "", maxLength: 10,
        ...grid
    },
    {
        type: "input", name: "itemTemperatureLow", label: "温控区间(下限)", value: "", maxLength: 10,
        ...grid
  },
  { ...abcType, ...grid },
      // todo     是否缠膜
  // {
  //   type: 'select',
  //   name: 'sfCm',
  //   label: '是否缠膜',
  //   value: '',
  //   ...grid,
  //   autoLoad: true,
  //   options: [
  //       {label: '是', value: '1'},
  //       {label: '否', value: '0'}
  //     ],
  // },
  //todo 拆零ABC属性
  {
    type: 'input',
    name: 'abcType',
    label: '拆零ABC属性',
    value: '',
    ...grid,
    autoLoad: true,
    remoteUrl: { url: api.queryDictList + '?dicttypeCodes=abcgroup', method: 'post' },
    replaceFields: {
      value: 'dictCode',
      label: 'dictName',
    },
  },
  {
    type: "number", name: "attribute42", label: "面积系数", value: "", min: 0, max: 1,
    ...grid,
  },
    {
        type: "SwitchValue", name: "isLock", label: "商品是否锁定", value: 0,
        ...grid
    },
    {
        type: "SwitchValue", name: "isHosted", label: "商品是否代管", value: 0,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsRecheck", label: "商品是否复检", value: 0,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsWeight", label: "是否重物", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsDangerous", label: "是否危险品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsFragile", label: "是否易碎", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsImported", label: "是否进口", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsGift", label: "是否赠品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsValuable", label: "是否贵重物品", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsWeighed", label: "是否称重", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsSpecial", label: "是否特殊品种", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsSpecialSharped", label: "是否异型", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsBatch", label: "是否批号", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsSeque", label: "是否序列号管理", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsExpire", label: "是否效期管理", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsLot", label: "是否批次", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "reacallIsEnable", label: "召回标识", value: 1,
        ...grid
    },
    {
        type: "SwitchValue", name: "itemIsUnpack", label: "是否允许拆中包装", value: 1,
        ...grid
    },
    {
        // type: "SwitchValue", name: "isCaseOrPiece", label: "是否整散分离", value: 1,
        type: "SwitchValue", name: "isCaseOrPiece", label: "是否整散合一", value: 1,
        ...grid
    }
];