From 9c88cf55a0d053bc280cda5389c0333408b258a1 Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Wed, 2 Jul 2025 17:48:33 +0800 Subject: [PATCH] 获取默认2d、3d图; 骑马 锁线提示P数要为4的倍数; --- src/components/QuickQuote/index.jsx | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------ 1 file changed, 56 insertions(+), 54 deletions(-) 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 => {