#
luxiaotao1123
2024-09-18 bd2f696397496ff4ecc30cc8060996dd6ccf5282
#
2个文件已修改
1个文件已添加
71 ■■■■■ 已修改文件
zy-acs-flow/src/page/loc/LocList.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/rowSx.jsx 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/LocList.jsx
@@ -45,6 +45,7 @@
import * as Common from '@/utils/common';
import RepartitionIcon from '@mui/icons-material/Repartition';
import LocInit from "./LocInit";
import rowSx from "./rowSx";
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
    '& .css-1vooibu-MuiSvgIcon-root': {
@@ -141,6 +142,7 @@
                    expand={() => <LocPanel />}
                    expandSingle={true}
                    omit={['id', 'locType', 'uuid', 'statusBool', 'updateBy', 'createTime', 'createBy', 'memo']}
                    rowSx={rowSx(drawerVal || null)}
                >
                    <NumberField source="id" />
                    <TextField source="locNo" label="table.field.loc.locNo" />
zy-acs-flow/src/page/loc/rowSx.jsx
New file
@@ -0,0 +1,63 @@
import green from '@mui/material/colors/green';
import orange from '@mui/material/colors/orange';
import red from '@mui/material/colors/red';
import blue from '@mui/material/colors/blue';
import grey from '@mui/material/colors/grey';
const rowSx = (selectedRow) => (record) => {
    let style = {};
    if (!record) {
        return style;
    }
    if (selectedRow && selectedRow.id === record.id) {
        style = {
            ...style,
            backgroundColor: 'action.selected',
        };
    }
    if (record.locSts$ === '空闲')
        return {
            ...style,
            borderLeftColor: green[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.locSts$ === '在库')
        return {
            ...style,
            borderLeftColor: blue[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.locSts$ === '禁用')
        return {
            ...style,
            borderLeftColor: red[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.locSts$ === '入库预约')
        return {
            ...style,
            borderLeftColor: orange[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.locSts$ === '出库预约')
        return {
            ...style,
            borderLeftColor: orange[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    if (record.locSts$ === '其他')
        return {
            ...style,
            borderLeftColor: grey[500],
            borderLeftWidth: 5,
            borderLeftStyle: 'solid',
        };
    return style;
};
export default rowSx;
zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
@@ -51,6 +51,12 @@
    '& .RaDatagrid-row': {
        cursor: 'auto'
    },
    '& .column-url': {
        maxWidth: '16em',
        overflow: 'hidden',
        textOverflow: 'ellipsis',
        whiteSpace: 'nowrap',
    },
    '& .column-request': {
        maxWidth: '18em',
        overflow: 'hidden',