diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 4f84db0..1ffde5a 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -915,6 +915,7 @@ const QuickQuoteEvent = props => { processPrintDataRow.sPartsName = partsDataRow.sPartsName; processPrintDataRow.dProcessInQty = partInfo.dProcessInQty; processPrintDataRow.dLossQty = partInfo.dLossQty; + processPrintDataRow.dAdjustLossQty = partInfo.dAdjustLossQty; processPrintDataRow.dProcessOutQty = partInfo.dProcessOutQty; processPrintDataRow.sId = commonUtils.createSid(); processPrintDataRow.sParentId = masterData.sId; @@ -1305,6 +1306,7 @@ const TreeComponent = props => { return { ...pre, ...addState, + sPrintConfig: downAbleConfigs.find(item => item.sType === "1" && item.sName === "胶印"), downAbleConfigs: downAbleConfigs .filter(item => item.sType === "2") .map((item, index) => ({ @@ -2402,14 +2404,19 @@ const PrintParamsComponent = props => { const printParamsItem = printParams[i - 1]; const viewRow = { ...(i === 0 ? slaveRowData : printParamsItem), sProductClassifyId: selectedNode.sId }; + const viewTableId = "viewTableId_" + viewRow.sId; const viewProps = { ...props, - viewConfigs: printParamsConfig, + viewConfigs: printParamsConfig.map(item => ({ ...item, costomStyle: `xlyPrintParams${i}` })), tableConfig: { ...slaveConfig, gdsconfigformslave: printParamsConfig }, iColValueView: 24, viewRow, tableName: `${i === 0 ? "slaveUp" : "slaveDown"}${boxModel}`, onDataChange: (...args) => { + setTimeout(() => { + const oLabel = document.querySelector(`#${viewTableId}`)?.querySelector(`.xlyPrintParams${i}`)?.querySelector(".ant-form-item-label"); + oLabel?.click(); + }, 200); if (i === 0) { props.onDataChange(...args); return; @@ -2422,11 +2429,37 @@ const PrintParamsComponent = props => { return { ...pre, slaveData }; }); }, + onCostomClick: (showConfig, { target }) => { + if (showConfig.sName !== "sPrint") return; + const className = target.getAttribute("class"); + const nodeName = target.nodeName; + if (className?.includes("select") && nodeName === "DIV") return; + + const { sPrintConfig } = state; + + if (!sPrintConfig) return; + const backendConfigNew = { + sParentFieldsName: "sPrint", + sBoxModel: boxModel, + printParamsId: viewRow.sId, + }; + + const dropDownData = commonUtils.convertStrToObj(sPrintConfig.sChineseDropDown, []); + const dropDownDataSelected = dropDownData.find(item => item.sId === viewRow.sProcessId); + if (!dropDownDataSelected) return; + const backendParamsConfigNew = commonUtils.convertStrToObj(dropDownDataSelected.sParamConfig, []); + + props.setState(pre => ({ + ...pre, + backendParamsConfig: backendParamsConfigNew, + backendConfig: backendConfigNew, + })); + }, }; result.push(