From 15f9d34e20f248b248dae69a22903a3aa392b2a3 Mon Sep 17 00:00:00 2001 From: 陈鑫涛 <10125295+chen-xintao97@user.noreply.gitee.com> Date: Wed, 2 Jul 2025 17:48:56 +0800 Subject: [PATCH] 排版 --- src/components/Common/Typesetting/typesetting.js | 2 +- src/components/QuickQuote/index.jsx | 48 +++++++++++++++++++++++++++++------------------- src/components/QuickQuote/kapai.json | 13 ++++++++----- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js index 24fea83..e470664 100644 --- a/src/components/Common/Typesetting/typesetting.js +++ b/src/components/Common/Typesetting/typesetting.js @@ -707,7 +707,7 @@ const Typesetting = props => { Number(slaveDataDetail?.dMaxLength) >= Number(slaveRowData?.dMachineLength) && Number(slaveDataDetail?.dMaxWidth) >= Number(slaveRowData?.dMachineWidth); - const isShow = true || slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length > 0; + const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length > 0; console.log( slaveDataDetail?.dMaxLength, slaveDataDetail?.dMaxWidth, diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 0e8982e..6ef5d5f 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -15,6 +15,7 @@ import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; import styles from "./index.less"; import Typesetting from "@/components/Common/Typesetting/typesetting"; import DynamicSVG from "@/components/Common/BoxDesignCompontent/svg"; +import KapaiJson from './kapai.json' // 事件 const QuickQuoteEvent = props => { const addState = {}; @@ -1452,23 +1453,33 @@ const BoxComponent = props => { const [boxData, setBoxData] = useState([]); useEffect(() => { if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") { - const getSqlDropDownData = async ({ sId }, cb) => { - const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`; - const body = { - sKeyUpFilterName: "", - pageNum: 1, - pageSize: 1000, - sSqlCondition: { - sProductClassifyId: selectedNode.sId, - }, - }; - const retrunData = await commonServices.postValueService(props.app.token, body, url); - const dropDownData = retrunData.data?.dataset?.rows; - console.log("🚀 ~ getSqlDropDownData ~ dropDownData:", dropDownData) - cb(dropDownData); - }; - - getSqlDropDownData({ sId: "17428091410008594700322758474000" }, dropDownData => { + // const getSqlDropDownData = async ({ sId }, cb) => { + // const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`; + // const body = { + // sKeyUpFilterName: "", + // pageNum: 1, + // pageSize: 1000, + // sSqlCondition: { + // sProductClassifyId: selectedNode.sId, + // }, + // }; + // const retrunData = await commonServices.postValueService(props.app.token, body, url); + // const dropDownData = retrunData.data?.dataset?.rows; + // console.log("🚀 ~ getSqlDropDownData ~ dropDownData:", dropDownData) + // }; + + // getSqlDropDownData({ sId: "17428091410008594700322758474000" }, dropDownData => { + // const boxTypeList = Array.from(new Set((dropDownData || []).map(item => item.sBoxType || "其它"))); + // setBoxTypeList(boxTypeList); + // setBoxData( + // (dropDownData || []).map((item, index) => ({ + // ...item, + // iOrder: index + 1, + // })) + // ); + // }); + let dropDownData = [] + dropDownData.push(KapaiJson) const boxTypeList = Array.from(new Set((dropDownData || []).map(item => item.sBoxType || "其它"))); setBoxTypeList(boxTypeList); setBoxData( @@ -1477,7 +1488,6 @@ const BoxComponent = props => { iOrder: index + 1, })) ); - }); } }, [boxModel]); useEffect(() => { @@ -2163,7 +2173,7 @@ const BoxComponent = props => {
{svgProps.boxList.length ? ( -
+
) : ( diff --git a/src/components/QuickQuote/kapai.json b/src/components/QuickQuote/kapai.json index f9f5c2c..eda70b1 100644 --- a/src/components/QuickQuote/kapai.json +++ b/src/components/QuickQuote/kapai.json @@ -3,14 +3,14 @@ "sName": "卡牌", "sBrandsId": "1111111111", "sSubsidiaryId": "1111111111", - "tCreateDate": "2025-06-19 13:49:04", + "tCreateDate": "2025-06-19 17:52:40", "sMakePerson": "陈鑫涛", "iOrder": 0, "bInvalid": false, "tMakeDate": "2025-06-19 13:48:43", "sFormId": "172129113112117427164802170", "sBillNo": "00002099", - "sPackPath": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath卡牌&date=1750312141994", + "sPackPath": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath卡牌&date=1750758758828", "dSBLB": 10, "dXBLB": 10, "dZBLB": 5, @@ -19,11 +19,14 @@ "dXBJJ": 5, "dZBJJ": 0, "dYBJJ": 5, - "sColumnNameConfig": "[{\"sId\": \"17503121050007868467942061636000\", \"sBig5\": \"上方盒舌\", \"sName\": \"dSFHS\", \"iOrder\": 1, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"上方盒舌\", \"sDefault\": 0, \"showName\": \"上方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24930, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050004734713992285329000\", \"sBig5\": \"盒底组件\", \"sName\": \"dHDC\", \"iOrder\": 2, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"盒底组件\", \"sDefault\": 0, \"showName\": \"盒底组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24931, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050003805022968003848700\", \"sBig5\": \"下方盒舌\", \"sName\": \"dXFHS\", \"iOrder\": 3, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"下方盒舌\", \"sDefault\": 0, \"showName\": \"下方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24932, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050009676586559595633000\", \"sBig5\": \"左(上)插位组件\", \"sName\": \"dZSCW\", \"iOrder\": 4, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"左(上)插位组件\", \"sDefault\": 0, \"showName\": \"左(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24933, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050001962345088454939000\", \"sBig5\": \"左贴边位\", \"sName\": \"dZTBW\", \"iOrder\": 5, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"左贴边位\", \"sDefault\": 0, \"showName\": \"左贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24934, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050002414611810439558000\", \"sBig5\": \"左(下)插位组件\", \"sName\": \"dZXCW\", \"iOrder\": 6, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"左(下)插位组件\", \"sDefault\": 0, \"showName\": \"左(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24935, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050002143115722990272500\", \"sBig5\": \"右(上)插位组件\", \"sName\": \"dYSCW\", \"iOrder\": 7, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"右(上)插位组件\", \"sDefault\": 0, \"showName\": \"右(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24936, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050003634411255280123400\", \"sBig5\": \"右贴边位\", \"sName\": \"dYTBW\", \"iOrder\": 8, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"右贴边位\", \"sDefault\": 0, \"showName\": \"右贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24937, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050004462109599634759000\", \"sBig5\": \"右(下)插位组件\", \"sName\": \"dYXCW\", \"iOrder\": 9, \"sTypes\": null, \"bVisible\": 0, \"sChinese\": \"右(下)插位组件\", \"sDefault\": 0, \"showName\": \"右(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24938, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null}]", + "sColumnNameConfig": "[{\"sId\": \"17503121050007868467942061636000\", \"sBig5\": \"上方盒舌\", \"sName\": \"dSFHS\", \"iOrder\": 1, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"上方盒舌\", \"sDefault\": 0, \"showName\": \"上方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24930, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050004734713992285329000\", \"sBig5\": \"盒底组件\", \"sName\": \"dHDC\", \"iOrder\": 2, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"盒底组件\", \"sDefault\": 0, \"showName\": \"盒底组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24931, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050003805022968003848700\", \"sBig5\": \"下方盒舌\", \"sName\": \"dXFHS\", \"iOrder\": 3, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"下方盒舌\", \"sDefault\": 0, \"showName\": \"下方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24932, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050009676586559595633000\", \"sBig5\": \"左(上)插位组件\", \"sName\": \"dZSCW\", \"iOrder\": 4, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"左(上)插位组件\", \"sDefault\": 0, \"showName\": \"左(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24933, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050001962345088454939000\", \"sBig5\": \"左贴边位\", \"sName\": \"dZTBW\", \"iOrder\": 5, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"左贴边位\", \"sDefault\": 0, \"showName\": \"左贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24934, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050002414611810439558000\", \"sBig5\": \"左(下)插位组件\", \"sName\": \"dZXCW\", \"iOrder\": 6, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"左(下)插位组件\", \"sDefault\": 0, \"showName\": \"左(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24935, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050002143115722990272500\", \"sBig5\": \"右(上)插位组件\", \"sName\": \"dYSCW\", \"iOrder\": 7, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右(上)插位组件\", \"sDefault\": 0, \"showName\": \"右(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24936, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050003634411255280123400\", \"sBig5\": \"右贴边位\", \"sName\": \"dYTBW\", \"iOrder\": 8, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右贴边位\", \"sDefault\": 0, \"showName\": \"右贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24937, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050004462109599634759000\", \"sBig5\": \"右(下)插位组件\", \"sName\": \"dYXCW\", \"iOrder\": 9, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右(下)插位组件\", \"sDefault\": 0, \"showName\": \"右(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24938, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null}]", + "sColumnNameConfigExclusion": "[{\"sId\": \"17503122410009257367226894416000\", \"sBig5\": \"001\", \"sCode\": \"横向\", \"sName\": \"横向\", \"iOrder\": 1, \"iFAngle\": 0, \"iSAngle\": 0, \"sChinese\": \"001\", \"showName\": \"001\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 23752, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"首盒\", \"sSWidthOffset\": \"0\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"0\", \"sSettingMethod\": \"从上到下\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"}]", + "sLengthFormula": "L", "sWidthFormula": "W", "sBoxType": "其它", - "dBoxHeight": 0, + "dBoxHeight": 50, "dBoxLength": 50, "dBoxWidth": 50, - "sTypes": "6" + "sTypes": "6", + "sPackDetailPathUpLoad": "http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath卡牌&date=1750312141994" } \ No newline at end of file -- libgit2 0.22.2