import { ModalConfig } from "/@/components/ListModal";
import { httpLog } from "/@/api/mobile/exchangeStock";
import { FormConfig } from "/@/components/PageSearch";
import { ContentConfig } from "/@/components/PageContent";
import { FLAG_OPTIONS, FLAG_SOURCE_OPTIONS } from "/@/config/status";
import { renderStatus } from "/@/utils/column-helper";
const searchFormConfig: FormConfig = {
  isHide: true,
  formItems: []
};
const columns = [
  {
    prop: "good_code",
    label: "商品编码",
    width: 160
  },
  {
    label: "商品名称",
    prop: "good_name",
    minWidth: 160
  },

  {
    prop: "before_inventory",
    label: "修改前库存",
    width: "110px"
  },
  {
    prop: "flag",
    label: "修改方式",
    ...renderStatus(FLAG_OPTIONS, "flag"),
    width: "70px"
  },
  {
    prop: "after_inventory",
    label: "修改后库存",
    width: "110px"
  },
  {
    prop: "source",
    label: "操作来源",
    ...renderStatus(FLAG_SOURCE_OPTIONS, "source"),
    width: "110px"
  },

  {
    prop: "addtime",
    label: "操作时间",
    width: "140px"
  }
];
const contentConfig: ContentConfig = {
  title: "卡类型管理",
  notReuqiredInit: true,
  columns,
  apis: {
    httpList: httpLog
  }
};

const ListModalConfig: ModalConfig = {
  title: "库存修改记录",
  searchConfig: searchFormConfig,
  contentConfig: contentConfig
};

export default ListModalConfig;
