main
This commit is contained in:
@@ -1,80 +1,17 @@
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import { SPACING } from "../../../../data/spacing";
|
||||
|
||||
const reportItems = [
|
||||
{ label: "حجم درخواست کشتار مرغدار:", key: "quantityYesterday" },
|
||||
{ label: "وزن درخواست کشتار مرغدار:", key: "totalWeightYesterday" },
|
||||
{ label: "حجم خرید های مستقیم :", key: "killRequestQuantityYesterday" },
|
||||
{ label: "وزن خرید های مستقیم :", key: "killRequestWeightYesterday" },
|
||||
{
|
||||
label: "حجم خرید های خارج از استان (زنده) :",
|
||||
key: "quantityKillHouseFreeBarLiveYesterday",
|
||||
},
|
||||
{
|
||||
label: "وزن خرید های خارج از استان (زنده) :",
|
||||
key: "WeightKillHouseFreeBarLiveYesterday",
|
||||
},
|
||||
{
|
||||
label: "وزن خرید های خارج از استان (لاشه) :",
|
||||
key: "WeightKillHouseFreeBarCarcassYesterday",
|
||||
},
|
||||
{
|
||||
label: "حجم کل تخصیصات (خرید مستقیم/ مرغدار ):",
|
||||
key: "provinceKillRequestQuantityYesterday",
|
||||
},
|
||||
{
|
||||
label: "وزن کل تخصیصات (خرید مستقیم/ مرغدار ):",
|
||||
key: "provinceKillRequestWeightCarcassYesterday",
|
||||
},
|
||||
{
|
||||
label: "حجم فروش به خارج استان:",
|
||||
key: "poultryOutProvinceQuantityYesterday",
|
||||
},
|
||||
{
|
||||
label: "وزن فروش به خارج استان:",
|
||||
key: "poultryOutProvinceWeightYesterday",
|
||||
},
|
||||
{ label: "حجم بارها:", key: "KillHouseRequestQuantityYesterday" },
|
||||
{ label: "وزن بارها:", key: "KillHouseRequestWeightYesterday" },
|
||||
{
|
||||
label: "لاشه تولیدی با احتساب 25درصد افت کشتار :",
|
||||
key: "totalLossWeightYesterday",
|
||||
},
|
||||
];
|
||||
|
||||
const ReportRow = ({ label, value }) => (
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
minHeight: 40,
|
||||
px: 2,
|
||||
py: 0.5,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
color="text.primary"
|
||||
sx={{ fontSize: "0.85rem", textAlign: "left" }}
|
||||
>
|
||||
{label}
|
||||
</Typography>
|
||||
<Typography
|
||||
color="primary.main"
|
||||
fontWeight="bold"
|
||||
sx={{ fontSize: "0.85rem", textAlign: "left" }}
|
||||
>
|
||||
{value?.toLocaleString() || 0}
|
||||
</Typography>
|
||||
</Box>
|
||||
);
|
||||
|
||||
export const YesterdayKillingReport = ({ boxStats }) => (
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
flex: "1 1 20%",
|
||||
|
||||
minWidth: {
|
||||
md: "500px",
|
||||
},
|
||||
maxWidth: {
|
||||
md: "25%",
|
||||
},
|
||||
borderRadius: 2,
|
||||
border: "1px solid",
|
||||
borderColor: "divider",
|
||||
@@ -83,14 +20,10 @@ export const YesterdayKillingReport = ({ boxStats }) => (
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: 2,
|
||||
height: "700px",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
textAlign="start"
|
||||
variant="subtitle1"
|
||||
color="text.primary"
|
||||
sx={{ fontWeight: 600, fontSize: "1rem" }}
|
||||
>
|
||||
<Typography textAlign="start" variant="h6" color="primary.main">
|
||||
گزارش کشتار دیروز مرغ گوشتی استان
|
||||
</Typography>
|
||||
|
||||
@@ -101,16 +34,262 @@ export const YesterdayKillingReport = ({ boxStats }) => (
|
||||
gap: 1,
|
||||
overflowY: "auto",
|
||||
flex: 1,
|
||||
maxHeight: "500px",
|
||||
}}
|
||||
>
|
||||
{reportItems.map((item, index) => (
|
||||
<ReportRow
|
||||
key={index}
|
||||
label={item.label}
|
||||
value={boxStats?.killingYesterday?.[item.key]}
|
||||
/>
|
||||
))}
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">حجم درخواست کشتار مرغدار:</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.quantityYesterday?.toLocaleString() || 0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">وزن درخواست کشتار مرغدار:</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.totalWeightYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">حجم خرید های مستقیم :</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.killRequestQuantityYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">وزن خرید های مستقیم :</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.killRequestWeightYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">
|
||||
حجم خرید های خارج از استان (زنده) :
|
||||
</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.quantityKillHouseFreeBarLiveYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">
|
||||
وزن خرید های خارج از استان (زنده) :
|
||||
</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.WeightKillHouseFreeBarLiveYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">
|
||||
وزن خرید های خارج از استان (لاشه) :
|
||||
</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.WeightKillHouseFreeBarCarcassYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">
|
||||
حجم کل تخصیصات (خرید مستقیم/ مرغدار ):
|
||||
</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.provinceKillRequestQuantityYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">
|
||||
وزن کل تخصیصات (خرید مستقیم/ مرغدار ):
|
||||
</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.provinceKillRequestWeightCarcassYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">حجم فروش به خارج استان:</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.poultryOutProvinceQuantityYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">وزن فروش به خارج استان:</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.poultryOutProvinceWeightYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">حجم بارها:</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.KillHouseRequestQuantityYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">وزن بارها:</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.KillHouseRequestWeightYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
height: 48,
|
||||
px: 2,
|
||||
borderRadius: 1,
|
||||
backgroundColor: "rgba(86, 156, 221, 0.1)",
|
||||
}}
|
||||
>
|
||||
<Typography color="primary.main">
|
||||
لاشه تولیدی با احتساب 25درصد افت کشتار :
|
||||
</Typography>
|
||||
<Typography color="primary.main" fontWeight="bold">
|
||||
{boxStats?.killingYesterday?.totalLossWeightYesterday?.toLocaleString() ||
|
||||
0}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user