Commit 1bc3c73f8ae1809e69c6ea62367416b971b75293

Authored by 陈鑫涛
1 parent da163065

排版

src/components/Common/Typesetting/typesetting.js
@@ -468,12 +468,14 @@ const Typesetting = props => { @@ -468,12 +468,14 @@ const Typesetting = props => {
468 // 生成里层 div 的数组 468 // 生成里层 div 的数组
469 const innerDivs = []; 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 for (let col = 0; col < cols; col++) { 479 for (let col = 0; col < cols; col++) {
478 for (let row = 0; row < rows; row++) { 480 for (let row = 0; row < rows; row++) {
479 const leftPosition = col * innerWidthCombined; 481 const leftPosition = col * innerWidthCombined;
@@ -540,6 +542,7 @@ const Typesetting = props =&gt; { @@ -540,6 +542,7 @@ const Typesetting = props =&gt; {
540 // 判断列是否是单独的 542 // 判断列是否是单独的
541 const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) - dYBJJ; // 原纸长 543 const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) - dYBJJ; // 原纸长
542 const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; 544 const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB;
  545 + console.log("🚀 ~ newMaterialWidth:",propsData,propsDataTop,propsDataHeight, newMaterialWidth,newMaterialLength)
543 546
544 // 计算开数 547 // 计算开数
545 const dSinglePQty = isVertical 548 const dSinglePQty = isVertical
@@ -631,7 +634,8 @@ const Typesetting = props =&gt; { @@ -631,7 +634,8 @@ const Typesetting = props =&gt; {
631 Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength) && 634 Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength) &&
632 Number(slaveDataDetail?.dMaxWidth) >= Number(slaveRowData?.dMachineWidth); 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 if (isCustomized && !isShow) { 640 if (isCustomized && !isShow) {
637 if (isMobile) return; 641 if (isMobile) return;
src/components/QuickQuote/index.jsx
@@ -1761,23 +1761,24 @@ const BoxComponent = props =&gt; { @@ -1761,23 +1761,24 @@ const BoxComponent = props =&gt; {
1761 dHorizontalType: dHorizontalType, // 判断 1761 dHorizontalType: dHorizontalType, // 判断
1762 dPortraitType: dPortraitType, 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 juantongConfig = { 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 const newSlaveData = { 1778 const newSlaveData = {
  1779 + ...updatedProduct,
1778 ...juantongConfig, 1780 ...juantongConfig,
1779 - ...updatedProduct  
1780 - } 1781 + };
1781 // 更新状态 1782 // 更新状态
1782 props.setState(prevState => ({ 1783 props.setState(prevState => ({
1783 ...prevState, 1784 ...prevState,