Commit 1bc3c73f8ae1809e69c6ea62367416b971b75293
1 parent
da163065
排版
Showing
2 changed files
with
24 additions
and
19 deletions
src/components/Common/Typesetting/typesetting.js
| ... | ... | @@ -468,12 +468,14 @@ const Typesetting = props => { |
| 468 | 468 | // 生成里层 div 的数组 |
| 469 | 469 | const innerDivs = []; |
| 470 | 470 | // 如果第一列 |
| 471 | - if (rows === 0) { | |
| 472 | - const maxWidth = Number(slaveDataDetail?.dMaxWidth) | |
| 473 | - if (maxWidth > innerHeight) { | |
| 474 | - rows = 1 | |
| 475 | - } | |
| 476 | - } | |
| 471 | + // if (rows === 0) { | |
| 472 | + // const maxWidth = Number(slaveDataDetail?.dMaxWidth) | |
| 473 | + // if (maxWidth > innerHeight) { | |
| 474 | + // rows = 1 | |
| 475 | + // } | |
| 476 | + // } | |
| 477 | + console.log(cols,rows,'rows'); | |
| 478 | + | |
| 477 | 479 | for (let col = 0; col < cols; col++) { |
| 478 | 480 | for (let row = 0; row < rows; row++) { |
| 479 | 481 | const leftPosition = col * innerWidthCombined; |
| ... | ... | @@ -540,6 +542,7 @@ const Typesetting = props => { |
| 540 | 542 | // 判断列是否是单独的 |
| 541 | 543 | const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) - dYBJJ; // 原纸长 |
| 542 | 544 | const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; |
| 545 | + console.log("🚀 ~ newMaterialWidth:",propsData,propsDataTop,propsDataHeight, newMaterialWidth,newMaterialLength) | |
| 543 | 546 | |
| 544 | 547 | // 计算开数 |
| 545 | 548 | const dSinglePQty = isVertical |
| ... | ... | @@ -631,7 +634,8 @@ const Typesetting = props => { |
| 631 | 634 | Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength) && |
| 632 | 635 | Number(slaveDataDetail?.dMaxWidth) >= Number(slaveRowData?.dMachineWidth); |
| 633 | 636 | |
| 634 | - const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length; | |
| 637 | + const isShow =slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length; | |
| 638 | +console.log( slaveDataDetail?.dMaxLength,slaveDataDetail?.dMaxWidth,slaveRowData?.dMachineLength,slaveRowData?.dMachineWidth,isMax,isShow,'isMax'); | |
| 635 | 639 | |
| 636 | 640 | if (isCustomized && !isShow) { |
| 637 | 641 | if (isMobile) return; | ... | ... |
src/components/QuickQuote/index.jsx
| ... | ... | @@ -1761,23 +1761,24 @@ const BoxComponent = props => { |
| 1761 | 1761 | dHorizontalType: dHorizontalType, // 判断 |
| 1762 | 1762 | dPortraitType: dPortraitType, |
| 1763 | 1763 | }; |
| 1764 | - let juantongConfig = { | |
| 1764 | + let juantongConfig = {}; | |
| 1765 | + | |
| 1766 | + if (selectedNode.sTypeKey === "juantong") { | |
| 1767 | + console.log(selectedNode.sTypeKey,'sTypeKey'); | |
| 1765 | 1768 | |
| 1766 | - } | |
| 1767 | - if (selectedNode.sTypeKey === 'juantong') { | |
| 1768 | - const {dYBJJ,dXBJJ,dZBLB} = slaveData[index] | |
| 1769 | + const { dYBJJ, dXBJJ, dZBLB } = slaveData[index]; | |
| 1769 | 1770 | juantongConfig = { |
| 1770 | - dColGap:dYBJJ, | |
| 1771 | - dRowGap:dXBJJ, | |
| 1772 | - iCol:dPortraitType, | |
| 1773 | - iRow:dHorizontalType, | |
| 1774 | - dCutEdge:dZBLB | |
| 1775 | - } | |
| 1771 | + dColGap: dYBJJ, | |
| 1772 | + dRowGap: dXBJJ, | |
| 1773 | + iCol: dPortraitType, | |
| 1774 | + iRow: dHorizontalType, | |
| 1775 | + dCutEdge: dZBLB, | |
| 1776 | + }; | |
| 1776 | 1777 | } |
| 1777 | 1778 | const newSlaveData = { |
| 1779 | + ...updatedProduct, | |
| 1778 | 1780 | ...juantongConfig, |
| 1779 | - ...updatedProduct | |
| 1780 | - } | |
| 1781 | + }; | |
| 1781 | 1782 | // 更新状态 |
| 1782 | 1783 | props.setState(prevState => ({ |
| 1783 | 1784 | ...prevState, | ... | ... |