import { isString } from "@pureadmin/utils";
import { h } from "vue";
import { ContentConfig } from "/@/components/PageContent";
import {
  // httpDelete,
  // httpStatus,
  httpList,
  httpAdd,
  httpLog,
  httpUpdate
} from "/@/api/mobile/shopStock";
import { STATUS_OPTIONS } from "/@/config/status";
import { ElTag } from "element-plus";
import { renderImage } from "/@/utils/column-helper";
const columns = [
  {
    type: "selection",
    width: 55,
    hide: ({ checkList }) => !checkList.includes("勾选列")
  },
  {
    prop: "good_code",
    label: "商品编码",
    width: 160
  },
  {
    label: "图片",
    prop: "good_cover_img",
    width: 60,
    showOverflowTooltip: true,
    ...renderImage("good_cover_img")
  },
  {
    label: "商品名称",
    prop: "good_name",
    minWidth: 160
  },
  {
    prop: "inventory",
    label: "库存数",
    width: "110px"
  },
  {
    label: "单位",
    prop: "unit",
    width: 80,
    showOverflowTooltip: true
  },
  {
    label: "起订量",
    prop: "moq",
    width: 80,
    showOverflowTooltip: true
  },
  {
    label: "步长",
    prop: "step",
    width: 80,
    showOverflowTooltip: true
  },
  {
    label: "售价",
    prop: "price",
    width: 110,
    showOverflowTooltip: true
  },

  {
    prop: "updatetime",
    label: "更新时间",
    width: "160px"
  },

  {
    label: "操作",
    fixed: "right",
    width: 120,
    slot: "operation"
  }
];
const contentConfig: ContentConfig = {
  title: "商城商品库存",
  columns,
  apis: {
    httpAdd,
    // httpDelete,
    // httpStatus,
    httpList,
    httpLog,
    httpUpdate
  }
};

export default contentConfig;
