diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 0e8982e..9feeee8 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -252,6 +252,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]); @@ -1187,7 +1196,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)) { @@ -1464,7 +1480,6 @@ const BoxComponent = props => { }; const retrunData = await commonServices.postValueService(props.app.token, body, url); const dropDownData = retrunData.data?.dataset?.rows; - console.log("🚀 ~ getSqlDropDownData ~ dropDownData:", dropDownData) cb(dropDownData); }; @@ -1506,12 +1521,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 @@ -1557,7 +1566,7 @@ const BoxComponent = props => { } if (selectedNode.sTypeKey !== "juantong" && item.sName === "sPaperDirection") { return false; - } + } return item.iTag === iTag; }); @@ -1598,7 +1607,6 @@ const BoxComponent = props => { } } const newConfig = [...boxConfigList, ...config]; - console.log(newConfig, "newConfig"); return { ...props, @@ -1614,7 +1622,6 @@ const BoxComponent = props => { // const upViewProps11 = getUpViewPropsByITag(11); // 印刷参数表单 let upViewProps12 = getUpViewPropsByITag(12); - console.log("🚀 ~ upViewProps12:", upViewProps12); const filterConditions = { juantong: x => @@ -2109,7 +2116,7 @@ const BoxComponent = props => {
-
+
@@ -2158,44 +2165,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} +
); @@ -2819,8 +2821,8 @@ const BoxModelSelectedModal = props => { const svgProps = { ...props, boxList, - dSvgBoxWidth: 150, - dSvgBoxHeight: 150, + dSvgBoxWidth: 100, + dSvgBoxHeight: 100, showNew: 1, }; return svgProps; @@ -2845,14 +2847,14 @@ const BoxModelSelectedModal = props => { column.render = (value, record, index) => column.dataIndex === "sPackDetailPathUpLoad" ? ( !value ? ( -
+
) : ( - + ) ) : value ? ( - + ) : ( noImage );