Commit ce2b90b7819e5069e17418785b7ee9b6a7f9da89
1 parent
f20864a8
处理报价不能核算的问题
Showing
1 changed file
with
5 additions
and
2 deletions
src/components/QuickQuote/index.jsx
| @@ -686,7 +686,8 @@ const QuickQuoteEvent = props => { | @@ -686,7 +686,8 @@ const QuickQuoteEvent = props => { | ||
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | const errMsgList = []; | 688 | const errMsgList = []; |
| 689 | - const masterConfigMust = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.bNotEmpty); | 689 | + const masterConfigMust = masterConfig?.gdsconfigformslave.filter(item => item.bVisible && item.bNotEmpty); |
| 690 | + if (!masterConfigMust) return | ||
| 690 | const checkResult = masterConfigMust.filter(item => !masterData[item.sName]); | 691 | const checkResult = masterConfigMust.filter(item => !masterData[item.sName]); |
| 691 | if (checkResult.length) { | 692 | if (checkResult.length) { |
| 692 | errMsgList.push( | 693 | errMsgList.push( |
| @@ -1215,6 +1216,7 @@ const QuickQuoteEvent = props => { | @@ -1215,6 +1216,7 @@ const QuickQuoteEvent = props => { | ||
| 1215 | // 入口 | 1216 | // 入口 |
| 1216 | const QuickQuote = baseProps => { | 1217 | const QuickQuote = baseProps => { |
| 1217 | const props = QuickQuoteEvent(baseProps); | 1218 | const props = QuickQuoteEvent(baseProps); |
| 1219 | + console.log("🚀 ~ QuickQuote:", props,baseProps) | ||
| 1218 | const [treeClassName, setTreeClassName] = useState(""); | 1220 | const [treeClassName, setTreeClassName] = useState(""); |
| 1219 | 1221 | ||
| 1220 | // 监听页面滚动事件 | 1222 | // 监听页面滚动事件 |
| @@ -2770,7 +2772,8 @@ const ManyComponent = props => { | @@ -2770,7 +2772,8 @@ const ManyComponent = props => { | ||
| 2770 | const onCalcPrice = () => { | 2772 | const onCalcPrice = () => { |
| 2771 | const { state } = props; | 2773 | const { state } = props; |
| 2772 | const { masterData = {}, slaveConfig, slaveData = [], selectedNode = {}, backendConfig = {}, boxModelKey = 0, bestAlgorithm,activeKey } = state; | 2774 | const { masterData = {}, slaveConfig, slaveData = [], selectedNode = {}, backendConfig = {}, boxModelKey = 0, bestAlgorithm,activeKey } = state; |
| 2773 | - if (activeKey === 0) { | 2775 | + const {bBox} = selectedNode |
| 2776 | + if (bBox && activeKey === 0) { | ||
| 2774 | const radios = GetBestAlgorithm(props); | 2777 | const radios = GetBestAlgorithm(props); |
| 2775 | slaveData[boxModelKey] = { | 2778 | slaveData[boxModelKey] = { |
| 2776 | ...slaveData[boxModelKey], | 2779 | ...slaveData[boxModelKey], |