rsf-admin/src/page/ResourceContent.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskItem/TaskItemCreate.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskItem/TaskItemEdit.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskItem/TaskItemList.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskItem/TaskItemPanel.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskItem/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskLog/TaskLogEdit.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-admin/src/page/taskLog/TaskLogList.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/TaskLog.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
rsf-server/src/main/resources/application-dev.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
rsf-admin/src/page/ResourceContent.js
@@ -47,7 +47,7 @@ import asnOrderLog from './asnOrderLog'; import asnOrderItemLog from './asnOrderItemLog'; import task from './task'; import taskItem from './taskItem'; // import taskItem from './taskItem'; import taskLog from './taskLog'; import taskItemLog from './taskItemLog'; @@ -140,8 +140,8 @@ return waitPakinItemLog; case 'task': return task; case 'taskItem': return taskItem; // case 'taskItem': // return taskItem; case 'taskLog': return taskLog; case 'taskItemLog': rsf-admin/src/page/taskItem/TaskItemCreate.jsx
File was deleted rsf-admin/src/page/taskItem/TaskItemEdit.jsx
File was deleted rsf-admin/src/page/taskItem/TaskItemList.jsx
File was deleted rsf-admin/src/page/taskItem/TaskItemPanel.jsx
File was deleted rsf-admin/src/page/taskItem/index.jsx
File was deleted rsf-admin/src/page/taskLog/TaskLogEdit.jsx
@@ -2,187 +2,122 @@ import { Edit, SimpleForm, FormDataConsumer, useTranslate, TextInput, NumberInput, BooleanInput, DateInput, SelectInput, ReferenceInput, ReferenceArrayInput, AutocompleteInput, SaveButton, Toolbar, Labeled, NumberField, required, useRecordContext, DeleteButton, } from 'react-admin'; import { useWatch, useFormContext } from "react-hook-form"; import { Stack, Grid, Box, Typography } from '@mui/material'; import { useWatch, useFormContext, useForm } from "react-hook-form"; import { Stack, Grid, Box, Typography, Card } 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 TaskItemLogList from "./TaskItemLogList"; const FormToolbar = () => { const { getValues } = useFormContext(); return ( <Toolbar sx={{ justifyContent: 'space-between' }}> <Toolbar sx={{ justifyContent: 'end' }}> <SaveButton /> <DeleteButton mutationMode="optimistic" /> {/* <DeleteButton mutationMode="optimistic" /> */} </Toolbar> ) } const TaskLogEdit = () => { const TaskItemLog = () => { const translate = useTranslate(); return ( <Edit redirect="list" mutationMode={EDIT_MODE} actions={<CustomerTopToolBar />} aside={<EditBaseAside />} > <SimpleForm shouldUnregister warnWhenUnsavedChanges toolbar={<FormToolbar />} mode="onTouched" defaultValues={{}} // validate={(values) => { }} <> <Edit redirect="list" mutationMode={EDIT_MODE} actions={<CustomerTopToolBar />} aside={<EditBaseAside />} > <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> <Grid item xs={12} md={8}> <Typography variant="h6" gutterBottom> {translate('common.edit.title.main')} </Typography> <Stack direction='row' gap={2}> <NumberInput label="table.field.taskLog.taskId" source="taskId" autoFocus /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.taskCode" source="taskCode" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <NumberInput label="table.field.taskLog.taskStatus" source="taskStatus" /> </Stack> <Stack direction='row' gap={2}> <NumberInput label="table.field.taskLog.taskType" source="taskType" /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.orgLoc" source="orgLoc" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.orgSite" source="orgSite" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.targLoc" source="targLoc" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.targSite" source="targSite" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.barcode" source="barcode" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.robotCode" source="robotCode" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <NumberInput label="table.field.taskLog.exceStatus" source="exceStatus" /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.expDesc" source="expDesc" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <NumberInput label="table.field.taskLog.sort" source="sort" /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.taskLog.expCode" source="expCode" parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <DateInput label="table.field.taskLog.startTime" source="startTime" /> </Stack> <Stack direction='row' gap={2}> <DateInput label="table.field.taskLog.endTime" source="endTime" /> </Stack> <SimpleForm shouldUnregister warnWhenUnsavedChanges toolbar={<FormToolbar />} mode="onTouched" defaultValues={{}} > <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> <Grid item xs={24} md={16}> <Typography variant="h6" gutterBottom> {translate('common.edit.title.main')} </Typography> <Stack direction='row' gap={2}> <TextInput label="table.field.task.taskCode" source="taskCode" readOnly parse={v => v} autoFocus /> <TextInput label="table.field.task.taskStatus" readOnly source="taskStatus$" /> <TextInput label="table.field.task.taskType" source="taskType$" readOnly /> <TextInput label="table.field.task.orgLoc" source="orgLoc" readOnly parse={v => v} /> <TextInput label="table.field.task.targLoc" source="targLoc" readOnly parse={v => v} /> <TextInput label="table.field.task.orgSite" source="orgSite" readOnly parse={v => v} /> </Stack> <Stack direction='row' gap={2}> <TextInput label="table.field.task.targSite" source="targSite" readOnly parse={v => v} /> <TextInput label="table.field.task.barcode" source="barcode" readOnly parse={v => v} /> <NumberInput label="table.field.task.sort" readOnly source="sort" /> </Stack> </Grid> </Grid> <Grid item xs={12} md={4}> <Typography variant="h6" gutterBottom> {translate('common.edit.title.common')} </Typography> <StatusSelectInput /> <Box mt="2em" /> <MemoInput /> </Grid> </SimpleForm> </Edit > <Card sx={{ marginTop: '1em', }}> <Grid item xs={24} md={16} sx={{ margin: '1em' }}> <Typography variant="h6" gutterBottom > {translate('common.edit.title.common')} </Typography> <TaskItemLogList /> </Grid> </SimpleForm> </Edit > </Card> </> ) } export default TaskLogEdit; export default TaskItemLog; rsf-admin/src/page/taskLog/TaskLogList.jsx
@@ -54,7 +54,7 @@ '& .column-name': { }, '& .opt': { width: 200 width: 250 }, })); @@ -125,43 +125,31 @@ <StyledDatagrid preferenceKey='taskLog' bulkActionButtons={false} rowClick={(id, resource, record) => false} expand={() => <TaskLogPanel />} rowClick={'edit'} expand={false} expandSingle={true} omit={['id', 'createTime', 'createBy', 'memo', 'taskId', 'robotCode', 'exceStatus', 'sort', 'expCode']} > <NumberField source="id" /> <NumberField source="taskId" label="table.field.taskLog.taskId" /> <TextField source="taskCode" label="table.field.taskLog.taskCode" /> <NumberField source="taskStatus" label="table.field.taskLog.taskStatus" /> <NumberField source="taskType" label="table.field.taskLog.taskType" /> <TextField source="orgLoc" label="table.field.taskLog.orgLoc" /> <TextField source="orgSite" label="table.field.taskLog.orgSite" /> <TextField source="targLoc" label="table.field.taskLog.targLoc" /> <TextField source="targSite" label="table.field.taskLog.targSite" /> <TextField source="barcode" label="table.field.taskLog.barcode" /> <TextField source="robotCode" label="table.field.taskLog.robotCode" /> <NumberField source="exceStatus" label="table.field.taskLog.exceStatus" /> <TextField source="expDesc" label="table.field.taskLog.expDesc" /> <NumberField source="sort" label="table.field.taskLog.sort" /> <TextField source="expCode" label="table.field.taskLog.expCode" /> <DateField source="startTime" label="table.field.taskLog.startTime" showTime /> <DateField source="endTime" label="table.field.taskLog.endTime" showTime /> <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> <TextField source="nickname" /> </ReferenceField> <TextField source="taskCode" label="table.field.task.taskCode" /> <NumberField source="taskStatus$" label="table.field.task.taskStatus" /> <NumberField source="taskType$" label="table.field.task.taskType" /> <TextField source="orgLoc" label="table.field.task.orgLoc" /> <TextField source="orgSite" label="table.field.task.orgSite" /> <TextField source="targLoc" label="table.field.task.targLoc" /> <TextField source="targSite" label="table.field.task.targSite" /> <TextField source="barcode" label="table.field.task.barcode" /> <TextField source="robotCode" label="table.field.task.robotCode" /> <NumberField source="exceStatus" label="table.field.task.exceStatus" /> <TextField source="expDesc" label="table.field.task.expDesc" /> <NumberField source="sort" label="table.field.task.sort" /> <TextField source="expCode" label="table.field.task.expCode" /> <TextField source="updateBy$" label="common.field.updateBy" /> <TextField source="createBy$" label="common.field.createBy" /> <DateField source="updateTime" label="common.field.updateTime" showTime /> <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> <TextField source="nickname" /> </ReferenceField> <DateField source="createTime" label="common.field.createTime" showTime /> <BooleanField source="statusBool" label="common.field.status" sortable={false} /> {/* <BooleanField source="statusBool" label="common.field.status" sortable={false} /> */} <TextField source="memo" label="common.field.memo" sortable={false} /> <WrapperField cellClassName="opt" label="common.field.opt"> <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> </WrapperField> </StyledDatagrid> </List> {/* <TaskLogCreate rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/TaskLog.java
@@ -1,8 +1,12 @@ package com.vincent.rsf.server.manager.entity; import java.text.SimpleDateFormat; import java.util.Date; import java.util.*; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.vincent.rsf.server.system.constant.DictTypeCode; import com.vincent.rsf.server.system.entity.DictData; import com.vincent.rsf.server.system.service.DictDataService; import lombok.experimental.Accessors; import org.springframework.format.annotation.DateTimeFormat; import java.text.SimpleDateFormat; @@ -230,6 +234,34 @@ // null // 备注 // ); public String getTaskStatus$(){ if (Cools.isEmpty(this.taskStatus)) { return null; } DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_TASK_STATUS) .eq(DictData::getValue, this.taskStatus)); if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) { return null; } return dictDatas.getLabel(); } public String getTaskType$() { if (Cools.isEmpty(this.taskType)) { return null; } DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>() .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_TASK_TYPE) .eq(DictData::getValue, this.taskType)); if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) { return null; } return dictDatas.getLabel(); } public String getStartTime$(){ if (Cools.isEmpty(this.startTime)){ return ""; rsf-server/src/main/resources/application-dev.yml
@@ -12,10 +12,10 @@ matching-strategy: ANT_PATH_MATCHER datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai # username: root # url: jdbc:mysql://192.168.4.24:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: rsf # url: jdbc:mysql://47.76.147.249:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai username: root url: jdbc:mysql://192.168.4.24:3306/rsf?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai # username: rsf password: 34821015 type: com.alibaba.druid.pool.DruidDataSource druid: