5 天以前 91c82965b2d987452ca276e3a03b48c8dcda2ae9
src/views/crm/product/components/data.ts
@@ -14,7 +14,7 @@
      title: '物料编码',
    },
    {
      field: 'itemBarCode',
      field: 'barCode',
      title: '物料条码',
    },
    {
@@ -52,7 +52,22 @@
}
/** 产品编辑表格的列定义 */
export function useProductEditTableColumns(): VxeTableGridOptions['columns'] {
export function useProductEditTableColumns(
  showBusinessPrice: boolean = false,
): VxeTableGridOptions['columns'] {
  const priceColumn = showBusinessPrice
    ? {
        field: 'businessPrice',
        title: '商机价格(元)',
        minWidth: 100,
        slots: { default: 'businessPrice' },
      }
    : {
        field: 'contractPrice',
        title: '合同价(元)',
        minWidth: 100,
        slots: { default: 'contractPrice' },
      };
  return [
    { type: 'seq', title: '序号', minWidth: 50 },
    {
@@ -87,12 +102,7 @@
      minWidth: 100,
      formatter: 'formatAmount2',
    },
    {
      field: 'contractPrice',
      title: '合同价(元)',
      minWidth: 100,
      slots: { default: 'contractPrice' },
    },
    priceColumn,
    {
      field: 'count',
      title: '数量',