skyouc
12 小时以前 02f6db3f1842f5a830e6ed00aebe6ccd917e76c4
即时库存功能优化
2个文件已修改
36 ■■■■ 已修改文件
rsf-admin/src/page/statistics/stockManage/WarehouseStockList.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WarehouseStockController.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/statistics/stockManage/WarehouseStockList.jsx
@@ -77,23 +77,11 @@
    const translate = useTranslate();
    const [createDialog, setCreateDialog] = useState(false);
    const [filters, setFilters] = useState([
        <SearchInput source="condition" alwaysOn />,
        <NumberInput source="locId" label="table.field.locItem.locId" />,
        <TextInput source="locCode" label="table.field.locItem.locCode" />,
        <TextInput source="type" label="table.field.locItem.type" />,
        <AutocompleteInput choices={dict} optionText='label' optionValue="value" source="aggType" label="table.field.locItem.aggType" />,
        <NumberInput source="orderItemId" label="table.field.locItem.orderItemId" />,
        <NumberInput source="wkType" label="table.field.locItem.wkType" />,
        <NumberInput source="matnrId" label="table.field.locItem.matnrId" />,
        <TextInput source="matnrCode" label="table.field.warehouseStock.matnrCode" alwaysOn/>,
        <TextInput source="maktx" label="table.field.locItem.maktx" />,
        <TextInput source="unit" label="table.field.locItem.unit" />,
        <NumberInput source="anfme" label="table.field.locItem.anfme" />,
        <NumberInput source="workQty" label="table.field.locItem.workQty" />,
        <TextInput source="batch" label="table.field.locItem.batch" />,
        <TextInput source="spec" label="table.field.locItem.spec" />,
        <TextInput source="model" label="table.field.locItem.model" />,
        <TextInput source="fieldsIndex" label="table.field.locItem.fieldsIndex" />,
        <TextInput label="common.field.memo" source="memo" />,]);
        ]);
    const [select, setSelect] = useState({});
    const [drawerVal, setDrawerVal] = useState(false);
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WarehouseStockController.java
@@ -59,17 +59,22 @@
        } else {
            wrapper.groupBy("matnr_id");
        }
        wrapper.eq(!Objects.isNull(param.get("matnrCode")), "matnr_code", param.get("matnrCode"));
        FieldsUtils.setFieldsFilters(wrapper, pageParam, ViewStockManage.class);
        IPage<ViewStockManage> pageResult = warehouseStockService.pageByStock(pageParam, wrapper);
        List<ViewStockManage> records = pageResult.getRecords();
        for (ViewStockManage record : records) {
        records.forEach(record -> {
            if (!Objects.isNull(record.getFieldsIndex())) {
                Map<String, String> fields = FieldsUtils.getFields(record.getFieldsIndex());
                record.setExtendFields(fields);
            }
        }
        });
        pageResult.setRecords(records);
        return R.ok(pageResult);
@@ -145,8 +150,17 @@
        } else {
            wrapper.eq(ViewStockManage::getMatnrCode, stock.getMatnrCode());
       }
        PageParam<ViewStockManage, BaseParam> result = warehouseStockService.page(pageParam, wrapper);
        List<ViewStockManage> records = result.getRecords();
        records.forEach(record -> {
            if (!Objects.isNull(record.getFieldsIndex())) {
                Map<String, String> fields = FieldsUtils.getFields(record.getFieldsIndex());
                record.setExtendFields(fields);
            }
        });
        result.setRecords(records);
        return R.ok(warehouseStockService.page(pageParam, wrapper));
        return R.ok(result);
    }
}