import { ContentConfig } from "/@/components/PageContent";
import { createHttpRequset } from "../../../_http/createRequset";
import { xs_order_type_options } from "/@/utils/status";

const columns = [
  // {
  //   type: "expand",
  //   _slot_: "expand",
  //   fixed: "left",
  //   _noset_: true,
  // },
  // {
  //   type: "selection",
  //   fixed: "left",
  //   _noset_: true
  // },
  {
    prop: "addtime",
    label: "下单日期",
    minWidth: "155px"
  },
  {
    prop: "orderCode",
    label: "订单编号",
    minWidth: "155px"
  },
  {
    prop: "order_type",
    label: "商品类型",
    width: "100px",
    _slot_: "order_type",
    cellRenderer({ row }) {
      console.log(row);
      return (
        xs_order_type_options.find(({ value }) => value === row.order_type)
          ?.label || "--"
      );
    }
  },
  {
    prop: "sendtime",
    label: "发货时间",
    minWidth: "155px"
  },
  {
    prop: "outCode",
    label: "发货单号",
    minWidth: "155px"
  },
  {
    prop: "status",
    label: "发货单状态",
    minWidth: "155px"
  },
  {
    prop: "good_name",
    label: "商品名称",
    minWidth: "155px"
  },
  {
    prop: "sale_price",
    label: "产品单价",
    minWidth: "155px"
  },
  {
    prop: "send_num",
    label: "发货数量",
    minWidth: "155px"
  },
  {
    prop: "send_total_price",
    label: "发货单总价",
    minWidth: "155px"
  },
  {
    prop: "apply_name",
    label: "申请人",
    minWidth: "155px"
  },
  {
    prop: "apply_company",
    label: "申请人所属部门",
    minWidth: "155px"
  },
  {
    prop: "cgder",
    label: "采购人",
    minWidth: "155px"
  },
  {
    prop: "post_name",
    label: "快递公司",
    minWidth: "155px"
  },
  {
    prop: "post_code",
    label: "快递单号",
    minWidth: "155px"
  },

  {
    prop: "contactor",
    label: "收货人",
    minWidth: "155px"
  },
  {
    prop: "mobile",
    label: "收货电话",
    minWidth: "155px"
  },
  {
    prop: "addr",
    label: "收货地址",
    minWidth: "155px"
  },
  {
    prop: "remark",
    label: "备注",
    minWidth: "155px"
  }
];

const contentConfig: ContentConfig = {
  notPagination: true,
  superUserNoAction: false,
  notNeedCompanyFilter: true,
  columns,
  apis: {
    httpList: createHttpRequset("seooa")
  }
};

export default contentConfig;
