From 5807fc22aba974b4ca85a8049ecd983673b0ca28 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期一, 20 十月 2025 16:59:34 +0800
Subject: [PATCH] 1. 添加大屏接口 2. 任务站点确认修改
---
rsf-admin/src/page/dashboard/NbList.jsx | 75 +++++++++++++++++++++++++++----------
1 files changed, 54 insertions(+), 21 deletions(-)
diff --git a/rsf-admin/src/page/dashboard/NbList.jsx b/rsf-admin/src/page/dashboard/NbList.jsx
index 2d1ca12..3794797 100644
--- a/rsf-admin/src/page/dashboard/NbList.jsx
+++ b/rsf-admin/src/page/dashboard/NbList.jsx
@@ -5,27 +5,31 @@
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 }}>
+ <Card sx={{
+ flex: 1,
+ }}>
<CardHeader title={translate('page.dashboard.list.stock')} />
- <List dense={true}>
- {orders.map(record => (
- <PendingOrder key={record.id} order={record} />
- ))}
- </List>
+ <Box sx={{ maxHeight: 500, overflowY: 'auto',}}>
+ <List dense={true}>
+ {deadStock.map(record => (
+ <PendingOrder key={`record?.id + ${Math.random().toString(36).substr(2, 9)} `} order={record} />
+ ))}
+ </List>
+ </Box>
</Card>
);
};
@@ -33,14 +37,15 @@
export const PendingOrder = (props) => {
const { order } = props;
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>
- <ListItemButton component={Link} to={`/orders/${order.id}`}>
+ {/* component={Link} to={`/locItem/${order.id}`} */}
+ <ListItemButton >
{/* <ListItemAvatar>
{isPending ? (
<Avatar />
@@ -52,13 +57,41 @@
/>
)}
</ListItemAvatar> */}
- <ListItemText
- primary={new Date(order.date).toLocaleString('en-GB')}
+ {/* <ListItemText
+ primary={new Date(order.createTime).toLocaleString('en-GB')}
secondary={translate('page.dashboard.list.stock', {
- name: order.name
+ 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={{
@@ -66,9 +99,9 @@
color: 'text.primary',
}}
>
- {order.total}$
+ {order.deadTime}
</Box>
- </ListItemSecondaryAction>
+ </ListItemSecondaryAction> */}
</ListItemButton>
</ListItem>
);
--
Gitblit v1.9.1