From 4cc644945bda98e1ec30828944796ce2fb96e698 Mon Sep 17 00:00:00 2001
From: yangyang
Date: 星期五, 21 三月 2025 07:58:59 +0800
Subject: [PATCH] #修改 1. 逻辑分区绑定 2. 物料代码优化
---
rsf-admin/src/page/basicInfo/loc/LocCreate.jsx | 36 ++++++++++++++++++++++++++++--------
1 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
index 0602179..00e9108 100644
--- a/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/LocCreate.jsx
@@ -16,6 +16,7 @@
useDataProvider,
useNotify,
Form,
+ SelectArrayInput,
useCreateController,
} from 'react-admin';
import {
@@ -30,13 +31,14 @@
import DialogCloseButton from "../../components/DialogCloseButton";
import StatusSelectInput from "../../components/StatusSelectInput";
import MemoInput from "../../components/MemoInput";
+import request from '@/utils/request';
const LocCreate = (props) => {
const { open, setOpen } = props;
+ const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || [];
const translate = useTranslate();
const notify = useNotify();
-
const handleClose = (event, reason) => {
if (reason !== "backdropClick") {
setOpen(false);
@@ -51,6 +53,9 @@
const handleError = async (error) => {
notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } });
};
+
+
+
return (
<>
@@ -86,7 +91,7 @@
<Grid container rowSpacing={2} columnSpacing={2}>
<Grid item xs={6} display="flex" gap={1}>
<ReferenceInput
- source="warehouseId$"
+ source="warehouseId"
reference="warehouse"
>
<AutocompleteInput
@@ -119,7 +124,7 @@
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <ReferenceInput
+ {/* <ReferenceInput
source="type"
reference="dictData"
filter={{ dictTypeCode: 'sys_loc_type' }}
@@ -131,7 +136,19 @@
parse={v => v}
validate={[required()]}
/>
- </ReferenceInput>
+ </ReferenceInput> */}
+ {/* <AutocompleteInput
+ choices={dicts}
+ source="type"
+ optionText="label"
+ label="table.field.loc.type"
+ optionValue="value"
+ parse={v => v}
+ validate={[required()]}
+ /> */}
+ <ReferenceArrayInput source="typeIds" reference="locType" >
+ <SelectArrayInput label="table.field.loc.type" />
+ </ReferenceArrayInput>
</Grid>
{/* <Grid item xs={6} display="flex" gap={1}>
<TextInput
@@ -140,7 +157,7 @@
parse={v => v}
/>
</Grid> */}
- <Grid item xs={6} display="flex" gap={1}>
+ {/* <Grid item xs={6} display="flex" gap={1}>
<NumberInput
label="table.field.loc.flagLogic"
source="flagLogic"
@@ -159,7 +176,7 @@
source="barcode"
parse={v => v}
/>
- </Grid>
+ </Grid> */}
{/* <Grid item xs={6} display="flex" gap={1}>
<TextInput
label="table.field.loc.unit"
@@ -208,7 +225,7 @@
validate={required()}
/>
</Grid>
- <Grid item xs={6} display="flex" gap={1}>
+ {/* <Grid item xs={6} display="flex" gap={1}>
<NumberInput
label="table.field.loc.channel"
source="channel"
@@ -240,7 +257,10 @@
parse={v => v}
validate={required()}
/>
- </Grid>
+ </Grid> */}
+
+
+
<Grid item xs={6} display="flex" gap={1}>
<StatusSelectInput />
--
Gitblit v1.9.1