Commit b5759a1d39970dc1e8dd2a49b19ea603be882c2c
1 parent
1cbbd392
修复排版一个展示不下的问题
Showing
2 changed files
with
24 additions
and
7 deletions
src/components/Common/Typesetting/typesetting.js
| ... | ... | @@ -184,8 +184,8 @@ const Typesetting = props => { |
| 184 | 184 | |
| 185 | 185 | let DisableMateriallIcon = L ? sPackDetailPath : null; |
| 186 | 186 | // 盒子展长展开公式计算 |
| 187 | - const innerWidth = evaluateFormula(sLengthFormula, variabless); | |
| 188 | - const innerHeight = evaluateFormula(sWidthFormula, variabless); | |
| 187 | + const innerWidth = slaveRowData.sTypes === "6" ? evaluateFormula(sWidthFormula, variabless) : evaluateFormula(sLengthFormula, variabless); | |
| 188 | + const innerHeight = slaveRowData.sTypes === "6" ? evaluateFormula(sLengthFormula, variabless) : evaluateFormula(sWidthFormula, variabless); | |
| 189 | 189 | const { sSettingMethod, sSGroupOffset, iFAngle, iSAngle, sSecondorizontalOffset, sSecondLongitudinalOffset } = radioValue ? radioValue : {}; |
| 190 | 190 | const dFWidthOffset = evaluateFormula(radioValue?.sFWidthOffset, variabless); // 首盒纵向偏移 |
| 191 | 191 | const dFLengthOffset = evaluateFormula(radioValue?.sFLengthOffset, variabless); // 首盒横向偏移 |
| ... | ... | @@ -249,6 +249,7 @@ const Typesetting = props => { |
| 249 | 249 | const commonHeightCheck = remainingHeight > jInnerHeight; |
| 250 | 250 | const commonWidthCheck = remainingWidth > jInnerWidth; |
| 251 | 251 | const isCustomized = bAdvancedSetting; |
| 252 | + | |
| 252 | 253 | let remaining = isVertical ? commonHeightCheck : commonWidthCheck; |
| 253 | 254 | // const remaining = false; |
| 254 | 255 | |
| ... | ... | @@ -497,7 +498,15 @@ const Typesetting = props => { |
| 497 | 498 | } |
| 498 | 499 | } |
| 499 | 500 | } |
| 500 | - | |
| 501 | + // 如果第一行只能放下一个 | |
| 502 | + if (cols === 0 && !isVertical) { | |
| 503 | + const maxLength = Number(slaveDataDetail?.dMaxLength); | |
| 504 | + if (maxLength > innerWidth) { | |
| 505 | + let leftPosition = 0; | |
| 506 | + let topPosition = 0; | |
| 507 | + innerDivs.push(createBoxOne(0, rows, 3, leftPosition + dZBLB, topPosition + dSBLB, iFAngle, DisableMateriallIcon)); | |
| 508 | + } | |
| 509 | + } | |
| 501 | 510 | // 判断展开长展开宽是否变化 |
| 502 | 511 | if (dPartsLength !== innerWidth && !innerDivs.length) { |
| 503 | 512 | setDPartsLength(innerWidth); |
| ... | ... | @@ -513,7 +522,7 @@ const Typesetting = props => { |
| 513 | 522 | const propsDataHeight = Number(propsData.props.style.height.slice(0, -2)); |
| 514 | 523 | const propsDataTop = Number(propsData.props.style.top.slice(0, -2)); |
| 515 | 524 | // 判断列是否是单独的 |
| 516 | - const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined); // 原纸长 | |
| 525 | + const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) - dYBJJ; // 原纸长 | |
| 517 | 526 | const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; |
| 518 | 527 | // 计算开数 |
| 519 | 528 | const dSinglePQty = isVertical |
| ... | ... | @@ -537,7 +546,6 @@ const Typesetting = props => { |
| 537 | 546 | newDHorizontalType !== dHorizontalType || |
| 538 | 547 | newDPortraitType !== dPortraitType |
| 539 | 548 | ) { |
| 540 | - | |
| 541 | 549 | setMaterialLength(newMaterialLength); |
| 542 | 550 | setMaterialWidth(newMaterialWidth); |
| 543 | 551 | setMaterialName(sMaterialsName); |
| ... | ... | @@ -915,7 +923,14 @@ const Typesetting = props => { |
| 915 | 923 | </div> |
| 916 | 924 | </div> |
| 917 | 925 | ) : ( |
| 918 | - "" | |
| 926 | + <div style={{ | |
| 927 | + width:'100%', | |
| 928 | + textAlign:'center', | |
| 929 | + height:'300px', | |
| 930 | + lineHeight:'300px', | |
| 931 | + fontSize:'20px', | |
| 932 | + fontWeight:'700' | |
| 933 | + }}>排版尺寸大于上机尺寸,请确认参数!</div> | |
| 919 | 934 | )} |
| 920 | 935 | |
| 921 | 936 | <Modal | ... | ... |
src/mobile/components/SelectInput.jsx
| ... | ... | @@ -104,6 +104,7 @@ const SelectInput = props => { |
| 104 | 104 | if (!visible) return; |
| 105 | 105 | let { sDropDownType, sVisColumnName } = itemDetail; |
| 106 | 106 | if (sVisColumnName && sVisColumnName === "sProcessName") { |
| 107 | + | |
| 107 | 108 | if (sDropDownType === "sql") { |
| 108 | 109 | if (itemDetail.sParamDropDown) { |
| 109 | 110 | const { sParamDropDown = "", sName0, sName } = itemDetail; |
| ... | ... | @@ -140,6 +141,7 @@ const SelectInput = props => { |
| 140 | 141 | |
| 141 | 142 | // getSqlDropDownData(searchValue); |
| 142 | 143 | } else if ((sDropDownType = "const")) { |
| 144 | + | |
| 143 | 145 | if (!itemDetail.showDropDown) return; |
| 144 | 146 | const list = Object.entries(JSON.parse(itemDetail.showDropDown)).map(([key, value]) => ({ |
| 145 | 147 | label: value, |
| ... | ... | @@ -198,7 +200,7 @@ const SelectInput = props => { |
| 198 | 200 | }} |
| 199 | 201 | readOnly={bReadonly} |
| 200 | 202 | /> |
| 201 | - {itemDetail.sDropDownType === 'sql'? ( | |
| 203 | + {(itemDetail.sDropDownType === 'sql' || itemDetail.sDropDownType === 'const')? ( | |
| 202 | 204 | <div className={styles.icons} onClick={clickBtn}> |
| 203 | 205 | <DownOutline /> |
| 204 | 206 | </div> | ... | ... |