Commit 38d7119d95e1a71df4ac743511f8dfe0541afa9a

Authored by 陈鑫涛
1 parent 943a860b

后道参数多个

src/mobile/quotation/detailNew.jsx
@@ -142,7 +142,6 @@ const QuickQuoteEvent = props => { @@ -142,7 +142,6 @@ const QuickQuoteEvent = props => {
142 }; 142 };
143 143
144 addState.onDataChange = (name, sFieldName, changeValue, sId, dropDownData, isWait) => { 144 addState.onDataChange = (name, sFieldName, changeValue, sId, dropDownData, isWait) => {
145 - const { mastersId } = props;  
146 const { masterData = {}, slaveData = [], selectedNode = {} } = state; 145 const { masterData = {}, slaveData = [], selectedNode = {} } = state;
147 const extraState = { 146 const extraState = {
148 calcPriceFinished: false, 147 calcPriceFinished: false,
@@ -237,16 +236,16 @@ const QuickQuoteEvent = props => { @@ -237,16 +236,16 @@ const QuickQuoteEvent = props => {
237 extraState.backendConfig = { sParentFieldsName: sFieldName, sBoxModel: boxModel }; 236 extraState.backendConfig = { sParentFieldsName: sFieldName, sBoxModel: boxModel };
238 const sBackendParams = sParamConfig 237 const sBackendParams = sParamConfig
239 .map((item, index) => { 238 .map((item, index) => {
240 - const { sParamDefault, sParam } = item; 239 + const { sParamDefault, sParam,iOrder} = item;
241 return !sParamDefault 240 return !sParamDefault
242 ? "" 241 ? ""
243 : { 242 : {
244 sId: commonUtils.createSid(), 243 sId: commonUtils.createSid(),
245 value: sParamDefault, 244 value: sParamDefault,
246 sParam: sParam, 245 sParam: sParam,
247 - [`sParams${index}`]: sParamDefault, 246 + [`sParams${iOrder}`]: sParamDefault,
248 sParamKey: `sParam${index}`, 247 sParamKey: `sParam${index}`,
249 - sParamKeyNew: sFieldName || `sParam${index}`, 248 + sParamKeyNew: sFieldName || `sParam${iOrder}`,
250 }; 249 };
251 }) 250 })
252 .filter(item => item !== ""); 251 .filter(item => item !== "");
@@ -263,7 +262,7 @@ const QuickQuoteEvent = props => { @@ -263,7 +262,7 @@ const QuickQuoteEvent = props => {
263 }); 262 });
264 } else { 263 } else {
265 const sBackProcessData = slaveData[iIndex].sBackProcessData || []; 264 const sBackProcessData = slaveData[iIndex].sBackProcessData || [];
266 - const iIndex1 = sBackProcessData.findIndex(item => item.value === dropDownData[0].value); 265 + const iIndex1 = sBackProcessData.findIndex(item => item[sFieldName]);
267 if (iIndex1 === -1) { 266 if (iIndex1 === -1) {
268 dropDownDataSelected !== undefined && sBackProcessData.push(dropDownDataSelected); 267 dropDownDataSelected !== undefined && sBackProcessData.push(dropDownDataSelected);
269 } else { 268 } else {
@@ -1125,6 +1124,7 @@ const QuotationAllprogressDetail = baseProps => { @@ -1125,6 +1124,7 @@ const QuotationAllprogressDetail = baseProps => {
1125 // 取上机尺寸 1124 // 取上机尺寸
1126 return commonUtils.convertStrToObj(sColumnNameConfigStr, []); 1125 return commonUtils.convertStrToObj(sColumnNameConfigStr, []);
1127 }; 1126 };
  1127 +
1128 return ( 1128 return (
1129 <div className={styles.quotationDetailBox}> 1129 <div className={styles.quotationDetailBox}>
1130 <QuotationDetail {...props} /> 1130 <QuotationDetail {...props} />
@@ -2010,7 +2010,6 @@ const BoxComponent = props =&gt; { @@ -2010,7 +2010,6 @@ const BoxComponent = props =&gt; {
2010 const onDataChange = (name, sFieldName, changeValue) => { 2010 const onDataChange = (name, sFieldName, changeValue) => {
2011 const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); 2011 const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId);
2012 const iIndex1 = slaveData[iIndex].sBackProcessData.findIndex(item => item[child.sName]); 2012 const iIndex1 = slaveData[iIndex].sBackProcessData.findIndex(item => item[child.sName]);
2013 -  
2014 slaveData[iIndex].sBackProcessData[iIndex1][sFieldName] = changeValue; 2013 slaveData[iIndex].sBackProcessData[iIndex1][sFieldName] = changeValue;
2015 const { dManualLength, dManualWidth } = slaveData[iIndex].sBackProcessData[iIndex1]; 2014 const { dManualLength, dManualWidth } = slaveData[iIndex].sBackProcessData[iIndex1];
2016 if (dManualLength !== undefined && dManualWidth !== undefined) { 2015 if (dManualLength !== undefined && dManualWidth !== undefined) {
@@ -2045,6 +2044,8 @@ const BoxComponent = props =&gt; { @@ -2045,6 +2044,8 @@ const BoxComponent = props =&gt; {
2045 })); 2044 }));
2046 2045
2047 const onCostomClick = showConfig => { 2046 const onCostomClick = showConfig => {
  2047 + console.log(showConfig,sBackProcessData,'showConfig');
  2048 +
2048 props.setState(pre => ({ 2049 props.setState(pre => ({
2049 ...pre, 2050 ...pre,
2050 backendParamsConfig: commonUtils.convertStrToObj(sBackProcessData.find(item => item[showConfig.sName0 || showConfig.sName])?.sParamConfig, []), 2051 backendParamsConfig: commonUtils.convertStrToObj(sBackProcessData.find(item => item[showConfig.sName0 || showConfig.sName])?.sParamConfig, []),