Commit c7f67a8d6f4fb7cc4ca8da6dd6da338082b81a9f

Authored by 陈鑫涛
1 parent 263e4723

修复新报价盒型没有留白的数据问题

src/components/QuickQuote/index.jsx
@@ -1171,6 +1171,16 @@ const QuickQuoteEvent = props => { @@ -1171,6 +1171,16 @@ const QuickQuoteEvent = props => {
1171 // 新报价 1171 // 新报价
1172 addState.onAdd = () => { 1172 addState.onAdd = () => {
1173 const restList = ["formData", "manyColumn", "manyConfig", "masterConfig", "slaveConfig", "slaveColumn", "treeData"]; 1173 const restList = ["formData", "manyColumn", "manyConfig", "masterConfig", "slaveConfig", "slaveColumn", "treeData"];
  1174 + const sBoxActiveId = formData.find(item => item.sGrd === "slave")?.gdsconfigformslave?.find(item => item.sName === "sName")?.sActiveId;
  1175 + if (!sBoxActiveId) return;
  1176 + const { token } = props;
  1177 + const configUrl = `${commonConfig.server_host}business/getModelBysId/${sBoxActiveId}?sModelsId=${sBoxActiveId}`;
  1178 + commonServices.getService(token, configUrl).then(({ data: configReturn }) => {
  1179 + if (configReturn.code === 1) {
  1180 + const formData = configReturn.dataset.rows[0].formData;
  1181 + setState(pre => ({ ...pre, boxConfig: formData[0] }));
  1182 + }
  1183 + });
1174 const stateNew = { 1184 const stateNew = {
1175 ...restList.reduce((pre, cur) => { 1185 ...restList.reduce((pre, cur) => {
1176 pre[cur] = state[cur]; 1186 pre[cur] = state[cur];
@@ -2263,9 +2273,9 @@ const BoxComponent = props => { @@ -2263,9 +2273,9 @@ const BoxComponent = props => {
2263 { src: slaveRowData.sPackPath, alt: "立体图" }, 2273 { src: slaveRowData.sPackPath, alt: "立体图" },
2264 ]; 2274 ];
2265 if (!slaveRowData.sPackDetailPathUpLoad) { 2275 if (!slaveRowData.sPackDetailPathUpLoad) {
2266 - imagesData = [{ src: slaveRowData.sPackPath, alt: "立体图" }] 2276 + imagesData = [{ src: slaveRowData.sPackPath, alt: "立体图" }];
2267 } else if (!slaveRowData.sPackPath) { 2277 } else if (!slaveRowData.sPackPath) {
2268 - imagesData = [{ src: slaveRowData.sPackPath, alt: "立体图" }] 2278 + imagesData = [{ src: slaveRowData.sPackPath, alt: "立体图" }];
2269 } 2279 }
2270 const { activeKey = 0 } = state; 2280 const { activeKey = 0 } = state;
2271 useEffect(() => { 2281 useEffect(() => {