Commit 8dbf9940 authored by 靳野's avatar 靳野

feat:库存排序字段调整stock

parent dc359ebb
......@@ -144,24 +144,21 @@ export function column() {
width: 120,
dataIndex: 'stock',
align: 'center',
sorter: (a, b) => a.productStock - b.productStock,
sorter: (a, b) => a.stock - b.stock,
defaultSortOrder: 'ascend',
render: (_, row) => {
// const stockView = row.productStock;
const stockView = (
<Button
type="link"
danger={row.productStock <= 10}
onClick={() => this.onShowStockModal(row)}
style={{ padding: 0 }}
>
<Button type="link" onClick={() => this.onShowStockModal(row)} style={{ padding: 0 }}>
{row.productStock}
</Button>
);
return (
<>
<p>当前库存:{stockView}</p>
<p>可售库存:{_}</p>
<p>
可售库存:<span style={{ color: row.stock <= 10 ? 'red' : '' }}>{_}</span>
</p>
{row.type === 1 && row.productStockWarning > 0 && (
<p>预警值:{row.productStockWarning}</p>
)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment