Commit 898a742a33c02854cd1187c47469e235cb3ba961

Authored by zhangzzzz
1 parent bbb4b141

带入印刷、颜色、单双面默认值;

src/components/Common/commonFunc.js
... ... @@ -229,6 +229,13 @@ export function getDefaultData(config, allTableData = {}, extraData = {}) {
229 229 }
230 230 });
231 231 returnData[sName] = oldTableFieldName.substring(0, 1) === '&' ? sFormula.split('+').join('') : commonUtils.convertFixNum(eval(sFormula), 6);
  232 + } else if (sDefault.split(',').length > 1 && sDefault.split(':').length > 1) {
  233 + sDefault.split(',').forEach(item => {
  234 + const oldFieldName = item.split(':')[1];
  235 + const [tableName, oldTableFieldName] = oldFieldName.split('.');
  236 + const newFieldName = item.split(':')[0];
  237 + returnData[newFieldName] = allTableData[tableName][oldTableFieldName];
  238 + });
232 239 } else {
233 240 returnData[sName] = allTableData[tableName][oldTableFieldName];
234 241 }
... ...
src/components/QuickQuote/index.jsx
... ... @@ -2169,13 +2169,7 @@ const PrintParamsComponent = props => {
2169 2169 type="primary"
2170 2170 icon={<PlusOutlined />}
2171 2171 onClick={() => {
2172   - const defaultData = commonFunc.getDefaultData(
2173   - {
2174   - ...slaveConfig,
2175   - gdsconfigformslave: slaveConfig.gdsconfigformslave.filter(item => ["sPrint", "sColor", "iPrintModePo"].includes(item.sName)),
2176   - },
2177   - { tree: selectedNode }
2178   - );
  2172 + const defaultData = commonFunc.getDefaultData({ ...slaveConfig, gdsconfigformslave: printParamsConfig }, { tree: selectedNode });
2179 2173 sBackProcessData.push({
2180 2174 sId: commonUtils.createSid(),
2181 2175 bPrintParams: true,
... ...