From c66b7f63b9ab51b5d43073204c772fbaaf7fb512 Mon Sep 17 00:00:00 2001 From: zhangzhen <525765282@qq.com> Date: Mon, 14 Jul 2025 17:33:57 +0800 Subject: [PATCH] 新增后道参数必填样式及保存校验; --- src/components/QuickQuote/index.jsx | 31 ++++++++++++++++++++++++++++++- src/components/QuickQuote/index.less | 25 +++++++++++++++++-------- 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index bb77da2..da3f0cf 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -702,7 +702,17 @@ const QuickQuoteEvent = props => { await new Promise(resolve => setTimeout(resolve, 2000)); } - const { masterConfig, masterData = {}, slaveConfig, slaveData = [], selectedNode = {}, extraParts = {} } = state; + const { + masterConfig, + masterData = {}, + slaveConfig, + slaveData = [], + selectedNode = {}, + extraParts = {}, + downAbleConfigs = [], + downAbleExtraConfigs = [], + finishedConfigs = [], + } = state; const selectProduct = commonFunc.showLocalMessage(props, "selectProduct", "请先选择产品"); if (commonUtils.isEmptyObject(selectedNode)) { message.error(selectProduct, 2); @@ -732,6 +742,7 @@ const QuickQuoteEvent = props => { .filter(item => (bBox ? true : item.sName !== "sName")); const sMaterialsNameConfig = slaveConfig.gdsconfigformslave.find(item => item.sName === "sMaterialsName"); + const downAbleConfigMust = [...downAbleConfigs, ...downAbleExtraConfigs].filter(item => item.bNotEmpty); const errorList = []; const partsList = []; @@ -740,6 +751,12 @@ const QuickQuoteEvent = props => { if (!slaveRowData.materialsInfo || slaveRowData.materialsInfo.some(item => !item.sMaterialsName)) { list.push(sMaterialsNameConfig); } + const { sBackProcessData = [] } = slaveRowData; + downAbleConfigMust.forEach(item => { + if (!sBackProcessData.some(x => x.sProductClassifyId === item.sId)) { + list.push(item); + } + }); errorList.push(list); partsList.push(slaveRowData.sBoxModel); }); @@ -755,6 +772,18 @@ const QuickQuoteEvent = props => { ); } + const finishedConfigMust = finishedConfigs.filter(item => item.bNotEmpty); + const { productProcessInfo = [] } = masterData; + + const checkResult1 = finishedConfigMust.filter(item => !productProcessInfo.some(x => x.sProductClassifyId === item.sId)); + if (checkResult1.length) { + errMsgList.push( + checkResult1.map(item => 【{item.showName}】), + {getI18nName("isNotNull")}, +
+ ); + } + if (errMsgList.length) { message.error(errMsgList, 3); return; diff --git a/src/components/QuickQuote/index.less b/src/components/QuickQuote/index.less index f5f8229..dc2dc54 100644 --- a/src/components/QuickQuote/index.less +++ b/src/components/QuickQuote/index.less @@ -100,7 +100,7 @@ .ant-form-item-control { flex: 1; - max-width: calc(100% - 70px); + max-width: calc(100% - 70px) !important; } .viewStyle { @@ -131,6 +131,14 @@ max-width: calc(100% - 95px); } } + + .ant-form-item-required { + &::before { + content: '' !important; + } + + color: #ff4d4f !important; + } } .subViewTable { @@ -546,13 +554,14 @@ .ant-form-item-label { label { &::before { - content: ""; - display: block; - width: 5px; - height: 5px; - border-radius: 50%; - background-color: #ff4d4f; - margin-right: 2px; + content: "" !important; + display: block !important; + width: 5px !important; + min-width: 5px; + height: 5px !important; + border-radius: 50% !important; + background-color: #ff4d4f !important; + margin-right: 2px !important; } } } -- libgit2 0.22.2