From 0a961cda12ec39dc0e33fc9148f902a7bed7bd76 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 23 五月 2025 09:41:15 +0800
Subject: [PATCH] #

---
 rsf-admin/src/page/orders/outStock/OutOrderList.jsx |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/rsf-admin/src/page/orders/outStock/OutOrderList.jsx b/rsf-admin/src/page/orders/outStock/OutOrderList.jsx
index 23ed27e..fc4bb37 100644
--- a/rsf-admin/src/page/orders/outStock/OutOrderList.jsx
+++ b/rsf-admin/src/page/orders/outStock/OutOrderList.jsx
@@ -51,11 +51,12 @@
 import DictionarySelect from "../../components/DictionarySelect";
 import ImportButton from "../../components/ImportButton";
 import DetailsIcon from '@mui/icons-material/Details';
-import CancelIcon from '@mui/icons-material/Cancel';
+import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';
 import OutOrderCreate from "./OutOrderCreate";
 import AddIcon from '@mui/icons-material/Add';
 import OutOrderModal from "./OutOrderModal";
 import PublicIcon from '@mui/icons-material/Public';
+import SelectMatnrModal from "./SelectMatnrModal";
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
   '& .css-1vooibu-MuiSvgIcon-root': {
@@ -82,10 +83,10 @@
   <TextInput source="code" label="table.field.outStock.code" alwaysOn />,
   <TextInput source="poCode" label="table.field.outStock.poCode" />,
   <NumberInput source="poId" label="table.field.outStock.poId" />,
-  <ReferenceInput source="type" reference="dictData" filter={{ dictTypeCode: 'sys_business_type' }} label="table.field.outStock.type" alwaysOn>
+  <ReferenceInput source="type" reference="dictData" filter={{ dictTypeCode: 'sys_order_type', group: '2' }} label="table.field.outStock.type" alwaysOn>
     <AutocompleteInput label="table.field.outStock.type" optionValue="value" />
   </ReferenceInput>,
-  <ReferenceInput source="wkType" reference="dictData" filter={{ dictTypeCode: 'sys_business_type' }} label="table.field.outStock.wkType" alwaysOn>
+  <ReferenceInput source="wkType" reference="dictData" filter={{ dictTypeCode: 'sys_business_type', group: '2'}} label="table.field.outStock.wkType" alwaysOn>
     <AutocompleteInput label="table.field.outStock.wkType" optionValue="value" />
   </ReferenceInput>,
   <NumberInput source="anfme" label="table.field.outStock.anfme" />,
@@ -139,7 +140,7 @@
           <TopToolbar>
             <FilterButton />
             <CreateByOrderButton setCreateDialog={setCreateDialog} />
-            <MyCreateButton onClick={() => { setManualDialog(true) }} />
+            <MyCreateButton onClick={() => { setManualDialog(true); setmodalType(0) }} />
             <SelectColumnsButton preferenceKey='outStock' />
             <ImportButton value={'asnOrderItem'} />
             {/* <MyExportButton /> */}
@@ -173,12 +174,19 @@
           <BillStatusField cellClassName="status" source="exceStatus" label="table.field.outStock.exceStatus" />
           <TextField source="memo" label="common.field.memo" sortable={false} />
           <WrapperField cellClassName="opt" label="common.field.opt" >
+            <MyButton setCreateDialog={setManualDialog} setmodalType={setmodalType} />
             <EditButton label="toolbar.detail" icon={(<DetailsIcon />)}></EditButton>
             <CancelButton />
           </WrapperField>
         </StyledDatagrid>
       </List>
-      <OutOrderCreate
+      {/* <OutOrderCreate
+        open={manualDialog}
+        setOpen={setManualDialog}
+      /> */}
+      <SelectMatnrModal
+        asnId={modalType}
+        billReload={billReload}
         open={manualDialog}
         setOpen={setManualDialog}
       />
@@ -190,8 +198,7 @@
         title='AsnOrder Detail'
         drawerVal={drawerVal}
         setDrawerVal={setDrawerVal}
-      >
-      </PageDrawer>
+      />
     </Box >
   )
 }
@@ -259,14 +266,12 @@
   return (
     <Button onClick={createByOrder} label={'toolbar.asnCreate'}> <AddIcon /> </Button>
   )
-
 }
 
 const CancelButton = () => {
   const record = useRecordContext();
   const notify = useNotify();
   const refresh = useRefresh();
-
   const cancelOrder = async () => {
     const { data: { code, data, msg } } = await request.get(`/outStock/cancel/${record?.id}`);
     if (code === 200) {
@@ -278,6 +283,6 @@
   }
 
   return (
-    <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelIcon />} onConfirm={cancelOrder} />
+     record?.exceStatus == 0 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />  } onConfirm={cancelOrder} /> : <></>
   )
 }

--
Gitblit v1.9.1