| | |
| | | FunctionField, |
| | | Pagination, |
| | | useNotify, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Button, Chip } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | const BusList = () => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } }); |
| | | refresh(); |
| | | } else { |
| | | notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } }); |
| | | } |
| | |
| | | {/* <BooleanField source="statusBool" label="common.field.status" sortable={false} /> */} |
| | | <TextField source="memo" label="common.field.memo" sortable={false} emptyText="-" /> |
| | | <FunctionField label="common.field.opt" cellClassName="opt" render={record => ( |
| | | (record.busSts === 15 || true) && ( |
| | | (record.busSts === 15) && ( |
| | | <ConfirmButton |
| | | label="ra.action.cancel" |
| | | size="small" |
| | |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <TextInput source="locNo" label="table.field.loc.locNo" alwaysOn />, |
| | | <ReferenceInput source="locSts" label="table.field.loc.locSts" reference="locSts" alwaysOn> |
| | | <AutocompleteInput label="table.field.loc.locSts" optionText="name" filterToQuery={(val) => ({ name: val })} /> |
| | | </ReferenceInput>, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="uuid" label="table.field.loc.uuid" />, |
| | | <ReferenceInput source="zoneId" label="table.field.loc.zoneId" reference="zone"> |
| | | <AutocompleteInput label="table.field.loc.zoneId" optionText="name" filterToQuery={(val) => ({ name: val })} /> |
| | | </ReferenceInput>, |
| | | <TextInput source="locNo" label="table.field.loc.locNo" alwaysOn />, |
| | | <TextInput source="name" label="table.field.loc.name" />, |
| | | <ReferenceInput source="code" label="table.field.loc.code" reference="code" alwaysOn> |
| | | <AutocompleteInput label="table.field.loc.code" optionText="data" filterToQuery={(val) => ({ data: val })} /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput source="locSts" label="table.field.loc.locSts" reference="locSts" alwaysOn> |
| | | <AutocompleteInput label="table.field.loc.locSts" optionText="name" filterToQuery={(val) => ({ name: val })} /> |
| | | </ReferenceInput>, |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <NumberInput source="offset" label="table.field.loc.offset" />, |
| | | <NumberInput source="row" label="table.field.loc.row" alwaysOn />, |
| | | <NumberInput source="bay" label="table.field.loc.bay" alwaysOn />, |
| | |
| | | FunctionField, |
| | | Pagination, |
| | | useNotify, |
| | | useRefresh, |
| | | } from 'react-admin'; |
| | | import { Box, Chip, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | const TaskList = () => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } }); |
| | | refresh(); |
| | | } else { |
| | | notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } }); |
| | | } |
| | |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } }); |
| | | refresh(); |
| | | } else { |
| | | notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } }); |
| | | } |
| | |
| | | import com.zy.acs.manager.common.utils.BusinessSortService; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.manager.manager.entity.Task; |
| | | import com.zy.acs.manager.manager.enums.TaskStsType; |
| | | import com.zy.acs.manager.manager.service.TaskService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); |
| | | QueryWrapper<Task> wrapper = pageParam.buildWrapper(true, "io_time"); |
| | | if (hasCreateTimeDesc(pageParam.getOrders())) { |
| | | wrapper.last(businessSortService.getOrderBySql(TaskStsType.class, "task_sts")); |
| | | // wrapper.last(businessSortService.getOrderBySql(TaskStsType.class, "task_sts")); |
| | | } |
| | | return R.ok().add(taskService.page(pageParam, wrapper)); |
| | | } |