From d5f16640dc1bf0239beafab721480a64425d9c1e Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期二, 29 七月 2025 10:46:12 +0800 Subject: [PATCH] 调拔功能优化 --- rsf-admin/src/page/orders/transfer/TransferList.jsx | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rsf-admin/src/page/orders/transfer/TransferList.jsx b/rsf-admin/src/page/orders/transfer/TransferList.jsx index 46a80ea..827cbcf 100644 --- a/rsf-admin/src/page/orders/transfer/TransferList.jsx +++ b/rsf-admin/src/page/orders/transfer/TransferList.jsx @@ -33,19 +33,17 @@ ReferenceArrayInput, AutocompleteInput, DeleteButton, + useRedirect, } from 'react-admin'; import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting.js'; -import { Box, Typography, Card, Stack, } from '@mui/material'; import MyCreateButton from "../../components/MyCreateButton.jsx"; import MyExportButton from '../../components/MyExportButton.jsx'; +import BillStatusField from '../../components/BillStatusField'; +import { Box, Typography, Card, Stack, } from '@mui/material'; import PageEditDrawer from "../../components/PageEditDrawer"; import ConfirmButton from '../../components/ConfirmButton'; -import PageDrawer from "../../components/PageDrawer.jsx"; -import EmptyData from "../../components/EmptyData.jsx"; import AddTaskIcon from '@mui/icons-material/AddTask'; -import MyField from "../../components/MyField.jsx"; import TransferOrders from "./TransferOrders.jsx"; -import TransferCreate from "./TransferCreate.jsx"; import ManualCreate from "./ManualCreate.jsx"; import { styled } from '@mui/material/styles'; import * as Common from '@/utils/common.js'; @@ -158,7 +156,7 @@ <TextField source="orgAreaName" label="table.field.transfer.orgAreaName" /> <NumberField source="tarAreaId" label="table.field.transfer.tarAreaId" /> <TextField source="tarAreaName" label="table.field.transfer.tarAreaName" /> - <TextField source="exceStatus$" label="table.field.transfer.exceStatus" sortable={false} /> + <BillStatusField source="exceStatus$" cellClassName="status" label="table.field.transfer.exceStatus" sortable={false} /> <TextField source="updateBy$" label="common.field.updateBy" /> <DateField source="updateTime" label="common.field.updateTime" showTime /> <TextField source="createBy$" label="common.field.createBy" /> @@ -188,10 +186,12 @@ const PublicButton = ({ setDrawerVal, setSelect }) => { const record = useRecordContext(); const refresh = useRefresh(); + const redirct = useRedirect(); const taskEvent = async () => { const { data: { code, data, msg } } = await request.post(`/transfer/pub/outStock`, record); if (code === 200) { notify(msg); + redirct("/outStock"); refresh() } else { notify(msg); @@ -200,6 +200,6 @@ } return ( - <ConfirmButton label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} size={"small"} /> + record?.exceStatus == 0 ? <ConfirmButton label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} size={"small"} /> : <></> ) } -- Gitblit v1.9.1