Commit 691cc11f85b2017b8735b4188615880313bc1a7d

Authored by 陈鑫涛
1 parent b0087800

门幅卷筒展示

src/components/Common/BoxShowImgMaterial/indexNew.js
1 1 /* eslint-disable */
2 2 import React, { useEffect, useState, useRef } from "react";
3   -import { VerticalLeftOutlined, VerticalRightOutlined } from "@ant-design/icons";
  3 +import { VerticalLeftOutlined, VerticalRightOutlined, ArrowRightOutlined } from "@ant-design/icons";
4 4 import styles from "./index.less";
5 5 import { bottom } from "react-grid-layout/build/utils";
6 6 import { transform } from "@antv/g2/lib/util/transform";
... ... @@ -23,6 +23,7 @@ const BoxShowImgMaterial = props => {
23 23 var { dMaxLength, dMaxWidth, dMachineLength, dMachineWidth, dWlcd, dWlkd, dSBLB, dXBLB, dZBLB, dYBLB, scale } = slaveDataDetail;
24 24 }
25 25 // 计算可以放置的盒子数量
  26 + const isJuantong = selectedNode.sTypeKey === "juantong";
26 27 const horizontalBoxes = Math.floor(dWlcd / dMachineLength);
27 28 const verticalBoxes = Math.floor(dWlkd / dMachineWidth);
28 29 const scaleX = (clientWidth - 100) / Number(dWlcd);
... ... @@ -136,10 +137,14 @@ const BoxShowImgMaterial = props => {
136 137 <span
137 138 style={{
138 139 color: "red",
  140 + position: "relative",
  141 + display: "inline-block",
139 142 }}
140 143 >
141 144 {dMachineWidth}
142 145 </span>
  146 +
  147 +
143 148 <VerticalLeftOutlined
144 149 style={{
145 150 position: "absolute",
... ... @@ -159,6 +164,31 @@ const BoxShowImgMaterial = props =&gt; {
159 164 }}
160 165 />
161 166 </div>
  167 + {/* <div
  168 + style={{
  169 + position: "absolute",
  170 + top: "120px",
  171 + right: "-0px",
  172 + height: `${dMachineWidth * scaleY}px`,
  173 + lineHeight: `${dMachineWidth * scaleY}px`,
  174 + fontSize: `${size || 11}px`,
  175 + textAlign: "center",
  176 + width: "30px",
  177 + transform: `scale(${1 / scaleX}, ${1 / scaleY})`,
  178 + transformOrigin: "top left",
  179 + writingMode:'vertical-rl',
  180 + color:'red',
  181 + display:'flex',
  182 + alignItems:'center',
  183 + justifyContent: 'center',
  184 + textOrientation: 'upright'
  185 + }}
  186 + >
  187 + {isJuantong ? "门幅方向" : ""}
  188 + </div>
  189 + <div>
  190 + <ArrowRightOutlined />
  191 + </div> */}
162 192 </div>
163 193 );
164 194 }
... ... @@ -185,14 +215,14 @@ const BoxShowImgMaterial = props =&gt; {
185 215 textRefs.current.style.transformOrigin = "top left";
186 216 }
187 217 }, 10);
188   - }, [scaleX,scaleY]);
  218 + }, [scaleX, scaleY]);
189 219 const isMax = slaveDataDetail?.dMaxWidth * slaveDataDetail?.dMaxLength > slaveDataDetail?.dMachineLength * slaveDataDetail?.dMachineWidth;
190 220 const isDPartsLength = slaveDataDetail?.dPartsLength < slaveDataDetail?.dMaxLength && slaveDataDetail?.dPartsWidth < slaveDataDetail?.dMaxWidth;
191 221  
192 222 const isShow =
193 223 isDPartsLength && slaveDataDetail && slaveDataDetail.dMachineLength && slaveDataDetail.dMaxWidth && slaveDataDetail.dMaxLength && isMax;
194   -
195   - return (
  224 +
  225 + return (
196 226 <>
197 227 {isShow ? (
198 228 <div
... ... @@ -215,7 +245,7 @@ const BoxShowImgMaterial = props =&gt; {
215 245 style={{
216 246 position: "absolute",
217 247 left: "0px",
218   - width: `${(dWlcd * (clientWidth - 100)) / (dWlcd)}px`,
  248 + width: `${(dWlcd * (clientWidth - 100)) / dWlcd}px`,
219 249 fontSize: `${size || 11}px`,
220 250 textAlign: "center",
221 251 height: "30px",
... ...
src/components/Common/Typesetting/typesetting.js
1 1 /* eslint-disable */
2   -import * as commonFunc from '@/components/Common/commonFunc';
3   -import {
4   - DownOutlined,
5   - LeftOutlined,
6   - RightOutlined,
7   - UpOutlined,
8   - VerticalLeftOutlined,
9   - VerticalRightOutlined,
10   -} from '@ant-design/icons';
11   -import { message, Modal } from 'antd-v4';
12   -import React, { useEffect, useRef, useState } from 'react';
13   -
14   -import DynamicSVG from '../../Common/BoxDesignCompontent/svg';
15   -import styles from './index.less';
  2 +import * as commonFunc from "@/components/Common/commonFunc";
  3 +import { DownOutlined, LeftOutlined, RightOutlined, UpOutlined, VerticalLeftOutlined, VerticalRightOutlined } from "@ant-design/icons";
  4 +import { message, Modal } from "antd-v4";
  5 +import React, { useEffect, useRef, useState } from "react";
  6 +import { ArrowRightOutlined } from "@ant-design/icons";
  7 +import DynamicSVG from "../../Common/BoxDesignCompontent/svg";
  8 +import styles from "./index.less";
16 9  
17 10 const Typesetting = props => {
18 11 const {
... ... @@ -47,7 +40,7 @@ const Typesetting = props =&gt; {
47 40 } = slaveRowData;
48 41  
49 42 const { masterData, selectedNode, slaveData } = state;
50   - if (!masterData) return
  43 + if (!masterData) return;
51 44 // 如果是卷筒类 那么上下左右留白等于左留白
52 45 if (selectedNode && selectedNode.sTypeKey === "juantong") {
53 46 dSBLB = dZBLB;
... ... @@ -70,7 +63,7 @@ const Typesetting = props =&gt; {
70 63 const [dPartsLength, setDPartsLength] = useState(0);
71 64 const [newDHorizontalType, setNewDHorizontalType] = useState(0);
72 65 const [newDPortraitType, setNewDPortraitType] = useState(0);
73   - const [oldVariables, setOldVariables] = useState('')
  66 + const [oldVariables, setOldVariables] = useState("");
74 67 // 横板
75 68 let { dHorizontal, dPortrait, dHorizontalType, dPortraitType } = slaveRowData;
76 69 // 使用 useRef 获取 DOM 元素
... ... @@ -116,7 +109,6 @@ const Typesetting = props =&gt; {
116 109 // 执行函数并返回结果
117 110 return func(...args, Math);
118 111 } catch (error) {
119   - console.error("公式执行错误:", error);
120 112 return 0;
121 113 }
122 114 };
... ... @@ -192,10 +184,10 @@ const Typesetting = props =&gt; {
192 184  
193 185 // 计算表达式结果
194 186 const variabless = {
195   - ...variables,
  187 + ...variables,
196 188 ...result,
197 189 };
198   -
  190 +
199 191 let DisableMateriallIcon = L ? sPackDetailPath : null;
200 192 // 盒子展长展开公式计算
201 193 const innerWidth = slaveRowData.sTypes === "6" ? evaluateFormula(sWidthFormula, variabless) : evaluateFormula(sLengthFormula, variabless);
... ... @@ -220,17 +212,17 @@ const Typesetting = props =&gt; {
220 212 jInnerHeight = innerWidth;
221 213 jInnerWidth = innerHeight;
222 214 }
223   - if (state.selectedNode.sTypeKey === 'kapai' || state.selectedNode.sTypeKey === "juantong") {
  215 + if (state.selectedNode.sTypeKey === "kapai" || state.selectedNode.sTypeKey === "juantong") {
224 216 jInnerHeight = innerHeight;
225 217 jInnerWidth = innerWidth;
226 218 }
227   -
  219 +
228 220 const innerHeightCombined = isVertical
229 221 ? jInnerHeight * 2 + dSWidthOffset + dFWidthOffset + dXBJJ
230 222 : Math.max(jInnerHeight + dFWidthOffset, jInnerHeight + dSWidthOffset) + dXBJJ; // 计算内层盒子高度 从上向下排列 取首盒加偏移量和次盒加偏移量最大的值 从左往右排列 盒子尺寸 * 2 加上首盒偏移量和次盒偏移量
231 223 // 计算内层盒子宽度 从上向下排列 取首盒加偏移量和次盒加偏移量最大的值 从左往右排列 盒子尺寸 * 2 加上首盒偏移量和次盒偏移量
232 224 const innerWidthCombined = isVertical
233   -? Math.max(jInnerWidth + dFLengthOffset, jInnerWidth + dSLengthOffset) + dYBJJ
  225 + ? Math.max(jInnerWidth + dFLengthOffset, jInnerWidth + dSLengthOffset) + dYBJJ
234 226 : jInnerWidth * 2 + dSLengthOffset + dFLengthOffset + dYBJJ;
235 227 const style = {
236 228 width: `${outerWidth}px`,
... ... @@ -244,25 +236,27 @@ const Typesetting = props =&gt; {
244 236 let cols = dSWidthOffsetCombined === 0 ? 0 : Math.floor(outerWidth / dSWidthOffsetCombined);
245 237 const rowsCombined = innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset);
246 238 let rows = rowsCombined === 0 ? 0 : Math.floor(outerHeight / rowsCombined);
247   - let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB - (reference ? 0 : dSLengthOffset);
  239 + let colsMaxLength =
  240 + cols * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB - (reference ? 0 : dSLengthOffset);
248 241  
249   - let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB - (reference ? 0 : dSWidthOffset) ;
250   - while (colsMaxLength >= outerWidth && cols > 0) {
  242 + let rowsMaxLength =
  243 + rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB - (reference ? 0 : dSWidthOffset);
  244 + while (colsMaxLength >= outerWidth && cols > 0) {
251 245 cols = cols - 1;
252   - colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ);
  246 + colsMaxLength = cols * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ);
253 247 }
254 248  
255   - while (rowsMaxLength>= outerHeight && rows > 0) {
  249 + while (rowsMaxLength >= outerHeight && rows > 0) {
256 250 rows = rows - 1;
257   - rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) ;
  251 + rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ);
258 252 }
259 253  
260 254 // console.log(cols, rows, outerWidth, outerHeight, colsMaxLength,rowsMaxLength,"cols rows outerWidth outerHeight");
261 255  
262 256 // 最大上机长 上机宽 开料尺寸
263 257 // 计算剩余空间 每组都算上偏移量 那么剩余需要加上后面偏移的总量
264   - const remainingWidth = outerWidth - colsMaxLength
265   - const remainingHeight = outerHeight - rowsMaxLength
  258 + const remainingWidth = outerWidth - colsMaxLength;
  259 + const remainingHeight = outerHeight - rowsMaxLength;
266 260 // const remainingWidth =
267 261 // outerWidth -
268 262 // (cols * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) - boxLengthOffset - (reference ? 0 : dSLengthOffset));
... ... @@ -270,15 +264,12 @@ const Typesetting = props =&gt; {
270 264 // outerHeight -
271 265 // (rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset)) - boxWidthOffset - (reference ? 0 : dSWidthOffset));
272 266 //剩余量能不能放一下单独一个
273   - const commonHeightCheck = remainingHeight > jInnerHeight + dXBJJ;
274   - const commonWidthCheck = remainingWidth > jInnerWidth + dYBJJ ;
  267 + const commonHeightCheck = remainingHeight > jInnerHeight + dXBJJ;
  268 + const commonWidthCheck = remainingWidth > jInnerWidth + dYBJJ;
275 269 const isCustomized = bAdvancedSetting;
276 270  
277 271 let remaining = isVertical ? commonHeightCheck : commonWidthCheck;
278 272  
279   -
280   -
281   -
282 273 // const remaining = false;
283 274 const isOdd = num => {
284 275 return num % 2 !== 0;
... ... @@ -511,14 +502,14 @@ const Typesetting = props =&gt; {
511 502 if (cols === 0 || rows === 0) {
512 503 if (cols > 0) {
513 504 for (let col = 0; col < cols; col++) {
514   - const leftPosition = col * (innerWidthCombined);
  505 + const leftPosition = col * innerWidthCombined;
515 506 const topPosition = 0 * (innerHeightCombined + dXBJJ);
516 507 innerDivs.push(createBoxOne(col, 0, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
517 508 }
518 509 }
519 510 if (rows > 0) {
520 511 for (let row = 0; row < rows; row++) {
521   - const leftPosition = 0 * (innerWidthCombined);
  512 + const leftPosition = 0 * innerWidthCombined;
522 513 const topPosition = row * (innerHeightCombined + dXBJJ);
523 514 innerDivs.push(createBoxOne(0, row, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
524 515 }
... ... @@ -526,8 +517,8 @@ const Typesetting = props =&gt; {
526 517 } else {
527 518 for (let col = 0; col < cols; col++) {
528 519 for (let row = 0; row < rows; row++) {
529   - const leftPosition = col * (innerWidthCombined);
530   - const topPosition = row * (innerHeightCombined + dXBJJ) ;
  520 + const leftPosition = col * innerWidthCombined;
  521 + const topPosition = row * (innerHeightCombined + dXBJJ);
531 522 innerDivs.push(createBox(col, row, 1, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
532 523 }
533 524 // 如果可以放下首盒
... ... @@ -538,10 +529,10 @@ const Typesetting = props =&gt; {
538 529 if (reference) {
539 530 // 是否首盒
540 531 // 首盒的上边距下边距 末尾盒子的上下边距 添加那一行的上边距
541   - leftPosition = col * (innerWidthCombined) + dFLengthOffset;
  532 + leftPosition = col * innerWidthCombined + dFLengthOffset;
542 533 topPosition = rows * (innerHeightCombined + dXBJJ) + dFWidthOffset;
543 534 } else {
544   - leftPosition = col * (innerWidthCombined);
  535 + leftPosition = col * innerWidthCombined;
545 536 topPosition = rows * (innerHeightCombined + dXBJJ);
546 537 }
547 538 innerDivs.push(createBoxOne(col, rows, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
... ... @@ -564,7 +555,6 @@ const Typesetting = props =&gt; {
564 555 }
565 556 }
566 557  
567   -
568 558 // 判断展开长展开宽是否变化
569 559 if (dPartsLength !== innerWidth && !innerDivs.length) {
570 560 setDPartsLength(innerWidth);
... ... @@ -573,8 +563,8 @@ const Typesetting = props =&gt; {
573 563 const propsData = innerDivs[innerDivs.length - 1];
574 564 let openEdition = 0;
575 565 if (propsData && L) {
576   - const {dWlcd,sBillNo} = slaveRowData
577   -
  566 + const { dWlcd, sBillNo } = slaveRowData;
  567 +
578 568 const sMaterialsName = slaveData.find(x => x.sTreeNodeName === selectedNode.showName && x.sBoxModel === props.boxModel).sMaterialsName;
579 569 const propsDataLeft = Number(propsData.props.style.left.slice(0, -2));
580 570 // 长需要找出最大的
... ... @@ -582,8 +572,8 @@ const Typesetting = props =&gt; {
582 572 const propsDataHeight = Number(propsData.props.style.height.slice(0, -2));
583 573 const propsDataTop = Number(propsData.props.style.top.slice(0, -2));
584 574 // 判断列是否是单独的
585   -
586   - const newMaterialLength = parseFloat(propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) + dZBLB + dYBLB).toFixed(2); // 原纸长
  575 +
  576 + const newMaterialLength = parseFloat(propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) + dZBLB + dYBLB).toFixed(2); // 原纸长
587 577 const newMaterialWidth = parseFloat(propsDataTop + propsDataHeight + dSBLB + dXBLB).toFixed(2);
588 578  
589 579 // 计算开数
... ... @@ -613,7 +603,6 @@ const Typesetting = props =&gt; {
613 603 const newDProductQty = masterData.dProductQty;
614 604 const dMaterialsKQty = slaveDataDetail.dMaterialsKQty || 1;
615 605  
616   -
617 606 if (
618 607 dPartsLength !== innerWidth ||
619 608 newMaterialLength !== materialLength ||
... ... @@ -623,8 +612,6 @@ const Typesetting = props =&gt; {
623 612 newDPortraitType !== dPortraitType ||
624 613 (!dWlcd && sBillNo)
625 614 ) {
626   - console.log(slaveRowData.dMachineLength,'slaveRowData.dMachineLengthss');
627   -
628 615 setMaterialLength(newMaterialLength);
629 616 setMaterialWidth(newMaterialWidth);
630 617 setMaterialName(sMaterialsName);
... ... @@ -632,7 +619,7 @@ const Typesetting = props =&gt; {
632 619 setDPartsLength(innerWidth);
633 620 setNewDHorizontalType(dHorizontalType);
634 621 setNewDPortraitType(dPortraitType);
635   - setOldVariables(selectedNode.sTypeKey)
  622 + setOldVariables(selectedNode.sTypeKey);
636 623 const scaleX = (clientWidth - 50) / (outerWidth + 110);
637 624 const scaleY = (clientHeight - 5) / (outerHeight + 90);
638 625 const newScale = Math.min(scaleX, scaleY);
... ... @@ -675,7 +662,7 @@ const Typesetting = props =&gt; {
675 662 dHorizontalType,
676 663 dPortraitType
677 664 );
678   - }
  665 + }
679 666 openEdition = (((newMaterialLength * newMaterialWidth) / (maxWidth * maxHeight)) * 100).toFixed(2);
680 667  
681 668 setTimeout(() => {
... ... @@ -708,10 +695,10 @@ const Typesetting = props =&gt; {
708 695 Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength) &&
709 696 Number(slaveDataDetail?.dMaxWidth) >= Number(slaveRowData?.dMachineWidth);
710 697  
711   - const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length > 0;
  698 + const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length > 0;
712 699  
713 700 const confirmParam = commonFunc.showLocalMessage(props, "confirmParam", "排版尺寸大于上机尺寸,请确认参数!");
714   -
  701 + const isJuantong = selectedNode.sTypeKey === "juantong";
715 702 if (isCustomized && !isShow) {
716 703 if (isMobile) return;
717 704 message.error(confirmParam);
... ... @@ -840,6 +827,33 @@ const Typesetting = props =&gt; {
840 827 }}
841 828 >
842 829 <span style={{ color: "red", display: "inline-block", width: "30px", textAlign: "center" }}>{materialWidth}</span>
  830 + {isJuantong ? (
  831 + <span
  832 + style={{
  833 + position: "absolute",
  834 + top: `${(materialWidth * scaleYD) / 2 + 10}px`,
  835 + textAlign: "center",
  836 + width: "30px",
  837 + writingMode: "vertical-rl",
  838 + color: "red",
  839 + display: "flex",
  840 + alignItems: "center",
  841 + justifyContent: "center",
  842 + textOrientation: "upright",
  843 + }}
  844 + >
  845 + {"门幅方向"}
  846 + </span>
  847 + ) : (
  848 + ""
  849 + )}
  850 + {isJuantong ? (
  851 + <ArrowRightOutlined
  852 + style={{ position: "absolute", fontSize: "30px", top: `${(materialWidth * scaleYD) / 2}px`, left: "-30px" }}
  853 + />
  854 + ) : (
  855 + ""
  856 + )}
843 857 <div
844 858 style={{
845 859 position: "absolute",
... ...
src/components/QuickQuote/index.jsx
... ... @@ -274,7 +274,7 @@ const QuickQuoteEvent = props =&gt; {
274 274 dProductQty: changeValue.dProductQty,
275 275 }));
276 276 }
277   -
  277 +
278 278 if (sFieldName === "dLength" || sFieldName === "dWidth" || sFieldName === "dHeight") {
279 279 if (props.currentBoxModel) {
280 280 const boxModel = props.currentBoxModel.replace("slaveUp", "").replace("slaveDown", "");
... ... @@ -1146,7 +1146,6 @@ const QuickQuoteEvent = props =&gt; {
1146 1146 // 入口
1147 1147 const QuickQuote = baseProps => {
1148 1148 const props = QuickQuoteEvent(baseProps);
1149   - console.log("🚀 ~ QuickQuote:", props);
1150 1149 const [treeClassName, setTreeClassName] = useState("");
1151 1150  
1152 1151 // 监听页面滚动事件
... ... @@ -1501,7 +1500,7 @@ const MasterComponent = props =&gt; {
1501 1500 item.iColValue = 4;
1502 1501 }
1503 1502 });
1504   - }
  1503 + }
1505 1504 const lengthData = viewConfigs.find(x => x.sName === "dLength");
1506 1505  
1507 1506 if (selectedNode && selectedNode.sTypeKey && selectedNode.sTypeKey !== "danye") {
... ... @@ -1557,13 +1556,12 @@ const BoxComponent = props =&gt; {
1557 1556 const { bBox } = selectedNode;
1558 1557 const [boxTypeList, setBoxTypeList] = useState([]);
1559 1558 // 卡牌类卷筒类默认使用矩形 当是核价保存过的需要在主表数据加载完后在赋值
1560   - console.log(props, "asdadasd");
1561 1559 const slaveRowData = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
1562 1560 const { sBillNo } = slaveRowData;
1563 1561 useEffect(() => {
1564 1562 if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") {
1565   - const {sBillNo} = slaveRowData
1566   - if(sBillNo) return
  1563 + const { sBillNo } = slaveRowData;
  1564 + if (sBillNo) return;
1567 1565 let dropDownData = [];
1568 1566 dropDownData.push(KapaiJson);
1569 1567 const boxData = (dropDownData || []).map((item, index) => ({
... ... @@ -1574,21 +1572,6 @@ const BoxComponent = props =&gt; {
1574 1572 }
1575 1573 }, [boxModel]);
1576 1574  
1577   - // useEffect(() => {
1578   - // if (sBillNo) {
1579   - // setTimeout(() => {
1580   - // if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") {
1581   - // let dropDownData = [];
1582   - // dropDownData.push(KapaiJson);
1583   - // const boxData = (dropDownData || []).map((item, index) => ({
1584   - // ...item,
1585   - // iOrder: index + 1,
1586   - // }));
1587   - // props.onDataChange("slaveUp" + boxModel, "sName", { sName: KapaiJson.sName }, KapaiJson.sId, boxData);
1588   - // }
1589   - // }, 500);
1590   - // }
1591   - // }, [masterData.dLength]);
1592 1575 const { upAbleConfigsExtra = [], calcMethodData = [], boxPicData = [], radioValue = calcMethodData[0]?.sCode } = slaveRowData;
1593 1576 const calcMethod = calcMethodData.map(item => ({
1594 1577 value: item.sCode,
... ... @@ -1638,6 +1621,20 @@ const BoxComponent = props =&gt; {
1638 1621 item.showName = rateList.find(rate => rate.id === Number(selectedNode.iRateType))?.name || "倍率";
1639 1622 }
1640 1623 }
  1624 +
  1625 + if (item.sName === "dWlcd" && selectedNode.sTypeKey === "juantong") {
  1626 + return false
  1627 + }
  1628 + if (item.sName === "dAuxiliaryQty" && selectedNode.sTypeKey !== "juantong") {
  1629 + return false
  1630 + }
  1631 + if (item.sName === "dWlkd") {
  1632 + if (selectedNode.sTypeKey === "juantong") {
  1633 + item.showName = "门幅";
  1634 + } else {
  1635 + item.showName = "材料宽";
  1636 + }
  1637 + }
1641 1638 if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") {
1642 1639 return false;
1643 1640 }
... ... @@ -1654,6 +1651,7 @@ const BoxComponent = props =&gt; {
1654 1651 if (selectedNode.sTypeKey !== "juantong" && item.sName === "sPaperDirection") {
1655 1652 return false;
1656 1653 }
  1654 +
1657 1655 return item.iTag === iTag;
1658 1656 });
1659 1657  
... ... @@ -1966,10 +1964,9 @@ const BoxComponent = props =&gt; {
1966 1964 // 判断展长展宽是否可以放下原纸
1967 1965 const isDPartsLength =
1968 1966 slaveData[index]?.dPartsLength < slaveData[index]?.dMaxLength && slaveData[index]?.dPartsWidth < slaveData[index]?.dMaxWidth;
1969   -
  1967 + const dProductQtys = props.state.masterData.dProductQty || 0
1970 1968 if (index !== undefined && index !== -1) {
1971 1969 // 计算开数
1972   -
1973 1970 // 获取原始对象并创建一个新的对象进行更新
1974 1971 const updatedProduct = {
1975 1972 ...slaveData[index],
... ... @@ -1989,8 +1986,10 @@ const BoxComponent = props =&gt; {
1989 1986 100
1990 1987 ).toFixed(2)
1991 1988 ),
  1989 + // dWlcd: selectedNode.sTypeKey === 'juantong' ? Math.floor(dProductQty / dSinglePQty * ( length/ 1000)) : dWlcd,
1992 1990 dWlcd: dWlcd,
1993 1991 dWlkd: dWlkd,
  1992 + dAuxiliaryQty: Math.floor(dProductQty / dSinglePQty * ( length/ 1000)),
1994 1993 dMachineQty: Math.floor(dProductQty / dSinglePQty),
1995 1994 dSinglePQty: dSinglePQty,
1996 1995 dMaterialsKQty: dMaterialsKQty,
... ...