Merge remote-tracking branch 'origin/dev' into dev
24个文件已添加
10 文件已重命名
5 文件已复制
12个文件已删除
4个文件已修改
| | |
| | | loc: 'Loc', |
| | | container: 'Container', |
| | | contract: 'Contract', |
| | | stockItem: 'StockItem', |
| | | qlyInspect: 'QlyInspect', |
| | | dictType: 'DictType', |
| | | dictData: 'DictData', |
| | | companys: 'Companys', |
| | | |
| | | |
| | | |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | name: "Name", |
| | | projectName: "ProjectName", |
| | | }, |
| | | stockItem: { |
| | | stockId: "stockId", |
| | | matnrId: "matnrId", |
| | | qlyInspect: { |
| | | code: "code", |
| | | matnrk: "matnrk", |
| | | anfme: "anfme", |
| | | workQty: "workQty", |
| | | qty: "qty", |
| | | weight: "weight", |
| | | unit: "unit", |
| | | shipperId: "shipperId", |
| | | splrId: "splrId", |
| | | brand: "brand", |
| | | batch: "batch", |
| | | prodTime: "prodTime", |
| | | inspectId: "inspectId", |
| | | splrBtch: "splrBtch", |
| | | asnOrder: "asnOrder", |
| | | erpToken: "erpToken", |
| | | erpOrder: "erpOrder", |
| | | erpStkAdr: "erpStkAdr", |
| | | locId: "locId", |
| | | barcode: "barcode", |
| | | purPrice: "purPrice", |
| | | lockReason: "lockReason", |
| | | lockStatus: "lockStatus", |
| | | locker: "locker", |
| | | lockedTime: "lockedTime", |
| | | name: "name", |
| | | }, |
| | | dictType: { |
| | | name: "name", |
| | | description: "description", |
| | | }, |
| | | dictData: { |
| | | dictTypeId: "dictTypeId", |
| | | dictTypeCode: "dictTypeCode", |
| | | value: "value", |
| | | label: "label", |
| | | sort: "sort", |
| | | color: "color", |
| | | }, |
| | | companys: { |
| | | code: "Code", |
| | | name: "Name", |
| | | nameEn: "NameEn", |
| | | breifCode: "BreifCode", |
| | | type: "Type", |
| | | contact: "Contact", |
| | | tel: "Tel", |
| | | email: "Email", |
| | | pcode: "PCode", |
| | | province: "Province", |
| | | city: "City", |
| | | address: "Address", |
| | | }, |
| | | } |
| | | }, |
| | |
| | | loc: '基础库位', |
| | | container: '容器管理', |
| | | contract: '合同信息', |
| | | stockItem: '库存明细', |
| | | stock: '库存信息', |
| | | qlyInspect: '质检信息', |
| | | dictType: '数据字典', |
| | | dictData: '字典数据集', |
| | | companys: '往来企业', |
| | | |
| | | |
| | | }, |
| | |
| | | name: "名称", |
| | | projectName: "项目名称", |
| | | }, |
| | | stock: { |
| | | asnOrder: "库存单据", |
| | | erpToken: "ERP凭证", |
| | | erpOrder: "ERP单据", |
| | | erpStkAdr: "ERP库存地", |
| | | contractId: "合同标识", |
| | | lockReason: "加锁原因", |
| | | lockStatus: "加载状态", |
| | | locker: "加锁人", |
| | | lockedTime: "加锁时间", |
| | | }, |
| | | stockItem: { |
| | | stockId: "库存标识", |
| | | matnrId: "物料标识", |
| | | code: "物料编码", |
| | | matnrk: "物料名称", |
| | | anfme: "数量", |
| | | workQty: "执行中数量", |
| | | qty: "已完成数量", |
| | | weight: "重量", |
| | | unit: "单位", |
| | | shipperId: "货主", |
| | | splrId: "供应商", |
| | | brand: "品牌", |
| | | batch: "批次", |
| | | prodTime: "生产日期", |
| | | inspectId: "质查标识", |
| | | splrBtch: "供应商批次", |
| | | locId: "库位标识", |
| | | barcode: "容器编码", |
| | | purPrice: "采购价", |
| | | }, |
| | | qlyInspect: { |
| | | code: "编码", |
| | | name: "名称", |
| | | }, |
| | | |
| | | dictType: { |
| | | name: "字典名称", |
| | | description: "内容描述", |
| | | }, |
| | | dictData: { |
| | | dictTypeId: "字典标识", |
| | | dictTypeCode: "字典编码", |
| | | value: "值", |
| | | label: "别名", |
| | | sort: "排序", |
| | | color: "颜色", |
| | | }, |
| | | companys: { |
| | | code: "企业编码", |
| | | name: "名称", |
| | | nameEn: "英文别名", |
| | | breifCode: "助记码", |
| | | type: "类型", |
| | | contact: "联系人", |
| | | tel: "联系电话", |
| | | email: "电子邮件", |
| | | pcode: "邮编", |
| | | province: "省份", |
| | | city: "城市", |
| | | address: "地址", |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | import menu from './system/menu' |
| | | import user from './system/user'; |
| | | import operationRecord from './system/operationRecord'; |
| | | import customer from './customer'; |
| | | import shipper from './basicInfo/shipper'; |
| | | import matnr from './basicInfo/matnr'; |
| | | import matnrGroup from './basicInfo/matnrGroup'; |
| | | import warehouse from './basicInfo/warehouse'; |
| | |
| | | import loc from './loc'; |
| | | import container from './container'; |
| | | import contract from './contract'; |
| | | import stockItem from './stockItem'; |
| | | import stock from './stock'; |
| | | import qlyInspect from './qlyInspect'; |
| | | import dictType from './dictType'; |
| | | import dictData from './dictData'; |
| | | import companys from './basicInfo/companys'; |
| | | |
| | | |
| | | const ResourceContent = (node) => { |
| | |
| | | return user; |
| | | case 'operationRecord': |
| | | return operationRecord; |
| | | case 'customer': |
| | | return customer; |
| | | case 'shipper': |
| | | return shipper; |
| | | case 'matnr': |
| | | return matnr; |
| | | case 'matnrGroup': |
| | |
| | | return container; |
| | | case 'contract': |
| | | return contract; |
| | | case 'stockItem': |
| | | return stockItem; |
| | | case 'stock': |
| | | return stock; |
| | | case 'qlyInspect': |
| | | return qlyInspect; |
| | | case 'dictType': |
| | | return dictType; |
| | | case 'dictData': |
| | | return dictData; |
| | | case 'companys': |
| | | return companys; |
| | | default: |
| | | return { |
| | | list: ListGuesser, |
copy from rsf-admin/src/page/stock/StockCreate.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysCreate.jsx
File was copied from rsf-admin/src/page/stock/StockCreate.jsx |
| | |
| | | Grid, |
| | | Box, |
| | | } from '@mui/material'; |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import DialogCloseButton from "../../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../../components/StatusSelectInput"; |
| | | import MemoInput from "../../components/MemoInput"; |
| | | |
| | | const StockCreate = (props) => { |
| | | const CompanysCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | |
| | | const translate = useTranslate(); |
| | |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.asnOrder" |
| | | source="asnOrder" |
| | | label="table.field.companys.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.companys.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.companys.nameEn" |
| | | source="nameEn" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.companys.breifCode" |
| | | source="breifCode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.companys.type" |
| | | source="type" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpToken" |
| | | source="erpToken" |
| | | label="table.field.companys.contact" |
| | | source="contact" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpOrder" |
| | | source="erpOrder" |
| | | label="table.field.companys.tel" |
| | | source="tel" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpStkAdr" |
| | | source="erpStkAdr" |
| | | label="table.field.companys.email" |
| | | source="email" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.contractId" |
| | | source="contractId" |
| | | label="table.field.companys.pcode" |
| | | source="pcode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.lockReason" |
| | | source="lockReason" |
| | | label="table.field.companys.province" |
| | | source="province" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.stock.lockStatus" |
| | | source="lockStatus" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.locker" |
| | | source="locker" |
| | | label="table.field.companys.city" |
| | | source="city" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.stock.lockedTime" |
| | | source="lockedTime" |
| | | <TextInput |
| | | label="table.field.companys.address" |
| | | source="address" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockCreate; |
| | | export default CompanysCreate; |
copy from rsf-admin/src/page/stock/StockEdit.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysEdit.jsx
File was copied from rsf-admin/src/page/stock/StockEdit.jsx |
| | |
| | | import { Stack, Grid, Box, Typography } from '@mui/material'; |
| | | import * as Common from '@/utils/common'; |
| | | import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting'; |
| | | import EditBaseAside from "../components/EditBaseAside"; |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import EditBaseAside from "../../components/EditBaseAside"; |
| | | import CustomerTopToolBar from "../../components/EditTopToolBar"; |
| | | import MemoInput from "../../components/MemoInput"; |
| | | import StatusSelectInput from "../../components/StatusSelectInput"; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | |
| | | ) |
| | | } |
| | | |
| | | const StockEdit = () => { |
| | | const CompanysEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.asnOrder" |
| | | source="asnOrder" |
| | | label="table.field.companys.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.nameEn" |
| | | source="nameEn" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.breifCode" |
| | | source="breifCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.type" |
| | | source="type" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpToken" |
| | | source="erpToken" |
| | | label="table.field.companys.contact" |
| | | source="contact" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpOrder" |
| | | source="erpOrder" |
| | | label="table.field.companys.tel" |
| | | source="tel" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpStkAdr" |
| | | source="erpStkAdr" |
| | | label="table.field.companys.email" |
| | | source="email" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.contractId" |
| | | source="contractId" |
| | | label="table.field.companys.pcode" |
| | | source="pcode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.lockReason" |
| | | source="lockReason" |
| | | label="table.field.companys.province" |
| | | source="province" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.stock.lockStatus" |
| | | source="lockStatus" |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.locker" |
| | | source="locker" |
| | | label="table.field.companys.city" |
| | | source="city" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.stock.lockedTime" |
| | | source="lockedTime" |
| | | <TextInput |
| | | label="table.field.companys.address" |
| | | source="address" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockEdit; |
| | | export default CompanysEdit; |
File was renamed from rsf-admin/src/page/basicInfo/shipper/ShipperList.jsx |
| | |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import ShipperCreate from "./ShipperCreate"; |
| | | import ShipperPanel from "./ShipperPanel"; |
| | | import EmptyData from "@/page/components/EmptyData"; |
| | | import MyCreateButton from "@/page/components/MyCreateButton"; |
| | | import MyExportButton from '@/page/components/MyExportButton'; |
| | | import PageDrawer from "@/page/components/PageDrawer"; |
| | | import MyField from "@/page/components/MyField"; |
| | | import CompanysCreate from "./CompanysCreate"; |
| | | import CompanysPanel from "./CompanysPanel"; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import MyField from "../../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="uuid" label="table.field.shipper.uuid" />, |
| | | <TextInput source="name" label="table.field.shipper.name" />, |
| | | <TextInput source="code" label="table.field.companys.code" />, |
| | | <TextInput source="name" label="table.field.companys.name" />, |
| | | <TextInput source="nameEn" label="table.field.companys.nameEn" />, |
| | | <TextInput source="breifCode" label="table.field.companys.breifCode" />, |
| | | <TextInput source="type" label="table.field.companys.type" />, |
| | | <TextInput source="contact" label="table.field.companys.contact" />, |
| | | <TextInput source="tel" label="table.field.companys.tel" />, |
| | | <TextInput source="email" label="table.field.companys.email" />, |
| | | <TextInput source="pcode" label="table.field.companys.pcode" />, |
| | | <TextInput source="province" label="table.field.companys.province" />, |
| | | <TextInput source="city" label="table.field.companys.city" />, |
| | | <TextInput source="address" label="table.field.companys.address" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | />, |
| | | ] |
| | | |
| | | const ShipperList = () => { |
| | | const CompanysList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.shipper"} |
| | | title={"menu.companys"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='shipper' /> |
| | | <SelectColumnsButton preferenceKey='companys' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='shipper' |
| | | preferenceKey='companys' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <ShipperPanel />} |
| | | expand={() => <CompanysPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="uuid" label="table.field.shipper.uuid" /> |
| | | <TextField source="name" label="table.field.shipper.name" /> |
| | | <TextField source="code" label="table.field.companys.code" /> |
| | | <TextField source="name" label="table.field.companys.name" /> |
| | | <TextField source="nameEn" label="table.field.companys.nameEn" /> |
| | | <TextField source="breifCode" label="table.field.companys.breifCode" /> |
| | | <TextField source="type" label="table.field.companys.type" /> |
| | | <TextField source="contact" label="table.field.companys.contact" /> |
| | | <TextField source="tel" label="table.field.companys.tel" /> |
| | | <TextField source="email" label="table.field.companys.email" /> |
| | | <TextField source="pcode" label="table.field.companys.pcode" /> |
| | | <TextField source="province" label="table.field.companys.province" /> |
| | | <TextField source="city" label="table.field.companys.city" /> |
| | | <TextField source="address" label="table.field.companys.address" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <ShipperCreate |
| | | <CompanysCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='Shipper Detail' |
| | | title='Companys Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | |
| | | ) |
| | | } |
| | | |
| | | export default ShipperList; |
| | | export default CompanysList; |
copy from rsf-admin/src/page/stock/StockPanel.jsx
copy to rsf-admin/src/page/basicInfo/companys/CompanysPanel.jsx
File was copied from rsf-admin/src/page/stock/StockPanel.jsx |
| | |
| | | useTranslate, |
| | | useRecordContext, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import PanelTypography from "../../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | |
| | | const StockPanel = () => { |
| | | const CompanysPanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.stock.id'))}: {record.id} |
| | | {Common.camelToPascalWithSpaces(translate('table.field.companys.name'))}: {record.name} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.asnOrder" |
| | | property={record.asnOrder} |
| | | title="table.field.companys.code" |
| | | property={record.code} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpToken" |
| | | property={record.erpToken} |
| | | title="table.field.companys.name" |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpOrder" |
| | | property={record.erpOrder} |
| | | title="table.field.companys.nameEn" |
| | | property={record.nameEn} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpStkAdr" |
| | | property={record.erpStkAdr} |
| | | title="table.field.companys.breifCode" |
| | | property={record.breifCode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.contractId" |
| | | property={record.contractId$} |
| | | title="table.field.companys.type" |
| | | property={record.type} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockReason" |
| | | property={record.lockReason} |
| | | title="table.field.companys.contact" |
| | | property={record.contact} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockStatus" |
| | | property={record.lockStatus} |
| | | title="table.field.companys.tel" |
| | | property={record.tel} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.locker" |
| | | property={record.locker} |
| | | title="table.field.companys.email" |
| | | property={record.email} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockedTime" |
| | | property={record.lockedTime$} |
| | | title="table.field.companys.pcode" |
| | | property={record.pcode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.companys.province" |
| | | property={record.province} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.companys.city" |
| | | property={record.city} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.companys.address" |
| | | property={record.address} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default StockPanel; |
| | | export default CompanysPanel; |
File was renamed from rsf-admin/src/page/customer/index.jsx |
| | |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import CustomerList from "./CustomerList"; |
| | | import CustomerEdit from "./CustomerEdit"; |
| | | import CompanysList from "./CompanysList"; |
| | | import CompanysEdit from "./CompanysEdit"; |
| | | |
| | | export default { |
| | | list: CustomerList, |
| | | edit: CustomerEdit, |
| | | list: CompanysList, |
| | | edit: CompanysEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.name}` |
File was renamed from rsf-admin/src/page/stock/StockCreate.jsx |
| | |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | |
| | | const StockCreate = (props) => { |
| | | const DictDataCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | |
| | | const translate = useTranslate(); |
| | |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.asnOrder" |
| | | source="asnOrder" |
| | | label="table.field.dictData.dictTypeId" |
| | | source="dictTypeId" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpToken" |
| | | source="erpToken" |
| | | label="table.field.dictData.dictTypeCode" |
| | | source="dictTypeCode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpOrder" |
| | | source="erpOrder" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpStkAdr" |
| | | source="erpStkAdr" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.contractId" |
| | | source="contractId" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.lockReason" |
| | | source="lockReason" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.stock.lockStatus" |
| | | source="lockStatus" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.locker" |
| | | source="locker" |
| | | label="table.field.dictData.value" |
| | | source="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.stock.lockedTime" |
| | | source="lockedTime" |
| | | <TextInput |
| | | label="table.field.dictData.label" |
| | | source="label" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.dictData.sort" |
| | | source="sort" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictData.color" |
| | | source="color" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockCreate; |
| | | export default DictDataCreate; |
File was renamed from rsf-admin/src/page/stock/StockEdit.jsx |
| | |
| | | ) |
| | | } |
| | | |
| | | const StockEdit = () => { |
| | | const DictDataEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.asnOrder" |
| | | source="asnOrder" |
| | | label="table.field.dictData.dictTypeId" |
| | | source="dictTypeId" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpToken" |
| | | source="erpToken" |
| | | label="table.field.dictData.dictTypeCode" |
| | | source="dictTypeCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpOrder" |
| | | source="erpOrder" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpStkAdr" |
| | | source="erpStkAdr" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.contractId" |
| | | source="contractId" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.lockReason" |
| | | source="lockReason" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.stock.lockStatus" |
| | | source="lockStatus" |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.locker" |
| | | source="locker" |
| | | label="table.field.dictData.value" |
| | | source="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.stock.lockedTime" |
| | | source="lockedTime" |
| | | <TextInput |
| | | label="table.field.dictData.label" |
| | | source="label" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.dictData.sort" |
| | | source="sort" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.dictData.color" |
| | | source="color" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockEdit; |
| | | export default DictDataEdit; |
copy from rsf-admin/src/page/customer/CustomerList.jsx
copy to rsf-admin/src/page/dictData/DictDataList.jsx
File was copied from rsf-admin/src/page/customer/CustomerList.jsx |
| | |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import CustomerCreate from "./CustomerCreate"; |
| | | import CustomerPanel from "./CustomerPanel"; |
| | | import DictDataCreate from "./DictDataCreate"; |
| | | import DictDataPanel from "./DictDataPanel"; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="uuid" label="table.field.customer.uuid" />, |
| | | <TextInput source="name" label="table.field.customer.name" />, |
| | | <TextInput source="dictTypeId" label="table.field.dictData.dictTypeId" />, |
| | | <TextInput source="dictTypeCode" label="table.field.dictData.dictTypeCode" />, |
| | | <TextInput source="value" label="table.field.dictData.value" />, |
| | | <TextInput source="label" label="table.field.dictData.label" />, |
| | | <NumberInput source="sort" label="table.field.dictData.sort" />, |
| | | <TextInput source="color" label="table.field.dictData.color" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | />, |
| | | ] |
| | | |
| | | const CustomerList = () => { |
| | | const DictDataList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.customer"} |
| | | title={"menu.dictData"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='customer' /> |
| | | <SelectColumnsButton preferenceKey='dictData' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='customer' |
| | | preferenceKey='dictData' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <CustomerPanel />} |
| | | expand={() => <DictDataPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="uuid" label="table.field.customer.uuid" /> |
| | | <TextField source="name" label="table.field.customer.name" /> |
| | | <TextField source="dictTypeId" label="table.field.dictData.dictTypeId" /> |
| | | <TextField source="dictTypeCode" label="table.field.dictData.dictTypeCode" /> |
| | | <TextField source="value" label="table.field.dictData.value" /> |
| | | <TextField source="label" label="table.field.dictData.label" /> |
| | | <NumberField source="sort" label="table.field.dictData.sort" /> |
| | | <TextField source="color" label="table.field.dictData.color" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <CustomerCreate |
| | | <DictDataCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='Customer Detail' |
| | | title='DictData Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | |
| | | ) |
| | | } |
| | | |
| | | export default CustomerList; |
| | | export default DictDataList; |
File was renamed from rsf-admin/src/page/stock/StockPanel.jsx |
| | |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | |
| | | const StockPanel = () => { |
| | | const DictDataPanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.stock.id'))}: {record.id} |
| | | {Common.camelToPascalWithSpaces(translate('table.field.dictData.id'))}: {record.id} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.asnOrder" |
| | | property={record.asnOrder} |
| | | title="table.field.dictData.dictTypeId" |
| | | property={record.dictTypeId$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpToken" |
| | | property={record.erpToken} |
| | | title="table.field.dictData.dictTypeCode" |
| | | property={record.dictTypeCode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpOrder" |
| | | property={record.erpOrder} |
| | | title="table.field.dictData.value" |
| | | property={record.value} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpStkAdr" |
| | | property={record.erpStkAdr} |
| | | title="table.field.dictData.label" |
| | | property={record.label} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.contractId" |
| | | property={record.contractId$} |
| | | title="table.field.dictData.sort" |
| | | property={record.sort} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockReason" |
| | | property={record.lockReason} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockStatus" |
| | | property={record.lockStatus} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.locker" |
| | | property={record.locker} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockedTime" |
| | | property={record.lockedTime$} |
| | | title="table.field.dictData.color" |
| | | property={record.color} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default StockPanel; |
| | | export default DictDataPanel; |
File was renamed from rsf-admin/src/page/stock/index.jsx |
| | |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import StockList from "./StockList"; |
| | | import StockEdit from "./StockEdit"; |
| | | import DictDataList from "./DictDataList"; |
| | | import DictDataEdit from "./DictDataEdit"; |
| | | |
| | | export default { |
| | | list: StockList, |
| | | edit: StockEdit, |
| | | list: DictDataList, |
| | | edit: DictDataEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
File was renamed from rsf-admin/src/page/customer/CustomerCreate.jsx |
| | |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | |
| | | const CustomerCreate = (props) => { |
| | | const DictTypeCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | |
| | | const translate = useTranslate(); |
| | |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.customer.uuid" |
| | | source="uuid" |
| | | label="table.field.dictType.name" |
| | | source="name" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.customer.name" |
| | | source="name" |
| | | label="table.field.dictType.description" |
| | | source="description" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | |
| | | ) |
| | | } |
| | | |
| | | export default CustomerCreate; |
| | | export default DictTypeCreate; |
File was renamed from rsf-admin/src/page/customer/CustomerEdit.jsx |
| | |
| | | ) |
| | | } |
| | | |
| | | const CustomerEdit = () => { |
| | | const DictTypeEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.customer.uuid" |
| | | source="uuid" |
| | | label="table.field.dictType.name" |
| | | source="name" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.customer.name" |
| | | source="name" |
| | | label="table.field.dictType.description" |
| | | source="description" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | |
| | | ) |
| | | } |
| | | |
| | | export default CustomerEdit; |
| | | export default DictTypeEdit; |
File was renamed from rsf-admin/src/page/customer/CustomerList.jsx |
| | |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import CustomerCreate from "./CustomerCreate"; |
| | | import CustomerPanel from "./CustomerPanel"; |
| | | import DictTypeCreate from "./DictTypeCreate"; |
| | | import DictTypePanel from "./DictTypePanel"; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="uuid" label="table.field.customer.uuid" />, |
| | | <TextInput source="name" label="table.field.customer.name" />, |
| | | <TextInput source="uuid" label="table.field.dictType.uuid" />, |
| | | <TextInput source="name" label="table.field.dictType.name" />, |
| | | <TextInput source="description" label="table.field.dictType.description" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | />, |
| | | ] |
| | | |
| | | const CustomerList = () => { |
| | | const DictTypeList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.customer"} |
| | | title={"menu.dictType"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='customer' /> |
| | | <SelectColumnsButton preferenceKey='dictType' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='customer' |
| | | preferenceKey='dictType' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <CustomerPanel />} |
| | | expand={() => <DictTypePanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="uuid" label="table.field.customer.uuid" /> |
| | | <TextField source="name" label="table.field.customer.name" /> |
| | | <TextField source="name" label="table.field.dictType.name" /> |
| | | <TextField source="description" label="table.field.dictType.description" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <CustomerCreate |
| | | <DictTypeCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='Customer Detail' |
| | | title='DictType Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | |
| | | ) |
| | | } |
| | | |
| | | export default CustomerList; |
| | | export default DictTypeList; |
File was renamed from rsf-admin/src/page/customer/CustomerPanel.jsx |
| | |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | |
| | | const CustomerPanel = () => { |
| | | const DictTypePanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.customer.name'))}: {record.name} |
| | | {Common.camelToPascalWithSpaces(translate('table.field.dictType.name'))}: {record.name} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.customer.uuid" |
| | | property={record.uuid} |
| | | title="table.field.dictType.name" |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.customer.name" |
| | | property={record.name} |
| | | title="table.field.dictType.description" |
| | | property={record.description} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default CustomerPanel; |
| | | export default DictTypePanel; |
copy from rsf-admin/src/page/customer/index.jsx
copy to rsf-admin/src/page/dictType/index.jsx
File was copied from rsf-admin/src/page/customer/index.jsx |
| | |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import CustomerList from "./CustomerList"; |
| | | import CustomerEdit from "./CustomerEdit"; |
| | | import DictTypeList from "./DictTypeList"; |
| | | import DictTypeEdit from "./DictTypeEdit"; |
| | | |
| | | export default { |
| | | list: CustomerList, |
| | | edit: CustomerEdit, |
| | | list: DictTypeList, |
| | | edit: DictTypeEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.name}` |
| | |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="man_"; |
| | | generator.tableDesc="质检信息"; |
| | | generator.table="man_companys"; |
| | | generator.tableDesc="字典数据集"; |
| | | generator.packagePath="com.vincent.rsf.server.manager"; |
| | | |
| | | generator.build(); |
New file |
| | |
| | | package com.vincent.rsf.server.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.manager.entity.Companys; |
| | | import com.vincent.rsf.server.manager.service.CompanysService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class CompanysController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompanysService companysService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:list')") |
| | | @PostMapping("/companys/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Companys, BaseParam> pageParam = new PageParam<>(baseParam, Companys.class); |
| | | return R.ok().add(companysService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:list')") |
| | | @PostMapping("/companys/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(companysService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:list')") |
| | | @PostMapping({"/companys/many/{ids}", "/companyss/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(companysService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:list')") |
| | | @GetMapping("/companys/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(companysService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:save')") |
| | | @OperationLog("Create 字典数据集") |
| | | @PostMapping("/companys/save") |
| | | public R save(@RequestBody Companys companys) { |
| | | companys.setCreateBy(getLoginUserId()); |
| | | companys.setCreateTime(new Date()); |
| | | companys.setUpdateBy(getLoginUserId()); |
| | | companys.setUpdateTime(new Date()); |
| | | if (!companysService.save(companys)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(companys); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:update')") |
| | | @OperationLog("Update 字典数据集") |
| | | @PostMapping("/companys/update") |
| | | public R update(@RequestBody Companys companys) { |
| | | companys.setUpdateBy(getLoginUserId()); |
| | | companys.setUpdateTime(new Date()); |
| | | if (!companysService.updateById(companys)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(companys); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:remove')") |
| | | @OperationLog("Delete 字典数据集") |
| | | @PostMapping("/companys/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!companysService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:list')") |
| | | @PostMapping("/companys/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<Companys> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(Companys::getName, condition); |
| | | } |
| | | companysService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getName())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:companys:list')") |
| | | @PostMapping("/companys/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(companysService.list(), Companys.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_companys") |
| | | public class Companys implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String code; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 英文别名 |
| | | */ |
| | | @ApiModelProperty(value= "英文别名") |
| | | private String nameEn; |
| | | |
| | | /** |
| | | * 助记码 |
| | | */ |
| | | @ApiModelProperty(value= "助记码") |
| | | private String breifCode; |
| | | |
| | | /** |
| | | * 帐号类型:shipper:货主,customer:客户,supplier:供应商 |
| | | */ |
| | | @ApiModelProperty(value= "帐号类型:shipper:货主,customer:客户,supplier:供应商") |
| | | private String type; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @ApiModelProperty(value= "联系人") |
| | | private String contact; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value= "联系电话") |
| | | private String tel; |
| | | |
| | | /** |
| | | * 邮箱 |
| | | */ |
| | | @ApiModelProperty(value= "邮箱") |
| | | private String email; |
| | | |
| | | /** |
| | | * 邮件编码 |
| | | */ |
| | | @ApiModelProperty(value= "邮件编码") |
| | | private String pcode; |
| | | |
| | | /** |
| | | * 省份 |
| | | */ |
| | | @ApiModelProperty(value= "省份") |
| | | private String province; |
| | | |
| | | /** |
| | | * 城市 |
| | | */ |
| | | @ApiModelProperty(value= "城市") |
| | | private String city; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @ApiModelProperty(value= "地址") |
| | | private String address; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public Companys() {} |
| | | |
| | | public Companys(String code,String name,String nameEn,String breifCode,String type,String contact,String tel,String email,String pcode,String province,String city,String address,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.code = code; |
| | | this.name = name; |
| | | this.nameEn = nameEn; |
| | | this.breifCode = breifCode; |
| | | this.type = type; |
| | | this.contact = contact; |
| | | this.tel = tel; |
| | | this.email = email; |
| | | this.pcode = pcode; |
| | | this.province = province; |
| | | this.city = city; |
| | | this.address = address; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // Companys companys = new Companys( |
| | | // null, // 编号 |
| | | // null, // 名称 |
| | | // null, // 英文别名 |
| | | // null, // 助记码 |
| | | // null, // 帐号类型:shipper:货主,customer:客户,supplier:供应商[非空] |
| | | // null, // 联系人 |
| | | // null, // 联系电话 |
| | | // null, // 邮箱 |
| | | // null, // 邮件编码 |
| | | // null, // 省份 |
| | | // null, // 城市 |
| | | // null, // 地址 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.mapper; |
| | | |
| | | import com.vincent.rsf.server.manager.entity.Companys; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface CompanysMapper extends BaseMapper<Companys> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.manager.entity.Companys; |
| | | |
| | | public interface CompanysService extends IService<Companys> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.vincent.rsf.server.manager.mapper.CompanysMapper; |
| | | import com.vincent.rsf.server.manager.entity.Companys; |
| | | import com.vincent.rsf.server.manager.service.CompanysService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("companysService") |
| | | public class CompanysServiceImpl extends ServiceImpl<CompanysMapper, Companys> implements CompanysService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.vincent.rsf.server.system.service.DictDataService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class DictDataController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DictDataService dictDataService; |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DictData, BaseParam> pageParam = new PageParam<>(baseParam, DictData.class); |
| | | return R.ok().add(dictDataService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(dictDataService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping({"/dictData/many/{ids}", "/dictDatas/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(dictDataService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @GetMapping("/dictData/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(dictDataService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:save')") |
| | | @OperationLog("Create 字典数据集") |
| | | @PostMapping("/dictData/save") |
| | | public R save(@RequestBody DictData dictData) { |
| | | dictData.setCreateBy(getLoginUserId()); |
| | | dictData.setCreateTime(new Date()); |
| | | dictData.setUpdateBy(getLoginUserId()); |
| | | dictData.setUpdateTime(new Date()); |
| | | if (!dictDataService.save(dictData)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(dictData); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:update')") |
| | | @OperationLog("Update 字典数据集") |
| | | @PostMapping("/dictData/update") |
| | | public R update(@RequestBody DictData dictData) { |
| | | dictData.setUpdateBy(getLoginUserId()); |
| | | dictData.setUpdateTime(new Date()); |
| | | if (!dictDataService.updateById(dictData)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(dictData); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:remove')") |
| | | @OperationLog("Delete 字典数据集") |
| | | @PostMapping("/dictData/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!dictDataService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<DictData> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(DictData::getId, condition); |
| | | } |
| | | dictDataService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(dictDataService.list(), DictData.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | import com.vincent.rsf.server.system.service.DictTypeService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class DictTypeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DictTypeService dictTypeService; |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DictType, BaseParam> pageParam = new PageParam<>(baseParam, DictType.class); |
| | | return R.ok().add(dictTypeService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(dictTypeService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping({"/dictType/many/{ids}", "/dictTypes/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(dictTypeService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @GetMapping("/dictType/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(dictTypeService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:save')") |
| | | @OperationLog("Create 数据字典") |
| | | @PostMapping("/dictType/save") |
| | | public R save(@RequestBody DictType dictType) { |
| | | dictType.setCreateBy(getLoginUserId()); |
| | | dictType.setCreateTime(new Date()); |
| | | dictType.setUpdateBy(getLoginUserId()); |
| | | dictType.setUpdateTime(new Date()); |
| | | if (!dictTypeService.save(dictType)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(dictType); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:update')") |
| | | @OperationLog("Update 数据字典") |
| | | @PostMapping("/dictType/update") |
| | | public R update(@RequestBody DictType dictType) { |
| | | dictType.setUpdateBy(getLoginUserId()); |
| | | dictType.setUpdateTime(new Date()); |
| | | if (!dictTypeService.updateById(dictType)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(dictType); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:remove')") |
| | | @OperationLog("Delete 数据字典") |
| | | @PostMapping("/dictType/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!dictTypeService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<DictType> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(DictType::getName, condition); |
| | | } |
| | | dictTypeService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getName())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(dictTypeService.list(), DictType.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.vincent.rsf.server.system.service.DictTypeService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("sys_dict_data") |
| | | public class DictData implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 字典ID |
| | | */ |
| | | @ApiModelProperty(value= "字典ID") |
| | | private String dictTypeId; |
| | | |
| | | /** |
| | | * 字典识别码 |
| | | */ |
| | | @ApiModelProperty(value= "字典识别码") |
| | | private String dictTypeCode; |
| | | |
| | | /** |
| | | * 值 |
| | | */ |
| | | @ApiModelProperty(value= "值") |
| | | private String value; |
| | | |
| | | /** |
| | | * 标签 |
| | | */ |
| | | @ApiModelProperty(value= "标签") |
| | | private String label; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value= "排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5) |
| | | */ |
| | | @ApiModelProperty(value= "颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5)") |
| | | private String color; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public DictData() {} |
| | | |
| | | public DictData(String dictTypeId,String dictTypeCode,String value,String label,Integer sort,String color,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.dictTypeId = dictTypeId; |
| | | this.dictTypeCode = dictTypeCode; |
| | | this.value = value; |
| | | this.label = label; |
| | | this.sort = sort; |
| | | this.color = color; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // DictData dictData = new DictData( |
| | | // null, // 字典ID[非空] |
| | | // null, // 字典识别码[非空] |
| | | // null, // 值[非空] |
| | | // null, // 标签[非空] |
| | | // null, // 排序 |
| | | // null, // 颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5) |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getDictTypeId$(){ |
| | | DictTypeService service = SpringUtils.getBean(DictTypeService.class); |
| | | DictType dictType = service.getById(this.dictTypeId); |
| | | if (!Cools.isEmpty(dictType)){ |
| | | return String.valueOf(dictType.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("sys_dict_type") |
| | | public class DictType implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @ApiModelProperty(value= "描述") |
| | | private String description; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 租户 |
| | | */ |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public DictType() {} |
| | | |
| | | public DictType(String uuid,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | this.name = name; |
| | | this.description = description; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // DictType dictType = new DictType( |
| | | // null, // 编号 |
| | | // null, // 名称 |
| | | // null, // 描述 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.mapper; |
| | | |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface DictDataMapper extends BaseMapper<DictData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.mapper; |
| | | |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface DictTypeMapper extends BaseMapper<DictType> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | |
| | | public interface DictDataService extends IService<DictData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | |
| | | public interface DictTypeService extends IService<DictType> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service.impl; |
| | | |
| | | import com.vincent.rsf.server.system.mapper.DictDataMapper; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.vincent.rsf.server.system.service.DictDataService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("dictDataService") |
| | | public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> implements DictDataService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service.impl; |
| | | |
| | | import com.vincent.rsf.server.system.mapper.DictTypeMapper; |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | import com.vincent.rsf.server.system.service.DictTypeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("dictTypeService") |
| | | public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> implements DictTypeService { |
| | | |
| | | } |
New file |
| | |
| | | -- save companys record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.companys', '0', '/manager/companys', 'companys', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 字典数据集', '', '1', 'manager:companys:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 字典数据集', '', '1', 'manager:companys:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 字典数据集', '', '1', 'manager:companys:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 字典数据集', '', '1', 'manager:companys:remove', '3', '1', '1'); |
| | | |
| | | -- locale menu name |
| | | companys: 'Companys', |
| | | |
| | | -- locale field |
| | | companys: { |
| | | code: "code", |
| | | name: "name", |
| | | nameEn: "nameEn", |
| | | breifCode: "breifCode", |
| | | type: "type", |
| | | contact: "contact", |
| | | tel: "tel", |
| | | email: "email", |
| | | pcode: "pcode", |
| | | province: "province", |
| | | city: "city", |
| | | address: "address", |
| | | }, |
| | | |
| | | -- ResourceContent |
| | | import companys from './companys'; |
| | | |
| | | case 'companys': |
| | | return companys; |
New file |
| | |
| | | -- save dictData record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.dictData', '0', '/system/dictData', 'dictData', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 字典数据集', '113', '1', 'system:dictData:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 字典数据集', '113', '1', 'system:dictData:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 字典数据集', '113', '1', 'system:dictData:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 字典数据集', '113', '1', 'system:dictData:remove', '3', '1', '1'); |
| | | |
| | | -- locale menu name |
| | | dictData: 'DictData', |
| | | |
| | | -- locale field |
| | | dictData: { |
| | | dictTypeId: "dictTypeId", |
| | | dictTypeCode: "dictTypeCode", |
| | | value: "value", |
| | | label: "label", |
| | | sort: "sort", |
| | | color: "color", |
| | | }, |
| | | |
| | | -- ResourceContent |
| | | import dictData from './dictData'; |
| | | |
| | | case 'dictData': |
| | | return dictData; |
New file |
| | |
| | | -- save dictType record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.dictType', '0', '/system/dictType', 'dictType', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 数据字典', '108', '1', 'system:dictType:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 数据字典', '108', '1', 'system:dictType:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 数据字典', '108', '1', 'system:dictType:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 数据字典', '108', '1', 'system:dictType:remove', '3', '1', '1'); |
| | | |
| | | -- locale menu name |
| | | dictType: 'DictType', |
| | | |
| | | -- locale field |
| | | dictType: { |
| | | uuid: "uuid", |
| | | name: "name", |
| | | description: "description", |
| | | }, |
| | | |
| | | -- ResourceContent |
| | | import dictType from './dictType'; |
| | | |
| | | case 'dictType': |
| | | return dictType; |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.CompanysMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.manager.mapper.DictTypeMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.system.mapper.DictDataMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vincent.rsf.server.system.mapper.DictTypeMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | /* |
| | | Navicat Premium Data Transfer |
| | | |
| | | Source Server : localhost |
| | | Source Server Type : MySQL |
| | | Source Server Version : 80011 (8.0.11) |
| | | Source Host : localhost:3306 |
| | | Source Schema : fortec-bm |
| | | |
| | | Target Server Type : MySQL |
| | | Target Server Version : 80011 (8.0.11) |
| | | File Encoding : 65001 |
| | | |
| | | Date: 24/02/2025 08:45:02 |
| | | */ |
| | | |
| | | SET NAMES utf8mb4; |
| | | SET FOREIGN_KEY_CHECKS = 0; |
| | | |
| | | -- ---------------------------- |
| | | -- Table structure for sys_dict_data |
| | | -- ---------------------------- |
| | | DROP TABLE IF EXISTS `sys_dict_data`; |
| | | CREATE TABLE `sys_dict_data` ( |
| | | `id` bigint(20) NOT NULL COMMENT 'id', |
| | | `dict_type_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典ID', |
| | | `dict_type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典识别码', |
| | | `value` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '值', |
| | | `label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标签', |
| | | `sort` int(11) DEFAULT NULL COMMENT '排序', |
| | | `color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5)', |
| | | `creator` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'creator', |
| | | `gmt_create` datetime DEFAULT NULL COMMENT 'gmt_create', |
| | | `modifier` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'modifier', |
| | | `gmt_modified` datetime DEFAULT NULL COMMENT 'gmt_modified', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | KEY `IX__value` (`value`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典字段表'; |
| | | |
| | | SET FOREIGN_KEY_CHECKS = 1; |
New file |
| | |
| | | /* |
| | | Navicat Premium Data Transfer |
| | | |
| | | Source Server : localhost |
| | | Source Server Type : MySQL |
| | | Source Server Version : 80011 (8.0.11) |
| | | Source Host : localhost:3306 |
| | | Source Schema : fortec-bm |
| | | |
| | | Target Server Type : MySQL |
| | | Target Server Version : 80011 (8.0.11) |
| | | File Encoding : 65001 |
| | | |
| | | Date: 24/02/2025 08:45:14 |
| | | */ |
| | | |
| | | SET NAMES utf8mb4; |
| | | SET FOREIGN_KEY_CHECKS = 0; |
| | | |
| | | -- ---------------------------- |
| | | -- Table structure for sys_dict_type |
| | | -- ---------------------------- |
| | | DROP TABLE IF EXISTS `sys_dict_type`; |
| | | CREATE TABLE `sys_dict_type` ( |
| | | `id` bigint(20) NOT NULL COMMENT 'id', |
| | | `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '识别码', |
| | | `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称', |
| | | `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述', |
| | | `creator` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'creator', |
| | | `gmt_create` datetime DEFAULT NULL COMMENT 'gmt_create', |
| | | `modifier` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'modifier', |
| | | `gmt_modified` datetime DEFAULT NULL COMMENT 'gmt_modified', |
| | | PRIMARY KEY (`id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典表'; |
| | | |
| | | SET FOREIGN_KEY_CHECKS = 1; |