From b9d414bc2d61b4824ce6a019b1c10f526f71ced1 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 21 四月 2025 12:56:12 +0800
Subject: [PATCH] #修改 1. 新增DO单,DO单明细
---
rsf-admin/src/page/components/MyExportButton.jsx | 1
rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx | 86 +
rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryMapper.java | 12
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryService.java | 8
rsf-admin/src/page/delivery/DeliveryList.jsx | 167 +++
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryItemController.java | 110 ++
rsf-admin/src/page/delivery/DeliveryItemCreate.jsx | 201 +++
rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryItemMapper.java | 12
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java | 6
rsf-admin/src/page/deliveryItem/index.jsx | 18
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java | 1
rsf-server/src/main/java/com/vincent/rsf/server/common/CodeBuilder.java | 2
rsf-admin/src/page/delivery/DeliveryItemList.jsx | 176 +++
rsf-admin/src/page/basicInfo/loc/BindModal.jsx | 76
rsf-admin/src/page/delivery/index.jsx | 18
rsf-server/src/main/java/delivery.sql | 32
rsf-admin/src/page/deliveryItem/DeliveryItemCreate.jsx | 201 +++
rsf-admin/src/page/delivery/DeliveryPanel.jsx | 117 ++
rsf-admin/src/page/orders/asnOrder/AsnOrderItemList.jsx | 6
rsf-server/src/main/java/deliveryItem.sql | 34
rsf-admin/src/page/deliveryItem/DeliveryItemEdit.jsx | 173 +++
rsf-admin/src/i18n/zh.js | 30
rsf-admin/src/page/deliveryItem/DeliveryItemPanel.jsx | 129 ++
rsf-admin/src/i18n/en.js | 30
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryItemServiceImpl.java | 12
rsf-admin/.env | 2
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryController.java | 110 ++
rsf-server/src/main/resources/application-dev.yml | 8
rsf-admin/src/page/delivery/DeliveryEdit.jsx | 159 +++
rsf-admin/src/page/delivery/DeliveryCreate.jsx | 187 +++
rsf-admin/src/page/delivery/DeliveryItemEdit.jsx | 173 +++
rsf-admin/src/page/deliveryItem/DeliveryItemList.jsx | 176 +++
rsf-server/src/main/resources/mapper/manager/DeliveryItemMapper.xml | 5
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryItemService.java | 8
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryServiceImpl.java | 12
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Delivery.java | 280 +++++
rsf-server/src/main/resources/mapper/manager/DeliveryMapper.xml | 5
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeliveryItem.java | 274 +++++
38 files changed, 2,986 insertions(+), 71 deletions(-)
diff --git a/rsf-admin/.env b/rsf-admin/.env
index a3c69b2..a8ce658 100644
--- a/rsf-admin/.env
+++ b/rsf-admin/.env
@@ -1,3 +1,3 @@
-VITE_BASE_IP=127.0.0.1
+VITE_BASE_IP=192.168.4.24
# VITE_BASE_IP=47.76.147.249
VITE_BASE_PORT=8080
diff --git a/rsf-admin/src/i18n/en.js b/rsf-admin/src/i18n/en.js
index 6752740..2840e89 100644
--- a/rsf-admin/src/i18n/en.js
+++ b/rsf-admin/src/i18n/en.js
@@ -169,6 +169,7 @@
statistics: 'Statistics',
logs: 'Logs',
permissions: 'Permissions',
+ delivery: 'Delivery',
},
table: {
field: {
@@ -595,6 +596,34 @@
startTime: "startTime",
endTime: "endTime",
},
+ delivery: {
+ code: "code",
+ platId: "platId",
+ type: "type",
+ wkType: "wkType",
+ source: "source",
+ anfme: "anfme",
+ qty: "qty",
+ workQty: "workQty",
+ platCode: "platCode",
+ startTime: "startTime",
+ endTime: "endTime",
+ },
+ deliveryItem: {
+ deliveryId: "deliveryId",
+ platItemId: "platItemId",
+ matnrCode: "matnrCode",
+ matnrName: "matnrName",
+ fieldsIndex: "fieldsIndex",
+ unit: "unit",
+ anfme: "anfme",
+ qty: "qty",
+ nromQty: "nromQty",
+ printQty: "printQty",
+ splrName: "splrName",
+ splrCode: "splrCode",
+ splrBatch: "splrBatch",
+ },
purchaseItem: {
purchaseId: "purchaseId",
platItemId: "erpItemId",
@@ -888,6 +917,7 @@
cancel: "cancel",
bulkExport: "Bulk Export",
continue: 'Continue Receipt',
+ confirmSelect: 'Confirm Select',
selectSite: 'Select Site',
top: "top",
resort: "sort",
diff --git a/rsf-admin/src/i18n/zh.js b/rsf-admin/src/i18n/zh.js
index d4d0bb5..82b3d55 100644
--- a/rsf-admin/src/i18n/zh.js
+++ b/rsf-admin/src/i18n/zh.js
@@ -170,6 +170,7 @@
statistics: '缁熻鏌ヨ',
logs: '鏃ュ織',
permissions: '鏉冮檺绠$悊',
+ delivery: 'DO鍗�',
},
table: {
@@ -605,6 +606,34 @@
startTime: "寮�濮嬫椂闂�",
endTime: "缁撴潫鏃堕棿",
},
+ delivery: {
+ code: "DO缂栫爜",
+ platId: "骞冲彴ID",
+ type: "鍗曟嵁绫诲瀷",
+ wkType: "涓氬姟绫诲瀷",
+ source: "鍗曟嵁鏉ユ簮",
+ anfme: "鏁伴噺",
+ qty: "瀹屾垚鏁伴噺",
+ workQty: "鎵ц鏁伴噺",
+ platCode: "骞冲彴缂栫爜",
+ startTime: "寮�濮嬫椂闂�",
+ endTime: "缁撴潫鏃堕棿",
+ },
+ deliveryItem: {
+ deliveryId: "涓诲崟ID",
+ platItemId: "琛屽彿",
+ matnrCode: "鐗╂枡缂栫爜",
+ matnrName: "鐗╂枡鍚嶇О",
+ fieldsIndex: "瀛楁绱㈠紩",
+ unit: "鍗曚綅",
+ anfme: "鏁伴噺",
+ qty: "瀹屾垚鏁伴噺",
+ nromQty: "nromQty",
+ printQty: "鎵撳嵃鏁伴噺",
+ splrName: "渚涘簲鍟嗗悕绉�",
+ splrCode: "渚涘簲鍟嗙紪鐮�",
+ splrBatch: "渚涘簲鍟嗘壒娆�",
+ },
purchaseItem: {
purchaseId: "PO涓诲崟鏍囪瘑",
platItemId: "erp鏄庣粏鏍囪瘑",
@@ -900,6 +929,7 @@
confirm: '纭',
bulkExport: "鎵归噺瀵煎嚭",
selectSite: '閫夋嫨绔欑偣',
+ confirmSelect: '纭閫夋嫨',
cancel: "鍙栨秷",
top: "缃《",
resort: "鎺掑簭",
diff --git a/rsf-admin/src/page/basicInfo/loc/BindModal.jsx b/rsf-admin/src/page/basicInfo/loc/BindModal.jsx
index 38854f7..5b2e606 100644
--- a/rsf-admin/src/page/basicInfo/loc/BindModal.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/BindModal.jsx
@@ -2,7 +2,6 @@
import {
CreateBase,
useTranslate,
- SearchInput,
TextInput,
NumberInput,
BooleanInput,
@@ -25,9 +24,11 @@
Form,
useCreateController,
useListContext,
+ SearchInput,
useRefresh,
List,
- SelectArrayInput
+ SelectArrayInput,
+ useListController
} from 'react-admin';
import {
Dialog,
@@ -56,10 +57,11 @@
import request from '@/utils/request';
import { Add, Edit, Delete } from '@mui/icons-material';
import _ from 'lodash';
+import { DataGrid } from '@mui/x-data-grid';
import StatusSelectInput from "../../components/StatusSelectInput";
import TreeSelectInput from "@/page/components/TreeSelectInput";
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting';
-
+import ConfirmationNumber from '@mui/icons-material/ConfirmationNumber';
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
'& .css-1vooibu-MuiSvgIcon-root': {
@@ -73,7 +75,7 @@
}));
const filters = [
- <SearchInput source="condition" alwaysOn />
+ <SearchInput source="condition" alwaysOn />,
]
const MatnrModal = ({ open, setOpen }) => {
@@ -134,12 +136,12 @@
groupId: formData.groupId,
matnrId: formData.matnrId,
}
- // const res = await request.post(`/locAreaMatRela/matnr/bind`, parmas);
- // if (res?.data?.code === 200) {
- // handleClose()
- // } else {
- // notify(res.data.msg);
- // }
+ const res = await request.post(`/locAreaMatRela/matnr/bind`, parmas);
+ if (res?.data?.code === 200) {
+ handleClose()
+ } else {
+ notify(res.data.msg);
+ }
}
const [groupId, setGroupId] = useState();
@@ -147,16 +149,14 @@
setGroupId(e.target.value)
}
-
-
return (
- <Dialog open={open} maxWidth="1" fullWidth>
+ <Dialog open={open} maxWidth="md" fullWidth>
<Form onSubmit={handleSubmit}>
<DialogCloseButton onClose={handleClose} />
<DialogTitle>{translate('toolbar.bindmatnr')}</DialogTitle>
<DialogContent sx={{ mt: 2 }}>
- <Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, height: 900 }}>
- <Grid container spacing={2}>
+ <Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, height: 200 }}>
+ <Grid container spacing={3}>
<Grid item xs={3}>
<ReferenceInput
source="areaMatId"
@@ -181,19 +181,20 @@
onChange={(e) => handleChange(e.target.value, 'groupId')}
/>
</Grid>
- </Grid>
- <Grid item xs={4}>
- <List
+ <Grid item xs={3}>
+ {/* </Grid> */}
+ {/* <Grid item xs={4}> */}
+ {/* <List
resource="matnr"
filter={{ groupId: formData.groupId }}
- queryOptions={{}}
- // filters={filters}
+ storeKey="matnrSelectList"
+ filters={filters}
empty={false}
actions={<></>}
>
<StyledDatagrid
preferenceKey='matnr'
- bulkActionButtons={<></>}
+ bulkActionButtons={<> <SelectMatnrs></SelectMatnrs> </>}
rowClick={false}
omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'matnrId', 'asnId']}
>
@@ -216,14 +217,15 @@
<BooleanField key="statusBool" source="statusBool" label="common.field.status" sortable={false} />,
<TextField key="memo" source="memo" label="common.field.memo" sortable={false} />,
</StyledDatagrid>
- </List>
- {/* <ReferenceArrayInput source="matnrId" reference="matnr" filter={{ groupId: formData.groupId }}>
- <SelectArrayInput
- label="table.field.locAreaMatRela.matnrId"
- value={formData.matnrId}
- onChange={(e) => handleChange(e.target.value, 'matnrId')}
- />
- </ReferenceArrayInput> */}
+ </List> */}
+ <ReferenceArrayInput source="matnrId" reference="matnr" filter={{ groupId: formData.groupId }}>
+ <SelectArrayInput
+ label="table.field.locAreaMatRela.matnrId"
+ value={formData.matnrId}
+ onChange={(e) => handleChange(e.target.value, 'matnrId')}
+ />
+ </ReferenceArrayInput>
+ </Grid>
</Grid>
</Box>
</DialogContent>
@@ -239,4 +241,18 @@
);
}
-export default MatnrModal;
\ No newline at end of file
+export default MatnrModal;
+
+const SelectMatnrs = () => {
+ const { selectedIds, data, isPending, onUnselectItems } = useListContext();
+ const clickMatnrs = () => {
+ console.log(selectedIds);
+ onUnselectItems()
+ }
+
+ return (
+ <Button label={"toolbar.confirmSelect"} onClick={clickMatnrs}>
+ <ConfirmationNumber />
+ </Button>
+ )
+}
diff --git a/rsf-admin/src/page/components/MyExportButton.jsx b/rsf-admin/src/page/components/MyExportButton.jsx
index 8922271..a684e47 100644
--- a/rsf-admin/src/page/components/MyExportButton.jsx
+++ b/rsf-admin/src/page/components/MyExportButton.jsx
@@ -23,7 +23,6 @@
const { filter, selectedIds, filterValues, resource, sort, total } = useListContext();
const unSelect = useUnselectAll(resource);
- console.log(selectedIds);
const dataProvider = useDataProvider();
const notify = useNotify();
const handleClick =
diff --git a/rsf-admin/src/page/delivery/DeliveryCreate.jsx b/rsf-admin/src/page/delivery/DeliveryCreate.jsx
new file mode 100644
index 0000000..15106f0
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryCreate.jsx
@@ -0,0 +1,187 @@
+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 DeliveryCreate = (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.delivery.code"
+ source="code"
+ parse={v => v}
+ autoFocus
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.delivery.platId"
+ source="platId"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.delivery.type"
+ source="type"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.delivery.wkType"
+ source="wkType"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.delivery.source"
+ source="source"
+ parse={v => v}
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.delivery.anfme"
+ source="anfme"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.delivery.qty"
+ source="qty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.delivery.workQty"
+ source="workQty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.delivery.platCode"
+ source="platCode"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <DateInput
+ label="table.field.delivery.startTime"
+ source="startTime"
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <DateInput
+ label="table.field.delivery.endTime"
+ source="endTime"
+ />
+ </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 DeliveryCreate;
diff --git a/rsf-admin/src/page/delivery/DeliveryEdit.jsx b/rsf-admin/src/page/delivery/DeliveryEdit.jsx
new file mode 100644
index 0000000..090e940
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryEdit.jsx
@@ -0,0 +1,159 @@
+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 DeliveryEdit = () => {
+ 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.delivery.code"
+ source="code"
+ parse={v => v}
+ autoFocus
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.delivery.platId"
+ source="platId"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.delivery.type"
+ source="type"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.delivery.wkType"
+ source="wkType"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.delivery.source"
+ source="source"
+ parse={v => v}
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.delivery.anfme"
+ source="anfme"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.delivery.qty"
+ source="qty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.delivery.workQty"
+ source="workQty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.delivery.platCode"
+ source="platCode"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <DateInput
+ label="table.field.delivery.startTime"
+ source="startTime"
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <DateInput
+ label="table.field.delivery.endTime"
+ source="endTime"
+ />
+ </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 DeliveryEdit;
diff --git a/rsf-admin/src/page/delivery/DeliveryItemCreate.jsx b/rsf-admin/src/page/delivery/DeliveryItemCreate.jsx
new file mode 100644
index 0000000..59c04d7
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryItemCreate.jsx
@@ -0,0 +1,201 @@
+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 DeliveryItemCreate = (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}>
+ <NumberInput
+ label="table.field.deliveryItem.deliveryId"
+ source="deliveryId"
+ autoFocus
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.platItemId"
+ source="platItemId"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.matnrCode"
+ source="matnrCode"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.matnrName"
+ source="matnrName"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.fieldsIndex"
+ source="fieldsIndex"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.unit"
+ source="unit"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.anfme"
+ source="anfme"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.qty"
+ source="qty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.nromQty"
+ source="nromQty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.printQty"
+ source="printQty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.splrName"
+ source="splrName"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.splrCode"
+ source="splrCode"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.splrBatch"
+ source="splrBatch"
+ 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 DeliveryItemCreate;
diff --git a/rsf-admin/src/page/delivery/DeliveryItemEdit.jsx b/rsf-admin/src/page/delivery/DeliveryItemEdit.jsx
new file mode 100644
index 0000000..f903642
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryItemEdit.jsx
@@ -0,0 +1,173 @@
+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 DeliveryItemEdit = () => {
+ 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}>
+ <NumberInput
+ label="table.field.deliveryItem.deliveryId"
+ source="deliveryId"
+ autoFocus
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.platItemId"
+ source="platItemId"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.matnrCode"
+ source="matnrCode"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.matnrName"
+ source="matnrName"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.fieldsIndex"
+ source="fieldsIndex"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.unit"
+ source="unit"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.anfme"
+ source="anfme"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.qty"
+ source="qty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.nromQty"
+ source="nromQty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.printQty"
+ source="printQty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.splrName"
+ source="splrName"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.splrCode"
+ source="splrCode"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.splrBatch"
+ source="splrBatch"
+ 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 DeliveryItemEdit;
diff --git a/rsf-admin/src/page/delivery/DeliveryItemList.jsx b/rsf-admin/src/page/delivery/DeliveryItemList.jsx
new file mode 100644
index 0000000..25a58a1
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryItemList.jsx
@@ -0,0 +1,176 @@
+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 DeliveryItemCreate from "./DeliveryItemCreate";
+import DeliveryItemPanel from "./DeliveryItemPanel";
+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 />,
+
+ <NumberInput source="deliveryId" label="table.field.deliveryItem.deliveryId" />,
+ <TextInput source="platItemId" label="table.field.deliveryItem.platItemId" />,
+ <TextInput source="matnrCode" label="table.field.deliveryItem.matnrCode" />,
+ <TextInput source="matnrName" label="table.field.deliveryItem.matnrName" />,
+ <TextInput source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" />,
+ <TextInput source="unit" label="table.field.deliveryItem.unit" />,
+ <NumberInput source="anfme" label="table.field.deliveryItem.anfme" />,
+ <NumberInput source="qty" label="table.field.deliveryItem.qty" />,
+ <NumberInput source="nromQty" label="table.field.deliveryItem.nromQty" />,
+ <NumberInput source="printQty" label="table.field.deliveryItem.printQty" />,
+ <TextInput source="splrName" label="table.field.deliveryItem.splrName" />,
+ <TextInput source="splrCode" label="table.field.deliveryItem.splrCode" />,
+ <TextInput source="splrBatch" label="table.field.deliveryItem.splrBatch" />,
+
+ <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 DeliveryItemList = () => {
+ 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.deliveryItem"}
+ empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
+ filters={filters}
+ sort={{ field: "create_time", order: "desc" }}
+ actions={(
+ <TopToolbar>
+ <FilterButton />
+ <MyCreateButton onClick={() => { setCreateDialog(true) }} />
+ <SelectColumnsButton preferenceKey='deliveryItem' />
+ <MyExportButton />
+ </TopToolbar>
+ )}
+ perPage={DEFAULT_PAGE_SIZE}
+ >
+ <StyledDatagrid
+ preferenceKey='deliveryItem'
+ bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+ rowClick={(id, resource, record) => false}
+ expand={() => <DeliveryItemPanel />}
+ expandSingle={true}
+ omit={['id', 'createTime', 'createBy', 'memo']}
+ >
+ <NumberField source="id" />
+ <NumberField source="deliveryId" label="table.field.deliveryItem.deliveryId" />
+ <TextField source="platItemId" label="table.field.deliveryItem.platItemId" />
+ <TextField source="matnrCode" label="table.field.deliveryItem.matnrCode" />
+ <TextField source="matnrName" label="table.field.deliveryItem.matnrName" />
+ <TextField source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" />
+ <TextField source="unit" label="table.field.deliveryItem.unit" />
+ <NumberField source="anfme" label="table.field.deliveryItem.anfme" />
+ <NumberField source="qty" label="table.field.deliveryItem.qty" />
+ <NumberField source="nromQty" label="table.field.deliveryItem.nromQty" />
+ <NumberField source="printQty" label="table.field.deliveryItem.printQty" />
+ <TextField source="splrName" label="table.field.deliveryItem.splrName" />
+ <TextField source="splrCode" label="table.field.deliveryItem.splrCode" />
+ <TextField source="splrBatch" label="table.field.deliveryItem.splrBatch" />
+
+ <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>
+ <DeliveryItemCreate
+ open={createDialog}
+ setOpen={setCreateDialog}
+ />
+ <PageDrawer
+ title='DeliveryItem Detail'
+ drawerVal={drawerVal}
+ setDrawerVal={setDrawerVal}
+ >
+ </PageDrawer>
+ </Box>
+ )
+}
+
+export default DeliveryItemList;
diff --git a/rsf-admin/src/page/delivery/DeliveryList.jsx b/rsf-admin/src/page/delivery/DeliveryList.jsx
new file mode 100644
index 0000000..a9235f9
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryList.jsx
@@ -0,0 +1,167 @@
+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 DeliveryCreate from "./DeliveryCreate";
+import DeliveryPanel from "./DeliveryPanel";
+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="code" label="table.field.delivery.code" />,
+ <TextInput source="platId" label="table.field.delivery.platId" />,
+ <TextInput source="type" label="table.field.delivery.type" />,
+ <TextInput source="wkType" label="table.field.delivery.wkType" />,
+ <TextInput source="source" label="table.field.delivery.source" />,
+ <NumberInput source="anfme" label="table.field.delivery.anfme" />,
+ <NumberInput source="qty" label="table.field.delivery.qty" />,
+ <NumberInput source="workQty" label="table.field.delivery.workQty" />,
+ <TextInput source="platCode" label="table.field.delivery.platCode" />,
+ <DateInput source="startTime" label="table.field.delivery.startTime" />,
+ <DateInput source="endTime" label="table.field.delivery.endTime" />,
+
+ <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 DeliveryList = () => {
+ 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.delivery"}
+ empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
+ filters={filters}
+ sort={{ field: "create_time", order: "desc" }}
+ actions={(
+ <TopToolbar>
+ <FilterButton />
+ <MyCreateButton onClick={() => { setCreateDialog(true) }} />
+ <SelectColumnsButton preferenceKey='delivery' />
+ <MyExportButton />
+ </TopToolbar>
+ )}
+ perPage={DEFAULT_PAGE_SIZE}
+ >
+ <StyledDatagrid
+ preferenceKey='delivery'
+ bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+ rowClick={(id, resource, record) => false}
+ expand={() => <DeliveryPanel />}
+ expandSingle={true}
+ omit={['id', 'createTime', 'createBy', 'memo', 'workQty', 'startTime', 'endTime', 'updateBy','createTime']}
+ >
+ <NumberField source="id" />
+ <TextField source="code" label="table.field.delivery.code" />
+ <TextField source="platId" label="table.field.delivery.platId" />
+ <TextField source="type" label="table.field.delivery.type" />
+ <TextField source="wkType" label="table.field.delivery.wkType" />
+ <TextField source="source" label="table.field.delivery.source" />
+ <NumberField source="anfme" label="table.field.delivery.anfme" />
+ <NumberField source="qty" label="table.field.delivery.qty" />
+ <NumberField source="workQty" label="table.field.delivery.workQty" />
+ <TextField source="platCode" label="table.field.delivery.platCode" />
+ <DateField source="startTime" label="table.field.delivery.startTime" showTime />
+ <DateField source="endTime" label="table.field.delivery.endTime" showTime />
+ <TextField source="updateBy$" label="common.field.updateBy" />
+ <DateField source="updateTime" label="common.field.updateTime" showTime />
+ <TextField source="createBy$" label="common.field.createBy" />
+ <DateField source="createTime" label="common.field.createTime" showTime />
+ <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>
+ <DeliveryCreate
+ open={createDialog}
+ setOpen={setCreateDialog}
+ />
+ <PageDrawer
+ title='Delivery Detail'
+ drawerVal={drawerVal}
+ setDrawerVal={setDrawerVal}
+ >
+ </PageDrawer>
+ </Box>
+ )
+}
+
+export default DeliveryList;
diff --git a/rsf-admin/src/page/delivery/DeliveryPanel.jsx b/rsf-admin/src/page/delivery/DeliveryPanel.jsx
new file mode 100644
index 0000000..056aa96
--- /dev/null
+++ b/rsf-admin/src/page/delivery/DeliveryPanel.jsx
@@ -0,0 +1,117 @@
+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 DeliveryPanel = () => {
+ 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.delivery.id'))}: {record.id}
+ </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.delivery.code"
+ property={record.code}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.platId"
+ property={record.platId}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.type"
+ property={record.type}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.wkType"
+ property={record.wkType}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.source"
+ property={record.source}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.anfme"
+ property={record.anfme}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.qty"
+ property={record.qty}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.workQty"
+ property={record.workQty}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.platCode"
+ property={record.platCode}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.startTime"
+ property={record.startTime$}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.delivery.endTime"
+ property={record.endTime$}
+ />
+ </Grid>
+
+ </Grid>
+ </CardContent>
+ </Card >
+ </>
+ );
+};
+
+export default DeliveryPanel;
diff --git a/rsf-admin/src/page/delivery/index.jsx b/rsf-admin/src/page/delivery/index.jsx
new file mode 100644
index 0000000..2167a21
--- /dev/null
+++ b/rsf-admin/src/page/delivery/index.jsx
@@ -0,0 +1,18 @@
+import React, { useState, useRef, useEffect, useMemo } from "react";
+import {
+ ListGuesser,
+ EditGuesser,
+ ShowGuesser,
+} from "react-admin";
+
+import DeliveryList from "./DeliveryList";
+import DeliveryEdit from "./DeliveryEdit";
+
+export default {
+ list: DeliveryList,
+ edit: DeliveryEdit,
+ show: ShowGuesser,
+ recordRepresentation: (record) => {
+ return `${record.id}`
+ }
+};
diff --git a/rsf-admin/src/page/deliveryItem/DeliveryItemCreate.jsx b/rsf-admin/src/page/deliveryItem/DeliveryItemCreate.jsx
new file mode 100644
index 0000000..59c04d7
--- /dev/null
+++ b/rsf-admin/src/page/deliveryItem/DeliveryItemCreate.jsx
@@ -0,0 +1,201 @@
+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 DeliveryItemCreate = (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}>
+ <NumberInput
+ label="table.field.deliveryItem.deliveryId"
+ source="deliveryId"
+ autoFocus
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.platItemId"
+ source="platItemId"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.matnrCode"
+ source="matnrCode"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.matnrName"
+ source="matnrName"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.fieldsIndex"
+ source="fieldsIndex"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.unit"
+ source="unit"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.anfme"
+ source="anfme"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.qty"
+ source="qty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.nromQty"
+ source="nromQty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <NumberInput
+ label="table.field.deliveryItem.printQty"
+ source="printQty"
+ validate={required()}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.splrName"
+ source="splrName"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.splrCode"
+ source="splrCode"
+ parse={v => v}
+ />
+ </Grid>
+ <Grid item xs={6} display="flex" gap={1}>
+ <TextInput
+ label="table.field.deliveryItem.splrBatch"
+ source="splrBatch"
+ 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 DeliveryItemCreate;
diff --git a/rsf-admin/src/page/deliveryItem/DeliveryItemEdit.jsx b/rsf-admin/src/page/deliveryItem/DeliveryItemEdit.jsx
new file mode 100644
index 0000000..f903642
--- /dev/null
+++ b/rsf-admin/src/page/deliveryItem/DeliveryItemEdit.jsx
@@ -0,0 +1,173 @@
+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 DeliveryItemEdit = () => {
+ 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}>
+ <NumberInput
+ label="table.field.deliveryItem.deliveryId"
+ source="deliveryId"
+ autoFocus
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.platItemId"
+ source="platItemId"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.matnrCode"
+ source="matnrCode"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.matnrName"
+ source="matnrName"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.fieldsIndex"
+ source="fieldsIndex"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.unit"
+ source="unit"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.anfme"
+ source="anfme"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.qty"
+ source="qty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.nromQty"
+ source="nromQty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <NumberInput
+ label="table.field.deliveryItem.printQty"
+ source="printQty"
+ validate={required()}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.splrName"
+ source="splrName"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.splrCode"
+ source="splrCode"
+ parse={v => v}
+ />
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.deliveryItem.splrBatch"
+ source="splrBatch"
+ 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 DeliveryItemEdit;
diff --git a/rsf-admin/src/page/deliveryItem/DeliveryItemList.jsx b/rsf-admin/src/page/deliveryItem/DeliveryItemList.jsx
new file mode 100644
index 0000000..25a58a1
--- /dev/null
+++ b/rsf-admin/src/page/deliveryItem/DeliveryItemList.jsx
@@ -0,0 +1,176 @@
+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 DeliveryItemCreate from "./DeliveryItemCreate";
+import DeliveryItemPanel from "./DeliveryItemPanel";
+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 />,
+
+ <NumberInput source="deliveryId" label="table.field.deliveryItem.deliveryId" />,
+ <TextInput source="platItemId" label="table.field.deliveryItem.platItemId" />,
+ <TextInput source="matnrCode" label="table.field.deliveryItem.matnrCode" />,
+ <TextInput source="matnrName" label="table.field.deliveryItem.matnrName" />,
+ <TextInput source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" />,
+ <TextInput source="unit" label="table.field.deliveryItem.unit" />,
+ <NumberInput source="anfme" label="table.field.deliveryItem.anfme" />,
+ <NumberInput source="qty" label="table.field.deliveryItem.qty" />,
+ <NumberInput source="nromQty" label="table.field.deliveryItem.nromQty" />,
+ <NumberInput source="printQty" label="table.field.deliveryItem.printQty" />,
+ <TextInput source="splrName" label="table.field.deliveryItem.splrName" />,
+ <TextInput source="splrCode" label="table.field.deliveryItem.splrCode" />,
+ <TextInput source="splrBatch" label="table.field.deliveryItem.splrBatch" />,
+
+ <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 DeliveryItemList = () => {
+ 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.deliveryItem"}
+ empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
+ filters={filters}
+ sort={{ field: "create_time", order: "desc" }}
+ actions={(
+ <TopToolbar>
+ <FilterButton />
+ <MyCreateButton onClick={() => { setCreateDialog(true) }} />
+ <SelectColumnsButton preferenceKey='deliveryItem' />
+ <MyExportButton />
+ </TopToolbar>
+ )}
+ perPage={DEFAULT_PAGE_SIZE}
+ >
+ <StyledDatagrid
+ preferenceKey='deliveryItem'
+ bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+ rowClick={(id, resource, record) => false}
+ expand={() => <DeliveryItemPanel />}
+ expandSingle={true}
+ omit={['id', 'createTime', 'createBy', 'memo']}
+ >
+ <NumberField source="id" />
+ <NumberField source="deliveryId" label="table.field.deliveryItem.deliveryId" />
+ <TextField source="platItemId" label="table.field.deliveryItem.platItemId" />
+ <TextField source="matnrCode" label="table.field.deliveryItem.matnrCode" />
+ <TextField source="matnrName" label="table.field.deliveryItem.matnrName" />
+ <TextField source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" />
+ <TextField source="unit" label="table.field.deliveryItem.unit" />
+ <NumberField source="anfme" label="table.field.deliveryItem.anfme" />
+ <NumberField source="qty" label="table.field.deliveryItem.qty" />
+ <NumberField source="nromQty" label="table.field.deliveryItem.nromQty" />
+ <NumberField source="printQty" label="table.field.deliveryItem.printQty" />
+ <TextField source="splrName" label="table.field.deliveryItem.splrName" />
+ <TextField source="splrCode" label="table.field.deliveryItem.splrCode" />
+ <TextField source="splrBatch" label="table.field.deliveryItem.splrBatch" />
+
+ <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>
+ <DeliveryItemCreate
+ open={createDialog}
+ setOpen={setCreateDialog}
+ />
+ <PageDrawer
+ title='DeliveryItem Detail'
+ drawerVal={drawerVal}
+ setDrawerVal={setDrawerVal}
+ >
+ </PageDrawer>
+ </Box>
+ )
+}
+
+export default DeliveryItemList;
diff --git a/rsf-admin/src/page/deliveryItem/DeliveryItemPanel.jsx b/rsf-admin/src/page/deliveryItem/DeliveryItemPanel.jsx
new file mode 100644
index 0000000..d22337f
--- /dev/null
+++ b/rsf-admin/src/page/deliveryItem/DeliveryItemPanel.jsx
@@ -0,0 +1,129 @@
+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 DeliveryItemPanel = () => {
+ 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.deliveryItem.id'))}: {record.id}
+ </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.deliveryItem.deliveryId"
+ property={record.deliveryId}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.platItemId"
+ property={record.platItemId}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.matnrCode"
+ property={record.matnrCode}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.matnrName"
+ property={record.matnrName}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.fieldsIndex"
+ property={record.fieldsIndex}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.unit"
+ property={record.unit}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.anfme"
+ property={record.anfme}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.qty"
+ property={record.qty}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.nromQty"
+ property={record.nromQty}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.printQty"
+ property={record.printQty}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.splrName"
+ property={record.splrName}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.splrCode"
+ property={record.splrCode}
+ />
+ </Grid>
+ <Grid item xs={6}>
+ <PanelTypography
+ title="table.field.deliveryItem.splrBatch"
+ property={record.splrBatch}
+ />
+ </Grid>
+
+ </Grid>
+ </CardContent>
+ </Card >
+ </>
+ );
+};
+
+export default DeliveryItemPanel;
diff --git a/rsf-admin/src/page/deliveryItem/index.jsx b/rsf-admin/src/page/deliveryItem/index.jsx
new file mode 100644
index 0000000..ef6938d
--- /dev/null
+++ b/rsf-admin/src/page/deliveryItem/index.jsx
@@ -0,0 +1,18 @@
+import React, { useState, useRef, useEffect, useMemo } from "react";
+import {
+ ListGuesser,
+ EditGuesser,
+ ShowGuesser,
+} from "react-admin";
+
+import DeliveryItemList from "./DeliveryItemList";
+import DeliveryItemEdit from "./DeliveryItemEdit";
+
+export default {
+ list: DeliveryItemList,
+ edit: DeliveryItemEdit,
+ show: ShowGuesser,
+ recordRepresentation: (record) => {
+ return `${record.id}`
+ }
+};
diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx
index 30acba3..bb1e884 100644
--- a/rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx
+++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderEdit.jsx
@@ -24,8 +24,9 @@
return (
<Toolbar sx={{ justifyContent: 'end' }}>
- <SaveButton />
- <DeleteButton mutationMode="optimistic" />
+ <></>
+ {/* <SaveButton />
+ <DeleteButton mutationMode="optimistic" /> */}
</Toolbar>
)
}
@@ -50,8 +51,23 @@
mode="onTouched"
defaultValues={{}}
>
- <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}>
- <Grid item xs={24} md={12}>
+ <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}
+ sx={{
+ "& .MuiFormLabel-root.MuiInputLabel-root.Mui-disabled": {
+ bgcolor: 'white',
+ WebkitTextFillColor: "rgba(0, 0, 0)"
+ },
+
+ "& .MuiInputBase-input.MuiFilledInput-input.Mui-disabled": {
+ bgcolor: 'white',
+ WebkitTextFillColor: "rgba(0, 0, 0)"
+ },
+ "& .MuiFilledInput-root.MuiInputBase-sizeSmall": {
+ bgcolor: 'white',
+ }
+ }}
+ >
+ <Grid item xs={24} md={12} >
<Typography variant="h6" gutterBottom>
{translate('common.edit.title.main')}
</Typography>
@@ -65,6 +81,7 @@
<TextInput
label="table.field.asnOrder.poCode"
source="poCode"
+ readOnly
parse={v => v}
/>
<AutocompleteInput
@@ -74,6 +91,7 @@
source="type"
optionValue="value"
parse={v => v}
+ readOnly
/>
<AutocompleteInput
choices={business}
@@ -82,30 +100,46 @@
source="wkType"
optionValue="value"
parse={v => v}
+ readOnly
/>
- </Stack>
- <Stack direction='row' gap={2}>
- <TextInput
- label="table.field.asnOrder.logisNo"
- source="logisNo"
- parse={v => v}
- />
- <DateInput
- label="table.field.asnOrder.arrTime"
- source="arrTime"
- />
- <SelectInput
- label="table.field.asnOrder.rleStatus"
- source="rleStatus"
- choices={[
- { id: 0, name: ' 姝e父' },
- { id: 1, name: ' 宸查噴鏀�' },
- ]}
- validate={required()}
- />
- </Stack>
+ </Stack>
+ <Stack direction='row' gap={2}>
+ <TextInput
+ label="table.field.asnOrder.logisNo"
+ source="logisNo"
+ readOnly
+ parse={v => v}
+ />
+ <TextInput
+ label="table.field.asnOrder.anfme"
+ source="anfme"
+ readOnly
+ parse={v => v}
+ />
+ <TextInput
+ label="table.field.asnOrder.qty"
+ source="qty"
+ readOnly
+ parse={v => v}
+ />
+ <DateInput
+ label="table.field.asnOrder.arrTime"
+ source="arrTime"
+ readOnly
+ />
+ <SelectInput
+ label="table.field.asnOrder.rleStatus"
+ source="rleStatus"
+ readOnly
+ choices={[
+ { id: 0, name: ' 姝e父' },
+ { id: 1, name: ' 宸查噴鏀�' },
+ ]}
+ validate={required()}
+ />
+ </Stack>
</Grid>
- </Grid>
+ </Grid>
</SimpleForm>
</Edit >
<AsnOrderItemList />
diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderItemList.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderItemList.jsx
index 04cfa63..e2ef514 100644
--- a/rsf-admin/src/page/orders/asnOrder/AsnOrderItemList.jsx
+++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderItemList.jsx
@@ -162,12 +162,6 @@
<DateField source="createTime" label="common.field.createTime" showTime />
<BooleanField source="status$" label="common.field.status" sortable={false} />
<TextField source="memo" label="common.field.memo" sortable={false} />
- <WrapperField cellClassName="opt" label="common.field.opt">
- <Button label="ra.action.edit" onClick={(id, resource, record) => {
- setEditDialog(true)
- setSelect(record) }} />
- <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
- </WrapperField>
</StyledDatagrid>
</List>
<AsnOrderItemCreate
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
index ebda499..a22179e 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/MobileServiceImpl.java
@@ -248,6 +248,7 @@
// }
AsnOrderItem orderItem = asnOrderItemMapper.selectOne(new LambdaQueryWrapper<AsnOrderItem>()
.eq(AsnOrderItem::getAsnCode, asnCode)
+ .eq(AsnOrderItem::getTrackCode, dto.getBarcode())
.eq(AsnOrderItem::getMatnrId, dto.getMatnrId()));
if (Objects.isNull(orderItem)) {
throw new CoolException("閫氱煡鍗曟槑缁嗕笉瀛樺湪锛侊紒");
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 3663686..cb213f0 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,7 +22,7 @@
// generator.username="sa";
// generator.password="Zoneyung@zy56$";
- generator.table="man_stock_item";
+ generator.table="man_delivery_item";
generator.tableDesc="缁煎悎鍗曟嵁鏄庣粏";
generator.packagePath="com.vincent.rsf.server.manager";
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryController.java
new file mode 100644
index 0000000..0509ebf
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryController.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.Delivery;
+import com.vincent.rsf.server.manager.service.DeliveryService;
+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 DeliveryController extends BaseController {
+
+ @Autowired
+ private DeliveryService deliveryService;
+
+ @PreAuthorize("hasAuthority('manager:delivery:list')")
+ @PostMapping("/delivery/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<Delivery, BaseParam> pageParam = new PageParam<>(baseParam, Delivery.class);
+ return R.ok().add(deliveryService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:list')")
+ @PostMapping("/delivery/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(deliveryService.list());
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:list')")
+ @PostMapping({"/delivery/many/{ids}", "/deliverys/many/{ids}"})
+ public R many(@PathVariable Long[] ids) {
+ return R.ok().add(deliveryService.listByIds(Arrays.asList(ids)));
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:list')")
+ @GetMapping("/delivery/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(deliveryService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:save')")
+ @OperationLog("Create 缁煎悎鍗曟嵁鏄庣粏")
+ @PostMapping("/delivery/save")
+ public R save(@RequestBody Delivery delivery) {
+ delivery.setCreateBy(getLoginUserId());
+ delivery.setCreateTime(new Date());
+ delivery.setUpdateBy(getLoginUserId());
+ delivery.setUpdateTime(new Date());
+ if (!deliveryService.save(delivery)) {
+ return R.error("Save Fail");
+ }
+ return R.ok("Save Success").add(delivery);
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:update')")
+ @OperationLog("Update 缁煎悎鍗曟嵁鏄庣粏")
+ @PostMapping("/delivery/update")
+ public R update(@RequestBody Delivery delivery) {
+ delivery.setUpdateBy(getLoginUserId());
+ delivery.setUpdateTime(new Date());
+ if (!deliveryService.updateById(delivery)) {
+ return R.error("Update Fail");
+ }
+ return R.ok("Update Success").add(delivery);
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:remove')")
+ @OperationLog("Delete 缁煎悎鍗曟嵁鏄庣粏")
+ @PostMapping("/delivery/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!deliveryService.removeByIds(Arrays.asList(ids))) {
+ return R.error("Delete Fail");
+ }
+ return R.ok("Delete Success").add(ids);
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:list')")
+ @PostMapping("/delivery/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<Delivery> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(Delivery::getId, condition);
+ }
+ deliveryService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getId()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('manager:delivery:list')")
+ @PostMapping("/delivery/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(deliveryService.list(), Delivery.class), response);
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryItemController.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryItemController.java
new file mode 100644
index 0000000..d0ab07b
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryItemController.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.DeliveryItem;
+import com.vincent.rsf.server.manager.service.DeliveryItemService;
+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 DeliveryItemController extends BaseController {
+
+ @Autowired
+ private DeliveryItemService deliveryItemService;
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
+ @PostMapping("/deliveryItem/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<DeliveryItem, BaseParam> pageParam = new PageParam<>(baseParam, DeliveryItem.class);
+ return R.ok().add(deliveryItemService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
+ @PostMapping("/deliveryItem/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(deliveryItemService.list());
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
+ @PostMapping({"/deliveryItem/many/{ids}", "/deliveryItems/many/{ids}"})
+ public R many(@PathVariable Long[] ids) {
+ return R.ok().add(deliveryItemService.listByIds(Arrays.asList(ids)));
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
+ @GetMapping("/deliveryItem/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(deliveryItemService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:save')")
+ @OperationLog("Create 缁煎悎鍗曟嵁鏄庣粏")
+ @PostMapping("/deliveryItem/save")
+ public R save(@RequestBody DeliveryItem deliveryItem) {
+ deliveryItem.setCreateBy(getLoginUserId());
+ deliveryItem.setCreateTime(new Date());
+ deliveryItem.setUpdateBy(getLoginUserId());
+ deliveryItem.setUpdateTime(new Date());
+ if (!deliveryItemService.save(deliveryItem)) {
+ return R.error("Save Fail");
+ }
+ return R.ok("Save Success").add(deliveryItem);
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:update')")
+ @OperationLog("Update 缁煎悎鍗曟嵁鏄庣粏")
+ @PostMapping("/deliveryItem/update")
+ public R update(@RequestBody DeliveryItem deliveryItem) {
+ deliveryItem.setUpdateBy(getLoginUserId());
+ deliveryItem.setUpdateTime(new Date());
+ if (!deliveryItemService.updateById(deliveryItem)) {
+ return R.error("Update Fail");
+ }
+ return R.ok("Update Success").add(deliveryItem);
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:remove')")
+ @OperationLog("Delete 缁煎悎鍗曟嵁鏄庣粏")
+ @PostMapping("/deliveryItem/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!deliveryItemService.removeByIds(Arrays.asList(ids))) {
+ return R.error("Delete Fail");
+ }
+ return R.ok("Delete Success").add(ids);
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
+ @PostMapping("/deliveryItem/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<DeliveryItem> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(DeliveryItem::getId, condition);
+ }
+ deliveryItemService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getId()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
+ @PostMapping("/deliveryItem/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(deliveryItemService.list(), DeliveryItem.class), response);
+ }
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Delivery.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Delivery.java
new file mode 100644
index 0000000..30cba35
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Delivery.java
@@ -0,0 +1,280 @@
+package com.vincent.rsf.server.manager.entity;
+
+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.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+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_delivery")
+public class Delivery 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;
+
+ /**
+ * erp涓诲崟鏍囪瘑
+ */
+ @ApiModelProperty(value= "erp涓诲崟鏍囪瘑")
+ private String platId;
+
+ /**
+ * 鍗曟嵁绫诲瀷
+ */
+ @ApiModelProperty(value= "鍗曟嵁绫诲瀷")
+ private String type;
+
+ /**
+ * 涓氬姟绫诲瀷
+ */
+ @ApiModelProperty(value= "涓氬姟绫诲瀷")
+ private String wkType;
+
+ /**
+ * 鍗曟嵁鏉ユ簮
+ */
+ @ApiModelProperty(value= "鍗曟嵁鏉ユ簮")
+ private String source;
+
+ /**
+ * 鍑哄簱鏁伴噺
+ */
+ @ApiModelProperty(value= "鍑哄簱鏁伴噺")
+ private Double anfme;
+
+ /**
+ * 宸插嚭搴撴暟閲�
+ */
+ @ApiModelProperty(value= "宸插嚭搴撴暟閲�")
+ private Double qty;
+
+ /**
+ * 鎵ц涓暟閲�
+ */
+ @ApiModelProperty(value= "鎵ц涓暟閲�")
+ private Double workQty;
+
+ /**
+ * 骞冲彴鍗曞彿
+ */
+ @ApiModelProperty(value= "骞冲彴鍗曞彿")
+ private String platCode;
+
+ /**
+ * 璁″垝鍑哄簱鏃堕棿
+ */
+ @ApiModelProperty(value= "璁″垝鍑哄簱鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date startTime;
+
+ /**
+ * 璁″垝鍑哄簱缁撴潫鏃堕棿
+ */
+ @ApiModelProperty(value= "璁″垝鍑哄簱缁撴潫鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date endTime;
+
+ /**
+ * 鐘舵�� 1: 宸插畬鎴� 0: 寰呮墽琛� 2: 鏈畬鎴�
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 宸插畬鎴� 0: 寰呮墽琛� 2: 鏈畬鎴� ")
+ 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 Delivery() {}
+
+ public Delivery(String code,String platId,String type,String wkType,String source,Double anfme,Double qty,Double workQty,String platCode,Date startTime,Date endTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+ this.code = code;
+ this.platId = platId;
+ this.type = type;
+ this.wkType = wkType;
+ this.source = source;
+ this.anfme = anfme;
+ this.qty = qty;
+ this.workQty = workQty;
+ this.platCode = platCode;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ this.status = status;
+ this.deleted = deleted;
+ this.tenantId = tenantId;
+ this.createBy = createBy;
+ this.createTime = createTime;
+ this.updateBy = updateBy;
+ this.updateTime = updateTime;
+ this.memo = memo;
+ }
+
+// Delivery delivery = new Delivery(
+// null, // 閲囪喘鍗曞彿
+// null, // erp涓诲崟鏍囪瘑
+// null, // 鍗曟嵁绫诲瀷
+// null, // 涓氬姟绫诲瀷
+// null, // 鍗曟嵁鏉ユ簮[闈炵┖]
+// null, // 鍑哄簱鏁伴噺[闈炵┖]
+// null, // 宸插嚭搴撴暟閲廩闈炵┖]
+// null, // 鎵ц涓暟閲廩闈炵┖]
+// null, // 骞冲彴鍗曞彿
+// null, // 璁″垝鍑哄簱鏃堕棿
+// null, // 璁″垝鍑哄簱缁撴潫鏃堕棿
+// null, // 鐘舵�乕闈炵┖]
+// null, // 鏄惁鍒犻櫎[闈炵┖]
+// null, // 绉熸埛
+// null, // 娣诲姞浜哄憳
+// null, // 娣诲姞鏃堕棿[闈炵┖]
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿[闈炵┖]
+// null // 澶囨敞
+// );
+
+ public String getStartTime$(){
+ if (Cools.isEmpty(this.startTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime);
+ }
+
+ public String getEndTime$(){
+ if (Cools.isEmpty(this.endTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime);
+ }
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "宸插畬鎴�";
+ case 0:
+ return "寰呮墽琛�";
+ case 2:
+ 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/entity/DeliveryItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeliveryItem.java
new file mode 100644
index 0000000..94c834d
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeliveryItem.java
@@ -0,0 +1,274 @@
+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_delivery_item")
+public class DeliveryItem implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ @ApiModelProperty(value= "ID")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 涓诲崟鏍囪瘑
+ */
+ @ApiModelProperty(value= "涓诲崟鏍囪瘑")
+ private Long deliveryId;
+
+ /**
+ * erp鏄庣粏鏍囪瘑
+ */
+ @ApiModelProperty(value= "erp鏄庣粏鏍囪瘑")
+ private String platItemId;
+
+ /**
+ * 鐗╂枡缂栫爜
+ */
+ @ApiModelProperty(value= "鐗╂枡缂栫爜")
+ private String matnrCode;
+
+ /**
+ * 鐗╂枡鍚嶇О
+ */
+ @ApiModelProperty(value= "鐗╂枡鍚嶇О")
+ private String matnrName;
+
+ /**
+ * 鍔ㄦ�佸瓧娈电储寮�
+ */
+ @ApiModelProperty(value= "鍔ㄦ�佸瓧娈电储寮�")
+ private String fieldsIndex;
+
+ /**
+ * 鍗曚綅
+ */
+ @ApiModelProperty(value= "鍗曚綅")
+ private String unit;
+
+ /**
+ * 鏁伴噺
+ */
+ @ApiModelProperty(value= "鏁伴噺")
+ private Double anfme;
+
+ /**
+ * 宸插嚭鏁伴噺
+ */
+ @ApiModelProperty(value= "宸插嚭鏁伴噺")
+ private Double qty;
+
+ /**
+ * 鏍囧噯鍖呰
+ */
+ @ApiModelProperty(value= "鏍囧噯鍖呰")
+ private Double nromQty;
+
+ /**
+ * 鏉$爜鎵撳嵃鏁伴噺
+ */
+ @ApiModelProperty(value= "鏉$爜鎵撳嵃鏁伴噺")
+ private Double printQty;
+
+ /**
+ * 渚涘簲鍟嗗悕绉�
+ */
+ @ApiModelProperty(value= "渚涘簲鍟嗗悕绉�")
+ private String splrName;
+
+ /**
+ * 渚涘簲鍟嗙紪鐮�
+ */
+ @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�")
+ private String splrCode;
+
+ /**
+ * 渚涘簲鍟嗘壒娆�
+ */
+ @ApiModelProperty(value= "渚涘簲鍟嗘壒娆�")
+ private String splrBatch;
+
+ /**
+ * 鐘舵�� 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 DeliveryItem() {}
+
+ public DeliveryItem(Long deliveryId,String platItemId,String matnrCode,String matnrName,String fieldsIndex,String unit,Double anfme,Double qty,Double nromQty,Double printQty,String splrName,String splrCode,String splrBatch,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+ this.deliveryId = deliveryId;
+ this.platItemId = platItemId;
+ this.matnrCode = matnrCode;
+ this.matnrName = matnrName;
+ this.fieldsIndex = fieldsIndex;
+ this.unit = unit;
+ this.anfme = anfme;
+ this.qty = qty;
+ this.nromQty = nromQty;
+ this.printQty = printQty;
+ this.splrName = splrName;
+ this.splrCode = splrCode;
+ this.splrBatch = splrBatch;
+ this.status = status;
+ this.deleted = deleted;
+ this.tenantId = tenantId;
+ this.createBy = createBy;
+ this.createTime = createTime;
+ this.updateBy = updateBy;
+ this.updateTime = updateTime;
+ this.memo = memo;
+ }
+
+// DeliveryItem deliveryItem = new DeliveryItem(
+// null, // 涓诲崟鏍囪瘑
+// null, // erp鏄庣粏鏍囪瘑
+// null, // 鐗╂枡缂栫爜
+// null, // 鐗╂枡鍚嶇О
+// null, // 鍔ㄦ�佸瓧娈电储寮�
+// null, // 鍗曚綅
+// 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/DeliveryItemMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryItemMapper.java
new file mode 100644
index 0000000..d5a9785
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryItemMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.mapper;
+
+import com.vincent.rsf.server.manager.entity.DeliveryItem;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface DeliveryItemMapper extends BaseMapper<DeliveryItem> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryMapper.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryMapper.java
new file mode 100644
index 0000000..ad6555c
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/mapper/DeliveryMapper.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.mapper;
+
+import com.vincent.rsf.server.manager.entity.Delivery;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface DeliveryMapper extends BaseMapper<Delivery> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryItemService.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryItemService.java
new file mode 100644
index 0000000..5c5ec62
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryItemService.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.DeliveryItem;
+
+public interface DeliveryItemService extends IService<DeliveryItem> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryService.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryService.java
new file mode 100644
index 0000000..e52b4e0
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/DeliveryService.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.Delivery;
+
+public interface DeliveryService extends IService<Delivery> {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryItemServiceImpl.java
new file mode 100644
index 0000000..2e4ae68
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryItemServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.service.impl;
+
+import com.vincent.rsf.server.manager.mapper.DeliveryItemMapper;
+import com.vincent.rsf.server.manager.entity.DeliveryItem;
+import com.vincent.rsf.server.manager.service.DeliveryItemService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("deliveryItemService")
+public class DeliveryItemServiceImpl extends ServiceImpl<DeliveryItemMapper, DeliveryItem> implements DeliveryItemService {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryServiceImpl.java
new file mode 100644
index 0000000..2147d90
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/DeliveryServiceImpl.java
@@ -0,0 +1,12 @@
+package com.vincent.rsf.server.manager.service.impl;
+
+import com.vincent.rsf.server.manager.mapper.DeliveryMapper;
+import com.vincent.rsf.server.manager.entity.Delivery;
+import com.vincent.rsf.server.manager.service.DeliveryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("deliveryService")
+public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> implements DeliveryService {
+
+}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
index 91d0a3e..ee36323 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
@@ -130,8 +130,10 @@
.setCreateBy(userId)
.setMatnrCode(item.getMatnrCode());
AsnOrder order = asnOrderService.getById(item.getAsnId());
- pakinItem.setType(order.getType())
- .setWkType(Short.parseShort(order.getWkType()));
+ if (!Objects.isNull(order)) {
+ pakinItem.setType(null == order.getType() ? null :order.getType())
+ .setWkType(null == order.getWkType() ? null : Short.parseShort(order.getWkType()) );
+ }
for (PakinItem waitPakinItem : waitPakin.getItems()) {
if (waitPakinItem.getTrackCode().equals(item.getTrackCode())) {
if (waitPakinItem.getReceiptQty() > item.getAnfme() || waitPakinItem.getReceiptQty().compareTo(0.0) >= 0) {
diff --git a/rsf-server/src/main/java/delivery.sql b/rsf-server/src/main/java/delivery.sql
new file mode 100644
index 0000000..1a2bd16
--- /dev/null
+++ b/rsf-server/src/main/java/delivery.sql
@@ -0,0 +1,32 @@
+-- save delivery record
+-- mysql
+insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.delivery', '0', '/manager/delivery', 'delivery', '0' , '0', '1' , '1');
+
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:delivery:list', '0', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:delivery:save', '1', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:delivery:update', '2', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:delivery:remove', '3', '1', '1');
+
+-- locale menu name
+delivery: 'Delivery',
+
+-- locale field
+delivery: {
+ code: "code",
+ platId: "platId",
+ type: "type",
+ wkType: "wkType",
+ source: "source",
+ anfme: "anfme",
+ qty: "qty",
+ workQty: "workQty",
+ platCode: "platCode",
+ startTime: "startTime",
+ endTime: "endTime",
+},
+
+-- ResourceContent
+import delivery from './delivery';
+
+case 'delivery':
+ return delivery;
diff --git a/rsf-server/src/main/java/deliveryItem.sql b/rsf-server/src/main/java/deliveryItem.sql
new file mode 100644
index 0000000..7c68f7f
--- /dev/null
+++ b/rsf-server/src/main/java/deliveryItem.sql
@@ -0,0 +1,34 @@
+-- save deliveryItem record
+-- mysql
+insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.deliveryItem', '0', '/manager/deliveryItem', 'deliveryItem', '0' , '0', '1' , '1');
+
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:deliveryItem:list', '0', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:deliveryItem:save', '1', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:deliveryItem:update', '2', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 缁煎悎鍗曟嵁鏄庣粏', '', '1', 'manager:deliveryItem:remove', '3', '1', '1');
+
+-- locale menu name
+deliveryItem: 'DeliveryItem',
+
+-- locale field
+deliveryItem: {
+ deliveryId: "deliveryId",
+ platItemId: "platItemId",
+ matnrCode: "matnrCode",
+ matnrName: "matnrName",
+ fieldsIndex: "fieldsIndex",
+ unit: "unit",
+ anfme: "anfme",
+ qty: "qty",
+ nromQty: "nromQty",
+ printQty: "printQty",
+ splrName: "splrName",
+ splrCode: "splrCode",
+ splrBatch: "splrBatch",
+},
+
+-- ResourceContent
+import deliveryItem from './deliveryItem';
+
+case 'deliveryItem':
+ return deliveryItem;
diff --git a/rsf-server/src/main/resources/application-dev.yml b/rsf-server/src/main/resources/application-dev.yml
index 4908061..efd3d05 100644
--- a/rsf-server/src/main/resources/application-dev.yml
+++ b/rsf-server/src/main/resources/application-dev.yml
@@ -12,10 +12,10 @@
matching-strategy: ANT_PATH_MATCHER
datasource:
driver-class-name: com.mysql.jdbc.Driver
- url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-# username: root
-# url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
- username: rsf
+# url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: root
+ url: jdbc:mysql://127.0.0.1:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: rsf
password: 34821015
type: com.alibaba.druid.pool.DruidDataSource
druid:
diff --git a/rsf-server/src/main/resources/mapper/manager/DeliveryItemMapper.xml b/rsf-server/src/main/resources/mapper/manager/DeliveryItemMapper.xml
new file mode 100644
index 0000000..59e1364
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/manager/DeliveryItemMapper.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.DeliveryItemMapper">
+
+</mapper>
diff --git a/rsf-server/src/main/resources/mapper/manager/DeliveryMapper.xml b/rsf-server/src/main/resources/mapper/manager/DeliveryMapper.xml
new file mode 100644
index 0000000..c3e786c
--- /dev/null
+++ b/rsf-server/src/main/resources/mapper/manager/DeliveryMapper.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.DeliveryMapper">
+
+</mapper>
--
Gitblit v1.9.1