Commit f007e03df4d4f9681d4614a89115cec8b3f836a5
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi
Showing
8 changed files
with
220 additions
and
265 deletions
src/components/Common/Typesetting/typesetting.js
| @@ -20,8 +20,9 @@ const Typesetting = props => { | @@ -20,8 +20,9 @@ const Typesetting = props => { | ||
| 20 | boxWidth, | 20 | boxWidth, |
| 21 | boxHeight, | 21 | boxHeight, |
| 22 | textSize, | 22 | textSize, |
| 23 | + isMobile, | ||
| 23 | } = props; | 24 | } = props; |
| 24 | - if (!slaveRowData) return | 25 | + if (!slaveRowData) return; |
| 25 | const { | 26 | const { |
| 26 | dSBLB, // 上边留白 | 27 | dSBLB, // 上边留白 |
| 27 | dXBLB, // 下边留白 | 28 | dXBLB, // 下边留白 |
| @@ -52,6 +53,8 @@ const Typesetting = props => { | @@ -52,6 +53,8 @@ const Typesetting = props => { | ||
| 52 | const [dMaterialsKQty, setDMaterialsKQty] = useState(0); | 53 | const [dMaterialsKQty, setDMaterialsKQty] = useState(0); |
| 53 | const [dPartsLength, setDPartsLength] = useState(0); | 54 | const [dPartsLength, setDPartsLength] = useState(0); |
| 54 | 55 | ||
| 56 | + // 横板 | ||
| 57 | + const { dHorizontal, dPortrait, dHorizontalType, dPortraitType } = slaveRowData; | ||
| 55 | // 使用 useRef 获取 DOM 元素 | 58 | // 使用 useRef 获取 DOM 元素 |
| 56 | const boxRef = useRef(null); | 59 | const boxRef = useRef(null); |
| 57 | const boxsRef = useRef(null); | 60 | const boxsRef = useRef(null); |
| @@ -67,8 +70,10 @@ const Typesetting = props => { | @@ -67,8 +70,10 @@ const Typesetting = props => { | ||
| 67 | const slaveDataDetail = slaveData?.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel); | 70 | const slaveDataDetail = slaveData?.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel); |
| 68 | const maxWidth = Number(slaveDataDetail?.dMaxLength); | 71 | const maxWidth = Number(slaveDataDetail?.dMaxLength); |
| 69 | const maxHeight = Number(slaveDataDetail?.dMaxWidth); | 72 | const maxHeight = Number(slaveDataDetail?.dMaxWidth); |
| 73 | + | ||
| 70 | const outerWidth = Number(slaveDataDetail?.dMaxLength); // 默认取最大上机尺寸 | 74 | const outerWidth = Number(slaveDataDetail?.dMaxLength); // 默认取最大上机尺寸 |
| 71 | const outerHeight = Number(slaveDataDetail?.dMaxWidth); // 默认取最大上机尺寸 | 75 | const outerHeight = Number(slaveDataDetail?.dMaxWidth); // 默认取最大上机尺寸 |
| 76 | + console.log("🚀 ~ maxWidth:", dHorizontal, dPortrait,dHorizontalType,dPortraitType, outerWidth, outerHeight); | ||
| 72 | 77 | ||
| 73 | // 确认是竖向排列还是横向排列 | 78 | // 确认是竖向排列还是横向排列 |
| 74 | const L = masterData?.dLength; | 79 | const L = masterData?.dLength; |
| @@ -215,7 +220,6 @@ const Typesetting = props => { | @@ -215,7 +220,6 @@ const Typesetting = props => { | ||
| 215 | // 每个盒子加上边距 和第二组偏移量 如果根据次盒再加上次盒偏移量 | 220 | // 每个盒子加上边距 和第二组偏移量 如果根据次盒再加上次盒偏移量 |
| 216 | let cols = Math.floor(outerWidth / (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset))); | 221 | let cols = Math.floor(outerWidth / (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset))); |
| 217 | let rows = Math.floor(outerHeight / (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset))); | 222 | let rows = Math.floor(outerHeight / (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset))); |
| 218 | - | ||
| 219 | let colsMaxLength = (cols - 1) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) + innerWidthCombined; | 223 | let colsMaxLength = (cols - 1) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) + innerWidthCombined; |
| 220 | while (colsMaxLength >= outerWidth && cols > 0) { | 224 | while (colsMaxLength >= outerWidth && cols > 0) { |
| 221 | cols = cols - 1; | 225 | cols = cols - 1; |
| @@ -240,6 +244,28 @@ const Typesetting = props => { | @@ -240,6 +244,28 @@ const Typesetting = props => { | ||
| 240 | const commonHeightCheck = remainingHeight > jInnerHeight; | 244 | const commonHeightCheck = remainingHeight > jInnerHeight; |
| 241 | const commonWidthCheck = remainingWidth > jInnerWidth; | 245 | const commonWidthCheck = remainingWidth > jInnerWidth; |
| 242 | const remaining = isVertical ? commonHeightCheck : commonWidthCheck; | 246 | const remaining = isVertical ? commonHeightCheck : commonWidthCheck; |
| 247 | + console.log( | ||
| 248 | + cols, | ||
| 249 | + rows, | ||
| 250 | + innerWidth, | ||
| 251 | + innerHeight, | ||
| 252 | + jInnerWidth, | ||
| 253 | + jInnerHeight, | ||
| 254 | + innerWidthCombined, | ||
| 255 | + innerHeightCombined, | ||
| 256 | + remainingWidth, | ||
| 257 | + remainingHeight, | ||
| 258 | + colsMaxLength, | ||
| 259 | + rowsMaxLength, | ||
| 260 | + remaining, | ||
| 261 | + isVertical, | ||
| 262 | + boxLengthOffset, | ||
| 263 | + boxWidthOffset, | ||
| 264 | + dSLengthOffset, | ||
| 265 | + dFLengthOffset, | ||
| 266 | + "rowsMaxLength" | ||
| 267 | + ); | ||
| 268 | + | ||
| 243 | // 抵扣盒默认展示 svg | 269 | // 抵扣盒默认展示 svg |
| 244 | // const isSvg = props.slaveRowData.sName === "扣抵盒"; | 270 | // const isSvg = props.slaveRowData.sName === "扣抵盒"; |
| 245 | // 组装svg数据 | 271 | // 组装svg数据 |
| @@ -265,16 +291,16 @@ const Typesetting = props => { | @@ -265,16 +291,16 @@ const Typesetting = props => { | ||
| 265 | position: "absolute", | 291 | position: "absolute", |
| 266 | left: `${leftPosition}px`, | 292 | left: `${leftPosition}px`, |
| 267 | top: `${topPosition}px`, | 293 | top: `${topPosition}px`, |
| 268 | - transform: `rotateZ(${offsetZ}deg)`, | 294 | + |
| 269 | zIndex: 10, | 295 | zIndex: 10, |
| 270 | }} | 296 | }} |
| 271 | onDoubleClick={() => { | 297 | onDoubleClick={() => { |
| 272 | onClick(); | 298 | onClick(); |
| 273 | }} | 299 | }} |
| 274 | > | 300 | > |
| 275 | - {/* <img src={icon} width="100%" height="100%" /> */} | ||
| 276 | - <DynamicSVG {...svgProps} /> | ||
| 277 | - {/* {isSvg ? <DynamicSVG {...props} /> : <img src={icon} width="100%" height="100%" />} */} | 301 | + <div style={{ transform: `rotateZ(${offsetZ}deg)` }}> |
| 302 | + <DynamicSVG {...svgProps} /> | ||
| 303 | + </div> | ||
| 278 | </div> | 304 | </div> |
| 279 | ); | 305 | ); |
| 280 | const createBox = (col, row, index, leftPosition, topPosition, offsetZ, icon) => ( | 306 | const createBox = (col, row, index, leftPosition, topPosition, offsetZ, icon) => ( |
| @@ -299,24 +325,25 @@ const Typesetting = props => { | @@ -299,24 +325,25 @@ const Typesetting = props => { | ||
| 299 | <div | 325 | <div |
| 300 | key={`${col}-${row}-${index}`} | 326 | key={`${col}-${row}-${index}`} |
| 301 | style={{ | 327 | style={{ |
| 302 | - width: `${(iSAngle === 90 || iSAngle === 270) ? jInnerWidth:innerWidth}px`, | ||
| 303 | - height: `${(iFAngle === 90 || iFAngle === 270) ? jInnerHeight:innerHeight}px`, | 328 | + width: `${iSAngle === 90 || iSAngle === 270 ? jInnerWidth : innerWidth}px`, |
| 329 | + height: `${iFAngle === 90 || iFAngle === 270 ? jInnerHeight : innerHeight}px`, | ||
| 304 | display: "flex", | 330 | display: "flex", |
| 305 | justifyContent: "center", | 331 | justifyContent: "center", |
| 306 | alignItems: "center", | 332 | alignItems: "center", |
| 307 | position: "absolute", | 333 | position: "absolute", |
| 308 | left: `${dFLengthOffset + dYBJJ}px`, | 334 | left: `${dFLengthOffset + dYBJJ}px`, |
| 309 | top: `${iFAngle === 90 || iFAngle === 270 ? 0 : dFWidthOffset + dXBJJ}px`, | 335 | top: `${iFAngle === 90 || iFAngle === 270 ? 0 : dFWidthOffset + dXBJJ}px`, |
| 310 | - transform: `rotateZ(${iFAngle}deg)`, | ||
| 311 | }} | 336 | }} |
| 312 | > | 337 | > |
| 313 | - <DynamicSVG {...svgProps} /> | 338 | + <div style={{ transform: `rotateZ(${iFAngle}deg)` }}> |
| 339 | + <DynamicSVG {...svgProps} /> | ||
| 340 | + </div> | ||
| 314 | </div> | 341 | </div> |
| 315 | <div | 342 | <div |
| 316 | key={`${col}-${row}-${index}-1`} | 343 | key={`${col}-${row}-${index}-1`} |
| 317 | style={{ | 344 | style={{ |
| 318 | - width: `${(iSAngle === 90 || iSAngle === 270) ? jInnerWidth:innerWidth}px`, | ||
| 319 | - height: `${(iSAngle === 90 || iSAngle === 270) ? jInnerHeight:innerHeight}px`, | 345 | + width: `${iSAngle === 90 || iSAngle === 270 ? jInnerWidth : innerWidth}px`, |
| 346 | + height: `${iSAngle === 90 || iSAngle === 270 ? jInnerHeight : innerHeight}px`, | ||
| 320 | display: "flex", | 347 | display: "flex", |
| 321 | justifyContent: "center", | 348 | justifyContent: "center", |
| 322 | alignItems: "center", | 349 | alignItems: "center", |
| @@ -325,10 +352,11 @@ const Typesetting = props => { | @@ -325,10 +352,11 @@ const Typesetting = props => { | ||
| 325 | top: `${ | 352 | top: `${ |
| 326 | isVertical ? jInnerHeight + dXBJJ + dFWidthOffset + dSWidthOffset : iSAngle === 90 || iSAngle === 270 ? 0 : dSWidthOffset + dXBJJ | 353 | isVertical ? jInnerHeight + dXBJJ + dFWidthOffset + dSWidthOffset : iSAngle === 90 || iSAngle === 270 ? 0 : dSWidthOffset + dXBJJ |
| 327 | }px`, | 354 | }px`, |
| 328 | - transform: `rotateZ(${iSAngle}deg)`, | ||
| 329 | }} | 355 | }} |
| 330 | > | 356 | > |
| 331 | - <DynamicSVG {...svgProps} /> | 357 | + <div style={{ transform: `rotateZ(${iSAngle}deg)` }}> |
| 358 | + <DynamicSVG {...svgProps} /> | ||
| 359 | + </div> | ||
| 332 | </div> | 360 | </div> |
| 333 | </div> | 361 | </div> |
| 334 | ); | 362 | ); |
| @@ -362,12 +390,13 @@ const Typesetting = props => { | @@ -362,12 +390,13 @@ const Typesetting = props => { | ||
| 362 | position: "absolute", | 390 | position: "absolute", |
| 363 | left: `${dFLengthOffset + dYBJJ}px`, | 391 | left: `${dFLengthOffset + dYBJJ}px`, |
| 364 | top: `${dFWidthOffset + dXBJJ}px`, | 392 | top: `${dFWidthOffset + dXBJJ}px`, |
| 365 | - transform: `rotateZ(${iFAngle}deg)`, | ||
| 366 | }} | 393 | }} |
| 367 | > | 394 | > |
| 368 | {/* <img src={icon} width="100%" height="100%" /> */} | 395 | {/* <img src={icon} width="100%" height="100%" /> */} |
| 369 | {/* {isSvg ? <DynamicSVG {...props} /> : <img src={icon} width="100%" height="100%" />} */} | 396 | {/* {isSvg ? <DynamicSVG {...props} /> : <img src={icon} width="100%" height="100%" />} */} |
| 370 | - <DynamicSVG {...svgProps} /> | 397 | + <div style={{ transform: `rotateZ(${iFAngle}deg)` }}> |
| 398 | + <DynamicSVG {...svgProps} /> | ||
| 399 | + </div> | ||
| 371 | </div> | 400 | </div> |
| 372 | </div> | 401 | </div> |
| 373 | ); | 402 | ); |
| @@ -389,7 +418,6 @@ const Typesetting = props => { | @@ -389,7 +418,6 @@ const Typesetting = props => { | ||
| 389 | const calculateTopPosition = (row, reference, isVertical, topPosition, dSWidthOffset, dXBJJ) => { | 418 | const calculateTopPosition = (row, reference, isVertical, topPosition, dSWidthOffset, dXBJJ) => { |
| 390 | if (isVertical) { | 419 | if (isVertical) { |
| 391 | if (reference) { | 420 | if (reference) { |
| 392 | - | ||
| 393 | return row === 0 ? topPosition : topPosition + boxWidthOffset * row; | 421 | return row === 0 ? topPosition : topPosition + boxWidthOffset * row; |
| 394 | } else { | 422 | } else { |
| 395 | return row === 0 ? topPosition : topPosition + (dSWidthOffset + boxWidthOffset) * row; | 423 | return row === 0 ? topPosition : topPosition + (dSWidthOffset + boxWidthOffset) * row; |
| @@ -404,23 +432,20 @@ const Typesetting = props => { | @@ -404,23 +432,20 @@ const Typesetting = props => { | ||
| 404 | }; | 432 | }; |
| 405 | const scaleXD = (clientWidth - 50) / (outerWidth + 110); | 433 | const scaleXD = (clientWidth - 50) / (outerWidth + 110); |
| 406 | const scaleYD = (clientHeight - 5) / (outerHeight + 90); | 434 | const scaleYD = (clientHeight - 5) / (outerHeight + 90); |
| 407 | - useEffect( | ||
| 408 | - () => { | ||
| 409 | - // 计算缩放比例 | ||
| 410 | - // setBoxKey(new Date().getTime()); | ||
| 411 | - setTimeout(() => { | ||
| 412 | - const scaleX = (clientWidth - 50) / (outerWidth + 110); | ||
| 413 | - const scaleY = (clientHeight - 5) / (outerHeight + 90); | ||
| 414 | - const newScale = Math.min(scaleX, scaleY); | ||
| 415 | - setScale(newScale); | ||
| 416 | - if (boxRef.current) { | ||
| 417 | - boxRef.current.style.transform = `scale(${scaleX}, ${scaleY})`; | ||
| 418 | - boxRef.current.style.transformOrigin = "top left"; | ||
| 419 | - } | ||
| 420 | - }, 0); | ||
| 421 | - }, | ||
| 422 | - [radioValue, slaveRowData, masterData, selectedNode, slaveData] | ||
| 423 | - ); | 435 | + useEffect(() => { |
| 436 | + // 计算缩放比例 | ||
| 437 | + // setBoxKey(new Date().getTime()); | ||
| 438 | + setTimeout(() => { | ||
| 439 | + const scaleX = (clientWidth - 50) / (outerWidth + 110); | ||
| 440 | + const scaleY = (clientHeight - 5) / (outerHeight + 90); | ||
| 441 | + const newScale = Math.min(scaleX, scaleY); | ||
| 442 | + setScale(newScale); | ||
| 443 | + if (boxRef.current) { | ||
| 444 | + boxRef.current.style.transform = `scale(${scaleX}, ${scaleY})`; | ||
| 445 | + boxRef.current.style.transformOrigin = "top left"; | ||
| 446 | + } | ||
| 447 | + }, 0); | ||
| 448 | + }, [radioValue, slaveRowData, masterData, selectedNode, slaveData]); | ||
| 424 | // 生成里层 div 的数组 | 449 | // 生成里层 div 的数组 |
| 425 | const innerDivs = []; | 450 | const innerDivs = []; |
| 426 | for (let col = 0; col < cols; col++) { | 451 | for (let col = 0; col < cols; col++) { |
| @@ -476,17 +501,21 @@ const Typesetting = props => { | @@ -476,17 +501,21 @@ const Typesetting = props => { | ||
| 476 | const propsDataWidth = Number(propsData.props.style.width.slice(0, -2)); | 501 | const propsDataWidth = Number(propsData.props.style.width.slice(0, -2)); |
| 477 | const propsDataHeight = Number(propsData.props.style.height.slice(0, -2)); | 502 | const propsDataHeight = Number(propsData.props.style.height.slice(0, -2)); |
| 478 | const propsDataTop = Number(propsData.props.style.top.slice(0, -2)); | 503 | const propsDataTop = Number(propsData.props.style.top.slice(0, -2)); |
| 479 | - | ||
| 480 | - const newMaterialLength = propsDataLeft + innerWidthCombined; // 原纸长 | 504 | + // 判断列是否是单独的 |
| 505 | + const newMaterialLength = propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined); // 原纸长 | ||
| 481 | const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; | 506 | const newMaterialWidth = propsDataTop + propsDataHeight - dSBLB; |
| 482 | // 计算开数 | 507 | // 计算开数 |
| 483 | - const dSinglePQty = variables | 508 | + const dSinglePQty = isVertical |
| 484 | ? remaining | 509 | ? remaining |
| 485 | ? cols + cols * (rows * 2) | 510 | ? cols + cols * (rows * 2) |
| 486 | : cols * (rows * 2) | 511 | : cols * (rows * 2) |
| 487 | : remaining | 512 | : remaining |
| 488 | - ? rows + rows * (cols * 2) | ||
| 489 | - : rows * (cols * 2); | 513 | + ? rows + rows * (cols * 2) |
| 514 | + : rows * (cols * 2); | ||
| 515 | + // 计算竖版数量 | ||
| 516 | + const dHorizontalType = isVertical ? cols : remaining ? cols * 2 + 1 : cols * 2; | ||
| 517 | + const dPortraitType = isVertical ? rows * 2 : remaining ? rows : rows; | ||
| 518 | + | ||
| 490 | const newDProductQty = masterData.dProductQty; | 519 | const newDProductQty = masterData.dProductQty; |
| 491 | const dMaterialsKQty = slaveDataDetail.dMaterialsKQty || 1; | 520 | const dMaterialsKQty = slaveDataDetail.dMaterialsKQty || 1; |
| 492 | if ( | 521 | if ( |
| @@ -516,7 +545,9 @@ const Typesetting = props => { | @@ -516,7 +545,9 @@ const Typesetting = props => { | ||
| 516 | newMaterialLength, | 545 | newMaterialLength, |
| 517 | newMaterialWidth, | 546 | newMaterialWidth, |
| 518 | innerWidth, | 547 | innerWidth, |
| 519 | - innerHeight | 548 | + innerHeight, |
| 549 | + dHorizontalType, | ||
| 550 | + dPortraitType | ||
| 520 | ); | 551 | ); |
| 521 | } else if (dProductQty !== newDProductQty) { | 552 | } else if (dProductQty !== newDProductQty) { |
| 522 | setDProductQty(newDProductQty); | 553 | setDProductQty(newDProductQty); |
| @@ -533,7 +564,9 @@ const Typesetting = props => { | @@ -533,7 +564,9 @@ const Typesetting = props => { | ||
| 533 | slaveDataDetail.dWlcd, | 564 | slaveDataDetail.dWlcd, |
| 534 | slaveDataDetail.dWlkd, | 565 | slaveDataDetail.dWlkd, |
| 535 | innerWidth, | 566 | innerWidth, |
| 536 | - innerHeight | 567 | + innerHeight, |
| 568 | + dHorizontalType, | ||
| 569 | + dPortraitType | ||
| 537 | ); | 570 | ); |
| 538 | } | 571 | } |
| 539 | openEdition = (((newMaterialLength * newMaterialWidth) / (maxWidth * maxHeight)) * 100).toFixed(2); | 572 | openEdition = (((newMaterialLength * newMaterialWidth) / (maxWidth * maxHeight)) * 100).toFixed(2); |
| @@ -550,8 +583,9 @@ const Typesetting = props => { | @@ -550,8 +583,9 @@ const Typesetting = props => { | ||
| 550 | } | 583 | } |
| 551 | const isMax = slaveDataDetail?.dMaxLength && Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength); | 584 | const isMax = slaveDataDetail?.dMaxLength && Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength); |
| 552 | const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length; | 585 | const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length; |
| 553 | - | 586 | + |
| 554 | const onClick = () => { | 587 | const onClick = () => { |
| 588 | + if (isMobile) return; | ||
| 555 | setIsModalOpen(true); | 589 | setIsModalOpen(true); |
| 556 | // setBoxKeys(new Date().getTime()); | 590 | // setBoxKeys(new Date().getTime()); |
| 557 | setTimeout(() => { | 591 | setTimeout(() => { |
src/components/QuickQuote/index.jsx
| @@ -1525,7 +1525,22 @@ const BoxComponent = props => { | @@ -1525,7 +1525,22 @@ const BoxComponent = props => { | ||
| 1525 | 1525 | ||
| 1526 | // 使用 useCallback 确保回调函数的稳定性 | 1526 | // 使用 useCallback 确保回调函数的稳定性 |
| 1527 | const handleSaveState = useCallback( | 1527 | const handleSaveState = useCallback( |
| 1528 | - (length, width, slaveData, masterData, dSinglePQty, dMaterialsKQty, dProductQty, scale, dWlcd, dWlkd, innerWidth, innerHeight) => { | 1528 | + ( |
| 1529 | + length, | ||
| 1530 | + width, | ||
| 1531 | + slaveData, | ||
| 1532 | + masterData, | ||
| 1533 | + dSinglePQty, | ||
| 1534 | + dMaterialsKQty, | ||
| 1535 | + dProductQty, | ||
| 1536 | + scale, | ||
| 1537 | + dWlcd, | ||
| 1538 | + dWlkd, | ||
| 1539 | + innerWidth, | ||
| 1540 | + innerHeight, | ||
| 1541 | + dHorizontal, | ||
| 1542 | + dPortrait | ||
| 1543 | + ) => { | ||
| 1529 | // 查找符合条件的索引 | 1544 | // 查找符合条件的索引 |
| 1530 | const { selectedNode } = props.state; | 1545 | const { selectedNode } = props.state; |
| 1531 | 1546 | ||
| @@ -1564,6 +1579,10 @@ const BoxComponent = props => { | @@ -1564,6 +1579,10 @@ const BoxComponent = props => { | ||
| 1564 | scale: scale, | 1579 | scale: scale, |
| 1565 | dPartsLength: innerWidth, | 1580 | dPartsLength: innerWidth, |
| 1566 | dPartsWidth: innerHeight, | 1581 | dPartsWidth: innerHeight, |
| 1582 | + dHorizontal: dHorizontal, | ||
| 1583 | + dPortrait: dPortrait, | ||
| 1584 | + dHorizontalType: dHorizontal, | ||
| 1585 | + dPortraitType: dPortrait, | ||
| 1567 | }; | 1586 | }; |
| 1568 | // 更新状态 | 1587 | // 更新状态 |
| 1569 | props.setState(prevState => ({ | 1588 | props.setState(prevState => ({ |
| @@ -1707,6 +1726,7 @@ const BoxComponent = props => { | @@ -1707,6 +1726,7 @@ const BoxComponent = props => { | ||
| 1707 | dSvgBoxHeight: 300, | 1726 | dSvgBoxHeight: 300, |
| 1708 | showNew: 1, | 1727 | showNew: 1, |
| 1709 | }; | 1728 | }; |
| 1729 | + const isShowImg = boxList.find(x => x.sName === "盒身")?.type !== "" || false; | ||
| 1710 | return ( | 1730 | return ( |
| 1711 | <Tabs | 1731 | <Tabs |
| 1712 | key={boxModel} | 1732 | key={boxModel} |
| @@ -1773,7 +1793,7 @@ const BoxComponent = props => { | @@ -1773,7 +1793,7 @@ const BoxComponent = props => { | ||
| 1773 | <div className={styles.boxPart1Right}> | 1793 | <div className={styles.boxPart1Right}> |
| 1774 | <div className={styles.boxRreview}> | 1794 | <div className={styles.boxRreview}> |
| 1775 | <Image.PreviewGroup> | 1795 | <Image.PreviewGroup> |
| 1776 | - {slaveRowData.sPackDetailPathUpLoad ? ( | 1796 | + {!isShowImg ? ( |
| 1777 | <Image width={300} src={slaveRowData.sPackDetailPathUpLoad} /> | 1797 | <Image width={300} src={slaveRowData.sPackDetailPathUpLoad} /> |
| 1778 | ) : svgProps.boxList.length ? ( | 1798 | ) : svgProps.boxList.length ? ( |
| 1779 | <div style={{ width: " 300px", height: "300px" }}> | 1799 | <div style={{ width: " 300px", height: "300px" }}> |
| @@ -2260,8 +2280,8 @@ const BoxModelSelectedModal = props => { | @@ -2260,8 +2280,8 @@ const BoxModelSelectedModal = props => { | ||
| 2260 | ]; | 2280 | ]; |
| 2261 | slaveData.forEach(x => { | 2281 | slaveData.forEach(x => { |
| 2262 | boxList.push({ | 2282 | boxList.push({ |
| 2263 | - value: x.iValue, | ||
| 2264 | - sName: titleList1.find(item => item.value === x.sCode)?.name || "", | 2283 | + value: x.iValue || x.sDefault, |
| 2284 | + sName: titleList1.find(item => item.value === x.sCode || item.value === x.sName)?.name || "", | ||
| 2265 | isEditable: true, | 2285 | isEditable: true, |
| 2266 | isSelect: false, | 2286 | isSelect: false, |
| 2267 | selectValue: null, | 2287 | selectValue: null, |
| @@ -2289,8 +2309,8 @@ const BoxModelSelectedModal = props => { | @@ -2289,8 +2309,8 @@ const BoxModelSelectedModal = props => { | ||
| 2289 | const svgProps = { | 2309 | const svgProps = { |
| 2290 | ...props, | 2310 | ...props, |
| 2291 | boxList, | 2311 | boxList, |
| 2292 | - dSvgBoxWidth: 100, | ||
| 2293 | - dSvgBoxHeight: 100, | 2312 | + dSvgBoxWidth: 250, |
| 2313 | + dSvgBoxHeight: 250, | ||
| 2294 | showNew: 1, | 2314 | showNew: 1, |
| 2295 | }; | 2315 | }; |
| 2296 | return svgProps; | 2316 | return svgProps; |
| @@ -2313,10 +2333,10 @@ const BoxModelSelectedModal = props => { | @@ -2313,10 +2333,10 @@ const BoxModelSelectedModal = props => { | ||
| 2313 | // (value ? (column.dataIndex === 'sPackDetailPath' ? (boxData[index].sPackPath ? <img src={value} alt="" width={270} height={270} /> : '') : <img src={value} alt="" width={270} height={270} />) : "暂无图片"); | 2333 | // (value ? (column.dataIndex === 'sPackDetailPath' ? (boxData[index].sPackPath ? <img src={value} alt="" width={270} height={270} /> : '') : <img src={value} alt="" width={270} height={270} />) : "暂无图片"); |
| 2314 | column.render = (value, record, index) => | 2334 | column.render = (value, record, index) => |
| 2315 | column.dataIndex === "sPackDetailPathUpLoad" ? ( | 2335 | column.dataIndex === "sPackDetailPathUpLoad" ? ( |
| 2316 | - value ? ( | ||
| 2317 | - <img src={value} alt="" width={270} height={270} /> | ||
| 2318 | - ) : ( | 2336 | + boxData[index].sTypes ? ( |
| 2319 | <DynamicSVG {...getSvgProps(boxData[index])} /> | 2337 | <DynamicSVG {...getSvgProps(boxData[index])} /> |
| 2338 | + ) : ( | ||
| 2339 | + <img src={value} alt="" width={270} height={270} /> | ||
| 2320 | ) | 2340 | ) |
| 2321 | ) : value ? ( | 2341 | ) : value ? ( |
| 2322 | <img src={value} alt="" width={270} height={270} /> | 2342 | <img src={value} alt="" width={270} height={270} /> |
| @@ -2411,7 +2431,10 @@ const BackendParamsExtraComponent = props => { | @@ -2411,7 +2431,10 @@ const BackendParamsExtraComponent = props => { | ||
| 2411 | 2431 | ||
| 2412 | const viewProps = { | 2432 | const viewProps = { |
| 2413 | ...props, | 2433 | ...props, |
| 2414 | - viewConfigs: viewConfigs, | 2434 | + viewConfigs: viewConfigs.map(item => ({ |
| 2435 | + ...item, | ||
| 2436 | + costomStyle: styles.sParamConfig, | ||
| 2437 | + })), | ||
| 2415 | tableConfig: { ...slaveConfig, gdsconfigformslave: viewConfigs }, | 2438 | tableConfig: { ...slaveConfig, gdsconfigformslave: viewConfigs }, |
| 2416 | iColValueView: 24, | 2439 | iColValueView: 24, |
| 2417 | getViewRow: config => { | 2440 | getViewRow: config => { |
| @@ -2458,7 +2481,7 @@ const BackendParamsExtraComponent = props => { | @@ -2458,7 +2481,7 @@ const BackendParamsExtraComponent = props => { | ||
| 2458 | return ( | 2481 | return ( |
| 2459 | <> | 2482 | <> |
| 2460 | <Divider style={{ margin: "5px 0" }} /> | 2483 | <Divider style={{ margin: "5px 0" }} /> |
| 2461 | - <div className={`${styles.viewTable} ${styles.viewTableDownView1}`}> | 2484 | + <div className={`${styles.viewTable} ${styles.viewTableDownView1} ${styles.viewTableDownView2}`}> |
| 2462 | <CommonViewTable {...viewProps} /> | 2485 | <CommonViewTable {...viewProps} /> |
| 2463 | </div> | 2486 | </div> |
| 2464 | </> | 2487 | </> |
src/components/QuickQuote/index.less
src/mobile/components/SelectInput.jsx
| @@ -59,9 +59,9 @@ const SelectInput = props => { | @@ -59,9 +59,9 @@ const SelectInput = props => { | ||
| 59 | const handleConfirm = () => { | 59 | const handleConfirm = () => { |
| 60 | if (!values[0]) { | 60 | if (!values[0]) { |
| 61 | setVisible(false); | 61 | setVisible(false); |
| 62 | - | ||
| 63 | return; | 62 | return; |
| 64 | } | 63 | } |
| 64 | + // 判断是否是 | ||
| 65 | const index = columns.findIndex(item => item.value === values[0]); | 65 | const index = columns.findIndex(item => item.value === values[0]); |
| 66 | const data = coplyColumns[index]; | 66 | const data = coplyColumns[index]; |
| 67 | data[itemDetail.sName] = data[itemDetail.sName] ? data[itemDetail.sName] : data.label || data.sName || data.sProcessName || data.sColorName; | 67 | data[itemDetail.sName] = data[itemDetail.sName] ? data[itemDetail.sName] : data.label || data.sName || data.sProcessName || data.sColorName; |
src/mobile/quotation/detailNew.jsx
| 1 | import { useRef, useEffect, useState, useCallback, useMemo } from "react"; | 1 | import { useRef, useEffect, useState, useCallback, useMemo } from "react"; |
| 2 | import { history } from "umi"; | 2 | import { history } from "umi"; |
| 3 | -import { Toast, Input, Tabs, Selector, Grid, Image, Button, Checkbox, Switch, Dialog, Radio } from "antd-mobile"; | ||
| 4 | -import { AddOutline, MinusOutline, EditFill } from "antd-mobile-icons"; | 3 | +import { Toast, Input, Tabs, Selector, Grid, Image, Button, Checkbox, Switch, Dialog, Radio, Space } from "antd-mobile"; |
| 4 | +import { AddOutline, MinusOutline, EditFill, CloseOutline } from "antd-mobile-icons"; | ||
| 5 | import commonConfig from "@/utils/config"; | 5 | import commonConfig from "@/utils/config"; |
| 6 | import * as commonServices from "@/services/services"; | 6 | import * as commonServices from "@/services/services"; |
| 7 | import * as commonFunc from "@/components/Common/commonFunc"; | 7 | import * as commonFunc from "@/components/Common/commonFunc"; |
| @@ -286,6 +286,14 @@ const QuickQuoteEvent = props => { | @@ -286,6 +286,14 @@ const QuickQuoteEvent = props => { | ||
| 286 | dMachineLength: slaveData[saveIndex].dWlcd, | 286 | dMachineLength: slaveData[saveIndex].dWlcd, |
| 287 | }; | 287 | }; |
| 288 | } | 288 | } |
| 289 | + | ||
| 290 | + if (sFieldName === "dMaxLength") { | ||
| 291 | + slaveData[saveIndex] = { | ||
| 292 | + ...slaveData[saveIndex], | ||
| 293 | + dMaxLength: changeValue.dMachineLength, | ||
| 294 | + dMaxWidth: changeValue.dMachineWidth, | ||
| 295 | + }; | ||
| 296 | + } | ||
| 289 | setState(pre => ({ ...pre, slaveData, ...extraState })); | 297 | setState(pre => ({ ...pre, slaveData, ...extraState })); |
| 290 | } else if (name === "finished") { | 298 | } else if (name === "finished") { |
| 291 | const { productProcessInfo = [] } = masterData; | 299 | const { productProcessInfo = [] } = masterData; |
| @@ -939,7 +947,6 @@ const QuickQuoteEvent = props => { | @@ -939,7 +947,6 @@ const QuickQuoteEvent = props => { | ||
| 939 | }; | 947 | }; |
| 940 | // 入口 | 948 | // 入口 |
| 941 | const QuotationAllprogressDetail = baseProps => { | 949 | const QuotationAllprogressDetail = baseProps => { |
| 942 | - // const masterProps = getProps(baseProps); | ||
| 943 | const props = QuickQuoteEvent(baseProps); | 950 | const props = QuickQuoteEvent(baseProps); |
| 944 | const { selectedNode, slaveConfig, quotationData, app, sModelsId, masterData } = props; | 951 | const { selectedNode, slaveConfig, quotationData, app, sModelsId, masterData } = props; |
| 945 | const { showName, sUnit } = quotationData; | 952 | const { showName, sUnit } = quotationData; |
| @@ -1019,7 +1026,6 @@ const QuotationAllprogressDetail = baseProps => { | @@ -1019,7 +1026,6 @@ const QuotationAllprogressDetail = baseProps => { | ||
| 1019 | // 取上机尺寸 | 1026 | // 取上机尺寸 |
| 1020 | return commonUtils.convertStrToObj(sColumnNameConfigStr, []); | 1027 | return commonUtils.convertStrToObj(sColumnNameConfigStr, []); |
| 1021 | }; | 1028 | }; |
| 1022 | - | ||
| 1023 | return ( | 1029 | return ( |
| 1024 | <div className={styles.quotationDetailBox}> | 1030 | <div className={styles.quotationDetailBox}> |
| 1025 | <QuotationDetail {...props} /> | 1031 | <QuotationDetail {...props} /> |
| @@ -1179,7 +1185,7 @@ const QuotationTabs = props => { | @@ -1179,7 +1185,7 @@ const QuotationTabs = props => { | ||
| 1179 | }; | 1185 | }; |
| 1180 | return ( | 1186 | return ( |
| 1181 | <div> | 1187 | <div> |
| 1182 | - <div> | 1188 | + <div className={styles.tabsBox}> |
| 1183 | <Tabs | 1189 | <Tabs |
| 1184 | activeKey={activeKey} | 1190 | activeKey={activeKey} |
| 1185 | onChange={key => { | 1191 | onChange={key => { |
| @@ -1188,12 +1194,23 @@ const QuotationTabs = props => { | @@ -1188,12 +1194,23 @@ const QuotationTabs = props => { | ||
| 1188 | > | 1194 | > |
| 1189 | {sAllPartsNameList && sAllPartsNameList.length | 1195 | {sAllPartsNameList && sAllPartsNameList.length |
| 1190 | ? sAllPartsNameList.map((pane, index) => ( | 1196 | ? sAllPartsNameList.map((pane, index) => ( |
| 1191 | - <Tabs.Tab key={pane} title={pane}> | 1197 | + <Tabs.Tab key={pane} title={pane} style={{ position: "relative" }}> |
| 1192 | <BoxComponent {...tabsProps} paneKey={pane} /> | 1198 | <BoxComponent {...tabsProps} paneKey={pane} /> |
| 1199 | + {/* <CloseOutline className={styles.tabClearBtn}/> */} | ||
| 1193 | </Tabs.Tab> | 1200 | </Tabs.Tab> |
| 1194 | )) | 1201 | )) |
| 1195 | : ""} | 1202 | : ""} |
| 1196 | </Tabs> | 1203 | </Tabs> |
| 1204 | + {/* <Button | ||
| 1205 | + className={styles.tabAddBtn} | ||
| 1206 | + color="primary" | ||
| 1207 | + fill="solid" | ||
| 1208 | + size="small" | ||
| 1209 | + style={{ width: "1.93rem", height: "1.93rem", display: "flex", justifyContent: "center", alignItems: "center", textAlign: "center" }} | ||
| 1210 | + onClick={() => {}} | ||
| 1211 | + > | ||
| 1212 | + <AddOutline /> | ||
| 1213 | + </Button> */} | ||
| 1197 | </div> | 1214 | </div> |
| 1198 | </div> | 1215 | </div> |
| 1199 | ); | 1216 | ); |
| @@ -1413,16 +1430,25 @@ const BoxComponent = props => { | @@ -1413,16 +1430,25 @@ const BoxComponent = props => { | ||
| 1413 | 1430 | ||
| 1414 | // 后道参数 | 1431 | // 后道参数 |
| 1415 | const { sBackProcessData } = slaveRowData || []; | 1432 | const { sBackProcessData } = slaveRowData || []; |
| 1416 | - const downAbleConfigsNew = downAbleConfigs.reduce((pre, cur) => { | ||
| 1417 | - const childConfigs = downAbleExtraConfigs.filter(item => item.sParentName === cur.showName); | ||
| 1418 | - pre.push(cur, ...childConfigs); | ||
| 1419 | - return pre; | ||
| 1420 | - }, []); | 1433 | + const [downAbleConfigsNew, setDownAbleConfigsNew] = useState([]); |
| 1434 | + // const downAbleConfigsNew = downAbleConfigs.reduce((pre, cur) => { | ||
| 1435 | + // const childConfigs = downAbleExtraConfigs.filter(item => item.sParentName === cur.showName); | ||
| 1436 | + // pre.push(cur, ...childConfigs); | ||
| 1437 | + // return pre; | ||
| 1438 | + // }, []); | ||
| 1439 | + useEffect(() => { | ||
| 1440 | + setDownAbleConfigsNew(downAbleConfigs); | ||
| 1441 | + }, [downAbleConfigs]); | ||
| 1421 | // 初始化状态,存储每个 Switch 的状态 | 1442 | // 初始化状态,存储每个 Switch 的状态 |
| 1422 | const [switchStates, setSwitchStates] = useState(null); | 1443 | const [switchStates, setSwitchStates] = useState(null); |
| 1423 | useEffect(() => { | 1444 | useEffect(() => { |
| 1424 | if (!sBackProcessData) return; | 1445 | if (!sBackProcessData) return; |
| 1425 | - const newSwitchStates = downAbleConfigsNew; | 1446 | + const newSwitchStates = downAbleConfigsNew |
| 1447 | + .filter(item => item.sPartsName === boxModel || !item.sPartsName) | ||
| 1448 | + .reduce((acc, item, index) => { | ||
| 1449 | + acc[item.sName] = sBackProcessData ? sBackProcessData[index][item.sName] !== "" : false; | ||
| 1450 | + return acc; | ||
| 1451 | + }, {}); | ||
| 1426 | 1452 | ||
| 1427 | setSwitchStates(newSwitchStates); | 1453 | setSwitchStates(newSwitchStates); |
| 1428 | }, [downAbleConfigsNew, boxModel]); // 依赖数组 | 1454 | }, [downAbleConfigsNew, boxModel]); // 依赖数组 |
| @@ -1440,7 +1466,7 @@ const BoxComponent = props => { | @@ -1440,7 +1466,7 @@ const BoxComponent = props => { | ||
| 1440 | .map((item, i) => ({ | 1466 | .map((item, i) => ({ |
| 1441 | ...item, | 1467 | ...item, |
| 1442 | isSelect: switchStates ? switchStates[item.sName] : false, | 1468 | isSelect: switchStates ? switchStates[item.sName] : false, |
| 1443 | - // sName: "sParams" + i, | 1469 | + sName: "sParams" + i, |
| 1444 | sProductClassifyId: item.sId, | 1470 | sProductClassifyId: item.sId, |
| 1445 | })); | 1471 | })); |
| 1446 | const downViewProps = { | 1472 | const downViewProps = { |
| @@ -1469,7 +1495,8 @@ const BoxComponent = props => { | @@ -1469,7 +1495,8 @@ const BoxComponent = props => { | ||
| 1469 | tableName: "finished", | 1495 | tableName: "finished", |
| 1470 | }; | 1496 | }; |
| 1471 | const calcMethodData = commonUtils.convertStrToObj(slaveRowData?.sColumnNameConfigExclusion, []); | 1497 | const calcMethodData = commonUtils.convertStrToObj(slaveRowData?.sColumnNameConfigExclusion, []); |
| 1472 | - const radioValue = calcMethodData[0]?.sCode; | 1498 | + // const radioValue = null; |
| 1499 | + const { radioValue = calcMethodData[0]?.sCode } = slaveRowData; | ||
| 1473 | const [materialLength, setMaterialLength] = useState(0); | 1500 | const [materialLength, setMaterialLength] = useState(0); |
| 1474 | const [materialWidth, setMaterialWidth] = useState(0); | 1501 | const [materialWidth, setMaterialWidth] = useState(0); |
| 1475 | // 使用 useCallback 确保回调函数的稳定性 | 1502 | // 使用 useCallback 确保回调函数的稳定性 |
| @@ -1563,6 +1590,7 @@ const BoxComponent = props => { | @@ -1563,6 +1590,7 @@ const BoxComponent = props => { | ||
| 1563 | boxWidth: 190, | 1590 | boxWidth: 190, |
| 1564 | boxHeight: 150, | 1591 | boxHeight: 150, |
| 1565 | textSize: 9, | 1592 | textSize: 9, |
| 1593 | + isMobile: true, | ||
| 1566 | // boxPicData, | 1594 | // boxPicData, |
| 1567 | }; | 1595 | }; |
| 1568 | const showImgMProps = { | 1596 | const showImgMProps = { |
| @@ -1664,7 +1692,10 @@ const BoxComponent = props => { | @@ -1664,7 +1692,10 @@ const BoxComponent = props => { | ||
| 1664 | ); | 1692 | ); |
| 1665 | }; | 1693 | }; |
| 1666 | const { loading } = props; | 1694 | const { loading } = props; |
| 1667 | - | 1695 | + const calcMethod = calcMethodData.map(item => ({ |
| 1696 | + value: item.sCode, | ||
| 1697 | + label: item.showName, | ||
| 1698 | + })); | ||
| 1668 | return ( | 1699 | return ( |
| 1669 | <div> | 1700 | <div> |
| 1670 | <Selector | 1701 | <Selector |
| @@ -1725,7 +1756,14 @@ const BoxComponent = props => { | @@ -1725,7 +1756,14 @@ const BoxComponent = props => { | ||
| 1725 | <Grid.Item> | 1756 | <Grid.Item> |
| 1726 | <div className={styles.customer} key={x.id || x.showName}> | 1757 | <div className={styles.customer} key={x.id || x.showName}> |
| 1727 | <div>{x.showName}</div> | 1758 | <div>{x.showName}</div> |
| 1728 | - <SelectInput {...upViewProps20} itemDetail={x} bCanInput={true} /> | 1759 | + <SelectInput |
| 1760 | + {...upViewProps20} | ||
| 1761 | + itemDetail={x} | ||
| 1762 | + bCanInput={() => { | ||
| 1763 | + // if (x.showDropDown) return false; | ||
| 1764 | + return true; | ||
| 1765 | + }} | ||
| 1766 | + /> | ||
| 1729 | </div> | 1767 | </div> |
| 1730 | </Grid.Item> | 1768 | </Grid.Item> |
| 1731 | )) | 1769 | )) |
| @@ -1740,6 +1778,24 @@ const BoxComponent = props => { | @@ -1740,6 +1778,24 @@ const BoxComponent = props => { | ||
| 1740 | <ShowImgM {...showImgMProps} /> | 1778 | <ShowImgM {...showImgMProps} /> |
| 1741 | </div> | 1779 | </div> |
| 1742 | </div> | 1780 | </div> |
| 1781 | + <Radio.Group | ||
| 1782 | + value={radioValue} | ||
| 1783 | + onChange={e => { | ||
| 1784 | + const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); | ||
| 1785 | + slaveData[iIndex].radioValue = e; | ||
| 1786 | + props.setState(pre => ({ | ||
| 1787 | + ...pre, | ||
| 1788 | + slaveData: slaveData, | ||
| 1789 | + })); | ||
| 1790 | + }} | ||
| 1791 | + > | ||
| 1792 | + {calcMethod.map(item => ( | ||
| 1793 | + <Radio value={item.value} style={{ marginRight: "0.5rem" }}> | ||
| 1794 | + {" "} | ||
| 1795 | + {item.label} | ||
| 1796 | + </Radio> | ||
| 1797 | + ))} | ||
| 1798 | + </Radio.Group> | ||
| 1743 | <div> | 1799 | <div> |
| 1744 | <MaterialsComponent {...props} slaveRowData={slaveRowData} boxModel={boxModel} /> | 1800 | <MaterialsComponent {...props} slaveRowData={slaveRowData} boxModel={boxModel} /> |
| 1745 | </div> | 1801 | </div> |
src/mobile/quotation/index.json deleted
| 1 | -{ | ||
| 2 | - "bQuotation": true, | ||
| 3 | - "sProductName": "单层彩盒", | ||
| 4 | - "sProductUnit": "PCS", | ||
| 5 | - "sCustomerName": "EnglishTest", | ||
| 6 | - "sProvince": "北京市", | ||
| 7 | - "sCity": "市辖区", | ||
| 8 | - "sArea": "东城区", | ||
| 9 | - "sCurrency": "人民币", | ||
| 10 | - "sConsignee": "Gordan", | ||
| 11 | - "sConsigneeMobile": "15648630521", | ||
| 12 | - "sContacts": "Gordan", | ||
| 13 | - "sCustomerId": "17495388380001631448425800731100", | ||
| 14 | - "sTaxId": "17128239240007522551135755385000", | ||
| 15 | - "dTaxRate": "13.000000", | ||
| 16 | - "sCustomerNo": "09260174", | ||
| 17 | - "sTaxName": "销项税13%", | ||
| 18 | - "handleType": "update", | ||
| 19 | - "sId": "17496097010006280362665408954000", | ||
| 20 | - "dLength": "100", | ||
| 21 | - "dWidth": 100, | ||
| 22 | - "dHeight": 100, | ||
| 23 | - "dProductQty": 1000, | ||
| 24 | - "cpProcessName": "", | ||
| 25 | - "productProcessInfo": [], | ||
| 26 | - "sProductClassifyId": "20240108210154670452968456436630", | ||
| 27 | - "sProductName1": "单层彩盒", | ||
| 28 | - "dProductWidth": 100, | ||
| 29 | - "dProductLength": "100", | ||
| 30 | - "dProductHeight": 100, | ||
| 31 | - "sProductStyle": "100*100*100", | ||
| 32 | - "product": { | ||
| 33 | - "sProductName": "单层彩盒", | ||
| 34 | - "sProductUnit": "PCS", | ||
| 35 | - "sCustomerName": "EnglishTest", | ||
| 36 | - "sProvince": "北京市", | ||
| 37 | - "sCity": "市辖区", | ||
| 38 | - "sArea": "东城区", | ||
| 39 | - "sCurrency": "人民币", | ||
| 40 | - "sConsignee": "Gordan", | ||
| 41 | - "sConsigneeMobile": "15648630521", | ||
| 42 | - "sContacts": "Gordan", | ||
| 43 | - "sCustomerId": "17495388380001631448425800731100", | ||
| 44 | - "sTaxId": "17128239240007522551135755385000", | ||
| 45 | - "dTaxRate": "13.000000", | ||
| 46 | - "sCustomerNo": "09260174", | ||
| 47 | - "sTaxName": "销项税13%", | ||
| 48 | - "handleType": "update", | ||
| 49 | - "sId": "17496097010006280362665408954000", | ||
| 50 | - "dLength": "100", | ||
| 51 | - "dWidth": 100, | ||
| 52 | - "dHeight": 100, | ||
| 53 | - "dProductQty": 1000, | ||
| 54 | - "cpProcessName": "", | ||
| 55 | - "productProcessInfo": [], | ||
| 56 | - "sProductClassifyId": "20240108210154670452968456436630", | ||
| 57 | - "sProductName1": "单层彩盒", | ||
| 58 | - "dProductWidth": 100, | ||
| 59 | - "dProductLength": "100", | ||
| 60 | - "dProductHeight": 100, | ||
| 61 | - "sProductStyle": "100*100*100" | ||
| 62 | - }, | ||
| 63 | - "sPartsStyle": "425*509", | ||
| 64 | - "partsInfo": [ | ||
| 65 | - { | ||
| 66 | - "sId": "17496096990009748659884949062000", | ||
| 67 | - "sBoxModel": "彩盒", | ||
| 68 | - "sTreeNodeName": "单层彩盒", | ||
| 69 | - "sProcessId": "15965213890005652467139846160000", | ||
| 70 | - "dSumPQty": 2, | ||
| 71 | - "iPrintModePo": 0, | ||
| 72 | - "sName": "常规飞机盒", | ||
| 73 | - "dSFHS": 50, | ||
| 74 | - "dHDC": 0, | ||
| 75 | - "dXFHS": 50, | ||
| 76 | - "dZSCW": 25, | ||
| 77 | - "dZTBW": 25, | ||
| 78 | - "dZXCW": 25, | ||
| 79 | - "dYSCW": 30, | ||
| 80 | - "dYTBW": 0, | ||
| 81 | - "dYXCW": 30, | ||
| 82 | - "sBrandsId": "1111111111", | ||
| 83 | - "sSubsidiaryId": "1111111111", | ||
| 84 | - "tCreateDate": "2025-05-07 17:26:35", | ||
| 85 | - "sMakePerson": "杨恒林", | ||
| 86 | - "iOrder": 1, | ||
| 87 | - "bInvalid": false, | ||
| 88 | - "tMakeDate": "2025-05-07 18:46:42", | ||
| 89 | - "sFormId": "172129113112117427164802170", | ||
| 90 | - "sBillNo": "00000001", | ||
| 91 | - "sPackPath": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath飞机盒&date=1747049329258", | ||
| 92 | - "sPackDetailPath": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackDetailPathUpLoad常规飞机盒&date=1749547586495", | ||
| 93 | - "dSBLB": 5, | ||
| 94 | - "dXBLB": 5, | ||
| 95 | - "dZBLB": 5, | ||
| 96 | - "dYBLB": 5, | ||
| 97 | - "dSBJJ": 0, | ||
| 98 | - "dXBJJ": 5, | ||
| 99 | - "dZBJJ": 0, | ||
| 100 | - "dYBJJ": 5, | ||
| 101 | - "sColumnNameConfig": "[{\"sId\": \"17466145990008525730531392073000\", \"sBig5\": \"锁片长\", \"sName\": \"dSFHS\", \"iOrder\": 1, \"sTypes\": \"1001\", \"bVisible\": 1, \"sChinese\": \"锁片长\", \"sDefault\": 50, \"showName\": \"锁片长\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23726, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990004751476954584851000\", \"sBig5\": \"盒底组件\", \"sName\": \"dHDC\", \"iOrder\": 2, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"盒底组件\", \"sDefault\": 0, \"showName\": \"盒底组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23727, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990001232519334177843200\", \"sBig5\": \"下方盒舌\", \"sName\": \"dXFHS\", \"iOrder\": 3, \"sTypes\": \"2001\", \"bVisible\": 0, \"sChinese\": \"下方盒舌\", \"sDefault\": 50, \"showName\": \"下方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23728, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"dSFHS\"},{\"sId\": \"17466145990002674038813161135600\", \"sBig5\": \"盒盖深\", \"sName\": \"dZSCW\", \"iOrder\": 4, \"sTypes\": \"3002\", \"bVisible\": 1, \"sChinese\": \"盒盖深\", \"sDefault\": 25, \"showName\": \"盒盖深\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23729, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990001065785102483988600\", \"sBig5\": \"左贴边位\", \"sName\": \"dZTBW\", \"iOrder\": 5, \"sTypes\": \"8003\", \"bVisible\": 1, \"sChinese\": \"左贴边位\", \"sDefault\": 25, \"showName\": \"左贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23730, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466989590008229742571075453000\", \"sBig5\": \"左(下)插位组件\", \"sName\": \"dZXCW\", \"iOrder\": 6, \"sTypes\": \"4002\", \"bVisible\": 0, \"sChinese\": \"左(下)插位组件\", \"sDefault\": 25, \"showName\": \"左(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23735, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"dZSCW\"},{\"sId\": \"17466145990005537297431946334000\", \"sBig5\": \"右(上)插位组件\", \"sName\": \"dYSCW\", \"iOrder\": 7, \"sTypes\": \"6001\", \"bVisible\": 0, \"sChinese\": \"右(上)插位组件\", \"sDefault\": 30, \"showName\": \"右(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23732, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"D+4.5\"},{\"sId\": \"17466145990009079053176148972000\", \"sBig5\": \"右贴边位\", \"sName\": \"dYTBW\", \"iOrder\": 8, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右贴边位\", \"sDefault\": 0, \"showName\": \"右贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23733, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990009545190357394842000\", \"sBig5\": \"右(下)插位组件\", \"sName\": \"dYXCW\", \"iOrder\": 9, \"sTypes\": \"7001\", \"bVisible\": 0, \"sChinese\": \"右(下)插位组件\", \"sDefault\": 30, \"showName\": \"右(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23734, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"D+4.5\"}]", | ||
| 102 | - "sColumnNameConfigExclusion": "[{\"sId\": \"17466148170007436954173544192000\", \"sBig5\": \"省纸拼法(竖纹)\", \"sCode\": \"001\", \"sName\": \"001\", \"iOrder\": 1, \"iFAngle\": 0, \"iSAngle\": 180, \"sChinese\": \"省纸拼法(竖纹)\", \"showName\": \"省纸拼法(竖纹)\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23566, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"次盒\", \"sSWidthOffset\": \"-(dSFHS-dZSCW)\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"0\", \"sSettingMethod\": \"从上到下\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"},{\"sId\": \"17466156410008003570748453747000\", \"sBig5\": \"正常拼法\", \"sCode\": \"002\", \"sName\": \"002\", \"iOrder\": 2, \"iFAngle\": 0, \"iSAngle\": 0, \"sChinese\": \"正常拼法\", \"showName\": \"正常拼法\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23567, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"次盒\", \"sSWidthOffset\": \"0\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"0\", \"sSettingMethod\": \"从上到下\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"},{\"sId\": \"17470204070009330791101353610000\", \"sBig5\": \"省纸拼法(横纹)\", \"sCode\": \"003\", \"sName\": \"003\", \"iOrder\": 3, \"iFAngle\": 90, \"iSAngle\": 270, \"sChinese\": \"省纸拼法(横纹)\", \"showName\": \"省纸拼法(横纹)\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23580, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"次盒\", \"sSWidthOffset\": \"0\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"-(dSFHS-dZSCW)\", \"sSettingMethod\": \"从左到右\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"}]", | ||
| 103 | - "sLengthFormula": "dZTBW +(W+D) *2", | ||
| 104 | - "sWidthFormula": "dYSCW + D * 2 + dYXCW + L", | ||
| 105 | - "sBoxType": "飞机盒", | ||
| 106 | - "dBoxHeight": 25, | ||
| 107 | - "dBoxLength": 150, | ||
| 108 | - "dBoxWidth": 100, | ||
| 109 | - "sTypes": "5", | ||
| 110 | - "iRowNum": 1, | ||
| 111 | - "handleType": "add", | ||
| 112 | - "sMachineStyle": "875*519", | ||
| 113 | - "dMachineQty": 500, | ||
| 114 | - "dMaxLength": 1030, | ||
| 115 | - "dMaxWidth": 720, | ||
| 116 | - "materialLength": 875, | ||
| 117 | - "materialWidth": 519, | ||
| 118 | - "dMachineLength": 875, | ||
| 119 | - "dMachineWidth": 519, | ||
| 120 | - "sMaterialsStyle": "0*0", | ||
| 121 | - "sMaterialRate": "NaN", | ||
| 122 | - "newMaterialLength": 875, | ||
| 123 | - "newMaterialWidth": 519, | ||
| 124 | - "sLayoutRate": 61.24, | ||
| 125 | - "dWlcd": 875, | ||
| 126 | - "dWlkd": 519, | ||
| 127 | - "dSinglePQty": 2, | ||
| 128 | - "dMaterialsKQty": 1, | ||
| 129 | - "scale": 0.30701754385964913, | ||
| 130 | - "dPartsLength": 425, | ||
| 131 | - "dPartsWidth": 509, | ||
| 132 | - "sPrint": "胶印", | ||
| 133 | - "sType": "1", | ||
| 134 | - "sProcessName": "胶印", | ||
| 135 | - "sProcessClassifyName": "胶印", | ||
| 136 | - "sProcessClassifyId": "15735481040006848857922252708000", | ||
| 137 | - "bOutside": 0, | ||
| 138 | - "sWorkOrderParam": "{\"sParam3\":\"过油数\",\"sParamDefault3\":\"0\",\"sParamNotEmpty3\":true,\"sParamFieldName3\":\"dOiled\",\"sParamDropDownType3\":\"sql\",\"sParamAssignField3\":\"dOiled:dOiled\",\"sParamDropDown3\":\"select convert(num, CHAR) as dOiled,convert(num, CHAR) as sId from tools_num where num < 3\",\"sParam4\":\"工艺工位\",\"sParamDefault4\":\"\",\"sParamNotEmpty4\":true,\"sParamFieldName4\":\"dCraft\",\"sParamAssignField4\":\"dOiled+dColor\",\"sParam5\":\"损耗工位\",\"sParamDefault5\":\"\",\"sParamNotEmpty5\":true,\"sParamFieldName5\":\"dLoss\",\"sParamAssignField5\":\"dColor+(dOiled/2)\",\"sParam7\":\"过油类别\",\"sParamDefault7\":\"/\",\"sParamNotEmpty7\":true,\"sParamDropDown7\":{\"/\":\"/\",\"局部连机过油\":\"局部连机过油\",\"满版连机过油\":\"满版连机过油\",\"割胶布过油\":\"割胶布过油\"},\"sParam8\":\"难度系数\",\"sParamDefault8\":\"1\",\"sParamNotEmpty8\":true,\"sParamFieldName8\":\"dDifficulty\",\"sParam11\":\"印刷类别\",\"sParamDefault11\":\"UV印刷\",\"sParamNotEmpty11\":true,\"sParamDropDown11\":{\"\":\"\",\"UV印刷\":\"UV印刷\",\"普通印刷\":\"普通印刷\"},\"sParam13\":\"工艺说明\",\"sParamDefault13\":\"\",\"sParamAssFieldName13\":\"sProcessMemo\",\"sParam15\":\"印色数\",\"sParamDefault15\":\"\",\"sParamNotEmpty15\":true,\"sParamFieldName15\":\"dColor\",\"sParamDropDownType15\":\"sql\",\"sParamAssignField15\":\"dColor:dColor\",\"sParamDropDown15\":\"select convert(num, CHAR) as dColor,convert(num, CHAR) as sId from tools_num where num > 0\",\"sParam188\":\"油墨类型\",\"sParamDefault188\":\"UV油墨\",\"sParamNotEmpty188\":true,\"sParamDropDown188\":{\"\":\"\",\"UV油墨\":\"UV油墨\",\"普通油墨\":\"普通油墨\",\"快干快亮\":\"快干快亮\",\"单凹油墨\":\"单凹油墨\"},\"sParam190\":\"喷头数量\",\"sParamDefault190\":\"0\",\"sParamFieldName190\":\"dNozzle\",\"sParamDropDown190\":{\"1\":\"1\",\"2\":\"2\",\"3\":\"3\",\"4\":\"4\",\"5\":\"5\",\"6\":\"6\",\"\":\"\"},\"sParam202\":\"印刷难度\",\"sParamDefault202\":\"\",\"sParamNotEmpty202\":true,\"sParamDropDown202\":{\"\":\"\",\"一般\":\"一般\",\"较难\":\"较难\",\"特别难\":\"特别难\"},\"sParam204\":\"联机喷码\",\"sParamDefault204\":\"否\",\"sParamNotEmpty204\":true,\"sParamDropDown204\":{\"\":\"\",\"是\":\"是\",\"否\":\"否\"},\"sParam215\":\"油座次序\",\"sParamDefault215\":\"\",\"sParamDropDown215\":{\"第二座\":\"第二座\",\"尾座\":\"尾座\",\"第二座+倒数第二座\":\"第二座+倒数第二座\",\"第二座+尾座\":\"第二座+尾座\"}}", | ||
| 139 | - "sPrintProcessId": "15965213890005652467139846160000", | ||
| 140 | - "sColor": "无", | ||
| 141 | - "iSReserve1": 0, | ||
| 142 | - "iSReserve2": 0, | ||
| 143 | - "dAuxiliaryQty": 525, | ||
| 144 | - "dPartsQty": 1000, | ||
| 145 | - "iPositiveColor": null, | ||
| 146 | - "sPartsName": "彩盒", | ||
| 147 | - "materialsInfo": [ | ||
| 148 | - { | ||
| 149 | - "sMaterialsName": "80克双铜纸", | ||
| 150 | - "sMaterialsNo": "MT10060003", | ||
| 151 | - "sMaterialsId": "172129113112117482397809421", | ||
| 152 | - "sAuxiliaryUnit": "张", | ||
| 153 | - "sMaterialsUnit": "吨", | ||
| 154 | - "dGramWeight": 80, | ||
| 155 | - "sMaterialsType": "paper1", | ||
| 156 | - "dWlcd": 0, | ||
| 157 | - "dWlkd": 0 | ||
| 158 | - } | ||
| 159 | - ], | ||
| 160 | - "processInfo": [ | ||
| 161 | - { | ||
| 162 | - "sId": "17089381900007880227310835019000", | ||
| 163 | - "sType": "2", | ||
| 164 | - "bSetQty": 0, | ||
| 165 | - "bSetArea": 0, | ||
| 166 | - "sSetQtyUnt": null, | ||
| 167 | - "sProcessName": "击凸", | ||
| 168 | - "sProductClassifyId": "15735482290006892640743970644000", | ||
| 169 | - "sParams0": "击凸", | ||
| 170 | - "sProcessId": "17089381900007880227310835019000" | ||
| 171 | - }, | ||
| 172 | - { | ||
| 173 | - "sId": "17024627410009815562058541627000", | ||
| 174 | - "sType": "2", | ||
| 175 | - "bSetQty": 1, | ||
| 176 | - "bSetArea": 1, | ||
| 177 | - "sSetQtyUnt": "处", | ||
| 178 | - "sProcessName": "烫金", | ||
| 179 | - "sProductClassifyId": "17024624750009231299092112470000", | ||
| 180 | - "sParams3": "烫金", | ||
| 181 | - "dManualLength": 1, | ||
| 182 | - "dManualWidth": 1, | ||
| 183 | - "dManualValue": 1, | ||
| 184 | - "dManualQty": 1, | ||
| 185 | - "sProcessId": "17024627410009815562058541627000" | ||
| 186 | - } | ||
| 187 | - ] | ||
| 188 | - } | ||
| 189 | - ] | ||
| 190 | -} | ||
| 191 | \ No newline at end of file | 0 | \ No newline at end of file |
src/mobile/quotation/quotationDetail.css
| @@ -126,3 +126,17 @@ | @@ -126,3 +126,17 @@ | ||
| 126 | margin-top: 1rem; | 126 | margin-top: 1rem; |
| 127 | background-color: #dededf; | 127 | background-color: #dededf; |
| 128 | } | 128 | } |
| 129 | +.tabsBox { | ||
| 130 | + position: relative; | ||
| 131 | + width: 100%; | ||
| 132 | +} | ||
| 133 | +.tabsBox .tabAddBtn { | ||
| 134 | + position: absolute; | ||
| 135 | + right: 0; | ||
| 136 | + top: 0.75rem; | ||
| 137 | +} | ||
| 138 | +.tabsBox .tabClearBtn { | ||
| 139 | + position: absolute; | ||
| 140 | + right: 0; | ||
| 141 | + top: 0; | ||
| 142 | +} |
src/mobile/quotation/quotationDetail.less
| @@ -115,23 +115,37 @@ | @@ -115,23 +115,37 @@ | ||
| 115 | width: 3.5rem; | 115 | width: 3.5rem; |
| 116 | } | 116 | } |
| 117 | } | 117 | } |
| 118 | -.projectBtn{ | 118 | +.projectBtn { |
| 119 | display: flex; | 119 | display: flex; |
| 120 | align-items: center; | 120 | align-items: center; |
| 121 | justify-content: space-between; | 121 | justify-content: space-between; |
| 122 | } | 122 | } |
| 123 | -.boxTitle{ | 123 | +.boxTitle { |
| 124 | font-size: 1.5rem; | 124 | font-size: 1.5rem; |
| 125 | font-weight: 700; | 125 | font-weight: 700; |
| 126 | margin-bottom: 2rem; | 126 | margin-bottom: 2rem; |
| 127 | margin-top: 1rem; | 127 | margin-top: 1rem; |
| 128 | } | 128 | } |
| 129 | -.quotationBody{ | 129 | +.quotationBody { |
| 130 | font-size: 1.25rem; | 130 | font-size: 1.25rem; |
| 131 | - .line{ | 131 | + .line { |
| 132 | width: 100%; | 132 | width: 100%; |
| 133 | height: 1px; | 133 | height: 1px; |
| 134 | margin-top: 1rem; | 134 | margin-top: 1rem; |
| 135 | background-color: #dededf; | 135 | background-color: #dededf; |
| 136 | } | 136 | } |
| 137 | -} | ||
| 138 | \ No newline at end of file | 137 | \ No newline at end of file |
| 138 | +} | ||
| 139 | +.tabsBox { | ||
| 140 | + position: relative; | ||
| 141 | + width: 100%; | ||
| 142 | + .tabAddBtn { | ||
| 143 | + position: absolute; | ||
| 144 | + right: 0; | ||
| 145 | + top: .75rem; | ||
| 146 | + } | ||
| 147 | + .tabClearBtn{ | ||
| 148 | + position: absolute; | ||
| 149 | + right: 0; | ||
| 150 | + top: 0; | ||
| 151 | + } | ||
| 152 | +} |