- 层2{" "}
+ {doublePrompt[1].showName}
{
// 如果存在部件和盒舌 取最大的
const top = topOffect(boxList, boxLength, boxWidth, boxHeight, props);
const bottom = bottomOffect(boxList, boxLength, boxWidth, boxHeight, props);
- console.log("🚀 ~ initSVG ~ bottom:", top, bottom)
max = Number(top) + Number(bottom);
if (Number(svgType) === 8) {
const top = topOffect(boxList, headLength, headWidth, props);
@@ -239,7 +238,6 @@ const SvgBox = props => {
} else if (Number(svgType) === 5) {
viewBoxWidth = (boxHeight + boxWidth) * 2 + dYTBW + dZTBW + doubleTotal
viewBoxHeight = boxLength + max;
- console.log("🚀 ~ initSVG ~ viewBoxHeight:", viewBoxHeight, boxLength, max)
} else if (Number(svgType) === 6) {
viewBoxWidth = boxWidth + 2;
@@ -5180,6 +5178,9 @@ const SvgBox = props => {
});
svg.appendChild(g);
+ } else if (Number(svgType) === 9) {
+ // g.appendChild(createPathElement(rect.x, rect.y, rect.width, rect.height))
+ svg.appendChild(g);
}
};
// 计算头部偏移
@@ -5199,7 +5200,6 @@ const SvgBox = props => {
}
const svg = Number(box?.type);
- console.log("🚀 ~ topOffect ~ svg:", svg, showNew)
if (svg === 6) return 0;
const dZ = Number(zscw?.value) || 0;
diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js
index 1e4976c..a44a58c 100644
--- a/src/components/Common/CommonTable/index.js
+++ b/src/components/Common/CommonTable/index.js
@@ -4081,7 +4081,7 @@ class CommonTableRc extends React.Component {
if (commonUtils.isNotEmptyObject(record)) {
const sMemo = showConfig.sName;
const title = showConfig.showName;
- if (sName.includes('sTemplateFullMemo')) {
+ if (sName.includes(['sTemplateFullMemo','sContentMemo'])) {
return this.setState({ simpleModalVisible: true, simpleModalWord: record[sName] });
}
const sCurrMemoProps = {
diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx
index 5dc56be..8304a32 100644
--- a/src/components/QuickQuote/index.jsx
+++ b/src/components/QuickQuote/index.jsx
@@ -1527,6 +1527,8 @@ const TreeComponent = props => {
masterData: { ...props.masterData, sFormId: "101251240115016076506222050" },
});
}
+ console.log(selectedNode, 'selectedNode');
+
getDropDownData(props);
}, [selectedNode.sId, commonUtils.isEmptyObject(slaveConfig)]);
const { slaveData } = props.state;
@@ -1856,13 +1858,56 @@ const BoxComponent = props => {
if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") {
const { sBillNo } = slaveRowData;
if (sBillNo) return;
- let dropDownData = [];
- dropDownData.push(KapaiJson);
- const boxData = (dropDownData || []).map((item, index) => ({
- ...item,
- iOrder: index + 1,
- }));
- props.onDataChange("slaveUp" + boxModel, "sName", { sName: KapaiJson.sName }, KapaiJson.sId, boxData);
+ const getSqlDropDownData = async ({ sId, sSqlCondition = {} }, cb) => {
+ const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`;
+ const body = {
+ sKeyUpFilterName: "",
+ pageNum: 1,
+ pageSize: 1000,
+ sSqlCondition,
+ };
+ const retrunData = await commonServices.postValueService(props.app.token, body, url);
+ const dropDownData = retrunData.data?.dataset?.rows;
+ if (dropDownData) {
+ const box = dropDownData.find(box => box.sId === '17551384620004172929247856556500'); // Define 'box' here
+ const boxData = dropDownData.map((itemBox, indexBox) => ({
+ ...itemBox,
+ iOrder: indexBox + 1,
+ }));
+ if (box) { // Check if 'box' exists before using it
+ props.onDataChange("slaveUp" + boxModel, "sName", { sName: box.sName }, box.sId, boxData);
+ }
+ }
+ // if (dropDownData && sAllPartsNameDefaultList.length) {
+ // sAllPartsNameDefaultList.forEach((item, index) => {
+ // const sPartNameList = item.sPartName?.split(",");
+ // if (sPartNameList && sPartNameList.length) {
+ // sPartNameList.forEach(sPartName => {
+ // const box = dropDownData.find(box => box.sId === '17551384620004172929247856556500'); // Define 'box' here
+ // const boxData = dropDownData.map((itemBox, indexBox) => ({
+ // ...itemBox,
+ // iOrder: indexBox + 1,
+ // }));
+ // if (box) { // Check if 'box' exists before using it
+ // props.onDataChange("slaveUp" + sPartName, "sName", { sName: box.sName }, box.sId, boxData);
+ // }
+ // });
+ // }
+ // });
+ // }
+ };
+
+ getSqlDropDownData({
+ sId: '17428091410008594700322758474000',
+ sSqlCondition: { sProductClassifyId: selectedNode.sId },
+ });
+ // let dropDownData = [];
+ // dropDownData.push(KapaiJson);
+ // const boxData = (dropDownData || []).map((item, index) => ({
+ // ...item,
+ // iOrder: index + 1,
+ // }));
+ // props.onDataChange("slaveUp" + boxModel, "sName", { sName: KapaiJson.sName }, KapaiJson.sId, boxData);
}
}, [boxModel]);
@@ -1896,7 +1941,7 @@ const BoxComponent = props => {
sName: item.sName + key,
sDefault: item[key],
showName: item.showName + ['1长', '1宽', '2长', '2宽'][idx],
- sId:item.sId + idx
+ sId: item.sId + idx
}))
: [item] // 非 '09' 也要包一层数组,保持结构一致
)
@@ -1913,8 +1958,7 @@ const BoxComponent = props => {
tableName: `slaveUp${boxModel}`,
};
- console.log(upAbleConfigs,upAbleConfigsList,'upAbleConfigs');
-
+
const getUpViewPropsByITag = iTag => {
const config = slaveConfig.gdsconfigformslave
.filter(item => !["sPrint", "sColor", "iPrintModePo"].includes(item.sName))
@@ -1938,7 +1982,7 @@ const BoxComponent = props => {
return false;
} else {
if (item.sName === "iPage") {
- const rateList = commonUtils.convertStrToObj(slaveConfig.gdsconfigformslave.find(x => x.sName === "iRateType")?.showDropDown, []);
+ const rateList = JSON.parse(slaveConfig.gdsconfigformslave.find(x => x.sName === "iRateType")?.showDropDown) || [];
item.showName = rateList[Number(selectedNode.iRateType)] || "倍率";
}
}
@@ -1951,9 +1995,11 @@ const BoxComponent = props => {
}
if (item.sName === "dWlkd") {
if (selectedNode.sTypeKey === "juantong") {
- item.showName = "门幅";
+ const FabricWidth = commonFunc.showLocalMessage(props, "FabricWidth", "门幅");
+ item.showName = FabricWidth;
} else {
- item.showName = "材料宽";
+ const MaterialWidth = commonFunc.showLocalMessage(props, "MaterialWidth", "材料宽");
+ item.showName = MaterialWidth;
}
}
if (item.sName === "sPaperDirection" && selectedNode.sTypeKey === "huace") {
@@ -1988,12 +2034,15 @@ const BoxComponent = props => {
const UlToolPosition = commonFunc.showLocalMessage(props, "UlToolPosition", "上下刀位");
const RLToolPosition = commonFunc.showLocalMessage(props, "RLToolPosition", "左右刀位");
const LeftMargin = commonFunc.showLocalMessage(props, "LeftMargin", "左右留白");
+ const StayOnTheEdge = commonFunc.showLocalMessage(props, "StayOnTheEdge", "留边");
+ const Spacing = commonFunc.showLocalMessage(props, "Spacing", "间距");
+ const HopDistance = commonFunc.showLocalMessage(props, "HopDistance", "跳距");
boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
if (selectedNode.sTypeKey === "juantong") {
const mappings = {
- dZBLB: "留边",
- dXBJJ: "间距",
- dYBJJ: "跳距",
+ dZBLB: StayOnTheEdge,
+ dXBJJ: Spacing,
+ dYBJJ: HopDistance,
};
boxConfigList.forEach(item => {
@@ -2528,7 +2577,6 @@ const BoxComponent = props => {
dSvgBoxHeight: 200,
showNew: 1,
};
- console.log("🚀 ~ svgProps:", svgProps)
// upViewProps.viewRow =
@@ -2556,7 +2604,7 @@ const BoxComponent = props => {
{ src: getImageUrl(removeExtension(slaveRowData.sPackDetailPathUpLoad)), alt: "展开图" },
{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" },
];
- if (!slaveRowData.sPackDetailPathUpLoad) {
+ if (!slaveRowData.sPackDetailPathUpLoad) {
imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }];
} else if (!slaveRowData.sPackPath) {
imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }];
@@ -2689,9 +2737,11 @@ const BoxComponent = props => {
) : selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong" ? (
@@ -3278,12 +3328,14 @@ const BoxModelSelectedModal = props => {
const [boxTypeList, setBoxTypeList] = useState([]);
const [boxData, setBoxData] = useState([]);
const [treeClassName, setTreeClassName] = useState("");
- const [boxTypeSelected, setBoxTypeSelected] = useState("全部");
const UniqueID = commonFunc.showLocalMessage(props, "UniqueID", "唯一ID");
const sName = commonFunc.showLocalMessage(props, "jurCon", "名称");
const KnifeLineChart = commonFunc.showLocalMessage(props, "KnifeLineChart", "刀线图");
const ThreeDGraph = commonFunc.showLocalMessage(props, "3DGraph", "3D图");
const BtnOperations = commonFunc.showLocalMessage(props, "BtnOperations", "操作");
+ const allName = commonFunc.showLocalMessage(props, "btnAll", "全部");
+ const otherName = commonFunc.showLocalMessage(props, "BtnOther", "其他");
+ const [boxTypeSelected, setBoxTypeSelected] = useState(allName);
useEffect(() => {
const boxList = [
@@ -3325,7 +3377,7 @@ const BoxModelSelectedModal = props => {
};
getSqlDropDownData({ sId: "17428091410008594700322758474000", sSqlCondition: { sProductClassifyId: selectedNode.sId } }, dropDownData => {
- const boxTypeList = Array.from(new Set(dropDownData.map(item => item.sBoxType || "其它")));
+ const boxTypeList = Array.from(new Set(dropDownData.map(item => item.sBoxType || otherName)));
setBoxTypeList(boxTypeList);
setBoxData(
dropDownData.map((item, index) => ({
@@ -3338,18 +3390,18 @@ const BoxModelSelectedModal = props => {
const renderTreeNodes = useMemo(
() =>
- ["全部", ...boxTypeList].map(boxType => (
+ [allName, ...boxTypeList].map(boxType => (
@@ -3418,17 +3470,17 @@ const BoxModelSelectedModal = props => {
};
return svgProps;
};
- const selectBoxList = boxData.filter(item => (boxTypeSelected === "全部" ? true : (item.sBoxType || "其它") === boxTypeSelected));
+ const selectBoxList = boxData.filter(item => (boxTypeSelected === allName ? true : (item.sBoxType || otherName) === boxTypeSelected));
const noImage = commonFunc.showLocalMessage(props, "ImpositionInformation", "暂无图片");
let btnSelectTitle = commonFunc.showLocalMessage(props, "BtnSelect", "选择");
const sLanguage = props.app?.userinfo?.sLanguage;
- if (sLanguage === "sEnglish") {
- btnSelectTitle = "BtnSelect";
- }
+ // if (sLanguage === "sEnglish") {
+ // btnSelectTitle = "BtnSelect";
+ // }
const tableProps = {
...commonBusiness.getTableTypes("box", {
...props,
- boxData: boxData.filter(item => (boxTypeSelected === "全部" ? true : (item.sBoxType || "其它") === boxTypeSelected)),
+ boxData: boxData.filter(item => (boxTypeSelected === allName ? true : (item.sBoxType || otherName) === boxTypeSelected)),
boxConfig,
boxColumn,
}),
--
libgit2 0.22.2