Commit 30e2f49aaaeb99e5d29b859b43c24bf50dba800c

Authored by 陈鑫涛
1 parent d7151f0d

卷筒类单独配置

src/components/Common/Typesetting/typesetting.js
... ... @@ -23,7 +23,7 @@ const Typesetting = props => {
23 23 isMobile,
24 24 } = props;
25 25 if (!slaveRowData) return;
26   - const {
  26 + let {
27 27 dSBLB, // 上边留白
28 28 dXBLB, // 下边留白
29 29 dZBLB, // 左边留白
... ... @@ -38,7 +38,14 @@ const Typesetting = props => {
38 38 sColumnNameConfig,
39 39 bAdvancedSetting, // 高级设置
40 40 } = slaveRowData;
  41 +
41 42 const { masterData, selectedNode, slaveData } = state;
  43 + // 如果是卷筒类 那么上下左右留白等于左留白
  44 + if (selectedNode && selectedNode.sTypeKey === 'juantong') {
  45 + dSBLB = dZBLB
  46 + dXBLB = dZBLB
  47 + dYBLB = dZBLB
  48 + }
42 49 // 生成盒子图片
43 50 const [boxKey, setBoxKey] = useState(new Date().getTime());
44 51 const [boxKeys, setBoxKeys] = useState(new Date().getTime());
... ...
src/components/QuickQuote/index.css
... ... @@ -12,38 +12,16 @@
12 12 .quickQuote .content :global .ant-btn-primary {
13 13 border-radius: 5px;
14 14 }
  15 +.quickQuote .content :global .ant-col-23 {
  16 + display: flex !important;
  17 +}
15 18 .quickQuote .content .back {
16 19 position: absolute;
17   - top: 16px;
18   - left: 360px;
  20 + top: 5px;
  21 + left: 218px;
19 22 z-index: 10;
20   -}
21   -.quickQuote .content .leftTree {
22   - width: 250px;
23   - height: 100%;
24   - background: #3274b7;
25   - padding: 10px 0 0 10px;
26   - overflow: hidden;
27   -}
28   -.quickQuote .content .leftTree :global .ant-tree {
29   - background: transparent;
30   -}
31   -.quickQuote .content .leftTree :global .ant-tree .ant-tree-treenode {
32   - padding-bottom: 10px;
33   -}
34   -.quickQuote .content .leftTree :global .ant-tree .ant-tree-title {
35   - color: #fff;
36   - font-size: 16px;
37   - font-weight: bold;
38   -}
39   -.quickQuote .content .leftTree :global .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
40   - background-color: #00a183;
41   -}
42   -.quickQuote .content .leftTree :global .ant-tree .ant-tree-node-content-wrapper:hover {
43   - background-color: #009688;
44   -}
45   -.quickQuote .content .overFlow {
46   - overflow: auto;
  23 + border: 1px solid #d7d7d7;
  24 + border-right-width: 0;
47 25 }
48 26 .quickQuote .content .rightContent {
49 27 flex: 1;
... ... @@ -101,46 +79,65 @@
101 79 .quickQuote .content .rightContent .viewTable1 :global .viewStyle .ant-col {
102 80 margin-bottom: 2px;
103 81 }
104   -.quickQuote .content .rightContent .viewTable .subViewTable,
105   -.quickQuote .content .rightContent .viewTable1 .subViewTable {
  82 +.quickQuote .content .rightContent .viewTableDownView :global .viewStyle,
  83 +.quickQuote .content .rightContent .viewTableDownView1 :global .viewStyle {
  84 + padding-right: 14px;
  85 +}
  86 +.quickQuote .content .rightContent .viewTableDownView :global .viewStyle .ant-form-item-label,
  87 +.quickQuote .content .rightContent .viewTableDownView1 :global .viewStyle .ant-form-item-label {
  88 + flex: 0 0 70px !important;
  89 + max-width: 70px !important;
  90 +}
  91 +.quickQuote .content .rightContent .viewTableDownView :global .viewStyle .ant-form-item-control,
  92 +.quickQuote .content .rightContent .viewTableDownView1 :global .viewStyle .ant-form-item-control {
  93 + max-width: calc(100% - 95px);
  94 +}
  95 +.quickQuote .content .rightContent .viewTableDownView .subViewTable,
  96 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable {
106 97 width: 100%;
107 98 height: auto;
108 99 }
109   -.quickQuote .content .rightContent .viewTable .subViewTable :global .ant-form-item-row,
110   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .ant-form-item-row {
  100 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .ant-form-item-row,
  101 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .ant-form-item-row {
111 102 flex-direction: row-reverse;
112 103 }
113   -.quickQuote .content .rightContent .viewTable .subViewTable :global .ant-form-item-label,
114   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .ant-form-item-label {
  104 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .ant-form-item-label,
  105 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .ant-form-item-label {
115 106 flex: 0 0 25px !important;
116 107 max-width: 25px !important;
117 108 }
118   -.quickQuote .content .rightContent .viewTable .subViewTable :global .ant-form-item-label > label,
119   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .ant-form-item-label > label {
  109 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .ant-form-item-label > label,
  110 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .ant-form-item-label > label {
120 111 display: flex;
121 112 width: 100%;
122 113 align-items: center;
123 114 justify-content: center;
124 115 }
125   -.quickQuote .content .rightContent .viewTable .subViewTable :global .ant-form-item-label > label::before,
126   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .ant-form-item-label > label::before {
  116 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .ant-form-item-label > label::before,
  117 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .ant-form-item-label > label::before {
127 118 content: none;
128 119 width: 0;
129 120 }
130   -.quickQuote .content .rightContent .viewTable .subViewTable :global .ant-form-item-label > label::after,
131   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .ant-form-item-label > label::after {
  121 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .ant-form-item-label > label::after,
  122 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .ant-form-item-label > label::after {
132 123 content: none;
133 124 width: 0;
134 125 }
135   -.quickQuote .content .rightContent .viewTable .subViewTable :global .ant-form-item-control,
136   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .ant-form-item-control {
  126 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .ant-form-item-control,
  127 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .ant-form-item-control {
137 128 flex: 1;
138 129 max-width: calc(100% - 25px);
139 130 }
140   -.quickQuote .content .rightContent .viewTable .subViewTable :global .viewStyle > .ant-col-24,
141   -.quickQuote .content .rightContent .viewTable1 .subViewTable :global .viewStyle > .ant-col-24 {
  131 +.quickQuote .content .rightContent .viewTableDownView .subViewTable :global .viewStyle > .ant-col-24,
  132 +.quickQuote .content .rightContent .viewTableDownView1 .subViewTable :global .viewStyle > .ant-col-24 {
142 133 padding-left: 100px;
143 134 }
  135 +.quickQuote .content .rightContent .viewTableDownView1 :global .viewStyle .ant-form-item-control {
  136 + max-width: calc(100% - 60px);
  137 +}
  138 +.quickQuote .content .rightContent .viewTableDownView2 {
  139 + background-color: #3275b734;
  140 +}
144 141 .quickQuote .content .rightContent .viewTable1 {
145 142 padding: 0 20px 0 0;
146 143 }
... ... @@ -290,3 +287,89 @@
290 287 background-color: #53b637;
291 288 border-color: #53b637;
292 289 }
  290 +.leftTree,
  291 +.boxTree {
  292 + width: 250px;
  293 + height: 100%;
  294 + background: var(--xly-skin-header-color, #383d41);
  295 + padding: 10px 0 0 10px;
  296 + overflow: hidden;
  297 +}
  298 +.leftTree :global .ant-tree,
  299 +.boxTree :global .ant-tree {
  300 + background: transparent;
  301 +}
  302 +.leftTree :global .ant-tree .ant-tree-treenode,
  303 +.boxTree :global .ant-tree .ant-tree-treenode {
  304 + padding-bottom: 10px;
  305 +}
  306 +.leftTree :global .ant-tree .ant-tree-title,
  307 +.boxTree :global .ant-tree .ant-tree-title {
  308 + color: #fff;
  309 + font-size: 14px;
  310 + font-family: Monospaced Number, Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif !important;
  311 +}
  312 +.leftTree :global .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected,
  313 +.boxTree :global .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
  314 + background-color: #00a183;
  315 +}
  316 +.leftTree :global .ant-tree .ant-tree-node-content-wrapper:hover,
  317 +.boxTree :global .ant-tree .ant-tree-node-content-wrapper:hover {
  318 + background-color: #009688;
  319 +}
  320 +.boxTree {
  321 + background: transparent;
  322 +}
  323 +.boxTree :global .ant-tree .ant-tree-title,
  324 +.boxTree :global .ant-tree .ant-badge {
  325 + color: #5c6374;
  326 + font-size: 16px;
  327 + font-weight: bold;
  328 +}
  329 +.boxTree :global .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
  330 + background-color: #bae7ff;
  331 +}
  332 +.boxTree :global .ant-tree .ant-tree-node-content-wrapper:hover {
  333 + background-color: #bae7ff;
  334 +}
  335 +.overFlow {
  336 + overflow: auto;
  337 +}
  338 +.boxModal {
  339 + width: 100%;
  340 + height: calc(100vh - 335px);
  341 + display: flex;
  342 +}
  343 +.boxModal .boxTree {
  344 + width: 200px;
  345 + height: 100%;
  346 +}
  347 +.boxModal .boxTable {
  348 + width: calc(100% - 200px);
  349 + height: 100%;
  350 +}
  351 +.downOperations {
  352 + position: absolute;
  353 + top: 6px;
  354 + right: 6px;
  355 + display: flex;
  356 + flex-direction: column;
  357 + z-index: 1;
  358 +}
  359 +.downOperations :global button {
  360 + padding: 0;
  361 + width: 16px;
  362 + height: 16px;
  363 +}
  364 +.downOperations :global button > span {
  365 + font-size: 10px;
  366 +}
  367 +.sParamConfig :global .ant-form-item-label label::before {
  368 + content: "";
  369 + display: block;
  370 + width: 5px;
  371 + height: 5px;
  372 + border-radius: 50%;
  373 + background-color: #ff4d4f;
  374 + margin-right: 2px;
  375 +}
... ...
src/components/QuickQuote/index.jsx
... ... @@ -84,6 +84,7 @@ const QuickQuoteEvent = props => {
84 84 const { bLinkFieledClick } = props;
85 85 const [hideBackBtn, setHideBackBtn] = useState(false);
86 86 const [enabled, setEnabled] = useState(props.enabled);
  87 +
87 88 useEffect(() => {
88 89 setHideBackBtn(!bLinkFieledClick);
89 90 setEnabled(!bLinkFieledClick || props.enabled);
... ... @@ -1297,9 +1298,10 @@ const MasterComponent = props => {
1297 1298  
1298 1299 const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible);
1299 1300 // 处理长宽样式
1300   - const viewConfigs = ((selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sTypeKey !== "juantong") )
1301   - ? ableConfigs
1302   - : ableConfigs.filter(x => x.sName !== "dHeight");
  1301 + const viewConfigs =
  1302 + selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sTypeKey !== "juantong"
  1303 + ? ableConfigs
  1304 + : ableConfigs.filter(x => x.sName !== "dHeight");
1303 1305 if (selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" && selectedNode?.bBox && selectedNode.sTypeKey !== "juantong") {
1304 1306 viewConfigs.forEach(item => {
1305 1307 if (item.sName === "dLength" || item.sName === "dWidth") {
... ... @@ -1437,8 +1439,24 @@ const BoxComponent = props => {
1437 1439 });
1438 1440 let boxConfigList = [];
1439 1441 if (iTag === 20) {
1440   - const showNameKeyList = ["dZBLB", "dSBLB", "dYBLB", "dXBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
  1442 + let showNameKeyList = ["dZBLB", "dSBLB", "dYBLB", "dXBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
  1443 + if (selectedNode.sTypeKey === "juantong") {
  1444 + showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
  1445 + }
1441 1446 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
  1447 + if (selectedNode.sTypeKey === "juantong") {
  1448 + const mappings = {
  1449 + dZBLB: "留边",
  1450 + dXBJJ: "跳距",
  1451 + dYBJJ: "间距",
  1452 + };
  1453 +
  1454 + boxConfigList.forEach(item => {
  1455 + if (mappings[item.sName]) {
  1456 + item.showName = mappings[item.sName];
  1457 + }
  1458 + });
  1459 + }
1442 1460 }
1443 1461 const newConfig = [...boxConfigList, ...config];
1444 1462 return {
... ... @@ -1474,6 +1492,7 @@ const BoxComponent = props => {
1474 1492 }
1475 1493 // 拼板信息表单
1476 1494 const upViewProps20 = getUpViewPropsByITag(20);
  1495 + // 如果是卷筒类需要单独处理
1477 1496  
1478 1497 const { sBackProcessData = [] } = slaveRowData;
1479 1498  
... ... @@ -1742,10 +1761,27 @@ const BoxComponent = props => {
1742 1761 dHorizontalType: dHorizontalType, // 判断
1743 1762 dPortraitType: dPortraitType,
1744 1763 };
  1764 + let juantongConfig = {
  1765 +
  1766 + }
  1767 + if (selectedNode.sTypeKey === 'juantong') {
  1768 + const {dYBJJ,dXBJJ,dZBLB} = slaveData[index]
  1769 + juantongConfig = {
  1770 + dColGap:dYBJJ,
  1771 + dRowGap:dXBJJ,
  1772 + iCol:dPortraitType,
  1773 + iRow:dHorizontalType,
  1774 + dCutEdge:dZBLB
  1775 + }
  1776 + }
  1777 + const newSlaveData = {
  1778 + ...juantongConfig,
  1779 + ...updatedProduct
  1780 + }
1745 1781 // 更新状态
1746 1782 props.setState(prevState => ({
1747 1783 ...prevState,
1748   - slaveData: slaveData.map((item, i) => (i === index ? updatedProduct : item)),
  1784 + slaveData: slaveData.map((item, i) => (i === index ? newSlaveData : item)),
1749 1785 }));
1750 1786 }
1751 1787  
... ...
src/components/QuickQuote/index.less
... ... @@ -100,7 +100,6 @@
100 100 }
101 101 }
102 102 }
103   -
104 103 }
105 104  
106 105 .viewTableDownView,
... ... @@ -133,7 +132,7 @@
133 132 flex: 0 0 25px !important;
134 133 max-width: 25px !important;
135 134  
136   - >label {
  135 + > label {
137 136 display: flex;
138 137 width: 100%;
139 138 align-items: center;
... ... @@ -156,7 +155,7 @@
156 155 max-width: calc(100% - 25px);
157 156 }
158 157  
159   - .viewStyle>.ant-col-24 {
  158 + .viewStyle > .ant-col-24 {
160 159 padding-left: 100px;
161 160 }
162 161 }
... ... @@ -247,13 +246,13 @@
247 246 display: flex;
248 247 position: relative;
249 248  
250   - >div:first-child {
  249 + > div:first-child {
251 250 flex: 1;
252 251 border-right: 1px solid #d7d7d7;
253 252 }
254 253  
255   - >div:nth-child(2) {
256   - >div:first-child {
  254 + > div:nth-child(2) {
  255 + > div:first-child {
257 256 display: flex;
258 257 }
259 258 }
... ... @@ -293,7 +292,6 @@
293 292 position: relative;
294 293 overflow: hidden;
295 294 }
296   -
297 295 }
298 296  
299 297 .boxPinbanBtn {
... ... @@ -374,7 +372,7 @@
374 372 .boxTree {
375 373 width: 250px;
376 374 height: 100%;
377   - background: #3274b7;
  375 + background: var(--xly-skin-header-color, #383d41);
378 376 padding: 10px 0 0 10px;
379 377 overflow: hidden;
380 378  
... ... @@ -388,8 +386,11 @@
388 386  
389 387 .ant-tree-title {
390 388 color: #fff;
391   - font-size: 16px;
392   - font-weight: bold;
  389 + font-size: 14px;
  390 + font-family: Monospaced Number, Chinese Quote, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB,
  391 + Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif !important;
  392 +
  393 + // font-weight: bold;
393 394 }
394 395  
395 396 .ant-tree-node-content-wrapper.ant-tree-node-selected {
... ... @@ -400,7 +401,6 @@
400 401 background-color: #009688;
401 402 }
402 403 }
403   -
404 404 }
405 405 }
406 406  
... ... @@ -409,7 +409,6 @@
409 409  
410 410 :global {
411 411 .ant-tree {
412   -
413 412 .ant-tree-title,
414 413 .ant-badge {
415 414 color: #5c6374;
... ... @@ -462,7 +461,7 @@
462 461 width: 16px;
463 462 height: 16px;
464 463  
465   - >span {
  464 + > span {
466 465 font-size: 10px;
467 466 }
468 467 }
... ... @@ -474,7 +473,7 @@
474 473 .ant-form-item-label {
475 474 label {
476 475 &::before {
477   - content: '';
  476 + content: "";
478 477 display: block;
479 478 width: 5px;
480 479 height: 5px;
... ... @@ -485,4 +484,4 @@
485 484 }
486 485 }
487 486 }
488   -}
489 487 \ No newline at end of file
  488 +}
... ...