/* eslint-disable prettier/prettier */
import { h } from "vue";
import { ElImage, ElTag } from "element-plus";
import { DescriptionColumns } from "/@/components/BasicDescriptions";
import { FormConfig } from "/@/components/PageSearch";
import { createTooltip } from "/@/utils/tooltip";
import { GOOD_OPTIONS } from "/@/config/status";
import {
  renderStatus,
  renderImage,
  renderImages
} from "/@/utils/column-helper";
// import { payWayOptions, sendWayOptions, supplyAreaOptions } from "./_options";

export const projectFormConfig: FormConfig = {
  labelWidth: "100px",
  formItems: [
    {
      label: "公司卡类型",
      field: "group_id",
      placeholder: "公司卡类型",
      span: 24,
      slot: "group_id"
    },
    {
      label: "商品信息",
      field: "list",
      type: "array",
      placeholder: "商品信息",
      span: 24,
      slot: "list"
    }
  ]
};

export const bargainColumns: DescriptionColumns = [
  {
    field: "account_username",
    label: "账户",
    span: 8
  },

  {
    field: "account_name",
    label: "账户姓名",
    span: 8
  },
  {
    field: "good_code",
    label: "商品编码",
    span: 8
  },

  {
    field: "good_cover_img",
    label: "封面图",
    span: 4,
    render: (_, row) => renderImage("good_cover_img").cellRenderer({ row })
  },
  {
    field: "good_name",
    label: "商品名称",
    span: 20
  },
  {
    field: "unit",
    label: "单位",
    span: 8
  },
  {
    field: "moq",
    label: "起订量",
    span: 8
  },
  {
    field: "step",
    label: "步长",
    span: 8
  },
  {
    field: "price",
    label: "售价",
    span: 8
  },
  {
    field: "inventory",
    label: "当前库存数",
    span: 8
  },
  {
    field: "updatetime",
    label: "更新时间",
    span: 8
  },

  {
    field: "good_banner_img",
    label: "商品轮播图",
    span: 12,
    // render: (_, row) => renderImages("good_banner_img").cellRenderer({ row })
  },
  {
    field: "good_img",
    label: "商品详情图",
    // render: (_, row) => renderImages("good_img").cellRenderer({ row }),
    span: 12
  },
  {
    field: "good_param",
    label: "商品参数",
    span: 12
  },
  {
    field: "good_remark",
    label: "商品备注",
    span: 12
  }
];
