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

const columns = [
  {
    prop: 'returnCode',
    label: '退货单号',
    minWidth: '155px'
  },
  {
    prop: 'companyNo',
    label: '业务公司编码',
    minWidth: '155px'
  },
  {
    prop: 'companyName',
    label: '业务公司名称',
    minWidth: '165px'
  },
  {
    prop: 'addtime',
    label: '退货时间',
    minWidth: '155px'
  },
  {
    prop: 'cgdNo',
    label: '采购单编号',
    minWidth: '155px'
  },
  {
    prop: 'supplier_name',
    label: '供应商名称',
    minWidth: '155px'
  },
  {
    prop: 'good_name',
    label: '商品名称',
    minWidth: '155px'
  },
  {
    prop: 'good_num',
    label: '购买数量',
    minWidth: '105px'
  },
  {
    prop: 'is_stock',
    label: '商品库存性质',
    minWidth: '110px',
    cellRenderer({ row }) {
      return Number(row.is_stock) === 1 ? '库存品' : '非库存品';
    }
  },
  {
    prop: 'name',
    label: '采购员所属部门',
    minWidth: '150px'
  },
  {
    prop: 'cgder',
    label: '采购员',
    minWidth: '105px'
  },
  {
    prop: 'num',
    label: '退货数量',
    minWidth: '115px'
  },
  {
    prop: 'send_num',
    label: '已发货数量',
    minWidth: '115px'
  },
  {
    prop: 'result',
    label: '退货原因',
    minWidth: '155px'
  },
  {
    prop: 'is_th',
    label: '供应商是否可以退货',
    minWidth: '155px',
    cellRenderer({ row }) {
      return Number(row.is_th) === 1 ? '可以' : '不可以';
    }
  }
]


const contentConfig: ContentConfig = {
  columns,
  showTitle: false,
  responseCode: 1,
  superUserNoAction: false,
  apis: { httpList: apis.list }
};


export default contentConfig;
