From 898a742a33c02854cd1187c47469e235cb3ba961 Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Thu, 26 Jun 2025 16:21:28 +0800 Subject: [PATCH] 带入印刷、颜色、单双面默认值; --- src/components/Common/commonFunc.js | 7 +++++++ src/components/QuickQuote/index.jsx | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/Common/commonFunc.js b/src/components/Common/commonFunc.js index d48be0c..3e83f27 100644 --- a/src/components/Common/commonFunc.js +++ b/src/components/Common/commonFunc.js @@ -229,6 +229,13 @@ export function getDefaultData(config, allTableData = {}, extraData = {}) { } }); returnData[sName] = oldTableFieldName.substring(0, 1) === '&' ? sFormula.split('+').join('') : commonUtils.convertFixNum(eval(sFormula), 6); + } else if (sDefault.split(',').length > 1 && sDefault.split(':').length > 1) { + sDefault.split(',').forEach(item => { + const oldFieldName = item.split(':')[1]; + const [tableName, oldTableFieldName] = oldFieldName.split('.'); + const newFieldName = item.split(':')[0]; + returnData[newFieldName] = allTableData[tableName][oldTableFieldName]; + }); } else { returnData[sName] = allTableData[tableName][oldTableFieldName]; } diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index eebfb8c..6dce809 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -2169,13 +2169,7 @@ const PrintParamsComponent = props => { type="primary" icon={} onClick={() => { - const defaultData = commonFunc.getDefaultData( - { - ...slaveConfig, - gdsconfigformslave: slaveConfig.gdsconfigformslave.filter(item => ["sPrint", "sColor", "iPrintModePo"].includes(item.sName)), - }, - { tree: selectedNode } - ); + const defaultData = commonFunc.getDefaultData({ ...slaveConfig, gdsconfigformslave: printParamsConfig }, { tree: selectedNode }); sBackProcessData.push({ sId: commonUtils.createSid(), bPrintParams: true, -- libgit2 0.22.2