Commit 4f64fb859eccc38b075164a4b07271bad7b02000

Authored by 陈鑫涛
1 parent 47cdfb32

快速报价

src/components/Common/BoxDesignCompontent/index.js
@@ -24,7 +24,6 @@ const BoxDesignEvent = props => { @@ -24,7 +24,6 @@ const BoxDesignEvent = props => {
24 setLoading(false); 24 setLoading(false);
25 if (!tableData?.length) return 25 if (!tableData?.length) return
26 const shape = tableData?.find(x => x.iTag === 70)?.showDropDown 26 const shape = tableData?.find(x => x.iTag === 70)?.showDropDown
27 - if (!shape) return  
28 const JsonShape = JSON.parse(shape) 27 const JsonShape = JSON.parse(shape)
29 const arr = Array.from(Object.values(JsonShape)); 28 const arr = Array.from(Object.values(JsonShape));
30 setOptions([ 29 setOptions([
@@ -167,7 +166,6 @@ const BoxDesignCompontent = baseProps => { @@ -167,7 +166,6 @@ const BoxDesignCompontent = baseProps => {
167 setTableDataList(newList); 166 setTableDataList(newList);
168 setTableDataLists(newList); 167 setTableDataLists(newList);
169 const shape = tableData.find(x => x.iTag === 70)?.showDropDown 168 const shape = tableData.find(x => x.iTag === 70)?.showDropDown
170 - if (!shape) return  
171 const JsonShape = JSON.parse(shape) 169 const JsonShape = JSON.parse(shape)
172 const shapeLists = Array.from(Object.values(JsonShape)) 170 const shapeLists = Array.from(Object.values(JsonShape))
173 setShapeList(shapeLists) 171 setShapeList(shapeLists)
src/components/Common/BoxDesignCompontent/svg.js
@@ -365,7 +365,6 @@ const SvgBox = props => { @@ -365,7 +365,6 @@ const SvgBox = props => {
365 bottom = bottomOffect(boxList, orderLength, orderWidth, props); 365 bottom = bottomOffect(boxList, orderLength, orderWidth, props);
366 } 366 }
367 if (Number(svgType) === 4) { 367 if (Number(svgType) === 4) {
368 -  
369 } else if (Number(svgType) === 8) { 368 } else if (Number(svgType) === 8) {
370 ySvg = topOffect(boxList, headLength, headWidth, props) * scale; 369 ySvg = topOffect(boxList, headLength, headWidth, props) * scale;
371 } 370 }
@@ -439,7 +438,6 @@ const SvgBox = props => { @@ -439,7 +438,6 @@ const SvgBox = props => {
439 scale = 0.5; 438 scale = 0.5;
440 let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight, props) * scale; 439 let ySvg = topOffect(boxList, boxLength, boxWidth, boxHeight, props) * scale;
441 if (Number(svgType) === 4) { 440 if (Number(svgType) === 4) {
442 -  
443 } else if (Number(svgType) === 8) { 441 } else if (Number(svgType) === 8) {
444 ySvg = topOffect(boxList, headLength, headWidth, props) * scale; 442 ySvg = topOffect(boxList, headLength, headWidth, props) * scale;
445 } 443 }
@@ -602,6 +600,12 @@ const SvgBox = props => { @@ -602,6 +600,12 @@ const SvgBox = props => {
602 svgContainerRef.current.style.transform = `scale(${scaleX >= 1 ? 1 : scaleX}, ${scaleY >= 1 ? 1 : scaleY})`; 600 svgContainerRef.current.style.transform = `scale(${scaleX >= 1 ? 1 : scaleX}, ${scaleY >= 1 ? 1 : scaleY})`;
603 svgContainerRef.current.style.transformOrigin = "top left"; 601 svgContainerRef.current.style.transformOrigin = "top left";
604 svgContainerRef.current.style.paddingTop = dSvgBoxWidth ? "0" : "25px"; 602 svgContainerRef.current.style.paddingTop = dSvgBoxWidth ? "0" : "25px";
  603 + if (Number(svgType) !== 9) {
  604 + svgContainerRef.current.style.margin = `0 auto`;
  605 + } else {
  606 + svgContainerRef.current.style.margin = `0`;
  607 +
  608 + }
605 svgContainerRef.current.style.backgroundColor = props.isMobile ? "#EDF4FF" : ""; 609 svgContainerRef.current.style.backgroundColor = props.isMobile ? "#EDF4FF" : "";
606 // svgContainerRef.current.style.position = 'absolute'; 610 // svgContainerRef.current.style.position = 'absolute';
607 // svgContainerRef.current.style.left = '50%'; 611 // svgContainerRef.current.style.left = '50%';
@@ -5202,13 +5206,13 @@ const SvgBox = props => { @@ -5202,13 +5206,13 @@ const SvgBox = props => {
5202 } else if (Number(svgType) === 9) { 5206 } else if (Number(svgType) === 9) {
5203 svg.appendChild(drawCup(boxLength, boxWidth, boxHeight, g)); 5207 svg.appendChild(drawCup(boxLength, boxWidth, boxHeight, g));
5204 const result = calculateCupUnfoldDimensions(boxLength, boxWidth, boxHeight) 5208 const result = calculateCupUnfoldDimensions(boxLength, boxWidth, boxHeight)
5205 - if (props.showNew !== 0) { 5209 + // if (props.showNew !== 0) {
5206 const w = result.width 5210 const w = result.width
5207 const h = result.height 5211 const h = result.height
5208 svg.setAttribute('viewBox', `${result.points.outerLeft.x} ${result.points.topCenter.y} ${w} ${h}`); 5212 svg.setAttribute('viewBox', `${result.points.outerLeft.x} ${result.points.topCenter.y} ${w} ${h}`);
5209 svg.setAttribute("width", `${dSvgBoxWidth ? dSvgBoxWidth : 500}px`); 5213 svg.setAttribute("width", `${dSvgBoxWidth ? dSvgBoxWidth : 500}px`);
5210 svg.setAttribute("height", `${dSvgBoxHeight ? dSvgBoxHeight : 250}px`); 5214 svg.setAttribute("height", `${dSvgBoxHeight ? dSvgBoxHeight : 250}px`);
5211 - } 5215 + // }
5212 5216
5213 } 5217 }
5214 5218
@@ -5385,7 +5389,7 @@ const SvgBox = props => { @@ -5385,7 +5389,7 @@ const SvgBox = props => {
5385 } 5389 }
5386 top = sfhs?.value || 0; 5390 top = sfhs?.value || 0;
5387 } 5391 }
5388 - // if (svg === 4) top = Number(top) + Number(height); 5392 + if (svg === 4) top = Number(top) + Number(height);
5389 return isNaN(top) ? 0 : Number(top); 5393 return isNaN(top) ? 0 : Number(top);
5390 }; 5394 };
5391 const bottomOffect = (list, length, width, height, props) => { 5395 const bottomOffect = (list, length, width, height, props) => {
@@ -5484,7 +5488,7 @@ const SvgBox = props => { @@ -5484,7 +5488,7 @@ const SvgBox = props => {
5484 top = sfhs?.value || 0; 5488 top = sfhs?.value || 0;
5485 } 5489 }
5486 5490
5487 - // if (svg === 4) top = Number(top) + Number(height); 5491 + if (svg === 4) top = Number(top) + Number(height);
5488 return isNaN(top) ? 0 : top; 5492 return isNaN(top) ? 0 : top;
5489 }; 5493 };
5490 // 将角度转换为弧度 5494 // 将角度转换为弧度
src/components/Common/BoxShowImgMaterial/indexNew.js
1 /* eslint-disable */ 1 /* eslint-disable */
2 import React, { useEffect, useState, useRef } from "react"; 2 import React, { useEffect, useState, useRef } from "react";
3 -import { VerticalLeftOutlined, VerticalRightOutlined, ArrowRightOutlined } from "@ant-design/icons"; 3 +import { VerticalLeftOutlined, VerticalRightOutlined } from "@ant-design/icons";
4 import styles from "./index.less"; 4 import styles from "./index.less";
5 -import { bottom } from "react-grid-layout/build/utils";  
6 -import { transform } from "@antv/g2/lib/util/transform"; 5 +import * as commonFunc from "@/components/Common/commonFunc";
7 const BoxShowImgMaterial = props => { 6 const BoxShowImgMaterial = props => {
8 const boxRef = useRef(null); 7 const boxRef = useRef(null);
9 const textRef = useRef(null); 8 const textRef = useRef(null);
@@ -11,9 +10,8 @@ const BoxShowImgMaterial = props => { @@ -11,9 +10,8 @@ const BoxShowImgMaterial = props => {
11 const nTextRefs = useRef(null); 10 const nTextRefs = useRef(null);
12 const nTextRef = useRef(null); 11 const nTextRef = useRef(null);
13 const [boxKey, setBoxKey] = useState(new Date().getTime()); 12 const [boxKey, setBoxKey] = useState(new Date().getTime());
14 - const { width, height, size } = props;  
15 - const clientWidth = width || 300;  
16 - const clientHeight = height || 250; 13 + const clientWidth = 300;
  14 + const clientHeight = 250;
17 // 找出盒型信息 15 // 找出盒型信息
18 const { slaveData, selectedNode } = props.state; 16 const { slaveData, selectedNode } = props.state;
19 const { boxModel } = props; 17 const { boxModel } = props;
@@ -23,11 +21,10 @@ const BoxShowImgMaterial = props => { @@ -23,11 +21,10 @@ const BoxShowImgMaterial = props => {
23 var { dMaxLength, dMaxWidth, dMachineLength, dMachineWidth, dWlcd, dWlkd, dSBLB, dXBLB, dZBLB, dYBLB, scale } = slaveDataDetail; 21 var { dMaxLength, dMaxWidth, dMachineLength, dMachineWidth, dWlcd, dWlkd, dSBLB, dXBLB, dZBLB, dYBLB, scale } = slaveDataDetail;
24 } 22 }
25 // 计算可以放置的盒子数量 23 // 计算可以放置的盒子数量
26 - const isJuantong = selectedNode.sTypeKey === "juantong";  
27 const horizontalBoxes = Math.floor(dWlcd / dMachineLength); 24 const horizontalBoxes = Math.floor(dWlcd / dMachineLength);
28 const verticalBoxes = Math.floor(dWlkd / dMachineWidth); 25 const verticalBoxes = Math.floor(dWlkd / dMachineWidth);
29 - const scaleX = (clientWidth - 100) / Number(dWlcd);  
30 - const scaleY = (clientHeight - 70) / Number(dWlkd); 26 + const scaleX = (clientWidth - 70) / (dWlcd);
  27 + const scaleY = (clientHeight - 70) / (dWlkd);
31 // 动态生成多个 materialBox 28 // 动态生成多个 materialBox
32 const generateMaterialBoxes = () => { 29 const generateMaterialBoxes = () => {
33 const boxes = []; 30 const boxes = [];
@@ -49,8 +46,8 @@ const BoxShowImgMaterial = props => { @@ -49,8 +46,8 @@ const BoxShowImgMaterial = props => {
49 position: "absolute", 46 position: "absolute",
50 bottom: "-30px", 47 bottom: "-30px",
51 left: "0px", 48 left: "0px",
52 - width: `${dMachineLength * scaleX}px`,  
53 - fontSize: `${size || 11}px`, 49 + width: `${(dMachineLength * scaleX)}px`,
  50 + fontSize: "11px",
54 textAlign: "center", 51 textAlign: "center",
55 height: "30px", 52 height: "30px",
56 lineHeight: "30px", 53 lineHeight: "30px",
@@ -70,7 +67,7 @@ const BoxShowImgMaterial = props => { @@ -70,7 +67,7 @@ const BoxShowImgMaterial = props => {
70 position: "absolute", 67 position: "absolute",
71 top: "15px", 68 top: "15px",
72 left: "5px", 69 left: "5px",
73 - width: `${dMachineLength * scaleX * 0.2}px`, 70 + width: `${((dMachineLength * scaleX)) * 0.2}px`,
74 backgroundColor: "#333", 71 backgroundColor: "#333",
75 height: "1px", 72 height: "1px",
76 }} 73 }}
@@ -95,7 +92,7 @@ const BoxShowImgMaterial = props => { @@ -95,7 +92,7 @@ const BoxShowImgMaterial = props => {
95 position: "absolute", 92 position: "absolute",
96 top: "15px", 93 top: "15px",
97 right: "5px", 94 right: "5px",
98 - width: `${dMachineLength * scaleX * 0.2}px`, 95 + width: `${((dMachineLength *scaleX)) * 0.2}px`,
99 backgroundColor: "#333", 96 backgroundColor: "#333",
100 height: "1px", 97 height: "1px",
101 }} 98 }}
@@ -107,9 +104,9 @@ const BoxShowImgMaterial = props => { @@ -107,9 +104,9 @@ const BoxShowImgMaterial = props => {
107 position: "absolute", 104 position: "absolute",
108 top: "0", 105 top: "0",
109 right: "-30px", 106 right: "-30px",
110 - height: `${dMachineWidth * scaleY}px`,  
111 - lineHeight: `${dMachineWidth * scaleY}px`,  
112 - fontSize: `${size || 11}px`, 107 + height: `${(dMachineWidth * scaleY)}px`,
  108 + lineHeight: `${(dMachineWidth * scaleY)}px`,
  109 + fontSize: "11px",
113 textAlign: "center", 110 textAlign: "center",
114 width: "30px", 111 width: "30px",
115 transform: `scale(${1 / scaleX}, ${1 / scaleY})`, 112 transform: `scale(${1 / scaleX}, ${1 / scaleY})`,
@@ -129,7 +126,7 @@ const BoxShowImgMaterial = props => { @@ -129,7 +126,7 @@ const BoxShowImgMaterial = props => {
129 position: "absolute", 126 position: "absolute",
130 top: "5px", 127 top: "5px",
131 left: "15px", 128 left: "15px",
132 - height: `${dMachineWidth * scaleY * 0.3}px`, 129 + height: `${((dMachineWidth * scaleY)) * 0.3}px`,
133 backgroundColor: "#333", 130 backgroundColor: "#333",
134 width: "1px", 131 width: "1px",
135 }} 132 }}
@@ -137,14 +134,10 @@ const BoxShowImgMaterial = props => { @@ -137,14 +134,10 @@ const BoxShowImgMaterial = props => {
137 <span 134 <span
138 style={{ 135 style={{
139 color: "red", 136 color: "red",
140 - position: "relative",  
141 - display: "inline-block",  
142 }} 137 }}
143 > 138 >
144 {dMachineWidth} 139 {dMachineWidth}
145 </span> 140 </span>
146 -  
147 -  
148 <VerticalLeftOutlined 141 <VerticalLeftOutlined
149 style={{ 142 style={{
150 position: "absolute", 143 position: "absolute",
@@ -158,37 +151,12 @@ const BoxShowImgMaterial = props =&gt; { @@ -158,37 +151,12 @@ const BoxShowImgMaterial = props =&gt; {
158 position: "absolute", 151 position: "absolute",
159 bottom: "5px", 152 bottom: "5px",
160 left: "15px", 153 left: "15px",
161 - height: `${dMachineWidth * scaleY * 0.3}px`, 154 + height: `${((dMachineWidth * scaleY)) * 0.3}px`,
162 backgroundColor: "#333", 155 backgroundColor: "#333",
163 width: "1px", 156 width: "1px",
164 }} 157 }}
165 /> 158 />
166 </div> 159 </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> */}  
192 </div> 160 </div>
193 ); 161 );
194 } 162 }
@@ -199,30 +167,33 @@ const BoxShowImgMaterial = props =&gt; { @@ -199,30 +167,33 @@ const BoxShowImgMaterial = props =&gt; {
199 ((horizontalBoxes * verticalBoxes * (Number(dMachineLength) * Number(dMachineWidth))) / (Number(dWlcd) * Number(dWlkd))) * 167 ((horizontalBoxes * verticalBoxes * (Number(dMachineLength) * Number(dMachineWidth))) / (Number(dWlcd) * Number(dWlkd))) *
200 100 168 100
201 ).toFixed(2); 169 ).toFixed(2);
202 - useEffect(() => {  
203 - setBoxKey(new Date().getTime());  
204 - setTimeout(() => {  
205 - // if (boxRef.current && textRef.current && textRefs.current && nTextRef.current && nTextRefs.current)  
206 - if (boxRef.current && textRef.current && textRefs.current && nTextRef.current && nTextRefs.current) {  
207 - // 计算父元素的缩放因子  
208 - // 对父元素应用缩放  
209 - boxRef.current.style.transform = `scale(${scaleX}, ${scaleY})`;  
210 - boxRef.current.style.transformOrigin = "top left";  
211 - // // 对子元素应用逆缩放  
212 - textRef.current.style.transform = `scale(${1 / scaleX}, ${1 / scaleY})`;  
213 - textRef.current.style.transformOrigin = "top left";  
214 - textRefs.current.style.transform = `scale(${1 / scaleX}, ${1 / scaleY})`;  
215 - textRefs.current.style.transformOrigin = "top left";  
216 - }  
217 - }, 10);  
218 - }, [scaleX, scaleY]); 170 + useEffect(
  171 + () => {
  172 + setBoxKey(new Date().getTime());
  173 + setTimeout(() => {
  174 + // if (boxRef.current && textRef.current && textRefs.current && nTextRef.current && nTextRefs.current)
  175 + if (boxRef.current && textRef.current && textRefs.current && nTextRef.current && nTextRefs.current) {
  176 + // 计算父元素的缩放因子
  177 + // 对父元素应用缩放
  178 + boxRef.current.style.transform = `scale(${scaleX}, ${scaleY})`;
  179 + boxRef.current.style.transformOrigin = "top left";
  180 + // // 对子元素应用逆缩放
  181 + textRef.current.style.transform = `scale(${1 / scaleX}, ${1 / scaleY})`;
  182 + textRef.current.style.transformOrigin = "top left";
  183 + textRefs.current.style.transform = `scale(${1 / scaleX}, ${1 / scaleY})`;
  184 + textRefs.current.style.transformOrigin = "top left";
  185 + }
  186 + }, 0);
  187 + },
  188 + [slaveDataDetail]
  189 + );
219 const isMax = slaveDataDetail?.dMaxWidth * slaveDataDetail?.dMaxLength > slaveDataDetail?.dMachineLength * slaveDataDetail?.dMachineWidth; 190 const isMax = slaveDataDetail?.dMaxWidth * slaveDataDetail?.dMaxLength > slaveDataDetail?.dMachineLength * slaveDataDetail?.dMachineWidth;
220 - const isDPartsLength = slaveDataDetail?.dPartsLength < slaveDataDetail?.dMaxLength && slaveDataDetail?.dPartsWidth < slaveDataDetail?.dMaxWidth;  
221 - 191 + const isDPartsLength = Number(slaveDataDetail?.dWlcd) <= slaveDataDetail?.dMaxLength && Number(slaveDataDetail?.dWlkd) <= slaveDataDetail?.dMaxWidth;
  192 + const MaterialUtilizationRate = commonFunc.showLocalMessage(props, "MaterialUtilizationRate", "材料利用率");
222 const isShow = 193 const isShow =
223 - isDPartsLength && slaveDataDetail && slaveDataDetail.dMachineLength && slaveDataDetail.dMaxWidth && slaveDataDetail.dMaxLength && isMax;  
224 -  
225 - return ( 194 + slaveDataDetail && slaveDataDetail.dMachineLength && slaveDataDetail.dMaxWidth && slaveDataDetail.dMaxLength && isMax;
  195 + console.log("🚀 ~ isDPartsLength:", isDPartsLength,isMax)
  196 + return (
226 <> 197 <>
227 {isShow ? ( 198 {isShow ? (
228 <div 199 <div
@@ -245,11 +216,11 @@ const BoxShowImgMaterial = props =&gt; { @@ -245,11 +216,11 @@ const BoxShowImgMaterial = props =&gt; {
245 style={{ 216 style={{
246 position: "absolute", 217 position: "absolute",
247 left: "0px", 218 left: "0px",
248 - width: `${(dWlcd * (clientWidth - 100)) / dWlcd}px`,  
249 - fontSize: `${size || 11}px`, 219 + width: `${(dWlcd * (clientWidth - 50)) / (dWlcd + 60)}px`,
  220 + fontSize: "11px",
250 textAlign: "center", 221 textAlign: "center",
251 height: "30px", 222 height: "30px",
252 - bottom: `-${80}px`, 223 + bottom: `-${100}px`,
253 lineHeight: "30px", 224 lineHeight: "30px",
254 }} 225 }}
255 > 226 >
@@ -284,7 +255,7 @@ const BoxShowImgMaterial = props =&gt; { @@ -284,7 +255,7 @@ const BoxShowImgMaterial = props =&gt; {
284 display: "inline-block", 255 display: "inline-block",
285 }} 256 }}
286 > 257 >
287 - 材料利用率: 258 + {MaterialUtilizationRate}:
288 </span> 259 </span>
289 <span 260 <span
290 style={{ 261 style={{
@@ -318,10 +289,10 @@ const BoxShowImgMaterial = props =&gt; { @@ -318,10 +289,10 @@ const BoxShowImgMaterial = props =&gt; {
318 style={{ 289 style={{
319 position: "absolute", 290 position: "absolute",
320 top: "0", 291 top: "0",
321 - right: "-80px",  
322 - height: `${dWlkd * scaleY}px`,  
323 - lineHeight: `${dWlkd * scaleY}px`,  
324 - fontSize: `${size || 11}px`, 292 + right: "15px",
  293 + height: `${(dWlkd * scaleY)}px`,
  294 + lineHeight: `${(dWlkd * scaleY)}px`,
  295 + fontSize: "11px",
325 textAlign: "center", 296 textAlign: "center",
326 width: "30px", 297 width: "30px",
327 }} 298 }}
@@ -339,7 +310,7 @@ const BoxShowImgMaterial = props =&gt; { @@ -339,7 +310,7 @@ const BoxShowImgMaterial = props =&gt; {
339 position: "absolute", 310 position: "absolute",
340 top: "5px", 311 top: "5px",
341 left: "15px", 312 left: "15px",
342 - height: `${dWlkd * scaleY * 0.3}px`, 313 + height: `${((dWlkd * scaleY)) * 0.3}px`,
343 backgroundColor: "#333", 314 backgroundColor: "#333",
344 width: "1px", 315 width: "1px",
345 }} 316 }}
@@ -347,8 +318,6 @@ const BoxShowImgMaterial = props =&gt; { @@ -347,8 +318,6 @@ const BoxShowImgMaterial = props =&gt; {
347 <span 318 <span
348 style={{ 319 style={{
349 color: "red", 320 color: "red",
350 - display:'inline-block',  
351 - marginTop:'10px'  
352 }} 321 }}
353 > 322 >
354 {dWlkd} 323 {dWlkd}
@@ -366,7 +335,7 @@ const BoxShowImgMaterial = props =&gt; { @@ -366,7 +335,7 @@ const BoxShowImgMaterial = props =&gt; {
366 position: "absolute", 335 position: "absolute",
367 bottom: "5px", 336 bottom: "5px",
368 left: "15px", 337 left: "15px",
369 - height: `${dWlkd * scaleY * 0.3}px`, 338 + height: `${((dWlkd * scaleY)) * 0.3}px`,
370 backgroundColor: "#333", 339 backgroundColor: "#333",
371 width: "1px", 340 width: "1px",
372 }} 341 }}
src/components/QuickQuote/index.jsx
@@ -467,7 +467,7 @@ const QuickQuoteEvent = props =&gt; { @@ -467,7 +467,7 @@ const QuickQuoteEvent = props =&gt; {
467 slaveData[saveIndex] = { 467 slaveData[saveIndex] = {
468 ...slaveData[saveIndex], 468 ...slaveData[saveIndex],
469 sMachineStyle: materialStyleLength + "*" + materialStyleWidth, 469 sMachineStyle: materialStyleLength + "*" + materialStyleWidth,
470 - dMachineQty: slaveData[saveIndex].dProductQty ? slaveData[saveIndex].dProductQty : masterData.dProductQty, 470 + dMachineQty: masterData.sBillNo && slaveData[saveIndex].dMachineQty ? slaveData[saveIndex].dMachineQty : slaveData[saveIndex].dProductQty ? slaveData[saveIndex].dProductQty : masterData.dProductQty,
471 }; 471 };
472 if (sFieldName === "dWlcd" || sFieldName === "dWlkd") { 472 if (sFieldName === "dWlcd" || sFieldName === "dWlkd") {
473 const horizontalBoxes = Math.floor(slaveData[saveIndex]?.dWlkd / Number(slaveData[saveIndex]?.dMachineWidth)); 473 const horizontalBoxes = Math.floor(slaveData[saveIndex]?.dWlkd / Number(slaveData[saveIndex]?.dMachineWidth));
@@ -475,12 +475,13 @@ const QuickQuoteEvent = props =&gt; { @@ -475,12 +475,13 @@ const QuickQuoteEvent = props =&gt; {
475 const newDMaterialsKQty = horizontalBoxes * verticalBoxes; 475 const newDMaterialsKQty = horizontalBoxes * verticalBoxes;
476 slaveData[saveIndex] = { 476 slaveData[saveIndex] = {
477 ...slaveData[saveIndex], 477 ...slaveData[saveIndex],
478 - dMachineQty: Math.floor(slaveData[saveIndex].dMachineQty / slaveData[saveIndex].dSinglePQty), 478 + dMachineQty: masterData.sBillNo && slaveData[saveIndex].dMachineQty ? slaveData[saveIndex].dMachineQty : Math.floor(slaveData[saveIndex].dMachineQty / slaveData[saveIndex].dSinglePQty),
479 dMaterialsKQty: newDMaterialsKQty, 479 dMaterialsKQty: newDMaterialsKQty,
480 newMaterialLength: sFieldName === "dWlcd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlcd, 480 newMaterialLength: sFieldName === "dWlcd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlcd,
481 newMaterialWidth: sFieldName === "dWlkd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlkd, 481 newMaterialWidth: sFieldName === "dWlkd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlkd,
482 materialLength: sFieldName === "dWlcd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlcd, 482 materialLength: sFieldName === "dWlcd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlcd,
483 materialWidth: sFieldName === "dWlkd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlkd, 483 materialWidth: sFieldName === "dWlkd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlkd,
  484 + sMaterialsStyle: `${ sFieldName === "dWlcd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlcd || 0}*${sFieldName === "dWlkd" ? changeValue[sFieldName] : slaveData[saveIndex]?.dWlkd|| 0}`,
484 }; 485 };
485 } 486 }
486 487
@@ -996,6 +997,7 @@ const QuickQuoteEvent = props =&gt; { @@ -996,6 +997,7 @@ const QuickQuoteEvent = props =&gt; {
996 newCopyTo.slave = commonUtils.isEmptyArr(slaveData) ? {} : slaveData[0]; 997 newCopyTo.slave = commonUtils.isEmptyArr(slaveData) ? {} : slaveData[0];
997 for (let i = 0; i < partsNewInfo.length; i++) { 998 for (let i = 0; i < partsNewInfo.length; i++) {
998 const partInfo = partsNewInfo[i]; 999 const partInfo = partsNewInfo[i];
  1000 + console.log("🚀 ~ QuickQuoteEvent ~ partInfo:", partInfo)
999 const iIndex = i; 1001 const iIndex = i;
1000 const partsDataRow = {}; 1002 const partsDataRow = {};
1001 for (const child of Object.keys(partInfo)) { 1003 for (const child of Object.keys(partInfo)) {
@@ -1035,6 +1037,7 @@ const QuickQuoteEvent = props =&gt; { @@ -1035,6 +1037,7 @@ const QuickQuoteEvent = props =&gt; {
1035 materialDataRow.sControlId = partsDataRow.sId; 1037 materialDataRow.sControlId = partsDataRow.sId;
1036 // materialDataRow.sSlaveId = ' '; 1038 // materialDataRow.sSlaveId = ' ';
1037 materialDataRow.dMaterialsKQty = partsDataRow.iNumberofMaterial; 1039 materialDataRow.dMaterialsKQty = partsDataRow.iNumberofMaterial;
  1040 + materialDataRow.sMaterialsStyle = partsDataRow.sMaterialsStyle;
1038 const models = "Materials"; 1041 const models = "Materials";
1039 materialDataRow = await props.onMaterialsChange(materialDataRow, sModelsId, masterData, [], "dAuxiliaryQty", app, token, models); 1042 materialDataRow = await props.onMaterialsChange(materialDataRow, sModelsId, masterData, [], "dAuxiliaryQty", app, token, models);
1040 materialDataRow = commonBusiness.getCalculateAllMoney(app, models, "dAuxiliaryQty", masterData, materialDataRow); 1043 materialDataRow = commonBusiness.getCalculateAllMoney(app, models, "dAuxiliaryQty", masterData, materialDataRow);
@@ -1065,8 +1068,9 @@ const QuickQuoteEvent = props =&gt; { @@ -1065,8 +1068,9 @@ const QuickQuoteEvent = props =&gt; {
1065 processPrintDataRow.sParentId = masterData.sId; 1068 processPrintDataRow.sParentId = masterData.sId;
1066 processPrintDataRow.sControlId = partsDataRow.sId; 1069 processPrintDataRow.sControlId = partsDataRow.sId;
1067 // processPrintDataRow.sSlaveId = ' '; 1070 // processPrintDataRow.sSlaveId = ' ';
1068 - processPrintDataRow.sColorSerialMemo = JSON.stringify([{ sId: partInfo.sColorId, sName: partInfo.sColor, dColor: partInfo.iColor }]);  
1069 - 1071 + const iSpecialColor = partInfo.iSpecialColor !== undefined ? partInfo.iSpecialColor : partInfo.partInfoiSpecialColor;
  1072 + processPrintDataRow.sColorSerialMemo = JSON.stringify([{ sId: partInfo.sColorId, sName: partInfo.sColor, dColor: partInfo.iColor, iSpecialColor }]);
  1073 +
1070 processData.push(processPrintDataRow); 1074 processData.push(processPrintDataRow);
1071 // 配套工序 1075 // 配套工序
1072 if (bProcessAssort) { 1076 if (bProcessAssort) {
@@ -2367,6 +2371,7 @@ const BoxComponent = props =&gt; { @@ -2367,6 +2371,7 @@ const BoxComponent = props =&gt; {
2367 // 查找符合条件的索引 2371 // 查找符合条件的索引
2368 const { selectedNode } = props.state; 2372 const { selectedNode } = props.state;
2369 const index = slaveData?.findIndex(x => x.sTreeNodeName === selectedNode.showName && x.sBoxModel === props.boxModel); 2373 const index = slaveData?.findIndex(x => x.sTreeNodeName === selectedNode.showName && x.sBoxModel === props.boxModel);
  2374 +
2370 if (index !== undefined && index !== -1) { 2375 if (index !== undefined && index !== -1) {
2371 // 计算开数 2376 // 计算开数
2372 // 获取原始对象并创建一个新的对象进行更新 2377 // 获取原始对象并创建一个新的对象进行更新
@@ -2389,10 +2394,10 @@ const BoxComponent = props =&gt; { @@ -2389,10 +2394,10 @@ const BoxComponent = props =&gt; {
2389 ).toFixed(2) 2394 ).toFixed(2)
2390 ), 2395 ),
2391 // dWlcd: selectedNode.sTypeKey === 'juantong' ? Math.floor(dProductQty / dSinglePQty * ( length/ 1000)) : dWlcd, 2396 // dWlcd: selectedNode.sTypeKey === 'juantong' ? Math.floor(dProductQty / dSinglePQty * ( length/ 1000)) : dWlcd,
2392 - dWlcd: dWlcd,  
2393 - dWlkd: dWlkd, 2397 + dWlcd: sBillNo ? slaveData[index]?.dWlcd : dWlcd,
  2398 + dWlkd: sBillNo ? slaveData[index]?.dWlkd : dWlkd,
2394 dAuxiliaryQty: Math.floor((dProductQty / dSinglePQty) * (length / 1000)), 2399 dAuxiliaryQty: Math.floor((dProductQty / dSinglePQty) * (length / 1000)),
2395 - dMachineQty: Math.floor(dProductQty / dSinglePQty), 2400 + dMachineQty: sBillNo && slaveData[index].dMachineQty ? slaveData[index].dMachineQty : Math.floor(dProductQty / dSinglePQty),
2396 dSinglePQty: dSinglePQty, 2401 dSinglePQty: dSinglePQty,
2397 dMaterialsKQty: dMaterialsKQty, 2402 dMaterialsKQty: dMaterialsKQty,
2398 scale: scale, 2403 scale: scale,
@@ -3243,6 +3248,8 @@ const ManyComponent = props =&gt; { @@ -3243,6 +3248,8 @@ const ManyComponent = props =&gt; {
3243 }, 3248 },
3244 fixedHeight: 145, 3249 fixedHeight: 145,
3245 }; 3250 };
  3251 + const pricingInProgress = commonFunc.showLocalMessage(props, "sNuclearPricing", "核价中");
  3252 + const progress = commonFunc.showLocalMessage(props, "progress", "进度");
3246 return ( 3253 return (
3247 <div className={`xly-bill-list ${styles.many}`}> 3254 <div className={`xly-bill-list ${styles.many}`}>
3248 <StaticEditTable {...tableProps} /> 3255 <StaticEditTable {...tableProps} />
@@ -3295,7 +3302,7 @@ const ManyComponent = props =&gt; { @@ -3295,7 +3302,7 @@ const ManyComponent = props =&gt; {
3295 {BtnPriceDetails} 3302 {BtnPriceDetails}
3296 </Button> 3303 </Button>
3297 <Button type="primary" size="large" loading={loading || calcPriceLoading} className={styles.calcPrice} onClick={onCalcPrice}> 3304 <Button type="primary" size="large" loading={loading || calcPriceLoading} className={styles.calcPrice} onClick={onCalcPrice}>
3298 - {calcPriceLoading ? `核价中【进度${processPercent}%】...` : BtnPriceverification} 3305 + {calcPriceLoading ? `${pricingInProgress}【${progress}${processPercent}%】...` : BtnPriceverification}
3299 </Button> 3306 </Button>
3300 <Button 3307 <Button
3301 type="primary" 3308 type="primary"
@@ -4190,6 +4197,14 @@ const GetBestAlgorithm = props =&gt; { @@ -4190,6 +4197,14 @@ const GetBestAlgorithm = props =&gt; {
4190 } 4197 }
4191 } 4198 }
4192 const propsData = innerDivs[innerDivs.length - 1]; 4199 const propsData = innerDivs[innerDivs.length - 1];
  4200 + if (!propsData) {
  4201 + return {
  4202 + newMaterialLength:0,
  4203 + newMaterialWidth:0,
  4204 + dSinglePQty:0,
  4205 + index: i,
  4206 + };
  4207 + }
4193 let openEdition = 0; 4208 let openEdition = 0;
4194 const { dWlcd, sBillNo } = slaveRowData; 4209 const { dWlcd, sBillNo } = slaveRowData;
4195 4210