Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
| | |
| | | import: "导入", |
| | | list: "列表", |
| | | refresh: "刷新", |
| | | remove_filter: "Remove this filter", |
| | | remove_filter: "移除这个过滤器", |
| | | remove_all_filters: "移除所有", |
| | | remove: "移除", |
| | | save: "保存", |
| | |
| | | move_up: "Move up", |
| | | move_down: "Move down", |
| | | open: "Open", |
| | | toggle_theme: "Toggle light/dark mode", |
| | | toggle_theme: "浅色/深色", |
| | | select_columns: "筛选列", |
| | | update_application: "Reload Application", |
| | | }, |
| | |
| | | password: "Password", |
| | | sign_in: "Sign in", |
| | | sign_in_error: "Authentication failed, please retry", |
| | | logout: "Logout", |
| | | logout: "注销", |
| | | }, |
| | | notification: { |
| | | updated: "修改成功 |||| %{smart_count} 项 修改成功", |
| | |
| | | const FormToolbar = () => { |
| | | return ( |
| | | <Toolbar sx={{ justifyContent: 'end' }}> |
| | | <SaveButton /> |
| | | <></> |
| | | </Toolbar> |
| | | ) |
| | | } |
| | |
| | | // validate={(values) => { }} |
| | | > |
| | | <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> |
| | | <Grid item xs={24} md={12}> |
| | | <Grid item xs={24} md={12} sx={{ |
| | | "& .MuiFormLabel-root.MuiInputLabel-root.Mui-disabled":{ |
| | | bgcolor : 'white', |
| | | WebkitTextFillColor: "rgba(0, 0, 0)" |
| | | }, |
| | | |
| | | "& .MuiInputBase-input.MuiFilledInput-input.Mui-disabled":{ |
| | | bgcolor : 'white', |
| | | WebkitTextFillColor: "rgba(0, 0, 0)" |
| | | } |
| | | }}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | disableUnderline |
| | | label="table.field.asnOrderLog.code" |
| | | source="code" |
| | | parse={v => v} |
| | |
| | | /> |
| | | <TextInput |
| | | label="table.field.asnOrderLog.type" |
| | | source="type" |
| | | source="type$" |
| | | readOnly |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | <TextInput |
| | | label="table.field.asnOrderLog.wkType" |
| | | source="wkType" |
| | | source="wkType$" |
| | | readOnly |
| | | parse={v => v} |
| | | validate={required()} |
New file |
| | |
| | | import { BooleanField, DateField, NumberField, ReferenceField, Show, SimpleShowLayout, TextField ,DateInput, |
| | | SelectInput,required,useTranslate, |
| | | useRecordContext,} from 'react-admin'; |
| | | import { Stack, Grid, Box, Typography, Card } from '@mui/material'; |
| | | import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting'; |
| | | import EditBaseAside from "../../components/EditBaseAside"; |
| | | import CustomerTopToolBar from "../../components/EditTopToolBar"; |
| | | import AsnOrderItemLogList from "./AsnOrderItemLogList" |
| | | |
| | | |
| | | const Aa = () =>{ |
| | | const translate = useTranslate(); |
| | | |
| | | return( |
| | | <> |
| | | <Show |
| | | redirect="list" |
| | | mutationMode={EDIT_MODE} |
| | | actions={<CustomerTopToolBar />} |
| | | aside={<EditBaseAside />} |
| | | > |
| | | <SimpleShowLayout |
| | | shouldUnregister |
| | | warnWhenUnsavedChanges |
| | | |
| | | mode="onTouched" |
| | | defaultValues={{}} |
| | | > |
| | | |
| | | <Grid sx={{ |
| | | "& .MuiInputBase-input": { |
| | | bgcolor: "white" |
| | | } |
| | | }} container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> |
| | | |
| | | <Grid item xs={24} md={12}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack display="flax" justifyContent="space-between" flexWrap="wrap" direction='row' gap={2} > |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" > |
| | | {translate('table.field.asnOrderLog.code')} |
| | | </Typography> |
| | | <TextField source="code" label="id"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.poCode')} |
| | | </Typography> |
| | | <TextField source="poCode" label="poCode"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.poId')} |
| | | </Typography> |
| | | <NumberField source="poId" label="poId"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.type')} |
| | | </Typography> |
| | | <TextField source="type$" label="type"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.wkType')} |
| | | </Typography> |
| | | <TextField source="wkType$" label="type"/> |
| | | </Box> |
| | | </Grid> |
| | | |
| | | </Stack> |
| | | <Stack display="flax" justifyContent="space-between" flexWrap="wrap" direction='row' gap={2} sx={{mt:5 }}> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.anfme')} |
| | | </Typography> |
| | | <TextField source="anfme" label="id"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.qty')} |
| | | </Typography> |
| | | <TextField source="qty" label="poCode"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.logisNo')} |
| | | </Typography> |
| | | <NumberField source="logisNo" label="poId"/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.arrTime')} |
| | | </Typography> |
| | | <DateField source="arrTime" label="type" showTime/> |
| | | </Box> |
| | | </Grid> |
| | | <Grid item display="flex" gap={1} minWidth={150}> |
| | | <Box flexGrow={1}> |
| | | <Typography variant="body2" sx={{fontSize: 20}}> |
| | | {translate('table.field.asnOrderLog.ntyStatus')} |
| | | </Typography> |
| | | <TextField source="ntyStatus$" label="type"/> |
| | | </Box> |
| | | </Grid> |
| | | </Stack> |
| | | </Grid> |
| | | </Grid> |
| | | |
| | | </SimpleShowLayout> |
| | | </Show> |
| | | <Grid item xs={24} md={16} sx={{ marginTop: '1em' }}> |
| | | <Typography variant="h6" gutterBottom > |
| | | {translate('common.edit.title.common')} |
| | | </Typography> |
| | | </Grid> |
| | | <AsnOrderItemLogList /> |
| | | </> |
| | | |
| | | ); |
| | | } |
| | | |
| | | const AsnorderlogShow = () => ( |
| | | |
| | | <Aa /> |
| | | |
| | | |
| | | |
| | | ); |
| | | |
| | | export default AsnorderlogShow |
| | |
| | | |
| | | import AsnOrderLogList from "./AsnOrderLogList"; |
| | | import AsnOrderLogEdit from "./AsnOrderLogEdit"; |
| | | import AsnorderlogShow from "./AsnOrderLogShow"; |
| | | |
| | | export default { |
| | | list: AsnOrderLogList, |
| | | edit: AsnOrderLogEdit, |
| | | show: ShowGuesser, |
| | | show: AsnorderlogShow, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
| | | } |
| | |
| | | TableCell, |
| | | Tooltip, |
| | | IconButton, |
| | | styled |
| | | styled, |
| | | Select, |
| | | MenuItem |
| | | |
| | | |
| | | } from '@mui/material'; |
| | |
| | | import { DataGrid, useGridApiRef } from '@mui/x-data-grid'; |
| | | import DictionarySelect from "../../components/DictionarySelect"; |
| | | import DictSelect from "../../components/DictSelect"; |
| | | import "./asnOrder.css"; |
| | | |
| | | const AsnOrderModal = (props) => { |
| | | const { open, setOpen, asnId, billReload } = props; |
| | |
| | | |
| | | export default AsnOrderModal; |
| | | |
| | | const SelectInputSplrNameEditCell = (params) => { |
| | | const [formData, setFormData] = useState([{}]) |
| | | useEffect(() => { |
| | | getOptions(); |
| | | }, []); |
| | | const getOptions = async () => { |
| | | const parmas = { |
| | | } |
| | | const { |
| | | data: { code, data, msg }, |
| | | } = await request.post("companys/page",parmas); |
| | | if (code === 200) { |
| | | setFormData(data.records) |
| | | console.log(data.records) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <Select |
| | | value={params.value} |
| | | onChange={(e) => |
| | | params.api.setEditCellValue({ |
| | | id: params.id, |
| | | field: params.field, |
| | | value: e.target.value, |
| | | }) |
| | | } |
| | | fullWidth |
| | | autoFocus |
| | | > |
| | | {formData.map(e => { |
| | | return( |
| | | <MenuItem value={e.name} children={e.name} /> |
| | | ); |
| | | |
| | | })} |
| | | |
| | | </Select> |
| | | ); |
| | | }; |
| | | |
| | | const SelectInputSplrCodeEditCell = (params) => { |
| | | const [formData, setFormData] = useState([{}]) |
| | | useEffect(() => { |
| | | getOptions(); |
| | | }, []); |
| | | const getOptions = async () => { |
| | | const parmas = { |
| | | } |
| | | const { |
| | | data: { code, data, msg }, |
| | | } = await request.post("companys/page",parmas); |
| | | if (code === 200) { |
| | | setFormData(data.records) |
| | | console.log(data.records) |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <Select |
| | | value={params.value} |
| | | onChange={(e) => |
| | | params.api.setEditCellValue({ |
| | | id: params.id, |
| | | field: params.field, |
| | | value: e.target.value, |
| | | }) |
| | | } |
| | | fullWidth |
| | | autoFocus |
| | | > |
| | | {formData.map(e => { |
| | | return( |
| | | <MenuItem value={e.id} children={e.name} /> |
| | | ); |
| | | |
| | | })} |
| | | |
| | | </Select> |
| | | ); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | const AsnOrderModalTable = ({ tabelData, setTableData, asnId, selectedRows, setSelectedRows, tableRef }) => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | |
| | | }, |
| | | { |
| | | field: 'anfme', |
| | | headerName: translate('table.field.asnOrderItem.anfme'), |
| | | headerName: translate('table.field.asnOrderItem.anfme')+"*", |
| | | type: 'number', |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | valueFormatter: (val) => val < 0 ? 0 : val |
| | | valueFormatter: (val) => val < 0 ? 0 : val, |
| | | headerClassName: "custom", |
| | | }, |
| | | { |
| | | field: 'splrCode', |
| | | headerName: translate('table.field.asnOrderItem.splrCode'), |
| | | headerName: translate('table.field.asnOrderItem.splrCode')+"*", |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | renderEditCell: (params) => ( |
| | | <SelectInputSplrCodeEditCell {...params} /> |
| | | ), |
| | | headerClassName: "custom", |
| | | }, |
| | | { |
| | | field: 'splrName', |
| | | headerName: translate('table.field.asnOrderItem.splrName'), |
| | | headerName: translate('table.field.asnOrderItem.splrName')+"*", |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | renderEditCell: (params) => ( |
| | | <SelectInputSplrNameEditCell {...params} /> |
| | | ), |
| | | headerClassName: "custom", |
| | | }, |
| | | // { |
| | | // field: 'packName', |
| | |
| | | // }, |
| | | { |
| | | field: 'poCode', |
| | | headerName: translate('table.field.asnOrderItem.poDetlCode'), |
| | | headerName: translate('table.field.asnOrderItem.poDetlCode')+"*", |
| | | minWidth: 100, |
| | | flex: 1, |
| | | editable: true, |
| | | headerClassName: "custom", |
| | | }, |
| | | |
| | | { |
New file |
| | |
| | | |
| | | .custom { |
| | | color: rgb(0, 195, 255) !important; |
| | | } |
| | | |