skyouc
10 天以前 f41c5fb9fffd73f2c39cd9280d72ff89c5e4ee02
质检修改数据来源
6个文件已修改
90 ■■■■ 已修改文件
rsf-admin/src/i18n/zh.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/asnOrder/OrderPrintPreview.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/orders/qlyInspect/AsnSelModal.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/QlyInspectService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyInspectServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/zh.js
@@ -353,8 +353,8 @@
            },
            warehouseAreasItem: {
                asnCode: '单号',
                areaId: "仓库区域",
                areaName: "区域名称    ",
                areaId: "库区ID",
                areaName: "库区名称    ",
                matnrId: "物料标识",
                matnrName: "物料名称",
                matnrCode: "物料编码",
rsf-admin/src/page/orders/asnOrder/OrderPrintPreview.jsx
@@ -75,20 +75,27 @@
        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
@@ -239,7 +246,7 @@
                    preferenceKey='asnOrderItem'
                    bulkActionButtons={false}
                    rowClick={(id, resource, record) => false}
                    omit={['id', 'asnId', 'poDetlId', 'platItemId','poDetlCode', 'matnrId', 'purQty','splrName', 'purUnit', 'qrcode', 'packName' ,'trackCode']}
                    omit={['id', 'asnId', 'poDetlId', 'platItemId', 'poDetlCode', 'matnrId', 'purQty', 'splrName', 'purUnit', 'qrcode', 'packName', 'trackCode']}
                >
                    {columns.map((column) => column)}
                </StyledDatagrid>}
rsf-admin/src/page/orders/qlyInspect/AsnSelModal.jsx
@@ -8,7 +8,6 @@
    Grid,
    TextField,
    Box,
    Button,
    Paper,
    styled,
    RadioGroup,
@@ -16,13 +15,10 @@
    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;
@@ -103,7 +99,7 @@
                backgroundColor: 'background.paper',
                zIndex: 1000
            }}>
                选择asn单
                {/* 选择asn单 */}
                <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}>
                    <DialogCloseButton onClose={handleClose} />
                </Box>
@@ -113,19 +109,15 @@
                    <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
@@ -137,9 +129,8 @@
                </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>
@@ -159,15 +150,14 @@
    };
    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') },
    ])
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/QlyInspectController.java
@@ -65,7 +65,7 @@
    @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("参数不能为空!!");
        }
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/QlyInspectService.java
@@ -7,6 +7,7 @@
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;
@@ -17,7 +18,7 @@
    R allSave(QlyInspectAndItem params);
    List<AsnOrder> getUnInspect(Map<String, Object> map);
    List<WarehouseAreasItem> getUnInspect(Map<String, String> map);
    R saveSelected(IsptOrderParam param, Long loginUserId);
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/QlyInspectServiceImpl.java
@@ -1,22 +1,17 @@
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;
@@ -42,6 +37,9 @@
    @Autowired
    private QlyIsptItemService qlyIsptItemService;
    @Autowired
    private WarehouseAreasItemService warehouseAreasItemService;
    @Override
    public List<AsnOrderItem> listByAsn(Map<String, Object> map) {
@@ -103,11 +101,15 @@
    * @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;
    }
    /**