From e19b6c36562e2bc611313a520c57be97ed33daef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=8F=91?= Date: Mon, 25 Aug 2025 15:10:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85=E5=92=8C=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=BF=90=E5=8D=95=E5=A2=9E=E5=8A=A0=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Order/List/index.tsx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/pages/Order/List/index.tsx b/src/pages/Order/List/index.tsx index 314f857..c44ca60 100644 --- a/src/pages/Order/List/index.tsx +++ b/src/pages/Order/List/index.tsx @@ -1,3 +1,5 @@ +import styles from '../../../style/order-list.css'; + import InternationalPhoneInput from '@/components/InternationalPhoneInput'; import { HistoryOrder } from '@/pages/Statistics/Order'; import { ORDER_STATUS_ENUM } from '@/constants'; @@ -84,6 +86,7 @@ const ListPage: React.FC = () => { const actionRef = useRef(); const [activeKey, setActiveKey] = useState('all'); const [count, setCount] = useState([]); + const [activeLine, setActiveLine] = useState(-1); const tabs: TabsProps['items'] = useMemo(() => { const total = count.reduce((acc, cur) => acc + Number(cur.count), 0); const tabs = [ @@ -265,7 +268,7 @@ const ListPage: React.FC = () => { record.orderStatus, ) ? ( <> - + ) : ( @@ -276,6 +279,7 @@ const ListPage: React.FC = () => { record={record} tableRef={actionRef} orderId={record.id as number} + setActiveLine={setActiveLine} /> { scroll={{ x: 'max-content' }} actionRef={actionRef} rowKey="id" + rowClassName={(record) => { + return record.id === activeLine ? styles['selected-line-order-protable']: ''; + }} toolBarRender={() => [ , , @@ -480,7 +487,8 @@ const Detail: React.FC<{ tableRef: React.MutableRefObject; orderId: number; record: API.Order; -}> = ({ tableRef, orderId, record }) => { + setActiveLine: Function +}> = ({ tableRef, orderId, record, setActiveLine }) => { const [visiable, setVisiable] = useState(false); const { message } = App.useApp(); const ref = useRef(); @@ -510,7 +518,10 @@ const Detail: React.FC<{ return ( <> - @@ -1049,7 +1060,8 @@ const Shipping: React.FC<{ tableRef?: React.MutableRefObject; descRef?: React.MutableRefObject; reShipping?: boolean; -}> = ({ id, tableRef, descRef, reShipping = false }) => { + setActiveLine: Function; +}> = ({ id, tableRef, descRef, reShipping = false, setActiveLine }) => { const [options, setOptions] = useState([]); const formRef = useRef(); @@ -1071,7 +1083,11 @@ const Shipping: React.FC<{ }, }} trigger={ - -- 2.40.1 From c77020f3d6bd4fb7f25c68702bfa99897a02d59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=8F=91?= Date: Mon, 25 Aug 2025 15:58:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Fix:=20=E6=8D=A2=E8=B4=A7sku=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=80=BC=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Order/List/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/pages/Order/List/index.tsx b/src/pages/Order/List/index.tsx index c44ca60..2cb9d67 100644 --- a/src/pages/Order/List/index.tsx +++ b/src/pages/Order/List/index.tsx @@ -1859,7 +1859,6 @@ const SalesChange: React.FC<{ detailRef?: React.MutableRefObject; reShipping?: boolean; }> = ({ id, detailRef }) => { - const [options, setOptions] = useState([]); const formRef = useRef(); @@ -1924,9 +1923,8 @@ const SalesChange: React.FC<{ > { - if (!keyWords || keyWords.length < 2) return options; + params={{ }} + request={async ({ keyWords }) => { try { const { data } = await productcontrollerSearchproducts({ name: keyWords, @@ -1937,10 +1935,10 @@ const SalesChange: React.FC<{ label: `${item.name} - ${item.nameCn}`, value: item?.sku, }; - }) || options + }) ); } catch (error) { - return options; + return []; } }} name="sku" -- 2.40.1 From b432b3af176d868053237cd85f76138375fbb3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=8F=91?= Date: Mon, 25 Aug 2025 16:03:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=A5=E5=85=85:=20=E9=AB=98=E4=BA=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/style/order-list.css | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/style/order-list.css diff --git a/src/style/order-list.css b/src/style/order-list.css new file mode 100644 index 0000000..f43dc6a --- /dev/null +++ b/src/style/order-list.css @@ -0,0 +1,3 @@ +.selected-line-order-protable { + background-color: #add8e6; +} \ No newline at end of file -- 2.40.1