import { ContentConfig } from "/@/components/PageDetail";
import { httpDetail } from "/@/api/mobile/exchangeOrder";
import { createStatus } from "/@/utils/tooltip";
import { ORDER_OPTIONS, ORDER_TYPE_OPTIONS } from "/@/config/status";
const columns = [
  {
    field: "orderCode",
    label: "订单编号",
    span: 8
  },
  {
    label: "订单状态",
    field: "status",
    span: 8,
    render: status => createStatus(ORDER_OPTIONS, status)
  },
  {
    label: "订单类型",
    field: "type",
    span: 8,
    render: type => createStatus(ORDER_TYPE_OPTIONS, type)
  },

  {
    label: "创建时间",
    field: "addtime",
    span: 8
  },
  {
    field: "num",
    label: "数量",
    span: 8
  },
  {
    field: "num1",
    label: "单价",
    span: 8
  },
  {
    label: "物流公司",
    field: "post_name",
    span: 8
  },
  {
    label: "物流编码",
    field: "post_code",
    span: 8
  },
  {
    label: "收货联系人",
    field: "contactor",
    span: 8
  },

  {
    field: "mobile",
    label: "联系电话",
    span: 8
  },
  {
    field: "addr",
    label: "收货地址",
    span: 16,
    render: (_, { addr_name, addr }) => addr_name + addr
  },

  {
    field: "addr",
    label: "备注",
    span: 24
  }
];
const orderDetailConfig: ContentConfig = {
  columns,
  apis: {
    httpDetail
  }
};

export default orderDetailConfig;
