#
luxiaotao1123
2024-04-10 ab584662c1fd459d6e9a7d530b334a123dd2b0c4
#
1个文件已添加
2个文件已修改
150 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/drawer/lift/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/lift/view.jsx 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
@@ -5,17 +5,31 @@
import * as Utils from '../../utils'
import Http from '@/utils/http';
import ShowJson from '../showJson';
const useStyles = createStyles(({ token, css }) => {
})
import LiftView from './view'
const LiftDrawer = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const [activeTabKey, setActiveTabKey] = useState('json');
    const { curSprite, curFloor } = props;
    const [activeTabKey, setActiveTabKey] = useState('view');
    const [curNo, setCurNo] = React.useState(''); // just used to modify the drawer title
    useEffect(() => {
        if (!curSprite) {
            return
        }
        props.setDrawerTitle(intl.formatMessage({ id: 'map.loc.no', defaultMessage: '库位号' }) + ': ' + curNo);
    }, [curNo]);
    const contentList = {
        view: (
            <LiftView
                curNo={curNo}
                data={curSprite.data}
                curFloor={curFloor}
            />
        ),
        json: (
            <ShowJson
                data={props.curSprite.data}
@@ -32,6 +46,10 @@
                type='inner'
                tabList={[
                    {
                        key: 'view',
                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '库位信息' }),
                    },
                    {
                        key: 'json',
                        tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
                    },
zy-asrs-flow/src/pages/map/drawer/lift/view.jsx
New file
@@ -0,0 +1,118 @@
import React, { useState, useRef, useEffect } from 'react';
import { Spin, Descriptions, Button } from 'antd';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { LoadingOutlined } from '@ant-design/icons';
import { createStyles } from 'antd-style';
import * as Utils from '../../utils'
import Http from '@/utils/http';
const useStyles = createStyles(({ token, css }) => {
    return {
        infoBox: {
            height: '100%',
            display: 'flex',
            gap: '0px',
        },
        threeInfo: {
            height: '100%',
            width: '60%',
        },
        spinWrapper: {
            height: '100%',
        },
        threeContainer: {
            zIndex: 99,
            width: '100%',
            height: '100%',
        },
        tableInfo: {
            height: '100%',
            width: '40%',
            padding: '0 10px 0 15px',
            overflow: 'auto',
        },
        tableButton: {
            width: '100%',
            marginBottom: '10px',
            fontWeight: 'bold',
            letterSpacing: '1px',
        }
    }
})
const LiftView = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const { data } = props;
    const [loading, setLoading] = React.useState(false);
    useEffect(() => {
        setLoading(true);
        setTimeout(() => {
            setLoading(false);
        }, 300)
    }, [data]);
    return (
        <>
            <div className={styles.infoBox}>
                <div className={`${styles.threeInfo} three-spin`}>
                    <Spin
                        spinning={loading}
                        indicator={<LoadingOutlined spin />}
                        size={'large'}
                        wrapperClassName={styles.spinWrapper}
                    >
                    </Spin>
                </div>
                <div className={styles.tableInfo}>
                    <Descriptions
                        bordered
                        layout="vertical"
                        column={1}
                        items={
                            [
                                {
                                    key: '1',
                                    label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '库位号' }),
                                },
                                {
                                    key: '2',
                                    label: intl.formatMessage({ id: 'map.pallet.barcode', defaultMessage: '托盘条码' }),
                                    children: '80000010',
                                },
                                {
                                    key: '3',
                                    label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '是否启用' }),
                                    children: 'Disabled',
                                },
                                {
                                    key: '4',
                                    label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '库位操作' }),
                                    children: (
                                        <>
                                            <Button className={styles.tableButton} size='large' type="primary" danger>
                                                <FormattedMessage id='map.loc.lock' defaultMessage='锁定' />
                                            </Button>
                                            <Button className={styles.tableButton} size='large' disabled>
                                                <FormattedMessage id='map.loc.unlock' defaultMessage='解锁' />
                                            </Button>
                                            <Button className={styles.tableButton} size='large'>
                                                <FormattedMessage id='map.loc.reset' defaultMessage='清除库位' />
                                            </Button>
                                        </>
                                    )
                                },
                            ]
                        }
                    />
                </div>
            </div>
        </>
    )
}
export default LiftView;
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
@@ -29,7 +29,7 @@
    private DictService dictService;
    public String getMapFloorList(Long userId) {
        String floorKey = "map-floor-list";
        String floorKey = "floor-list";
        Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, floorKey));
        if (null == dict) {
            dict = new Dict();