forked from CITKParus/P8-Panels
WEB APP: Панель "Мониторинг сборки изделий" - постраничная выдача в таблицах детализации карточки
This commit is contained in:
parent
c28c648eb8
commit
b686ae7513
@ -69,7 +69,7 @@ const STYLES = {
|
|||||||
width: "280px",
|
width: "280px",
|
||||||
borderBottom: "1px solid"
|
borderBottom: "1px solid"
|
||||||
},
|
},
|
||||||
TABLE_DETAILS: { height: "260px" },
|
TABLE_DETAILS: { height: "230px" },
|
||||||
TABLE_DETAILS_HEADER_CELL: maxWidth => ({
|
TABLE_DETAILS_HEADER_CELL: maxWidth => ({
|
||||||
padding: "2px 2px",
|
padding: "2px 2px",
|
||||||
fontSize: "11px",
|
fontSize: "11px",
|
||||||
@ -78,6 +78,7 @@ const STYLES = {
|
|||||||
...(maxWidth ? { maxWidth } : {})
|
...(maxWidth ? { maxWidth } : {})
|
||||||
}),
|
}),
|
||||||
TABLE_DETAILS_DATA_CELL: textAlign => ({ padding: "2px 2px", fontSize: "11px", ...(textAlign ? { textAlign } : {}) }),
|
TABLE_DETAILS_DATA_CELL: textAlign => ({ padding: "2px 2px", fontSize: "11px", ...(textAlign ? { textAlign } : {}) }),
|
||||||
|
TABLE_DETAILS_MORE_BUTTON: { borderRadius: "25px" },
|
||||||
CARD_DETAILS_CONTAINER: { minWidth: "1200px", maxWidth: "1400px" },
|
CARD_DETAILS_CONTAINER: { minWidth: "1200px", maxWidth: "1400px" },
|
||||||
CARD_DETAILS_NAVIGATION_STACK: { width: "100%" }
|
CARD_DETAILS_NAVIGATION_STACK: { width: "100%" }
|
||||||
};
|
};
|
||||||
@ -193,20 +194,19 @@ const ProductDetailsTable = ({ plan, product, stored, noProductMessage, noDataFo
|
|||||||
<Box sx={STYLES.BOX_INFO_SUB(!product || data.rows.length === 0)}>
|
<Box sx={STYLES.BOX_INFO_SUB(!product || data.rows.length === 0)}>
|
||||||
{!product ? (
|
{!product ? (
|
||||||
<Typography variant="UDO_body2">{noProductMessage}</Typography>
|
<Typography variant="UDO_body2">{noProductMessage}</Typography>
|
||||||
) : isLoading ? null : data.rows.length === 0 ? (
|
|
||||||
<Typography variant="subtitle2">{noDataFoundMessage}</Typography>
|
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Typography variant="h4">
|
<Typography variant="h4">
|
||||||
<b>{title}</b>
|
<b>{title}</b>
|
||||||
</Typography>
|
</Typography>
|
||||||
<P8PDataGrid
|
<P8PDataGrid
|
||||||
{...P8P_DATA_GRID_CONFIG_PROPS}
|
{...{ ...P8P_DATA_GRID_CONFIG_PROPS, noDataFoundText: isLoading ? "" : noDataFoundMessage }}
|
||||||
containerComponentProps={{ sx: STYLES.TABLE_DETAILS, elevation: 0 }}
|
containerComponentProps={{ sx: STYLES.TABLE_DETAILS, elevation: 0 }}
|
||||||
columnsDef={data.columnsDef}
|
columnsDef={data.columnsDef}
|
||||||
rows={data.rows}
|
rows={data.rows}
|
||||||
size={P8P_DATA_GRID_SIZE.SMALL}
|
size={P8P_DATA_GRID_SIZE.SMALL}
|
||||||
morePages={data.morePages}
|
morePages={data.morePages}
|
||||||
|
morePagesBtnProps={{ sx: STYLES.TABLE_DETAILS_MORE_BUTTON }}
|
||||||
fixedHeader={true}
|
fixedHeader={true}
|
||||||
reloading={false}
|
reloading={false}
|
||||||
dataCellRender={dataCellRender}
|
dataCellRender={dataCellRender}
|
||||||
|
@ -16,7 +16,7 @@ import { object2Base64XML } from "../../core/utils"; //Вспомогатель
|
|||||||
//---------
|
//---------
|
||||||
|
|
||||||
//Размер страницы данных
|
//Размер страницы данных
|
||||||
const DATA_GRID_PAGE_SIZE = 0;
|
const DATA_GRID_PAGE_SIZE = 50;
|
||||||
|
|
||||||
//-----------
|
//-----------
|
||||||
//Тело модуля
|
//Тело модуля
|
||||||
@ -194,7 +194,7 @@ const useProductDetailsTable = (plan, product, orders, pageNumber, stored) => {
|
|||||||
CORDERS: { VALUE: object2Base64XML(orders, { arrayNodeName: "orders" }), SDATA_TYPE: SERV_DATA_TYPE_CLOB },
|
CORDERS: { VALUE: object2Base64XML(orders, { arrayNodeName: "orders" }), SDATA_TYPE: SERV_DATA_TYPE_CLOB },
|
||||||
NPAGE_NUMBER: pageNumber,
|
NPAGE_NUMBER: pageNumber,
|
||||||
NPAGE_SIZE: DATA_GRID_PAGE_SIZE,
|
NPAGE_SIZE: DATA_GRID_PAGE_SIZE,
|
||||||
NINCLUDE_DEF: 1
|
NINCLUDE_DEF: pageNumber == 1 ? 1 : 0
|
||||||
},
|
},
|
||||||
respArg: "COUT"
|
respArg: "COUT"
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user