Merge remote-tracking branch 'origin/devlop' into devlop
| | |
| | | |
| | | export const DEFAULT_THEME_NAME = 'rsf'; |
| | | |
| | | export const DEFAULT_THEME_MODE = 'dark'; |
| | | export const DEFAULT_THEME_MODE = 'light'; |
| | | |
| | | export const TOKEN_HEADER_NAME = 'Authorization'; |
| | | |
| | |
| | | close: "close", |
| | | asnCreate: "asnCreate", |
| | | createTask: "createTask", |
| | | recover: "recover", |
| | | }, |
| | | }; |
| | | |
| | |
| | | packName: "包装名称", |
| | | ntyStatus: "报检状态", |
| | | prodTime: "生产日期", |
| | | platItemId: 'PO行号' |
| | | platItemId: 'PO单号' |
| | | }, |
| | | asnOrderLog: { |
| | | code: "编码", |
| | |
| | | close: "关闭", |
| | | asnCreate: "通过ASN创建", |
| | | createTask: "生成任务", |
| | | recover: "继续收货", |
| | | }, |
| | | }; |
| | | |
| | |
| | | const [formData, setFormData] = useState({ |
| | | type: '', |
| | | wkType: '', |
| | | poCode: '', |
| | | logisNo: '' |
| | | }); |
| | | |
| | | const [tabelData, setTableData] = useState([]); |
| | |
| | | setFormData({ |
| | | type: '', |
| | | wkType: '', |
| | | poCode: '', |
| | | logisNo: '' |
| | | }) |
| | | setTableData([]) |
| | | } |
| | |
| | | <Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}> |
| | | <Form> |
| | | <Grid container spacing={2}> |
| | | <Grid item md={4}> |
| | | <Grid item md={3}> |
| | | <DictSelect |
| | | label={translate("table.field.asnOrder.type")} |
| | | value={formData.type} |
| | |
| | | |
| | | </Grid> |
| | | |
| | | <Grid item md={4}> |
| | | <Grid item md={3}> |
| | | <DictSelect |
| | | label={translate("table.field.asnOrder.wkType")} |
| | | value={formData.wkType} |
| | | onChange={(e) => handleChange(e.target.value, 'wkType')} |
| | | dictTypeCode="sys_business_type" |
| | | required |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item md={3}> |
| | | <TextField |
| | | label={translate("table.field.asnOrder.poCode")} |
| | | value={formData.poCode} |
| | | onChange={(e) => handleChange(e.target.value, 'poCode')} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item md={3}> |
| | | <TextField |
| | | label={translate("table.field.asnOrder.logisNo")} |
| | | value={formData.logisNo} |
| | | onChange={(e) => handleChange(e.target.value, 'logisNo')} |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | |
| | | disableColumnSorting |
| | | disableMultipleColumnsSorting |
| | | processRowUpdate={processRowUpdate} |
| | | pageSizeOptions={[25, 50, 100]} |
| | | paginationModel={{ pageSize: 50, page: 0 }} |
| | | initialState={{ |
| | | pagination: { |
| | | paginationModel: { |
| | | pageSize: 25, |
| | | }, |
| | | }, |
| | | }} |
| | | pageSizeOptions={[10, 25, 50, 100]} |
| | | editMode="row" |
| | | checkboxSelection |
| | | onRowSelectionModelChange={handleSelectionChange} |
| | |
| | | disableMultipleColumnsSorting |
| | | columnHeaderHeight={40} |
| | | rowHeight={42} |
| | | paginationModel={{ pageSize: 10, page: 1 }} |
| | | pageSizeOptions={[10, 25, 50, 100]} |
| | | initialState={{ |
| | | pagination: { |
| | | paginationModel: { |
| | | pageSize: 10, |
| | | }, |
| | | }, |
| | | }} |
| | | pageSizeOptions={[10, 25, 50]} |
| | | /> |
| | | </Box > |
| | | |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useRefresh, |
| | | Button, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import ReplayIcon from '@mui/icons-material/Replay'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | width: 300 |
| | | }, |
| | | })); |
| | | |
| | |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | <RecoverButton /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | |
| | | } |
| | | |
| | | export default AsnOrderLogList; |
| | | |
| | | const RecoverButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const requestRecover = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/asnOrder/recover/${record.id}`); |
| | | |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh() |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | (<Button onClick={requestRecover} label={"toolbar.recover"} color="success"> |
| | | <ReplayIcon /> |
| | | </Button>) |
| | | ) |
| | | } |
| | |
| | | }; |
| | | |
| | | const [formData, setFormData] = useState({ |
| | | code: '' |
| | | asnCode: '' |
| | | }); |
| | | |
| | | const [tableData, setTableData] = useState([]); |
| | |
| | | |
| | | const reset = () => { |
| | | setFormData({ |
| | | code: '' |
| | | asnCode: '' |
| | | }) |
| | | } |
| | | |
| | |
| | | }; |
| | | |
| | | const getData = async () => { |
| | | const res = await request.post(`/qlyInspect/asn/list`, { |
| | | ...formData, |
| | | }); |
| | | const res = await request.post(`/qlyInspect/asn/list`, { asnCode: formData.asnCode }); |
| | | if (res?.data?.code === 200) { |
| | | setTableData(res.data.data); |
| | | } else { |
| | |
| | | <Grid item md={4}> |
| | | <TextField |
| | | label={translate('table.field.asnOrder.code')} |
| | | name="code" |
| | | value={formData.code} |
| | | name="asnCode" |
| | | value={formData.asnCode} |
| | | onChange={handleChange} |
| | | size="small" |
| | | /> |
| | |
| | | <Card sx={{ |
| | | ml: 1, |
| | | mr: 1, |
| | | height: '620px' |
| | | height: 'calc(100vh - 140px)', |
| | | overflowY: 'auto' |
| | | }}> |
| | | <CardContent sx={{ |
| | | overflow: 'auto', |
| | | height: '100%', |
| | | display: 'flex', |
| | | flexDirection: 'column', |
| | | justifyContent: 'space-between' |
| | |
| | | </Box> |
| | | |
| | | <Box sx={{ |
| | | height: 480, |
| | | minWidth: 290, |
| | | overflow: 'auto', |
| | | marginTop: '10px', |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | <TextInput source="name" label="table.field.role.name" />, |
| | | <TextInput source="code" label="table.field.role.code" />, |
| | | |
| | |
| | | preferenceKey='role' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <RolePanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | |
| | | |
| | | const filters = [ |
| | | // <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label="common.time.after" source="timeStart" alwaysOn />, |
| | | <DateInput label="common.time.before" source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="username" label="table.field.user.username" />, |
| | | <TextInput source="nickname" label="table.field.user.nickname" />, |
| | |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | )} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <UserPanel />} |
| | | expandSingle={true} |
| | | omit={[ |
| | | "id", |
| | | "email", |