From a4093814b51bba7eae9530cfa076f6242df3f5f8 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期一, 17 二月 2025 14:59:43 +0800
Subject: [PATCH] #移库任务

---
 zy-asrs-flow/src/pages/map/components/configSettings.jsx |  122 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 120 insertions(+), 2 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index ddbfd55..46d132c 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -3,7 +3,6 @@
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
 import { createStyles } from 'antd-style';
 import * as Utils from '../utils'
-import * as PIXI from 'pixi.js';
 
 const useStyles = createStyles(({ token, css }) => {
 
@@ -14,6 +13,9 @@
     const { styles } = useStyles();
     const { curSprite, configForm: form } = props;
 
+    const [showLiftNoItem, setShowLiftNoItem] = React.useState(false);
+    const [showConveyorNoItem, setShowConveyorNoItem] = React.useState(false);
+
     useEffect(() => {
         form.resetFields();
         if (curSprite) {
@@ -21,6 +23,8 @@
                 shelfType: Utils.SHELF_TYPE.STORE,
                 ...curSprite.data
             })
+            setShowLiftNoItem(form.getFieldValue('shelfType') === Utils.SHELF_TYPE.LIFT);
+            setShowConveyorNoItem(form.getFieldValue('shelfType') === Utils.SHELF_TYPE.CONVEYOR);
         }
     }, [props, form]);
 
@@ -78,6 +82,11 @@
                                 });
                             }
                             break;
+                        case 'shelfType':
+                            const shelfType = form.getFieldValue('shelfType');
+                            setShowLiftNoItem(shelfType === Utils.SHELF_TYPE.LIFT);
+                            setShowConveyorNoItem(shelfType === Utils.SHELF_TYPE.CONVEYOR);
+                            break;
                         default:
                             break;
                     }
@@ -101,6 +110,7 @@
             message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '鎿嶄綔鎴愬姛' }));
         }
 
+        console.log(values);
         props.onSubmit({ ...values }, confirmSettings);
     }
 
@@ -223,12 +233,68 @@
                                         value: Utils.SHELF_TYPE.CHARGE
                                     },
                                     {
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.conveyor', defaultMessage: '杈撻�佺嚎' }),
+                                        value: Utils.SHELF_TYPE.CONVEYOR
+                                    },
+                                    {
                                         label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
                                         value: Utils.SHELF_TYPE.DISABLE
                                     },
                                 ]}
                             />
                         </Form.Item>
+
+                        {showLiftNoItem && (
+                            <>
+                                <Form.Item
+                                    name='liftNo'
+                                    label={intl.formatMessage({ id: 'map.settings.lift.no', defaultMessage: '鎻愬崌鏈虹紪鍙�' })}
+                                    rules={[
+                                        {
+                                            required: true,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </>
+                        )}
+
+                        {showConveyorNoItem && (
+                            <>
+                                <Form.Item
+                                    name='conveyorNo'
+                                    label={intl.formatMessage({ id: 'map.settings.conveyor.no', defaultMessage: '杈撻�佺珯鍙�' })}
+                                    rules={[
+                                        {
+                                            required: true,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='conveyorHasGo'
+                                    label={intl.formatMessage({ id: 'map.settings.conveyor.hasGo', defaultMessage: '灏忚溅鍙蛋' })}
+                                    valuePropName="checked"
+                                >
+                                    <Checkbox
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </>
+                        )}
+
                         <Form.Item
                             label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
                         >
@@ -286,6 +352,44 @@
                             </Space.Compact>
                         </Form.Item>
                         <Form.Item
+                            label={intl.formatMessage({ id: 'map.settings.shelf.reference', defaultMessage: '鍩哄噯鍊�' })}
+                        >
+                            <Space.Compact>
+                                <Form.Item
+                                    name='refx'
+                                    noStyle
+                                    rules={[
+                                        {
+                                            required: false,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.x' defaultMessage='x' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='refy'
+                                    noStyle
+                                    rules={[
+                                        {
+                                            required: false,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.y' defaultMessage='y' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
+                        </Form.Item>
+                        <Form.Item
                             name='value'
                             label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
                         >
@@ -300,7 +404,21 @@
 
                 {curSprite?.data?.type === Utils.SENSOR_TYPE.CONVEYOR && (
                     <>
-
+                        <Form.Item
+                            name='plcNo'
+                            label={intl.formatMessage({ id: 'map.settings.conveyor.plc.no', defaultMessage: 'PLC缂栧彿' })}
+                            rules={[
+                                {
+                                    required: true,
+                                },
+                            ]}
+                        >
+                            <InputNumber
+                                style={{
+                                    width: '50%',
+                                }}
+                            />
+                        </Form.Item>
                     </>
                 )}
 

--
Gitblit v1.9.1