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 | 686 | } |
| 687 | 687 | |
| 688 | 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 | 691 | const checkResult = masterConfigMust.filter(item => !masterData[item.sName]); |
| 691 | 692 | if (checkResult.length) { |
| 692 | 693 | errMsgList.push( |
| ... | ... | @@ -1215,6 +1216,7 @@ const QuickQuoteEvent = props => { |
| 1215 | 1216 | // 入口 |
| 1216 | 1217 | const QuickQuote = baseProps => { |
| 1217 | 1218 | const props = QuickQuoteEvent(baseProps); |
| 1219 | + console.log("🚀 ~ QuickQuote:", props,baseProps) | |
| 1218 | 1220 | const [treeClassName, setTreeClassName] = useState(""); |
| 1219 | 1221 | |
| 1220 | 1222 | // 监听页面滚动事件 |
| ... | ... | @@ -2770,7 +2772,8 @@ const ManyComponent = props => { |
| 2770 | 2772 | const onCalcPrice = () => { |
| 2771 | 2773 | const { state } = props; |
| 2772 | 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 | 2777 | const radios = GetBestAlgorithm(props); |
| 2775 | 2778 | slaveData[boxModelKey] = { |
| 2776 | 2779 | ...slaveData[boxModelKey], | ... | ... |