From 80e5ee8049eefe7039d77048f43e6e0566a07953 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 25 三月 2024 09:10:43 +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/components/configSettings.jsx |  162 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 121 insertions(+), 41 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index 8a693a4..9bd8aaa 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -18,13 +18,7 @@
         form.resetFields();
         if (curSprite) {
             form.setFieldsValue({
-                no: curSprite.data?.no,
-                // shelf
-                row: curSprite.data?.row,
-                bay: curSprite.data?.bay,
-                // point
-                vertical: curSprite.data?.vertical,
-                horizontal: curSprite.data?.horizontal,
+                ...curSprite.data
             })
         }
     }, [props, form]);
@@ -100,23 +94,7 @@
         // execute where the form was finished
         const confirmSettings = () => {
             if (curSprite && curSprite?.data?.type) {
-                switch (curSprite.data.type) {
-                    case Utils.SENSOR_TYPE.SHELF:
-                        curSprite.data.no = values.no; // *
-                        curSprite.data.row = values.row;
-                        curSprite.data.bay = values.bay;
-                        break;
-                    case Utils.SENSOR_TYPE.POINT:
-                        curSprite.data.no = values.no; // *
-                        curSprite.data.horizontal = values.horizontal;
-                        curSprite.data.vertical = values.vertical;
-                        break;
-                    case Utils.SENSOR_TYPE.AGV:
-                        curSprite.data.no = values.no; // *
-                        break;
-                    default:
-                        break;
-                }
+                curSprite.data = { ...curSprite.data, ...values }
             }
             message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '鎿嶄綔鎴愬姛' }));
         }
@@ -143,10 +121,10 @@
                 disabled={false}
                 layout='horizontal'
                 labelCol={{
-                    span: 4,
+                    span: 5,
                 }}
                 wrapperCol={{
-                    span: 20,
+                    span: 19,
                 }}
             >
                 <br />
@@ -171,30 +149,132 @@
                 {curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
                     <>
                         <Form.Item
-                            name='row'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.row', defaultMessage: '鎺�' })}
+                            label={intl.formatMessage({ id: 'map.settings.shelf.location', defaultMessage: '搴撲綅' })}
+                        >
+                            <Space.Compact>
+                                <Form.Item
+                                    name='row'
+                                    noStyle
+                                    rules={[
+                                        {
+                                            required: false,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.row' defaultMessage='鎺�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='bay'
+                                    noStyle
+                                    rules={[
+                                        {
+                                            required: false,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bay' defaultMessage='鍒�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
+                        </Form.Item>
+                        <Form.Item
+                            name='shelfType'
+                            label={intl.formatMessage({ id: 'map.settings.shelf.type', defaultMessage: '绫诲瀷' })}
                             rules={[
                                 {
-                                    required: false,
+                                    required: true,
                                 },
                             ]}
                         >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
+                            <Select
+                                style={{ width: 120 }}
+                                options={[
+                                    {
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '搴撲綅' }),
+                                        value: 0
+                                    },
+                                    {
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '杞ㄩ亾' }),
+                                        value: 3
+                                    },
+                                    {
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
+                                        value: 1
+                                    },
+                                ]}
+                                defaultValue={0}
                             />
                         </Form.Item>
                         <Form.Item
-                            name='bay'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.bay', defaultMessage: '鍒�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
+                            label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
                         >
-                            <InputNumber
+                            <Space.Compact>
+                                <Form.Item
+                                    name='top'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.top' defaultMessage='涓�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='bottom'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bottom' defaultMessage='涓�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
+                        </Form.Item>
+                        <Form.Item
+                            label={' '}
+                        >
+                            <Space.Compact>
+                                <Form.Item
+                                    name='left'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.left' defaultMessage='宸�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='right'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.right' defaultMessage='鍙�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
+                        </Form.Item>
+                        <Form.Item
+                            name='value'
+                            label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
+                        >
+                            <Input
                                 style={{
                                     width: '50%',
                                 }}

--
Gitblit v1.9.1