diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js index 7820d1a..63385e5 100644 --- a/src/components/Common/Typesetting/typesetting.js +++ b/src/components/Common/Typesetting/typesetting.js @@ -22,7 +22,6 @@ const Typesetting = props => { textSize, isMobile, } = props; - console.log("🚀 ~ Typesetting:", props); if (!slaveRowData) return; const { dSBLB, // 上边留白 diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 1eff3e1..8106270 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -1525,8 +1525,22 @@ const BoxComponent = props => { // 使用 useCallback 确保回调函数的稳定性 const handleSaveState = useCallback( - (length, width, slaveData, masterData, dSinglePQty, dMaterialsKQty, dProductQty, scale, dWlcd, dWlkd, innerWidth, innerHeight,dHorizontal,dPortrait) => { - console.log("🚀 ~ dPortrait:",dHorizontal,dPortrait) + ( + length, + width, + slaveData, + masterData, + dSinglePQty, + dMaterialsKQty, + dProductQty, + scale, + dWlcd, + dWlkd, + innerWidth, + innerHeight, + dHorizontal, + dPortrait + ) => { // 查找符合条件的索引 const { selectedNode } = props.state; @@ -1565,10 +1579,10 @@ const BoxComponent = props => { scale: scale, dPartsLength: innerWidth, dPartsWidth: innerHeight, - dHorizontal:dHorizontal, - dPortrait:dPortrait, - dHorizontalType:dHorizontal, - dPortraitType:dPortrait, + dHorizontal: dHorizontal, + dPortrait: dPortrait, + dHorizontalType: dHorizontal, + dPortraitType: dPortrait, }; // 更新状态 props.setState(prevState => ({ @@ -1712,7 +1726,7 @@ const BoxComponent = props => { dSvgBoxHeight: 300, showNew: 1, }; - const isShowImg = boxList.find(x=>x.sName === '盒身')?.type !== '' || false + const isShowImg = boxList.find(x => x.sName === "盒身")?.type !== "" || false; return ( { ]; slaveData.forEach(x => { boxList.push({ - value: x.iValue, - sName: titleList1.find(item => item.value === x.sCode)?.name || "", + value: x.iValue || x.sDefault, + sName: titleList1.find(item => item.value === x.sCode || item.value === x.sName)?.name || "", isEditable: true, isSelect: false, selectValue: null, @@ -2295,8 +2309,8 @@ const BoxModelSelectedModal = props => { const svgProps = { ...props, boxList, - dSvgBoxWidth: 100, - dSvgBoxHeight: 100, + dSvgBoxWidth: 250, + dSvgBoxHeight: 250, showNew: 1, }; return svgProps; @@ -2319,10 +2333,10 @@ const BoxModelSelectedModal = props => { // (value ? (column.dataIndex === 'sPackDetailPath' ? (boxData[index].sPackPath ? : '') : ) : "暂无图片"); column.render = (value, record, index) => column.dataIndex === "sPackDetailPathUpLoad" ? ( - value ? ( - - ) : ( + boxData[index].sTypes ? ( + ) : ( + ) ) : value ? ( diff --git a/src/mobile/quotation/detailNew.jsx b/src/mobile/quotation/detailNew.jsx index c247059..ac618ff 100644 --- a/src/mobile/quotation/detailNew.jsx +++ b/src/mobile/quotation/detailNew.jsx @@ -1430,17 +1430,25 @@ const BoxComponent = props => { // 后道参数 const { sBackProcessData } = slaveRowData || []; - const downAbleConfigsNew = downAbleConfigs.reduce((pre, cur) => { - const childConfigs = downAbleExtraConfigs.filter(item => item.sParentName === cur.showName); - pre.push(cur, ...childConfigs); - return pre; - }, []); + const [downAbleConfigsNew, setDownAbleConfigsNew] = useState([]); + // const downAbleConfigsNew = downAbleConfigs.reduce((pre, cur) => { + // const childConfigs = downAbleExtraConfigs.filter(item => item.sParentName === cur.showName); + // pre.push(cur, ...childConfigs); + // return pre; + // }, []); + useEffect(() => { + setDownAbleConfigsNew(downAbleConfigs); + }, [downAbleConfigs]); // 初始化状态,存储每个 Switch 的状态 const [switchStates, setSwitchStates] = useState(null); useEffect(() => { if (!sBackProcessData) return; - const newSwitchStates = downAbleConfigsNew; - console.log("🚀 ~ switchStates:", switchStates) + const newSwitchStates = downAbleConfigsNew + .filter(item => item.sPartsName === boxModel || !item.sPartsName) + .reduce((acc, item, index) => { + acc[item.sName] = sBackProcessData ? sBackProcessData[index][item.sName] !== "" : false; + return acc; + }, {}); setSwitchStates(newSwitchStates); }, [downAbleConfigsNew, boxModel]); // 依赖数组 @@ -1458,7 +1466,7 @@ const BoxComponent = props => { .map((item, i) => ({ ...item, isSelect: switchStates ? switchStates[item.sName] : false, - // sName: "sParams" + i, + sName: "sParams" + i, sProductClassifyId: item.sId, })); const downViewProps = { @@ -1488,7 +1496,7 @@ const BoxComponent = props => { }; const calcMethodData = commonUtils.convertStrToObj(slaveRowData?.sColumnNameConfigExclusion, []); // const radioValue = null; - const { radioValue = calcMethodData[0]?.sCode } = slaveRowData + const { radioValue = calcMethodData[0]?.sCode } = slaveRowData; const [materialLength, setMaterialLength] = useState(0); const [materialWidth, setMaterialWidth] = useState(0); // 使用 useCallback 确保回调函数的稳定性 @@ -1774,7 +1782,6 @@ const BoxComponent = props => { value={radioValue} onChange={e => { const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); - console.log("🚀 ~ iIndex:", iIndex) slaveData[iIndex].radioValue = e; props.setState(pre => ({ ...pre, @@ -1783,7 +1790,10 @@ const BoxComponent = props => { }} > {calcMethod.map(item => ( - {item.label} + + {" "} + {item.label} + ))}
diff --git a/src/mobile/quotation/index.json b/src/mobile/quotation/index.json deleted file mode 100644 index b1f0610..0000000 --- a/src/mobile/quotation/index.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "bQuotation": true, - "sProductName": "单层彩盒", - "sProductUnit": "PCS", - "sCustomerName": "EnglishTest", - "sProvince": "北京市", - "sCity": "市辖区", - "sArea": "东城区", - "sCurrency": "人民币", - "sConsignee": "Gordan", - "sConsigneeMobile": "15648630521", - "sContacts": "Gordan", - "sCustomerId": "17495388380001631448425800731100", - "sTaxId": "17128239240007522551135755385000", - "dTaxRate": "13.000000", - "sCustomerNo": "09260174", - "sTaxName": "销项税13%", - "handleType": "update", - "sId": "17496097010006280362665408954000", - "dLength": "100", - "dWidth": 100, - "dHeight": 100, - "dProductQty": 1000, - "cpProcessName": "", - "productProcessInfo": [], - "sProductClassifyId": "20240108210154670452968456436630", - "sProductName1": "单层彩盒", - "dProductWidth": 100, - "dProductLength": "100", - "dProductHeight": 100, - "sProductStyle": "100*100*100", - "product": { - "sProductName": "单层彩盒", - "sProductUnit": "PCS", - "sCustomerName": "EnglishTest", - "sProvince": "北京市", - "sCity": "市辖区", - "sArea": "东城区", - "sCurrency": "人民币", - "sConsignee": "Gordan", - "sConsigneeMobile": "15648630521", - "sContacts": "Gordan", - "sCustomerId": "17495388380001631448425800731100", - "sTaxId": "17128239240007522551135755385000", - "dTaxRate": "13.000000", - "sCustomerNo": "09260174", - "sTaxName": "销项税13%", - "handleType": "update", - "sId": "17496097010006280362665408954000", - "dLength": "100", - "dWidth": 100, - "dHeight": 100, - "dProductQty": 1000, - "cpProcessName": "", - "productProcessInfo": [], - "sProductClassifyId": "20240108210154670452968456436630", - "sProductName1": "单层彩盒", - "dProductWidth": 100, - "dProductLength": "100", - "dProductHeight": 100, - "sProductStyle": "100*100*100" - }, - "sPartsStyle": "425*509", - "partsInfo": [ - { - "sId": "17496096990009748659884949062000", - "sBoxModel": "彩盒", - "sTreeNodeName": "单层彩盒", - "sProcessId": "15965213890005652467139846160000", - "dSumPQty": 2, - "iPrintModePo": 0, - "sName": "常规飞机盒", - "dSFHS": 50, - "dHDC": 0, - "dXFHS": 50, - "dZSCW": 25, - "dZTBW": 25, - "dZXCW": 25, - "dYSCW": 30, - "dYTBW": 0, - "dYXCW": 30, - "sBrandsId": "1111111111", - "sSubsidiaryId": "1111111111", - "tCreateDate": "2025-05-07 17:26:35", - "sMakePerson": "杨恒林", - "iOrder": 1, - "bInvalid": false, - "tMakeDate": "2025-05-07 18:46:42", - "sFormId": "172129113112117427164802170", - "sBillNo": "00000001", - "sPackPath": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath飞机盒&date=1747049329258", - "sPackDetailPath": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackDetailPathUpLoad常规飞机盒&date=1749547586495", - "dSBLB": 5, - "dXBLB": 5, - "dZBLB": 5, - "dYBLB": 5, - "dSBJJ": 0, - "dXBJJ": 5, - "dZBJJ": 0, - "dYBJJ": 5, - "sColumnNameConfig": "[{\"sId\": \"17466145990008525730531392073000\", \"sBig5\": \"锁片长\", \"sName\": \"dSFHS\", \"iOrder\": 1, \"sTypes\": \"1001\", \"bVisible\": 1, \"sChinese\": \"锁片长\", \"sDefault\": 50, \"showName\": \"锁片长\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23726, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990004751476954584851000\", \"sBig5\": \"盒底组件\", \"sName\": \"dHDC\", \"iOrder\": 2, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"盒底组件\", \"sDefault\": 0, \"showName\": \"盒底组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23727, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990001232519334177843200\", \"sBig5\": \"下方盒舌\", \"sName\": \"dXFHS\", \"iOrder\": 3, \"sTypes\": \"2001\", \"bVisible\": 0, \"sChinese\": \"下方盒舌\", \"sDefault\": 50, \"showName\": \"下方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23728, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"dSFHS\"},{\"sId\": \"17466145990002674038813161135600\", \"sBig5\": \"盒盖深\", \"sName\": \"dZSCW\", \"iOrder\": 4, \"sTypes\": \"3002\", \"bVisible\": 1, \"sChinese\": \"盒盖深\", \"sDefault\": 25, \"showName\": \"盒盖深\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23729, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990001065785102483988600\", \"sBig5\": \"左贴边位\", \"sName\": \"dZTBW\", \"iOrder\": 5, \"sTypes\": \"8003\", \"bVisible\": 1, \"sChinese\": \"左贴边位\", \"sDefault\": 25, \"showName\": \"左贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23730, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466989590008229742571075453000\", \"sBig5\": \"左(下)插位组件\", \"sName\": \"dZXCW\", \"iOrder\": 6, \"sTypes\": \"4002\", \"bVisible\": 0, \"sChinese\": \"左(下)插位组件\", \"sDefault\": 25, \"showName\": \"左(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23735, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"dZSCW\"},{\"sId\": \"17466145990005537297431946334000\", \"sBig5\": \"右(上)插位组件\", \"sName\": \"dYSCW\", \"iOrder\": 7, \"sTypes\": \"6001\", \"bVisible\": 0, \"sChinese\": \"右(上)插位组件\", \"sDefault\": 30, \"showName\": \"右(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23732, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"D+4.5\"},{\"sId\": \"17466145990009079053176148972000\", \"sBig5\": \"右贴边位\", \"sName\": \"dYTBW\", \"iOrder\": 8, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右贴边位\", \"sDefault\": 0, \"showName\": \"右贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23733, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17466145990009545190357394842000\", \"sBig5\": \"右(下)插位组件\", \"sName\": \"dYXCW\", \"iOrder\": 9, \"sTypes\": \"7001\", \"bVisible\": 0, \"sChinese\": \"右(下)插位组件\", \"sDefault\": 30, \"showName\": \"右(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23734, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": \"D+4.5\"}]", - "sColumnNameConfigExclusion": "[{\"sId\": \"17466148170007436954173544192000\", \"sBig5\": \"省纸拼法(竖纹)\", \"sCode\": \"001\", \"sName\": \"001\", \"iOrder\": 1, \"iFAngle\": 0, \"iSAngle\": 180, \"sChinese\": \"省纸拼法(竖纹)\", \"showName\": \"省纸拼法(竖纹)\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23566, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"次盒\", \"sSWidthOffset\": \"-(dSFHS-dZSCW)\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"0\", \"sSettingMethod\": \"从上到下\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"},{\"sId\": \"17466156410008003570748453747000\", \"sBig5\": \"正常拼法\", \"sCode\": \"002\", \"sName\": \"002\", \"iOrder\": 2, \"iFAngle\": 0, \"iSAngle\": 0, \"sChinese\": \"正常拼法\", \"showName\": \"正常拼法\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23567, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"次盒\", \"sSWidthOffset\": \"0\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"0\", \"sSettingMethod\": \"从上到下\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"},{\"sId\": \"17470204070009330791101353610000\", \"sBig5\": \"省纸拼法(横纹)\", \"sCode\": \"003\", \"sName\": \"003\", \"iOrder\": 3, \"iFAngle\": 90, \"iSAngle\": 270, \"sChinese\": \"省纸拼法(横纹)\", \"showName\": \"省纸拼法(横纹)\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17466137160001794723678306481000\", \"iIncrement\": 23580, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"次盒\", \"sSWidthOffset\": \"0\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"-(dSFHS-dZSCW)\", \"sSettingMethod\": \"从左到右\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"}]", - "sLengthFormula": "dZTBW +(W+D) *2", - "sWidthFormula": "dYSCW + D * 2 + dYXCW + L", - "sBoxType": "飞机盒", - "dBoxHeight": 25, - "dBoxLength": 150, - "dBoxWidth": 100, - "sTypes": "5", - "iRowNum": 1, - "handleType": "add", - "sMachineStyle": "875*519", - "dMachineQty": 500, - "dMaxLength": 1030, - "dMaxWidth": 720, - "materialLength": 875, - "materialWidth": 519, - "dMachineLength": 875, - "dMachineWidth": 519, - "sMaterialsStyle": "0*0", - "sMaterialRate": "NaN", - "newMaterialLength": 875, - "newMaterialWidth": 519, - "sLayoutRate": 61.24, - "dWlcd": 875, - "dWlkd": 519, - "dSinglePQty": 2, - "dMaterialsKQty": 1, - "scale": 0.30701754385964913, - "dPartsLength": 425, - "dPartsWidth": 509, - "sPrint": "胶印", - "sType": "1", - "sProcessName": "胶印", - "sProcessClassifyName": "胶印", - "sProcessClassifyId": "15735481040006848857922252708000", - "bOutside": 0, - "sWorkOrderParam": "{\"sParam3\":\"过油数\",\"sParamDefault3\":\"0\",\"sParamNotEmpty3\":true,\"sParamFieldName3\":\"dOiled\",\"sParamDropDownType3\":\"sql\",\"sParamAssignField3\":\"dOiled:dOiled\",\"sParamDropDown3\":\"select convert(num, CHAR) as dOiled,convert(num, CHAR) as sId from tools_num where num < 3\",\"sParam4\":\"工艺工位\",\"sParamDefault4\":\"\",\"sParamNotEmpty4\":true,\"sParamFieldName4\":\"dCraft\",\"sParamAssignField4\":\"dOiled+dColor\",\"sParam5\":\"损耗工位\",\"sParamDefault5\":\"\",\"sParamNotEmpty5\":true,\"sParamFieldName5\":\"dLoss\",\"sParamAssignField5\":\"dColor+(dOiled/2)\",\"sParam7\":\"过油类别\",\"sParamDefault7\":\"/\",\"sParamNotEmpty7\":true,\"sParamDropDown7\":{\"/\":\"/\",\"局部连机过油\":\"局部连机过油\",\"满版连机过油\":\"满版连机过油\",\"割胶布过油\":\"割胶布过油\"},\"sParam8\":\"难度系数\",\"sParamDefault8\":\"1\",\"sParamNotEmpty8\":true,\"sParamFieldName8\":\"dDifficulty\",\"sParam11\":\"印刷类别\",\"sParamDefault11\":\"UV印刷\",\"sParamNotEmpty11\":true,\"sParamDropDown11\":{\"\":\"\",\"UV印刷\":\"UV印刷\",\"普通印刷\":\"普通印刷\"},\"sParam13\":\"工艺说明\",\"sParamDefault13\":\"\",\"sParamAssFieldName13\":\"sProcessMemo\",\"sParam15\":\"印色数\",\"sParamDefault15\":\"\",\"sParamNotEmpty15\":true,\"sParamFieldName15\":\"dColor\",\"sParamDropDownType15\":\"sql\",\"sParamAssignField15\":\"dColor:dColor\",\"sParamDropDown15\":\"select convert(num, CHAR) as dColor,convert(num, CHAR) as sId from tools_num where num > 0\",\"sParam188\":\"油墨类型\",\"sParamDefault188\":\"UV油墨\",\"sParamNotEmpty188\":true,\"sParamDropDown188\":{\"\":\"\",\"UV油墨\":\"UV油墨\",\"普通油墨\":\"普通油墨\",\"快干快亮\":\"快干快亮\",\"单凹油墨\":\"单凹油墨\"},\"sParam190\":\"喷头数量\",\"sParamDefault190\":\"0\",\"sParamFieldName190\":\"dNozzle\",\"sParamDropDown190\":{\"1\":\"1\",\"2\":\"2\",\"3\":\"3\",\"4\":\"4\",\"5\":\"5\",\"6\":\"6\",\"\":\"\"},\"sParam202\":\"印刷难度\",\"sParamDefault202\":\"\",\"sParamNotEmpty202\":true,\"sParamDropDown202\":{\"\":\"\",\"一般\":\"一般\",\"较难\":\"较难\",\"特别难\":\"特别难\"},\"sParam204\":\"联机喷码\",\"sParamDefault204\":\"否\",\"sParamNotEmpty204\":true,\"sParamDropDown204\":{\"\":\"\",\"是\":\"是\",\"否\":\"否\"},\"sParam215\":\"油座次序\",\"sParamDefault215\":\"\",\"sParamDropDown215\":{\"第二座\":\"第二座\",\"尾座\":\"尾座\",\"第二座+倒数第二座\":\"第二座+倒数第二座\",\"第二座+尾座\":\"第二座+尾座\"}}", - "sPrintProcessId": "15965213890005652467139846160000", - "sColor": "无", - "iSReserve1": 0, - "iSReserve2": 0, - "dAuxiliaryQty": 525, - "dPartsQty": 1000, - "iPositiveColor": null, - "sPartsName": "彩盒", - "materialsInfo": [ - { - "sMaterialsName": "80克双铜纸", - "sMaterialsNo": "MT10060003", - "sMaterialsId": "172129113112117482397809421", - "sAuxiliaryUnit": "张", - "sMaterialsUnit": "吨", - "dGramWeight": 80, - "sMaterialsType": "paper1", - "dWlcd": 0, - "dWlkd": 0 - } - ], - "processInfo": [ - { - "sId": "17089381900007880227310835019000", - "sType": "2", - "bSetQty": 0, - "bSetArea": 0, - "sSetQtyUnt": null, - "sProcessName": "击凸", - "sProductClassifyId": "15735482290006892640743970644000", - "sParams0": "击凸", - "sProcessId": "17089381900007880227310835019000" - }, - { - "sId": "17024627410009815562058541627000", - "sType": "2", - "bSetQty": 1, - "bSetArea": 1, - "sSetQtyUnt": "处", - "sProcessName": "烫金", - "sProductClassifyId": "17024624750009231299092112470000", - "sParams3": "烫金", - "dManualLength": 1, - "dManualWidth": 1, - "dManualValue": 1, - "dManualQty": 1, - "sProcessId": "17024627410009815562058541627000" - } - ] - } - ] -} \ No newline at end of file