import { ContentConfig } from "/@/components/PageContent";
import { httpAccountList, httpAccounDelete } from "/@/api/purchase/orderPay";


const columns = [
  {
    type: "selection",
    width: 40,
    align: "center",
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    label: "序号",
    type: "index",
    minWidth: 60,
    align: "left",
    hide: ({ checkList }) => !checkList.includes("序号列")
  },

  {
    label: "采购员",
    prop: "uname",
    width: 120,
  },
  {
    label: "月份",
    prop: "day_time",
    width: 120,
  },
  {
    label: "开票金额",
    prop: "inv_fee",
    minWidth: 150
  },
  {
    label: "退票金额",
    prop: "return_inv_fee",
    minWidth: 130
  },
  {
    label: "开票成本金额",
    prop: "cost_fee",
    minWidth: 110,
    align: "left"
  },
  {
    label: "退票成本金额",
    prop: "return_cost_fee",
    minWidth: 110
  },
  {
    label: "创建人",
    prop: "creater",
    minWidth: 110
  },
  {
    label: "操作",
    fixed: "right",
    width: 80,
    slot: "operation"
  }
];

const contentConfig: ContentConfig = {
  columns,
  listNoRelation: true,
  responseCode: 1,
  apis: {
    httpList: (data) => httpAccountList(data),
    httpDelete: httpAccounDelete,
    httpUpdate: true,
    httpAdd: true
  }
};

export default contentConfig;
