Commit e1f1415b3c7cba7181e20fd2bfcff70db3ce2486

Authored by 陈鑫涛
1 parent 0582a5b6

盒型

src/components/Common/BoxDesignCompontent/index.js
@@ -127,7 +127,7 @@ const BoxDesignCompontent = baseProps => { @@ -127,7 +127,7 @@ const BoxDesignCompontent = baseProps => {
127 value: "", 127 value: "",
128 })) 128 }))
129 setTableColum(newTableColum); 129 setTableColum(newTableColum);
130 - }, [tableData.length]); 130 + }, [tableData]);
131 131
132 // 2️⃣ 只负责 boxBodyList 盒身 132 // 2️⃣ 只负责 boxBodyList 盒身
133 useEffect(() => { 133 useEffect(() => {
@@ -142,22 +142,14 @@ const BoxDesignCompontent = baseProps => { @@ -142,22 +142,14 @@ const BoxDesignCompontent = baseProps => {
142 value: '', 142 value: '',
143 })) 143 }))
144 setBoxBodyList(bodyList); 144 setBoxBodyList(bodyList);
145 - }, [tableData.length]); 145 + }, [tableData]);
146 146
147 // 3️⃣ 只负责 tableDataList 和 tableDataLists 147 // 3️⃣ 只负责 tableDataList 和 tableDataLists
148 148
149 useEffect(() => { 149 useEffect(() => {
150 if (!tableData?.length) return; 150 if (!tableData?.length) return;
151 - // const keywords = ["盒长", "盒高", "盒宽", "Box Length", "Box Width", "Box Height"];  
152 - const keywordMap = {  
153 - '盒长': 'L',  
154 - '盒宽': 'W',  
155 - '盒高': 'D',  
156 - 'Box Length': 'L',  
157 - 'Box Width': 'W',  
158 - 'Box Height': 'D',  
159 - };  
160 - 151 +
  152 + const keywordMap = ['L','W', 'D']
161 const newList = tableData 153 const newList = tableData
162 .filter(item => item.bVisible).filter(item => item.iTag === 30) 154 .filter(item => item.bVisible).filter(item => item.iTag === 30)
163 .map(item => ({ 155 .map(item => ({
@@ -166,21 +158,20 @@ const BoxDesignCompontent = baseProps => { @@ -166,21 +158,20 @@ const BoxDesignCompontent = baseProps => {
166 isSelect: false, 158 isSelect: false,
167 selectImage: null, 159 selectImage: null,
168 value: "", 160 value: "",
169 - })).map(item => { 161 + })).map((item,i) => {
170 // 拼出新名字:原始关键字 + (后缀) 162 // 拼出新名字:原始关键字 + (后缀)
171 - const sName = `${item.showName} (${keywordMap[item.showName?.trim()]})` 163 + const sName = `${item.showName} (${keywordMap[i]})`
172 return { ...item, sName }; 164 return { ...item, sName };
173 }); 165 });
174 setTableDataList(newList); 166 setTableDataList(newList);
175 setTableDataLists(newList); 167 setTableDataLists(newList);
176 const shape = tableData.find(x => x.iTag === 70)?.showDropDown 168 const shape = tableData.find(x => x.iTag === 70)?.showDropDown
177 - if (!shape) return  
178 const JsonShape = JSON.parse(shape) 169 const JsonShape = JSON.parse(shape)
179 const shapeLists = Array.from(Object.values(JsonShape)) 170 const shapeLists = Array.from(Object.values(JsonShape))
180 setShapeList(shapeLists) 171 setShapeList(shapeLists)
181 const prompt = tableData.filter(x => x.iTag === 80) 172 const prompt = tableData.filter(x => x.iTag === 80)
182 setDoublePrompt(prompt) 173 setDoublePrompt(prompt)
183 - }, [tableData.length]); 174 + }, [tableData]);
184 175
185 // 获取itag为40的数据 176 // 获取itag为40的数据
186 const upViewPropsAll = Array.isArray(tableData) 177 const upViewPropsAll = Array.isArray(tableData)
@@ -352,23 +343,23 @@ const BoxDesignCompontent = baseProps => { @@ -352,23 +343,23 @@ const BoxDesignCompontent = baseProps => {
352 } 343 }
353 } 344 }
354 // 盒身信息 345 // 盒身信息
355 - if (masterData) { 346 + if (masterData && boxBodyList.length && tableDataList.length && tableColum.length) {
356 const headLength = slaveData.find(item => item.sCode === "dSHC")?.iValue; 347 const headLength = slaveData.find(item => item.sCode === "dSHC")?.iValue;
357 const headWidth = slaveData.find(item => item.sCode === "dSHK")?.iValue; 348 const headWidth = slaveData.find(item => item.sCode === "dSHK")?.iValue;
358 const orderLength = slaveData.find(item => item.sCode === "dCHC")?.iValue; 349 const orderLength = slaveData.find(item => item.sCode === "dCHC")?.iValue;
359 const orderWidth = slaveData.find(item => item.sCode === "dCHK")?.iValue; 350 const orderWidth = slaveData.find(item => item.sCode === "dCHK")?.iValue;
360 newBoxList.forEach((item, index) => { 351 newBoxList.forEach((item, index) => {
361 - if (item.sName?.trim() === "盒身" || item.sName?.trim() === "Box Body") { 352 + if (item.sName?.trim() === boxBodyList[0].showName) {
362 newBoxList[index].value = masterData.sBoxBody; 353 newBoxList[index].value = masterData.sBoxBody;
363 newBoxList[index].selectImage = masterData.sMakeUpPath; 354 newBoxList[index].selectImage = masterData.sMakeUpPath;
364 newBoxList[index].type = masterData.sTypes; 355 newBoxList[index].type = masterData.sTypes;
365 - } else if (item.sName?.trim() === "盒长" || item.sName?.trim() === "Box Length") { 356 + } else if (item.sName?.trim() === tableDataList[0].showName) {
366 newBoxList[index].value = masterData.dBoxLength; 357 newBoxList[index].value = masterData.dBoxLength;
367 - } else if (item.sName?.trim() === "盒宽" || item.sName?.trim() === "Box Width") { 358 + } else if (item.sName?.trim() === tableDataList[1].showName) {
368 newBoxList[index].value = masterData.dBoxWidth; 359 newBoxList[index].value = masterData.dBoxWidth;
369 - } else if (item.sName?.trim() === "盒高" || item.sName?.trim() === "Box Height") { 360 + } else if (item.sName?.trim() === tableDataList[2].showName) {
370 newBoxList[index].value = masterData.dBoxHeight; 361 newBoxList[index].value = masterData.dBoxHeight;
371 - } else if (item.sName === "盒型名称" || item.sName?.trim() === "Box Name") { 362 + } else if (item.sName === tableColum[0].showName) {
372 newBoxList[index].value = masterData.sName; 363 newBoxList[index].value = masterData.sName;
373 } else if (item.sName === "首盒长") { 364 } else if (item.sName === "首盒长") {
374 newBoxList[index].value = headLength; 365 newBoxList[index].value = headLength;
@@ -681,9 +672,7 @@ const BoxDesignCompontent = baseProps => { @@ -681,9 +672,7 @@ const BoxDesignCompontent = baseProps => {
681 const boxType = boxList.find(item => item.sName === boxBodyList[0]?.showName)?.type; 672 const boxType = boxList.find(item => item.sName === boxBodyList[0]?.showName)?.type;
682 if (boxType === "8") { 673 if (boxType === "8") {
683 } else { 674 } else {
684 - const boxLength = Number(boxList.find(item => item.sName === "盒长" || item.sName?.trim() === "Box Length")?.value);  
685 - const boxWidth = Number(boxList.find(item => item.sName === "盒宽" || item.sName?.trim() === "Box Width")?.value);  
686 - const boxHeight = Number(boxList.find(item => item.sName === "盒高" || item.sName?.trim() === "Box Height")?.value); 675 + const boxHeight = Number(boxList.find(item => item.sName === tableDataList[2].showName)?.value);
687 const zxcw = boxList.find(x => x.sName === "左(下)插位组件"); 676 const zxcw = boxList.find(x => x.sName === "左(下)插位组件");
688 const zscw = boxList.find(x => x.sName === "左(上)插位组件"); 677 const zscw = boxList.find(x => x.sName === "左(上)插位组件");
689 const yscw = boxList.find(x => x.sName === "右(上)插位组件"); 678 const yscw = boxList.find(x => x.sName === "右(上)插位组件");
@@ -1332,7 +1321,7 @@ const BoxDesignCompontent = baseProps => { @@ -1332,7 +1321,7 @@ const BoxDesignCompontent = baseProps => {
1332 <div> 1321 <div>
1333 <div className={styles.boxInput}> 1322 <div className={styles.boxInput}>
1334 <div className={styles.text} style={{ width: 61 }}> 1323 <div className={styles.text} style={{ width: 61 }}>
1335 - 层1{" "} 1324 + {doublePrompt[0].showName}
1336 </div> 1325 </div>
1337 <Input 1326 <Input
1338 value={item?.sLength} 1327 value={item?.sLength}
@@ -1390,7 +1379,7 @@ const BoxDesignCompontent = baseProps =&gt; { @@ -1390,7 +1379,7 @@ const BoxDesignCompontent = baseProps =&gt; {
1390 </div> 1379 </div>
1391 <div className={styles.boxInput}> 1380 <div className={styles.boxInput}>
1392 <div className={styles.text} style={{ width: 61 }}> 1381 <div className={styles.text} style={{ width: 61 }}>
1393 - 层2{" "} 1382 + {doublePrompt[1].showName}
1394 </div> 1383 </div>
1395 <Input 1384 <Input
1396 value={item?.cLength} 1385 value={item?.cLength}
@@ -1575,7 +1564,7 @@ const BoxDesignCompontent = baseProps =&gt; { @@ -1575,7 +1564,7 @@ const BoxDesignCompontent = baseProps =&gt; {
1575 <div> 1564 <div>
1576 <div className={styles.boxInput}> 1565 <div className={styles.boxInput}>
1577 <div className={styles.text} style={{ width: 61 }}> 1566 <div className={styles.text} style={{ width: 61 }}>
1578 - 层1{" "} 1567 + {doublePrompt[0].showName}
1579 </div> 1568 </div>
1580 <Input 1569 <Input
1581 value={item?.sLength} 1570 value={item?.sLength}
@@ -1633,7 +1622,7 @@ const BoxDesignCompontent = baseProps =&gt; { @@ -1633,7 +1622,7 @@ const BoxDesignCompontent = baseProps =&gt; {
1633 </div> 1622 </div>
1634 <div className={styles.boxInput}> 1623 <div className={styles.boxInput}>
1635 <div className={styles.text} style={{ width: 61 }}> 1624 <div className={styles.text} style={{ width: 61 }}>
1636 - 层2{" "} 1625 + {doublePrompt[1].showName}
1637 </div> 1626 </div>
1638 <Input 1627 <Input
1639 value={item?.cLength} 1628 value={item?.cLength}
src/components/Common/BoxDesignCompontent/svg.js
@@ -149,7 +149,6 @@ const SvgBox = props =&gt; { @@ -149,7 +149,6 @@ const SvgBox = props =&gt; {
149 // 如果存在部件和盒舌 取最大的 149 // 如果存在部件和盒舌 取最大的
150 const top = topOffect(boxList, boxLength, boxWidth, boxHeight, props); 150 const top = topOffect(boxList, boxLength, boxWidth, boxHeight, props);
151 const bottom = bottomOffect(boxList, boxLength, boxWidth, boxHeight, props); 151 const bottom = bottomOffect(boxList, boxLength, boxWidth, boxHeight, props);
152 - console.log("🚀 ~ initSVG ~ bottom:", top, bottom)  
153 max = Number(top) + Number(bottom); 152 max = Number(top) + Number(bottom);
154 if (Number(svgType) === 8) { 153 if (Number(svgType) === 8) {
155 const top = topOffect(boxList, headLength, headWidth, props); 154 const top = topOffect(boxList, headLength, headWidth, props);
@@ -239,7 +238,6 @@ const SvgBox = props =&gt; { @@ -239,7 +238,6 @@ const SvgBox = props =&gt; {
239 } else if (Number(svgType) === 5) { 238 } else if (Number(svgType) === 5) {
240 viewBoxWidth = (boxHeight + boxWidth) * 2 + dYTBW + dZTBW + doubleTotal 239 viewBoxWidth = (boxHeight + boxWidth) * 2 + dYTBW + dZTBW + doubleTotal
241 viewBoxHeight = boxLength + max; 240 viewBoxHeight = boxLength + max;
242 - console.log("🚀 ~ initSVG ~ viewBoxHeight:", viewBoxHeight, boxLength, max)  
243 241
244 } else if (Number(svgType) === 6) { 242 } else if (Number(svgType) === 6) {
245 viewBoxWidth = boxWidth + 2; 243 viewBoxWidth = boxWidth + 2;
@@ -5180,6 +5178,9 @@ const SvgBox = props =&gt; { @@ -5180,6 +5178,9 @@ const SvgBox = props =&gt; {
5180 }); 5178 });
5181 5179
5182 svg.appendChild(g); 5180 svg.appendChild(g);
  5181 + } else if (Number(svgType) === 9) {
  5182 + // g.appendChild(createPathElement(rect.x, rect.y, rect.width, rect.height))
  5183 + svg.appendChild(g);
5183 } 5184 }
5184 }; 5185 };
5185 // 计算头部偏移 5186 // 计算头部偏移
@@ -5199,7 +5200,6 @@ const SvgBox = props =&gt; { @@ -5199,7 +5200,6 @@ const SvgBox = props =&gt; {
5199 5200
5200 } 5201 }
5201 const svg = Number(box?.type); 5202 const svg = Number(box?.type);
5202 - console.log("🚀 ~ topOffect ~ svg:", svg, showNew)  
5203 if (svg === 6) return 0; 5203 if (svg === 6) return 0;
5204 5204
5205 const dZ = Number(zscw?.value) || 0; 5205 const dZ = Number(zscw?.value) || 0;
src/components/Common/CommonTable/index.js
@@ -4081,7 +4081,7 @@ class CommonTableRc extends React.Component { @@ -4081,7 +4081,7 @@ class CommonTableRc extends React.Component {
4081 if (commonUtils.isNotEmptyObject(record)) { 4081 if (commonUtils.isNotEmptyObject(record)) {
4082 const sMemo = showConfig.sName; 4082 const sMemo = showConfig.sName;
4083 const title = showConfig.showName; 4083 const title = showConfig.showName;
4084 - if (sName.includes('sTemplateFullMemo')) { 4084 + if (sName.includes(['sTemplateFullMemo','sContentMemo'])) {
4085 return this.setState({ simpleModalVisible: true, simpleModalWord: record[sName] }); 4085 return this.setState({ simpleModalVisible: true, simpleModalWord: record[sName] });
4086 } 4086 }
4087 const sCurrMemoProps = { 4087 const sCurrMemoProps = {
src/components/QuickQuote/index.jsx
@@ -1527,6 +1527,8 @@ const TreeComponent = props =&gt; { @@ -1527,6 +1527,8 @@ const TreeComponent = props =&gt; {
1527 masterData: { ...props.masterData, sFormId: "101251240115016076506222050" }, 1527 masterData: { ...props.masterData, sFormId: "101251240115016076506222050" },
1528 }); 1528 });
1529 } 1529 }
  1530 + console.log(selectedNode, 'selectedNode');
  1531 +
1530 getDropDownData(props); 1532 getDropDownData(props);
1531 }, [selectedNode.sId, commonUtils.isEmptyObject(slaveConfig)]); 1533 }, [selectedNode.sId, commonUtils.isEmptyObject(slaveConfig)]);
1532 const { slaveData } = props.state; 1534 const { slaveData } = props.state;
@@ -1856,13 +1858,56 @@ const BoxComponent = props =&gt; { @@ -1856,13 +1858,56 @@ const BoxComponent = props =&gt; {
1856 if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") { 1858 if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") {
1857 const { sBillNo } = slaveRowData; 1859 const { sBillNo } = slaveRowData;
1858 if (sBillNo) return; 1860 if (sBillNo) return;
1859 - let dropDownData = [];  
1860 - dropDownData.push(KapaiJson);  
1861 - const boxData = (dropDownData || []).map((item, index) => ({  
1862 - ...item,  
1863 - iOrder: index + 1,  
1864 - }));  
1865 - props.onDataChange("slaveUp" + boxModel, "sName", { sName: KapaiJson.sName }, KapaiJson.sId, boxData); 1861 + const getSqlDropDownData = async ({ sId, sSqlCondition = {} }, cb) => {
  1862 + const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`;
  1863 + const body = {
  1864 + sKeyUpFilterName: "",
  1865 + pageNum: 1,
  1866 + pageSize: 1000,
  1867 + sSqlCondition,
  1868 + };
  1869 + const retrunData = await commonServices.postValueService(props.app.token, body, url);
  1870 + const dropDownData = retrunData.data?.dataset?.rows;
  1871 + if (dropDownData) {
  1872 + const box = dropDownData.find(box => box.sId === '17551384620004172929247856556500'); // Define 'box' here
  1873 + const boxData = dropDownData.map((itemBox, indexBox) => ({
  1874 + ...itemBox,
  1875 + iOrder: indexBox + 1,
  1876 + }));
  1877 + if (box) { // Check if 'box' exists before using it
  1878 + props.onDataChange("slaveUp" + boxModel, "sName", { sName: box.sName }, box.sId, boxData);
  1879 + }
  1880 + }
  1881 + // if (dropDownData && sAllPartsNameDefaultList.length) {
  1882 + // sAllPartsNameDefaultList.forEach((item, index) => {
  1883 + // const sPartNameList = item.sPartName?.split(",");
  1884 + // if (sPartNameList && sPartNameList.length) {
  1885 + // sPartNameList.forEach(sPartName => {
  1886 + // const box = dropDownData.find(box => box.sId === '17551384620004172929247856556500'); // Define 'box' here
  1887 + // const boxData = dropDownData.map((itemBox, indexBox) => ({
  1888 + // ...itemBox,
  1889 + // iOrder: indexBox + 1,
  1890 + // }));
  1891 + // if (box) { // Check if 'box' exists before using it
  1892 + // props.onDataChange("slaveUp" + sPartName, "sName", { sName: box.sName }, box.sId, boxData);
  1893 + // }
  1894 + // });
  1895 + // }
  1896 + // });
  1897 + // }
  1898 + };
  1899 +
  1900 + getSqlDropDownData({
  1901 + sId: '17428091410008594700322758474000',
  1902 + sSqlCondition: { sProductClassifyId: selectedNode.sId },
  1903 + });
  1904 + // let dropDownData = [];
  1905 + // dropDownData.push(KapaiJson);
  1906 + // const boxData = (dropDownData || []).map((item, index) => ({
  1907 + // ...item,
  1908 + // iOrder: index + 1,
  1909 + // }));
  1910 + // props.onDataChange("slaveUp" + boxModel, "sName", { sName: KapaiJson.sName }, KapaiJson.sId, boxData);
1866 } 1911 }
1867 }, [boxModel]); 1912 }, [boxModel]);
1868 1913
@@ -1896,7 +1941,7 @@ const BoxComponent = props =&gt; { @@ -1896,7 +1941,7 @@ const BoxComponent = props =&gt; {
1896 sName: item.sName + key, 1941 sName: item.sName + key,
1897 sDefault: item[key], 1942 sDefault: item[key],
1898 showName: item.showName + ['1长', '1宽', '2长', '2宽'][idx], 1943 showName: item.showName + ['1长', '1宽', '2长', '2宽'][idx],
1899 - sId:item.sId + idx 1944 + sId: item.sId + idx
1900 })) 1945 }))
1901 : [item] // 非 '09' 也要包一层数组,保持结构一致 1946 : [item] // 非 '09' 也要包一层数组,保持结构一致
1902 ) 1947 )
@@ -1913,8 +1958,7 @@ const BoxComponent = props =&gt; { @@ -1913,8 +1958,7 @@ const BoxComponent = props =&gt; {
1913 tableName: `slaveUp${boxModel}`, 1958 tableName: `slaveUp${boxModel}`,
1914 }; 1959 };
1915 1960
1916 - console.log(upAbleConfigs,upAbleConfigsList,'upAbleConfigs');  
1917 - 1961 +
1918 const getUpViewPropsByITag = iTag => { 1962 const getUpViewPropsByITag = iTag => {
1919 const config = slaveConfig.gdsconfigformslave 1963 const config = slaveConfig.gdsconfigformslave
1920 .filter(item => !["sPrint", "sColor", "iPrintModePo"].includes(item.sName)) 1964 .filter(item => !["sPrint", "sColor", "iPrintModePo"].includes(item.sName))
@@ -1938,7 +1982,7 @@ const BoxComponent = props =&gt; { @@ -1938,7 +1982,7 @@ const BoxComponent = props =&gt; {
1938 return false; 1982 return false;
1939 } else { 1983 } else {
1940 if (item.sName === "iPage") { 1984 if (item.sName === "iPage") {
1941 - const rateList = commonUtils.convertStrToObj(slaveConfig.gdsconfigformslave.find(x => x.sName === "iRateType")?.showDropDown, []); 1985 + const rateList = JSON.parse(slaveConfig.gdsconfigformslave.find(x => x.sName === "iRateType")?.showDropDown) || [];
1942 item.showName = rateList[Number(selectedNode.iRateType)] || "倍率"; 1986 item.showName = rateList[Number(selectedNode.iRateType)] || "倍率";
1943 } 1987 }
1944 } 1988 }
@@ -1951,9 +1995,11 @@ const BoxComponent = props =&gt; { @@ -1951,9 +1995,11 @@ const BoxComponent = props =&gt; {
1951 } 1995 }
1952 if (item.sName === "dWlkd") { 1996 if (item.sName === "dWlkd") {
1953 if (selectedNode.sTypeKey === "juantong") { 1997 if (selectedNode.sTypeKey === "juantong") {
1954 - item.showName = "门幅"; 1998 + const FabricWidth = commonFunc.showLocalMessage(props, "FabricWidth", "门幅");
  1999 + item.showName = FabricWidth;
1955 } else { 2000 } else {
1956 - item.showName = "材料宽"; 2001 + const MaterialWidth = commonFunc.showLocalMessage(props, "MaterialWidth", "材料宽");
  2002 + item.showName = MaterialWidth;
1957 } 2003 }
1958 } 2004 }
1959 if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") { 2005 if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") {
@@ -1988,12 +2034,15 @@ const BoxComponent = props =&gt; { @@ -1988,12 +2034,15 @@ const BoxComponent = props =&gt; {
1988 const UlToolPosition = commonFunc.showLocalMessage(props, "UlToolPosition", "上下刀位"); 2034 const UlToolPosition = commonFunc.showLocalMessage(props, "UlToolPosition", "上下刀位");
1989 const RLToolPosition = commonFunc.showLocalMessage(props, "RLToolPosition", "左右刀位"); 2035 const RLToolPosition = commonFunc.showLocalMessage(props, "RLToolPosition", "左右刀位");
1990 const LeftMargin = commonFunc.showLocalMessage(props, "LeftMargin", "左右留白"); 2036 const LeftMargin = commonFunc.showLocalMessage(props, "LeftMargin", "左右留白");
  2037 + const StayOnTheEdge = commonFunc.showLocalMessage(props, "StayOnTheEdge", "留边");
  2038 + const Spacing = commonFunc.showLocalMessage(props, "Spacing", "间距");
  2039 + const HopDistance = commonFunc.showLocalMessage(props, "HopDistance", "跳距");
1991 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; 2040 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
1992 if (selectedNode.sTypeKey === "juantong") { 2041 if (selectedNode.sTypeKey === "juantong") {
1993 const mappings = { 2042 const mappings = {
1994 - dZBLB: "留边",  
1995 - dXBJJ: "间距",  
1996 - dYBJJ: "跳距", 2043 + dZBLB: StayOnTheEdge,
  2044 + dXBJJ: Spacing,
  2045 + dYBJJ: HopDistance,
1997 }; 2046 };
1998 2047
1999 boxConfigList.forEach(item => { 2048 boxConfigList.forEach(item => {
@@ -2528,7 +2577,6 @@ const BoxComponent = props =&gt; { @@ -2528,7 +2577,6 @@ const BoxComponent = props =&gt; {
2528 dSvgBoxHeight: 200, 2577 dSvgBoxHeight: 200,
2529 showNew: 1, 2578 showNew: 1,
2530 }; 2579 };
2531 - console.log("🚀 ~ svgProps:", svgProps)  
2532 2580
2533 // upViewProps.viewRow = 2581 // upViewProps.viewRow =
2534 2582
@@ -2556,7 +2604,7 @@ const BoxComponent = props =&gt; { @@ -2556,7 +2604,7 @@ const BoxComponent = props =&gt; {
2556 { src: getImageUrl(removeExtension(slaveRowData.sPackDetailPathUpLoad)), alt: "展开图" }, 2604 { src: getImageUrl(removeExtension(slaveRowData.sPackDetailPathUpLoad)), alt: "展开图" },
2557 { src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }, 2605 { src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" },
2558 ]; 2606 ];
2559 - if (!slaveRowData.sPackDetailPathUpLoad) { 2607 + if (!slaveRowData.sPackDetailPathUpLoad) {
2560 imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }]; 2608 imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }];
2561 } else if (!slaveRowData.sPackPath) { 2609 } else if (!slaveRowData.sPackPath) {
2562 imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }]; 2610 imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }];
@@ -2689,9 +2737,11 @@ const BoxComponent = props =&gt; { @@ -2689,9 +2737,11 @@ const BoxComponent = props =&gt; {
2689 </div> 2737 </div>
2690 ) : selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong" ? ( 2738 ) : selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong" ? (
2691 <Carousel dots style={{ width: "300px", height: "300px" }}> 2739 <Carousel dots style={{ width: "300px", height: "300px" }}>
2692 - <div key={0} className="carousel-item">  
2693 - <Image src={KapaiJson.sPackDetailPathUpLoad} style={{ width: "300px", height: "290px" }} />  
2694 - </div> 2740 + {imagesData.map((image, index) => (
  2741 + <div key={index} className="carousel-item">
  2742 + <Image src={image.src} alt={image.alt} style={{ width: "300px", height: "290px" }} />
  2743 + </div>
  2744 + ))}
2695 </Carousel> 2745 </Carousel>
2696 ) : ( 2746 ) : (
2697 <div className={styles.noImg}>{noImage}</div> 2747 <div className={styles.noImg}>{noImage}</div>
@@ -3278,12 +3328,14 @@ const BoxModelSelectedModal = props =&gt; { @@ -3278,12 +3328,14 @@ const BoxModelSelectedModal = props =&gt; {
3278 const [boxTypeList, setBoxTypeList] = useState([]); 3328 const [boxTypeList, setBoxTypeList] = useState([]);
3279 const [boxData, setBoxData] = useState([]); 3329 const [boxData, setBoxData] = useState([]);
3280 const [treeClassName, setTreeClassName] = useState(""); 3330 const [treeClassName, setTreeClassName] = useState("");
3281 - const [boxTypeSelected, setBoxTypeSelected] = useState("全部");  
3282 const UniqueID = commonFunc.showLocalMessage(props, "UniqueID", "唯一ID"); 3331 const UniqueID = commonFunc.showLocalMessage(props, "UniqueID", "唯一ID");
3283 const sName = commonFunc.showLocalMessage(props, "jurCon", "名称"); 3332 const sName = commonFunc.showLocalMessage(props, "jurCon", "名称");
3284 const KnifeLineChart = commonFunc.showLocalMessage(props, "KnifeLineChart", "刀线图"); 3333 const KnifeLineChart = commonFunc.showLocalMessage(props, "KnifeLineChart", "刀线图");
3285 const ThreeDGraph = commonFunc.showLocalMessage(props, "3DGraph", "3D图"); 3334 const ThreeDGraph = commonFunc.showLocalMessage(props, "3DGraph", "3D图");
3286 const BtnOperations = commonFunc.showLocalMessage(props, "BtnOperations", "操作"); 3335 const BtnOperations = commonFunc.showLocalMessage(props, "BtnOperations", "操作");
  3336 + const allName = commonFunc.showLocalMessage(props, "btnAll", "全部");
  3337 + const otherName = commonFunc.showLocalMessage(props, "BtnOther", "其他");
  3338 + const [boxTypeSelected, setBoxTypeSelected] = useState(allName);
3287 3339
3288 useEffect(() => { 3340 useEffect(() => {
3289 const boxList = [ 3341 const boxList = [
@@ -3325,7 +3377,7 @@ const BoxModelSelectedModal = props =&gt; { @@ -3325,7 +3377,7 @@ const BoxModelSelectedModal = props =&gt; {
3325 }; 3377 };
3326 3378
3327 getSqlDropDownData({ sId: "17428091410008594700322758474000", sSqlCondition: { sProductClassifyId: selectedNode.sId } }, dropDownData => { 3379 getSqlDropDownData({ sId: "17428091410008594700322758474000", sSqlCondition: { sProductClassifyId: selectedNode.sId } }, dropDownData => {
3328 - const boxTypeList = Array.from(new Set(dropDownData.map(item => item.sBoxType || "其它"))); 3380 + const boxTypeList = Array.from(new Set(dropDownData.map(item => item.sBoxType || otherName)));
3329 setBoxTypeList(boxTypeList); 3381 setBoxTypeList(boxTypeList);
3330 setBoxData( 3382 setBoxData(
3331 dropDownData.map((item, index) => ({ 3383 dropDownData.map((item, index) => ({
@@ -3338,18 +3390,18 @@ const BoxModelSelectedModal = props =&gt; { @@ -3338,18 +3390,18 @@ const BoxModelSelectedModal = props =&gt; {
3338 3390
3339 const renderTreeNodes = useMemo( 3391 const renderTreeNodes = useMemo(
3340 () => 3392 () =>
3341 - ["全部", ...boxTypeList].map(boxType => ( 3393 + [allName, ...boxTypeList].map(boxType => (
3342 <Tree.TreeNode 3394 <Tree.TreeNode
3343 title={ 3395 title={
3344 <Badge 3396 <Badge
3345 - count={boxType === "全部" ? boxData.length : boxData.filter(item => (item.sBoxType || "其它") === boxType).length} 3397 + count={boxType === allName ? boxData.length : boxData.filter(item => (item.sBoxType || otherName) === boxType).length}
3346 offset={[20, 8]} 3398 offset={[20, 8]}
3347 color="#faad14" 3399 color="#faad14"
3348 > 3400 >
3349 <span>{boxType}</span> 3401 <span>{boxType}</span>
3350 </Badge> 3402 </Badge>
3351 } 3403 }
3352 - key={boxType === "全部" ? 0 : commonUtils.createSid()} 3404 + key={boxType === allName ? 0 : commonUtils.createSid()}
3353 treeData={boxType} 3405 treeData={boxType}
3354 switcherIcon={<FolderFilled style={{ color: "#f7cc4f", fontSize: 20 }} />} 3406 switcherIcon={<FolderFilled style={{ color: "#f7cc4f", fontSize: 20 }} />}
3355 ></Tree.TreeNode> 3407 ></Tree.TreeNode>
@@ -3418,17 +3470,17 @@ const BoxModelSelectedModal = props =&gt; { @@ -3418,17 +3470,17 @@ const BoxModelSelectedModal = props =&gt; {
3418 }; 3470 };
3419 return svgProps; 3471 return svgProps;
3420 }; 3472 };
3421 - const selectBoxList = boxData.filter(item => (boxTypeSelected === "全部" ? true : (item.sBoxType || "其它") === boxTypeSelected)); 3473 + const selectBoxList = boxData.filter(item => (boxTypeSelected === allName ? true : (item.sBoxType || otherName) === boxTypeSelected));
3422 const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片"); 3474 const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片");
3423 let btnSelectTitle = commonFunc.showLocalMessage(props, "BtnSelect", "选择"); 3475 let btnSelectTitle = commonFunc.showLocalMessage(props, "BtnSelect", "选择");
3424 const sLanguage = props.app?.userinfo?.sLanguage; 3476 const sLanguage = props.app?.userinfo?.sLanguage;
3425 - if (sLanguage === "sEnglish") {  
3426 - btnSelectTitle = "BtnSelect";  
3427 - } 3477 + // if (sLanguage === "sEnglish") {
  3478 + // btnSelectTitle = "BtnSelect";
  3479 + // }
3428 const tableProps = { 3480 const tableProps = {
3429 ...commonBusiness.getTableTypes("box", { 3481 ...commonBusiness.getTableTypes("box", {
3430 ...props, 3482 ...props,
3431 - boxData: boxData.filter(item => (boxTypeSelected === "全部" ? true : (item.sBoxType || "其它") === boxTypeSelected)), 3483 + boxData: boxData.filter(item => (boxTypeSelected === allName ? true : (item.sBoxType || otherName) === boxTypeSelected)),
3432 boxConfig, 3484 boxConfig,
3433 boxColumn, 3485 boxColumn,
3434 }), 3486 }),