| | |
| | | 'map.settings.config.param': 'Config Parameters', |
| | | '': '', |
| | | '': '', |
| | | 'map.settings.no': 'No.', |
| | | 'map.settings.shelf.no': 'Shelf No', |
| | | 'map.settings.shelf.row': 'Row', |
| | | 'map.settings.shelf.bay': 'Bay', |
| | |
| | | curSprite.data.bay = values.bay; |
| | | break; |
| | | case Utils.SENSOR_TYPE.AGV: |
| | | curSprite.data.no = values.no; // * |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | <span>{curSprite?.data?.type}</span> |
| | | </Form.Item> |
| | | <Form.Item |
| | | label={intl.formatMessage({ id: 'map.settings.uuid', defaultMessage: '编号' })} |
| | | label={intl.formatMessage({ id: 'map.settings.uuid', defaultMessage: '地图号' })} |
| | | > |
| | | <span>{curSprite?.data?.uuid}</span> |
| | | </Form.Item> |
| | |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item |
| | | name='no' |
| | | label={intl.formatMessage({ id: 'map.settings.shelf.no', defaultMessage: '货架号' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | > |
| | | <Input |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | </> |
| | | )} |
| | | |
| | | <Form.Item |
| | | name='no' |
| | | label={intl.formatMessage({ id: 'map.settings.no', defaultMessage: '编号' })} |
| | | rules={[ |
| | | { |
| | | required: false, |
| | | }, |
| | | ]} |
| | | > |
| | | <Input |
| | | style={{ |
| | | width: '50%', |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | |
| | | <Form.Item |
| | | wrapperCol={{ |
| | | offset: 4, |
| | | span: 16, |
| | |
| | | } |
| | | |
| | | const handleFinish = (values) => { |
| | | console.log({ |
| | | ...values |
| | | , ...props.values |
| | | , autoIncrement: autoIncrement |
| | | , type: curSprite?.data?.type |
| | | }); |
| | | props.submit({ |
| | | ...values |
| | | , ...props.values |
| | |
| | | initialValues={{ |
| | | copyGap: 0, |
| | | autoIncrement: false, |
| | | incrementValue: 'row', |
| | | incrementMode: 'ascending', |
| | | }} |
| | | onFinish={handleFinish} |
| | |
| | | <> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | name='id' |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.id', defaultMessage: '序号' })} |
| | | name='incrementValue' |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.shelf.increment-value', defaultMessage: '自增长值' })} |
| | | labelCol={{ span: 8 }} |
| | | initialValue='no' |
| | | > |
| | | <Segmented |
| | | block |
| | | options={[ |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.no', defaultMessage: '编号' }), |
| | | value: 'no' |
| | | }, |
| | | ]} |
| | | onChange={(value) => { |
| | | }} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | name='incrementMode' |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.increment.mode', defaultMessage: '增长方式' })} |
| | | labelCol={{ span: 8 }} |
| | | > |
| | | <InputNumber |
| | | style={{ |
| | | width: '60%', |
| | | <Segmented |
| | | block |
| | | options={[ |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.sub.copy.ascend', defaultMessage: '升序' }), |
| | | value: 'ascending' |
| | | }, |
| | | { |
| | | label: intl.formatMessage({ id: 'map.settings.sub.copy.descend', defaultMessage: '降序' }), |
| | | value: 'descending' |
| | | }, |
| | | ]} |
| | | onChange={(value) => { |
| | | }} |
| | | min={0} |
| | | /> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | name='incrementValue' |
| | | label={intl.formatMessage({ id: 'map.settings.sub.copy.shelf.increment-value', defaultMessage: '自增长值' })} |
| | | labelCol={{ span: 8 }} |
| | | initialValue='row' |
| | | > |
| | | <Segmented |
| | | block |
| | |
| | | } |
| | | break; |
| | | case Utils.SENSOR_TYPE.AGV: |
| | | |
| | | if (values.incrementValue === 'no') { |
| | | console.log(curSprite.data.no); |
| | | if (values.incrementMode === 'descending') { |
| | | copiedSprite.data.no = Number(curSprite.data.no) - i - 1; |
| | | } else { |
| | | copiedSprite.data.no = Number(curSprite.data.no) + i + 1; |
| | | } |
| | | } |
| | | break; |
| | | default: |
| | | break; |