Commit b9a3604b9cf5c4031919cf06c605679c75e35549

Authored by 陈鑫涛
1 parent 7ee391e2

卡牌默认展示图片

src/components/Common/Typesetting/typesetting.js
@@ -241,9 +241,9 @@ const Typesetting = props => { @@ -241,9 +241,9 @@ const Typesetting = props => {
241 let cols = dSWidthOffsetCombined === 0 ? 0 : Math.floor(outerWidth / dSWidthOffsetCombined); 241 let cols = dSWidthOffsetCombined === 0 ? 0 : Math.floor(outerWidth / dSWidthOffsetCombined);
242 const rowsCombined = innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset); 242 const rowsCombined = innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset);
243 let rows = rowsCombined === 0 ? 0 : Math.floor(outerHeight / rowsCombined); 243 let rows = rowsCombined === 0 ? 0 : Math.floor(outerHeight / rowsCombined);
244 - let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB - dSLengthOffset; 244 + let colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ) + dZBLB + dYBLB - (reference ? 0 : dSLengthOffset);
245 245
246 - let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB - dSWidthOffset; 246 + let rowsMaxLength = rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset) + dXBJJ) + dSBLB + dXBLB - (reference ? 0 : dSWidthOffset) ;
247 while (colsMaxLength >= outerWidth && cols > 0) { 247 while (colsMaxLength >= outerWidth && cols > 0) {
248 cols = cols - 1; 248 cols = cols - 1;
249 colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ); 249 colsMaxLength = (cols) * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset) + dYBJJ);
src/components/QuickQuote/index.jsx
@@ -15,7 +15,7 @@ import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; @@ -15,7 +15,7 @@ import AntdDraggableModal from "@/components/Common/AntdDraggableModal";
15 import styles from "./index.less"; 15 import styles from "./index.less";
16 import Typesetting from "@/components/Common/Typesetting/typesetting"; 16 import Typesetting from "@/components/Common/Typesetting/typesetting";
17 import DynamicSVG from "@/components/Common/BoxDesignCompontent/svg"; 17 import DynamicSVG from "@/components/Common/BoxDesignCompontent/svg";
18 -import KapaiJson from './kapai.json' 18 +import KapaiJson from "./kapai.json";
19 // 事件 19 // 事件
20 const QuickQuoteEvent = props => { 20 const QuickQuoteEvent = props => {
21 const addState = {}; 21 const addState = {};
@@ -263,6 +263,7 @@ const QuickQuoteEvent = props => { @@ -263,6 +263,7 @@ const QuickQuoteEvent = props => {
263 } 263 }
264 264
265 const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel); 265 const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel);
  266 + console.log("🚀 ~ iIndex:", iIndex);
266 if (name.includes("slaveDown")) { 267 if (name.includes("slaveDown")) {
267 const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue[sFieldName]); 268 const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue[sFieldName]);
268 const extraRowData = {}; 269 const extraRowData = {};
@@ -1242,10 +1243,9 @@ const TreeComponent = props => { @@ -1242,10 +1243,9 @@ const TreeComponent = props => {
1242 masterData: { ...props.masterData, sFormId: props.masterData.sOldFormId || props.masterData.sFormId }, 1243 masterData: { ...props.masterData, sFormId: props.masterData.sOldFormId || props.masterData.sFormId },
1243 }); 1244 });
1244 } 1245 }
1245 -  
1246 getDropDownData(props); 1246 getDropDownData(props);
1247 }, [selectedNode.sId, commonUtils.isEmptyObject(slaveConfig)]); 1247 }, [selectedNode.sId, commonUtils.isEmptyObject(slaveConfig)]);
1248 - 1248 + const { slaveData } = props.state;
1249 return ( 1249 return (
1250 <Tree 1250 <Tree
1251 className={"hide-file-icon"} 1251 className={"hide-file-icon"}
@@ -1466,54 +1466,20 @@ const BoxComponent = props =&gt; { @@ -1466,54 +1466,20 @@ const BoxComponent = props =&gt; {
1466 1466
1467 const { bBox } = selectedNode; 1467 const { bBox } = selectedNode;
1468 const [boxTypeList, setBoxTypeList] = useState([]); 1468 const [boxTypeList, setBoxTypeList] = useState([]);
1469 - const [boxData, setBoxData] = useState([]);  
1470 useEffect(() => { 1469 useEffect(() => {
1471 if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") { 1470 if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") {
1472 - // const getSqlDropDownData = async ({ sId }, cb) => {  
1473 - // const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`;  
1474 - // const body = {  
1475 - // sKeyUpFilterName: "",  
1476 - // pageNum: 1,  
1477 - // pageSize: 1000,  
1478 - // sSqlCondition: {  
1479 - // sProductClassifyId: selectedNode.sId,  
1480 - // },  
1481 - // };  
1482 - // const retrunData = await commonServices.postValueService(props.app.token, body, url);  
1483 - // const dropDownData = retrunData.data?.dataset?.rows;  
1484 - // console.log("🚀 ~ getSqlDropDownData ~ dropDownData:", dropDownData)  
1485 - // };  
1486 -  
1487 - // getSqlDropDownData({ sId: "17428091410008594700322758474000" }, dropDownData => {  
1488 - // const boxTypeList = Array.from(new Set((dropDownData || []).map(item => item.sBoxType || "其它")));  
1489 - // setBoxTypeList(boxTypeList);  
1490 - // setBoxData(  
1491 - // (dropDownData || []).map((item, index) => ({  
1492 - // ...item,  
1493 - // iOrder: index + 1,  
1494 - // }))  
1495 - // );  
1496 - // });  
1497 - let dropDownData = []  
1498 - dropDownData.push(KapaiJson)  
1499 - const boxTypeList = Array.from(new Set((dropDownData || []).map(item => item.sBoxType || "其它")));  
1500 - setBoxTypeList(boxTypeList);  
1501 - setBoxData(  
1502 - (dropDownData || []).map((item, index) => ({  
1503 - ...item,  
1504 - iOrder: index + 1,  
1505 - }))  
1506 - ); 1471 + let dropDownData = [];
  1472 + dropDownData.push(KapaiJson);
  1473 + const boxData = (dropDownData || []).map((item, index) => ({
  1474 + ...item,
  1475 + iOrder: index + 1,
  1476 + }));
  1477 + props.onDataChange("slaveUp" + boxModel, "sName", { sName: KapaiJson.sName }, KapaiJson.sId, boxData);
1507 } 1478 }
1508 }, [boxModel]); 1479 }, [boxModel]);
1509 - useEffect(() => {  
1510 - const kapaiData = boxData.find(x => x.sTypes === "6");  
1511 - if (!kapaiData) return;  
1512 - props.onDataChange("slaveUp" + boxModel, "sName", { sName: kapaiData.sName }, kapaiData.sId, boxData);  
1513 - }, [boxData]); 1480 +
1514 const slaveRowData = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {}; 1481 const slaveRowData = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
1515 const { upAbleConfigsExtra = [], calcMethodData = [], boxPicData = [], radioValue = calcMethodData[0]?.sCode } = slaveRowData; 1482 const { upAbleConfigsExtra = [], calcMethodData = [], boxPicData = [], radioValue = calcMethodData[0]?.sCode } = slaveRowData;
1516 -  
1517 const calcMethod = calcMethodData.map(item => ({ 1483 const calcMethod = calcMethodData.map(item => ({
1518 value: item.sCode, 1484 value: item.sCode,
1519 label: item.showName, 1485 label: item.showName,
@@ -2182,7 +2148,15 @@ const BoxComponent = props =&gt; { @@ -2182,7 +2148,15 @@ const BoxComponent = props =&gt; {
2182 {bBox ? ( 2148 {bBox ? (
2183 <> 2149 <>
2184 {svgProps.boxList.length ? ( 2150 {svgProps.boxList.length ? (
2185 - <div style={{ width: " 300px", height: "290px",lineHeight:'290px', backgroundColor: "#fff", borderRight: "1px solid #ccc" }}> 2151 + <div
  2152 + style={{
  2153 + width: " 300px",
  2154 + height: "290px",
  2155 + lineHeight: "290px",
  2156 + backgroundColor: "#fff",
  2157 + borderRight: "1px solid #ccc",
  2158 + }}
  2159 + >
2186 <DynamicSVG {...svgProps} /> 2160 <DynamicSVG {...svgProps} />
2187 </div> 2161 </div>
2188 ) : ( 2162 ) : (
@@ -2202,6 +2176,12 @@ const BoxComponent = props =&gt; { @@ -2202,6 +2176,12 @@ const BoxComponent = props =&gt; {
2202 ))} 2176 ))}
2203 </Carousel> 2177 </Carousel>
2204 </div> 2178 </div>
  2179 + ) : selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong" ? (
  2180 + <Carousel dots style={{ width: "300px", height: "300px" }}>
  2181 + <div key={0} className="carousel-item">
  2182 + <Image src={KapaiJson.sPackDetailPathUpLoad} style={{ width: "300px", height: "290px" }} />
  2183 + </div>
  2184 + </Carousel>
2205 ) : ( 2185 ) : (
2206 <div className={styles.noImg}>{noImage}</div> 2186 <div className={styles.noImg}>{noImage}</div>
2207 )} 2187 )}
src/mobile/components/SelectInput.jsx
@@ -40,6 +40,9 @@ const SelectInput = props =&gt; { @@ -40,6 +40,9 @@ const SelectInput = props =&gt; {
40 } else { 40 } else {
41 setValue(viewRowNew || ""); // 动态更新 value 41 setValue(viewRowNew || ""); // 动态更新 value
42 } 42 }
  43 + // 处理默认数据
  44 + console.log("🚀 ~ useEffect ~ itemDetail:", itemDetail)
  45 +
43 }, [itemDetail, itemDetail?.sName, viewRow]); 46 }, [itemDetail, itemDetail?.sName, viewRow]);
44 const [columns, setColumns] = useState([]); 47 const [columns, setColumns] = useState([]);
45 const [coplyColumns, setCopyColumns] = useState(columns); 48 const [coplyColumns, setCopyColumns] = useState(columns);
@@ -103,7 +106,6 @@ const SelectInput = props =&gt; { @@ -103,7 +106,6 @@ const SelectInput = props =&gt; {
103 useEffect(() => { 106 useEffect(() => {
104 if (!visible) return; 107 if (!visible) return;
105 let { sDropDownType, sVisColumnName } = itemDetail; 108 let { sDropDownType, sVisColumnName } = itemDetail;
106 - console.log("🚀 ~ useEffect ~ itemDetail:", itemDetail)  
107 if (sVisColumnName && sVisColumnName === "sProcessName") { 109 if (sVisColumnName && sVisColumnName === "sProcessName") {
108 if (sDropDownType === "sql") { 110 if (sDropDownType === "sql") {
109 if (itemDetail.sParamDropDown) { 111 if (itemDetail.sParamDropDown) {
src/mobile/quotation/detailNew.jsx
@@ -151,9 +151,6 @@ const QuickQuoteEvent = props =&gt; { @@ -151,9 +151,6 @@ const QuickQuoteEvent = props =&gt; {
151 151
152 if (name === "master") { 152 if (name === "master") {
153 const { showName: sTreeNodeName } = selectedNode; 153 const { showName: sTreeNodeName } = selectedNode;
154 - const boxModel = name.replace("slaveUp", "").replace("slaveDown", "");  
155 - const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel);  
156 - console.log("🚀 ~ iIndex:", iIndex, boxModel, props);  
157 let masterDataNew = { ...masterData, ...changeValue }; 154 let masterDataNew = { ...masterData, ...changeValue };
158 masterDataNew.handleType = masterDataNew.handleType || "update"; 155 masterDataNew.handleType = masterDataNew.handleType || "update";
159 masterDataNew.sId = commonUtils.createSid(); 156 masterDataNew.sId = commonUtils.createSid();
@@ -166,16 +163,30 @@ const QuickQuoteEvent = props =&gt; { @@ -166,16 +163,30 @@ const QuickQuoteEvent = props =&gt; {
166 if (sFieldName === "sCustomerName") { 163 if (sFieldName === "sCustomerName") {
167 masterDataNew = { ...masterDataNew, sCustomerId: changeValue.sId }; 164 masterDataNew = { ...masterDataNew, sCustomerId: changeValue.sId };
168 } 165 }
169 - // if ((sFieldName === "dLength" || sFieldName === "dWidth" || sFieldName === "dHeight")) {  
170 - // const sColumnNameConfig = commonUtils.convertStrToObj(slaveData[iIndex].sColumnNameConfig, []).map(item => ({  
171 - // ...item,  
172 - // iColValue: item.iColValue || 6,  
173 - // }));  
174 - // slaveData[iIndex] = {  
175 - // ...slaveData[iIndex],  
176 - // upAbleConfigsExtra: sColumnNameConfig,  
177 - // };  
178 - // } 166 + if (sFieldName === "dLength" || sFieldName === "dWidth" || sFieldName === "dHeight") {
  167 + if (props.currentBoxModel) {
  168 + const boxModel = props.currentBoxModel.replace("slaveUp", "").replace("slaveDown", "");
  169 + const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel);
  170 + const sColumnNameConfig = commonUtils.convertStrToObj(slaveData[iIndex].sColumnNameConfig, []).map(item => ({
  171 + ...item,
  172 + iColValue: item.iColValue || 6,
  173 + }));
  174 + slaveData[iIndex] = {
  175 + ...slaveData[iIndex],
  176 + upAbleConfigsExtra: sColumnNameConfig,
  177 + };
  178 + } else {
  179 + if (!slaveData[0]) return;
  180 + const sColumnNameConfig = commonUtils.convertStrToObj(slaveData[0].sColumnNameConfig, []).map(item => ({
  181 + ...item,
  182 + iColValue: item.iColValue || 6,
  183 + }));
  184 + slaveData[0] = {
  185 + ...slaveData[0],
  186 + upAbleConfigsExtra: sColumnNameConfig,
  187 + };
  188 + }
  189 + }
179 setState(pre => ({ ...pre, masterData: masterDataNew, ...extraState })); 190 setState(pre => ({ ...pre, masterData: masterDataNew, ...extraState }));
180 } else if (name.includes("slave")) { 191 } else if (name.includes("slave")) {
181 const boxModel = name.replace("slaveUp", "").replace("slaveDown", ""); 192 const boxModel = name.replace("slaveUp", "").replace("slaveDown", "");
@@ -203,6 +214,13 @@ const QuickQuoteEvent = props =&gt; { @@ -203,6 +214,13 @@ const QuickQuoteEvent = props =&gt; {
203 const { selectedNode = {}, slaveConfig } = state; 214 const { selectedNode = {}, slaveConfig } = state;
204 const { showName: sTreeNodeName } = selectedNode; 215 const { showName: sTreeNodeName } = selectedNode;
205 const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel); 216 const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel);
  217 + if (sFieldName === "dSumPQty" && (sTreeNodeName.includes("骑马") || sTreeNodeName.includes("锁线"))) {
  218 + if (!changeValue.dSumPQty || changeValue.dSumPQty % 4 !== 0) {
  219 + message.info("P数要为4的倍数!");
  220 + changeValue.dSumPQty = 4;
  221 + extraState.slaveUpKey = `key_${commonUtils.createSid()}`;
  222 + }
  223 + }
206 if (name.includes("slaveDown")) { 224 if (name.includes("slaveDown")) {
207 const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue.sId); 225 const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue.sId);
208 dropDownDataSelected && (dropDownDataSelected[sFieldName] = dropDownDataSelected.sProcessName); 226 dropDownDataSelected && (dropDownDataSelected[sFieldName] = dropDownDataSelected.sProcessName);
@@ -227,6 +245,8 @@ const QuickQuoteEvent = props =&gt; { @@ -227,6 +245,8 @@ const QuickQuoteEvent = props =&gt; {
227 value: sParamDefault, 245 value: sParamDefault,
228 sParam: sParam, 246 sParam: sParam,
229 [`sParams${index}`]: sParamDefault, 247 [`sParams${index}`]: sParamDefault,
  248 + sParamKey: `sParam${iOrder}`,
  249 + sParamKeyNew: sFieldName || `sParam${iOrder}`,
230 }; 250 };
231 }) 251 })
232 .filter(item => item !== ""); 252 .filter(item => item !== "");
@@ -312,23 +332,46 @@ const QuickQuoteEvent = props =&gt; { @@ -312,23 +332,46 @@ const QuickQuoteEvent = props =&gt; {
312 }; 332 };
313 } 333 }
314 334
315 - if (sFieldName === "sPrint") { 335 + // if (sFieldName === "sPrint") {
  336 + // slaveData[saveIndex] = {
  337 + // ...slaveData[saveIndex],
  338 + // sProcessId: changeValue.sId,
  339 + // sPrintProcessId: changeValue.sId,
  340 + // dMachineWidth: slaveData[saveIndex].dWlkd,
  341 + // dMachineLength: slaveData[saveIndex].dWlcd,
  342 + // };
  343 + // }
  344 +
  345 + // if (sFieldName === "dMaxLength") {
  346 + // slaveData[saveIndex] = {
  347 + // ...slaveData[saveIndex],
  348 + // dMaxLength: changeValue.dMachineLength,
  349 + // dMaxWidth: changeValue.dMachineWidth,
  350 + // };
  351 + // }
  352 + if (sFieldName === "bFlap") {
316 slaveData[saveIndex] = { 353 slaveData[saveIndex] = {
317 ...slaveData[saveIndex], 354 ...slaveData[saveIndex],
318 - sProcessId: changeValue.sId,  
319 - sPrintProcessId: changeValue.sId,  
320 - dMachineWidth: slaveData[saveIndex].dWlkd,  
321 - dMachineLength: slaveData[saveIndex].dWlcd, 355 + bFold: false,
  356 + sFold: "",
  357 + dFold: "",
  358 + dAdhesive: "",
322 }; 359 };
323 } 360 }
324 -  
325 - if (sFieldName === "dMaxLength") { 361 + if (sFieldName === "bFold") {
326 slaveData[saveIndex] = { 362 slaveData[saveIndex] = {
327 ...slaveData[saveIndex], 363 ...slaveData[saveIndex],
328 - dMaxLength: changeValue.dMachineLength,  
329 - dMaxWidth: changeValue.dMachineWidth, 364 + bFlap: false,
  365 + dFlap: "",
330 }; 366 };
331 } 367 }
  368 + const { upAbleConfigsExtra = [] } = slaveData[saveIndex] || {};
  369 +
  370 + upAbleConfigsExtra.forEach(item => {
  371 + if (item.sName === sFieldName) {
  372 + item.sAssignFormula = null;
  373 + }
  374 + });
332 setState(pre => ({ ...pre, slaveData, ...extraState })); 375 setState(pre => ({ ...pre, slaveData, ...extraState }));
333 } else if (name === "finished") { 376 } else if (name === "finished") {
334 const { productProcessInfo = [] } = masterData; 377 const { productProcessInfo = [] } = masterData;
@@ -715,10 +758,10 @@ const QuickQuoteEvent = props =&gt; { @@ -715,10 +758,10 @@ const QuickQuoteEvent = props =&gt; {
715 delete partsDataRow.dMaterialsKQty; 758 delete partsDataRow.dMaterialsKQty;
716 delete partsDataRow.dMaterialsLength; 759 delete partsDataRow.dMaterialsLength;
717 delete partsDataRow.dMaterialsWidth; 760 delete partsDataRow.dMaterialsWidth;
718 - if (productClassify.bSpecialRules) {  
719 - partsDataRow.dMachineLength = partsDataRow.dMaxMachineLength;  
720 - partsDataRow.dMachineWidth = partsDataRow.dMaxMachineWidth;  
721 - } 761 + // if (productClassify.bSpecialRules) {
  762 + // partsDataRow.dMachineLength = partsDataRow.dMaxMachineLength;
  763 + // partsDataRow.dMachineWidth = partsDataRow.dMaxMachineWidth;
  764 + // }
722 controlData.push(partsDataRow); 765 controlData.push(partsDataRow);
723 // 材料信息 766 // 材料信息
724 for (let i = 0; i < partInfo.materialsInfo.length; i++) { 767 for (let i = 0; i < partInfo.materialsInfo.length; i++) {
@@ -1060,7 +1103,7 @@ const QuotationAllprogressDetail = baseProps =&gt; { @@ -1060,7 +1103,7 @@ const QuotationAllprogressDetail = baseProps =&gt; {
1060 }; 1103 };
1061 }); 1104 });
1062 }; 1105 };
1063 - if (selectedNode.sProductType === "不干胶") { 1106 + if (selectedNode.sTypeKey === "juantong") {
1064 props.onSaveState({ 1107 props.onSaveState({
1065 masterData: { ...props.masterData, sFormId: "101251240115016002356125200" }, 1108 masterData: { ...props.masterData, sFormId: "101251240115016002356125200" },
1066 }); 1109 });
@@ -1457,11 +1500,11 @@ const BoxComponent = props =&gt; { @@ -1457,11 +1500,11 @@ const BoxComponent = props =&gt; {
1457 })); 1500 }));
1458 const showUpAbleConfigsExtra = upAbleConfigsExtra.filter(x => x.bVisible === 1); 1501 const showUpAbleConfigsExtra = upAbleConfigsExtra.filter(x => x.bVisible === 1);
1459 let boxList = []; 1502 let boxList = [];
  1503 + const { sStripType = 0 } = selectedNode;
1460 // if(!masterData) return 1504 // if(!masterData) return
1461 if ( 1505 if (
1462 - (slaveRowData && slaveRowData.sColumnNameConfig && masterData?.dLength && masterData?.dWidth && masterData?.dHeight) ||  
1463 - (selectedNode.sTypeKey === "kapai" && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) ||  
1464 - (selectedNode.sProductType === "不干胶" && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) 1506 + (slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) ||
  1507 + (Number(sStripType) === 1 && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth)
1465 ) { 1508 ) {
1466 const slaveNewData = slaveRowData.upAbleConfigsExtra; 1509 const slaveNewData = slaveRowData.upAbleConfigsExtra;
1467 const tables = [ 1510 const tables = [
@@ -1600,12 +1643,15 @@ const BoxComponent = props =&gt; { @@ -1600,12 +1643,15 @@ const BoxComponent = props =&gt; {
1600 if (!selectedNode.bBleed && item.sName === "dBleed") { 1643 if (!selectedNode.bBleed && item.sName === "dBleed") {
1601 return false; 1644 return false;
1602 } 1645 }
  1646 + if (selectedNode.sTypeKey !== "juantong" && item.sName === "sPaperDirection") {
  1647 + return false;
  1648 + }
1603 return item.iTag === iTag; 1649 return item.iTag === iTag;
1604 }); 1650 });
1605 let boxConfigList = []; 1651 let boxConfigList = [];
1606 if (iTag === 20) { 1652 if (iTag === 20) {
1607 let showNameKeyList = ["dZBLB", "dSBLB", "dYBLB", "dXBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; 1653 let showNameKeyList = ["dZBLB", "dSBLB", "dYBLB", "dXBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
1608 - if (selectedNode.sProductType === "不干胶") { 1654 + if (selectedNode.sTypeKey === "juantong") {
1609 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; 1655 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
1610 } 1656 }
1611 const UlToolPosition = commonFunc.showLocalMessage(props, "UlToolPosition", "上下刀位"); 1657 const UlToolPosition = commonFunc.showLocalMessage(props, "UlToolPosition", "上下刀位");
@@ -1613,7 +1659,7 @@ const BoxComponent = props =&gt; { @@ -1613,7 +1659,7 @@ const BoxComponent = props =&gt; {
1613 const LeftMargin = commonFunc.showLocalMessage(props, "LeftMargin", "左右刀位"); 1659 const LeftMargin = commonFunc.showLocalMessage(props, "LeftMargin", "左右刀位");
1614 1660
1615 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; 1661 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
1616 - if (selectedNode.sProductType === "不干胶") { 1662 + if (selectedNode.sTypeKey === "juantong") {
1617 const mappings = { 1663 const mappings = {
1618 dZBLB: "留边", 1664 dZBLB: "留边",
1619 dXBJJ: "跳距", 1665 dXBJJ: "跳距",
@@ -1660,15 +1706,21 @@ const BoxComponent = props =&gt; { @@ -1660,15 +1706,21 @@ const BoxComponent = props =&gt; {
1660 x.sName === "dPartsWidth" || 1706 x.sName === "dPartsWidth" ||
1661 x.sName === "dRowGap" || 1707 x.sName === "dRowGap" ||
1662 x.sName === "dColGap" || 1708 x.sName === "dColGap" ||
  1709 + x.sName === "dBleed" ||
1663 x.sName === "sPaperDirection", 1710 x.sName === "sPaperDirection",
1664 default: x => 1711 default: x =>
1665 - x.sName === "dBleed" || x.sName === "sMagnification" || x.sName === "dPartsLength" || x.sName === "dPartsWidth" || x.sName === "dSumPQty", 1712 + x.sName === "sPaperDirection" ||
  1713 + x.sName === "dBleed" ||
  1714 + x.sName === "sMagnification" ||
  1715 + x.sName === "dPartsLength" ||
  1716 + x.sName === "dPartsWidth" ||
  1717 + x.sName === "dSumPQty",
1666 }; 1718 };
1667 - if (upViewProps12 && selectedNode.sProductType === "不干胶") { 1719 + if (upViewProps12 && selectedNode.sTypeKey === "juantong") {
1668 upViewProps12.viewConfigs = upViewProps12?.viewConfigs.filter(filterConditions.juantong); 1720 upViewProps12.viewConfigs = upViewProps12?.viewConfigs.filter(filterConditions.juantong);
1669 } 1721 }
1670 if (upViewProps12 && !(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { 1722 if (upViewProps12 && !(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) {
1671 - upViewProps12.viewConfigs = upViewProps12?.viewConfigs.filter(filterConditions.default); 1723 + upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.default);
1672 } 1724 }
1673 // 拼板信息表单 1725 // 拼板信息表单
1674 const upViewProps20 = getUpViewPropsByITag(20); 1726 const upViewProps20 = getUpViewPropsByITag(20);
@@ -1819,7 +1871,7 @@ const BoxComponent = props =&gt; { @@ -1819,7 +1871,7 @@ const BoxComponent = props =&gt; {
1819 }; 1871 };
1820 let juantongConfig = {}; 1872 let juantongConfig = {};
1821 1873
1822 - if (selectedNode.sProductType === "不干胶") { 1874 + if (selectedNode.sTypeKey === "juantong") {
1823 const { dYBJJ, dXBJJ, dZBLB } = slaveData[index]; 1875 const { dYBJJ, dXBJJ, dZBLB } = slaveData[index];
1824 juantongConfig = { 1876 juantongConfig = {
1825 dColGap: dYBJJ, 1877 dColGap: dYBJJ,
@@ -1996,7 +2048,7 @@ const BoxComponent = props =&gt; { @@ -1996,7 +2048,7 @@ const BoxComponent = props =&gt; {
1996 }; 2048 };
1997 2049
1998 useEffect(() => { 2050 useEffect(() => {
1999 - if (selectedNode.sTypeKey === "kapai" || selectedNode.sProductType === "不干胶") { 2051 + if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") {
2000 const data = selectList.find(x => x.sTypes === "6"); 2052 const data = selectList.find(x => x.sTypes === "6");
2001 if (!data) return; 2053 if (!data) return;
2002 const currentBoxModel = "slaveUp" + props.boxModel; 2054 const currentBoxModel = "slaveUp" + props.boxModel;
@@ -2318,13 +2370,15 @@ const PrintParamsComponent = props =&gt; { @@ -2318,13 +2370,15 @@ const PrintParamsComponent = props =&gt; {
2318 }; 2370 };
2319 }); 2371 });
2320 console.log("🚀 ~ printParamsConfig:", printParamsConfig); 2372 console.log("🚀 ~ printParamsConfig:", printParamsConfig);
2321 - // printParamsConfig.forEach(item=>{  
2322 - // const showDropDown = commonUtils.isNotEmptyArr(item.dropDownData)  
2323 - // ? this.props.showConfig.dropDownData  
2324 - // : typeof this.props.showConfig.showDropDown === "object"  
2325 - // ? this.props.showConfig.showDropDown  
2326 - // : commonUtils.objectToArr(commonUtils.convertStrToObj(this.props.showConfig.showDropDown));  
2327 - // }) 2373 + printParamsConfig.forEach(item => {
  2374 + // const showDropDown = commonUtils.isNotEmptyArr(item.dropDownData)
  2375 + // ? props.showConfig.dropDownData
  2376 + // : typeof props.showConfig.showDropDown === "object"
  2377 + // ? props.showConfig.showDropDown
  2378 + // : commonUtils.objectToArr(commonUtils.convertStrToObj(props.showConfig.showDropDown));
  2379 + const showDropDown = item.showDropDown;
  2380 + console.log("🚀 ~ showDropDown:", showDropDown,props.showConfig);
  2381 + });
2328 const result = []; 2382 const result = [];
2329 for (let i = 0; i < printParams.length + 1; i++) { 2383 for (let i = 0; i < printParams.length + 1; i++) {
2330 const printParamsItem = printParams[i - 1]; 2384 const printParamsItem = printParams[i - 1];
@@ -2621,7 +2675,7 @@ const ManyComponent = props =&gt; { @@ -2621,7 +2675,7 @@ const ManyComponent = props =&gt; {
2621 useEffect(() => { 2675 useEffect(() => {
2622 if (calcPriceLoading) { 2676 if (calcPriceLoading) {
2623 setProcessPercent(0); 2677 setProcessPercent(0);
2624 - } 2678 + }
2625 }, [calcPriceLoading]); 2679 }, [calcPriceLoading]);
2626 2680
2627 // 监听确认下单数量结束 2681 // 监听确认下单数量结束
@@ -2774,12 +2828,11 @@ const ManyComponent = props =&gt; { @@ -2774,12 +2828,11 @@ const ManyComponent = props =&gt; {
2774 fill="solid" 2828 fill="solid"
2775 size="small" 2829 size="small"
2776 onClick={() => { 2830 onClick={() => {
2777 -  
2778 - console.log(data,changeValue, value,'asdasdasd'); 2831 + console.log(data, changeValue, value, "asdasdasd");
2779 const i = data.findIndex(item => item.sId === changeValue.sId); 2832 const i = data.findIndex(item => item.sId === changeValue.sId);
2780 if (i !== -1) { 2833 if (i !== -1) {
2781 data[i].dManyQty = Number(value); 2834 data[i].dManyQty = Number(value);
2782 - handleRadioChange(data[i]) 2835 + handleRadioChange(data[i]);
2783 } 2836 }
2784 setVisible(false); 2837 setVisible(false);
2785 setValue(""); 2838 setValue("");
src/mobile/quotation/index.css
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 height: 100%; 12 height: 100%;
13 } 13 }
14 .quotationBox .quotationNavigation :global .adm-side-bar { 14 .quotationBox .quotationNavigation :global .adm-side-bar {
15 - background-color: #EBF2FD; 15 + background-color: #ebf2fd;
16 } 16 }
17 .quotationBox .quotationContent { 17 .quotationBox .quotationContent {
18 width: 70%; 18 width: 70%;
@@ -40,3 +40,6 @@ @@ -40,3 +40,6 @@
40 margin-left: 0.625rem; 40 margin-left: 0.625rem;
41 font-weight: 700; 41 font-weight: 700;
42 } 42 }
  43 +.quotationBox .quotationContent .nestedItems .contentItem {
  44 + background-color: '#333';
  45 +}
src/mobile/quotation/index.jsx
@@ -22,7 +22,7 @@ const QuotationAllprogress = baseProps =&gt; { @@ -22,7 +22,7 @@ const QuotationAllprogress = baseProps =&gt; {
22 }; 22 };
23 const dataUrl = `${commonConfig.server_host}filterTree/getFilterTree/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`; 23 const dataUrl = `${commonConfig.server_host}filterTree/getFilterTree/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`;
24 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; 24 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
25 - // if (dataReturn.dataset.rows) return 25 + // if (dataReturn.dataset.rows) return
26 const treeDataList = dataReturn.dataset.rows[0].children.map(item => { 26 const treeDataList = dataReturn.dataset.rows[0].children.map(item => {
27 return item; 27 return item;
28 }); 28 });
@@ -96,9 +96,11 @@ const TreeComponent = props =&gt; { @@ -96,9 +96,11 @@ const TreeComponent = props =&gt; {
96 }; 96 };
97 // 内容 97 // 内容
98 const ContentComponent = props => { 98 const ContentComponent = props => {
99 - const { contentList = [] ,selectedKey} = props.state || {}; 99 + const { contentList = [], selectedKey } = props.state || {};
  100 + console.log("🚀 ~ contentList:", contentList);
100 // 路由 101 // 路由
101 const handleGridClick = item => () => { 102 const handleGridClick = item => () => {
  103 + if (item.children && item.children.length > 0) return;
102 props.dispatch({ 104 props.dispatch({
103 type: "content/onRouterMobile", 105 type: "content/onRouterMobile",
104 payload: { 106 payload: {
@@ -108,21 +110,53 @@ const ContentComponent = props =&gt; { @@ -108,21 +110,53 @@ const ContentComponent = props =&gt; {
108 sModelType: props.sModelType, 110 sModelType: props.sModelType,
109 quotationData: { 111 quotationData: {
110 ...item, 112 ...item,
111 - sProductClassifyId:selectedKey 113 + sProductClassifyId: selectedKey,
112 }, 114 },
113 -  
114 }, 115 },
115 }); 116 });
116 }; 117 };
  118 +
117 return ( 119 return (
118 <div className={styles.content}> 120 <div className={styles.content}>
119 - {contentList.map(item => (  
120 - <div key={item.key} className={styles.contentItem} onClick={handleGridClick(item)}>  
121 - <img src={'http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath%E9%A3%9E%E6%9C%BA%E7%9B%92&date=1747049329258'} alt="" className={styles.contentItemImg} />  
122 - <span className={styles.contentItemTitle}>{item.showName}</span>  
123 - </div>  
124 - ))} 121 + <RecursiveItemList items={contentList} handleGridClick={handleGridClick} />
125 </div> 122 </div>
126 ); 123 );
127 }; 124 };
  125 +const RecursiveItemList = ({ items, handleGridClick }) => {
  126 + const renderItems = (list, level = 0) => {
  127 + return list.map(item => (
  128 + <div
  129 + key={item.key}
  130 +
  131 + onClick={handleGridClick(item)}
  132 + style={{ marginLeft: level * 20 }} // 根据层级添加缩进
  133 + >
  134 + {/* {
  135 + item.children && item.children.length > 0 ?
  136 + <div style={{width:'2rem',}}>{item.showName}</div>
  137 + :
  138 + <div>
  139 + <img
  140 + src={'http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath%E9%A3%9E%E6%9C%BA%E7%9B%92&date=1747049329258'}
  141 + alt=""
  142 + className={styles.contentItemImg}
  143 + />
  144 + <span className={styles.contentItemTitle}>{item.showName}</span>
  145 + </div>
  146 + } */}
  147 + <div className={styles.contentItem}>
  148 + <img
  149 + src={"http://8.130.144.93:8088/xlyEntry/file/downloadLogo?sLogoName=logosPackPath%E9%A3%9E%E6%9C%BA%E7%9B%92&date=1747049329258"}
  150 + alt=""
  151 + className={styles.contentItemImg}
  152 + />
  153 + <span className={styles.contentItemTitle}>{item.showName}</span>
  154 + </div>
  155 + {item.children && item.children.length > 0 ? <div className={styles.nestedItems}>{renderItems(item.children, level + 1)}</div> : null}
  156 + </div>
  157 + ));
  158 + };
  159 +
  160 + return <div>{renderItems(items)}</div>;
  161 +};
128 export default QuotationAllprogress; 162 export default QuotationAllprogress;
src/mobile/quotation/index.less
1 -  
2 .quotationBox { 1 .quotationBox {
3 width: 100%; 2 width: 100%;
4 height: 100%; 3 height: 100%;
@@ -10,8 +9,8 @@ @@ -10,8 +9,8 @@
10 .quotationNavigation { 9 .quotationNavigation {
11 width: 30%; 10 width: 30%;
12 height: 100%; 11 height: 100%;
13 - :global .adm-side-bar {  
14 - background-color: #EBF2FD; 12 + :global .adm-side-bar {
  13 + background-color: #ebf2fd;
15 } 14 }
16 } 15 }
17 .quotationContent { 16 .quotationContent {
@@ -39,5 +38,10 @@ @@ -39,5 +38,10 @@
39 font-weight: 700; 38 font-weight: 700;
40 } 39 }
41 } 40 }
  41 + .nestedItems {
  42 + .contentItem {
  43 + background-color: '#333';
  44 + }
  45 + }
42 } 46 }
43 } 47 }