src/views/wls/materialstock/data.ts
@@ -108,6 +108,41 @@
      width: 100,
    },
    {
      field: 'frozenQuantity',
      title: '冻结数量',
      width: 100,
      formatter: ({ cellValue }: { cellValue: number }) =>
        (cellValue || 0).toFixed(2),
    },
    {
      field: 'reservedQuantity',
      title: '占用量',
      width: 100,
      formatter: ({ cellValue }: { cellValue: number }) =>
        (cellValue || 0).toFixed(2),
    },
    {
      field: 'inTransitQuantity',
      title: '在途量',
      width: 100,
      formatter: ({ cellValue }: { cellValue: number }) =>
        (cellValue || 0).toFixed(2),
    },
    {
      field: 'availableQuantity',
      title: '可用量',
      width: 100,
      cellRender: {
        name: 'CellText',
        props: {
          class: ({ row }: { row: MesWmMaterialStockApi.MaterialStock }) =>
            (row.availableQuantity || 0) < 0 ? 'text-red-500 font-bold' : '',
          formatter: ({ row }: { row: MesWmMaterialStockApi.MaterialStock }) =>
            ((row.availableQuantity || 0) as number).toFixed(2),
        },
      },
    },
    {
      field: 'unitMeasureName',
      title: '单位',
      width: 80,
@@ -288,6 +323,41 @@
      width: 100,
    },
    {
      field: 'frozenQuantity',
      title: '冻结数量',
      width: 100,
      formatter: ({ cellValue }: { cellValue: number }) =>
        (cellValue || 0).toFixed(2),
    },
    {
      field: 'reservedQuantity',
      title: '占用量',
      width: 100,
      formatter: ({ cellValue }: { cellValue: number }) =>
        (cellValue || 0).toFixed(2),
    },
    {
      field: 'inTransitQuantity',
      title: '在途量',
      width: 100,
      formatter: ({ cellValue }: { cellValue: number }) =>
        (cellValue || 0).toFixed(2),
    },
    {
      field: 'availableQuantity',
      title: '可用量',
      width: 100,
      cellRender: {
        name: 'CellText',
        props: {
          class: ({ row }: { row: MesWmMaterialStockApi.MaterialStock }) =>
            (row.availableQuantity || 0) < 0 ? 'text-red-500 font-bold' : '',
          formatter: ({ row }: { row: MesWmMaterialStockApi.MaterialStock }) =>
            ((row.availableQuantity || 0) as number).toFixed(2),
        },
      },
    },
    {
      field: 'receiptTime',
      title: '入库日期',
      width: 180,