Commit e1f1415b3c7cba7181e20fd2bfcff70db3ce2486
1 parent
0582a5b6
盒型
Showing
4 changed files
with
105 additions
and
64 deletions
src/components/Common/BoxDesignCompontent/index.js
| ... | ... | @@ -127,7 +127,7 @@ const BoxDesignCompontent = baseProps => { |
| 127 | 127 | value: "", |
| 128 | 128 | })) |
| 129 | 129 | setTableColum(newTableColum); |
| 130 | - }, [tableData.length]); | |
| 130 | + }, [tableData]); | |
| 131 | 131 | |
| 132 | 132 | // 2️⃣ 只负责 boxBodyList 盒身 |
| 133 | 133 | useEffect(() => { |
| ... | ... | @@ -142,22 +142,14 @@ const BoxDesignCompontent = baseProps => { |
| 142 | 142 | value: '', |
| 143 | 143 | })) |
| 144 | 144 | setBoxBodyList(bodyList); |
| 145 | - }, [tableData.length]); | |
| 145 | + }, [tableData]); | |
| 146 | 146 | |
| 147 | 147 | // 3️⃣ 只负责 tableDataList 和 tableDataLists |
| 148 | 148 | |
| 149 | 149 | useEffect(() => { |
| 150 | 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 | 153 | const newList = tableData |
| 162 | 154 | .filter(item => item.bVisible).filter(item => item.iTag === 30) |
| 163 | 155 | .map(item => ({ |
| ... | ... | @@ -166,21 +158,20 @@ const BoxDesignCompontent = baseProps => { |
| 166 | 158 | isSelect: false, |
| 167 | 159 | selectImage: null, |
| 168 | 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 | 164 | return { ...item, sName }; |
| 173 | 165 | }); |
| 174 | 166 | setTableDataList(newList); |
| 175 | 167 | setTableDataLists(newList); |
| 176 | 168 | const shape = tableData.find(x => x.iTag === 70)?.showDropDown |
| 177 | - if (!shape) return | |
| 178 | 169 | const JsonShape = JSON.parse(shape) |
| 179 | 170 | const shapeLists = Array.from(Object.values(JsonShape)) |
| 180 | 171 | setShapeList(shapeLists) |
| 181 | 172 | const prompt = tableData.filter(x => x.iTag === 80) |
| 182 | 173 | setDoublePrompt(prompt) |
| 183 | - }, [tableData.length]); | |
| 174 | + }, [tableData]); | |
| 184 | 175 | |
| 185 | 176 | // 获取itag为40的数据 |
| 186 | 177 | const upViewPropsAll = Array.isArray(tableData) |
| ... | ... | @@ -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 | 347 | const headLength = slaveData.find(item => item.sCode === "dSHC")?.iValue; |
| 357 | 348 | const headWidth = slaveData.find(item => item.sCode === "dSHK")?.iValue; |
| 358 | 349 | const orderLength = slaveData.find(item => item.sCode === "dCHC")?.iValue; |
| 359 | 350 | const orderWidth = slaveData.find(item => item.sCode === "dCHK")?.iValue; |
| 360 | 351 | newBoxList.forEach((item, index) => { |
| 361 | - if (item.sName?.trim() === "盒身" || item.sName?.trim() === "Box Body") { | |
| 352 | + if (item.sName?.trim() === boxBodyList[0].showName) { | |
| 362 | 353 | newBoxList[index].value = masterData.sBoxBody; |
| 363 | 354 | newBoxList[index].selectImage = masterData.sMakeUpPath; |
| 364 | 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 | 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 | 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 | 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 | 363 | newBoxList[index].value = masterData.sName; |
| 373 | 364 | } else if (item.sName === "首盒长") { |
| 374 | 365 | newBoxList[index].value = headLength; |
| ... | ... | @@ -681,9 +672,7 @@ const BoxDesignCompontent = baseProps => { |
| 681 | 672 | const boxType = boxList.find(item => item.sName === boxBodyList[0]?.showName)?.type; |
| 682 | 673 | if (boxType === "8") { |
| 683 | 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 | 676 | const zxcw = boxList.find(x => x.sName === "左(下)插位组件"); |
| 688 | 677 | const zscw = boxList.find(x => x.sName === "左(上)插位组件"); |
| 689 | 678 | const yscw = boxList.find(x => x.sName === "右(上)插位组件"); |
| ... | ... | @@ -1332,7 +1321,7 @@ const BoxDesignCompontent = baseProps => { |
| 1332 | 1321 | <div> |
| 1333 | 1322 | <div className={styles.boxInput}> |
| 1334 | 1323 | <div className={styles.text} style={{ width: 61 }}> |
| 1335 | - 层1{" "} | |
| 1324 | + {doublePrompt[0].showName} | |
| 1336 | 1325 | </div> |
| 1337 | 1326 | <Input |
| 1338 | 1327 | value={item?.sLength} |
| ... | ... | @@ -1390,7 +1379,7 @@ const BoxDesignCompontent = baseProps => { |
| 1390 | 1379 | </div> |
| 1391 | 1380 | <div className={styles.boxInput}> |
| 1392 | 1381 | <div className={styles.text} style={{ width: 61 }}> |
| 1393 | - 层2{" "} | |
| 1382 | + {doublePrompt[1].showName} | |
| 1394 | 1383 | </div> |
| 1395 | 1384 | <Input |
| 1396 | 1385 | value={item?.cLength} |
| ... | ... | @@ -1575,7 +1564,7 @@ const BoxDesignCompontent = baseProps => { |
| 1575 | 1564 | <div> |
| 1576 | 1565 | <div className={styles.boxInput}> |
| 1577 | 1566 | <div className={styles.text} style={{ width: 61 }}> |
| 1578 | - 层1{" "} | |
| 1567 | + {doublePrompt[0].showName} | |
| 1579 | 1568 | </div> |
| 1580 | 1569 | <Input |
| 1581 | 1570 | value={item?.sLength} |
| ... | ... | @@ -1633,7 +1622,7 @@ const BoxDesignCompontent = baseProps => { |
| 1633 | 1622 | </div> |
| 1634 | 1623 | <div className={styles.boxInput}> |
| 1635 | 1624 | <div className={styles.text} style={{ width: 61 }}> |
| 1636 | - 层2{" "} | |
| 1625 | + {doublePrompt[1].showName} | |
| 1637 | 1626 | </div> |
| 1638 | 1627 | <Input |
| 1639 | 1628 | value={item?.cLength} | ... | ... |
src/components/Common/BoxDesignCompontent/svg.js
| ... | ... | @@ -149,7 +149,6 @@ const SvgBox = props => { |
| 149 | 149 | // 如果存在部件和盒舌 取最大的 |
| 150 | 150 | const top = topOffect(boxList, boxLength, boxWidth, boxHeight, props); |
| 151 | 151 | const bottom = bottomOffect(boxList, boxLength, boxWidth, boxHeight, props); |
| 152 | - console.log("🚀 ~ initSVG ~ bottom:", top, bottom) | |
| 153 | 152 | max = Number(top) + Number(bottom); |
| 154 | 153 | if (Number(svgType) === 8) { |
| 155 | 154 | const top = topOffect(boxList, headLength, headWidth, props); |
| ... | ... | @@ -239,7 +238,6 @@ const SvgBox = props => { |
| 239 | 238 | } else if (Number(svgType) === 5) { |
| 240 | 239 | viewBoxWidth = (boxHeight + boxWidth) * 2 + dYTBW + dZTBW + doubleTotal |
| 241 | 240 | viewBoxHeight = boxLength + max; |
| 242 | - console.log("🚀 ~ initSVG ~ viewBoxHeight:", viewBoxHeight, boxLength, max) | |
| 243 | 241 | |
| 244 | 242 | } else if (Number(svgType) === 6) { |
| 245 | 243 | viewBoxWidth = boxWidth + 2; |
| ... | ... | @@ -5180,6 +5178,9 @@ const SvgBox = props => { |
| 5180 | 5178 | }); |
| 5181 | 5179 | |
| 5182 | 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 => { |
| 5199 | 5200 | |
| 5200 | 5201 | } |
| 5201 | 5202 | const svg = Number(box?.type); |
| 5202 | - console.log("🚀 ~ topOffect ~ svg:", svg, showNew) | |
| 5203 | 5203 | if (svg === 6) return 0; |
| 5204 | 5204 | |
| 5205 | 5205 | const dZ = Number(zscw?.value) || 0; | ... | ... |
src/components/Common/CommonTable/index.js
| ... | ... | @@ -4081,7 +4081,7 @@ class CommonTableRc extends React.Component { |
| 4081 | 4081 | if (commonUtils.isNotEmptyObject(record)) { |
| 4082 | 4082 | const sMemo = showConfig.sName; |
| 4083 | 4083 | const title = showConfig.showName; |
| 4084 | - if (sName.includes('sTemplateFullMemo')) { | |
| 4084 | + if (sName.includes(['sTemplateFullMemo','sContentMemo'])) { | |
| 4085 | 4085 | return this.setState({ simpleModalVisible: true, simpleModalWord: record[sName] }); |
| 4086 | 4086 | } |
| 4087 | 4087 | const sCurrMemoProps = { | ... | ... |
src/components/QuickQuote/index.jsx
| ... | ... | @@ -1527,6 +1527,8 @@ const TreeComponent = props => { |
| 1527 | 1527 | masterData: { ...props.masterData, sFormId: "101251240115016076506222050" }, |
| 1528 | 1528 | }); |
| 1529 | 1529 | } |
| 1530 | + console.log(selectedNode, 'selectedNode'); | |
| 1531 | + | |
| 1530 | 1532 | getDropDownData(props); |
| 1531 | 1533 | }, [selectedNode.sId, commonUtils.isEmptyObject(slaveConfig)]); |
| 1532 | 1534 | const { slaveData } = props.state; |
| ... | ... | @@ -1856,13 +1858,56 @@ const BoxComponent = props => { |
| 1856 | 1858 | if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") { |
| 1857 | 1859 | const { sBillNo } = slaveRowData; |
| 1858 | 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 | 1912 | }, [boxModel]); |
| 1868 | 1913 | |
| ... | ... | @@ -1896,7 +1941,7 @@ const BoxComponent = props => { |
| 1896 | 1941 | sName: item.sName + key, |
| 1897 | 1942 | sDefault: item[key], |
| 1898 | 1943 | showName: item.showName + ['1长', '1宽', '2长', '2宽'][idx], |
| 1899 | - sId:item.sId + idx | |
| 1944 | + sId: item.sId + idx | |
| 1900 | 1945 | })) |
| 1901 | 1946 | : [item] // 非 '09' 也要包一层数组,保持结构一致 |
| 1902 | 1947 | ) |
| ... | ... | @@ -1913,8 +1958,7 @@ const BoxComponent = props => { |
| 1913 | 1958 | tableName: `slaveUp${boxModel}`, |
| 1914 | 1959 | }; |
| 1915 | 1960 | |
| 1916 | - console.log(upAbleConfigs,upAbleConfigsList,'upAbleConfigs'); | |
| 1917 | - | |
| 1961 | + | |
| 1918 | 1962 | const getUpViewPropsByITag = iTag => { |
| 1919 | 1963 | const config = slaveConfig.gdsconfigformslave |
| 1920 | 1964 | .filter(item => !["sPrint", "sColor", "iPrintModePo"].includes(item.sName)) |
| ... | ... | @@ -1938,7 +1982,7 @@ const BoxComponent = props => { |
| 1938 | 1982 | return false; |
| 1939 | 1983 | } else { |
| 1940 | 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 | 1986 | item.showName = rateList[Number(selectedNode.iRateType)] || "倍率"; |
| 1943 | 1987 | } |
| 1944 | 1988 | } |
| ... | ... | @@ -1951,9 +1995,11 @@ const BoxComponent = props => { |
| 1951 | 1995 | } |
| 1952 | 1996 | if (item.sName === "dWlkd") { |
| 1953 | 1997 | if (selectedNode.sTypeKey === "juantong") { |
| 1954 | - item.showName = "门幅"; | |
| 1998 | + const FabricWidth = commonFunc.showLocalMessage(props, "FabricWidth", "门幅"); | |
| 1999 | + item.showName = FabricWidth; | |
| 1955 | 2000 | } else { |
| 1956 | - item.showName = "材料宽"; | |
| 2001 | + const MaterialWidth = commonFunc.showLocalMessage(props, "MaterialWidth", "材料宽"); | |
| 2002 | + item.showName = MaterialWidth; | |
| 1957 | 2003 | } |
| 1958 | 2004 | } |
| 1959 | 2005 | if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") { |
| ... | ... | @@ -1988,12 +2034,15 @@ const BoxComponent = props => { |
| 1988 | 2034 | const UlToolPosition = commonFunc.showLocalMessage(props, "UlToolPosition", "上下刀位"); |
| 1989 | 2035 | const RLToolPosition = commonFunc.showLocalMessage(props, "RLToolPosition", "左右刀位"); |
| 1990 | 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 | 2040 | boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; |
| 1992 | 2041 | if (selectedNode.sTypeKey === "juantong") { |
| 1993 | 2042 | const mappings = { |
| 1994 | - dZBLB: "留边", | |
| 1995 | - dXBJJ: "间距", | |
| 1996 | - dYBJJ: "跳距", | |
| 2043 | + dZBLB: StayOnTheEdge, | |
| 2044 | + dXBJJ: Spacing, | |
| 2045 | + dYBJJ: HopDistance, | |
| 1997 | 2046 | }; |
| 1998 | 2047 | |
| 1999 | 2048 | boxConfigList.forEach(item => { |
| ... | ... | @@ -2528,7 +2577,6 @@ const BoxComponent = props => { |
| 2528 | 2577 | dSvgBoxHeight: 200, |
| 2529 | 2578 | showNew: 1, |
| 2530 | 2579 | }; |
| 2531 | - console.log("🚀 ~ svgProps:", svgProps) | |
| 2532 | 2580 | |
| 2533 | 2581 | // upViewProps.viewRow = |
| 2534 | 2582 | |
| ... | ... | @@ -2556,7 +2604,7 @@ const BoxComponent = props => { |
| 2556 | 2604 | { src: getImageUrl(removeExtension(slaveRowData.sPackDetailPathUpLoad)), alt: "展开图" }, |
| 2557 | 2605 | { src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }, |
| 2558 | 2606 | ]; |
| 2559 | - if (!slaveRowData.sPackDetailPathUpLoad) { | |
| 2607 | + if (!slaveRowData.sPackDetailPathUpLoad) { | |
| 2560 | 2608 | imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }]; |
| 2561 | 2609 | } else if (!slaveRowData.sPackPath) { |
| 2562 | 2610 | imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }]; |
| ... | ... | @@ -2689,9 +2737,11 @@ const BoxComponent = props => { |
| 2689 | 2737 | </div> |
| 2690 | 2738 | ) : selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong" ? ( |
| 2691 | 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 | 2745 | </Carousel> |
| 2696 | 2746 | ) : ( |
| 2697 | 2747 | <div className={styles.noImg}>{noImage}</div> |
| ... | ... | @@ -3278,12 +3328,14 @@ const BoxModelSelectedModal = props => { |
| 3278 | 3328 | const [boxTypeList, setBoxTypeList] = useState([]); |
| 3279 | 3329 | const [boxData, setBoxData] = useState([]); |
| 3280 | 3330 | const [treeClassName, setTreeClassName] = useState(""); |
| 3281 | - const [boxTypeSelected, setBoxTypeSelected] = useState("全部"); | |
| 3282 | 3331 | const UniqueID = commonFunc.showLocalMessage(props, "UniqueID", "唯一ID"); |
| 3283 | 3332 | const sName = commonFunc.showLocalMessage(props, "jurCon", "名称"); |
| 3284 | 3333 | const KnifeLineChart = commonFunc.showLocalMessage(props, "KnifeLineChart", "刀线图"); |
| 3285 | 3334 | const ThreeDGraph = commonFunc.showLocalMessage(props, "3DGraph", "3D图"); |
| 3286 | 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 | 3340 | useEffect(() => { |
| 3289 | 3341 | const boxList = [ |
| ... | ... | @@ -3325,7 +3377,7 @@ const BoxModelSelectedModal = props => { |
| 3325 | 3377 | }; |
| 3326 | 3378 | |
| 3327 | 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 | 3381 | setBoxTypeList(boxTypeList); |
| 3330 | 3382 | setBoxData( |
| 3331 | 3383 | dropDownData.map((item, index) => ({ |
| ... | ... | @@ -3338,18 +3390,18 @@ const BoxModelSelectedModal = props => { |
| 3338 | 3390 | |
| 3339 | 3391 | const renderTreeNodes = useMemo( |
| 3340 | 3392 | () => |
| 3341 | - ["全部", ...boxTypeList].map(boxType => ( | |
| 3393 | + [allName, ...boxTypeList].map(boxType => ( | |
| 3342 | 3394 | <Tree.TreeNode |
| 3343 | 3395 | title={ |
| 3344 | 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 | 3398 | offset={[20, 8]} |
| 3347 | 3399 | color="#faad14" |
| 3348 | 3400 | > |
| 3349 | 3401 | <span>{boxType}</span> |
| 3350 | 3402 | </Badge> |
| 3351 | 3403 | } |
| 3352 | - key={boxType === "全部" ? 0 : commonUtils.createSid()} | |
| 3404 | + key={boxType === allName ? 0 : commonUtils.createSid()} | |
| 3353 | 3405 | treeData={boxType} |
| 3354 | 3406 | switcherIcon={<FolderFilled style={{ color: "#f7cc4f", fontSize: 20 }} />} |
| 3355 | 3407 | ></Tree.TreeNode> |
| ... | ... | @@ -3418,17 +3470,17 @@ const BoxModelSelectedModal = props => { |
| 3418 | 3470 | }; |
| 3419 | 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 | 3474 | const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片"); |
| 3423 | 3475 | let btnSelectTitle = commonFunc.showLocalMessage(props, "BtnSelect", "选择"); |
| 3424 | 3476 | const sLanguage = props.app?.userinfo?.sLanguage; |
| 3425 | - if (sLanguage === "sEnglish") { | |
| 3426 | - btnSelectTitle = "BtnSelect"; | |
| 3427 | - } | |
| 3477 | + // if (sLanguage === "sEnglish") { | |
| 3478 | + // btnSelectTitle = "BtnSelect"; | |
| 3479 | + // } | |
| 3428 | 3480 | const tableProps = { |
| 3429 | 3481 | ...commonBusiness.getTableTypes("box", { |
| 3430 | 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 | 3484 | boxConfig, |
| 3433 | 3485 | boxColumn, |
| 3434 | 3486 | }), | ... | ... |