From 9681ec4b36c4402070482ddfd4ae0ea2de409d8d Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 16 四月 2025 09:58:53 +0800
Subject: [PATCH] #新增 1. 综合订单界面优化 2. 添加库位详细界面
---
rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
index 1d57114..882cdf9 100644
--- a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
+++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
@@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
-import { useNavigate } from 'react-router-dom';
+import { useLocation, useNavigate } from 'react-router-dom';
import {
List,
DatagridConfigurable,
@@ -33,6 +33,7 @@
AutocompleteInput,
DeleteButton,
Button,
+ useRedirect,
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
@@ -107,7 +108,11 @@
const [createDialog, setCreateDialog] = useState(false);
const [drawerVal, setDrawerVal] = useState(false);
const [modalType, setmodalType] = useState(0);
+ const [select, setSelect] = useState(0);
+
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) => {
@@ -143,7 +148,7 @@
sx={{ width: '100%' }}
preferenceKey='asnOrder'
bulkActionButtons={<> <InspectionsButton /><BulkDeleteButton mutationMode={OPERATE_MODE} /></>}
- rowClick={() => 'edit'}
+ rowClick='edit'
expandSingle={true}
omit={['id', 'createTime', 'createBy', 'memo', 'poId', 'rleStatus$']}
>
@@ -191,7 +196,8 @@
const MyButton = ({ setCreateDialog, setmodalType }) => {
const record = useRecordContext();
- const handleEditClick = () => {
+ const handleEditClick = (btn) => {
+ btn.stopPropagation();
const id = record.id;
setmodalType(id);
setCreateDialog(true);
@@ -201,7 +207,7 @@
<Button
color="primary"
startIcon={<EditIcon />}
- onClick={() => handleEditClick()}
+ onClick={(btn) => handleEditClick(btn)}
sx={{ ml: 1 }}
label={'ra.action.edit'}
>
@@ -213,7 +219,8 @@
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const inspection = () => {
+ const inspection = (btn) => {
+ btn.stopPropagation();
requestInspect([record])
};
@@ -240,7 +247,8 @@
const { selectedIds, onUnselectItems, data } = useListContext();
const notify = useNotify();
const refresh = useRefresh();
- const inspection = () => {
+ const inspection = (btn) => {
+ btn.stopPropagation();
if (selectedIds.length === 0) {
notify('璇烽�夋嫨閫氱煡鍗�');
return;
--
Gitblit v1.9.1