Merge remote-tracking branch 'origin/devlop' into devlop
| | |
| | | VITE_BASE_IP=127.0.0.1 |
| | | VITE_BASE_IP=192.168.4.50 |
| | | # VITE_BASE_IP=47.76.147.249 |
| | | VITE_BASE_PORT=8080 |
| | |
| | | inputPlaceholder: 'Use commas to separate', |
| | | resend: 'RESEND', |
| | | selected: 'selected', |
| | | batch: 'batch' |
| | | batch: 'batch', |
| | | batchSafe: 'Bulk Safe', |
| | | batchDef: 'Bulk Def', |
| | | }, |
| | | msg: { |
| | | confirm: { |
| | |
| | | rcptQty: "rcptQty", |
| | | dlyQty: "dlyQty", |
| | | disQty: "disQty", |
| | | anfme: 'anfme', |
| | | safeQty: "safeQty", |
| | | picPath: "picPath", |
| | | trackCode: "trackCode", |
| | |
| | | stockError: '没有库存', |
| | | resend: '重发', |
| | | selected: '项选中', |
| | | batch: '批量编辑' |
| | | batch: '批量编辑', |
| | | batchSafe: '批量合格', |
| | | batchDef: '批量不合格', |
| | | }, |
| | | msg: { |
| | | confirm: { |
| | |
| | | matnrCode: "物料编号", |
| | | maktx: "物料名称", |
| | | label: "标签", |
| | | splrName: "供应商名称", |
| | | splrBatch: "供应商批次", |
| | | splrName: "供应商", |
| | | splrBatch: "批次", |
| | | stockBatch: "库存批次", |
| | | isptResult: '质检结论', |
| | | isptStatus: '质检状态', |
| | | rcptQty: "收货数量", |
| | | rcptQty: "可检数量", |
| | | dlyQty: "送货数量", |
| | | disQty: "不合数量", |
| | | safeQty: "合格数量", |
| | | anfme: '数量', |
| | | picPath: "图片路径", |
| | | trackCode: "条形码", |
| | | }, |
| | |
| | | import { styled } from '@mui/material/styles'; |
| | | import AsnOrderItemCreate from "./AsnOrderItemCreate"; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import DialogCloseButton from "../../components/DialogCloseButton"; |
| | | |
| | | import request from '@/utils/request'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; |
| | | import AsnOrderItemEdit from "./AsnOrderItemEdit"; |
| | |
| | | backgroundColor: 'background.paper', |
| | | zIndex: 1000 |
| | | }}> |
| | | 执行质检 |
| | | <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}> |
| | | <DialogCloseButton onClose={handleClose} /> |
| | | </Box> |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | {/* <Box component="form" onSubmit={handleSubmit} sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}> |
| | | <Grid container spacing={2}> |
| | | <Grid item md={4}> |
| | | <TextField |
| | | label={translate('table.field.asnOrder.code')} |
| | | name="code" |
| | | value={formData.code} |
| | | onChange={handleChange} |
| | | size="small" |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | | </Box> */} |
| | | <Box sx={{ mt: 2 }}> |
| | | {/* <Stack direction="row" spacing={2}> |
| | | <Button variant="contained" onClick={handleSearch}>搜索</Button> |
| | | </Stack> */} |
| | | |
| | | <Stack direction="row" spacing={2}> |
| | | <Button variant="contained" onClick={batchQualified}>批量合格</Button> |
| | | <Button variant="contained" color="error" onClick={batchUnQualified}>批量不合格</Button> |
| | | <Button variant="contained" onClick={batchQualified}>{translate('common.action.batchSafe')} </Button> |
| | | <Button variant="contained" color="error" onClick={batchUnQualified}>{translate('common.action.batchDef')} </Button> |
| | | </Stack> |
| | | </Box> |
| | | <Box sx={{ mt: 2, height: 400, width: '100%' }}> |
| | |
| | | </Box> |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | | <Box sx={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}> |
| | | <Box sx={{ width: '100%', display: 'flex', justifyContent: 'end' }}> |
| | | <Button onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> |
| | | {translate('toolbar.confirm')} |
| | | </Button> |
| | |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | const [columns, setColumns] = useState([ |
| | | // { field: 'id', headerName: 'ID', width: 100 }, |
| | | { field: 'maktx', headerName: translate('table.field.qlyIsptItem.maktx'), width: 300 }, |
| | | { field: 'matnrCode', headerName: translate('table.field.qlyIsptItem.matnrCode') }, |
| | | { field: 'maktx', headerName: translate('table.field.qlyIsptItem.maktx'), width: 300 }, |
| | | { field: 'splrName', headerName: translate('table.field.qlyIsptItem.splrName') }, |
| | | { field: 'splrBatch', headerName: translate('table.field.qlyIsptItem.splrBatch') }, |
| | | { field: 'stockBatch', headerName: translate('table.field.qlyIsptItem.stockBatch') }, |
| | | { field: 'dlyQty', headerName: translate('table.field.qlyIsptItem.dlyQty') }, |
| | | // { field: 'stockBatch', headerName: translate('table.field.qlyIsptItem.stockBatch') }, |
| | | // { field: 'dlyQty', headerName: translate('table.field.qlyIsptItem.dlyQty') }, |
| | | { field: 'rcptQty', headerName: translate('table.field.qlyIsptItem.rcptQty') }, |
| | | { |
| | | field: 'safeQty', headerName: translate('table.field.qlyIsptItem.safeQty'), editable: true, type: 'number', |
| | |
| | | field: 'isptResult', headerName: translate('table.field.qlyIsptItem.isptResult'), width: 150, type: 'singleSelect', |
| | | editable: true, valueOptions: [{ value: '1', label: '合格' }, { value: '2', label: '不合格' }, { value: '3', label: '待定' }, { value: '4', label: '部分合格' }], |
| | | }, |
| | | |
| | | |
| | | ]) |
| | | |
| | | const processRowUpdate = (newRow, oldRow) => { |
| | |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.safeQty" |
| | | source="safeQty" |
| | | readOnly |
| | | /> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.dlyQty" |
| | | source="dlyQty" |
| | | readOnly |
| | | |
| | | /> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.rcptQty" |
| | | source="rcptQty" |
| | | readOnly |
| | |
| | | <TextField source="wkType$" label="table.field.qlyInspect.wkType" /> |
| | | <NumberField source="asnId" label="table.field.qlyInspect.asnId" /> |
| | | <NumberField source="asnCode" label="table.field.qlyInspect.asnCode" /> |
| | | <NumberField source="safeQty" label="table.field.qlyInspect.safeQty" /> |
| | | <NumberField source="dlyQty" label="table.field.qlyInspect.dlyQty" /> |
| | | <NumberField source="rcptQty" label="table.field.qlyInspect.rcptQty" /> |
| | | <NumberField source="isptQty" label="table.field.qlyInspect.isptQty" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | |
| | | return ( |
| | | <Button onClick={requestClose} label={"toolbar.close"}> |
| | |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetOne, |
| | | useRefresh, |
| | | useGetRecordId, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { Box, Typography, Card, Stack, LinearProgress } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import QlyIsptItemCreate from "./QlyIsptItemCreate"; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import request from '@/utils/request'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const isptId = useGetRecordId(); |
| | | const { data: dicts, isPending, error } = useGetOne('qlyInspect', { id: isptId }); |
| | | if (dicts == null) {return} |
| | | if (dicts == null) { return } |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="qlyIsptItem" |
| | | filter={{ispectId: isptId}} |
| | | resource="qlyIsptItem" |
| | | filter={{ ispectId: isptId }} |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | )} |
| | | perPage={DEFAULT_ITEM_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='qlyIsptItem' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={false} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'label', 'stockBatch','picPath', 'ispectId']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="ispectId" label="table.field.qlyIsptItem.ispectId" /> |
| | | <TextField source="matnrCode" label="table.field.qlyIsptItem.matnrCode" /> |
| | | <TextField source="maktx" label="table.field.qlyIsptItem.maktx" /> |
| | | <TextField source="label" label="table.field.qlyIsptItem.label" /> |
| | | <TextField source="splrBatch" label="table.field.qlyIsptItem.splrBatch" /> |
| | | <TextField source="stockBatch" label="table.field.qlyIsptItem.stockBatch" /> |
| | | <NumberField source="rcptQty" label="table.field.qlyIsptItem.rcptQty" /> |
| | | <NumberField source="dlyQty" label="table.field.qlyIsptItem.dlyQty" /> |
| | | <NumberField source="disQty" label="table.field.qlyIsptItem.disQty" /> |
| | | <NumberField source="safeQty" label="table.field.qlyIsptItem.safeQty" /> |
| | | <TextField source="splrName" label="table.field.qlyIsptItem.splrName" /> |
| | | <NumberField source="isptResult$" label="table.field.qlyIsptItem.isptResult" /> |
| | | <TextField source="picPath" label="table.field.qlyIsptItem.picPath" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | </StyledDatagrid> |
| | | <DynamicFields /> |
| | | </List> |
| | | <QlyIsptItemCreate |
| | | open={createDialog} |
| | |
| | | } |
| | | |
| | | export default QlyIsptItemList; |
| | | |
| | | |
| | | |
| | | const DynamicFields = (props) => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const [columns, setColumns] = useState([]); |
| | | const { isLoading } = useListContext(); |
| | | const refresh = useRefresh(); |
| | | useEffect(() => { |
| | | getDynamicFields(); |
| | | }, []); |
| | | |
| | | const getDynamicFields = async () => { |
| | | const { data: { code, data, msg }, } = await request.get("/fields/enable/list"); |
| | | if (code == 200) { |
| | | const arr = [ |
| | | <NumberField source="id" />, |
| | | <NumberField source="ispectId" label="table.field.qlyIsptItem.ispectId" />, |
| | | <TextField source="matnrCode" label="table.field.qlyIsptItem.matnrCode" />, |
| | | <TextField source="maktx" label="table.field.qlyIsptItem.maktx" />, |
| | | <TextField source="label" label="table.field.qlyIsptItem.label" />, |
| | | <TextField source="splrBatch" label="table.field.qlyIsptItem.splrBatch" />, |
| | | <TextField source="stockBatch" label="table.field.qlyIsptItem.stockBatch" />, |
| | | <NumberField source="rcptQty" label="table.field.qlyIsptItem.rcptQty" />, |
| | | <NumberField source="dlyQty" label="table.field.qlyIsptItem.dlyQty" />, |
| | | <NumberField source="anfme" label="table.field.qlyIsptItem.anfme" />, |
| | | <TextField source="splrName" label="table.field.qlyIsptItem.splrName" />, |
| | | <NumberField source="isptResult$" label="table.field.qlyIsptItem.isptResult" />, |
| | | ] |
| | | const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />) |
| | | const lastArr = [ |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime />, |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField>, |
| | | <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 />, |
| | | <TextField source="memo" label="common.field.memo" sortable={false} />, |
| | | ] |
| | | setColumns([...arr, ...fields, ...lastArr]); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <Box sx={{ position: 'relative', minHeight: "60vh", }}> |
| | | {isLoading && ( |
| | | <LinearProgress |
| | | sx={{ |
| | | height: "2px", |
| | | position: 'absolute', |
| | | top: 0, |
| | | left: 0, |
| | | right: 0, |
| | | }} |
| | | /> |
| | | )} |
| | | {columns.length > 0 && |
| | | <StyledDatagrid |
| | | preferenceKey='qlyIsptItem' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={false} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'dlyQty', 'label', 'stockBatch', 'picPath', 'ispectId', 'statusBool']} |
| | | |
| | | > |
| | | {columns.map((column) => column)} |
| | | </StyledDatagrid>} |
| | | </Box> |
| | | ) |
| | | } |
| | |
| | | // if (tasks.isEmpty()) { |
| | | // throw new CoolException("任务已处执行状态不可一键完成!!"); |
| | | // } |
| | | taskService.completeTask(tasks); |
| | | return R.ok(); |
| | | // taskService.completeTask(tasks); |
| | | for (Task task : tasks) { |
| | | task.setTaskStatus(task.getTaskType() < (short)100 ? TaskStsType.COMPLETE_IN.id : TaskStsType.COMPLETE_OUT.id); |
| | | } |
| | | if (!taskService.updateBatchById(tasks)){ |
| | | return R.error("完成任务失败"); |
| | | } |
| | | |
| | | return R.ok("完成任务成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |