From 37e8e06c8d13146e62ef08d018d86443b9f42f00 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 24 二月 2025 14:46:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
rsf-admin/src/page/dictType/DictTypeList.jsx | 29
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictType.java | 194 +++++
rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictDataServiceImpl.java | 12
rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx | 80 +
version/db/sys_dict_type.sql | 36 +
rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictDataService.java | 8
rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java | 4
rsf-admin/src/page/dictData/DictDataPanel.jsx | 48
rsf-admin/src/page/dictType/DictTypePanel.jsx | 14
rsf-admin/src/page/dictData/index.jsx | 8
rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictData.java | 229 ++++++
rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictTypeMapper.java | 12
rsf-server/src/main/java/companys.sql | 33
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/CompanysController.java | 110 +++
rsf-server/src/main/resources/mapper/manager/CompanysMapper.xml | 5
rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx | 82 +
version/db/sys_dict_data.sql | 40 +
rsf-admin/src/page/dictData/DictDataCreate.jsx | 72 -
rsf-admin/src/page/dictData/DictDataEdit.jsx | 72 -
rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/CompanysMapper.java | 12
rsf-admin/src/page/basicInfo/companys/index.jsx | 8
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java | 110 +++
rsf-admin/src/i18n/zh.js | 65 -
rsf-server/src/main/resources/mapper/system/DictTypeMapper.xml | 5
rsf-server/src/main/java/dictData.sql | 27
rsf-server/src/main/resources/mapper/system/DictDataMapper.xml | 5
rsf-admin/src/i18n/en.js | 63 +
rsf-admin/src/page/ResourceContent.js | 21
rsf-admin/src/page/dictType/DictTypeCreate.jsx | 13
rsf-admin/src/page/basicInfo/companys/CompanysPanel.jsx | 62 +
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Companys.java | 266 +++++++
rsf-server/src/main/resources/mapper/manager/DictTypeMapper.xml | 5
rsf-admin/src/page/dictType/DictTypeEdit.jsx | 13
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/CompanysService.java | 8
rsf-admin/src/page/basicInfo/companys/CompanysList.jsx | 58 +
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/CompanysServiceImpl.java | 12
rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictTypeServiceImpl.java | 12
/dev/null | 48 -
rsf-admin/src/page/dictType/index.jsx | 8
rsf-admin/src/page/dictData/DictDataList.jsx | 36
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictDataController.java | 110 +++
rsf-server/src/main/java/dictType.sql | 24
rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictDataMapper.java | 12
rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictTypeService.java | 8
44 files changed, 1,690 insertions(+), 409 deletions(-)
diff --git a/rsf-admin/src/i18n/en.js b/rsf-admin/src/i18n/en.js
index 634a934..63c3dcd 100644
--- a/rsf-admin/src/i18n/en.js
+++ b/rsf-admin/src/i18n/en.js
@@ -129,7 +129,13 @@
loc: 'Loc',
container: 'Container',
contract: 'Contract',
- stockItem: 'StockItem',
+ qlyInspect: 'QlyInspect',
+ dictType: 'DictType',
+ dictData: 'DictData',
+ companys: 'Companys',
+
+
+
},
table: {
field: {
@@ -332,34 +338,35 @@
name: "Name",
projectName: "ProjectName",
},
- stockItem: {
- stockId: "stockId",
- matnrId: "matnrId",
+ qlyInspect: {
code: "code",
- matnrk: "matnrk",
- anfme: "anfme",
- workQty: "workQty",
- qty: "qty",
- weight: "weight",
- unit: "unit",
- shipperId: "shipperId",
- splrId: "splrId",
- brand: "brand",
- batch: "batch",
- prodTime: "prodTime",
- inspectId: "inspectId",
- splrBtch: "splrBtch",
- asnOrder: "asnOrder",
- erpToken: "erpToken",
- erpOrder: "erpOrder",
- erpStkAdr: "erpStkAdr",
- locId: "locId",
- barcode: "barcode",
- purPrice: "purPrice",
- lockReason: "lockReason",
- lockStatus: "lockStatus",
- locker: "locker",
- lockedTime: "lockedTime",
+ name: "name",
+ },
+ dictType: {
+ name: "name",
+ description: "description",
+ },
+ dictData: {
+ dictTypeId: "dictTypeId",
+ dictTypeCode: "dictTypeCode",
+ value: "value",
+ label: "label",
+ sort: "sort",
+ color: "color",
+ },
+ companys: {
+ code: "Code",
+ name: "Name",
+ nameEn: "NameEn",
+ breifCode: "BreifCode",
+ type: "Type",
+ contact: "Contact",
+ tel: "Tel",
+ email: "Email",
+ pcode: "PCode",
+ province: "Province",
+ city: "City",
+ address: "Address",
},
}
},
diff --git a/rsf-admin/src/i18n/zh.js b/rsf-admin/src/i18n/zh.js
index afff7b2..e6e611d 100644
--- a/rsf-admin/src/i18n/zh.js
+++ b/rsf-admin/src/i18n/zh.js
@@ -129,9 +129,10 @@
loc: '鍩虹搴撲綅',
container: '瀹瑰櫒绠$悊',
contract: '鍚堝悓淇℃伅',
- stockItem: '搴撳瓨鏄庣粏',
- stock: '搴撳瓨淇℃伅',
qlyInspect: '璐ㄦ淇℃伅',
+ dictType: '鏁版嵁瀛楀吀',
+ dictData: '瀛楀吀鏁版嵁闆�',
+ companys: '寰�鏉ヤ紒涓�',
},
@@ -337,43 +338,37 @@
name: "鍚嶇О",
projectName: "椤圭洰鍚嶇О",
},
- stock: {
- asnOrder: "搴撳瓨鍗曟嵁",
- erpToken: "ERP鍑瘉",
- erpOrder: "ERP鍗曟嵁",
- erpStkAdr: "ERP搴撳瓨鍦�",
- contractId: "鍚堝悓鏍囪瘑",
- lockReason: "鍔犻攣鍘熷洜",
- lockStatus: "鍔犺浇鐘舵��",
- locker: "鍔犻攣浜�",
- lockedTime: "鍔犻攣鏃堕棿",
- },
- stockItem: {
- stockId: "搴撳瓨鏍囪瘑",
- matnrId: "鐗╂枡鏍囪瘑",
- code: "鐗╂枡缂栫爜",
- matnrk: "鐗╂枡鍚嶇О",
- anfme: "鏁伴噺",
- workQty: "鎵ц涓暟閲�",
- qty: "宸插畬鎴愭暟閲�",
- weight: "閲嶉噺",
- unit: "鍗曚綅",
- shipperId: "璐т富",
- splrId: "渚涘簲鍟�",
- brand: "鍝佺墝",
- batch: "鎵规",
- prodTime: "鐢熶骇鏃ユ湡",
- inspectId: "璐ㄦ煡鏍囪瘑",
- splrBtch: "渚涘簲鍟嗘壒娆�",
- locId: "搴撲綅鏍囪瘑",
- barcode: "瀹瑰櫒缂栫爜",
- purPrice: "閲囪喘浠�",
- },
qlyInspect: {
code: "缂栫爜",
name: "鍚嶇О",
},
-
+ dictType: {
+ name: "瀛楀吀鍚嶇О",
+ description: "鍐呭鎻忚堪",
+ },
+ dictData: {
+ dictTypeId: "瀛楀吀鏍囪瘑",
+ dictTypeCode: "瀛楀吀缂栫爜",
+ value: "鍊�",
+ label: "鍒悕",
+ sort: "鎺掑簭",
+ color: "棰滆壊",
+ },
+ companys: {
+ code: "浼佷笟缂栫爜",
+ name: "鍚嶇О",
+ nameEn: "鑻辨枃鍒悕",
+ breifCode: "鍔╄鐮�",
+ type: "绫诲瀷",
+ contact: "鑱旂郴浜�",
+ tel: "鑱旂郴鐢佃瘽",
+ email: "鐢靛瓙閭欢",
+ pcode: "閭紪",
+ province: "鐪佷唤",
+ city: "鍩庡競",
+ address: "鍦板潃",
+ },
+
}
},
page: {
diff --git a/rsf-admin/src/page/ResourceContent.js b/rsf-admin/src/page/ResourceContent.js
index d91a310..43069ae 100644
--- a/rsf-admin/src/page/ResourceContent.js
+++ b/rsf-admin/src/page/ResourceContent.js
@@ -13,8 +13,6 @@
import menu from './system/menu'
import user from './system/user';
import operationRecord from './system/operationRecord';
-import customer from './customer';
-import shipper from './basicInfo/shipper';
import matnr from './basicInfo/matnr';
import matnrGroup from './basicInfo/matnrGroup';
import warehouse from './basicInfo/warehouse';
@@ -22,9 +20,10 @@
import loc from './loc';
import container from './container';
import contract from './contract';
-import stockItem from './stockItem';
-import stock from './stock';
import qlyInspect from './qlyInspect';
+import dictType from './dictType';
+import dictData from './dictData';
+import companys from './basicInfo/companys';
const ResourceContent = (node) => {
@@ -47,10 +46,6 @@
return user;
case 'operationRecord':
return operationRecord;
- case 'customer':
- return customer;
- case 'shipper':
- return shipper;
case 'matnr':
return matnr;
case 'matnrGroup':
@@ -65,12 +60,14 @@
return container;
case 'contract':
return contract;
- case 'stockItem':
- return stockItem;
- case 'stock':
- return stock;
case 'qlyInspect':
return qlyInspect;
+ case 'dictType':
+ return dictType;
+ case 'dictData':
+ return dictData;
+ case 'companys':
+ return companys;
default:
return {
list: ListGuesser,
diff --git a/rsf-admin/src/page/stock/StockCreate.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
similarity index 66%
copy from rsf-admin/src/page/stock/StockCreate.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
index 75fccd1..fea93d5 100644
--- a/rsf-admin/src/page/stock/StockCreate.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
@@ -27,11 +27,11 @@
Grid,
Box,
} from '@mui/material';
-import DialogCloseButton from "../components/DialogCloseButton";
-import StatusSelectInput from "../components/StatusSelectInput";
-import MemoInput from "../components/MemoInput";
+import DialogCloseButton from "../../components/DialogCloseButton";
+import StatusSelectInput from "../../components/StatusSelectInput";
+import MemoInput from "../../components/MemoInput";
-const StockCreate = (props) => {
+const CompanysCreate = (props) => {
const { open, setOpen } = props;
const translate = useTranslate();
@@ -86,66 +86,88 @@
<Grid container rowSpacing={2} columnSpacing={2}>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.asnOrder"
- source="asnOrder"
+ label="table.field.companys.code"
+ source="code"
parse={v => v}
autoFocus
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.companys.name"
+ source="name"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.companys.nameEn"
+ source="nameEn"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.companys.breifCode"
+ source="breifCode"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.companys.type"
+ source="type"
+ parse={v => v}
validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.erpToken"
- source="erpToken"
+ label="table.field.companys.contact"
+ source="contact"
parse={v => v}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.erpOrder"
- source="erpOrder"
+ label="table.field.companys.tel"
+ source="tel"
parse={v => v}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.erpStkAdr"
- source="erpStkAdr"
+ label="table.field.companys.email"
+ source="email"
parse={v => v}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.contractId"
- source="contractId"
+ label="table.field.companys.pcode"
+ source="pcode"
parse={v => v}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.lockReason"
- source="lockReason"
+ label="table.field.companys.province"
+ source="province"
parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stock.lockStatus"
- source="lockStatus"
- validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.locker"
- source="locker"
+ label="table.field.companys.city"
+ source="city"
parse={v => v}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <DateInput
- label="table.field.stock.lockedTime"
- source="lockedTime"
+ <TextInput
+ label="table.field.companys.address"
+ source="address"
+ parse={v => v}
/>
</Grid>
@@ -171,4 +193,4 @@
)
}
-export default StockCreate;
+export default CompanysCreate;
diff --git a/rsf-admin/src/page/stock/StockEdit.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
similarity index 61%
copy from rsf-admin/src/page/stock/StockEdit.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
index 384dd79..a559320 100644
--- a/rsf-admin/src/page/stock/StockEdit.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
@@ -24,10 +24,10 @@
import { Stack, Grid, Box, Typography } from '@mui/material';
import * as Common from '@/utils/common';
import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting';
-import EditBaseAside from "../components/EditBaseAside";
-import CustomerTopToolBar from "../components/EditTopToolBar";
-import MemoInput from "../components/MemoInput";
-import StatusSelectInput from "../components/StatusSelectInput";
+import EditBaseAside from "../../components/EditBaseAside";
+import CustomerTopToolBar from "../../components/EditTopToolBar";
+import MemoInput from "../../components/MemoInput";
+import StatusSelectInput from "../../components/StatusSelectInput";
const FormToolbar = () => {
const { getValues } = useFormContext();
@@ -40,7 +40,7 @@
)
}
-const StockEdit = () => {
+const CompanysEdit = () => {
const translate = useTranslate();
return (
@@ -65,66 +65,88 @@
</Typography>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.asnOrder"
- source="asnOrder"
+ label="table.field.companys.code"
+ source="code"
parse={v => v}
autoFocus
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.companys.name"
+ source="name"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.companys.nameEn"
+ source="nameEn"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.companys.breifCode"
+ source="breifCode"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.companys.type"
+ source="type"
+ parse={v => v}
validate={required()}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.erpToken"
- source="erpToken"
+ label="table.field.companys.contact"
+ source="contact"
parse={v => v}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.erpOrder"
- source="erpOrder"
+ label="table.field.companys.tel"
+ source="tel"
parse={v => v}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.erpStkAdr"
- source="erpStkAdr"
+ label="table.field.companys.email"
+ source="email"
parse={v => v}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.contractId"
- source="contractId"
+ label="table.field.companys.pcode"
+ source="pcode"
parse={v => v}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.lockReason"
- source="lockReason"
+ label="table.field.companys.province"
+ source="province"
parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stock.lockStatus"
- source="lockStatus"
- validate={required()}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.locker"
- source="locker"
+ label="table.field.companys.city"
+ source="city"
parse={v => v}
/>
</Stack>
<Stack direction='row' gap={2}>
- <DateInput
- label="table.field.stock.lockedTime"
- source="lockedTime"
+ <TextInput
+ label="table.field.companys.address"
+ source="address"
+ parse={v => v}
/>
</Stack>
@@ -143,4 +165,4 @@
)
}
-export default StockEdit;
+export default CompanysEdit;
diff --git a/rsf-admin/src/page/basicInfo/shipper/ShipperList.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysList.jsx
similarity index 65%
rename from rsf-admin/src/page/basicInfo/shipper/ShipperList.jsx
rename to rsf-admin/src/page/basicInfo/companys/CompanysList.jsx
index facfcd5..dd3561b 100644
--- a/rsf-admin/src/page/basicInfo/shipper/ShipperList.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/CompanysList.jsx
@@ -34,13 +34,13 @@
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
-import ShipperCreate from "./ShipperCreate";
-import ShipperPanel from "./ShipperPanel";
-import EmptyData from "@/page/components/EmptyData";
-import MyCreateButton from "@/page/components/MyCreateButton";
-import MyExportButton from '@/page/components/MyExportButton';
-import PageDrawer from "@/page/components/PageDrawer";
-import MyField from "@/page/components/MyField";
+import CompanysCreate from "./CompanysCreate";
+import CompanysPanel from "./CompanysPanel";
+import EmptyData from "../../components/EmptyData";
+import MyCreateButton from "../../components/MyCreateButton";
+import MyExportButton from '../../components/MyExportButton';
+import PageDrawer from "../../components/PageDrawer";
+import MyField from "../../components/MyField";
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import * as Common from '@/utils/common';
@@ -63,8 +63,18 @@
<DateInput label='common.time.after' source="timeStart" alwaysOn />,
<DateInput label='common.time.before' source="timeEnd" alwaysOn />,
- <TextInput source="uuid" label="table.field.shipper.uuid" />,
- <TextInput source="name" label="table.field.shipper.name" />,
+ <TextInput source="code" label="table.field.companys.code" />,
+ <TextInput source="name" label="table.field.companys.name" />,
+ <TextInput source="nameEn" label="table.field.companys.nameEn" />,
+ <TextInput source="breifCode" label="table.field.companys.breifCode" />,
+ <TextInput source="type" label="table.field.companys.type" />,
+ <TextInput source="contact" label="table.field.companys.contact" />,
+ <TextInput source="tel" label="table.field.companys.tel" />,
+ <TextInput source="email" label="table.field.companys.email" />,
+ <TextInput source="pcode" label="table.field.companys.pcode" />,
+ <TextInput source="province" label="table.field.companys.province" />,
+ <TextInput source="city" label="table.field.companys.city" />,
+ <TextInput source="address" label="table.field.companys.address" />,
<TextInput label="common.field.memo" source="memo" />,
<SelectInput
@@ -78,7 +88,7 @@
/>,
]
-const ShipperList = () => {
+const CompanysList = () => {
const translate = useTranslate();
const [createDialog, setCreateDialog] = useState(false);
@@ -95,7 +105,7 @@
}),
marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
}}
- title={"menu.shipper"}
+ title={"menu.companys"}
empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
filters={filters}
sort={{ field: "create_time", order: "desc" }}
@@ -103,23 +113,33 @@
<TopToolbar>
<FilterButton />
<MyCreateButton onClick={() => { setCreateDialog(true) }} />
- <SelectColumnsButton preferenceKey='shipper' />
+ <SelectColumnsButton preferenceKey='companys' />
<MyExportButton />
</TopToolbar>
)}
perPage={DEFAULT_PAGE_SIZE}
>
<StyledDatagrid
- preferenceKey='shipper'
+ preferenceKey='companys'
bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
rowClick={(id, resource, record) => false}
- expand={() => <ShipperPanel />}
+ expand={() => <CompanysPanel />}
expandSingle={true}
omit={['id', 'createTime', 'createBy', 'memo']}
>
<NumberField source="id" />
- <TextField source="uuid" label="table.field.shipper.uuid" />
- <TextField source="name" label="table.field.shipper.name" />
+ <TextField source="code" label="table.field.companys.code" />
+ <TextField source="name" label="table.field.companys.name" />
+ <TextField source="nameEn" label="table.field.companys.nameEn" />
+ <TextField source="breifCode" label="table.field.companys.breifCode" />
+ <TextField source="type" label="table.field.companys.type" />
+ <TextField source="contact" label="table.field.companys.contact" />
+ <TextField source="tel" label="table.field.companys.tel" />
+ <TextField source="email" label="table.field.companys.email" />
+ <TextField source="pcode" label="table.field.companys.pcode" />
+ <TextField source="province" label="table.field.companys.province" />
+ <TextField source="city" label="table.field.companys.city" />
+ <TextField source="address" label="table.field.companys.address" />
<ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
<TextField source="nickname" />
@@ -137,12 +157,12 @@
</WrapperField>
</StyledDatagrid>
</List>
- <ShipperCreate
+ <CompanysCreate
open={createDialog}
setOpen={setCreateDialog}
/>
<PageDrawer
- title='Shipper Detail'
+ title='Companys Detail'
drawerVal={drawerVal}
setDrawerVal={setDrawerVal}
>
@@ -151,4 +171,4 @@
)
}
-export default ShipperList;
+export default CompanysList;
diff --git a/rsf-admin/src/page/stock/StockPanel.jsx b/rsf-admin/src/page/basicInfo/companys/CompanysPanel.jsx
similarity index 62%
copy from rsf-admin/src/page/stock/StockPanel.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysPanel.jsx
index d018da4..d0cdf5b 100644
--- a/rsf-admin/src/page/stock/StockPanel.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/CompanysPanel.jsx
@@ -4,10 +4,10 @@
useTranslate,
useRecordContext,
} from 'react-admin';
-import PanelTypography from "../components/PanelTypography";
+import PanelTypography from "../../components/PanelTypography";
import * as Common from '@/utils/common'
-const StockPanel = () => {
+const CompanysPanel = () => {
const record = useRecordContext();
if (!record) return null;
const translate = useTranslate();
@@ -23,7 +23,7 @@
overflow: 'hidden',
textOverflow: 'ellipsis',
}}>
- {Common.camelToPascalWithSpaces(translate('table.field.stock.id'))}: {record.id}
+ {Common.camelToPascalWithSpaces(translate('table.field.companys.name'))}: {record.name}
</Typography>
{/* inherit, primary, secondary, textPrimary, textSecondary, error */}
<Typography variant="h6" gutterBottom align="right" >
@@ -42,56 +42,74 @@
<Grid container spacing={2}>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.asnOrder"
- property={record.asnOrder}
+ title="table.field.companys.code"
+ property={record.code}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.erpToken"
- property={record.erpToken}
+ title="table.field.companys.name"
+ property={record.name}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.erpOrder"
- property={record.erpOrder}
+ title="table.field.companys.nameEn"
+ property={record.nameEn}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.erpStkAdr"
- property={record.erpStkAdr}
+ title="table.field.companys.breifCode"
+ property={record.breifCode}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.contractId"
- property={record.contractId$}
+ title="table.field.companys.type"
+ property={record.type}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.lockReason"
- property={record.lockReason}
+ title="table.field.companys.contact"
+ property={record.contact}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.lockStatus"
- property={record.lockStatus}
+ title="table.field.companys.tel"
+ property={record.tel}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.locker"
- property={record.locker}
+ title="table.field.companys.email"
+ property={record.email}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.lockedTime"
- property={record.lockedTime$}
+ title="table.field.companys.pcode"
+ property={record.pcode}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.companys.province"
+ property={record.province}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.companys.city"
+ property={record.city}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.companys.address"
+ property={record.address}
/>
</Grid>
@@ -102,4 +120,4 @@
);
};
-export default StockPanel;
+export default CompanysPanel;
diff --git a/rsf-admin/src/page/customer/index.jsx b/rsf-admin/src/page/basicInfo/companys/index.jsx
similarity index 67%
rename from rsf-admin/src/page/customer/index.jsx
rename to rsf-admin/src/page/basicInfo/companys/index.jsx
index 6ffbc95..afa36e5 100644
--- a/rsf-admin/src/page/customer/index.jsx
+++ b/rsf-admin/src/page/basicInfo/companys/index.jsx
@@ -5,12 +5,12 @@
ShowGuesser,
} from "react-admin";
-import CustomerList from "./CustomerList";
-import CustomerEdit from "./CustomerEdit";
+import CompanysList from "./CompanysList";
+import CompanysEdit from "./CompanysEdit";
export default {
- list: CustomerList,
- edit: CustomerEdit,
+ list: CompanysList,
+ edit: CompanysEdit,
show: ShowGuesser,
recordRepresentation: (record) => {
return `${record.name}`
diff --git a/rsf-admin/src/page/basicInfo/shipper/ShipperCreate.jsx b/rsf-admin/src/page/basicInfo/shipper/ShipperCreate.jsx
deleted file mode 100644
index b45fd01..0000000
--- a/rsf-admin/src/page/basicInfo/shipper/ShipperCreate.jsx
+++ /dev/null
@@ -1,125 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import {
- CreateBase,
- useTranslate,
- TextInput,
- NumberInput,
- BooleanInput,
- DateInput,
- SaveButton,
- SelectInput,
- ReferenceInput,
- ReferenceArrayInput,
- AutocompleteInput,
- Toolbar,
- required,
- useDataProvider,
- useNotify,
- Form,
- useCreateController,
-} from 'react-admin';
-import {
- Dialog,
- DialogActions,
- DialogContent,
- DialogTitle,
- Stack,
- Grid,
- Box,
-} from '@mui/material';
-import DialogCloseButton from "@/page/components/DialogCloseButton";
-import StatusSelectInput from "@/page/components/StatusSelectInput";
-import MemoInput from "@/page/components/MemoInput";
-
-const ShipperCreate = (props) => {
- const { open, setOpen } = props;
-
- const translate = useTranslate();
- const notify = useNotify();
-
- const handleClose = (event, reason) => {
- if (reason !== "backdropClick") {
- setOpen(false);
- }
- };
-
- const handleSuccess = async (data) => {
- setOpen(false);
- notify('common.response.success');
- };
-
- const handleError = async (error) => {
- notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } });
- };
-
- return (
- <>
- <CreateBase
- record={{}}
- transform={(data) => {
- return data;
- }}
- mutationOptions={{ onSuccess: handleSuccess, onError: handleError }}
- >
- <Dialog
- open={open}
- onClose={handleClose}
- aria-labelledby="form-dialog-title"
- fullWidth
- disableRestoreFocus
- maxWidth="md" // 'xs' | 'sm' | 'md' | 'lg' | 'xl'
- >
- <Form>
- <DialogTitle id="form-dialog-title" sx={{
- position: 'sticky',
- top: 0,
- backgroundColor: 'background.paper',
- zIndex: 1000
- }}
- >
- {translate('create.title')}
- <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}>
- <DialogCloseButton onClose={handleClose} />
- </Box>
- </DialogTitle>
- <DialogContent sx={{ mt: 2 }}>
- <Grid container rowSpacing={2} columnSpacing={2}>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.shipper.uuid"
- source="uuid"
- parse={v => v}
- autoFocus
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.shipper.name"
- source="name"
- parse={v => v}
- />
- </Grid>
-
- <Grid item xs={6} display="flex" gap={1}>
- <StatusSelectInput />
- </Grid>
- <Grid item xs={12} display="flex" gap={1}>
- <Stack direction="column" spacing={1} width={'100%'}>
- <MemoInput />
- </Stack>
- </Grid>
- </Grid>
- </DialogContent>
- <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}>
- <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} >
- <SaveButton />
- </Toolbar>
- </DialogActions>
- </Form>
- </Dialog>
- </CreateBase>
- </>
- )
-}
-
-export default ShipperCreate;
diff --git a/rsf-admin/src/page/basicInfo/shipper/ShipperEdit.jsx b/rsf-admin/src/page/basicInfo/shipper/ShipperEdit.jsx
deleted file mode 100644
index e81f51e..0000000
--- a/rsf-admin/src/page/basicInfo/shipper/ShipperEdit.jsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import {
- Edit,
- SimpleForm,
- FormDataConsumer,
- useTranslate,
- TextInput,
- NumberInput,
- BooleanInput,
- DateInput,
- SelectInput,
- ReferenceInput,
- ReferenceArrayInput,
- AutocompleteInput,
- SaveButton,
- Toolbar,
- Labeled,
- NumberField,
- required,
- useRecordContext,
- DeleteButton,
-} from 'react-admin';
-import { useWatch, useFormContext } from "react-hook-form";
-import { Stack, Grid, Box, Typography } from '@mui/material';
-import * as Common from '@/utils/common';
-import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting';
-import EditBaseAside from "@/page/components/EditBaseAside";
-import CustomerTopToolBar from "@/page/components/EditTopToolBar";
-import MemoInput from "@/page/components/MemoInput";
-import StatusSelectInput from "@/page/components/StatusSelectInput";
-
-const FormToolbar = () => {
- const { getValues } = useFormContext();
-
- return (
- <Toolbar sx={{ justifyContent: 'space-between' }}>
- <SaveButton />
- <DeleteButton mutationMode="optimistic" />
- </Toolbar>
- )
-}
-
-const ShipperEdit = () => {
- const translate = useTranslate();
-
- return (
- <Edit
- redirect="list"
- mutationMode={EDIT_MODE}
- actions={<CustomerTopToolBar />}
- aside={<EditBaseAside />}
- >
- <SimpleForm
- shouldUnregister
- warnWhenUnsavedChanges
- toolbar={<FormToolbar />}
- mode="onTouched"
- defaultValues={{}}
- // validate={(values) => { }}
- >
- <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
- <Grid item xs={12} md={8}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.main')}
- </Typography>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.shipper.uuid"
- source="uuid"
- parse={v => v}
- autoFocus
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.shipper.name"
- source="name"
- parse={v => v}
- />
- </Stack>
-
- </Grid>
- <Grid item xs={12} md={4}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.common')}
- </Typography>
- <StatusSelectInput />
- <Box mt="2em" />
- <MemoInput />
- </Grid>
- </Grid>
- </SimpleForm>
- </Edit >
- )
-}
-
-export default ShipperEdit;
diff --git a/rsf-admin/src/page/basicInfo/shipper/ShipperPanel.jsx b/rsf-admin/src/page/basicInfo/shipper/ShipperPanel.jsx
deleted file mode 100644
index f548e14..0000000
--- a/rsf-admin/src/page/basicInfo/shipper/ShipperPanel.jsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material';
-import {
- useTranslate,
- useRecordContext,
-} from 'react-admin';
-import PanelTypography from "@/page/components/PanelTypography";
-import * as Common from '@/utils/common'
-
-const ShipperPanel = () => {
- const record = useRecordContext();
- if (!record) return null;
- const translate = useTranslate();
- return (
- <>
- <Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}>
- <CardContent>
- <Grid container spacing={2}>
- <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}>
- <Typography variant="h6" gutterBottom align="left" sx={{
- maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' },
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}>
- {Common.camelToPascalWithSpaces(translate('table.field.shipper.name'))}: {record.name}
- </Typography>
- {/* inherit, primary, secondary, textPrimary, textSecondary, error */}
- <Typography variant="h6" gutterBottom align="right" >
- ID: {record.id}
- </Typography>
- </Grid>
- </Grid>
- <Grid container spacing={2}>
- <Grid item xs={12} container alignContent="flex-end">
- <Typography variant="caption" color="textSecondary" sx={{ wordWrap: 'break-word', wordBreak: 'break-all' }}>
- {Common.camelToPascalWithSpaces(translate('common.field.memo'))}:{record.memo}
- </Typography>
- </Grid>
- </Grid>
- <Box height={20}> </Box>
- <Grid container spacing={2}>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.shipper.uuid"
- property={record.uuid}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.shipper.name"
- property={record.name}
- />
- </Grid>
-
- </Grid>
- </CardContent>
- </Card >
- </>
- );
-};
-
-export default ShipperPanel;
diff --git a/rsf-admin/src/page/basicInfo/shipper/index.jsx b/rsf-admin/src/page/basicInfo/shipper/index.jsx
deleted file mode 100644
index 27015aa..0000000
--- a/rsf-admin/src/page/basicInfo/shipper/index.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import {
- ListGuesser,
- EditGuesser,
- ShowGuesser,
-} from "react-admin";
-
-import ShipperList from "./ShipperList";
-import ShipperEdit from "./ShipperEdit";
-
-export default {
- list: ShipperList,
- edit: ShipperEdit,
- show: ShowGuesser,
- recordRepresentation: (record) => {
- return `${record.name}`
- }
-};
diff --git a/rsf-admin/src/page/stock/StockCreate.jsx b/rsf-admin/src/page/dictData/DictDataCreate.jsx
similarity index 72%
rename from rsf-admin/src/page/stock/StockCreate.jsx
rename to rsf-admin/src/page/dictData/DictDataCreate.jsx
index 75fccd1..2c609cc 100644
--- a/rsf-admin/src/page/stock/StockCreate.jsx
+++ b/rsf-admin/src/page/dictData/DictDataCreate.jsx
@@ -31,7 +31,7 @@
import StatusSelectInput from "../components/StatusSelectInput";
import MemoInput from "../components/MemoInput";
-const StockCreate = (props) => {
+const DictDataCreate = (props) => {
const { open, setOpen } = props;
const translate = useTranslate();
@@ -86,8 +86,8 @@
<Grid container rowSpacing={2} columnSpacing={2}>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.asnOrder"
- source="asnOrder"
+ label="table.field.dictData.dictTypeId"
+ source="dictTypeId"
parse={v => v}
autoFocus
validate={required()}
@@ -95,57 +95,39 @@
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.erpToken"
- source="erpToken"
+ label="table.field.dictData.dictTypeCode"
+ source="dictTypeCode"
parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stock.erpOrder"
- source="erpOrder"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stock.erpStkAdr"
- source="erpStkAdr"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stock.contractId"
- source="contractId"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stock.lockReason"
- source="lockReason"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stock.lockStatus"
- source="lockStatus"
validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.stock.locker"
- source="locker"
+ label="table.field.dictData.value"
+ source="value"
parse={v => v}
+ validate={required()}
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
- <DateInput
- label="table.field.stock.lockedTime"
- source="lockedTime"
+ <TextInput
+ label="table.field.dictData.label"
+ source="label"
+ parse={v => v}
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.dictData.sort"
+ source="sort"
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.dictData.color"
+ source="color"
+ parse={v => v}
/>
</Grid>
@@ -171,4 +153,4 @@
)
}
-export default StockCreate;
+export default DictDataCreate;
diff --git a/rsf-admin/src/page/stock/StockEdit.jsx b/rsf-admin/src/page/dictData/DictDataEdit.jsx
similarity index 68%
rename from rsf-admin/src/page/stock/StockEdit.jsx
rename to rsf-admin/src/page/dictData/DictDataEdit.jsx
index 384dd79..b267372 100644
--- a/rsf-admin/src/page/stock/StockEdit.jsx
+++ b/rsf-admin/src/page/dictData/DictDataEdit.jsx
@@ -40,7 +40,7 @@
)
}
-const StockEdit = () => {
+const DictDataEdit = () => {
const translate = useTranslate();
return (
@@ -65,8 +65,8 @@
</Typography>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.asnOrder"
- source="asnOrder"
+ label="table.field.dictData.dictTypeId"
+ source="dictTypeId"
parse={v => v}
autoFocus
validate={required()}
@@ -74,57 +74,39 @@
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.erpToken"
- source="erpToken"
+ label="table.field.dictData.dictTypeCode"
+ source="dictTypeCode"
parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stock.erpOrder"
- source="erpOrder"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stock.erpStkAdr"
- source="erpStkAdr"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stock.contractId"
- source="contractId"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stock.lockReason"
- source="lockReason"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stock.lockStatus"
- source="lockStatus"
validate={required()}
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.stock.locker"
- source="locker"
+ label="table.field.dictData.value"
+ source="value"
parse={v => v}
+ validate={required()}
/>
</Stack>
<Stack direction='row' gap={2}>
- <DateInput
- label="table.field.stock.lockedTime"
- source="lockedTime"
+ <TextInput
+ label="table.field.dictData.label"
+ source="label"
+ parse={v => v}
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.dictData.sort"
+ source="sort"
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.dictData.color"
+ source="color"
+ parse={v => v}
/>
</Stack>
@@ -143,4 +125,4 @@
)
}
-export default StockEdit;
+export default DictDataEdit;
diff --git a/rsf-admin/src/page/customer/CustomerList.jsx b/rsf-admin/src/page/dictData/DictDataList.jsx
similarity index 77%
copy from rsf-admin/src/page/customer/CustomerList.jsx
copy to rsf-admin/src/page/dictData/DictDataList.jsx
index 6973f5f..d20971b 100644
--- a/rsf-admin/src/page/customer/CustomerList.jsx
+++ b/rsf-admin/src/page/dictData/DictDataList.jsx
@@ -34,8 +34,8 @@
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
-import CustomerCreate from "./CustomerCreate";
-import CustomerPanel from "./CustomerPanel";
+import DictDataCreate from "./DictDataCreate";
+import DictDataPanel from "./DictDataPanel";
import EmptyData from "../components/EmptyData";
import MyCreateButton from "../components/MyCreateButton";
import MyExportButton from '../components/MyExportButton';
@@ -63,8 +63,12 @@
<DateInput label='common.time.after' source="timeStart" alwaysOn />,
<DateInput label='common.time.before' source="timeEnd" alwaysOn />,
- <TextInput source="uuid" label="table.field.customer.uuid" />,
- <TextInput source="name" label="table.field.customer.name" />,
+ <TextInput source="dictTypeId" label="table.field.dictData.dictTypeId" />,
+ <TextInput source="dictTypeCode" label="table.field.dictData.dictTypeCode" />,
+ <TextInput source="value" label="table.field.dictData.value" />,
+ <TextInput source="label" label="table.field.dictData.label" />,
+ <NumberInput source="sort" label="table.field.dictData.sort" />,
+ <TextInput source="color" label="table.field.dictData.color" />,
<TextInput label="common.field.memo" source="memo" />,
<SelectInput
@@ -78,7 +82,7 @@
/>,
]
-const CustomerList = () => {
+const DictDataList = () => {
const translate = useTranslate();
const [createDialog, setCreateDialog] = useState(false);
@@ -95,7 +99,7 @@
}),
marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
}}
- title={"menu.customer"}
+ title={"menu.dictData"}
empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
filters={filters}
sort={{ field: "create_time", order: "desc" }}
@@ -103,23 +107,27 @@
<TopToolbar>
<FilterButton />
<MyCreateButton onClick={() => { setCreateDialog(true) }} />
- <SelectColumnsButton preferenceKey='customer' />
+ <SelectColumnsButton preferenceKey='dictData' />
<MyExportButton />
</TopToolbar>
)}
perPage={DEFAULT_PAGE_SIZE}
>
<StyledDatagrid
- preferenceKey='customer'
+ preferenceKey='dictData'
bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
rowClick={(id, resource, record) => false}
- expand={() => <CustomerPanel />}
+ expand={() => <DictDataPanel />}
expandSingle={true}
omit={['id', 'createTime', 'createBy', 'memo']}
>
<NumberField source="id" />
- <TextField source="uuid" label="table.field.customer.uuid" />
- <TextField source="name" label="table.field.customer.name" />
+ <TextField source="dictTypeId" label="table.field.dictData.dictTypeId" />
+ <TextField source="dictTypeCode" label="table.field.dictData.dictTypeCode" />
+ <TextField source="value" label="table.field.dictData.value" />
+ <TextField source="label" label="table.field.dictData.label" />
+ <NumberField source="sort" label="table.field.dictData.sort" />
+ <TextField source="color" label="table.field.dictData.color" />
<ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
<TextField source="nickname" />
@@ -137,12 +145,12 @@
</WrapperField>
</StyledDatagrid>
</List>
- <CustomerCreate
+ <DictDataCreate
open={createDialog}
setOpen={setCreateDialog}
/>
<PageDrawer
- title='Customer Detail'
+ title='DictData Detail'
drawerVal={drawerVal}
setDrawerVal={setDrawerVal}
>
@@ -151,4 +159,4 @@
)
}
-export default CustomerList;
+export default DictDataList;
diff --git a/rsf-admin/src/page/stock/StockPanel.jsx b/rsf-admin/src/page/dictData/DictDataPanel.jsx
similarity index 64%
rename from rsf-admin/src/page/stock/StockPanel.jsx
rename to rsf-admin/src/page/dictData/DictDataPanel.jsx
index d018da4..557a79c 100644
--- a/rsf-admin/src/page/stock/StockPanel.jsx
+++ b/rsf-admin/src/page/dictData/DictDataPanel.jsx
@@ -7,7 +7,7 @@
import PanelTypography from "../components/PanelTypography";
import * as Common from '@/utils/common'
-const StockPanel = () => {
+const DictDataPanel = () => {
const record = useRecordContext();
if (!record) return null;
const translate = useTranslate();
@@ -23,7 +23,7 @@
overflow: 'hidden',
textOverflow: 'ellipsis',
}}>
- {Common.camelToPascalWithSpaces(translate('table.field.stock.id'))}: {record.id}
+ {Common.camelToPascalWithSpaces(translate('table.field.dictData.id'))}: {record.id}
</Typography>
{/* inherit, primary, secondary, textPrimary, textSecondary, error */}
<Typography variant="h6" gutterBottom align="right" >
@@ -42,56 +42,38 @@
<Grid container spacing={2}>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.asnOrder"
- property={record.asnOrder}
+ title="table.field.dictData.dictTypeId"
+ property={record.dictTypeId$}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.erpToken"
- property={record.erpToken}
+ title="table.field.dictData.dictTypeCode"
+ property={record.dictTypeCode}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.erpOrder"
- property={record.erpOrder}
+ title="table.field.dictData.value"
+ property={record.value}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.erpStkAdr"
- property={record.erpStkAdr}
+ title="table.field.dictData.label"
+ property={record.label}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.contractId"
- property={record.contractId$}
+ title="table.field.dictData.sort"
+ property={record.sort}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.stock.lockReason"
- property={record.lockReason}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stock.lockStatus"
- property={record.lockStatus}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stock.locker"
- property={record.locker}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stock.lockedTime"
- property={record.lockedTime$}
+ title="table.field.dictData.color"
+ property={record.color}
/>
</Grid>
@@ -102,4 +84,4 @@
);
};
-export default StockPanel;
+export default DictDataPanel;
diff --git a/rsf-admin/src/page/stock/index.jsx b/rsf-admin/src/page/dictData/index.jsx
similarity index 66%
rename from rsf-admin/src/page/stock/index.jsx
rename to rsf-admin/src/page/dictData/index.jsx
index 6f846bf..31b11ac 100644
--- a/rsf-admin/src/page/stock/index.jsx
+++ b/rsf-admin/src/page/dictData/index.jsx
@@ -5,12 +5,12 @@
ShowGuesser,
} from "react-admin";
-import StockList from "./StockList";
-import StockEdit from "./StockEdit";
+import DictDataList from "./DictDataList";
+import DictDataEdit from "./DictDataEdit";
export default {
- list: StockList,
- edit: StockEdit,
+ list: DictDataList,
+ edit: DictDataEdit,
show: ShowGuesser,
recordRepresentation: (record) => {
return `${record.id}`
diff --git a/rsf-admin/src/page/customer/CustomerCreate.jsx b/rsf-admin/src/page/dictType/DictTypeCreate.jsx
similarity index 92%
rename from rsf-admin/src/page/customer/CustomerCreate.jsx
rename to rsf-admin/src/page/dictType/DictTypeCreate.jsx
index 2d82ef9..1425007 100644
--- a/rsf-admin/src/page/customer/CustomerCreate.jsx
+++ b/rsf-admin/src/page/dictType/DictTypeCreate.jsx
@@ -31,7 +31,7 @@
import StatusSelectInput from "../components/StatusSelectInput";
import MemoInput from "../components/MemoInput";
-const CustomerCreate = (props) => {
+const DictTypeCreate = (props) => {
const { open, setOpen } = props;
const translate = useTranslate();
@@ -86,16 +86,15 @@
<Grid container rowSpacing={2} columnSpacing={2}>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.customer.uuid"
- source="uuid"
+ label="table.field.dictType.name"
+ source="name"
parse={v => v}
- autoFocus
/>
</Grid>
<Grid item xs={6} display="flex" gap={1}>
<TextInput
- label="table.field.customer.name"
- source="name"
+ label="table.field.dictType.description"
+ source="description"
parse={v => v}
/>
</Grid>
@@ -122,4 +121,4 @@
)
}
-export default CustomerCreate;
+export default DictTypeCreate;
diff --git a/rsf-admin/src/page/customer/CustomerEdit.jsx b/rsf-admin/src/page/dictType/DictTypeEdit.jsx
similarity index 90%
rename from rsf-admin/src/page/customer/CustomerEdit.jsx
rename to rsf-admin/src/page/dictType/DictTypeEdit.jsx
index 1419e8f..31ac57a 100644
--- a/rsf-admin/src/page/customer/CustomerEdit.jsx
+++ b/rsf-admin/src/page/dictType/DictTypeEdit.jsx
@@ -40,7 +40,7 @@
)
}
-const CustomerEdit = () => {
+const DictTypeEdit = () => {
const translate = useTranslate();
return (
@@ -65,16 +65,15 @@
</Typography>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.customer.uuid"
- source="uuid"
+ label="table.field.dictType.name"
+ source="name"
parse={v => v}
- autoFocus
/>
</Stack>
<Stack direction='row' gap={2}>
<TextInput
- label="table.field.customer.name"
- source="name"
+ label="table.field.dictType.description"
+ source="description"
parse={v => v}
/>
</Stack>
@@ -94,4 +93,4 @@
)
}
-export default CustomerEdit;
+export default DictTypeEdit;
diff --git a/rsf-admin/src/page/customer/CustomerList.jsx b/rsf-admin/src/page/dictType/DictTypeList.jsx
similarity index 86%
rename from rsf-admin/src/page/customer/CustomerList.jsx
rename to rsf-admin/src/page/dictType/DictTypeList.jsx
index 6973f5f..d668008 100644
--- a/rsf-admin/src/page/customer/CustomerList.jsx
+++ b/rsf-admin/src/page/dictType/DictTypeList.jsx
@@ -34,8 +34,8 @@
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
-import CustomerCreate from "./CustomerCreate";
-import CustomerPanel from "./CustomerPanel";
+import DictTypeCreate from "./DictTypeCreate";
+import DictTypePanel from "./DictTypePanel";
import EmptyData from "../components/EmptyData";
import MyCreateButton from "../components/MyCreateButton";
import MyExportButton from '../components/MyExportButton';
@@ -63,8 +63,9 @@
<DateInput label='common.time.after' source="timeStart" alwaysOn />,
<DateInput label='common.time.before' source="timeEnd" alwaysOn />,
- <TextInput source="uuid" label="table.field.customer.uuid" />,
- <TextInput source="name" label="table.field.customer.name" />,
+ <TextInput source="uuid" label="table.field.dictType.uuid" />,
+ <TextInput source="name" label="table.field.dictType.name" />,
+ <TextInput source="description" label="table.field.dictType.description" />,
<TextInput label="common.field.memo" source="memo" />,
<SelectInput
@@ -78,7 +79,7 @@
/>,
]
-const CustomerList = () => {
+const DictTypeList = () => {
const translate = useTranslate();
const [createDialog, setCreateDialog] = useState(false);
@@ -95,7 +96,7 @@
}),
marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
}}
- title={"menu.customer"}
+ title={"menu.dictType"}
empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
filters={filters}
sort={{ field: "create_time", order: "desc" }}
@@ -103,23 +104,23 @@
<TopToolbar>
<FilterButton />
<MyCreateButton onClick={() => { setCreateDialog(true) }} />
- <SelectColumnsButton preferenceKey='customer' />
+ <SelectColumnsButton preferenceKey='dictType' />
<MyExportButton />
</TopToolbar>
)}
perPage={DEFAULT_PAGE_SIZE}
>
<StyledDatagrid
- preferenceKey='customer'
+ preferenceKey='dictType'
bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
rowClick={(id, resource, record) => false}
- expand={() => <CustomerPanel />}
+ expand={() => <DictTypePanel />}
expandSingle={true}
omit={['id', 'createTime', 'createBy', 'memo']}
>
<NumberField source="id" />
- <TextField source="uuid" label="table.field.customer.uuid" />
- <TextField source="name" label="table.field.customer.name" />
+ <TextField source="name" label="table.field.dictType.name" />
+ <TextField source="description" label="table.field.dictType.description" />
<ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
<TextField source="nickname" />
@@ -137,12 +138,12 @@
</WrapperField>
</StyledDatagrid>
</List>
- <CustomerCreate
+ <DictTypeCreate
open={createDialog}
setOpen={setCreateDialog}
/>
<PageDrawer
- title='Customer Detail'
+ title='DictType Detail'
drawerVal={drawerVal}
setDrawerVal={setDrawerVal}
>
@@ -151,4 +152,4 @@
)
}
-export default CustomerList;
+export default DictTypeList;
diff --git a/rsf-admin/src/page/customer/CustomerPanel.jsx b/rsf-admin/src/page/dictType/DictTypePanel.jsx
similarity index 88%
rename from rsf-admin/src/page/customer/CustomerPanel.jsx
rename to rsf-admin/src/page/dictType/DictTypePanel.jsx
index d03f129..846681f 100644
--- a/rsf-admin/src/page/customer/CustomerPanel.jsx
+++ b/rsf-admin/src/page/dictType/DictTypePanel.jsx
@@ -7,7 +7,7 @@
import PanelTypography from "../components/PanelTypography";
import * as Common from '@/utils/common'
-const CustomerPanel = () => {
+const DictTypePanel = () => {
const record = useRecordContext();
if (!record) return null;
const translate = useTranslate();
@@ -23,7 +23,7 @@
overflow: 'hidden',
textOverflow: 'ellipsis',
}}>
- {Common.camelToPascalWithSpaces(translate('table.field.customer.name'))}: {record.name}
+ {Common.camelToPascalWithSpaces(translate('table.field.dictType.name'))}: {record.name}
</Typography>
{/* inherit, primary, secondary, textPrimary, textSecondary, error */}
<Typography variant="h6" gutterBottom align="right" >
@@ -42,14 +42,14 @@
<Grid container spacing={2}>
<Grid item xs={6}>
<PanelTypography
- title="table.field.customer.uuid"
- property={record.uuid}
+ title="table.field.dictType.name"
+ property={record.name}
/>
</Grid>
<Grid item xs={6}>
<PanelTypography
- title="table.field.customer.name"
- property={record.name}
+ title="table.field.dictType.description"
+ property={record.description}
/>
</Grid>
@@ -60,4 +60,4 @@
);
};
-export default CustomerPanel;
+export default DictTypePanel;
diff --git a/rsf-admin/src/page/customer/index.jsx b/rsf-admin/src/page/dictType/index.jsx
similarity index 67%
copy from rsf-admin/src/page/customer/index.jsx
copy to rsf-admin/src/page/dictType/index.jsx
index 6ffbc95..7dc7dcb 100644
--- a/rsf-admin/src/page/customer/index.jsx
+++ b/rsf-admin/src/page/dictType/index.jsx
@@ -5,12 +5,12 @@
ShowGuesser,
} from "react-admin";
-import CustomerList from "./CustomerList";
-import CustomerEdit from "./CustomerEdit";
+import DictTypeList from "./DictTypeList";
+import DictTypeEdit from "./DictTypeEdit";
export default {
- list: CustomerList,
- edit: CustomerEdit,
+ list: DictTypeList,
+ edit: DictTypeEdit,
show: ShowGuesser,
recordRepresentation: (record) => {
return `${record.name}`
diff --git a/rsf-admin/src/page/stock/StockList.jsx b/rsf-admin/src/page/stock/StockList.jsx
deleted file mode 100644
index a6f49fa..0000000
--- a/rsf-admin/src/page/stock/StockList.jsx
+++ /dev/null
@@ -1,168 +0,0 @@
-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,
-} from 'react-admin';
-import { Box, Typography, Card, Stack } from '@mui/material';
-import { styled } from '@mui/material/styles';
-import StockCreate from "./StockCreate";
-import StockPanel from "./StockPanel";
-import EmptyData from "../components/EmptyData";
-import MyCreateButton from "../components/MyCreateButton";
-import MyExportButton from '../components/MyExportButton';
-import PageDrawer from "../components/PageDrawer";
-import MyField from "../components/MyField";
-import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
-import * as Common from '@/utils/common';
-
-const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
- '& .css-1vooibu-MuiSvgIcon-root': {
- height: '.9em'
- },
- '& .RaDatagrid-row': {
- cursor: 'auto'
- },
- '& .column-name': {
- },
- '& .opt': {
- width: 200
- },
-}));
-
-const filters = [
- <SearchInput source="condition" alwaysOn />,
- <DateInput label='common.time.after' source="timeStart" alwaysOn />,
- <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
-
- <TextInput source="asnOrder" label="table.field.stock.asnOrder" />,
- <TextInput source="erpToken" label="table.field.stock.erpToken" />,
- <TextInput source="erpOrder" label="table.field.stock.erpOrder" />,
- <TextInput source="erpStkAdr" label="table.field.stock.erpStkAdr" />,
- <TextInput source="contractId" label="table.field.stock.contractId" />,
- <TextInput source="lockReason" label="table.field.stock.lockReason" />,
- <NumberInput source="lockStatus" label="table.field.stock.lockStatus" />,
- <TextInput source="locker" label="table.field.stock.locker" />,
- <DateInput source="lockedTime" label="table.field.stock.lockedTime" />,
-
- <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 StockList = () => {
- 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.stock"}
- empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
- filters={filters}
- sort={{ field: "create_time", order: "desc" }}
- actions={(
- <TopToolbar>
- <FilterButton />
- <MyCreateButton onClick={() => { setCreateDialog(true) }} />
- <SelectColumnsButton preferenceKey='stock' />
- <MyExportButton />
- </TopToolbar>
- )}
- perPage={DEFAULT_PAGE_SIZE}
- >
- <StyledDatagrid
- preferenceKey='stock'
- bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
- rowClick={(id, resource, record) => false}
- expand={() => <StockPanel />}
- expandSingle={true}
- omit={['id', 'createTime', 'createBy', 'memo']}
- >
- <NumberField source="id" />
- <TextField source="asnOrder" label="table.field.stock.asnOrder" />
- <TextField source="erpToken" label="table.field.stock.erpToken" />
- <TextField source="erpOrder" label="table.field.stock.erpOrder" />
- <TextField source="erpStkAdr" label="table.field.stock.erpStkAdr" />
- <TextField source="contractId" label="table.field.stock.contractId" />
- <TextField source="lockReason" label="table.field.stock.lockReason" />
- <NumberField source="lockStatus" label="table.field.stock.lockStatus" />
- <TextField source="locker" label="table.field.stock.locker" />
- <DateField source="lockedTime" label="table.field.stock.lockedTime" showTime />
-
- <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
- <TextField source="nickname" />
- </ReferenceField>
- <DateField source="updateTime" label="common.field.updateTime" showTime />
- <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}>
- <TextField source="nickname" />
- </ReferenceField>
- <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">
- <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
- <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
- </WrapperField>
- </StyledDatagrid>
- </List>
- <StockCreate
- open={createDialog}
- setOpen={setCreateDialog}
- />
- <PageDrawer
- title='Stock Detail'
- drawerVal={drawerVal}
- setDrawerVal={setDrawerVal}
- >
- </PageDrawer>
- </Box>
- )
-}
-
-export default StockList;
diff --git a/rsf-admin/src/page/stockItem/StockItemCreate.jsx b/rsf-admin/src/page/stockItem/StockItemCreate.jsx
deleted file mode 100644
index b604451..0000000
--- a/rsf-admin/src/page/stockItem/StockItemCreate.jsx
+++ /dev/null
@@ -1,318 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import {
- CreateBase,
- useTranslate,
- TextInput,
- NumberInput,
- BooleanInput,
- DateInput,
- SaveButton,
- SelectInput,
- ReferenceInput,
- ReferenceArrayInput,
- AutocompleteInput,
- Toolbar,
- required,
- useDataProvider,
- useNotify,
- Form,
- useCreateController,
-} from 'react-admin';
-import {
- Dialog,
- DialogActions,
- DialogContent,
- DialogTitle,
- Stack,
- Grid,
- Box,
-} from '@mui/material';
-import DialogCloseButton from "../components/DialogCloseButton";
-import StatusSelectInput from "../components/StatusSelectInput";
-import MemoInput from "../components/MemoInput";
-
-const StockItemCreate = (props) => {
- const { open, setOpen } = props;
-
- const translate = useTranslate();
- const notify = useNotify();
-
- const handleClose = (event, reason) => {
- if (reason !== "backdropClick") {
- setOpen(false);
- }
- };
-
- const handleSuccess = async (data) => {
- setOpen(false);
- notify('common.response.success');
- };
-
- const handleError = async (error) => {
- notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } });
- };
-
- return (
- <>
- <CreateBase
- record={{}}
- transform={(data) => {
- return data;
- }}
- mutationOptions={{ onSuccess: handleSuccess, onError: handleError }}
- >
- <Dialog
- open={open}
- onClose={handleClose}
- aria-labelledby="form-dialog-title"
- fullWidth
- disableRestoreFocus
- maxWidth="md" // 'xs' | 'sm' | 'md' | 'lg' | 'xl'
- >
- <Form>
- <DialogTitle id="form-dialog-title" sx={{
- position: 'sticky',
- top: 0,
- backgroundColor: 'background.paper',
- zIndex: 1000
- }}
- >
- {translate('create.title')}
- <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}>
- <DialogCloseButton onClose={handleClose} />
- </Box>
- </DialogTitle>
- <DialogContent sx={{ mt: 2 }}>
- <Grid container rowSpacing={2} columnSpacing={2}>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.stockId"
- source="stockId"
- parse={v => v}
- autoFocus
- validate={required()}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <ReferenceInput
- source="matnrId"
- reference="matnr"
- >
- <AutocompleteInput
- label="table.field.stockItem.matnrId"
- optionText="unit"
- filterToQuery={(val) => ({ unit: val })}
- validate={required()}
- />
- </ReferenceInput>
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.code"
- source="code"
- parse={v => v}
- validate={required()}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.matnrk"
- source="matnrk"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stockItem.anfme"
- source="anfme"
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stockItem.workQty"
- source="workQty"
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stockItem.qty"
- source="qty"
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stockItem.weight"
- source="weight"
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.unit"
- source="unit"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <ReferenceInput
- source="shipperId"
- reference="shipper"
- >
- <AutocompleteInput
- label="table.field.stockItem.shipperId"
- optionText="name"
- filterToQuery={(val) => ({ name: val })}
- />
- </ReferenceInput>
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.splrId"
- source="splrId"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.brand"
- source="brand"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.batch"
- source="batch"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.prodTime"
- source="prodTime"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <ReferenceInput
- source="inspectId"
- reference="qlyInspect"
- >
- <AutocompleteInput
- label="table.field.stockItem.inspectId"
- optionText="name"
- filterToQuery={(val) => ({ name: val })}
- />
- </ReferenceInput>
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.splrBtch"
- source="splrBtch"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.asnOrder"
- source="asnOrder"
- parse={v => v}
- validate={required()}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.erpToken"
- source="erpToken"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.erpOrder"
- source="erpOrder"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.erpStkAdr"
- source="erpStkAdr"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <ReferenceInput
- source="locId"
- reference="loc"
- >
- <AutocompleteInput
- label="table.field.stockItem.locId"
- optionText="name"
- filterToQuery={(val) => ({ name: val })}
- />
- </ReferenceInput>
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.barcode"
- source="barcode"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stockItem.purPrice"
- source="purPrice"
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.lockReason"
- source="lockReason"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <NumberInput
- label="table.field.stockItem.lockStatus"
- source="lockStatus"
- validate={required()}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <TextInput
- label="table.field.stockItem.locker"
- source="locker"
- parse={v => v}
- />
- </Grid>
- <Grid item xs={6} display="flex" gap={1}>
- <DateInput
- label="table.field.stockItem.lockedTime"
- source="lockedTime"
- />
- </Grid>
-
- <Grid item xs={6} display="flex" gap={1}>
- <StatusSelectInput />
- </Grid>
- <Grid item xs={12} display="flex" gap={1}>
- <Stack direction="column" spacing={1} width={'100%'}>
- <MemoInput />
- </Stack>
- </Grid>
- </Grid>
- </DialogContent>
- <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}>
- <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} >
- <SaveButton />
- </Toolbar>
- </DialogActions>
- </Form>
- </Dialog>
- </CreateBase>
- </>
- )
-}
-
-export default StockItemCreate;
diff --git a/rsf-admin/src/page/stockItem/StockItemEdit.jsx b/rsf-admin/src/page/stockItem/StockItemEdit.jsx
deleted file mode 100644
index 2e59917..0000000
--- a/rsf-admin/src/page/stockItem/StockItemEdit.jsx
+++ /dev/null
@@ -1,294 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import {
- Edit,
- SimpleForm,
- FormDataConsumer,
- useTranslate,
- TextInput,
- NumberInput,
- BooleanInput,
- DateInput,
- SelectInput,
- ReferenceInput,
- ReferenceArrayInput,
- AutocompleteInput,
- SaveButton,
- Toolbar,
- Labeled,
- NumberField,
- required,
- useRecordContext,
- DeleteButton,
-} from 'react-admin';
-import { useWatch, useFormContext } from "react-hook-form";
-import { Stack, Grid, Box, Typography } from '@mui/material';
-import * as Common from '@/utils/common';
-import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting';
-import EditBaseAside from "../components/EditBaseAside";
-import CustomerTopToolBar from "../components/EditTopToolBar";
-import MemoInput from "../components/MemoInput";
-import StatusSelectInput from "../components/StatusSelectInput";
-
-const FormToolbar = () => {
- const { getValues } = useFormContext();
-
- return (
- <Toolbar sx={{ justifyContent: 'space-between' }}>
- <SaveButton />
- <DeleteButton mutationMode="optimistic" />
- </Toolbar>
- )
-}
-
-const StockItemEdit = () => {
- const translate = useTranslate();
-
- return (
- <Edit
- redirect="list"
- mutationMode={EDIT_MODE}
- actions={<CustomerTopToolBar />}
- aside={<EditBaseAside />}
- >
- <SimpleForm
- shouldUnregister
- warnWhenUnsavedChanges
- toolbar={<FormToolbar />}
- mode="onTouched"
- defaultValues={{}}
- // validate={(values) => { }}
- >
- <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}>
- <Grid item xs={12} md={8}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.main')}
- </Typography>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.stockId"
- source="stockId"
- parse={v => v}
- autoFocus
- validate={required()}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <ReferenceInput
- source="matnrId"
- reference="matnr"
- perPage={REFERENCE_INPUT_PAGESIZE}
- >
- <AutocompleteInput
- label="table.field.stockItem.matnrId"
- optionText="unit"
- filterToQuery={(val) => ({ unit: val })}
- validate={required()}
- />
- </ReferenceInput>
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.code"
- source="code"
- parse={v => v}
- validate={required()}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.matnrk"
- source="matnrk"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stockItem.anfme"
- source="anfme"
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stockItem.workQty"
- source="workQty"
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stockItem.qty"
- source="qty"
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stockItem.weight"
- source="weight"
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.unit"
- source="unit"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <ReferenceInput
- source="shipperId"
- reference="shipper"
- perPage={REFERENCE_INPUT_PAGESIZE}
- >
- <AutocompleteInput
- label="table.field.stockItem.shipperId"
- optionText="name"
- filterToQuery={(val) => ({ name: val })}
- />
- </ReferenceInput>
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.splrId"
- source="splrId"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.brand"
- source="brand"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.batch"
- source="batch"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.prodTime"
- source="prodTime"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <ReferenceInput
- source="inspectId"
- reference="qlyInspect"
- perPage={REFERENCE_INPUT_PAGESIZE}
- >
- <AutocompleteInput
- label="table.field.stockItem.inspectId"
- optionText="name"
- filterToQuery={(val) => ({ name: val })}
- />
- </ReferenceInput>
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.splrBtch"
- source="splrBtch"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.asnOrder"
- source="asnOrder"
- parse={v => v}
- validate={required()}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.erpToken"
- source="erpToken"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.erpOrder"
- source="erpOrder"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.erpStkAdr"
- source="erpStkAdr"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <ReferenceInput
- source="locId"
- reference="loc"
- perPage={REFERENCE_INPUT_PAGESIZE}
- >
- <AutocompleteInput
- label="table.field.stockItem.locId"
- optionText="name"
- filterToQuery={(val) => ({ name: val })}
- />
- </ReferenceInput>
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.barcode"
- source="barcode"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stockItem.purPrice"
- source="purPrice"
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.lockReason"
- source="lockReason"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <NumberInput
- label="table.field.stockItem.lockStatus"
- source="lockStatus"
- validate={required()}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.stockItem.locker"
- source="locker"
- parse={v => v}
- />
- </Stack>
- <Stack direction='row' gap={2}>
- <DateInput
- label="table.field.stockItem.lockedTime"
- source="lockedTime"
- />
- </Stack>
-
- </Grid>
- <Grid item xs={12} md={4}>
- <Typography variant="h6" gutterBottom>
- {translate('common.edit.title.common')}
- </Typography>
- <StatusSelectInput />
- <Box mt="2em" />
- <MemoInput />
- </Grid>
- </Grid>
- </SimpleForm>
- </Edit >
- )
-}
-
-export default StockItemEdit;
diff --git a/rsf-admin/src/page/stockItem/StockItemList.jsx b/rsf-admin/src/page/stockItem/StockItemList.jsx
deleted file mode 100644
index acf4155..0000000
--- a/rsf-admin/src/page/stockItem/StockItemList.jsx
+++ /dev/null
@@ -1,220 +0,0 @@
-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,
-} from 'react-admin';
-import { Box, Typography, Card, Stack } from '@mui/material';
-import { styled } from '@mui/material/styles';
-import StockItemCreate from "./StockItemCreate";
-import StockItemPanel from "./StockItemPanel";
-import EmptyData from "../components/EmptyData";
-import MyCreateButton from "../components/MyCreateButton";
-import MyExportButton from '../components/MyExportButton';
-import PageDrawer from "../components/PageDrawer";
-import MyField from "../components/MyField";
-import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
-import * as Common from '@/utils/common';
-
-const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
- '& .css-1vooibu-MuiSvgIcon-root': {
- height: '.9em'
- },
- '& .RaDatagrid-row': {
- cursor: 'auto'
- },
- '& .column-name': {
- },
- '& .opt': {
- width: 200
- },
-}));
-
-const filters = [
- <SearchInput source="condition" alwaysOn />,
- <DateInput label='common.time.after' source="timeStart" alwaysOn />,
- <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
-
- <TextInput source="stockId" label="table.field.stockItem.stockId" />,
- <ReferenceInput source="matnrId" label="table.field.stockItem.matnrId" reference="matnr">
- <AutocompleteInput label="table.field.stockItem.matnrId" optionText="unit" filterToQuery={(val) => ({ unit: val })} />
- </ReferenceInput>,
- <TextInput source="code" label="table.field.stockItem.code" />,
- <TextInput source="matnrk" label="table.field.stockItem.matnrk" />,
- <NumberInput source="anfme" label="table.field.stockItem.anfme" />,
- <NumberInput source="workQty" label="table.field.stockItem.workQty" />,
- <NumberInput source="qty" label="table.field.stockItem.qty" />,
- <NumberInput source="weight" label="table.field.stockItem.weight" />,
- <TextInput source="unit" label="table.field.stockItem.unit" />,
- <ReferenceInput source="shipperId" label="table.field.stockItem.shipperId" reference="shipper">
- <AutocompleteInput label="table.field.stockItem.shipperId" optionText="name" filterToQuery={(val) => ({ name: val })} />
- </ReferenceInput>,
- <TextInput source="splrId" label="table.field.stockItem.splrId" />,
- <TextInput source="brand" label="table.field.stockItem.brand" />,
- <TextInput source="batch" label="table.field.stockItem.batch" />,
- <TextInput source="prodTime" label="table.field.stockItem.prodTime" />,
- <ReferenceInput source="inspectId" label="table.field.stockItem.inspectId" reference="qlyInspect">
- <AutocompleteInput label="table.field.stockItem.inspectId" optionText="name" filterToQuery={(val) => ({ name: val })} />
- </ReferenceInput>,
- <TextInput source="splrBtch" label="table.field.stockItem.splrBtch" />,
- <TextInput source="asnOrder" label="table.field.stockItem.asnOrder" />,
- <TextInput source="erpToken" label="table.field.stockItem.erpToken" />,
- <TextInput source="erpOrder" label="table.field.stockItem.erpOrder" />,
- <TextInput source="erpStkAdr" label="table.field.stockItem.erpStkAdr" />,
- <ReferenceInput source="locId" label="table.field.stockItem.locId" reference="loc">
- <AutocompleteInput label="table.field.stockItem.locId" optionText="name" filterToQuery={(val) => ({ name: val })} />
- </ReferenceInput>,
- <TextInput source="barcode" label="table.field.stockItem.barcode" />,
- <NumberInput source="purPrice" label="table.field.stockItem.purPrice" />,
- <TextInput source="lockReason" label="table.field.stockItem.lockReason" />,
- <NumberInput source="lockStatus" label="table.field.stockItem.lockStatus" />,
- <TextInput source="locker" label="table.field.stockItem.locker" />,
- <DateInput source="lockedTime" label="table.field.stockItem.lockedTime" />,
-
- <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 StockItemList = () => {
- 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.stockItem"}
- empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
- filters={filters}
- sort={{ field: "create_time", order: "desc" }}
- actions={(
- <TopToolbar>
- <FilterButton />
- <MyCreateButton onClick={() => { setCreateDialog(true) }} />
- <SelectColumnsButton preferenceKey='stockItem' />
- <MyExportButton />
- </TopToolbar>
- )}
- perPage={DEFAULT_PAGE_SIZE}
- >
- <StyledDatagrid
- preferenceKey='stockItem'
- bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
- rowClick={(id, resource, record) => false}
- expand={() => <StockItemPanel />}
- expandSingle={true}
- omit={['id', 'createTime', 'createBy', 'memo']}
- >
- <NumberField source="id" />
- <TextField source="stockId" label="table.field.stockItem.stockId" />
- <ReferenceField source="matnrId" label="table.field.stockItem.matnrId" reference="matnr" link={false} sortable={false}>
- <TextField source="unit" />
- </ReferenceField>
- <TextField source="code" label="table.field.stockItem.code" />
- <TextField source="matnrk" label="table.field.stockItem.matnrk" />
- <NumberField source="anfme" label="table.field.stockItem.anfme" />
- <NumberField source="workQty" label="table.field.stockItem.workQty" />
- <NumberField source="qty" label="table.field.stockItem.qty" />
- <NumberField source="weight" label="table.field.stockItem.weight" />
- <TextField source="unit" label="table.field.stockItem.unit" />
- <ReferenceField source="shipperId" label="table.field.stockItem.shipperId" reference="shipper" link={false} sortable={false}>
- <TextField source="name" />
- </ReferenceField>
- <TextField source="splrId" label="table.field.stockItem.splrId" />
- <TextField source="brand" label="table.field.stockItem.brand" />
- <TextField source="batch" label="table.field.stockItem.batch" />
- <TextField source="prodTime" label="table.field.stockItem.prodTime" />
- <ReferenceField source="inspectId" label="table.field.stockItem.inspectId" reference="qlyInspect" link={false} sortable={false}>
- <TextField source="name" />
- </ReferenceField>
- <TextField source="splrBtch" label="table.field.stockItem.splrBtch" />
- <TextField source="asnOrder" label="table.field.stockItem.asnOrder" />
- <TextField source="erpToken" label="table.field.stockItem.erpToken" />
- <TextField source="erpOrder" label="table.field.stockItem.erpOrder" />
- <TextField source="erpStkAdr" label="table.field.stockItem.erpStkAdr" />
- <ReferenceField source="locId" label="table.field.stockItem.locId" reference="loc" link={false} sortable={false}>
- <TextField source="name" />
- </ReferenceField>
- <TextField source="barcode" label="table.field.stockItem.barcode" />
- <NumberField source="purPrice" label="table.field.stockItem.purPrice" />
- <TextField source="lockReason" label="table.field.stockItem.lockReason" />
- <NumberField source="lockStatus" label="table.field.stockItem.lockStatus" />
- <TextField source="locker" label="table.field.stockItem.locker" />
- <DateField source="lockedTime" label="table.field.stockItem.lockedTime" showTime />
-
- <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
- <TextField source="nickname" />
- </ReferenceField>
- <DateField source="updateTime" label="common.field.updateTime" showTime />
- <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}>
- <TextField source="nickname" />
- </ReferenceField>
- <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">
- <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
- <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
- </WrapperField>
- </StyledDatagrid>
- </List>
- <StockItemCreate
- open={createDialog}
- setOpen={setCreateDialog}
- />
- <PageDrawer
- title='StockItem Detail'
- drawerVal={drawerVal}
- setDrawerVal={setDrawerVal}
- >
- </PageDrawer>
- </Box>
- )
-}
-
-export default StockItemList;
diff --git a/rsf-admin/src/page/stockItem/StockItemPanel.jsx b/rsf-admin/src/page/stockItem/StockItemPanel.jsx
deleted file mode 100644
index bd73f01..0000000
--- a/rsf-admin/src/page/stockItem/StockItemPanel.jsx
+++ /dev/null
@@ -1,213 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material';
-import {
- useTranslate,
- useRecordContext,
-} from 'react-admin';
-import PanelTypography from "../components/PanelTypography";
-import * as Common from '@/utils/common'
-
-const StockItemPanel = () => {
- const record = useRecordContext();
- if (!record) return null;
- const translate = useTranslate();
- return (
- <>
- <Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}>
- <CardContent>
- <Grid container spacing={2}>
- <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}>
- <Typography variant="h6" gutterBottom align="left" sx={{
- maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' },
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- }}>
- {Common.camelToPascalWithSpaces(translate('table.field.stockItem.matnrk'))}: {record.matnrk}
- </Typography>
- {/* inherit, primary, secondary, textPrimary, textSecondary, error */}
- <Typography variant="h6" gutterBottom align="right" >
- ID: {record.id}
- </Typography>
- </Grid>
- </Grid>
- <Grid container spacing={2}>
- <Grid item xs={12} container alignContent="flex-end">
- <Typography variant="caption" color="textSecondary" sx={{ wordWrap: 'break-word', wordBreak: 'break-all' }}>
- {Common.camelToPascalWithSpaces(translate('common.field.memo'))}:{record.memo}
- </Typography>
- </Grid>
- </Grid>
- <Box height={20}> </Box>
- <Grid container spacing={2}>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.stockId"
- property={record.stockId$}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.matnrId"
- property={record.matnrId$}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.code"
- property={record.code}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.matnrk"
- property={record.matnrk}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.anfme"
- property={record.anfme}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.workQty"
- property={record.workQty}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.qty"
- property={record.qty}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.weight"
- property={record.weight}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.unit"
- property={record.unit}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.shipperId"
- property={record.shipperId$}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.splrId"
- property={record.splrId}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.brand"
- property={record.brand}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.batch"
- property={record.batch}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.prodTime"
- property={record.prodTime}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.inspectId"
- property={record.inspectId$}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.splrBtch"
- property={record.splrBtch}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.asnOrder"
- property={record.asnOrder}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.erpToken"
- property={record.erpToken}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.erpOrder"
- property={record.erpOrder}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.erpStkAdr"
- property={record.erpStkAdr}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.locId"
- property={record.locId$}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.barcode"
- property={record.barcode}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.purPrice"
- property={record.purPrice}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.lockReason"
- property={record.lockReason}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.lockStatus"
- property={record.lockStatus}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.locker"
- property={record.locker}
- />
- </Grid>
- <Grid item xs={6}>
- <PanelTypography
- title="table.field.stockItem.lockedTime"
- property={record.lockedTime$}
- />
- </Grid>
-
- </Grid>
- </CardContent>
- </Card >
- </>
- );
-};
-
-export default StockItemPanel;
diff --git a/rsf-admin/src/page/stockItem/index.jsx b/rsf-admin/src/page/stockItem/index.jsx
deleted file mode 100644
index 05d3021..0000000
--- a/rsf-admin/src/page/stockItem/index.jsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
-import {
- ListGuesser,
- EditGuesser,
- ShowGuesser,
-} from "react-admin";
-
-import StockItemList from "./StockItemList";
-import StockItemEdit from "./StockItemEdit";
-
-export default {
- list: StockItemList,
- edit: StockItemEdit,
- show: ShowGuesser,
- recordRepresentation: (record) => {
- return `${record.matnrk}`
- }
-};
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java b/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
index 3677141..357b792 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java
@@ -22,8 +22,8 @@
// generator.username="sa";
// generator.password="Zoneyung@zy56$";
- generator.table="man_";
- generator.tableDesc="璐ㄦ淇℃伅";
+ generator.table="man_companys";
+ generator.tableDesc="瀛楀吀鏁版嵁闆�";
generator.packagePath="com.vincent.rsf.server.manager";
generator.build();
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/CompanysController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/CompanysController.java
new file mode 100644
index 0000000..0c5d1f2
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/CompanysController.java
@@ -0,0 +1,110 @@
+package com.vincent.rsf.server.manager.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.common.utils.ExcelUtil;
+import com.vincent.rsf.server.common.annotation.OperationLog;
+import com.vincent.rsf.server.common.domain.BaseParam;
+import com.vincent.rsf.server.common.domain.KeyValVo;
+import com.vincent.rsf.server.common.domain.PageParam;
+import com.vincent.rsf.server.manager.entity.Companys;
+import com.vincent.rsf.server.manager.service.CompanysService;
+import com.vincent.rsf.server.system.controller.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+@RestController
+public class CompanysController extends BaseController {
+
+ @Autowired
+ private CompanysService companysService;
+
+ @PreAuthorize("hasAuthority('manager:companys:list')")
+ @PostMapping("/companys/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<Companys, BaseParam> pageParam = new PageParam<>(baseParam, Companys.class);
+ return R.ok().add(companysService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:list')")
+ @PostMapping("/companys/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(companysService.list());
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:list')")
+ @PostMapping({"/companys/many/{ids}", "/companyss/many/{ids}"})
+ public R many(@PathVariable Long[] ids) {
+ return R.ok().add(companysService.listByIds(Arrays.asList(ids)));
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:list')")
+ @GetMapping("/companys/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(companysService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:save')")
+ @OperationLog("Create 瀛楀吀鏁版嵁闆�")
+ @PostMapping("/companys/save")
+ public R save(@RequestBody Companys companys) {
+ companys.setCreateBy(getLoginUserId());
+ companys.setCreateTime(new Date());
+ companys.setUpdateBy(getLoginUserId());
+ companys.setUpdateTime(new Date());
+ if (!companysService.save(companys)) {
+ return R.error("Save Fail");
+ }
+ return R.ok("Save Success").add(companys);
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:update')")
+ @OperationLog("Update 瀛楀吀鏁版嵁闆�")
+ @PostMapping("/companys/update")
+ public R update(@RequestBody Companys companys) {
+ companys.setUpdateBy(getLoginUserId());
+ companys.setUpdateTime(new Date());
+ if (!companysService.updateById(companys)) {
+ return R.error("Update Fail");
+ }
+ return R.ok("Update Success").add(companys);
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:remove')")
+ @OperationLog("Delete 瀛楀吀鏁版嵁闆�")
+ @PostMapping("/companys/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!companysService.removeByIds(Arrays.asList(ids))) {
+ return R.error("Delete Fail");
+ }
+ return R.ok("Delete Success").add(ids);
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:list')")
+ @PostMapping("/companys/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<Companys> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(Companys::getName, condition);
+ }
+ companysService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getName()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('manager:companys:list')")
+ @PostMapping("/companys/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(companysService.list(), Companys.class), response);
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Companys.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Companys.java
new file mode 100644
index 0000000..44b0a5c
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Companys.java
@@ -0,0 +1,266 @@
+package com.vincent.rsf.server.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.service.UserService;
+import com.vincent.rsf.server.system.entity.User;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("man_companys")
+public class Companys implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ @ApiModelProperty(value= "ID")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 缂栧彿
+ */
+ @ApiModelProperty(value= "缂栧彿")
+ private String code;
+
+ /**
+ * 鍚嶇О
+ */
+ @ApiModelProperty(value= "鍚嶇О")
+ private String name;
+
+ /**
+ * 鑻辨枃鍒悕
+ */
+ @ApiModelProperty(value= "鑻辨枃鍒悕")
+ private String nameEn;
+
+ /**
+ * 鍔╄鐮�
+ */
+ @ApiModelProperty(value= "鍔╄鐮�")
+ private String breifCode;
+
+ /**
+ * 甯愬彿绫诲瀷锛歴hipper锛氳揣涓伙紝customer锛氬鎴凤紝supplier锛氫緵搴斿晢
+ */
+ @ApiModelProperty(value= "甯愬彿绫诲瀷锛歴hipper锛氳揣涓伙紝customer锛氬鎴凤紝supplier锛氫緵搴斿晢")
+ private String type;
+
+ /**
+ * 鑱旂郴浜�
+ */
+ @ApiModelProperty(value= "鑱旂郴浜�")
+ private String contact;
+
+ /**
+ * 鑱旂郴鐢佃瘽
+ */
+ @ApiModelProperty(value= "鑱旂郴鐢佃瘽")
+ private String tel;
+
+ /**
+ * 閭
+ */
+ @ApiModelProperty(value= "閭")
+ private String email;
+
+ /**
+ * 閭欢缂栫爜
+ */
+ @ApiModelProperty(value= "閭欢缂栫爜")
+ private String pcode;
+
+ /**
+ * 鐪佷唤
+ */
+ @ApiModelProperty(value= "鐪佷唤")
+ private String province;
+
+ /**
+ * 鍩庡競
+ */
+ @ApiModelProperty(value= "鍩庡競")
+ private String city;
+
+ /**
+ * 鍦板潃
+ */
+ @ApiModelProperty(value= "鍦板潃")
+ private String address;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 鍐荤粨
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 鍐荤粨 ")
+ private Integer status;
+
+ /**
+ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
+ */
+ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
+
+ /**
+ * 绉熸埛
+ */
+ @ApiModelProperty(value= "绉熸埛")
+ private Integer tenantId;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @ApiModelProperty(value= "娣诲姞浜哄憳")
+ private Long createBy;
+
+ /**
+ * 娣诲姞鏃堕棿
+ */
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ private Long updateBy;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ public Companys() {}
+
+ public Companys(String code,String name,String nameEn,String breifCode,String type,String contact,String tel,String email,String pcode,String province,String city,String address,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+ this.code = code;
+ this.name = name;
+ this.nameEn = nameEn;
+ this.breifCode = breifCode;
+ this.type = type;
+ this.contact = contact;
+ this.tel = tel;
+ this.email = email;
+ this.pcode = pcode;
+ this.province = province;
+ this.city = city;
+ this.address = address;
+ this.status = status;
+ this.deleted = deleted;
+ this.tenantId = tenantId;
+ this.createBy = createBy;
+ this.createTime = createTime;
+ this.updateBy = updateBy;
+ this.updateTime = updateTime;
+ this.memo = memo;
+ }
+
+// Companys companys = new Companys(
+// null, // 缂栧彿
+// null, // 鍚嶇О
+// null, // 鑻辨枃鍒悕
+// null, // 鍔╄鐮�
+// null, // 甯愬彿绫诲瀷锛歴hipper锛氳揣涓伙紝customer锛氬鎴凤紝supplier锛氫緵搴斿晢[闈炵┖]
+// null, // 鑱旂郴浜�
+// null, // 鑱旂郴鐢佃瘽
+// null, // 閭
+// null, // 閭欢缂栫爜
+// null, // 鐪佷唤
+// null, // 鍩庡競
+// null, // 鍦板潃
+// null, // 鐘舵�乕闈炵┖]
+// null, // 鏄惁鍒犻櫎[闈炵┖]
+// null, // 绉熸埛
+// null, // 娣诲姞浜哄憳
+// null, // 娣诲姞鏃堕棿[闈炵┖]
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿[闈炵┖]
+// null // 澶囨敞
+// );
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "姝e父";
+ case 0:
+ return "鍐荤粨";
+ default:
+ return String.valueOf(this.status);
+ }
+ }
+
+ public String getCreateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.createBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getCreateTime$(){
+ if (Cools.isEmpty(this.createTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+ }
+
+ public String getUpdateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.updateBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getUpdateTime$(){
+ if (Cools.isEmpty(this.updateTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+ }
+
+
+
+ public Boolean getStatusBool(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return true;
+ case 0:
+ return false;
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/CompanysMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/CompanysMapper.java
new file mode 100644
index 0000000..a486b2c
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/CompanysMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.mapper;
+
+import com.vincent.rsf.server.manager.entity.Companys;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface CompanysMapper extends BaseMapper<Companys> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/CompanysService.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/CompanysService.java
new file mode 100644
index 0000000..09974c6
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/CompanysService.java
@@ -0,0 +1,8 @@
+package com.vincent.rsf.server.manager.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vincent.rsf.server.manager.entity.Companys;
+
+public interface CompanysService extends IService<Companys> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/CompanysServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/CompanysServiceImpl.java
new file mode 100644
index 0000000..63dc19e
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/CompanysServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.service.impl;
+
+import com.vincent.rsf.server.manager.mapper.CompanysMapper;
+import com.vincent.rsf.server.manager.entity.Companys;
+import com.vincent.rsf.server.manager.service.CompanysService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("companysService")
+public class CompanysServiceImpl extends ServiceImpl<CompanysMapper, Companys> implements CompanysService {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictDataController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictDataController.java
new file mode 100644
index 0000000..fdf23e4
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictDataController.java
@@ -0,0 +1,110 @@
+package com.vincent.rsf.server.system.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.common.utils.ExcelUtil;
+import com.vincent.rsf.server.common.annotation.OperationLog;
+import com.vincent.rsf.server.common.domain.BaseParam;
+import com.vincent.rsf.server.common.domain.KeyValVo;
+import com.vincent.rsf.server.common.domain.PageParam;
+import com.vincent.rsf.server.system.entity.DictData;
+import com.vincent.rsf.server.system.service.DictDataService;
+import com.vincent.rsf.server.system.controller.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+@RestController
+public class DictDataController extends BaseController {
+
+ @Autowired
+ private DictDataService dictDataService;
+
+ @PreAuthorize("hasAuthority('system:dictData:list')")
+ @PostMapping("/dictData/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<DictData, BaseParam> pageParam = new PageParam<>(baseParam, DictData.class);
+ return R.ok().add(dictDataService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:list')")
+ @PostMapping("/dictData/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(dictDataService.list());
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:list')")
+ @PostMapping({"/dictData/many/{ids}", "/dictDatas/many/{ids}"})
+ public R many(@PathVariable Long[] ids) {
+ return R.ok().add(dictDataService.listByIds(Arrays.asList(ids)));
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:list')")
+ @GetMapping("/dictData/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(dictDataService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:save')")
+ @OperationLog("Create 瀛楀吀鏁版嵁闆�")
+ @PostMapping("/dictData/save")
+ public R save(@RequestBody DictData dictData) {
+ dictData.setCreateBy(getLoginUserId());
+ dictData.setCreateTime(new Date());
+ dictData.setUpdateBy(getLoginUserId());
+ dictData.setUpdateTime(new Date());
+ if (!dictDataService.save(dictData)) {
+ return R.error("Save Fail");
+ }
+ return R.ok("Save Success").add(dictData);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:update')")
+ @OperationLog("Update 瀛楀吀鏁版嵁闆�")
+ @PostMapping("/dictData/update")
+ public R update(@RequestBody DictData dictData) {
+ dictData.setUpdateBy(getLoginUserId());
+ dictData.setUpdateTime(new Date());
+ if (!dictDataService.updateById(dictData)) {
+ return R.error("Update Fail");
+ }
+ return R.ok("Update Success").add(dictData);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:remove')")
+ @OperationLog("Delete 瀛楀吀鏁版嵁闆�")
+ @PostMapping("/dictData/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!dictDataService.removeByIds(Arrays.asList(ids))) {
+ return R.error("Delete Fail");
+ }
+ return R.ok("Delete Success").add(ids);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:list')")
+ @PostMapping("/dictData/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<DictData> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(DictData::getId, condition);
+ }
+ dictDataService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getId()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictData:list')")
+ @PostMapping("/dictData/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(dictDataService.list(), DictData.class), response);
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java
new file mode 100644
index 0000000..fbeb7d9
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/DictTypeController.java
@@ -0,0 +1,110 @@
+package com.vincent.rsf.server.system.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.R;
+import com.vincent.rsf.server.common.utils.ExcelUtil;
+import com.vincent.rsf.server.common.annotation.OperationLog;
+import com.vincent.rsf.server.common.domain.BaseParam;
+import com.vincent.rsf.server.common.domain.KeyValVo;
+import com.vincent.rsf.server.common.domain.PageParam;
+import com.vincent.rsf.server.system.entity.DictType;
+import com.vincent.rsf.server.system.service.DictTypeService;
+import com.vincent.rsf.server.system.controller.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+@RestController
+public class DictTypeController extends BaseController {
+
+ @Autowired
+ private DictTypeService dictTypeService;
+
+ @PreAuthorize("hasAuthority('system:dictType:list')")
+ @PostMapping("/dictType/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<DictType, BaseParam> pageParam = new PageParam<>(baseParam, DictType.class);
+ return R.ok().add(dictTypeService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:list')")
+ @PostMapping("/dictType/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(dictTypeService.list());
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:list')")
+ @PostMapping({"/dictType/many/{ids}", "/dictTypes/many/{ids}"})
+ public R many(@PathVariable Long[] ids) {
+ return R.ok().add(dictTypeService.listByIds(Arrays.asList(ids)));
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:list')")
+ @GetMapping("/dictType/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(dictTypeService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:save')")
+ @OperationLog("Create 鏁版嵁瀛楀吀")
+ @PostMapping("/dictType/save")
+ public R save(@RequestBody DictType dictType) {
+ dictType.setCreateBy(getLoginUserId());
+ dictType.setCreateTime(new Date());
+ dictType.setUpdateBy(getLoginUserId());
+ dictType.setUpdateTime(new Date());
+ if (!dictTypeService.save(dictType)) {
+ return R.error("Save Fail");
+ }
+ return R.ok("Save Success").add(dictType);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:update')")
+ @OperationLog("Update 鏁版嵁瀛楀吀")
+ @PostMapping("/dictType/update")
+ public R update(@RequestBody DictType dictType) {
+ dictType.setUpdateBy(getLoginUserId());
+ dictType.setUpdateTime(new Date());
+ if (!dictTypeService.updateById(dictType)) {
+ return R.error("Update Fail");
+ }
+ return R.ok("Update Success").add(dictType);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:remove')")
+ @OperationLog("Delete 鏁版嵁瀛楀吀")
+ @PostMapping("/dictType/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!dictTypeService.removeByIds(Arrays.asList(ids))) {
+ return R.error("Delete Fail");
+ }
+ return R.ok("Delete Success").add(ids);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:list')")
+ @PostMapping("/dictType/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<DictType> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(DictType::getName, condition);
+ }
+ dictTypeService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getName()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('system:dictType:list')")
+ @PostMapping("/dictType/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(dictTypeService.list(), DictType.class), response);
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictData.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictData.java
new file mode 100644
index 0000000..11aa9bb
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictData.java
@@ -0,0 +1,229 @@
+package com.vincent.rsf.server.system.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.vincent.rsf.server.system.service.DictTypeService;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.service.UserService;
+import com.vincent.rsf.server.system.entity.User;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("sys_dict_data")
+public class DictData implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ @ApiModelProperty(value= "ID")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 瀛楀吀ID
+ */
+ @ApiModelProperty(value= "瀛楀吀ID")
+ private String dictTypeId;
+
+ /**
+ * 瀛楀吀璇嗗埆鐮�
+ */
+ @ApiModelProperty(value= "瀛楀吀璇嗗埆鐮�")
+ private String dictTypeCode;
+
+ /**
+ * 鍊�
+ */
+ @ApiModelProperty(value= "鍊�")
+ private String value;
+
+ /**
+ * 鏍囩
+ */
+ @ApiModelProperty(value= "鏍囩")
+ private String label;
+
+ /**
+ * 鎺掑簭
+ */
+ @ApiModelProperty(value= "鎺掑簭")
+ private Integer sort;
+
+ /**
+ * 棰滆壊銆備緥濡傦細#FFFFFF銆乥lue銆乺gba(0,0,0,0.5)
+ */
+ @ApiModelProperty(value= "棰滆壊銆備緥濡傦細#FFFFFF銆乥lue銆乺gba(0,0,0,0.5)")
+ private String color;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 鍐荤粨
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 鍐荤粨 ")
+ private Integer status;
+
+ /**
+ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
+ */
+ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
+
+ /**
+ * 绉熸埛
+ */
+ @ApiModelProperty(value= "绉熸埛")
+ private Integer tenantId;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @ApiModelProperty(value= "娣诲姞浜哄憳")
+ private Long createBy;
+
+ /**
+ * 娣诲姞鏃堕棿
+ */
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ private Long updateBy;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ public DictData() {}
+
+ public DictData(String dictTypeId,String dictTypeCode,String value,String label,Integer sort,String color,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+ this.dictTypeId = dictTypeId;
+ this.dictTypeCode = dictTypeCode;
+ this.value = value;
+ this.label = label;
+ this.sort = sort;
+ this.color = color;
+ this.status = status;
+ this.deleted = deleted;
+ this.tenantId = tenantId;
+ this.createBy = createBy;
+ this.createTime = createTime;
+ this.updateBy = updateBy;
+ this.updateTime = updateTime;
+ this.memo = memo;
+ }
+
+// DictData dictData = new DictData(
+// null, // 瀛楀吀ID[闈炵┖]
+// null, // 瀛楀吀璇嗗埆鐮乕闈炵┖]
+// null, // 鍊糩闈炵┖]
+// null, // 鏍囩[闈炵┖]
+// null, // 鎺掑簭
+// null, // 棰滆壊銆備緥濡傦細#FFFFFF銆乥lue銆乺gba(0,0,0,0.5)
+// null, // 鐘舵�乕闈炵┖]
+// null, // 鏄惁鍒犻櫎[闈炵┖]
+// null, // 绉熸埛
+// null, // 娣诲姞浜哄憳
+// null, // 娣诲姞鏃堕棿[闈炵┖]
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿[闈炵┖]
+// null // 澶囨敞
+// );
+
+ public String getDictTypeId$(){
+ DictTypeService service = SpringUtils.getBean(DictTypeService.class);
+ DictType dictType = service.getById(this.dictTypeId);
+ if (!Cools.isEmpty(dictType)){
+ return String.valueOf(dictType.getName());
+ }
+ return null;
+ }
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "姝e父";
+ case 0:
+ return "鍐荤粨";
+ default:
+ return String.valueOf(this.status);
+ }
+ }
+
+ public String getCreateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.createBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getCreateTime$(){
+ if (Cools.isEmpty(this.createTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+ }
+
+ public String getUpdateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.updateBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getUpdateTime$(){
+ if (Cools.isEmpty(this.updateTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+ }
+
+
+
+ public Boolean getStatusBool(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return true;
+ case 0:
+ return false;
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictType.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictType.java
new file mode 100644
index 0000000..5faf9d4
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/entity/DictType.java
@@ -0,0 +1,194 @@
+package com.vincent.rsf.server.system.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.service.UserService;
+import com.vincent.rsf.server.system.entity.User;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("sys_dict_type")
+public class DictType implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ @ApiModelProperty(value= "ID")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 缂栧彿
+ */
+ @ApiModelProperty(value= "缂栧彿")
+ private String uuid;
+
+ /**
+ * 鍚嶇О
+ */
+ @ApiModelProperty(value= "鍚嶇О")
+ private String name;
+
+ /**
+ * 鎻忚堪
+ */
+ @ApiModelProperty(value= "鎻忚堪")
+ private String description;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 鍐荤粨
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 鍐荤粨 ")
+ private Integer status;
+
+ /**
+ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
+ */
+ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
+
+ /**
+ * 绉熸埛
+ */
+ @ApiModelProperty(value= "绉熸埛")
+ private Integer tenantId;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @ApiModelProperty(value= "娣诲姞浜哄憳")
+ private Long createBy;
+
+ /**
+ * 娣诲姞鏃堕棿
+ */
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ private Long updateBy;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ public DictType() {}
+
+ public DictType(String uuid,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+ this.uuid = uuid;
+ this.name = name;
+ this.description = description;
+ this.status = status;
+ this.deleted = deleted;
+ this.tenantId = tenantId;
+ this.createBy = createBy;
+ this.createTime = createTime;
+ this.updateBy = updateBy;
+ this.updateTime = updateTime;
+ this.memo = memo;
+ }
+
+// DictType dictType = new DictType(
+// null, // 缂栧彿
+// null, // 鍚嶇О
+// null, // 鎻忚堪
+// null, // 鐘舵�乕闈炵┖]
+// null, // 鏄惁鍒犻櫎[闈炵┖]
+// null, // 绉熸埛
+// null, // 娣诲姞浜哄憳
+// null, // 娣诲姞鏃堕棿[闈炵┖]
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿[闈炵┖]
+// null // 澶囨敞
+// );
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "姝e父";
+ case 0:
+ return "鍐荤粨";
+ default:
+ return String.valueOf(this.status);
+ }
+ }
+
+ public String getCreateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.createBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getCreateTime$(){
+ if (Cools.isEmpty(this.createTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+ }
+
+ public String getUpdateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.updateBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getUpdateTime$(){
+ if (Cools.isEmpty(this.updateTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+ }
+
+
+
+ public Boolean getStatusBool(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return true;
+ case 0:
+ return false;
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictDataMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictDataMapper.java
new file mode 100644
index 0000000..92501c3
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictDataMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.system.mapper;
+
+import com.vincent.rsf.server.system.entity.DictData;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface DictDataMapper extends BaseMapper<DictData> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictTypeMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictTypeMapper.java
new file mode 100644
index 0000000..3554de8
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/mapper/DictTypeMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.system.mapper;
+
+import com.vincent.rsf.server.system.entity.DictType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface DictTypeMapper extends BaseMapper<DictType> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictDataService.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictDataService.java
new file mode 100644
index 0000000..70dbda9
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictDataService.java
@@ -0,0 +1,8 @@
+package com.vincent.rsf.server.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vincent.rsf.server.system.entity.DictData;
+
+public interface DictDataService extends IService<DictData> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictTypeService.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictTypeService.java
new file mode 100644
index 0000000..b28d6b4
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/DictTypeService.java
@@ -0,0 +1,8 @@
+package com.vincent.rsf.server.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.vincent.rsf.server.system.entity.DictType;
+
+public interface DictTypeService extends IService<DictType> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictDataServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictDataServiceImpl.java
new file mode 100644
index 0000000..c788c76
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictDataServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.system.service.impl;
+
+import com.vincent.rsf.server.system.mapper.DictDataMapper;
+import com.vincent.rsf.server.system.entity.DictData;
+import com.vincent.rsf.server.system.service.DictDataService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("dictDataService")
+public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> implements DictDataService {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictTypeServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictTypeServiceImpl.java
new file mode 100644
index 0000000..84a6300
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/service/impl/DictTypeServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.system.service.impl;
+
+import com.vincent.rsf.server.system.mapper.DictTypeMapper;
+import com.vincent.rsf.server.system.entity.DictType;
+import com.vincent.rsf.server.system.service.DictTypeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("dictTypeService")
+public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> implements DictTypeService {
+
+}
diff --git a/rsf-server/src/main/java/companys.sql b/rsf-server/src/main/java/companys.sql
new file mode 100644
index 0000000..31f2b92
--- /dev/null
+++ b/rsf-server/src/main/java/companys.sql
@@ -0,0 +1,33 @@
+-- save companys record
+-- mysql
+insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.companys', '0', '/manager/companys', 'companys', '0' , '0', '1' , '1');
+
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 瀛楀吀鏁版嵁闆�', '', '1', 'manager:companys:list', '0', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 瀛楀吀鏁版嵁闆�', '', '1', 'manager:companys:save', '1', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 瀛楀吀鏁版嵁闆�', '', '1', 'manager:companys:update', '2', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 瀛楀吀鏁版嵁闆�', '', '1', 'manager:companys:remove', '3', '1', '1');
+
+-- locale menu name
+companys: 'Companys',
+
+-- locale field
+companys: {
+ code: "code",
+ name: "name",
+ nameEn: "nameEn",
+ breifCode: "breifCode",
+ type: "type",
+ contact: "contact",
+ tel: "tel",
+ email: "email",
+ pcode: "pcode",
+ province: "province",
+ city: "city",
+ address: "address",
+},
+
+-- ResourceContent
+import companys from './companys';
+
+case 'companys':
+ return companys;
diff --git a/rsf-server/src/main/java/dictData.sql b/rsf-server/src/main/java/dictData.sql
new file mode 100644
index 0000000..be7e53e
--- /dev/null
+++ b/rsf-server/src/main/java/dictData.sql
@@ -0,0 +1,27 @@
+-- save dictData record
+-- mysql
+insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.dictData', '0', '/system/dictData', 'dictData', '0' , '0', '1' , '1');
+
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 瀛楀吀鏁版嵁闆�', '113', '1', 'system:dictData:list', '0', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 瀛楀吀鏁版嵁闆�', '113', '1', 'system:dictData:save', '1', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 瀛楀吀鏁版嵁闆�', '113', '1', 'system:dictData:update', '2', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 瀛楀吀鏁版嵁闆�', '113', '1', 'system:dictData:remove', '3', '1', '1');
+
+-- locale menu name
+dictData: 'DictData',
+
+-- locale field
+dictData: {
+ dictTypeId: "dictTypeId",
+ dictTypeCode: "dictTypeCode",
+ value: "value",
+ label: "label",
+ sort: "sort",
+ color: "color",
+},
+
+-- ResourceContent
+import dictData from './dictData';
+
+case 'dictData':
+ return dictData;
diff --git a/rsf-server/src/main/java/dictType.sql b/rsf-server/src/main/java/dictType.sql
new file mode 100644
index 0000000..ba01cea
--- /dev/null
+++ b/rsf-server/src/main/java/dictType.sql
@@ -0,0 +1,24 @@
+-- save dictType record
+-- mysql
+insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.dictType', '0', '/system/dictType', 'dictType', '0' , '0', '1' , '1');
+
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 鏁版嵁瀛楀吀', '108', '1', 'system:dictType:list', '0', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 鏁版嵁瀛楀吀', '108', '1', 'system:dictType:save', '1', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 鏁版嵁瀛楀吀', '108', '1', 'system:dictType:update', '2', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 鏁版嵁瀛楀吀', '108', '1', 'system:dictType:remove', '3', '1', '1');
+
+-- locale menu name
+dictType: 'DictType',
+
+-- locale field
+dictType: {
+ uuid: "uuid",
+ name: "name",
+ description: "description",
+},
+
+-- ResourceContent
+import dictType from './dictType';
+
+case 'dictType':
+ return dictType;
diff --git a/rsf-server/src/main/java/stock.sql b/rsf-server/src/main/java/stock.sql
deleted file mode 100644
index 2eb084d..0000000
--- a/rsf-server/src/main/java/stock.sql
+++ /dev/null
@@ -1,30 +0,0 @@
--- save stock record
--- mysql
-insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.stock', '0', '/manager/stock', 'stock', '0' , '0', '1' , '1');
-
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 鍚堝悓淇℃伅', '93', '1', 'manager:stock:list', '0', '1', '1');
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 鍚堝悓淇℃伅', '93', '1', 'manager:stock:save', '1', '1', '1');
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 鍚堝悓淇℃伅', '93', '1', 'manager:stock:update', '2', '1', '1');
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 鍚堝悓淇℃伅', '93', '1', 'manager:stock:remove', '3', '1', '1');
-
--- locale menu name
-stock: 'Stock',
-
--- locale field
-stock: {
- asnOrder: "asnOrder",
- erpToken: "erpToken",
- erpOrder: "erpOrder",
- erpStkAdr: "erpStkAdr",
- contractId: "contractId",
- lockReason: "lockReason",
- lockStatus: "lockStatus",
- locker: "locker",
- lockedTime: "lockedTime",
-},
-
--- ResourceContent
-import stock from './stock';
-
-case 'stock':
- return stock;
diff --git a/rsf-server/src/main/java/stockItem.sql b/rsf-server/src/main/java/stockItem.sql
deleted file mode 100644
index 8c1864a..0000000
--- a/rsf-server/src/main/java/stockItem.sql
+++ /dev/null
@@ -1,48 +0,0 @@
--- save stockItem record
--- mysql
-insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.stockItem', '0', '/manager/stockItem', 'stockItem', '0' , '0', '1' , '1');
-
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 搴撳瓨鏄庣粏琛�', '98', '1', 'manager:stockItem:list', '0', '1', '1');
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 搴撳瓨鏄庣粏琛�', '98', '1', 'manager:stockItem:save', '1', '1', '1');
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 搴撳瓨鏄庣粏琛�', '98', '1', 'manager:stockItem:update', '2', '1', '1');
-insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 搴撳瓨鏄庣粏琛�', '98', '1', 'manager:stockItem:remove', '3', '1', '1');
-
--- locale menu name
-stockItem: 'StockItem',
-
--- locale field
-stockItem: {
- stockId: "stockId",
- matnrId: "matnrId",
- code: "code",
- matnrk: "matnrk",
- anfme: "anfme",
- workQty: "workQty",
- qty: "qty",
- weight: "weight",
- unit: "unit",
- shipperId: "shipperId",
- splrId: "splrId",
- brand: "brand",
- batch: "batch",
- prodTime: "prodTime",
- inspectId: "inspectId",
- splrBtch: "splrBtch",
- asnOrder: "asnOrder",
- erpToken: "erpToken",
- erpOrder: "erpOrder",
- erpStkAdr: "erpStkAdr",
- locId: "locId",
- barcode: "barcode",
- purPrice: "purPrice",
- lockReason: "lockReason",
- lockStatus: "lockStatus",
- locker: "locker",
- lockedTime: "lockedTime",
-},
-
--- ResourceContent
-import stockItem from './stockItem';
-
-case 'stockItem':
- return stockItem;
diff --git a/rsf-server/src/main/resources/mapper/manager/CompanysMapper.xml b/rsf-server/src/main/resources/mapper/manager/CompanysMapper.xml
new file mode 100644
index 0000000..418a43a
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/manager/CompanysMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.vincent.rsf.server.manager.mapper.CompanysMapper">
+
+</mapper>
diff --git a/rsf-server/src/main/resources/mapper/manager/DictTypeMapper.xml b/rsf-server/src/main/resources/mapper/manager/DictTypeMapper.xml
new file mode 100644
index 0000000..6b78f39
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/manager/DictTypeMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.vincent.rsf.server.manager.mapper.DictTypeMapper">
+
+</mapper>
diff --git a/rsf-server/src/main/resources/mapper/system/DictDataMapper.xml b/rsf-server/src/main/resources/mapper/system/DictDataMapper.xml
new file mode 100644
index 0000000..34587c1
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/system/DictDataMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.vincent.rsf.server.system.mapper.DictDataMapper">
+
+</mapper>
diff --git a/rsf-server/src/main/resources/mapper/system/DictTypeMapper.xml b/rsf-server/src/main/resources/mapper/system/DictTypeMapper.xml
new file mode 100644
index 0000000..37cac9c
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/system/DictTypeMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.vincent.rsf.server.system.mapper.DictTypeMapper">
+
+</mapper>
diff --git a/version/db/sys_dict_data.sql b/version/db/sys_dict_data.sql
new file mode 100644
index 0000000..f72110f
--- /dev/null
+++ b/version/db/sys_dict_data.sql
@@ -0,0 +1,40 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : localhost
+ Source Server Type : MySQL
+ Source Server Version : 80011 (8.0.11)
+ Source Host : localhost:3306
+ Source Schema : fortec-bm
+
+ Target Server Type : MySQL
+ Target Server Version : 80011 (8.0.11)
+ File Encoding : 65001
+
+ Date: 24/02/2025 08:45:02
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for sys_dict_data
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dict_data`;
+CREATE TABLE `sys_dict_data` (
+ `id` bigint(20) NOT NULL COMMENT 'id',
+ `dict_type_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瀛楀吀ID',
+ `dict_type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瀛楀吀璇嗗埆鐮�',
+ `value` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍊�',
+ `label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏍囩',
+ `sort` int(11) DEFAULT NULL COMMENT '鎺掑簭',
+ `color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '棰滆壊銆備緥濡傦細#FFFFFF銆乥lue銆乺gba(0,0,0,0.5)',
+ `creator` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'creator',
+ `gmt_create` datetime DEFAULT NULL COMMENT 'gmt_create',
+ `modifier` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'modifier',
+ `gmt_modified` datetime DEFAULT NULL COMMENT 'gmt_modified',
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `IX__value` (`value`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='瀛楀吀瀛楁琛�';
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/version/db/sys_dict_type.sql b/version/db/sys_dict_type.sql
new file mode 100644
index 0000000..1485dd3
--- /dev/null
+++ b/version/db/sys_dict_type.sql
@@ -0,0 +1,36 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : localhost
+ Source Server Type : MySQL
+ Source Server Version : 80011 (8.0.11)
+ Source Host : localhost:3306
+ Source Schema : fortec-bm
+
+ Target Server Type : MySQL
+ Target Server Version : 80011 (8.0.11)
+ File Encoding : 65001
+
+ Date: 24/02/2025 08:45:14
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for sys_dict_type
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dict_type`;
+CREATE TABLE `sys_dict_type` (
+ `id` bigint(20) NOT NULL COMMENT 'id',
+ `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璇嗗埆鐮�',
+ `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瀛楀吀鍚嶇О',
+ `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '鎻忚堪',
+ `creator` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'creator',
+ `gmt_create` datetime DEFAULT NULL COMMENT 'gmt_create',
+ `modifier` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'modifier',
+ `gmt_modified` datetime DEFAULT NULL COMMENT 'gmt_modified',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='瀛楀吀琛�';
+
+SET FOREIGN_KEY_CHECKS = 1;
--
Gitblit v1.9.1