/**
 * @description: 搜索配置
 */
export const search = [
  // 品种名称
  { prop: 'varietyName', label: '品种名称', type: 'input' as const, placeholder: '请输入品种名称' },
]

/**
 * @description: 表格配置
 */
export const tableColumns = [
  // id
  { prop: 'id', label: 'ID', align: 'center' as const },
  // 名称
  { prop: 'varietyName', label: '名称', align: 'center' as const },
  // 编号
  { prop: 'varietyCode', label: '编号', align: 'center' as const },
  //上下线状态
  { slotName: 'onlineStatus', label: '上下线状态', align: 'center' as const },
  // 交易状态
  { slotName: 'tradeStatus', label: '交易状态', align: 'center' as const },
  // 最小点差
  { prop: 'minPoint', label: '最小点差', align: 'center' as const },
  // 最大点差
  { prop: 'maxPoint', label: '最大点差', align: 'center' as const },
  // 合约大小
  { prop: 'contractSize', label: '合约大小', align: 'center' as const },
  // 最小波动
  { prop: 'minFlux', label: '最小波动', align: 'center' as const },
  // 单位
  { prop: 'unit', label: '单位', align: 'center' as const },
  // 交易分组
  { prop: 'tradeGroup', label: '交易分组', align: 'center' as const },
  // 多头库存费
  { prop: 'longStockFee', label: '多头库存费', align: 'center' as const, isNumber: true },
  // 空头库存费
  { prop: 'shortStockFee', label: '空头库存费', align: 'center' as const, isNumber: true },
  // 类型
  { prop: 'type', label: '类型', align: 'center' as const },
  // 止盈水平
  { prop: 'profitLevel', label: '止盈水平', align: 'center' as const },
]

/**
 * @description: dialog表单配置
 */
export const DialogFormItem = [
  // 名称
  { prop: 'varietyName', label: '名称', type: 'input' as const, placeholder: '请输入名称' },
  // 编号
  { prop: 'varietyCode', label: '编号', type: 'input' as const, placeholder: '请输入编号' },
  // 交易分组
  { prop: 'group_id', label: '交易分组', type: 'select' as const, placeholder: '请选择交易分组' },
  // 最大点差
  { prop: 'maxPoint', label: '最大点差', type: 'input' as const, placeholder: '请输入最大点差' },
  // 最小点差
  { prop: 'minPoint', label: '最小点差', type: 'input' as const, placeholder: '请输入最小点差' },
  // 合约大小
  {
    prop: 'contractSize',
    label: '合约大小',
    type: 'input' as const,
    placeholder: '请输入合约大小',
  },
  // 多头库存费
  {
    prop: 'longStockFee',
    label: '多头库存费',
    type: 'input' as const,
    placeholder: '请输入多头库存费',
  },
  // 空头库存费
  {
    prop: 'shortStockFee',
    label: '空头库存费',
    type: 'input' as const,
    placeholder: '请输入空头库存费',
  },
  // 预付款对冲
  {
    prop: 'prepaymentHedge',
    label: '预付款对冲',
    type: 'input' as const,
    placeholder: '请输入预付款对冲',
  },
  // 预付款百分比
  {
    prop: 'prepaymentPercent',
    label: '预付款百分比',
    type: 'input' as const,
    placeholder: '请输入预付款百分比',
  },
  // 小数位
  { prop: 'decimalPlaces', label: '小数位', type: 'input' as const, placeholder: '请输入小数位' },
  // 点差小数位
  {
    prop: 'pointDecimalPlaces',
    label: '点差小数位',
    type: 'input' as const,
    placeholder: '请输入点差小数位',
  },
  // 止盈水平
  { prop: 'profitLevel', label: '止盈水平', type: 'input' as const, placeholder: '请输入止盈水平' },
  // 单位
  { prop: 'unit', label: '单位', type: 'input' as const, placeholder: '请输入单位' },
  // 最小波动
  { prop: 'minFlux', label: '最小波动', type: 'input' as const, placeholder: '请输入最小波动' },
  // 类型
  { prop: 'type', label: '类型', type: 'select' as const, placeholder: '请选择类型' },
  // 库存费收取时间
  {
    prop: 'feeInventoryTime',
    label: '库存费收取时间',
    type: 'time' as const,
    valueFormat: 'HH:mm:ss',
    isRange: false,
  },
  // 上下线状态
  { prop: 'onlineStatus', label: '上下线状态', type: 'switch' as const },
  // 交易状态
  { prop: 'tradeStatus', label: '交易状态', type: 'switch' as const },
  // 是否默认
  { prop: 'isDefault', label: '是否默认', type: 'slot' as const, slotName: 'isDefault' },
  // 上传图片地址
  { prop: 'imageUrl', slotName: 'upload', label: '上传图片', type: 'upload' as const },
]
