/* eslint-disable prettier/prettier */
import { ContentConfig } from "/@/components/PageContent";
import apis from "./apis";

const columns = [
  {
    prop: 'addtime',
    label: '下单日期',
    minWidth: '155px'
  },
  {
    prop: 'orderCode',
    label: '订单编号',
    minWidth: '155px'
  },
  {
    prop: 'companyNo',
    label: '业务公司编码',
    minWidth: '155px'
  },
  {
    prop: 'companyName',
    label: '业务公司名称',
    minWidth: '165px'
  },
  {
    prop: 'order_type',
    label: '商品类型',
    width: '100px',
    _slot_: 'order_type'
  },
  {
    prop: 'sendtime',
    label: '发货时间',
    minWidth: '155px'
  },
  {
    prop: 'outcode',
    label: '发货单号',
    minWidth: '155px'
  },
  {
    prop: 'status',
    label: '发货单状态',
    width: '125px',
    cellRenderer({ row }) {
      if (row.status === "待发货") {
        return "待采购备货"
      }

      if (!row.status) {
        return "已取消"
      }

      return row.status;
    }
  },
  {
    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 = {
  columns,
  showTitle: false,
  responseCode: 1,
  superUserNoAction: false,
  apis: { httpList: apis.list }
};


export default contentConfig;
