Commit f8cccd8390173e5cb5059beecb893ff9837cc374

Authored by 陈鑫涛
2 parents 15f9d34e 9c88cf55

Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main

# Conflicts:
#	src/components/QuickQuote/index.jsx
src/components/QuickQuote/index.jsx
... ... @@ -253,6 +253,15 @@ const QuickQuoteEvent = props => {
253 253  
254 254 const { selectedNode = {}, slaveConfig } = state;
255 255 const { showName: sTreeNodeName } = selectedNode;
  256 +
  257 + if (sFieldName === "dSumPQty" && (sTreeNodeName.includes("骑马") || sTreeNodeName.includes("锁线"))) {
  258 + if (!changeValue.dSumPQty || changeValue.dSumPQty % 4 !== 0) {
  259 + message.info("P数要为4的倍数!");
  260 + changeValue.dSumPQty = 4;
  261 + extraState.slaveUpKey = `key_${commonUtils.createSid()}`;
  262 + }
  263 + }
  264 +
256 265 const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel);
257 266 if (name.includes("slaveDown")) {
258 267 const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue[sFieldName]);
... ... @@ -1188,7 +1197,14 @@ const TreeComponent = props => {
1188 1197 }
1189 1198  
1190 1199 if (timeRef.current > 1) {
1191   - addState.slaveData = slaveDataNew;
  1200 + addState.slaveData = slaveDataNew.map(item => {
  1201 + const { sPackDetailPathUpLoad, sPackPath } = selectedNode;
  1202 + return {
  1203 + ...item,
  1204 + ...(sPackDetailPathUpLoad ? { sPackDetailPathUpLoad } : {}),
  1205 + ...(sPackPath ? { sPackPath } : {}),
  1206 + };
  1207 + });
1192 1208 addState.extraParts = {};
1193 1209 addState.calcPriceFinished = false;
1194 1210 if (manyData.some(item => Object.keys(item).length > 4)) {
... ... @@ -1516,12 +1532,6 @@ const BoxComponent = props => {
1516 1532 viewRow: slaveRowData,
1517 1533 tableName: `slaveUp${boxModel}`,
1518 1534 };
1519   - console.log(
1520   - slaveConfig.gdsconfigformslave.filter(item => {
1521   - return item.iTag === 12;
1522   - }),
1523   - "slaveConfig.gdsconfigformslave"
1524   - );
1525 1535  
1526 1536 const getUpViewPropsByITag = iTag => {
1527 1537 const config = slaveConfig.gdsconfigformslave
... ... @@ -1567,7 +1577,7 @@ const BoxComponent = props => {
1567 1577 }
1568 1578 if (selectedNode.sTypeKey !== "juantong" && item.sName === "sPaperDirection") {
1569 1579 return false;
1570   - }
  1580 + }
1571 1581 return item.iTag === iTag;
1572 1582 });
1573 1583  
... ... @@ -1608,7 +1618,6 @@ const BoxComponent = props => {
1608 1618 }
1609 1619 }
1610 1620 const newConfig = [...boxConfigList, ...config];
1611   - console.log(newConfig, "newConfig");
1612 1621  
1613 1622 return {
1614 1623 ...props,
... ... @@ -1624,7 +1633,6 @@ const BoxComponent = props => {
1624 1633 // const upViewProps11 = getUpViewPropsByITag(11);
1625 1634 // 印刷参数表单
1626 1635 let upViewProps12 = getUpViewPropsByITag(12);
1627   - console.log("🚀 ~ upViewProps12:", upViewProps12);
1628 1636  
1629 1637 const filterConditions = {
1630 1638 juantong: x =>
... ... @@ -2119,7 +2127,7 @@ const BoxComponent = props => {
2119 2127 <div className={styles.viewTable1}>
2120 2128 <PrintParamsComponent {...props} />
2121 2129 <div className={styles.materialsLine}>
2122   - <div className={styles.materialsViewTable}>
  2130 + <div className={styles.materialsViewTable} key={state.slaveUpKey}>
2123 2131 <CommonViewTable {...upViewProps12} />
2124 2132 </div>
2125 2133 <div className={styles.materialsBtns} style={{ width: "10%", height: "30px" }}></div>
... ... @@ -2168,44 +2176,39 @@ const BoxComponent = props =&gt; {
2168 2176 </div>
2169 2177 {cailiaoyinshuaDiv}
2170 2178 </div>
2171   - {bBox && (
2172   - <div className={styles.boxPart1Right}>
2173   - <div className={styles.boxRreview}>
2174   - <Image.PreviewGroup>
2175   - {svgProps.boxList.length ? (
2176   - <div style={{ width: " 300px", height: "290px",lineHeight:'290px', backgroundColor: "#fff", borderRight: "1px solid #ccc" }}>
2177   - <DynamicSVG {...svgProps} />
2178   - </div>
2179   - ) : (
2180   - <div className={styles.noImg}>{noImage}</div>
2181   - )}
2182   -
2183   - {/* <div className={styles.boxRreviewTitile}>展开图</div> */}
2184   - {slaveRowData.sPackPath ? (
2185   - // <Image width={300} src={slaveRowData.sPackPath} />
2186   -
2187   - <div style={{ width: "300px", height: "300px" }}>
2188   - <Carousel dots style={{ width: "300px", height: "300px" }}>
2189   - {imagesData.map((image, index) => (
2190   - <div key={index} className="carousel-item">
2191   - <Image src={image.src} alt={image.alt} style={{ width: "300px", height: "290px" }}/>
2192   - </div>
2193   - ))}
2194   - </Carousel>
2195   - </div>
2196   - ) : (
2197   - <div className={styles.noImg}>{noImage}</div>
2198   - )}
2199   - {/* <div className={styles.boxRreviewTitile}>立体图</div> */}
2200   - </Image.PreviewGroup>
2201   - </div>
2202   - {calcMethodDiv}
  2179 + <div className={styles.boxPart1Right}>
  2180 + <div className={styles.boxRreview}>
  2181 + <Image.PreviewGroup>
  2182 + {bBox ? (
  2183 + <>
  2184 + {svgProps.boxList.length ? (
  2185 + <div style={{ width: " 300px", height: "290px", backgroundColor: "#fff", borderRight: "1px solid #ccc" }}>
  2186 + <DynamicSVG {...svgProps} />
  2187 + </div>
  2188 + ) : (
  2189 + <div className={styles.noImg}>{noImage}</div>
  2190 + )}
  2191 + </>
  2192 + ) : (
  2193 + ""
  2194 + )}
  2195 + {slaveRowData.sPackPath ? (
  2196 + <div style={{ width: "300px", height: "300px" }}>
  2197 + <Carousel dots style={{ width: "300px", height: "300px" }}>
  2198 + {imagesData.map((image, index) => (
  2199 + <div key={index} className="carousel-item">
  2200 + <Image src={image.src} alt={image.alt} style={{ width: "300px", height: "290px" }} />
  2201 + </div>
  2202 + ))}
  2203 + </Carousel>
  2204 + </div>
  2205 + ) : (
  2206 + <div className={styles.noImg}>{noImage}</div>
  2207 + )}
  2208 + </Image.PreviewGroup>
2203 2209 </div>
2204   - )}
2205   - {/* <div style={{display:'block'}}>
2206   - <Typesetting {...boxProps} onSaveStates={handleSaveState} onSaveDPartsLength={onSaveDPartsLength}/>
2207   -
2208   - </div> */}
  2210 + {calcMethodDiv}
  2211 + </div>
2209 2212 </div>
2210 2213 </>
2211 2214 );
... ... @@ -2829,8 +2832,8 @@ const BoxModelSelectedModal = props =&gt; {
2829 2832 const svgProps = {
2830 2833 ...props,
2831 2834 boxList,
2832   - dSvgBoxWidth: 150,
2833   - dSvgBoxHeight: 150,
  2835 + dSvgBoxWidth: 100,
  2836 + dSvgBoxHeight: 100,
2834 2837 showNew: 1,
2835 2838 };
2836 2839 return svgProps;
... ... @@ -2855,14 +2858,14 @@ const BoxModelSelectedModal = props =&gt; {
2855 2858 column.render = (value, record, index) =>
2856 2859 column.dataIndex === "sPackDetailPathUpLoad" ? (
2857 2860 !value ? (
2858   - <div style={{ width: "auto", height: 150 }}>
  2861 + <div style={{ width: "auto", height: 100 }}>
2859 2862 <DynamicSVG {...getSvgProps(selectBoxList[index])} />
2860 2863 </div>
2861 2864 ) : (
2862   - <img src={value} alt="" width={150} height={150} />
  2865 + <img src={value} alt="" width={100} height={100} />
2863 2866 )
2864 2867 ) : value ? (
2865   - <img src={value} alt="" width={150} height={150} />
  2868 + <img src={value} alt="" width={100} height={100} />
2866 2869 ) : (
2867 2870 noImage
2868 2871 );
... ...