From 09a45340d546dbb949420f6819875f2e388e18b7 Mon Sep 17 00:00:00 2001 From: 陈鑫涛 <10125295+chen-xintao97@user.noreply.gitee.com> Date: Mon, 23 Jun 2025 14:42:07 +0800 Subject: [PATCH] 是否勒口 --- src/components/QuickQuote/index.jsx | 23 +++++++++++++++++------ src/mobile/quotation/detailNew.jsx | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------- src/routes/mobile/IndexMobile.css | 16 ++++++++++++++++ src/routes/mobile/IndexMobile.less | 2 +- 4 files changed, 145 insertions(+), 83 deletions(-) create mode 100644 src/routes/mobile/IndexMobile.css diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 05dbfe0..b5fc630 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -1339,9 +1339,14 @@ const BoxComponent = props => { if (item.sName === "dSumPQty" && selectedNode.sTypeKey !== "huace") { return false; } - const { bAdvancedSetting } = slaveRowData; - - if ((item.sName === "dPortrait" && !bAdvancedSetting) || (item.sName === "dHorizontal" && !bAdvancedSetting)) { + const { bAdvancedSetting, bFlap, bFold } = slaveRowData; + const shouldExcludeItem = (condition, itemNameList) => !condition && itemNameList.includes(item.sName); + + if ( + shouldExcludeItem(bAdvancedSetting, ["dPortrait", "dHorizontal"]) || + shouldExcludeItem(bFlap, ["dFlap"]) || + shouldExcludeItem(bFold, ["sFold", "dAdhesive", "dFold"]) + ) { return false; } @@ -1367,9 +1372,15 @@ const BoxComponent = props => { // const upViewProps11 = getUpViewPropsByITag(11); // 印刷参数表单 let upViewProps12 = getUpViewPropsByITag(12); -if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { - upViewProps12.viewConfigs = upViewProps12.viewConfigs.slice(0, 6); -} + if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { + upViewProps12.viewConfigs = upViewProps12.viewConfigs.slice(0, 6); + } + // + upViewProps12.viewConfigs = upViewProps12.viewConfigs.map(item => { + if (item.sName === "bFlap") { + } + return item; + }); // useEffect(() => { diff --git a/src/mobile/quotation/detailNew.jsx b/src/mobile/quotation/detailNew.jsx index 6bd99b3..0def1d2 100644 --- a/src/mobile/quotation/detailNew.jsx +++ b/src/mobile/quotation/detailNew.jsx @@ -1061,7 +1061,18 @@ const QuotationDetail = props => { if (!masterConfig) return ""; const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible); // 处理长宽样式 - const viewConfigs = selectedNode?.bBox ? ableConfigs : ableConfigs.filter(x => x.sName !== "dHeight"); + const viewConfigs = selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" ? ableConfigs : ableConfigs.filter(x => x.sName !== "dHeight"); + if (selectedNode?.bBox && selectedNode.sTypeKey !== "kapai") { + viewConfigs.forEach(item => { + if (item.sName === "dLength" || item.sName === "dWidth") { + item.iColValue = 4; + } + }); + } else { + viewConfigs.forEach(item => { + item.iColValue = viewConfigs[0].iColValue; + }); + } const viewProps = { ...props, viewConfigs: viewConfigs, @@ -1514,7 +1525,12 @@ const BoxComponent = props => { }; // 印刷参数表单 - const upViewProps12 = getUpViewPropsByITag(12); + let upViewProps12 = getUpViewPropsByITag(12); + if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { + if (upViewProps12 && upViewProps12.viewConfigs && upViewProps12.viewConfigs.length) { + upViewProps12.viewConfigs = upViewProps12.viewConfigs.slice(0, 6); + } + } // 拼板信息表单 const upViewProps20 = getUpViewPropsByITag(20); const { bBox } = selectedNode; @@ -1579,22 +1595,22 @@ const BoxComponent = props => { }; // 获取sType为3的 - const { productProcessInfo = [] } = masterData; - const finishedViewProps = { - ...props, - viewConfigs: finishedConfigs - .filter(item => item.sPartsName === boxModel || !item.sPartsName) - .map((item, i) => ({ - ...item, - isSelect: switchStates ? switchStates[item.sName] : false, - // sName: "sParams" + i, - sProductClassifyId: item.sId, - })), - tableConfig: { ...slaveConfig, gdsconfigformslave: finishedConfigs }, - iColValueView: 24, - viewRow: masterData, - tableName: "finished", - }; + // const { productProcessInfo = [] } = masterData; + // const finishedViewProps = { + // ...props, + // viewConfigs: finishedConfigs + // .filter(item => item.sPartsName === boxModel || !item.sPartsName) + // .map((item, i) => ({ + // ...item, + // isSelect: switchStates ? switchStates[item.sName] : false, + // // sName: "sParams" + i, + // sProductClassifyId: item.sId, + // })), + // tableConfig: { ...slaveConfig, gdsconfigformslave: finishedConfigs }, + // iColValueView: 24, + // viewRow: masterData, + // tableName: "finished", + // }; const calcMethodData = commonUtils.convertStrToObj(slaveRowData?.sColumnNameConfigExclusion, []); // const radioValue = null; const { radioValue = calcMethodData[0]?.sCode } = slaveRowData; @@ -1809,18 +1825,28 @@ const BoxComponent = props => { backendConfig: { sParentFieldsName: showConfig.sName, sBoxModel: boxModel }, })); }; - + // 如果是卡牌那么默认使用矩形 + // const currentBoxModel = "slaveUp" + props.boxModel; + // props.onDataChange(currentBoxModel, "sName", { sName: item.sName }, item.sId, boxsList); + if (selectedNode.sTypeKey === "kapai") { + console.log(5555555); + + } return (
- {selectedNode.box ? ( + {selectedNode.bBox ? (
- handleChange(v)} - /> + {true ? ( + handleChange(v)} + /> + ) : ( + "" + )}
@@ -1866,57 +1892,65 @@ const BoxComponent = props => {
-
- 拼版信息 - -
+ {selectedNode.bBox ? ( +
+
+
+ 拼版信息 + +
- - {upViewProps20 - ? upViewProps20.viewConfigs.map(x => ( - -
-
{x.showName}
- { - // if (x.showDropDown) return false; - return true; - }} - /> -
-
- )) - : ""} -
-
-
-
- -
-
- -
+ + {upViewProps20 + ? upViewProps20.viewConfigs.map(x => ( + +
+
{x.showName}
+ { + // if (x.showDropDown) return false; + return true; + }} + /> +
+
+ )) + : ""} +
+
+
+
+ +
+
+ +
+
+ { + const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); + slaveData[iIndex].radioValue = e; + props.setState(pre => ({ + ...pre, + slaveData: slaveData, + })); + }} + > + {calcMethod.map(item => ( + + {" "} + {item.label} + + ))} + +
+ ) : ( + "" + )}
- { - const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); - slaveData[iIndex].radioValue = e; - props.setState(pre => ({ - ...pre, - slaveData: slaveData, - })); - }} - > - {calcMethod.map(item => ( - - {" "} - {item.label} - - ))} -
@@ -2499,6 +2533,7 @@ const BackendParamsExtraComponent = props => { }; const onCostomClick = () => {}; + if (!viewConfigs.length) return; return (
diff --git a/src/routes/mobile/IndexMobile.css b/src/routes/mobile/IndexMobile.css new file mode 100644 index 0000000..3e2a9f6 --- /dev/null +++ b/src/routes/mobile/IndexMobile.css @@ -0,0 +1,16 @@ +:global #tab-bar { + background-color: #f0f0f0; +} +:global #tab-bar .demoName { + font-size: 16px; + font-weight: bold; + height: 40px; + line-height: 40px; + text-align: center; +} +.demoContainer { + height: 100%; +} +.newContainer { + height: calc(100vh - 84px); +} diff --git a/src/routes/mobile/IndexMobile.less b/src/routes/mobile/IndexMobile.less index bc33d01..b877ee0 100644 --- a/src/routes/mobile/IndexMobile.less +++ b/src/routes/mobile/IndexMobile.less @@ -19,7 +19,7 @@ //flex-direction: column; } .demoContainer{ - height: calc(100vh - 15px); + height: 100%; } .newContainer{ -- libgit2 0.22.2