import {
  orderStatus
} from '@/assets/js/blockSort'
export const employee = () => {
  return [{
    field: 'index',
    label: '编号',
    align: 'center',
  }, {
    field: 'state',
    operation: true,
    label: '状态',
    align: 'center',
    colWidth: '150px',
    options: orderStatus(),
  }, {
    field: 'customer.type',
    operation: true,
    label: '客户类型',
    align: 'center',
    colWidth: '120px',
    options: [{
        label: '商户',
        value: 0,
      },
      {
        label: '私人',
        value: 1,
      }
    ]
  }, {
    field: 'customer.name',
    label: '客户名称',
    align: 'center',
    colWidth: '150px',
  }, {
    field: 'customer.principalPhone',
    label: '客户电话',
    align: 'center',
    colWidth: '200px',
  }, {
    field: 'address',
    label: '客户地址',
    align: 'center',
    colWidth: '240px',
  }, {
    field: 'store.name',
    label: '配送门店',
    align: 'center',
    colWidth: '200px',
  }, {
    field: 'user.nickName',
    label: '配送人员',
    align: 'center',
    colWidth: '150px',
  }, {
    field: 'goods.name',
    label: '商品',
    align: 'center',
    colWidth: '150px',
  }, {
    field: 'quantity',
    label: '数量',
    align: 'center',
    colWidth: '150px',
  }, {
    field: 'orderTime',
    label: '下单时间',
    align: 'center',
    colWidth: '200px',
  }, {
    field: 'action',
    label: '操作',
    colWidth: '130px',
    align: 'center',
    labelButton: [{
      type: 'logs',
      label: '查看',
      icon: 'el-icon-tickets',
      style: 'info',
    }]
  }]
}
export const formRules = () => {
  return [{
    label: '客户信息',
    type: 'divider',
    colWidth: 24,
  }, {
    field: 'name',
    label: '名字:',
    type: 'descriptions',
    colWidth: 12,
  }, {
    field: 'phone',
    label: '电话:',
    type: 'descriptions',
    colWidth: 12,
  }, {
    field: 'cityRegion',
    label: '所属区/县:',
    type: 'descriptions',
    colWidth: 12,
  }, {
    field: 'address',
    label: '地址:',
    type: 'descriptions',
    colWidth: 12,
  }, {
    type: 'dividingSlot',
    colWidth: 24,
  }, {
    label: '订单信息',
    type: 'divider',
    colWidth: 24,
  }, {
    field: 'goodsId',
    type: 'descriptions',
    label: '商品',
    colWidth: 12,
  }, {
    field: 'quantity',
    label: '数量',
    type: 'descriptions',
    colWidth: 12,
  }, {
    field: 'storeId',
    type: 'prdfterence',
    label: '配送门店',
    colWidth: 12,
    options: [],
  }, {
    field: 'userId',
    type: 'prdfterence',
    label: '配送员',
    colWidth: 12,
    options: [],
  }, {
    field: 'state',
    label: '状态',
    type: 'prdfterence',
    colWidth: 24,
    options: orderStatus(),
  }, {
    field: 'remark',
    label: '备注',
    type: 'descriptions',
    colWidth: 24,
  }, ]
}
