diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 6ef5d5f..b898f5c 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -253,6 +253,15 @@ const QuickQuoteEvent = props => { const { selectedNode = {}, slaveConfig } = state; const { showName: sTreeNodeName } = selectedNode; + + if (sFieldName === "dSumPQty" && (sTreeNodeName.includes("骑马") || sTreeNodeName.includes("锁线"))) { + if (!changeValue.dSumPQty || changeValue.dSumPQty % 4 !== 0) { + message.info("P数要为4的倍数!"); + changeValue.dSumPQty = 4; + extraState.slaveUpKey = `key_${commonUtils.createSid()}`; + } + } + const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel); if (name.includes("slaveDown")) { const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue[sFieldName]); @@ -1188,7 +1197,14 @@ const TreeComponent = props => { } if (timeRef.current > 1) { - addState.slaveData = slaveDataNew; + addState.slaveData = slaveDataNew.map(item => { + const { sPackDetailPathUpLoad, sPackPath } = selectedNode; + return { + ...item, + ...(sPackDetailPathUpLoad ? { sPackDetailPathUpLoad } : {}), + ...(sPackPath ? { sPackPath } : {}), + }; + }); addState.extraParts = {}; addState.calcPriceFinished = false; if (manyData.some(item => Object.keys(item).length > 4)) { @@ -1516,12 +1532,6 @@ const BoxComponent = props => { viewRow: slaveRowData, tableName: `slaveUp${boxModel}`, }; - console.log( - slaveConfig.gdsconfigformslave.filter(item => { - return item.iTag === 12; - }), - "slaveConfig.gdsconfigformslave" - ); const getUpViewPropsByITag = iTag => { const config = slaveConfig.gdsconfigformslave @@ -1567,7 +1577,7 @@ const BoxComponent = props => { } if (selectedNode.sTypeKey !== "juantong" && item.sName === "sPaperDirection") { return false; - } + } return item.iTag === iTag; }); @@ -1608,7 +1618,6 @@ const BoxComponent = props => { } } const newConfig = [...boxConfigList, ...config]; - console.log(newConfig, "newConfig"); return { ...props, @@ -1624,7 +1633,6 @@ const BoxComponent = props => { // const upViewProps11 = getUpViewPropsByITag(11); // 印刷参数表单 let upViewProps12 = getUpViewPropsByITag(12); - console.log("🚀 ~ upViewProps12:", upViewProps12); const filterConditions = { juantong: x => @@ -2119,7 +2127,7 @@ const BoxComponent = props => {
-
+
@@ -2168,44 +2176,39 @@ const BoxComponent = props => {
{cailiaoyinshuaDiv}
- {bBox && ( -
-
- - {svgProps.boxList.length ? ( -
- -
- ) : ( -
{noImage}
- )} - - {/*
展开图
*/} - {slaveRowData.sPackPath ? ( - // - -
- - {imagesData.map((image, index) => ( -
- {image.alt} -
- ))} -
-
- ) : ( -
{noImage}
- )} - {/*
立体图
*/} -
-
- {calcMethodDiv} +
+
+ + {bBox ? ( + <> + {svgProps.boxList.length ? ( +
+ +
+ ) : ( +
{noImage}
+ )} + + ) : ( + "" + )} + {slaveRowData.sPackPath ? ( +
+ + {imagesData.map((image, index) => ( +
+ {image.alt} +
+ ))} +
+
+ ) : ( +
{noImage}
+ )} +
- )} - {/*
- - -
*/} + {calcMethodDiv} +
); @@ -2829,8 +2832,8 @@ const BoxModelSelectedModal = props => { const svgProps = { ...props, boxList, - dSvgBoxWidth: 150, - dSvgBoxHeight: 150, + dSvgBoxWidth: 100, + dSvgBoxHeight: 100, showNew: 1, }; return svgProps; @@ -2855,14 +2858,14 @@ const BoxModelSelectedModal = props => { column.render = (value, record, index) => column.dataIndex === "sPackDetailPathUpLoad" ? ( !value ? ( -
+
) : ( - + ) ) : value ? ( - + ) : ( noImage );