From 59251b6445daef3729a205fc7054fcbdc55b060a Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期三, 16 四月 2025 11:16:05 +0800 Subject: [PATCH] #修复 1. 收货单新增物料时分组查询不生效 2. 综合订单分页数调整 3. 物料列表报错修复 --- rsf-admin/src/page/orders/stock/OrderList.jsx | 11 +---- rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx | 6 --- rsf-admin/src/page/orders/asnOrder/AsnWareModal.jsx | 13 +----- rsf-admin/src/page/orders/stock/OrderItemList.jsx | 6 +- rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 1 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java | 49 ++++++++++++++---------- rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Matnr.java | 17 ++++---- 7 files changed, 45 insertions(+), 58 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx index 99edfb3..7fec209 100644 --- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx +++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx @@ -97,7 +97,6 @@ const filters = [ <SearchInput source="condition" alwaysOn />, - <TextInput source="name" label="table.field.matnr.name" alwaysOn />, <TextInput source="code" label="table.field.matnr.code" alwaysOn />, <ReferenceInput source="shipperId$" label="table.field.matnr.shipperId" reference="shipper"> diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx index 882cdf9..ba28903 100644 --- a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx +++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx @@ -113,12 +113,7 @@ const billReload = useRef(); const location = useLocation(); const redirect = useRedirect(); - const navigate = useNavigate(); const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type')) || []; - const assign = (record) => { - navigate(`/asnOrderItem?asnId=${record.id}`); - }; - return ( <Box display="flex"> <List @@ -226,7 +221,6 @@ const requestInspect = async (rows) => { const { data: { code, data, msg } } = await request.post(`/asnOrder/inspect`, rows); - if (code === 200) { notify(msg); refresh() diff --git a/rsf-admin/src/page/orders/asnOrder/AsnWareModal.jsx b/rsf-admin/src/page/orders/asnOrder/AsnWareModal.jsx index 5a74996..8f3788b 100644 --- a/rsf-admin/src/page/orders/asnOrder/AsnWareModal.jsx +++ b/rsf-admin/src/page/orders/asnOrder/AsnWareModal.jsx @@ -13,7 +13,6 @@ styled } from '@mui/material'; import DialogCloseButton from "../../components/DialogCloseButton"; -import ConfirmButton from "../../components/ConfirmButton"; import { useTranslate, useNotify, useRefresh } from 'react-admin'; import request from '@/utils/request'; import { DataGrid } from '@mui/x-data-grid'; @@ -26,28 +25,20 @@ const notify = useNotify(); const refresh = useRefresh(); - const asnId = ''; - const handleClose = (event, reason) => { if (reason !== "backdropClick") { setOpen(false); } }; - const [formData, setFormData] = useState({ - name: '', - code: '', - groupId: 0 - }); - + const [formData, setFormData] = useState({}); const [tableData, setTableData] = useState([]); const [dyFields, setDyFields] = useState([]); const [selectedRows, setSelectedRows] = useState([]); const handleChange = (e) => { const { name, value } = e.target; - setFormData((prevData) => ({ - ...prevData, + setFormData(() => ({ [name]: value })); }; diff --git a/rsf-admin/src/page/orders/stock/OrderItemList.jsx b/rsf-admin/src/page/orders/stock/OrderItemList.jsx index 7b0f1fe..b2f0a97 100644 --- a/rsf-admin/src/page/orders/stock/OrderItemList.jsx +++ b/rsf-admin/src/page/orders/stock/OrderItemList.jsx @@ -41,7 +41,7 @@ import MyExportButton from '../../components/MyExportButton'; import PageDrawer from "../../components/PageDrawer"; import MyField from "../../components/MyField"; -import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; +import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; import * as Common from '@/utils/common'; const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ @@ -124,7 +124,7 @@ <MyExportButton /> </TopToolbar> )} - perPage={DEFAULT_PAGE_SIZE} + perPage={DEFAULT_ITEM_PAGE_SIZE} > <StyledDatagrid preferenceKey='stockItem' @@ -132,7 +132,7 @@ rowClick={(id, resource, record) => false} expand={false} expandSingle={true} - omit={['id', 'createTime', 'createBy', 'memo']} + omit={['id', 'createTime', 'orderId', 'sourceItemId', 'matnrId', 'createBy','barcode', 'splrCode', 'splrBatch', 'updateBy$', 'createBy$', 'memo']} > <NumberField source="id" /> <NumberField source="orderId" label="table.field.stockItem.orderId" /> diff --git a/rsf-admin/src/page/orders/stock/OrderList.jsx b/rsf-admin/src/page/orders/stock/OrderList.jsx index 95bff50..bcf4178 100644 --- a/rsf-admin/src/page/orders/stock/OrderList.jsx +++ b/rsf-admin/src/page/orders/stock/OrderList.jsx @@ -99,7 +99,7 @@ marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, }} title={"menu.stock"} - empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} + empty={false} filters={filters} sort={{ field: "create_time", order: "desc" }} actions={( @@ -125,14 +125,9 @@ <TextField source="type" label="table.field.stock.type" /> <TextField source="wkType" label="table.field.stock.wkType" /> <NumberField source="anfme" label="table.field.stock.anfme" /> - - <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> - <TextField source="nickname" /> - </ReferenceField> + <TextField source="updateBy$" label="common.field.updateBy" /> <DateField source="updateTime" label="common.field.updateTime" showTime /> - <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> - <TextField source="nickname" /> - </ReferenceField> + <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} /> diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Matnr.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Matnr.java index cc4b194..44cd0d1 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Matnr.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Matnr.java @@ -366,15 +366,14 @@ } return null; } - - public String getRglarId$(){ - SerialRuleService service = SpringUtils.getBean(SerialRuleService.class); - SerialRule batchRegular = service.getById(this.rglarId); - if (!Cools.isEmpty(batchRegular)){ - return String.valueOf(batchRegular.getCode()); - } - return null; - } +// public String getRglarId$(){ +// SerialRuleService service = SpringUtils.getBean(SerialRuleService.class); +// SerialRule batchRegular = service.getById(this.rglarId); +// if (!Cools.isEmpty(batchRegular)){ +// return String.valueOf(batchRegular.getCode()); +// } +// return null; +// } public String getStockLeval$(){ if (null == this.stockLevel){ return null; } diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java index 42f6657..b84edf2 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java @@ -1,8 +1,12 @@ package com.vincent.rsf.server.manager.entity; import java.text.SimpleDateFormat; -import java.util.Date; +import java.util.*; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.vincent.rsf.server.system.constant.DictTypeCode; +import com.vincent.rsf.server.system.entity.DictData; +import com.vincent.rsf.server.system.service.DictDataService; import lombok.experimental.Accessors; import org.springframework.format.annotation.DateTimeFormat; import com.baomidou.mybatisplus.annotation.TableLogic; @@ -144,25 +148,6 @@ this.memo = memo; } -// Stock stock = new Stock( -// null, // ASN鍗曟嵁锛� 甯﹀嚭PO鍗昜闈炵┖] -// null, // ERP鍑瘉 -// null, // ERP鍗曞彿 -// null, // ERP搴撳瓨鍦板潃 -// null, // 鍚堝悓鏍囪瘑 -// null, // 閿佸畾鍘熷洜 -// null, // 閿佸畾鐘舵�乕闈炵┖] -// null, // 閿佸畾浜� -// null, // 閿佸畾鏃堕棿 -// null, // 鐘舵�乕闈炵┖] -// null, // 鏄惁鍒犻櫎[闈炵┖] -// null, // 绉熸埛 -// null, // 娣诲姞浜哄憳 -// null, // 娣诲姞鏃堕棿[闈炵┖] -// null, // 淇敼浜哄憳 -// null, // 淇敼鏃堕棿[闈炵┖] -// null // 澶囨敞 -// ); // public String getLockedTime$(){ // if (Cools.isEmpty(this.lockedTime)){ @@ -171,6 +156,30 @@ // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.lockedTime); // } + public String getType$(){ + if (Cools.isEmpty(this.type)){ + return ""; + } + DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); + DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE).eq(DictData::getValue, this.type)); + if (Objects.isNull(dictData)) { + return null; + } + return dictData.getLabel(); + } + + public String getWkType$(){ + if (Cools.isEmpty(this.wkType)){ + return ""; + } + DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); + DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_BUSINESS_TYPE).eq(DictData::getValue, this.wkType)); + if (Objects.isNull(dictData)) { + return null; + } + return dictData.getLabel(); + } + public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ -- Gitblit v1.9.1