diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js index 62dd2d8..530291a 100644 --- a/src/components/Common/Typesetting/typesetting.js +++ b/src/components/Common/Typesetting/typesetting.js @@ -184,8 +184,8 @@ const Typesetting = props => { let DisableMateriallIcon = L ? sPackDetailPath : null; // 盒子展长展开公式计算 - const innerWidth = evaluateFormula(sLengthFormula, variabless); - const innerHeight = evaluateFormula(sWidthFormula, variabless); + const innerWidth = slaveRowData.sTypes === "6" ? evaluateFormula(sWidthFormula, variabless) : evaluateFormula(sLengthFormula, variabless); + const innerHeight = slaveRowData.sTypes === "6" ? evaluateFormula(sLengthFormula, variabless) : evaluateFormula(sWidthFormula, variabless); const { sSettingMethod, sSGroupOffset, iFAngle, iSAngle, sSecondorizontalOffset, sSecondLongitudinalOffset } = radioValue ? radioValue : {}; const dFWidthOffset = evaluateFormula(radioValue?.sFWidthOffset, variabless); // 首盒纵向偏移 const dFLengthOffset = evaluateFormula(radioValue?.sFLengthOffset, variabless); // 首盒横向偏移 @@ -249,6 +249,7 @@ const Typesetting = props => { const commonHeightCheck = remainingHeight > jInnerHeight; const commonWidthCheck = remainingWidth > jInnerWidth; const isCustomized = bAdvancedSetting; + let remaining = isVertical ? commonHeightCheck : commonWidthCheck; // const remaining = false; @@ -497,7 +498,15 @@ const Typesetting = props => { } } } - + // 如果第一行只能放下一个 + if (cols === 0 && !isVertical) { + const maxLength = Number(slaveDataDetail?.dMaxLength); + if (maxLength > innerWidth) { + let leftPosition = 0; + let topPosition = 0; + innerDivs.push(createBoxOne(0, rows, 3, leftPosition + dZBLB, topPosition + dSBLB, iFAngle, DisableMateriallIcon)); + } + } // 判断展开长展开宽是否变化 if (dPartsLength !== innerWidth && !innerDivs.length) { setDPartsLength(innerWidth); @@ -513,7 +522,7 @@ const Typesetting = props => { const propsDataHeight = Number(propsData.props.style.height.slice(0, -2)); const propsDataTop = Number(propsData.props.style.top.slice(0, -2)); // 判断列是否是单独的 - const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined); // 原纸长 + const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) - dYBJJ; // 原纸长 const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; // 计算开数 const dSinglePQty = isVertical @@ -537,7 +546,6 @@ const Typesetting = props => { newDHorizontalType !== dHorizontalType || newDPortraitType !== dPortraitType ) { - setMaterialLength(newMaterialLength); setMaterialWidth(newMaterialWidth); setMaterialName(sMaterialsName); @@ -915,7 +923,14 @@ const Typesetting = props => { ) : ( - "" +