From 77ac6b72ed82d51d0d45bf156ac1b5bb3cb15782 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期二, 19 三月 2024 14:01:43 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/components/configSettings.jsx |  127 ++++++++++++++++++++++++++++++++++++------
 1 files changed, 108 insertions(+), 19 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index e853278..7a6a67a 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -22,8 +22,31 @@
             changeList.forEach(change => {
                 const { name: nameList, value } = change;
                 nameList.forEach(name => {
-                    console.log(name, value);
                     switch (name) {
+                        case 'row':
+                            const bay = form.getFieldValue('bay')
+                            if (value && bay) {
+                                form.setFieldsValue({
+                                    shelfNo: Utils.pureNumStr(value) + '-' + Utils.pureNumStr(bay)
+                                });
+                            } else {
+                                form.setFieldsValue({
+                                    shelfNo: ''
+                                });
+                            }
+                            break;
+                        case 'bay':
+                            const row = form.getFieldValue('row')
+                            if (value && row) {
+                                form.setFieldsValue({
+                                    shelfNo: Utils.pureNumStr(row) + '-' + Utils.pureNumStr(value)
+                                });
+                            } else {
+                                form.setFieldsValue({
+                                    shelfNo: ''
+                                });
+                            }
+                            break;
                         default:
                             break;
                     }
@@ -54,31 +77,97 @@
                 style={{
                     maxWidth: 600,
                 }}
-                size='default'    // small | default | large
-                variant='filled'    // outlined | borderless | filled
-                labelWrap   // label 鎹㈣
+                size='defalargeult'
+                variant='filled'
+                labelWrap
                 disabled={false}
                 layout='horizontal'
+                labelCol={{
+                    span: 4,
+                }}
+                wrapperCol={{
+                    span: 20,
+                }}
             >
+                <br />
+                
+                <Form.Item
+                    label={intl.formatMessage({ id: 'map.settings.type', defaultMessage: '绫诲瀷' })}
+                >
+                    <span>{curSprite?.data?.type}</span>
+                </Form.Item>
+                <Form.Item
+                    label={intl.formatMessage({ id: 'map.settings.uuid', defaultMessage: '缂栧彿' })}
+                >
+                    <span>{curSprite?.data?.uuid}</span>
+                </Form.Item>
 
-                <Row gutter={[24, 16]}>
+                {curSprite?.data?.type === Utils.SENSOR_TYPE.AGV && (
+                    <>
 
-                    <Col span={24}>
-                        <Row gutter={24}>
-                            <Col span={18}>
-                                <Form.Item
-                                    label={intl.formatMessage({ id: 'map.settings.type', defaultMessage: '绫诲瀷' })}
-                                    labelCol={{ span: 4 }}
-                                >
-                                    <span>{curSprite?.data?.type}</span>
-                                </Form.Item>
-                            </Col>
-                        </Row>
-                    </Col>
+                    </>
+                )}
 
+                {curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
+                    <>
+                        <Form.Item
+                            name='row'
+                            label={intl.formatMessage({ id: 'map.settings.shelf.row', defaultMessage: '鎺�' })}
+                            rules={[
+                                {
+                                    required: true,
+                                },
+                            ]}
+                        >
+                            <InputNumber
+                                style={{
+                                    width: '50%',
+                                }}
+                            />
+                        </Form.Item>
+                        <Form.Item
+                            name='bay'
+                            label={intl.formatMessage({ id: 'map.settings.shelf.bay', defaultMessage: '鍒�' })}
+                            rules={[
+                                {
+                                    required: true,
+                                },
+                            ]}
+                        >
+                            <InputNumber
+                                style={{
+                                    width: '50%',
+                                }}
+                            />
+                        </Form.Item>
+                        <Form.Item
+                            name='shelfNo'
+                            label={intl.formatMessage({ id: 'map.settings.shelf.no', defaultMessage: '璐ф灦鍙�' })}
+                            rules={[
+                                {
+                                    required: true,
+                                },
+                            ]}
+                        >
+                            <Input
+                                style={{
+                                    width: '50%',
+                                }}
+                            />
+                        </Form.Item>
+                    </>
+                )}
 
-                </Row>
-            </Form>
+                <Form.Item
+                    wrapperCol={{
+                        offset: 4,
+                        span: 16,
+                    }}>
+                    <Button type="primary" onClick={handleFinish}>
+                        <FormattedMessage id='common.submit' defaultMessage='淇濆瓨' />
+                    </Button>
+                </Form.Item>
+            </Form >
         </>
     )
 }

--
Gitblit v1.9.1