From d0c039c4924ab4348d5a44738f8359ed8f622a74 Mon Sep 17 00:00:00 2001
From: verou <857149855@qq.com>
Date: 星期一, 07 四月 2025 17:05:06 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-admin/src/page/task/TaskPanel.jsx | 184 ++++++++++++++++------------------------------
1 files changed, 64 insertions(+), 120 deletions(-)
diff --git a/rsf-admin/src/page/task/TaskPanel.jsx b/rsf-admin/src/page/task/TaskPanel.jsx
index 24270ed..853c1a3 100644
--- a/rsf-admin/src/page/task/TaskPanel.jsx
+++ b/rsf-admin/src/page/task/TaskPanel.jsx
@@ -13,127 +13,71 @@
const translate = useTranslate();
return (
<>
- <Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}>
- <CardContent>
- <Grid container spacing={2}>
- <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}>
- <Typography variant="h6" gutterBottom align="left" sx={{
- maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' },
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}>
- {Common.camelToPascalWithSpaces(translate('table.field.task.id'))}: {record.id}
- </Typography>
- {/* inherit, primary, secondary, textPrimary, textSecondary, error */}
- <Typography variant="h6" gutterBottom align="right" >
- ID: {record.id}
- </Typography>
- </Grid>
- </Grid>
- <Grid container spacing={2}>
- <Grid item xs={12} container alignContent="flex-end">
- <Typography variant="caption" color="textSecondary" sx={{ wordWrap: 'break-word', wordBreak: 'break-all' }}>
- {Common.camelToPascalWithSpaces(translate('common.field.memo'))}:{record.memo}
- </Typography>
- </Grid>
- </Grid>
- <Box height={20}> </Box>
- <Grid container spacing={2}>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.taskCode"
- property={record.taskCode}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.taskStatus"
- property={record.taskStatus}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.taskType"
- property={record.taskType}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.orgLoc"
- property={record.orgLoc}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.orgSite"
- property={record.orgSite}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.targLoc"
- property={record.targLoc}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.targSite"
- property={record.targSite}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.barcode"
- property={record.barcode}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.robotCode"
- property={record.robotCode}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.exceStatus"
- property={record.exceStatus}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.expDesc"
- property={record.expDesc}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.sort"
- property={record.sort}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.expCode"
- property={record.expCode}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.startTime"
- property={record.startTime$}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.task.endTime"
- property={record.endTime$}
- />
- </Grid>
+ <Box display="flex">
+ <List
+ sx={{
+ flexGrow: 1,
+ transition: (theme) =>
+ theme.transitions.create(['all'], {
+ duration: theme.transitions.duration.enteringScreen,
+ }),
+ marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
+ }}
+ title={"menu.taskItem"}
+ empty={false}
+ filters={filters}
+ sort={{ field: "create_time", order: "desc" }}
+ actions={(
+ <TopToolbar>
+ <FilterButton />
+ {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */}
+ <SelectColumnsButton preferenceKey='taskItem' />
+ {/* <MyExportButton /> */}
+ </TopToolbar>
+ )}
+ perPage={DEFAULT_PAGE_SIZE}
+ >
+ <StyledDatagrid
+ preferenceKey='taskItem'
+ // bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+ rowClick={(id, resource, record) => false}
+ // expand={() => <TaskItemPanel />}
+ expandSingle={true}
+ omit={['id', 'createTime', 'createBy', 'memo', 'taskId', 'orderId', 'orderItemId', 'matnrId']}
+ >
+ <NumberField source="id" />
+ <NumberField source="taskId" label="table.field.taskItem.taskId" />
+ <NumberField source="orderId" label="table.field.taskItem.orderId" />
+ <NumberField source="orderType$" label="table.field.taskItem.orderType" />
+ <NumberField source="orderItemId" label="table.field.taskItem.orderItemId" />
+ <NumberField source="matnrId" label="table.field.taskItem.matnrId" />
+ <TextField source="maktx" label="table.field.taskItem.maktx" />
+ <TextField source="matnrCode" label="table.field.taskItem.matnrCode" />
+ <TextField source="unit" label="table.field.taskItem.unit" />
+ <NumberField source="anfme" label="table.field.taskItem.anfme" />
+ <TextField source="batch" label="table.field.taskItem.batch" />
+ <TextField source="spec" label="table.field.taskItem.spec" />
+ <TextField source="model" label="table.field.taskItem.model" />
- </Grid>
- </CardContent>
- </Card >
+ <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
+ <TextField source="nickname" />
+ </ReferenceField>
+ <DateField source="updateTime" label="common.field.updateTime" showTime />
+ <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}>
+ <TextField source="nickname" />
+ </ReferenceField>
+ <DateField source="createTime" label="common.field.createTime" showTime />
+ <BooleanField source="statusBool" label="common.field.status" sortable={false} />
+ <TextField source="memo" label="common.field.memo" sortable={false} />
+ </StyledDatagrid>
+ </List>
+ <PageDrawer
+ title='TaskItem Detail'
+ drawerVal={drawerVal}
+ setDrawerVal={setDrawerVal}
+ >
+ </PageDrawer>
+ </Box>
</>
);
};
--
Gitblit v1.9.1