Commit 4f949255c752366bc87e628152ff81e795ce82d8

Authored by 陈鑫涛
1 parent 2313a81d

不干胶状态展示显示出纸方向、拼版的界面改跳距、间距,只保留左留

src/components/QuickQuote/index.jsx
@@ -1143,7 +1143,7 @@ const TreeComponent = props => { @@ -1143,7 +1143,7 @@ const TreeComponent = props => {
1143 }; 1143 };
1144 }); 1144 });
1145 }; 1145 };
1146 - if (selectedNode.sTypeKey === "juantong") { 1146 + if (selectedNode.sProductType === "不干胶") {
1147 props.onSaveState({ 1147 props.onSaveState({
1148 masterData: { ...props.masterData, sFormId: "101251240115016002356125200" }, 1148 masterData: { ...props.masterData, sFormId: "101251240115016002356125200" },
1149 }); 1149 });
@@ -1300,10 +1300,10 @@ const MasterComponent = props => { @@ -1300,10 +1300,10 @@ const MasterComponent = props => {
1300 const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible); 1300 const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible);
1301 // 处理长宽样式 1301 // 处理长宽样式
1302 const viewConfigs = 1302 const viewConfigs =
1303 - selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sTypeKey !== "juantong" 1303 + selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sProductType !== "不干胶"
1304 ? ableConfigs 1304 ? ableConfigs
1305 : ableConfigs.filter(x => x.sName !== "dHeight"); 1305 : ableConfigs.filter(x => x.sName !== "dHeight");
1306 - if (selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sTypeKey !== "juantong") { 1306 + if (selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sProductType !== "不干胶") {
1307 viewConfigs.forEach(item => { 1307 viewConfigs.forEach(item => {
1308 if (item.sName === "dLength" || item.sName === "dWidth") { 1308 if (item.sName === "dLength" || item.sName === "dWidth") {
1309 item.iColValue = 4; 1309 item.iColValue = 4;
@@ -1363,7 +1363,7 @@ const BoxComponent = props => { @@ -1363,7 +1363,7 @@ const BoxComponent = props => {
1363 const [boxTypeList, setBoxTypeList] = useState([]); 1363 const [boxTypeList, setBoxTypeList] = useState([]);
1364 const [boxData, setBoxData] = useState([]); 1364 const [boxData, setBoxData] = useState([]);
1365 useEffect(() => { 1365 useEffect(() => {
1366 - if (selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") { 1366 + if (selectedNode.sTypeKey === "kapai" || selectedNode.sProductType === "不干胶") {
1367 const getSqlDropDownData = async ({ sId }, cb) => { 1367 const getSqlDropDownData = async ({ sId }, cb) => {
1368 const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`; 1368 const url = `${commonConfig.server_host}business/getSelectLimit/${sId}`;
1369 const body = { 1369 const body = {
@@ -1432,20 +1432,34 @@ const BoxComponent = props => { @@ -1432,20 +1432,34 @@ const BoxComponent = props => {
1432 ) { 1432 ) {
1433 return false; 1433 return false;
1434 } 1434 }
1435 - if (selectedNode.sTypeKey !== "kapai" && item.sName === "sMagnification") { 1435 + // if (selectedNode.sTypeKey !== "kapai" && item.sName === "sMagnification") {
  1436 + // return false;
  1437 + // }
  1438 + const rateList = [
  1439 + { id: 0, name: "不显示倍率" },
  1440 + { id: 1, name: "每本张数" },
  1441 + { id: 2, name: "片数" },
  1442 + ];
  1443 + if (Number(selectedNode.iRateType) === 0 && item.sName === "sMagnification") {
1436 return false; 1444 return false;
  1445 + } else {
  1446 + if (item.sName === "sMagnification") {
  1447 + item.showName = rateList.find(rate => rate.id === Number(selectedNode.iRateType))?.name || "倍率";
  1448 + }
1437 } 1449 }
1438 - 1450 +
1439 return item.iTag === iTag; 1451 return item.iTag === iTag;
1440 }); 1452 });
  1453 + console.log(selectedNode.iRateType,'selectedNode.iRateType');
  1454 +
1441 let boxConfigList = []; 1455 let boxConfigList = [];
1442 if (iTag === 20) { 1456 if (iTag === 20) {
1443 let showNameKeyList = ["dZBLB", "dSBLB", "dYBLB", "dXBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; 1457 let showNameKeyList = ["dZBLB", "dSBLB", "dYBLB", "dXBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
1444 - if (selectedNode.sTypeKey === "juantong") { 1458 + if (selectedNode.sProductType === "不干胶") {
1445 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; 1459 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
1446 } 1460 }
1447 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; 1461 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
1448 - if (selectedNode.sTypeKey === "juantong") { 1462 + if (selectedNode.sProductType === "不干胶") {
1449 const mappings = { 1463 const mappings = {
1450 dZBLB: "留边", 1464 dZBLB: "留边",
1451 dXBJJ: "跳距", 1465 dXBJJ: "跳距",
@@ -1457,7 +1471,7 @@ const BoxComponent = props => { @@ -1457,7 +1471,7 @@ const BoxComponent = props => {
1457 item.showName = mappings[item.sName]; 1471 item.showName = mappings[item.sName];
1458 } 1472 }
1459 }); 1473 });
1460 - }else { 1474 + } else {
1461 const mappings = { 1475 const mappings = {
1462 dZBLB: "左边留白", 1476 dZBLB: "左边留白",
1463 dXBJJ: "上下刀位", 1477 dXBJJ: "上下刀位",
@@ -1489,17 +1503,10 @@ const BoxComponent = props => { @@ -1489,17 +1503,10 @@ const BoxComponent = props => {
1489 1503
1490 const filterConditions = { 1504 const filterConditions = {
1491 juantong: x => 1505 juantong: x =>
1492 - x.sName === "sMagnification" ||  
1493 - x.sName === "dPartsLength" ||  
1494 - x.sName === "dPartsWidth" ||  
1495 - x.sName === "dRowGap" ||  
1496 - x.sName === "dColGap" ||  
1497 - x.sName === "sPaperDirection",  
1498 - default: x => x.sName === "sMagnification" || x.sName === "dPartsLength" || x.sName === "dPartsWidth" || x.sName === "dSumPQty", 1506 + x.sName === 'sMagnification' || x.sName === "dPartsLength" || x.sName === "dPartsWidth" || x.sName === "dRowGap" || x.sName === "dColGap" || x.sName === "sPaperDirection",
  1507 + default: x =>x.sName === 'sMagnification' || x.sName === "dPartsLength" || x.sName === "dPartsWidth" || x.sName === "dSumPQty",
1499 }; 1508 };
1500 -console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs');  
1501 -  
1502 - if (selectedNode.sTypeKey === "juantong") { 1509 +if (selectedNode.sProductType === "不干胶") {
1503 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.juantong); 1510 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.juantong);
1504 } else if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { 1511 } else if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) {
1505 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.default); 1512 upViewProps12.viewConfigs = upViewProps12.viewConfigs.filter(filterConditions.default);
@@ -1777,7 +1784,7 @@ console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs'); @@ -1777,7 +1784,7 @@ console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs');
1777 }; 1784 };
1778 let juantongConfig = {}; 1785 let juantongConfig = {};
1779 1786
1780 - if (selectedNode.sTypeKey === "juantong") { 1787 + if (selectedNode.sProductType === "不干胶") {
1781 const { dYBJJ, dXBJJ, dZBLB } = slaveData[index]; 1788 const { dYBJJ, dXBJJ, dZBLB } = slaveData[index];
1782 juantongConfig = { 1789 juantongConfig = {
1783 dColGap: dYBJJ, 1790 dColGap: dYBJJ,
@@ -1841,7 +1848,7 @@ console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs'); @@ -1841,7 +1848,7 @@ console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs');
1841 if ( 1848 if (
1842 (slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) || 1849 (slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) ||
1843 (selectedNode.sTypeKey === "kapai" && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) || 1850 (selectedNode.sTypeKey === "kapai" && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) ||
1844 - (selectedNode.sTypeKey === "juantong" && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) 1851 + (selectedNode.sProductType === "不干胶" && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth)
1845 ) { 1852 ) {
1846 const slaveNewData = JSON.parse(slaveRowData.sColumnNameConfig); 1853 const slaveNewData = JSON.parse(slaveRowData.sColumnNameConfig);
1847 const tables = [ 1854 const tables = [
@@ -2008,7 +2015,7 @@ console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs'); @@ -2008,7 +2015,7 @@ console.log(upViewProps12.viewConfigs,'upViewProps12.viewConfigs');
2008 <div className={styles.boxPart1}> 2015 <div className={styles.boxPart1}>
2009 <div className={styles.boxPart1Left}> 2016 <div className={styles.boxPart1Left}>
2010 <div className={styles.viewTable1}> 2017 <div className={styles.viewTable1}>
2011 - {!(selectedNode.sTypeKey === "kapai" || selectedNode.sTypeKey === "juantong") ? <CommonViewTable {...upViewProps} /> : ""} 2018 + {!(selectedNode.sTypeKey === "kapai" || selectedNode.sProductType === "不干胶") ? <CommonViewTable {...upViewProps} /> : ""}
2012 </div> 2019 </div>
2013 {cailiaoyinshuaDiv} 2020 {cailiaoyinshuaDiv}
2014 </div> 2021 </div>