import { remote } from './remote'
import { grid } from "./common";

export const items = [
  // form 表单
  // ...genwarehouse(),
  {
    type: 'input',
    name: 'dcName',
    label: '仓配中心名称',
    value: '',
    span:6,
		labelCol:{span:6}
  },
  {
    type: 'input',
    name: 'dcCode',
    label: '仓配中心编码',
    value: '',
    span:6,
    labelCol:{span:6}
  },
  {

    type: 'select',
    name: 'isEnable',
    label: '是否启用',
    value: '',
    options: [
      { title: '全部', value: '' },
      { title: '启用', value: '1' },
      { title: '停用', value: '0' }
    ],
    span:6,
    labelCol:{span:6}
  }
];

const addItems = [
  {
    type: 'input',
    name: 'dcCode',
    label: '仓配中心编码',
    required: true,
	// rules: [{len:30,max: 30,message:'限制30字符'}]
  },
  {
    type: 'input',
    name: 'dcName',
    label: '仓配中心名称',
    required: true
  },
  {
    type: 'switch',
    name: 'isEnable',
    value: true,
    required: true,
    label: '是否启用'
  },
  {
    type: 'input',
    name: 'gpsY',
    label: '配送中心经度lng'
  },
  {
    type: 'input',
    name: 'gpsX',
    label: '配送中心纬度lat',
  },
  {
    type: 'input',
    name: 'inDayMaxQuantity',
    label: '日最大收货件数'
  },
  {
    type: 'input',
    name: 'outDayMaxQuantity',
    label: '日最大出货件数'
  },
  {
    label: '省/市/区',
    name: 'province1',
    scopedSlots: { customRender: 'diy' }
  },
  {
    span: 16,
    type: 'textarea',
    name: 'addrs',
    label: '地址',
    labelCol: {
      span: 4
    },
    wrapperCol: {
      span: 20
    }
  },
]
const addItems1 = [
  {
    type: 'input',
    name: 'attribute1',
    label: '预留字段1'
  },
  {
    type: 'input',
    name: 'attribute2',
    label: '预留字段2'
  },
  {
    type: 'input',
    name: 'attribute3',
    label: '预留字段3'
  },
  {
    type: 'input',
    name: 'attribute4',
    label: '预留字段4'
  },

]
const columns = [
  {
    title: '仓配中心编码',
    dataIndex: 'dcCode',
    width: 100,
    scopedSlots: { customRender: 'dcCode' }
  },
  {
    title: '仓配中心名称',
    width: 100,
    dataIndex: 'dcName'
  },
  // {
  //   title: '仓配中心类型',
  //   dataIndex: 'dcType',
  //   width: 100,
  //   scopedSlots: { customRender: 'dcType' }
  // },
  {
    title: '是否启用',
    width: 80,
    dataIndex: 'isEnable',
    scopedSlots: { customRender: 'isEnable' }
  },
  // {
  //   title: '数据访问控制级别',
  //   width: 120,
  //   dataIndex: 'accessLevel',
  //   scopedSlots: { customRender: 'accessLevel' }
  // },
  {
    title: '省',
    width: 100,
    dataIndex: 'province'
  },
  {
    title: '市',
    width: 100,
    dataIndex: 'city'
  },
  {
    title: '区',
    width: 100,
    dataIndex: 'area'
  },
  {
    title: '地址',
    width: 120,
    dataIndex: 'addrs',
    scopedSlots: { customRender: 'addrs' }
  },
  // {
  //   title: '拣货单分单行数',
  //   width: 100,
  //   dataIndex: 'billLines',
  //   scopedSlots: { customRender: 'billLines' }
  // },
  {
    title: '配送中心纬度lat',
    width: 100,
    dataIndex: 'gpsX'
  },
  {
    title: '备注配送中心经度lng',
    width: 120,
    dataIndex: 'gpsY'
  },
  {
    title: '日最大收货件数',
    width: 120,
    dataIndex: 'inDayMaxQuantity'
  },
  {
    title: '日最大出货件数',
    width: 120,
    dataIndex: 'outDayMaxQuantity'
  },
  // {
  //   title: '拣货方式',
  //   width: 120,
  //   dataIndex: 'pickItemRule'
  // },
  // {
  //   title: '预留字段1',
  //   width: 120,
  //   dataIndex: 'attribute1'
  // },
  // {
  //   title: '预留字段2',
  //   width: 120,
  //   dataIndex: 'attribute2'
  // },
  // {
  //   title: '预留字段3',
  //   width: 120,
  //   dataIndex: 'attribute3'
  // },
  // {
  //   title: '预留字段4',
  //   width: 120,
  //   dataIndex: 'attribute4'
  // },
  // {
  //   title: '预留字段5',
  //   width: 120,
  //   dataIndex: 'attribute5'
  // },
  {
    title: '创建人',
    width: 120,
    dataIndex: 'creatorName'
  },
  {
    title: '最后修改人',
    width: 120,
    dataIndex: 'modifierName'
  },
  {
    title: '创建日期',
    width: 120,
    dataIndex: 'gmtCreate'
  },
  {
    title: '最后修改日期',
    width: 120,
    dataIndex: 'gmtModified'
  },
  {
    title: '操作',
    width: 100,
    fixed: 'right',
    dataIndex: 'action',
    scopedSlots: { customRender: 'action' }
  }
]

export { addItems, addItems1, columns }
