ЦИТК-930 - Доработана панель "Мониторинг сборки изделий"

This commit is contained in:
Dollerino 2024-11-28 18:18:44 +03:00
parent 49309e5c0e
commit c84b96f21e
4 changed files with 48 additions and 37 deletions

View File

@ -15,6 +15,7 @@ import { P8PSVG } from "../../../components/p8p_svg"; //Интерактивны
import { P8P_DATA_GRID_CONFIG_PROPS } from "../../../config_wrapper"; //Подключение компонентов к настройкам приложения
import { useCostProductComposition, useProductDetailsTable } from "../hooks"; //Вспомогательные хуки
import { ProgressBox } from "./progress_box"; //Информация по прогрессу объекта
import { APP_STYLES } from "../../../../app.styles"; //Типовые стили
//---------
//Константы
@ -26,6 +27,7 @@ const STYLES = {
border: "1px solid",
borderRadius: "25px",
height: "35vh",
minHeight: "250px",
backgroundColor: "background.detail_table"
},
BOX_INFO_SUB: isMessage => ({
@ -47,6 +49,7 @@ const STYLES = {
border: "1px solid",
borderRadius: "25px",
height: "17vh",
minHeight: "120px",
backgroundColor: "background.detail_info"
},
PRODUCT_SELECTOR_CONTAINER: {
@ -57,6 +60,7 @@ const STYLES = {
border: "1px solid",
borderRadius: "25px",
height: "53vh",
minHeight: "379px",
marginTop: "16px",
backgroundColor: "background.product_selector"
},
@ -72,7 +76,12 @@ const STYLES = {
width: "280px",
borderBottom: "1px solid"
},
TABLE_DETAILS: { backgroundColor: "background.detail_table", height: "240px" },
TABLE_DETAILS: {
backgroundColor: "background.detail_table",
height: "28vh",
minHeight: "187px",
...APP_STYLES.SCROLL
},
TABLE_DETAILS_HEADER_CELL: maxWidth => ({
backgroundColor: "background.detail_table",
color: "text.detail_table.fontColor",
@ -107,7 +116,7 @@ const PlanSpecInfo = ({ planSpec }) => {
<Box sx={STYLES.PLAN_INFO_MAIN}>
<Box sx={STYLES.PLAN_INFO_SUB}>
<Typography variant="PlanSpecInfo" mt={1}>
Номер изделия:
Номер заказа:
</Typography>
<Typography variant="subtitle2">{planSpec.SNUMB}</Typography>
</Box>

View File

@ -72,7 +72,7 @@ const PlanSpecsListItem = ({ card, cardIndex, onClick }) => {
<PlanSpecsListItemImage card={card} />
<Box textAlign="center" height="70px">
<Typography variant="PlanSpecInfo" sx={STYLES.TEXT_INFO_FIELD}>
Номер изделия
Номер заказа
</Typography>
<Typography variant="h2">{card.SNUMB || "-"}</Typography>
</Box>

View File

@ -240,26 +240,32 @@ const MechRecAssemblyMon = () => {
</Stack>
{state.init == true ? (
state.selectedPlanCtlg.NRN ? (
<>
<Typography variant="h3" sx={STYLES.MAIN_TITLE} pb={2}>
{title}
state.planSpecs.length !== 0 ? (
<>
<Typography variant="h3" sx={STYLES.MAIN_TITLE} pb={2}>
{title}
</Typography>
{state.planSpecsLoaded == true ? (
state.selectedPlanSpec.NRN ? (
<PlanSpecDetail
planSpec={state.selectedPlanSpec}
disableNavigatePrev={planDetailNavigation.disableNavigatePrev}
disableNavigateNext={planDetailNavigation.disableNavigateNext}
onNavigate={handlePlanDetailNavigateClick}
onBack={handlePlanDetailBackClick}
/>
) : (
<Box sx={STYLES.PLANS_LIST_BOX}>
<PlanSpecsList planSpecs={state.planSpecs} onItemClick={handlePlanClick} />
</Box>
)
) : null}
</>
) : (
<Typography variant="h4" sx={STYLES.MAIN_TITLE}>
В каталоге планов отсутствуют записи подходящих первичных документов
</Typography>
{state.planSpecsLoaded == true ? (
state.selectedPlanSpec.NRN ? (
<PlanSpecDetail
planSpec={state.selectedPlanSpec}
disableNavigatePrev={planDetailNavigation.disableNavigatePrev}
disableNavigateNext={planDetailNavigation.disableNavigateNext}
onNavigate={handlePlanDetailNavigateClick}
onBack={handlePlanDetailBackClick}
/>
) : (
<Box sx={STYLES.PLANS_LIST_BOX}>
<PlanSpecsList planSpecs={state.planSpecs} onItemClick={handlePlanClick} />
</Box>
)
) : null}
</>
)
) : (
<Typography variant="h4" sx={STYLES.MAIN_TITLE}>
Укажите каталог планов для отображения спецификаций

View File

@ -6218,16 +6218,18 @@ create or replace package body PKG_P8PANELS_MECHREC as
D_YEAR(SP.REP_DATE_TO) NYEAR,
COALESCE(SP.LABOUR_FACT, 0) NLABOUR_FACT,
COALESCE(SP.LABOUR_PLAN, 0) NLABOUR_PLAN
from FCPRODPLAN P
left outer join FCPRODPLANSP SP
on P.RN = SP.PRN
and ((SP.LABOUR_PLAN is not null) or (SP.LABOUR_FACT is not null)), FINSTATE FS, ENPERIOD EN
from FCPRODPLAN P,
FCPRODPLANSP SP,
FINSTATE FS,
ENPERIOD EN
where P.CRN = NCRN
and P.CATEGORY = NFCPRODPLAN_CATEGORY_MON
and P.STATUS = NFCPRODPLAN_STATUS_MON
and FS.RN = P.TYPE
and FS.CODE = SFCPRODPLAN_TYPE_MON
and EN.RN = P.CALC_PERIOD
and SP.PRN = P.RN
and ((SP.LABOUR_PLAN is not null) or (SP.LABOUR_FACT is not null))
and exists (select /*+ INDEX(UP I_USERPRIV_JUR_PERS_ROLEID) */
null
from USERPRIV UP
@ -6327,6 +6329,10 @@ create or replace package body PKG_P8PANELS_MECHREC as
and P.CATEGORY = NFCPRODPLAN_CATEGORY_MON
and P.STATUS = NFCPRODPLAN_STATUS_MON
and P.COMPANY = GET_SESSION_COMPANY()
and exists (select null
from FCPRODPLANSP S
where S.PRN = P.RN
and ((S.LABOUR_PLAN is not null) or (S.LABOUR_FACT is not null)))
and exists (select /*+ INDEX(UP I_USERPRIV_JUR_PERS_ROLEID) */
null
from USERPRIV UP
@ -6424,17 +6430,7 @@ create or replace package body PKG_P8PANELS_MECHREC as
into NRESULT
from FCPRODPLAN T,
FCPRODPLANSP S
where T.RN = (select P.RN
from DOCLINKS L,
FCPRODPLAN P,
FCPRODPLANSP SP
where SP.RN = NFCPRODPLANSP
and L.IN_DOCUMENT = SP.PRN
and L.IN_UNITCODE = 'CostProductPlans'
and L.OUT_UNITCODE = 'CostProductPlans'
and P.RN = L.OUT_DOCUMENT
and P.CATEGORY = 1
and ROWNUM = 1)
where S.PRN_NODE = NFCPRODPLANSP
and S.PRN = T.RN
and S.PRODCMPSP = NPRODCMPSP;
exception