diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index e0735c6..da75987 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -1,7 +1,7 @@ /* eslint-disable */ import { useRef, useEffect, useState, useCallback, useMemo } from "react"; import { Button, Divider, Tabs, Tree, Radio, Image, Modal, Input, message, Badge, Checkbox, Carousel } from "antd-v4"; -import { ArrowLeftOutlined, FolderFilled, FolderOpenFilled, FileTextFilled, PlusOutlined, MinusOutlined } from "@ant-design/icons"; +import { ArrowLeftOutlined, FolderFilled, FolderOpenFilled, FileTextFilled, PlusOutlined, MinusOutlined, UploadOutlined } from "@ant-design/icons"; import { cloneDeep } from "lodash"; import commonConfig from "@/utils/config"; import * as commonUtils from "@/utils/utils"; @@ -263,9 +263,9 @@ const QuickQuoteEvent = props => { calcPriceFinished: false, }; - if (manyData.some(item => Object.keys(item).length > 4)) { - extraState.manyData = []; - } + // if (manyData.some(item => Object.keys(item).length > 4)) { + // extraState.manyData = []; + // } if (name === "master") { const { showName: sTreeNodeName } = selectedNode; @@ -562,7 +562,7 @@ const QuickQuoteEvent = props => { props.onAdd(); setState(pre => ({ ...pre, - manyData: [], + // manyData: [], calcPriceFinished: false, })); return true; @@ -1475,7 +1475,7 @@ const ContentComponent = props => { [showName]: extraPartsList, }, calcPriceFinished: false, - manyData: [], + // manyData: [], })); setActiveKey(targetKey - 1); } @@ -1566,6 +1566,16 @@ const MasterComponent = props => { iColValueView: 24, viewRow: { ...masterData, sProductClassifyId: selectedNode.sId }, tableName: "master", + extraContent: child => { + if (child.sName === "sProductName") { + return ( +
+ +
+ ); + } + return ""; + }, }; return ( @@ -2219,11 +2229,11 @@ const BoxComponent = props => { { src: slaveRowData.sPackPath, alt: "立体图" }, ]; const { activeKey = 0 } = state; - useEffect(()=>{ - props.setState(pre => { - return { ...pre, activeKey:0 }; - }); - },[selectedNode]) + useEffect(() => { + props.setState(pre => { + return { ...pre, activeKey: 0 }; + }); + }, [selectedNode]); return ( { calcPriceFinished: false, }; - if (manyData.some(item => Object.keys(item).length > 4)) { - extraState.manyData = []; - } + // if (manyData.some(item => Object.keys(item).length > 4)) { + // extraState.manyData = []; + // } return materialsInfo.map((item, index) => { // let viewRow = { ...materialsInfo[index], sProductClassifyId: selectedNode.sId,sId: selectedNode.sId}; - let viewRow = { ...materialsInfo[index], sProductClassifyId: selectedNode.sId}; + let viewRow = { ...materialsInfo[index], sProductClassifyId: selectedNode.sId }; viewRow = { ...viewRow, sMaterialsName0: viewRow.showName || "" }; let materialsConfigNew = cloneDeep(materialsConfig); if (viewRow.showName) { @@ -3202,6 +3212,9 @@ const BackendParamsExtraComponent = props => { return props.getSqlDropDownData(...args); }, onDataChange: (name, sFieldName, changeValue, sId, dropDownData, isWait) => { + const extraState = { + calcPriceFinished: false, + }; const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); if (sParentFieldsName === "sPrint") { @@ -3214,7 +3227,7 @@ const BackendParamsExtraComponent = props => { let sBackProcessDataNew = [...sBackProcessData]; sBackProcessDataNew[iIndex1] = { ...sBackProcessDataNew[iIndex1], ...changeValue }; slaveData[iIndex].sBackProcessData = sBackProcessDataNew; - props.setState(pre => ({ ...pre, slaveData })); + props.setState(pre => ({ ...pre, slaveData, ...extraState })); } return; } @@ -3247,7 +3260,7 @@ const BackendParamsExtraComponent = props => { slaveData[iIndex].sBackProcessData[iIndex1].dManualValue = dManualLength * dManualWidth; } } - props.setState(pre => ({ ...pre, slaveData })); + props.setState(pre => ({ ...pre, slaveData, ...extraState })); }, }; diff --git a/src/components/QuickQuote/index.less b/src/components/QuickQuote/index.less index 5c56709..f5f8229 100644 --- a/src/components/QuickQuote/index.less +++ b/src/components/QuickQuote/index.less @@ -225,13 +225,15 @@ width: 100%; height: auto; display: flex; + // align-items: center; - .svgBox{ + .svgBox { position: absolute; left: 50%; top: 50%; - transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } + :global .ant-carousel .slick-dots li button { background-color: #000; /* 未激活时的指示器颜色 */ @@ -410,6 +412,18 @@ } } } + + .productNameBtns { + position: absolute; + top: 1px; + right: 2px; + + :global { + button { + width: 20px; + } + } + } } } }