| | |
| | | VITE_BASE_IP=192.168.4.24 |
| | | VITE_BASE_IP=127.0.0.1 |
| | | # VITE_BASE_IP=47.76.147.249 |
| | | VITE_BASE_PORT=8080 |
| | |
| | | fail: "服务器错误", |
| | | dataError: "数据错误,请仔细检查", |
| | | }, |
| | | button: { |
| | | edit: "编辑", |
| | | }, |
| | | field: { |
| | | id: 'ID', |
| | | uuid: '编号', |
| | |
| | | import qlyInspect from './qlyInspect'; |
| | | import qlyIsptItem from './qlyIsptItem'; |
| | | import dictType from './system/dicts/dictType'; |
| | | import dictData from './system/dicts/dictData'; |
| | | // import dictData from './system/dicts/dictData'; |
| | | import companys from './basicInfo/companys'; |
| | | import locType from './basicInfo/locType'; |
| | | import locArea from './basicInfo//locArea'; |
| | | import locAreaMatRela from './basicInfo/locAreaMatRela'; |
| | | import locAreaMat from './basicInfo/locAreaMat'; |
| | | import serialRuleItem from './system/serialRuleItem'; |
| | | // import serialRuleItem from './system/serialRuleItem'; |
| | | import serialRule from './system/serialRule'; |
| | | import whMat from './basicInfo/whMat'; |
| | | import asnOrder from './asnOrder'; |
| | |
| | | return qlyIsptItem; |
| | | case 'dictType': |
| | | return dictType; |
| | | case 'dictData': |
| | | return dictData; |
| | | // case 'dictData': |
| | | // return dictData; |
| | | case 'companys': |
| | | return companys; |
| | | case 'serialRuleItem': |
| | | return serialRuleItem; |
| | | // case 'serialRuleItem': |
| | | // return serialRuleItem; |
| | | case 'serialRule': |
| | | return serialRule; |
| | | case 'whMat': |
| | |
| | | import CustomerTopToolBar from "../../../components/EditTopToolBar"; |
| | | import MemoInput from "../../../components/MemoInput"; |
| | | import StatusSelectInput from "../../../components/StatusSelectInput"; |
| | | import DictDataList from "../dictData/DictDataList"; |
| | | import DictDataEdit from "./DictDataEdit"; |
| | | import DictDataList from "./DictDataList"; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | | return ( |
| | | <Toolbar sx={{ justifyContent: 'space-between' }}> |
| | | <Toolbar sx={{ justifyContent: 'end' }}> |
| | | <SaveButton /> |
| | | <DeleteButton mutationMode="optimistic" /> |
| | | </Toolbar> |
| | |
| | | |
| | | const DictTypeEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | | <> |
| | | <Edit |
| | |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import DictTypeCreate from "./DictTypeCreate"; |
| | | import DictTypePanel from "./DictTypePanel"; |
| | | 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': { |
| | |
| | | <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.dictType.code" />, |
| | | <TextInput source="name" label="table.field.dictType.name" />, |
| | | <TextInput source="description" label="table.field.dictType.description" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | <StyledDatagrid |
| | | preferenceKey='dictType' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | rowClick={'edit'} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <MyField source="code" label="table.field.dictType.code" |
| | | onClick={(event, record, val) => { |
| | | event.stopPropagation(); |
| | | assign(record); |
| | | }} |
| | | <TextField source="code" label="table.field.dictType.code" |
| | | // onClick={(event, record, val) => { |
| | | // event.stopPropagation(); |
| | | // assign(record); |
| | | // }} |
| | | /> |
| | | <TextField source="name" label="table.field.dictType.name" /> |
| | | <TextField source="description" label="table.field.dictType.description" /> |
| | |
| | | export default { |
| | | list: DictTypeList, |
| | | edit: DictTypeEdit, |
| | | show: ShowGuesser, |
| | | // show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.name}` |
| | | } |
| | |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | Button, |
| | | } from "react-admin"; |
| | | import { Box, Typography, Card, Stack } from "@mui/material"; |
| | | import { styled } from "@mui/material/styles"; |
| | |
| | | } from "@/config/setting"; |
| | | import * as Common from "@/utils/common"; |
| | | import CustomerTopToolBar from "../../components/EditTopToolBar"; |
| | | import SerialRuleItemEdit from "./SerialRuleItemEdit"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | "& .css-1vooibu-MuiSvgIcon-root": { |
| | |
| | | const SerialRuleItemList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [editDialog, setEditDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [select, setSelect] = useState({}); |
| | | const ruleId = useGetRecordId(); |
| | | |
| | | return ( |
| | |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.serialRuleItem"} |
| | | empty={ |
| | | <EmptyData |
| | | onClick={() => { |
| | | setCreateDialog(true); |
| | | }} |
| | | /> |
| | | } |
| | | empty={false} |
| | | filters={filters} |
| | | filter={{ ruleId: ruleId }} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | bulkActionButtons={() => ( |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | )} |
| | | rowClick={false} |
| | | rowClick={(id, resource, record) => { |
| | | setSelect(record) |
| | | setEditDialog(true) |
| | | }} |
| | | omit={["id", "createTime", "createBy", "memo"]} |
| | | > |
| | | <NumberField source="id" /> |
| | |
| | | source="sort" |
| | | label="table.field.serialRuleItem.sort" |
| | | /> |
| | | <ReferenceField |
| | | source="updateBy" |
| | | <TextField |
| | | 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" |
| | | <TextField |
| | | source="createBy$" |
| | | label="common.field.createBy" |
| | | reference="user" |
| | | link={false} |
| | | sortable={false} |
| | | > |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | /> |
| | | <DateField |
| | | source="createTime" |
| | | label="common.field.createTime" |
| | |
| | | sortable={false} |
| | | /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: "1px", fontSize: ".75rem" }} /> |
| | | <Button onClick={() => { |
| | | setSelect(re) |
| | | setEditDialog(true) |
| | | }} label={'ra.action.edit'} |
| | | > </Button> |
| | | <DeleteButton |
| | | sx={{ padding: "1px", fontSize: ".75rem" }} |
| | | mutationMode={OPERATE_MODE} |
| | | redirect={'/serialRule/' + ruleId} |
| | | /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <SerialRuleItemCreate open={createDialog} setOpen={setCreateDialog} /> |
| | | <SerialRuleItemEdit open={editDialog} setOpen={setEditDialog} record={select} /> |
| | | <PageDrawer |
| | | title="SerialRuleItem Detail" |
| | | drawerVal={drawerVal} |
| | |
| | | import { Box, Typography, Card, Stack } from "@mui/material"; |
| | | import { styled } from "@mui/material/styles"; |
| | | import SerialRuleCreate from "./SerialRuleCreate"; |
| | | import SerialRuleDetail from "./SerialRuleDetail"; |
| | | import SerialRulePanel from "./SerialRulePanel"; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from "../../components/MyExportButton"; |
| | |
| | | <TextInput source="resetDep" label="table.field.serialRule.resetDep" />, |
| | | <TextInput source="currValue" label="table.field.serialRule.currValue" />, |
| | | <TextInput source="lastCode" label="table.field.serialRule.lastCode" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | label="table.field.serialRule.lastCode" |
| | | /> |
| | | |
| | | <ReferenceField |
| | | source="updateBy" |
| | | <TextField |
| | | 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" |
| | | <TextField |
| | | source="createBy$" |
| | | label="common.field.createBy" |
| | | reference="user" |
| | | link={false} |
| | | sortable={false} |
| | | > |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | /> |
| | | <DateField |
| | | source="createTime" |
| | | label="common.field.createTime" |
| | |
| | | </StyledDatagrid> |
| | | </List> |
| | | <SerialRuleCreate open={createDialog} setOpen={setCreateDialog} /> |
| | | <SerialRuleDetail open={detailDialog} setOpen={setDetailDialog} /> |
| | | {/* <SerialRuleDetail open={detailDialog} setOpen={setDetailDialog} /> */} |
| | | <PageDrawer |
| | | title="SerialRule Detail" |
| | | drawerVal={drawerVal} |