|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | const http = async (sta, items) => { | 
|---|
|  |  |  | console.log(items); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const filZores = items.filter(item => item.outQty  <= 0.0); | 
|---|
|  |  |  | const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme); | 
|---|
|  |  |  | if (filter.length > 0) { | 
|---|
|  |  |  | if (filter.length > 0 || filZores.length > 0) { | 
|---|
|  |  |  | notify(translate('toolbar.request.error.out_stock_qty')) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | width: 100, | 
|---|
|  |  |  | type: 'number', | 
|---|
|  |  |  | editable: true, | 
|---|
|  |  |  | headerClassName: "custom", | 
|---|
|  |  |  | headerClassName: "custom", | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | field: 'anfme', | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const processRowUpdate = (newRow, oldRow) => { | 
|---|
|  |  |  | // 确保outQty不小于0 | 
|---|
|  |  |  | if (newRow.outQty <= 0) { | 
|---|
|  |  |  | notify(translate('request.error.qty_not_negative'), { type: 'error', messageArgs: { _: translate('request.error.qty_not_negative') } }); | 
|---|
|  |  |  | return oldRow; // 如果小于0,保持原值不变 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const rows = tabelData.map((r) => | 
|---|
|  |  |  | r.id === newRow.id ? { ...newRow } : r | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | pageSizeOptions={[15, 25, 50, 100]} | 
|---|
|  |  |  | editMode="row" | 
|---|
|  |  |  | checkboxSelection | 
|---|
|  |  |  | checkboxSelection = {false} | 
|---|
|  |  |  | onRowSelectionModelChange={handleSelectionChange} | 
|---|
|  |  |  | selectionModel={selectedRows} | 
|---|
|  |  |  | sx={{ | 
|---|