From f1f08a7174e53f375b341c9bd4be50f637db2c2e Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期一, 02 三月 2026 16:48:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/devlop-phyz' into devlop-phyz
---
rsf-admin/src/page/orders/outStock/OutOrderList.jsx | 163 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 99 insertions(+), 64 deletions(-)
diff --git a/rsf-admin/src/page/orders/outStock/OutOrderList.jsx b/rsf-admin/src/page/orders/outStock/OutOrderList.jsx
index a2ccae7..1f8ce47 100644
--- a/rsf-admin/src/page/orders/outStock/OutOrderList.jsx
+++ b/rsf-admin/src/page/orders/outStock/OutOrderList.jsx
@@ -2,11 +2,10 @@
import { useLocation, useNavigate } from 'react-router-dom';
import {
List,
- DatagridConfigurable,
SearchInput,
TopToolbar,
Toolbar,
- SelectColumnsButton,
+ ColumnsButton,
EditButton,
FilterButton,
CreateButton,
@@ -42,8 +41,10 @@
import { styled } from '@mui/material/styles';
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';
-import { Box, Typography, Card, Stack, Drawer } from '@mui/material';
+import { Box, Typography, Card, Stack, Drawer, LinearProgress } from '@mui/material';
import DictionarySelect from "../../components/DictionarySelect";
+import StickyDataTable from "../../components/StickyDataTable";
+import useTableLayout from '@/utils/useTableLayout';
import BillStatusField from '../../components/BillStatusField';
import MyCreateButton from "../../components/MyCreateButton";
import PageEditDrawer from "../../components/PageEditDrawer";
@@ -62,25 +63,93 @@
import OutOrderModal from "./OutOrderModal";
import request from '@/utils/request';
-const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
- '& .css-1vooibu-MuiSvgIcon-root': {
- height: '.9em'
- },
- '& .RaDatagrid-row': {
- cursor: 'auto'
- },
- '& .column-name': {
- },
- '& .opt': {
- width: 420
- },
- '& .wkType': {
- width: 110
- },
- '& .status': {
- width: 90
- },
-}));
+const ListContent = ({ drawerVal, setDrawerVal, setWaveRule, setSelectIds, setSelect }) => {
+ const { isLoading } = useListContext();
+ const { boxMaxWidth, boxMaxHeight } = useTableLayout(drawerVal);
+
+ const omittedFields = ['id', 'code', 'createTime', 'createBy$', 'memo', 'rleStatus$', 'logisNo', 'updateBy$', 'workQty', 'updateTime', 'type$'];
+
+ return (
+ <Box sx={{
+ position: 'relative',
+ maxHeight: boxMaxHeight,
+ maxWidth: boxMaxWidth,
+ overflowX: 'auto',
+ overflowY: 'auto',
+ '& .MuiTableCell-root': {
+ whiteSpace: 'nowrap',
+ },
+ '& .css-1vooibu-MuiSvgIcon-root': {
+ height: '.9em'
+ },
+ '& .RaDatagrid-row': {
+ cursor: 'auto'
+ },
+ '& .column-name': {
+ },
+ '& .opt': {
+ width: 420
+ },
+ '& .wkType': {
+ width: 110
+ },
+ '& .status': {
+ width: 90
+ },
+ }}>
+ {isLoading && (
+ <LinearProgress
+ sx={{
+ height: "2px",
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ right: 0,
+ }}
+ />
+ )}
+ <StickyDataTable
+ storeKey='outStock'
+ bulkActionButtons={<PublicTaskButton setWaveRule={setWaveRule} setSelectIds={setSelectIds} />}
+ rowClick={false}
+ hiddenColumns={omittedFields}
+ >
+ <NumberField source="id" />
+ <TextField source="code" label="table.field.outStock.code" />
+ <TextField source="poCode" label="table.field.outStock.poCode" />
+ <TextField source="type$" label="table.field.outStock.type" />
+ <TextField cellClassName="wkType" source="wkType$" label="table.field.outStock.wkType" />
+ <NumberField source="anfme" label="table.field.outStock.anfme" />
+ <NumberField source="workQty" label="table.field.outStock.workQty" />
+ <NumberField source="qty" label="table.field.outStock.qty" />
+ <TextField source="logisNo" label="table.field.outStock.logisNo" />
+ <TextField source="rleStatus$" label="table.field.outStock.rleStatus" 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 />
+ <TextField source="memo" label="common.field.memo" sortable={false} />
+
+ {/* 閾跺骇鏂板 */}
+ <TextField source="saleOrgName" label="閿�鍞粍缁�" />
+ <TextField source="saleUserName" label="閿�鍞憳" />
+ <DateField source="businessTime" label="鍑哄簱鏃ユ湡" />
+ <TextField source="customerId" label="瀹㈡埛缂栫爜" />
+ <TextField source="customerName" label="瀹㈡埛" />
+ <TextField source="stockOrgName" label="table.field.outStock.stockOrgName" />
+
+ <BillStatusField cellClassName="status" source="exceStatus" label="table.field.outStock.exceStatus" />
+ <WrapperField cellClassName="opt" label="common.field.opt" >
+ {/* <MyButton setCreateDialog={setManualDialog} setmodalType={setmodalType} /> */}
+ <EditButton label="toolbar.detail" icon={(<DetailsIcon />)}></EditButton>
+ <CancelButton />
+ <CompleteButton />
+ <PublicButton setDrawerVal={setDrawerVal} drawerVal={drawerVal} setSelect={setSelect} />
+ </WrapperField>
+ </StickyDataTable>
+ </Box>
+ )
+}
const filters = [
<SearchInput source="condition" alwaysOn />,
@@ -162,53 +231,19 @@
<FilterButton />
<CreateByOrderButton setCreateDialog={setCreateDialog} />
<MyCreateButton onClick={() => { setManualDialog(true); setmodalType(0) }} />
- <SelectColumnsButton preferenceKey='outStock' />
+ <ColumnsButton storeKey='outStock' />
<ImportButton value={'outStockItem'} />
</TopToolbar>
)}
perPage={DEFAULT_PAGE_SIZE}
>
- <StyledDatagrid
- sx={{ width: '100%' }}
- preferenceKey='outStock'
- bulkActionButtons={<PublicTaskButton setWaveRule={setWaveRule} setSelectIds={setSelectIds} />}
- rowClick={false}
- expandSingle={true}
- omit={['id', 'code', 'createTime', 'createBy$', 'memo', 'rleStatus$', 'logisNo', 'updateBy$', 'workQty', 'updateTime', 'type$']}
- >
- <NumberField source="id" />
- <TextField source="code" label="table.field.outStock.code" />
- <TextField source="poCode" label="table.field.outStock.poCode" />
- <TextField source="type$" label="table.field.outStock.type" />
- <TextField cellClassName="wkType" source="wkType$" label="table.field.outStock.wkType" />
- <NumberField source="anfme" label="table.field.outStock.anfme" />
- <NumberField source="workQty" label="table.field.outStock.workQty" />
- <NumberField source="qty" label="table.field.outStock.qty" />
- <TextField source="logisNo" label="table.field.outStock.logisNo" />
- <TextField source="rleStatus$" label="table.field.outStock.rleStatus" 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 />
- <TextField source="memo" label="common.field.memo" sortable={false} />
-
- {/* 閾跺骇鏂板 */}
- <TextField source="saleOrgName" label="閿�鍞粍缁�" />
- <TextField source="saleUserName" label="閿�鍞憳" />
- <DateField source="businessTime" label="鍑哄簱鏃ユ湡" />
- <TextField source="customerId" label="瀹㈡埛缂栫爜" />
- <TextField source="customerName" label="瀹㈡埛" />
- <TextField source="stockOrgName" label="table.field.outStock.stockOrgName" />
-
- <BillStatusField cellClassName="status" source="exceStatus" label="table.field.outStock.exceStatus" />
- <WrapperField cellClassName="opt" label="common.field.opt" >
- {/* <MyButton setCreateDialog={setManualDialog} setmodalType={setmodalType} /> */}
- <EditButton label="toolbar.detail" icon={(<DetailsIcon />)}></EditButton>
- <CancelButton />
- <CompleteButton />
- <PublicButton setDrawerVal={setDrawerVal} drawerVal={drawerVal} setSelect={setSelect} />
- </WrapperField>
- </StyledDatagrid>
+ <ListContent
+ drawerVal={drawerVal}
+ setDrawerVal={setDrawerVal}
+ setWaveRule={setWaveRule}
+ setSelectIds={setSelectIds}
+ setSelect={setSelect}
+ />
</List>
{/* <OutOrderCreate
open={manualDialog}
--
Gitblit v1.9.1