| | |
| | | }, |
| | | outStockItem: { |
| | | asnId: "ID", |
| | | asnCode: "DO Code", |
| | | asnCode: "Out Code", |
| | | poCode: 'DO Code', |
| | | poDetlId: "poDetlId", |
| | | poDetlCode: "DO Detl Code", |
| | | matnrId: "matnrId", |
| | |
| | | asnCreate: "Create By Order", |
| | | poCreate: "Create By PO", |
| | | createTask: "createTask", |
| | | publicWorking: 'Public Working', |
| | | recover: "recover", |
| | | createWave: "Create Wave", |
| | | order: 'Orders', |
| | |
| | | outStockItem: { |
| | | asnId: "主单标识", |
| | | asnCode: "单号", |
| | | poCode: 'DO单号', |
| | | poDetlId: "平台明细ID", |
| | | poDetlCode: "DO单", |
| | | matnrId: "物料标识", |
| | |
| | | poCreate: "通过PO单创建", |
| | | orderPrint: '打印单据', |
| | | createTask: "下发任务", |
| | | publicWorking: '下发执行', |
| | | createWave: "生成波次", |
| | | recover: "继续收货", |
| | | }, |
| | |
| | | import { Box, Typography, Card, Stack, Dialog, DialogActions, DialogTitle } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import OutOrderItemCreate from "./OutOrderItemCreate"; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; |
| | | import OutOrderItemEdit from "./OutOrderItemEdit"; |
| | | import ImportButton from "../../components/ImportButton"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='outStockItem' /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_ITEM_PAGE_SIZE} |
| | |
| | | <StyledDatagrid |
| | | preferenceKey='outStockItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => { |
| | | setSelect(record) |
| | | setEditDialog(true) |
| | | }} |
| | | rowClick={false} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'purQty', 'purUnit', 'trackCode', 'packName', 'qrcode', 'splrName', 'matnrId', 'asnId']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="asnId" label="table.field.outStockItem.asnId" /> |
| | | <TextField source="asnCode" label="table.field.outStockItem.asnCode" /> |
| | | <TextField source="poCode" label="table.field.outStockItem.poCode" /> |
| | | <TextField source="poDetlId" label="table.field.outStockItem.poDetlId" /> |
| | | <TextField source="matnrId" label="table.field.outStockItem.matnrId" /> |
| | | <TextField source="matnrCode" label="table.field.outStockItem.matnrCode" /> |
| | |
| | | useRedirect, |
| | | useUnselectAll, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { Box, Typography, Card, Stack, Drawer } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import EmptyData from "../../components/EmptyData"; |
| | | import MyCreateButton from "../../components/MyCreateButton"; |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import BillStatusField from '../../components/BillStatusField'; |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import request from '@/utils/request'; |
| | |
| | | import ImportButton from "../../components/ImportButton"; |
| | | import DetailsIcon from '@mui/icons-material/Details'; |
| | | import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined'; |
| | | import OutOrderCreate from "./OutOrderCreate"; |
| | | import AddIcon from '@mui/icons-material/Add'; |
| | | import OutOrderModal from "./OutOrderModal"; |
| | | import PublicIcon from '@mui/icons-material/Public'; |
| | | import SelectMatnrModal from "./SelectMatnrModal"; |
| | | import AddTaskIcon from '@mui/icons-material/AddTask'; |
| | | import PageEditDrawer from "../../components/PageEditDrawer"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.outStock"} |
| | | empty={false} |
| | |
| | | <StyledDatagrid |
| | | sx={{ width: '100%' }} |
| | | preferenceKey='outStock' |
| | | bulkActionButtons={ |
| | | <PublicTaskButton />} |
| | | bulkActionButtons={<PublicTaskButton />} |
| | | rowClick={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'poId', 'rleStatus$']} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'rleStatus$']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.outStock.code" /> |
| | | <TextField source="poCode" label="table.field.outStock.poCode" /> |
| | | <NumberField source="poId" label="table.field.outStock.poId" /> |
| | | <TextField source="type$" label="table.field.outStock.type" /> |
| | | <TextField cellClassName="wkType" source="wkType$" label="table.field.outStock.wkType" /> |
| | | <NumberField source="anfme" label="table.field.outStock.anfme" /> |
| | |
| | | <MyButton setCreateDialog={setManualDialog} setmodalType={setmodalType} /> |
| | | <EditButton label="toolbar.detail" icon={(<DetailsIcon />)}></EditButton> |
| | | <CancelButton /> |
| | | <PublicButton /> |
| | | <PublicButton setDrawerVal={setDrawerVal} drawerVal={drawerVal} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='AsnOrder Detail' |
| | | <PageEditDrawer |
| | | title={"toolbar.publicWorking"} |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | /> |
| | | > |
| | | |
| | | </PageEditDrawer> |
| | | </Box > |
| | | ) |
| | | } |
| | |
| | | } |
| | | |
| | | return ( |
| | | record?.exceStatus == 10 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />} onConfirm={cancelOrder} /> : <></> |
| | | record?.exceStatus == 10 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />} onConfirm={cancelOrder} size={"small"} /> : <></> |
| | | ) |
| | | } |
| | | |
| | | const PublicButton = () => { |
| | | //下发执行 |
| | | const PublicButton = ({ setDrawerVal }) => { |
| | | const record = useRecordContext(); |
| | | const refresh = useRefresh(); |
| | | const taskEvent = () => { |
| | | |
| | | setDrawerVal(true) |
| | | refresh(); |
| | | } |
| | | |
| | | return ( |
| | | <ConfirmButton label={"toolbar.createTask"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} /> |
| | | <ConfirmButton label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} size={"small"} /> |
| | | ) |
| | | |
| | | } |
| | |
| | | if (event.target == undefined || event.target == null) { return } |
| | | setFormValues(formValues => ({ |
| | | ...formValues, |
| | | [event.target.name]: event.target.value |
| | | [event.target.name]: event.target.value, |
| | | })); |
| | | }; |
| | | |
| | | |
| | | |
| | | const handleSubmit = (event) => { |
| | | setParams(formValues) |
| | |
| | | <TextInput |
| | | source="deliveryCode" |
| | | label="table.field.deliveryItem.deliveryCode" |
| | | defaultValue={params?.matnrName} |
| | | defaultValue={params?.deliveryCode} |
| | | onChange={handleChange} |
| | | resettable |
| | | |
| | | /> |
| | | </Stack> |
| | | <Stack> |
| | | <TextInput |
| | | source="matnrName" |
| | | source="maktx" |
| | | label="table.field.deliveryItem.matnrName" |
| | | defaultValue={params?.matnrName} |
| | | defaultValue={params?.maktx} |
| | | onChange={handleChange} |
| | | resettable |
| | | |
| | | /> |
| | | </Stack> |
| | | <Stack> |
| | |
| | | <DialogContent> |
| | | <Grid item sx={24}> |
| | | <List |
| | | resource="deliveryItem" |
| | | resource="/deliveryItem/filters" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | > |
| | | <Box sx={{ position: 'relative', minHeight: "60vh", }}> |
| | | <LinearProgress |
| | | sx={{ |
| | | height: "2px", |
| | | position: 'absolute', |
| | | top: 0, |
| | | left: 0, |
| | | right: 0, |
| | | }} |
| | | sx={{ height: "2px", position: 'absolute', top: 0, left: 0, right: 0, }} |
| | | /> |
| | | <StyledDatagrid |
| | | preferenceKey='deliveryItem' |
| | |
| | | <NumberField source="id" /> |
| | | <TextField source="deliveryCode" label="table.field.deliveryItem.deliveryCode" /> |
| | | <TextField source="matnrCode" label="table.field.deliveryItem.matnrCode" /> |
| | | <TextField source="matnrName" label="table.field.deliveryItem.matnrName" /> |
| | | <TextField source="maktx" label="table.field.deliveryItem.matnrName" /> |
| | | <TextField source="unit" label="table.field.deliveryItem.unit" /> |
| | | <NumberField source="anfme" label="table.field.deliveryItem.anfme" /> |
| | | <TextField source="splrName" label="table.field.deliveryItem.splrName" /> |
| New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | Button, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | Toolbar, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | SimpleForm, |
| | | Form, |
| | | SaveButton, |
| | | useRefresh, |
| | | useGetList, |
| | | } from 'react-admin'; |
| | | |
| | | const OutStockPublic = (props) => { |
| | | |
| | | return ( |
| | | <> |
| | | |
| | | </> |
| | | ); |
| | | } |
| | | |
| | | export default OutStockPublic; |
| | |
| | | import { number } from "prop-types"; |
| | | |
| | | const OutBoundList = () => { |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [tabelData, setTableData] = useState([]); |
| | | const [selectedRows, setSelectedRows] = useState([]); |
| | |
| | | private DeliveryItemService deliveryItemService; |
| | | @Autowired |
| | | private CompanysService companysService; |
| | | @Autowired |
| | | private DeliveryServiceImpl deliveryService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:deliveryItem:list')") |
| | | @PostMapping("/deliveryItem/page") |
| | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DeliveryItem, BaseParam> pageParam = new PageParam<>(baseParam, DeliveryItem.class); |
| | | QueryWrapper<DeliveryItem> wrapper = pageParam.buildWrapper(true); |
| | | return R.ok().add(deliveryItemService.page(pageParam, wrapper)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:deliveryItem:list')") |
| | | @PostMapping("/deliveryItem/filters/page") |
| | | public R filter(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DeliveryItem, BaseParam> pageParam = new PageParam<>(baseParam, DeliveryItem.class); |
| | | QueryWrapper<DeliveryItem> wrapper = pageParam.buildWrapper(true); |
| | | wrapper.apply("anfme > work_qty + qty "); |
| | | return R.ok().add(deliveryItemService.page(pageParam, wrapper)); |
| | | } |
| | |
| | | if (!deliveryItemService.updateById(deliveryItem)) { |
| | | throw new CoolException("DO单明细更新失败!!"); |
| | | } |
| | | |
| | | Delivery delivery = deliveryService.getOne(new LambdaQueryWrapper<Delivery>().eq(Delivery::getCode, orderItem.getPoCode())); |
| | | if (!Objects.isNull(delivery)) { |
| | | Double wkQty = Math.round((delivery.getWorkQty() - delivery.getAnfme()) * 10000) / 10000.0; |
| | | delivery.setWorkQty(wkQty.compareTo(0.0) >= 0 ? wkQty : 0).setExceStatus(POExceStatus.PO_EXCE_STATUS_UN_EXCE.val); |
| | | if (!deliveryService.updateById(delivery)) { |
| | | throw new CoolException("DO单据修改失败!!"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!Objects.isNull(order.getPoId())) { |
| | | Delivery delivery = deliveryService.getById(order.getPoId()); |
| | | if (!Objects.isNull(delivery)) { |
| | | Double sum = orderItems.stream().mapToDouble(AsnOrderItem::getAnfme).sum(); |
| | | Double workQty = Math.round((delivery.getWorkQty() - sum) * 10000) / 10000.0; |
| | | delivery.setWorkQty(workQty.compareTo(0.0) >= 0 ? workQty : 0).setExceStatus(POExceStatus.PO_EXCE_STATUS_UN_EXCE.val); |
| | | if (!deliveryService.updateById(delivery)) { |
| | | throw new CoolException("DO单据修改失败!!"); |
| | | } |
| | | } |
| | | } |
| | | if (!this.remove(new LambdaQueryWrapper<AsnOrder>().eq(AsnOrder::getId, id))) { |
| | | throw new CoolException("主单删除失败!!"); |
| | | } |
| | | if (!outStockItemService.remove(new LambdaQueryWrapper<AsnOrderItem>().eq(AsnOrderItem::getAsnId, id))) { |
| | | throw new CoolException("单据明细删除失败!!"); |
| | | } |
| | | // if (!this.saveOrUpdate(order)) { |
| | | // throw new CoolException("单据取消失败!!"); |
| | | // } |
| | | return R.ok("操作成功"); |
| | | } |
| | | |
| | |
| | | # global-config:
|
| | | # field-strategy: 0
|
| | | configuration:
|
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
| | | map-underscore-to-camel-case: true
|
| | | cache-enabled: true
|
| | | call-setters-on-nulls: true
|