| | |
| | | }, |
| | | warehouseAreasItem: { |
| | | asnCode: '单号', |
| | | areaId: "仓库区域", |
| | | areaName: "区域名称 ", |
| | | areaId: "库区ID", |
| | | areaName: "库区名称 ", |
| | | matnrId: "物料标识", |
| | | matnrName: "物料名称", |
| | | matnrCode: "物料编码", |
| | |
| | | content: () => { |
| | | return invoiceRef.current |
| | | }, |
| | | documentTitle: `订单`, |
| | | documentTitle: `订单:${record?.code}`, |
| | | pageStyle: ` |
| | | @page { |
| | | size: A4; |
| | | size: A4 landscape; // 关键设置:A4横向 |
| | | margin: 10mm; |
| | | } |
| | | @media print { |
| | | body { |
| | | -webkit-print-color-adjust: exact; |
| | | html, body { |
| | | width: 297mm; // A4横向宽度 |
| | | height: 210mm; // A4横向高度 |
| | | } |
| | | }`, |
| | | onAfterPrint: () => alert('已发送至打印机!') |
| | | }) |
| | | |
| | | // @page { |
| | | // // size: A4; |
| | | // } |
| | | // @media print { |
| | | // // body { |
| | | // // -webkit-print-color-adjust: exact; |
| | | // // } |
| | | |
| | | return ( |
| | | <Dialog |
| | |
| | | Grid, |
| | | TextField, |
| | | Box, |
| | | Button, |
| | | Paper, |
| | | styled, |
| | | RadioGroup, |
| | |
| | | FormControlLabel, |
| | | } from '@mui/material'; |
| | | import DialogCloseButton from "../../components/DialogCloseButton"; |
| | | import ConfirmButton from "../../components/ConfirmButton"; |
| | | import { useTranslate, useNotify, useRefresh } from 'react-admin'; |
| | | import { useTranslate, useNotify, useRefresh , Button} from 'react-admin'; |
| | | import request from '@/utils/request'; |
| | | import { DataGrid, useGridApiRef } from '@mui/x-data-grid'; |
| | | import SaveIcon from '@mui/icons-material/Save'; |
| | | import TreeSelectInput from "@/page/components/TreeSelectInput"; |
| | | import { throttle } from 'lodash'; |
| | | |
| | | const AsnSelModal = (props) => { |
| | | const { open, setOpen } = props; |
| | |
| | | backgroundColor: 'background.paper', |
| | | zIndex: 1000 |
| | | }}> |
| | | 选择asn单 |
| | | {/* 选择asn单 */} |
| | | <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}> |
| | | <DialogCloseButton onClose={handleClose} /> |
| | | </Box> |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item md={4}> |
| | | <TextField |
| | | label={translate('table.field.asnOrder.code')} |
| | | label={translate('table.field.warehouseAreasItem.asnCode')} |
| | | name="asnCode" |
| | | value={formData.asnCode} |
| | | onChange={handleChange} |
| | | size="small" |
| | | /> |
| | | </Grid> |
| | | <Grid item md={7} sx={{margin: 'auto'}}> <Button variant="contained" onClick={handleSearch} label={'toolbar.query'}></Button></Grid> |
| | | </Grid> |
| | | </Box> |
| | | <Box sx={{ mt: 2 }}> |
| | | <Stack direction="row" spacing={2}> |
| | | <Button variant="contained" onClick={handleSearch}>搜索</Button> |
| | | </Stack> |
| | | </Box> |
| | | <Box sx={{ mt: 2, height: 400, width: '100%' }}> |
| | | <AsnSelModalTable |
| | |
| | | </Box> |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | | <Box sx={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}> |
| | | <Button onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />}> |
| | | {translate('toolbar.confirm')} |
| | | <Box sx={{ width: '100%', display: 'flex', justifyContent: 'end' }}> |
| | | <Button onClick={handleSubmit} variant="contained" startIcon={<SaveIcon />} label={'toolbar.confirm'}> |
| | | </Button> |
| | | </Box> |
| | | </DialogActions> |
| | |
| | | |
| | | }; |
| | | |
| | | |
| | | const [columns, setColumns] = useState([ |
| | | // { field: 'id', headerName: 'ID', width: 100 }, |
| | | { field: 'code', headerName: translate('table.field.asnOrder.code'), width: 200 }, |
| | | { field: 'type$', headerName: translate('table.field.asnOrder.type') }, |
| | | { field: 'wkType$', headerName: translate('table.field.asnOrder.wkType') }, |
| | | { field: 'anfme', headerName: translate('table.field.asnOrder.anfme') }, |
| | | { field: 'qty', headerName: translate('table.field.asnOrder.qty') }, |
| | | { field: 'logisNo', headerName: translate('table.field.asnOrder.logisNo') }, |
| | | { field: 'asnCode', headerName: translate('table.field.warehouseAreasItem.asnCode'), width: 180 }, |
| | | // { field: 'areaId', headerName: translate('table.field.warehouseAreasItem.type') }, |
| | | { field: 'areaName', headerName: translate('table.field.warehouseAreasItem.areaName'), width: 200 }, |
| | | { field: 'anfme', headerName: translate('table.field.warehouseAreasItem.anfme') }, |
| | | { field: 'qty', headerName: translate('table.field.warehouseAreasItem.qty') }, |
| | | { field: 'unit', headerName: translate('table.field.warehouseAreasItem.unit') }, |
| | | ]) |
| | | |
| | | |
| | |
| | | @PostMapping("/qlyInspect/asn/list") |
| | | @ApiOperation("获取待质检单") |
| | | @PreAuthorize("hasAuthority('manager:qlyInspect:list')") |
| | | public R getUnInspect(@RequestBody Map<String, Object> map) { |
| | | public R getUnInspect(@RequestBody Map<String, String> map) { |
| | | if (Objects.isNull(map)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | |
| | | import com.vincent.rsf.server.manager.entity.AsnOrder; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrderItem; |
| | | import com.vincent.rsf.server.manager.entity.QlyInspect; |
| | | import com.vincent.rsf.server.manager.entity.WarehouseAreasItem; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | R allSave(QlyInspectAndItem params); |
| | | |
| | | List<AsnOrder> getUnInspect(Map<String, Object> map); |
| | | List<WarehouseAreasItem> getUnInspect(Map<String, String> map); |
| | | |
| | | R saveSelected(IsptOrderParam param, Long loginUserId); |
| | | |
| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.manager.controller.params.IsptOrderParam; |
| | | import com.vincent.rsf.server.manager.controller.params.QlyInspectAndItem; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrder; |
| | | import com.vincent.rsf.server.manager.entity.AsnOrderItem; |
| | | import com.vincent.rsf.server.manager.entity.QlyIsptItem; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.QlyIsptStatus; |
| | | import com.vincent.rsf.server.manager.mapper.QlyInspectMapper; |
| | | import com.vincent.rsf.server.manager.entity.QlyInspect; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderItemService; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderService; |
| | | import com.vincent.rsf.server.manager.service.QlyInspectService; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vincent.rsf.server.manager.service.QlyIsptItemService; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | |
| | | @Autowired |
| | | private QlyIsptItemService qlyIsptItemService; |
| | | |
| | | @Autowired |
| | | private WarehouseAreasItemService warehouseAreasItemService; |
| | | |
| | | @Override |
| | | public List<AsnOrderItem> listByAsn(Map<String, Object> map) { |
| | |
| | | * @time 2025/3/31 10:12 |
| | | */ |
| | | @Override |
| | | public List<AsnOrder> getUnInspect(Map<String, Object> params) { |
| | | List<AsnOrder> asnOrders = asnOrderService.list(new LambdaQueryWrapper<AsnOrder>() |
| | | .eq(AsnOrder::getStatus, 1) |
| | | .eq(!Objects.isNull(params.get("asnCode")) && StringUtils.isNotBlank(params.get("asnCode").toString()), AsnOrder::getCode, StringUtils.isNotBlank(params.get("asnCode").toString()) ? params.get("asnCode").toString() : null)); |
| | | return asnOrders; |
| | | public List<WarehouseAreasItem> getUnInspect(Map<String, String> params) { |
| | | String code = params.get("asnCode"); |
| | | List<WarehouseAreasItem> warehouseAreasItems = warehouseAreasItemService |
| | | .list(new QueryWrapper<WarehouseAreasItem>() |
| | | .select("asn_id as id, SUM(anfme) anfme, SUM(qty) qty, area_id, area_name, asn_code, asn_id") |
| | | .eq(StringUtils.isNotBlank(code), "asn_code", code) |
| | | .lambda() |
| | | .groupBy(WarehouseAreasItem::getAsnCode)); |
| | | return warehouseAreasItems; |
| | | } |
| | | |
| | | /** |