From 8a4d482469e2078cce3cf227c11be862e94b860d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 12 四月 2024 20:25:24 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack

---
 zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
index 8aea51c..06fd7e0 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -5,6 +5,7 @@
 import * as Utils from '../../utils'
 import Http from '@/utils/http';
 import BoolValueIcon from '@/components/BoolValueIcon';
+import ShuttleHandle from './handle';
 
 const useStyles = createStyles(({ token, css }) => {
     return {
@@ -29,7 +30,7 @@
 })
 
 const updateEnable = async (deviceNo, enable) => {
-    const resp = await Http.doPost('api/dict/update', {val});
+    const resp = await Http.doPost('api/dict/update', { val });
     if (resp.code === 200) {
         message.success(intl.formatMessage({ id: 'page.update.success', defaultMessage: '鏇存柊鎴愬姛' }));
         return true;
@@ -45,6 +46,7 @@
 
     const { data } = props;
     const [loading, setLoading] = React.useState(false);
+    const [childrenDrawer, setChildrenDrawer] = useState(false);
     const [info, setInfo] = React.useState(null);
 
     useEffect(() => {
@@ -96,11 +98,11 @@
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
-                                        children: <Badge status="processing" text="Running" />,
+                                        children: info?.currentLocNo,
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '鎵樼洏鏉$爜' }),
-                                        children: '80000010',
+                                        children: info?.zpallet,
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.origin.loc', defaultMessage: '璧峰搴撲綅' }),
@@ -110,7 +112,7 @@
                                         label: intl.formatMessage({ id: 'map.dest.loc', defaultMessage: '鐩爣搴撲綅' }),
                                         children: info?.destLocNo,
                                     },
-                                   
+
                                     {
                                         label: intl.formatMessage({ id: 'map.shuttle.batter.power', defaultMessage: '鐢垫睜鐢甸噺' }),
                                         children: info?.batteryPower,
@@ -158,7 +160,13 @@
                                                 <Button className={styles.tableButton} size='default' disabled>
                                                     <FormattedMessage id='map.enable' defaultMessage='鍚敤' />
                                                 </Button>
-                                                <Button className={styles.tableButton} size='default'>
+                                                <Button
+                                                    className={styles.tableButton}
+                                                    size='default'
+                                                    onClick={() => {
+                                                        setChildrenDrawer(true);
+                                                    }}
+                                                >
                                                     <FormattedMessage id='map.handle' defaultMessage='鎵嬪姩鎿嶄綔' />
                                                 </Button>
                                             </>
@@ -167,6 +175,14 @@
                                 ]
                             }
                         />
+                        <ShuttleHandle
+                            open={childrenDrawer}
+                            refCurr={props.refCurr}
+                            shuttleNo={data.no}
+                            onClose={() => {
+                                setChildrenDrawer(false)
+                            }}
+                        />
                     </div>
                 )}
             </div>

--
Gitblit v1.9.1