From 0cd6dfd544b900ff66682881fe4d6df0b90e386d Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 14 八月 2025 11:21:02 +0800
Subject: [PATCH] no message
---
rsf-admin/src/page/dashboard/NbList.jsx | 65 +++++++++++++++++++++++---------
1 files changed, 46 insertions(+), 19 deletions(-)
diff --git a/rsf-admin/src/page/dashboard/NbList.jsx b/rsf-admin/src/page/dashboard/NbList.jsx
index 9bb7024..4cb2005 100644
--- a/rsf-admin/src/page/dashboard/NbList.jsx
+++ b/rsf-admin/src/page/dashboard/NbList.jsx
@@ -5,25 +5,25 @@
ListItemSecondaryAction,
ListItemAvatar,
ListItemText,
+ Typography,
Avatar,
Box,
ListItemButton,
Card,
CardHeader,
List,
+ Grid,
} from '@mui/material';
import { Link } from 'react-router-dom';
-const NbList = (props) => {
- const { orders = [] } = props;
+const NbList = ({ deadStock }) => {
const translate = useTranslate();
-
return (
<Card sx={{ flex: 1 }}>
- <CardHeader title={translate('pos.dashboard.pending_orders')} />
+ <CardHeader title={translate('page.dashboard.list.stock')} />
<List dense={true}>
- {orders.map(record => (
- <PendingOrder key={record.id} order={record} />
+ {deadStock.map(record => (
+ <PendingOrder key={`record?.id + ${Math.random().toString(36).substr(2, 9)} `} order={record} />
))}
</List>
</Card>
@@ -33,12 +33,11 @@
export const PendingOrder = (props) => {
const { order } = props;
console.log(order);
-
const translate = useTranslate();
- const { referenceRecord: customer, isPending } = useReference({
- reference: 'customers',
- id: order.customer_id,
- });
+ // const { referenceRecord: customer, isPending } = useReference({
+ // reference: 'customers',
+ // id: order.id,
+ // });
return (
<ListItem disablePadding>
@@ -54,13 +53,41 @@
/>
)}
</ListItemAvatar> */}
- <ListItemText
- primary={new Date(order.date).toLocaleString('en-GB')}
- secondary={translate('pos.dashboard.order.items', {
- name: order.name
+ {/* <ListItemText
+ primary={new Date(order.createTime).toLocaleString('en-GB')}
+ secondary={translate('page.dashboard.list.stock', {
+ name: order.maktx
})}
- />
- <ListItemSecondaryAction>
+ >
+
+ </ListItemText> */}
+ <Grid container item md={12}>
+ <Box sx={{ display: 'flex' }}>
+ <Box sx={{ display: 'flex', padding: '1em' }}>
+ <Typography color="textSecondary">{translate("table.field.asnOrderItem.matnrCode")}锛�</Typography>
+ <Typography color="textSecondary">{order?.matnrCode}</Typography>
+ </Box>
+ </Box>
+ <Box sx={{ display: 'flex' }}>
+ <Box sx={{ display: 'flex', padding: '1em' }}>
+ <Typography color="textSecondary">{translate("table.field.asnOrderItem.maktx")}锛�</Typography>
+ <Typography color="textSecondary" maxWidth="200" overflow="hidden">{order?.maktx}</Typography>
+ </Box>
+ </Box>
+ <Box sx={{ display: 'flex' }}>
+ <Box sx={{ display: 'flex', padding: '1em' }}>
+ <Typography color="textSecondary">{translate("table.field.asnOrderItem.anfme")}锛�</Typography>
+ <Typography color="textSecondary">{order?.anfme}</Typography>
+ </Box>
+ </Box>
+ <Box sx={{ display: 'flex' }}>
+ <Box sx={{ display: 'flex', padding: '1em' }}>
+ <Typography color="textSecondary">{translate("table.field.locItem.deadTime")}锛�</Typography>
+ <Typography color="textSecondary">{order?.deadTime}</Typography>
+ </Box>
+ </Box>
+ </Grid>
+ {/* <ListItemSecondaryAction>
<Box
component="span"
sx={{
@@ -68,9 +95,9 @@
color: 'text.primary',
}}
>
- {order.total}$
+ {order.deadTime}
</Box>
- </ListItemSecondaryAction>
+ </ListItemSecondaryAction> */}
</ListItemButton>
</ListItem>
);
--
Gitblit v1.9.1