From c81fc5e2a4f4153be2bb8602ed14a0743e6ecd29 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期四, 05 三月 2026 11:14:50 +0800
Subject: [PATCH] RCS对接优化
---
rsf-admin/src/page/histories/asnOrderLog/AsnOrderLogList.jsx | 203 +-------------------------------------------------
1 files changed, 5 insertions(+), 198 deletions(-)
diff --git a/rsf-admin/src/page/histories/asnOrderLog/AsnOrderLogList.jsx b/rsf-admin/src/page/histories/asnOrderLog/AsnOrderLogList.jsx
index ce29d0c..0000393 100644
--- a/rsf-admin/src/page/histories/asnOrderLog/AsnOrderLogList.jsx
+++ b/rsf-admin/src/page/histories/asnOrderLog/AsnOrderLogList.jsx
@@ -1,200 +1,7 @@
-import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
-import { useNavigate } from 'react-router-dom';
-import {
- List,
- DatagridConfigurable,
- SearchInput,
- TopToolbar,
- SelectColumnsButton,
- EditButton,
- FilterButton,
- CreateButton,
- ExportButton,
- BulkDeleteButton,
- WrapperField,
- useRecordContext,
- useTranslate,
- useNotify,
- useListContext,
- FunctionField,
- TextField,
- NumberField,
- DateField,
- BooleanField,
- ReferenceField,
- TextInput,
- DateTimeInput,
- DateInput,
- SelectInput,
- NumberInput,
- ReferenceInput,
- ReferenceArrayInput,
- AutocompleteInput,
- DeleteButton,
- Button,
- useRecordSelection,
- useRefresh,
-} from 'react-admin';
-import { Box, Typography, Card, Stack } from '@mui/material';
-import { styled } from '@mui/material/styles';
-import AsnOrderLogCreate from "./AsnOrderLogCreate";
-import AsnOrderLogPanel from "./AsnOrderLogPanel";
-import EmptyData from "../../components/EmptyData";
-import MyCreateButton from "../../components/MyCreateButton";
-import MyExportButton from '../../components/MyExportButton';
-import PageDrawer from "../../components/PageDrawer";
-import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
-import * as Common from '@/utils/common';
-import request from '@/utils/request';
-import ConfirmButton from '../../components/ConfirmButton';
-import CachedIcon from '@mui/icons-material/Cached';
-const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
- '& .css-1vooibu-MuiSvgIcon-root': {
- height: '.9em'
- },
- '& .RaDatagrid-row': {
- cursor: 'auto'
- },
- '& .column-name': {
- },
- '& .opt': {
- width: 150
- },
-}));
+import React from "react";
+import AsnOrderLogListBase from "./AsnOrderLogListBase";
-const filters = [
- <SearchInput source="condition" alwaysOn />,
- <TextInput source="code" label="table.field.asnOrderLog.code" />,
- <TextInput source="poCode" label="table.field.asnOrderLog.poCode" />,
- <NumberInput source="poId" label="table.field.asnOrderLog.poId" />,
- <TextInput source="type" label="table.field.asnOrderLog.type" />,
- <TextInput source="wkType" label="table.field.asnOrderLog.wkType" />,
- <NumberInput source="anfme" label="table.field.asnOrderLog.anfme" />,
- <NumberInput source="qty" label="table.field.asnOrderLog.qty" />,
- <TextInput source="logisNo" label="table.field.asnOrderLog.logisNo" />,
- <DateInput source="arrTime" label="table.field.asnOrderLog.arrTime" />,
- <SelectInput source="rleStatus" label="table.field.asnOrderLog.rleStatus"
- choices={[
- { id: 0, name: ' 姝e父' },
- { id: 1, name: ' 宸查噴鏀�' },
- ]}
- />,
- <SelectInput source="ntyStatus" label="table.field.asnOrderLog.ntyStatus"
- choices={[
- { id: 0, name: ' 鏈笂鎶�' },
- { id: 1, name: ' 宸蹭笂鎶�' },
- { id: 2, name: ' 閮ㄥ垎涓婃姤' },
- ]}
- />,
-
- <TextInput label="common.field.memo" source="memo" />,
- <SelectInput
- label="common.field.status"
- source="status"
- choices={[
- { id: '1', name: 'common.enums.statusTrue' },
- { id: '0', name: 'common.enums.statusFalse' },
- ]}
- resettable
- />,
-]
-
-const AsnOrderLogList = () => {
- const translate = useTranslate();
- const [createDialog, setCreateDialog] = useState(false);
- const [drawerVal, setDrawerVal] = useState(false);
-
- return (
- <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.asnOrderLog"}
- empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
- filters={filters}
- sort={{ field: "create_time", order: "desc" }}
- actions={(
- <TopToolbar>
- <FilterButton />
- <SelectColumnsButton preferenceKey='asnOrderLog' />
- <MyExportButton />
- </TopToolbar>
- )}
- perPage={DEFAULT_PAGE_SIZE}
- >
- <StyledDatagrid
- preferenceKey='asnOrderLog'
- bulkActionButtons={
- <>
- <MyExportButton />
- </>
- }
- rowClick={'edit'}
- expand={false}
- expandSingle={true}
- omit={['id', 'createTime', 'createBy', 'memo', 'rleStatus']}
- >
- <NumberField source="id" />
- <TextField source="code" label="table.field.asnOrderLog.code" />
- <TextField source="poCode" label="table.field.asnOrderLog.poCode" />
- <NumberField source="poId" label="table.field.asnOrderLog.poId" />
- <TextField source="type$" label="table.field.asnOrderLog.type" />
- <TextField source="wkType$" label="table.field.asnOrderLog.wkType" />
- <NumberField source="anfme" label="table.field.asnOrderLog.anfme" />
- <NumberField source="qty" label="table.field.asnOrderLog.qty" />
- <TextField source="logisNo" label="table.field.asnOrderLog.logisNo" />
- <DateField source="arrTime" label="table.field.asnOrderLog.arrTime" showTime />
- <TextField source="rleStatus$" label="table.field.asnOrderLog.rleStatus" sortable={false} />
- <TextField source="ntyStatus$" label="table.field.asnOrderLog.ntyStatus" sortable={false} />
- <TextField source="updateBy$" label="common.field.updateBy" />
- <DateField source="updateTime" label="common.field.updateTime" showTime />
- <TextField source="createBy$" label="common.field.createBy" />
- <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} />
- <WrapperField cellClassName="opt" label="common.field.opt">
- <ContinueButton />
- </WrapperField>
- </StyledDatagrid>
- </List>
- <AsnOrderLogCreate
- open={createDialog}
- setOpen={setCreateDialog}
- />
- <PageDrawer
- title='AsnOrderLog Detail'
- drawerVal={drawerVal}
- setDrawerVal={setDrawerVal}
- >
- </PageDrawer>
- </Box>
- )
+/** 鍏ュ簱鍘嗗彶鍗曞垪琛細鍥哄畾 type=in锛岃姹傚悗绔� asnOrderLog 鎺ュ彛 */
+export default function AsnOrderLogList() {
+ return <AsnOrderLogListBase typeFilter="in" listTitle="menu.asnOrderLog" />;
}
-
-export default AsnOrderLogList;
-
-
-const ContinueButton = () => {
- const refresh = useRefresh();
- const record = useRecordContext();
- const notify = useNotify();
- const continueReceipt = async () => {
- const { data: { code, data, msg } } = await request.post(`/asnOrderLog/continue/${record.id}`);
- if (code === 200) {
- notify(msg);
- } else {
- notify(msg);
- }
- refresh();
- }
-
- return (
- <ConfirmButton label={"toolbar.continue"} startIcon={<CachedIcon />} onConfirm={continueReceipt} />
- )
- }
\ No newline at end of file
--
Gitblit v1.9.1