Commit 3cd0cc03d4718b334e9daa71c5b64535590c70f1

Authored by chenxt
1 parent cae34cb2

快速报价复制到

src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
... ... @@ -8,7 +8,7 @@ import React, { Component } from 'react';
8 8 import moment from 'moment';
9 9 import { Form } from '@ant-design/compatible';
10 10 // import '@ant-design/compatible/assets/index.css';
11   -import { Modal, Layout, Spin, Avatar, Select, message, Button, Slider, Tabs, Collapse, Radio, Row, Col, Table, Checkbox, } from 'antd-v4';
  11 +import { Modal, Layout, Spin, Avatar, Select, message, Button, Slider, Tabs, Collapse, Radio, Row, Col, Table, Checkbox, } from 'antd-v4';
12 12 import { RightOutlined } from '@ant-design/icons';
13 13 import AddIcon from '../../../assets/add.svg';
14 14 import DisableAddIcon from '../../../assets/disableadd.svg';
... ... @@ -104,19 +104,19 @@ class QuotationPackTableTree extends Component {
104 104 const sId = currentId || nextProps.masterData?.sId || '';
105 105 /* 数据Id */
106 106 const masterConfig = formData.filter(item => !item.bGrd)[0];
107   - if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) {
  107 + if (masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) {
108 108 this.isLayout = masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0].bVisible;
109 109 }
110   - if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout2')[0]) {
  110 + if (masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout2')[0]) {
111 111 this.isLayout2 = masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout2')[0].bVisible;
112 112 }
113 113 /* bGrd代表是否是表格 */
114 114 const slaveConfig = formData.filter(item => item.bGrd && item.sTbName !== 'sysbillcheckresult')[0];
115 115 const slaveColumn = commonFunc.getHeaderConfig(slaveConfig);
116 116  
117   - let checkConfig ={};
118   - let checkColumn ={};
119   - if(commonUtils.isNotEmptyArr( formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult'))) {
  117 + let checkConfig = {};
  118 + let checkColumn = {};
  119 + if (commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult'))) {
120 120 checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0];
121 121 checkColumn = commonFunc.getHeaderConfig(checkConfig);
122 122 }
... ... @@ -130,30 +130,30 @@ class QuotationPackTableTree extends Component {
130 130 const finishedMaterialsConfig = formData.filter(item => item.sTbName.toUpperCase() === 'QuoQuotationMaterials'.toUpperCase() && item.showName === '成品材料')[0];
131 131 const finishedMaterialsColumn = finishedMaterialsConfig ? commonFunc.getHeaderConfig(finishedMaterialsConfig) : false;
132 132  
133   - const addState2 ={};
134   - const addStateConfig ={};
  133 + const addState2 = {};
  134 + const addStateConfig = {};
135 135 /* 取材料组配置放在数组 */
136   - let materialsInfoList = [];
137   - let materialsChildInfoList = [];
138   - const materialsFormData = formData.filter(item => item.showName !== '纸张1' && item.showName !== '成品辅料1' && item.sGrd && item.sGrd.includes('materials') && item.bGrdVisible );
  136 + let materialsInfoList = [];
  137 + let materialsChildInfoList = [];
  138 + const materialsFormData = formData.filter(item => item.showName !== '纸张1' && item.showName !== '成品辅料1' && item.sGrd && item.sGrd.includes('materials') && item.bGrdVisible);
139 139 // const materialsFormData = formData.filter(item => item.sTbName !== 'mftworkordermaterials' && item.sGrd && item.sGrd.includes('materials') && item.bGrdVisible );
140 140 /* 找到除了材料,成品材料外的其他所有父级材料 */
141 141  
142   - if(commonUtils.isNotEmptyArr(materialsFormData) ) {
  142 + if (commonUtils.isNotEmptyArr(materialsFormData)) {
143 143 materialsFormData.forEach((item, index) => {
144   - const tableName = index === 0 ? 'materials' : `materials${index -1}`;
  144 + const tableName = index === 0 ? 'materials' : `materials${index - 1}`;
145 145 addState2[`${tableName}Config`] = item;
146 146 addStateConfig[`${tableName}Config`] = item;
147 147 addState2[`${tableName}Column`] = commonFunc.getHeaderConfig(item);
148 148 /* 找到该配置的子从表 */
149   - const childFormData = formData.filter(child => child.sGrd === item.sChildTableName );
150   - if(commonUtils.isNotEmptyArr(childFormData)) {
  149 + const childFormData = formData.filter(child => child.sGrd === item.sChildTableName);
  150 + if (commonUtils.isNotEmptyArr(childFormData)) {
151 151 childFormData.forEach((child, num) => {
152 152 addState2[`${tableName}ChildConfig`] = child;
153 153 addStateConfig[`${tableName}ChildConfig`] = child;
154 154 addState2[`${tableName}ChildColumn`] = commonFunc.getHeaderConfig(child);
155 155 // materialsInfoList.push(child.showName);
156   - const sChildName = item.showName + num +1;
  156 + const sChildName = item.showName + num + 1;
157 157 materialsChildInfoList.push(`${tableName}Child`);
158 158 });
159 159 }
... ... @@ -204,7 +204,7 @@ class QuotationPackTableTree extends Component {
204 204 const manyqtysConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.sTbName.toUpperCase() === 'QuoQuotationManyQtys'.toUpperCase() && item.bGrdVisible)) ?
205 205 formData.filter(item => item.sTbName.toUpperCase() === 'QuoQuotationManyQtys'.toUpperCase() && item.bGrdVisible)[0] : {};
206 206  
207   - manyqtysColumn = commonUtils.isNotEmptyObject(manyqtysConfig) ? commonFunc.getHeaderConfig(manyqtysConfig, manyqtysColumn) : [];
  207 + manyqtysColumn = commonUtils.isNotEmptyObject(manyqtysConfig) ? commonFunc.getHeaderConfig(manyqtysConfig, manyqtysColumn) : [];
208 208  
209 209 let colorConfigGrdVisible;
210 210 const colorConfigTrue = formData.filter(item => item.sTbName.toUpperCase() === 'quoquotationparam'.toUpperCase())[0];
... ... @@ -358,7 +358,7 @@ class QuotationPackTableTree extends Component {
358 358 } else {
359 359 filterTree.style.display = 'block';
360 360  
361   - const { masterData, slaveData, controlData, materialsData, processData }=this.props;
  361 + const { masterData, slaveData, controlData, materialsData, processData } = this.props;
362 362 if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyArr(slaveData)) {
363 363 const totalTreeState = this.handleGetTotalTreeData(masterData, slaveData, controlData, materialsData, processData, true);
364 364 if (commonUtils.isNotEmptyObject(totalTreeState)) {
... ... @@ -420,7 +420,7 @@ class QuotationPackTableTree extends Component {
420 420 }
421 421 });
422 422 addStateProcess.processSelectedRowKeys = [];
423   - if(commonUtils.isNotEmptyArr(addStateProcess.processData) && commonUtils.isNotEmptyArr(addStateControl.controlSelectedRowKeys)) {
  423 + if (commonUtils.isNotEmptyArr(addStateProcess.processData) && commonUtils.isNotEmptyArr(addStateControl.controlSelectedRowKeys)) {
424 424 const processFilterData = addStateProcess.processData.filter(item => item.sControlId === addStateControl.controlSelectedRowKeys[0])
425 425 if (commonUtils.isNotEmptyArr(processFilterData)) {
426 426 addStateProcess.processSelectedData = [processFilterData[0]];
... ... @@ -436,7 +436,7 @@ class QuotationPackTableTree extends Component {
436 436 name: 'pack', configData: packConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true,
437 437 });
438 438  
439   - if(commonUtils.isNotEmptyObject(manyqtysConfig)) {
  439 + if (commonUtils.isNotEmptyObject(manyqtysConfig)) {
440 440 this.props.handleGetDataSet({
441 441 name: 'manyqtys', configData: manyqtysConfig, condition: { sSqlCondition: { sParentId: sId } },
442 442 });
... ... @@ -468,17 +468,17 @@ class QuotationPackTableTree extends Component {
468 468 addStatePack.packData = packData;
469 469 }
470 470 /* 默认展开第一层结构 */
471   - const expandedRowKeys =[];
472   - if(commonUtils.isNotEmptyObject(addStateControl) && commonUtils.isNotEmptyArr(addStateControl.controlData)) {
473   - const { controlData } = addStateControl;
  471 + const expandedRowKeys = [];
  472 + if (commonUtils.isNotEmptyObject(addStateControl) && commonUtils.isNotEmptyArr(addStateControl.controlData)) {
  473 + const { controlData } = addStateControl;
474 474 const controlFilterData = controlData.filter(item => commonUtils.isEmptyObject(item.sControlParentId)); /* 筛选出第一层 */
475   - if(commonUtils.isNotEmptyArr(controlFilterData) && controlFilterData.length > 0) { /* 当显示全部时 展开所有部件层级 */
  475 + if (commonUtils.isNotEmptyArr(controlFilterData) && controlFilterData.length > 0) { /* 当显示全部时 展开所有部件层级 */
476 476 controlFilterData.forEach((item) => {
477 477 const { sId } = item;
478 478 expandedRowKeys.push(sId);
479 479 });
480 480 }
481   - this.setState({ controlExpandedRowKeys:{ expandedRowKeys: expandedRowKeys }})
  481 + this.setState({ controlExpandedRowKeys: { expandedRowKeys: expandedRowKeys } })
482 482 }
483 483 /* 获取整体树结构s */
484 484 // const { materialsData } = addStateMaterials; /* 工序表 */
... ... @@ -486,16 +486,16 @@ class QuotationPackTableTree extends Component {
486 486 // const totalTreeState = this.handleGetTotalTreeData(masterData,slaveData,controlData,materialsData,processData, true);
487 487  
488 488 this.props.onSaveState({
489   - pageLoading: false, ...addStateControl,...addStateMaterials, ...addStateProcess, ...addStateColor, ...addStatePack, ...treeState, treeSelectedKeys: controlSelectedRowKeys, ...extraState,
  489 + pageLoading: false, ...addStateControl, ...addStateMaterials, ...addStateProcess, ...addStateColor, ...addStatePack, ...treeState, treeSelectedKeys: controlSelectedRowKeys, ...extraState,
490 490 });
491 491 };
492 492  
493   - /* 获取套件树形全部结构 */
494   - handleGetTotalTreeDataBak= (masterData,slaveData,controlData,materialsData,processData, isWait) => {
  493 + /* 获取套件树形全部结构 */
  494 + handleGetTotalTreeDataBak = (masterData, slaveData, controlData, materialsData, processData, isWait) => {
495 495 /* 生成部件树结构 */
496 496 let totalTreeData = [];
497 497 const expandedKeys = [];
498   - const addState ={};
  498 + const addState = {};
499 499 // let { totalTreeSelectedKeys } = this.props;
500 500 if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(masterData.sProductName1)) {
501 501 const rootData = [masterData]; /* 找到所有一级树结构 */
... ... @@ -510,50 +510,50 @@ class QuotationPackTableTree extends Component {
510 510 /* 添加从表作为二级节点 */
511 511 const childrenSlave = [];
512 512 let bRelation = false; /* 从表与控制表没有关联性 */
513   - if(commonUtils.isNotEmptyArr(slaveData)){
514   - slaveData.forEach((itemSlave,index) => {
  513 + if (commonUtils.isNotEmptyArr(slaveData)) {
  514 + slaveData.forEach((itemSlave, index) => {
515 515 const { sId, sProductName } = itemSlave;
516 516 const treeSlaveRow = {};
517 517 treeSlaveRow.key = sId;
518   - treeSlaveRow.showName ='产品-'+ sProductName;
  518 + treeSlaveRow.showName = '产品-' + sProductName;
519 519 treeSlaveRow.sAllId = itemSlave.sId;
520 520 /* 获取从表关联的控制表 */
521 521 const childrenControl = [];
522   - if(commonUtils.isNotEmptyArr(controlData)){
523   - const controlCollection =[];
  522 + if (commonUtils.isNotEmptyArr(controlData)) {
  523 + const controlCollection = [];
524 524 controlData.forEach((itemControl) => {
525   - if(itemControl.sCombinedMemo && itemControl.sCombinedMemo !== '') {
  525 + if (itemControl.sCombinedMemo && itemControl.sCombinedMemo !== '') {
526 526 const sCombinedMemoArr = commonUtils.isJSON(itemControl.sCombinedMemo) ? JSON.parse(itemControl.sCombinedMemo) : [];
527 527 const len = sCombinedMemoArr.filter(item => item.sProductNo.indexOf(itemSlave.sProductNo) !== -1).length;
528   - if(len > 0) {
529   - const sAllId =itemControl.sAllId;
  528 + if (len > 0) {
  529 + const sAllId = itemControl.sAllId;
530 530 /* 找到这个sAllId的第一级 把整个部件挂到产品下面 */
531 531 if (commonUtils.isNotEmptyObject(sAllId)) {
532 532 const arr = sAllId.split(',');
533   - if (arr.length > 0){
534   - const firstsId =arr[0]; /* 从sAllId找第一级*/
535   - if(!controlCollection.includes(firstsId)){
536   - controlCollection.push(firstsId)
537   - }
  533 + if (arr.length > 0) {
  534 + const firstsId = arr[0]; /* 从sAllId找第一级*/
  535 + if (!controlCollection.includes(firstsId)) {
  536 + controlCollection.push(firstsId)
  537 + }
538 538 }
539 539 }
540 540 }
541 541 }
542 542 });
543   - if(commonUtils.isNotEmptyArr(controlCollection)){ /* 作为子表子级 */
544   - bRelation =true;
  543 + if (commonUtils.isNotEmptyArr(controlCollection)) { /* 作为子表子级 */
  544 + bRelation = true;
545 545 for (const key of controlCollection) {
546   - const iIndex =controlData.findIndex(item => item.sId === key);
547   - if(iIndex > -1) {
  546 + const iIndex = controlData.findIndex(item => item.sId === key);
  547 + if (iIndex > -1) {
548 548 const tableRow = controlData[iIndex];
549   - const { sId,sAllId } = tableRow;
  549 + const { sId, sAllId } = tableRow;
550 550 const treeControlRow = {}
551   - treeControlRow.key = sId + '-' +commonUtils.createSid();
  551 + treeControlRow.key = sId + '-' + commonUtils.createSid();
552 552 treeControlRow.showName = '部件-' + tableRow.sPartsName;
553 553 treeControlRow.sAllId = sAllId;
554 554 /* 控制表根据一级菜单获取子集 */
555 555 let childrenChild = [];
556   - childrenChild = this.handleGetControlTreeChildData(sId, controlData,materialsData,processData);
  556 + childrenChild = this.handleGetControlTreeChildData(sId, controlData, materialsData, processData);
557 557 let sChildren = '1'; /* 树形结构最后一个节点设置为1 */
558 558 if (commonUtils.isNotEmptyArr(childrenChild)) {
559 559 sChildren = '0'; /* 树形结构其他节点设置为0 */
... ... @@ -573,53 +573,53 @@ class QuotationPackTableTree extends Component {
573 573 childrenSlave.push(treeSlaveRow);
574 574  
575 575 /* 如果从表与控制表没有关联 */
576   - if(!bRelation){
  576 + if (!bRelation) {
577 577 controlData.forEach((itemControl) => {
578   - const { sId,sAllId,sPartsName } = itemControl;
  578 + const { sId, sAllId, sPartsName } = itemControl;
579 579 const treeControlRow = {}
580   - treeControlRow.key = sId + '-' +commonUtils.createSid();
  580 + treeControlRow.key = sId + '-' + commonUtils.createSid();
581 581 treeControlRow.showName = '部件-' + sPartsName;
582 582 treeControlRow.sAllId = sAllId;
583   - treeControlRow.sId =sId;
  583 + treeControlRow.sId = sId;
584 584 /* 控制表根据一级菜单获取子集 */
585 585 let childrenChild = [];
586   - childrenChild = this.handleGetControlTreeChildData(sId, controlData,materialsData,processData);
  586 + childrenChild = this.handleGetControlTreeChildData(sId, controlData, materialsData, processData);
587 587 let sChildren = '1'; /* 树形结构最后一个节点设置为1 */
588 588 if (commonUtils.isNotEmptyArr(childrenChild)) {
589 589 sChildren = '0'; /* 树形结构其他节点设置为0 */
590 590 }
591 591 treeControlRow.sChildren = sChildren;
592 592 treeControlRow.children = commonUtils.isNotEmptyArr(childrenChild) ? childrenChild : [];
593   - const filterData =childrenSlave.filter(item => item.sId ===treeControlRow.sId);
594   - if(commonUtils.isEmptyArr(filterData)){
  593 + const filterData = childrenSlave.filter(item => item.sId === treeControlRow.sId);
  594 + if (commonUtils.isEmptyArr(filterData)) {
595 595 childrenSlave.push(treeControlRow);
596 596 }
597 597 });
598 598 }
599 599  
600 600 /* 加载成品材料、成品工序作为从表的同级 */
601   - if(commonUtils.isNotEmptyArr(materialsData)){
  601 + if (commonUtils.isNotEmptyArr(materialsData)) {
602 602 const childTree = commonUtils.isNotEmptyArr(materialsData) ? materialsData.filter(item => item.sType === 2) : [];
603 603 if (commonUtils.isNotEmptyArr(childTree)) {
604 604 childTree.forEach((child) => {
605   - const { sId, sMaterialsName,sPartsName } = child;
  605 + const { sId, sMaterialsName, sPartsName } = child;
606 606 const treeDataRow = {};
607 607 treeDataRow.key = sId;
608   - treeDataRow.showName = '成品材料' +'-'+ sMaterialsName;
  608 + treeDataRow.showName = '成品材料' + '-' + sMaterialsName;
609 609 treeDataRow.sAllId = child.sAllId;
610 610 childrenSlave.push(treeDataRow);
611 611 });
612 612 }
613 613 }
614 614 /* 获取工序表 */
615   - if(commonUtils.isNotEmptyArr(processData)){
  615 + if (commonUtils.isNotEmptyArr(processData)) {
616 616 const childTree = commonUtils.isNotEmptyArr(processData) ? processData.filter(item => item.sType === 3) : [];
617 617 if (commonUtils.isNotEmptyArr(childTree)) {
618 618 childTree.forEach((child) => {
619   - const { sId, sProcessName,sPartsName } = child;
  619 + const { sId, sProcessName, sPartsName } = child;
620 620 const treeDataRow = {};
621 621 treeDataRow.key = sId;
622   - treeDataRow.showName = '成品工序' +'-'+ sProcessName;
  622 + treeDataRow.showName = '成品工序' + '-' + sProcessName;
623 623 treeDataRow.sAllId = child.sAllId;
624 624 childrenSlave.push(treeDataRow);
625 625 });
... ... @@ -629,7 +629,7 @@ class QuotationPackTableTree extends Component {
629 629  
630 630  
631 631  
632   - if(!expandedKeys.includes(sId)){
  632 + if (!expandedKeys.includes(sId)) {
633 633 expandedKeys.push(sId);
634 634 }
635 635 });
... ... @@ -640,8 +640,8 @@ class QuotationPackTableTree extends Component {
640 640 } else {
641 641 totalTreeData = [];
642 642 }
643   - addState.totalTreeData=totalTreeData;
644   - addState.expandedKeys=expandedKeys;
  643 + addState.totalTreeData = totalTreeData;
  644 + addState.expandedKeys = expandedKeys;
645 645 if (isWait) {
646 646 return { ...addState };
647 647 } else {
... ... @@ -655,7 +655,7 @@ class QuotationPackTableTree extends Component {
655 655 handleGetOtherData = async (tableList, childTableList, configMap) => {
656 656 const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */
657 657 const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */
658   - if(commonUtils.isNotEmptyObject(configMap)){
  658 + if (commonUtils.isNotEmptyObject(configMap)) {
659 659 for (const configName of Object.keys(configMap)) {
660 660 const tableName = configName.replace('Config', '').trim();
661 661 const childConfig = configMap[configName];
... ... @@ -667,26 +667,26 @@ class QuotationPackTableTree extends Component {
667 667 };
668 668  
669 669 /* 获取套件树形全部结构 */
670   - handleGetTotalTreeData= (masterData,slaveData,controlData,materialsData,processData, isWait) => {
  670 + handleGetTotalTreeData = (masterData, slaveData, controlData, materialsData, processData, isWait) => {
671 671 /* 生成部件树结构 */
672 672 let totalTreeData = [];
673 673 const childrenSlave = [];
674 674 const expandedKeys = [];
675   - const addState ={};
  675 + const addState = {};
676 676 // let { totalTreeSelectedKeys } = this.props;
677 677 if (commonUtils.isNotEmptyObject(masterData)) {
678 678 /* 添加从表作为二级节点 */
679 679 let bRelation = false; /* 从表与控制表没有关联性 */
680 680 let bSuit = false; /* 默认是非套件 */
681   - if(commonUtils.isNotEmptyArr(processData)) {
682   - const processFilterData= processData.filter(item => item.sType === '3' && commonUtils.isNotEmptyObject(item.sCombineChildProductName));
683   - if(commonUtils.isNotEmptyArr(processFilterData)) {
  681 + if (commonUtils.isNotEmptyArr(processData)) {
  682 + const processFilterData = processData.filter(item => item.sType === '3' && commonUtils.isNotEmptyObject(item.sCombineChildProductName));
  683 + if (commonUtils.isNotEmptyArr(processFilterData)) {
684 684 bSuit = true; /* 只要有一个成品工序有子产品 则代表是套装 */
685 685 }
686 686 }
687 687  
688   - if(commonUtils.isNotEmptyArr(slaveData)){
689   - slaveData.forEach((itemSlave,index) => {
  688 + if (commonUtils.isNotEmptyArr(slaveData)) {
  689 + slaveData.forEach((itemSlave, index) => {
690 690 const { sId, sProductName } = itemSlave;
691 691 const treeSlaveRow = {};
692 692 treeSlaveRow.key = sId;
... ... @@ -695,20 +695,20 @@ class QuotationPackTableTree extends Component {
695 695 treeSlaveRow.sIconType = '00'; /* 顶元素 */
696 696 /* 获取从表关联的控制表 */
697 697 const childrenControl = [];
698   - if(commonUtils.isNotEmptyArr(controlData)){
699   - const controlCollection =[];
  698 + if (commonUtils.isNotEmptyArr(controlData)) {
  699 + const controlCollection = [];
700 700 controlData.forEach((itemControl) => {
701   - if(itemControl.sCombinedMemo && itemControl.sCombinedMemo !== '') {
  701 + if (itemControl.sCombinedMemo && itemControl.sCombinedMemo !== '') {
702 702 const sCombinedMemoArr = commonUtils.isJSON(itemControl.sCombinedMemo) ? JSON.parse(itemControl.sCombinedMemo) : [];
703 703 const len = sCombinedMemoArr.filter(item => item.sProductNo.indexOf(itemSlave.sProductNo) !== -1).length;
704   - if(len > 0) {
705   - const sAllId =itemControl.sAllId;
  704 + if (len > 0) {
  705 + const sAllId = itemControl.sAllId;
706 706 /* 找到这个sAllId的第一级 把整个部件挂到产品下面 */
707 707 if (commonUtils.isNotEmptyObject(sAllId)) {
708 708 const arr = sAllId.split(',');
709   - if (arr.length > 0){
710   - const firstsId =arr[0]; /* 从sAllId找第一级*/
711   - if(!controlCollection.includes(firstsId)){
  709 + if (arr.length > 0) {
  710 + const firstsId = arr[0]; /* 从sAllId找第一级*/
  711 + if (!controlCollection.includes(firstsId)) {
712 712 controlCollection.push(firstsId)
713 713 }
714 714 }
... ... @@ -717,13 +717,13 @@ class QuotationPackTableTree extends Component {
717 717 }
718 718 });
719 719 const sTitle = bSuit ? '子产品-' : '部件-';
720   - if(commonUtils.isNotEmptyArr(controlCollection)){ /* 作为子表子级1 */
721   - bRelation =true;
  720 + if (commonUtils.isNotEmptyArr(controlCollection)) { /* 作为子表子级1 */
  721 + bRelation = true;
722 722 for (const key of controlCollection) {
723   - const iIndex =controlData.findIndex(item => item.sId === key);
724   - if(iIndex > -1) {
  723 + const iIndex = controlData.findIndex(item => item.sId === key);
  724 + if (iIndex > -1) {
725 725 const tableRow = controlData[iIndex];
726   - const { sId,sAllId } = tableRow;
  726 + const { sId, sAllId } = tableRow;
727 727 const treeControlRow = {}
728 728 treeControlRow.key = sId;
729 729 // treeControlRow.key = sId + '-' +commonUtils.createSid();
... ... @@ -732,20 +732,20 @@ class QuotationPackTableTree extends Component {
732 732 treeControlRow.sIconType = '10'; /* 部件 */
733 733 /* 控制表根据一级菜单获取子集 */
734 734 let childrenChild = [];
735   - childrenChild = this.handleGetControlTreeChildData(sId, controlData,materialsData,processData);
  735 + childrenChild = this.handleGetControlTreeChildData(sId, controlData, materialsData, processData);
736 736 let sChildren = '1'; /* 树形结构最后一个节点设置为1 */
737 737 if (commonUtils.isNotEmptyArr(childrenChild)) {
738 738 sChildren = '0'; /* 树形结构其他节点设置为0 */
739 739 }
740 740 /* 挂载子产品对应的成品工序 */
741   - if(bSuit && commonUtils.isNotEmptyArr(processData)){
  741 + if (bSuit && commonUtils.isNotEmptyArr(processData)) {
742 742 const childTree = commonUtils.isNotEmptyArr(processData) ? processData.filter(item => item.sType === '3' && key === item.sCombineChildProductName) : [];
743 743 if (commonUtils.isNotEmptyArr(childTree)) {
744 744 childTree.forEach((child) => {
745   - const { sId, sProcessName,sPartsName } = child;
  745 + const { sId, sProcessName, sPartsName } = child;
746 746 const treeProcessRow = {};
747 747 treeProcessRow.key = sId;
748   - treeProcessRow.showName = '成品工序' +'-'+ sProcessName;
  748 + treeProcessRow.showName = '成品工序' + '-' + sProcessName;
749 749 treeProcessRow.sAllId = child.sAllId;
750 750 treeControlRow.sIconType = '03'; /* 成品工序 */
751 751 childrenChild.push(treeProcessRow);
... ... @@ -768,41 +768,41 @@ class QuotationPackTableTree extends Component {
768 768 childrenSlave.push(treeSlaveRow);
769 769  
770 770 /* 如果从表与控制表没有关联 */
771   - if(!bRelation){
  771 + if (!bRelation) {
772 772 controlData.forEach((itemControl) => {
773   - const { sId,sAllId,sPartsName } = itemControl;
  773 + const { sId, sAllId, sPartsName } = itemControl;
774 774 const treeControlRow = {}
775   - treeControlRow.key = sId + '-' +commonUtils.createSid();
  775 + treeControlRow.key = sId + '-' + commonUtils.createSid();
776 776 // treeControlRow.key = sId;
777 777 treeControlRow.showName = '部件-' + sPartsName;
778 778 treeControlRow.sAllId = sAllId;
779   - treeControlRow.sId =sId;
  779 + treeControlRow.sId = sId;
780 780 treeControlRow.sIconType = '10'; /* 部件 */
781 781 /* 控制表根据一级菜单获取子集 */
782 782 let childrenChild = [];
783   - childrenChild = this.handleGetControlTreeChildData(sId, controlData,materialsData,processData);
  783 + childrenChild = this.handleGetControlTreeChildData(sId, controlData, materialsData, processData);
784 784 let sChildren = '1'; /* 树形结构最后一个节点设置为1 */
785 785 if (commonUtils.isNotEmptyArr(childrenChild)) {
786 786 sChildren = '0'; /* 树形结构其他节点设置为0 */
787 787 }
788 788 treeControlRow.sChildren = sChildren;
789 789 treeControlRow.children = commonUtils.isNotEmptyArr(childrenChild) ? childrenChild : [];
790   - const filterData =childrenSlave.filter(item => item.sId ===treeControlRow.sId);
791   - if(commonUtils.isEmptyArr(filterData)){
  790 + const filterData = childrenSlave.filter(item => item.sId === treeControlRow.sId);
  791 + if (commonUtils.isEmptyArr(filterData)) {
792 792 childrenSlave.push(treeControlRow);
793 793 }
794 794 });
795 795 }
796 796  
797 797 /* 加载成品材料、成品工序作为从表的同级 */
798   - if(commonUtils.isNotEmptyArr(materialsData)){
  798 + if (commonUtils.isNotEmptyArr(materialsData)) {
799 799 const childTree = commonUtils.isNotEmptyArr(materialsData) ? materialsData.filter(item => item.sType === '2') : [];
800 800 if (commonUtils.isNotEmptyArr(childTree)) {
801 801 childTree.forEach((child) => {
802   - const { sId, sMaterialsName,sPartsName } = child;
  802 + const { sId, sMaterialsName, sPartsName } = child;
803 803 const treeDataRow = {};
804   - treeDataRow.key = sId + '-' +commonUtils.createSid();
805   - treeDataRow.showName = '成品材料' +'-'+ sMaterialsName;
  804 + treeDataRow.key = sId + '-' + commonUtils.createSid();
  805 + treeDataRow.showName = '成品材料' + '-' + sMaterialsName;
806 806 treeDataRow.sIconType = '02'; /* 成品材料 */
807 807 treeDataRow.sAllId = child.sAllId;
808 808 childrenSlave.push(treeDataRow);
... ... @@ -810,27 +810,27 @@ class QuotationPackTableTree extends Component {
810 810 }
811 811 }
812 812 /* 获取工序表 */
813   - if(!bSuit){
  813 + if (!bSuit) {
814 814 const childTree = commonUtils.isNotEmptyArr(processData) ? processData.filter(item => item.sType === '3') : [];
815 815 if (commonUtils.isNotEmptyArr(childTree)) {
816 816 childTree.forEach((child) => {
817   - const { sId, sProcessName,sPartsName } = child;
  817 + const { sId, sProcessName, sPartsName } = child;
818 818 const treeDataRow = {};
819   - treeDataRow.key = sId + '-' +commonUtils.createSid();;
820   - treeDataRow.showName = '成品工序' +'-'+ sProcessName;
  819 + treeDataRow.key = sId + '-' + commonUtils.createSid();;
  820 + treeDataRow.showName = '成品工序' + '-' + sProcessName;
821 821 treeDataRow.sIconType = '03'; /* 部件 */
822 822 treeDataRow.sAllId = child.sAllId;
823 823 childrenSlave.push(treeDataRow);
824 824 });
825 825 }
826   - }else { /* 成品工序挂在从表下的 */
  826 + } else { /* 成品工序挂在从表下的 */
827 827 const childTree = commonUtils.isNotEmptyArr(processData) ? processData.filter(item => item.sType === '3' && commonUtils.isEmptyObject(item.sCombineChildProductName)) : [];
828 828 if (commonUtils.isNotEmptyArr(childTree)) {
829 829 childTree.forEach((child) => {
830   - const { sId, sProcessName,sPartsName } = child;
  830 + const { sId, sProcessName, sPartsName } = child;
831 831 const treeDataRow = {};
832   - treeDataRow.key = sId + '-' +commonUtils.createSid();;
833   - treeDataRow.showName = '成品工序' +'-'+ sProcessName;
  832 + treeDataRow.key = sId + '-' + commonUtils.createSid();;
  833 + treeDataRow.showName = '成品工序' + '-' + sProcessName;
834 834 treeDataRow.sIconType = '03'; /* 部件 */
835 835 treeDataRow.sAllId = child.sAllId;
836 836 childrenSlave.push(treeDataRow);
... ... @@ -838,17 +838,17 @@ class QuotationPackTableTree extends Component {
838 838 }
839 839 }
840 840  
841   - if(!expandedKeys.includes(sId)){
  841 + if (!expandedKeys.includes(sId)) {
842 842 expandedKeys.push(sId);
843 843 }
844   - totalTreeData= childrenSlave;
  844 + totalTreeData = childrenSlave;
845 845 });
846 846 }
847 847 } else {
848 848 totalTreeData = [];
849 849 }
850   - addState.totalTreeData=totalTreeData;
851   - addState.expandedKeys=expandedKeys;
  850 + addState.totalTreeData = totalTreeData;
  851 + addState.expandedKeys = expandedKeys;
852 852 if (isWait) {
853 853 return { ...addState };
854 854 } else {
... ... @@ -861,7 +861,7 @@ class QuotationPackTableTree extends Component {
861 861  
862 862  
863 863 /** 获取部件树 */
864   - handleGetControlTreeData= (controlData, isWait) => {
  864 + handleGetControlTreeData = (controlData, isWait) => {
865 865 /* 生成部件树结构 */
866 866 let treeData = [];
867 867 if (isWait) {
... ... @@ -875,7 +875,7 @@ class QuotationPackTableTree extends Component {
875 875 };
876 876  
877 877  
878   - handleGetControlTreeDataBak= (controlData, isWait) => {
  878 + handleGetControlTreeDataBak = (controlData, isWait) => {
879 879 /* 生成部件树结构 */
880 880 let treeData = [];
881 881 const expandedKeys = [];
... ... @@ -921,7 +921,7 @@ class QuotationPackTableTree extends Component {
921 921 };
922 922  
923 923 /** 获取子节点数据 */
924   - handleGetControlTreeChildData= (sParentId, controlData,materialsData,processData) => {
  924 + handleGetControlTreeChildData = (sParentId, controlData, materialsData, processData) => {
925 925 if (commonUtils.isNotEmptyObject(sParentId) && commonUtils.isNotEmptyArr(controlData)) {
926 926 const childTree = commonUtils.isNotEmptyArr(controlData) ? controlData.filter(item => item.sControlParentId === sParentId) : [];
927 927 const children = [];
... ... @@ -934,7 +934,7 @@ class QuotationPackTableTree extends Component {
934 934 treeDataRow.parentKey = sParentId;
935 935 treeDataRow.sAllId = child.sAllId;
936 936 treeDataRow.sIconType = '10'; /* 部件 */
937   - const data = this.handleGetControlTreeChildData(sId, controlData,materialsData,processData);
  937 + const data = this.handleGetControlTreeChildData(sId, controlData, materialsData, processData);
938 938 let sChildren = '1'; /* 最后一个节点设置为1 */
939 939 if (commonUtils.isNotEmptyArr(data)) {
940 940 sChildren = '0';
... ... @@ -952,7 +952,7 @@ class QuotationPackTableTree extends Component {
952 952 }
953 953  
954 954 /* 获取材料表 */
955   - if(commonUtils.isNotEmptyArr(materialsData)){
  955 + if (commonUtils.isNotEmptyArr(materialsData)) {
956 956 const childTree = commonUtils.isNotEmptyArr(materialsData) ? materialsData.filter(item => item.sControlId === sParentId) : [];
957 957 if (commonUtils.isNotEmptyArr(childTree)) {
958 958 childTree.forEach((child) => {
... ... @@ -968,11 +968,11 @@ class QuotationPackTableTree extends Component {
968 968 }
969 969 }
970 970 /* 获取工序表 */
971   - if(commonUtils.isNotEmptyArr(processData)){
  971 + if (commonUtils.isNotEmptyArr(processData)) {
972 972 const childTree = commonUtils.isNotEmptyArr(processData) ? processData.filter(item => item.sControlId === sParentId) : [];
973 973 if (commonUtils.isNotEmptyArr(childTree)) {
974 974 childTree.forEach((child) => {
975   - const { sId, sProcessName } = child;
  975 + const { sId, sProcessName } = child;
976 976 const treeDataRow = {};
977 977 treeDataRow.key = sId;
978 978 // treeDataRow.showName = '部件工序-'+ sProcessName;
... ... @@ -989,7 +989,7 @@ class QuotationPackTableTree extends Component {
989 989 };
990 990  
991 991 /** 根据key查找树节点并改变属性 */
992   - handleSearchNodes= (key, data, showNameNew) => {
  992 + handleSearchNodes = (key, data, showNameNew) => {
993 993 if (commonUtils.isNotEmptyObject(showNameNew)) {
994 994 data.forEach((item) => {
995 995 if (item.key === key) {
... ... @@ -1012,7 +1012,7 @@ class QuotationPackTableTree extends Component {
1012 1012  
1013 1013 const masterReturn = (await commonServices.postValueService(token, values, url)).data;
1014 1014 if (masterReturn.code === 1) {
1015   - if(commonUtils.isNotEmptyObject(masterReturn.dataset) && commonUtils.isNotEmptyArr(masterReturn.dataset.rows) ) {
  1015 + if (commonUtils.isNotEmptyObject(masterReturn.dataset) && commonUtils.isNotEmptyArr(masterReturn.dataset.rows)) {
1016 1016 const sBackProcessDataValue = masterReturn.dataset.rows;
1017 1017 if (isWait) {
1018 1018 return { sBackProcessData: sBackProcessDataValue };
... ... @@ -1182,7 +1182,7 @@ class QuotationPackTableTree extends Component {
1182 1182 }
1183 1183 const returnChange = await this.props.onChange(name, sFieldName, changeValue, sId, dropDownData, true, masterData);
1184 1184 const masterDataDefault = commonFunc.getDefaultData(masterConfig, {});
1185   - returnChange.masterData = { ...masterDataDefault, ...returnChange.masterData };
  1185 + returnChange.masterData = { ...masterDataDefault, ...returnChange.masterData };
1186 1186 if (isWait) {
1187 1187 return {
1188 1188 ...returnChange, sBackProcessClassifyData, masterConfig, ...backProcessData,
... ... @@ -1209,7 +1209,7 @@ class QuotationPackTableTree extends Component {
1209 1209 };
1210 1210  
1211 1211 /* 数据生成按钮 */
1212   - handleDataCreate= async () => {
  1212 + handleDataCreate = async () => {
1213 1213 let { checkProcessClassifyData } = this.props;
1214 1214 const {
1215 1215 masterData, slaveConfig, materialsConfig, processConfig, sModelsId, app, dispatch,
... ... @@ -1650,7 +1650,7 @@ class QuotationPackTableTree extends Component {
1650 1650 };
1651 1651  
1652 1652 /* 勾选工序分类 */
1653   - handleProcessChange=(e, value, sPartsName) => {
  1653 + handleProcessChange = (e, value, sPartsName) => {
1654 1654 let { checkProcessClassifyData } = this.props;
1655 1655 let index = -1;
1656 1656 if (commonUtils.isNotEmptyArr(checkProcessClassifyData)) {
... ... @@ -1750,7 +1750,7 @@ class QuotationPackTableTree extends Component {
1750 1750 data.push(commonBusiness.mergeData('materials', materialsConfig.sTbName, materialsData, materialsDelData));
1751 1751 data.push(commonBusiness.mergeData('process', processConfig.sTbName, processData, processDelData));
1752 1752  
1753   - if(commonUtils.isNotEmptyObject(manyqtysConfig)) {
  1753 + if (commonUtils.isNotEmptyObject(manyqtysConfig)) {
1754 1754 data.push(commonBusiness.mergeData('manyqtys', manyqtysConfig.sTbName, manyqtysData, manyqtysDelData));
1755 1755 }
1756 1756  
... ... @@ -1760,19 +1760,19 @@ class QuotationPackTableTree extends Component {
1760 1760 if (commonUtils.isNotEmptyArr(data)) {
1761 1761 for (const table of data) {
1762 1762 for (const key of Object.keys(table)) {
1763   - if( key.includes('column')) { /* 只要一个column有值 代表有更改 要走自动计算 */
1764   - if(commonUtils.isNotEmptyArr(table[key])) {
  1763 + if (key.includes('column')) { /* 只要一个column有值 代表有更改 要走自动计算 */
  1764 + if (commonUtils.isNotEmptyArr(table[key])) {
1765 1765 skipFlag = 0;
1766 1766 break;
1767 1767 }
1768 1768 }
1769 1769 }
1770   - if(skipFlag === 0) { /* skipFlag=0 代表不自动计算 */
  1770 + if (skipFlag === 0) { /* skipFlag=0 代表不自动计算 */
1771 1771 break;
1772 1772 }
1773 1773 }
1774 1774 }
1775   - if(((skipFlag === 0) || masterData.bNoVerify) && !skipCalculation) {
  1775 + if (((skipFlag === 0) || masterData.bNoVerify) && !skipCalculation) {
1776 1776 this.handleCalculation(true);
1777 1777 } else {
1778 1778 this.props.onSaveData({
... ... @@ -1819,7 +1819,7 @@ class QuotationPackTableTree extends Component {
1819 1819 addState.controlSelectedRowKeys = [tableData[iIndex].sControlId];
1820 1820 }
1821 1821 }
1822   - if(name === 'process') {
  1822 + if (name === 'process') {
1823 1823 addState.processSelectedData = [tableData[iIndex]];
1824 1824 addState.processSelectedRowKeys = selectedRowKeys;
1825 1825 }
... ... @@ -1888,8 +1888,8 @@ class QuotationPackTableTree extends Component {
1888 1888 /** 添加表格空行 */
1889 1889 handleTableAdd = (name, flag, bchild, bFinished, bModalAdd) => {
1890 1890 const { masterConfig } = this.props;
1891   - if(bModalAdd === true) {
1892   - if(name === 'materials') {
  1891 + if (bModalAdd === true) {
  1892 + if (name === 'materials') {
1893 1893 let iIndex = -1;
1894 1894 if (bFinished) {
1895 1895 iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === "BtnChooseProductMaterials");
... ... @@ -1903,7 +1903,7 @@ class QuotationPackTableTree extends Component {
1903 1903 }
1904 1904 }
1905 1905 }
1906   - if(name === 'process') {
  1906 + if (name === 'process') {
1907 1907 let iIndex = -1;
1908 1908 if (bFinished) {
1909 1909 iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === "BtnChooseProductProcess");
... ... @@ -1925,7 +1925,7 @@ class QuotationPackTableTree extends Component {
1925 1925 } = this.props;
1926 1926 let slaveSelectedRow = {};
1927 1927 let controlSelectedRow = {};
1928   - let { packData }=this.props;
  1928 + let { packData } = this.props;
1929 1929 if (name === 'control') {
1930 1930 /* 增加子部件 */
1931 1931 const {
... ... @@ -1969,20 +1969,20 @@ class QuotationPackTableTree extends Component {
1969 1969 }
1970 1970 }
1971 1971  
1972   - if(bchild !=='sameNode' && bchild !=='childNode') { /* 列头新增 */
  1972 + if (bchild !== 'sameNode' && bchild !== 'childNode') { /* 列头新增 */
1973 1973 tableDataRow.sAllId = tableDataRow.sId;
1974 1974 }
1975 1975  
1976 1976 let slaveSelectedRow = {};
1977   - if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)){ /* 从表有选中行 */
  1977 + if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { /* 从表有选中行 */
1978 1978 const iSlaveIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sId));
1979   - if(iSlaveIndex > -1){
  1979 + if (iSlaveIndex > -1) {
1980 1980 slaveSelectedRow = slaveData[iSlaveIndex];
1981 1981 }
1982   - }else{ /* 没有选中行 */
1983   - if(slaveData.length ===1){
1984   - slaveSelectedRow =slaveData[0];
1985   - }else{
  1982 + } else { /* 没有选中行 */
  1983 + if (slaveData.length === 1) {
  1984 + slaveSelectedRow = slaveData[0];
  1985 + } else {
1986 1986 message.error('请选择从表!')
1987 1987 }
1988 1988 }
... ... @@ -1991,25 +1991,25 @@ class QuotationPackTableTree extends Component {
1991 1991 tableDataRow.sPartsName = slaveSelectedRow.sProductName;
1992 1992  
1993 1993 /* 部件表新增时,若合版表没有该sControlId 则默认取从表选中行,合拼1 作为一条packData数据 */
1994   - if(commonUtils.isEmptyArr(packData)){
1995   - packData =[];
  1994 + if (commonUtils.isEmptyArr(packData)) {
  1995 + packData = [];
1996 1996 }
1997   - if(false){
1998   - packData =[];
1999   - } else{
2000   - const iIndex =packData.findIndex(item=> item.sControlId === tableDataRow.sId);
2001   - if(iIndex ===-1){
  1997 + if (false) {
  1998 + packData = [];
  1999 + } else {
  2000 + const iIndex = packData.findIndex(item => item.sControlId === tableDataRow.sId);
  2001 + if (iIndex === -1) {
2002 2002  
2003   - if(commonUtils.isEmptyObject(slaveSelectedRow.sProductId)) {
  2003 + if (commonUtils.isEmptyObject(slaveSelectedRow.sProductId)) {
2004 2004 message.error('请先选择产品!');
2005 2005 return;
2006 2006 }
2007   - if(slaveSelectedRow){
  2007 + if (slaveSelectedRow) {
2008 2008 const packDataRow = this.handlePackDataAdd(slaveSelectedRow, 0, tableDataRow.sId, 'add');
2009 2009 packDataRow.dCombineQty = 1; /* 排版数 */
2010   - if(commonUtils.isNotEmptyObject(packDataRow) && commonUtils.isNotEmptyObject(packDataRow.sProductId)){ /* 从表要选择产品 */
2011   - const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty,sCombinePartsName }= packDataRow;
2012   - const tableCombineSelectedData =[];
  2010 + if (commonUtils.isNotEmptyObject(packDataRow) && commonUtils.isNotEmptyObject(packDataRow.sProductId)) { /* 从表要选择产品 */
  2011 + const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty, sCombinePartsName } = packDataRow;
  2012 + const tableCombineSelectedData = [];
2013 2013 const jsonObj = {};
2014 2014 jsonObj.sId = sId;
2015 2015 jsonObj.sProductNo = sProductNo; /* 产品编号 */
... ... @@ -2019,7 +2019,7 @@ class QuotationPackTableTree extends Component {
2019 2019 jsonObj.sCombinePartsName = sCombinePartsName; /* 合版部件名称 */
2020 2020 tableCombineSelectedData.push(jsonObj);
2021 2021 const sCombinedMemo = commonUtils.isNotEmptyArr(tableCombineSelectedData) ? JSON.stringify(tableCombineSelectedData) : ''; /* JSON对象转换为字符串存放到合版信息中 */
2022   - tableDataRow.sCombinedMemo =commonUtils.isNotEmptyObject(sCombinedMemo)? sCombinedMemo: '合版信息';
  2022 + tableDataRow.sCombinedMemo = commonUtils.isNotEmptyObject(sCombinedMemo) ? sCombinedMemo : '合版信息';
2023 2023 }
2024 2024 packData.push(packDataRow);
2025 2025  
... ... @@ -2055,43 +2055,43 @@ class QuotationPackTableTree extends Component {
2055 2055 });
2056 2056 } else if (name === 'materials' || name === 'process') {
2057 2057 let slaveSelectedRow = {};
2058   - if(commonUtils.isNotEmptyArr(slaveData)){
2059   - if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)){ /* 从表有选中行 */
  2058 + if (commonUtils.isNotEmptyArr(slaveData)) {
  2059 + if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { /* 从表有选中行 */
2060 2060 const iSlaveIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sId));
2061   - if(iSlaveIndex > -1){
  2061 + if (iSlaveIndex > -1) {
2062 2062 slaveSelectedRow = slaveData[iSlaveIndex];
2063 2063 }
2064 2064 } else { /* 没有选中行 */
2065   - slaveSelectedRow =slaveData[0];
  2065 + slaveSelectedRow = slaveData[0];
2066 2066 }
2067 2067 }
2068 2068  
2069 2069 let controlSelectedRow = {};
2070   - if(commonUtils.isNotEmptyArr(controlData)) {
2071   - if(commonUtils.isNotEmptyArr(controlSelectedRowKeys)){ /* 从表有选中行 */
  2070 + if (commonUtils.isNotEmptyArr(controlData)) {
  2071 + if (commonUtils.isNotEmptyArr(controlSelectedRowKeys)) { /* 从表有选中行 */
2072 2072 const iControlIndex = controlData.findIndex(item => controlSelectedRowKeys.includes(item.sId));
2073   - if(iControlIndex > -1){
  2073 + if (iControlIndex > -1) {
2074 2074 controlSelectedRow = controlData[iControlIndex];
2075 2075 }
2076   - } else{ /* 没有选中行 */
2077   - controlSelectedRow =controlData[0];
  2076 + } else { /* 没有选中行 */
  2077 + controlSelectedRow = controlData[0];
2078 2078 }
2079 2079 }
2080 2080  
2081 2081 let processSelectedRow = {};
2082   - if(commonUtils.isNotEmptyArr(processData)) {
2083   - if(commonUtils.isNotEmptyArr(processSelectedRowKeys)){ /* 从表有选中行 */
  2082 + if (commonUtils.isNotEmptyArr(processData)) {
  2083 + if (commonUtils.isNotEmptyArr(processSelectedRowKeys)) { /* 从表有选中行 */
2084 2084 const iProcessIndex = processData.findIndex(item => processSelectedRowKeys.includes(item.sId));
2085   - if(iProcessIndex > -1){
  2085 + if (iProcessIndex > -1) {
2086 2086 processSelectedRow = processData[iProcessIndex];
2087 2087 }
2088   - } else{ /* 没有选中行 */
  2088 + } else { /* 没有选中行 */
2089 2089 processSelectedRow = processData[0];
2090 2090 }
2091 2091 }
2092 2092  
2093 2093 const tableDataRow = this.props.onDataRowAdd(name, true);
2094   - if(bFinished) {
  2094 + if (bFinished) {
2095 2095 const iIndex = slaveData.findIndex(item => item.sId === slaveSelectedRow.sId);
2096 2096 if (iIndex > -1) {
2097 2097 tableDataRow.sCombinePartsNameNew = `${slaveData[iIndex].sCustomerName}-${slaveData[iIndex].sProductName}`;
... ... @@ -2251,13 +2251,13 @@ class QuotationPackTableTree extends Component {
2251 2251 }));
2252 2252 processReturnData.processDelData.concat(tableDelData);
2253 2253 /* 删除工序对应的材料 */
2254   - const materialsFilterDelData = materialsData.filter(item => tableSelectedRowKeys.includes(item.sProcessTbId) && item.sProcessId === sProcessId );
  2254 + const materialsFilterDelData = materialsData.filter(item => tableSelectedRowKeys.includes(item.sProcessTbId) && item.sProcessId === sProcessId);
2255 2255 let materialsSelectedDelRowKeys = [];
2256   - if(commonUtils.isNotEmptyArr(materialsFilterDelData)) {
2257   - materialsFilterDelData.forEach((item) =>{
2258   - const materialsChildFilter = materialsData.filter(row => commonUtils.isNotEmptyObject(row.sParentMaterialsId ) && row.sParentMaterialsId === item.sId); /* 删除对应的替代料 */
2259   - if(commonUtils.isNotEmptyArr(materialsChildFilter)) {
2260   - materialsChildFilter.forEach((child) =>{
  2256 + if (commonUtils.isNotEmptyArr(materialsFilterDelData)) {
  2257 + materialsFilterDelData.forEach((item) => {
  2258 + const materialsChildFilter = materialsData.filter(row => commonUtils.isNotEmptyObject(row.sParentMaterialsId) && row.sParentMaterialsId === item.sId); /* 删除对应的替代料 */
  2259 + if (commonUtils.isNotEmptyArr(materialsChildFilter)) {
  2260 + materialsChildFilter.forEach((child) => {
2261 2261 materialsSelectedDelRowKeys.push(child.sId);
2262 2262 })
2263 2263 }
... ... @@ -2275,27 +2275,27 @@ class QuotationPackTableTree extends Component {
2275 2275 materialsSelectedRowKeys: [],
2276 2276 });
2277 2277 return true;
2278   - } if(name ==='materials0'){ /* 删除油墨时 同时删除油墨子集 */
  2278 + } if (name === 'materials0') { /* 删除油墨时 同时删除油墨子集 */
2279 2279 /* 从全部材料里 找到对应数据 进行更改 */
2280 2280 const {
2281 2281 sModelsId, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Data`]: tableData, materialsConfig, materialsData: materials0Data, token,
2282 2282 } = this.props;
2283   - if(commonUtils.isEmptyArr(tableSelectedRowKeys)) {
  2283 + if (commonUtils.isEmptyArr(tableSelectedRowKeys)) {
2284 2284 message.error('请选择数据!');
2285   - return ;
  2285 + return;
2286 2286 }
2287   - if(commonUtils.isNotEmptyArr(materials0Data)) {
2288   - const iIndex = materials0Data.findIndex(item => tableSelectedRowKeys.includes(item.sId) );
  2287 + if (commonUtils.isNotEmptyArr(materials0Data)) {
  2288 + const iIndex = materials0Data.findIndex(item => tableSelectedRowKeys.includes(item.sId));
2289 2289 let materials1Row = {};
2290   - if(iIndex > -1) {
2291   - materials1Row = materials0Data[iIndex];
  2290 + if (iIndex > -1) {
  2291 + materials1Row = materials0Data[iIndex];
2292 2292 }
2293 2293  
2294   - const materials0ChildData = materials0Data.filter(item => commonUtils.isNotEmptyObject(item.sInkBOMId) && item.sInkBOMId === materials1Row.sInkBOMId
2295   - && commonUtils.isNotEmptyObject(item.sInkBOMsSlaveId) && item.sInkBOMsSlaveId === materials1Row.sInkBOMsSlaveId &&
  2294 + const materials0ChildData = materials0Data.filter(item => commonUtils.isNotEmptyObject(item.sInkBOMId) && item.sInkBOMId === materials1Row.sInkBOMId
  2295 + && commonUtils.isNotEmptyObject(item.sInkBOMsSlaveId) && item.sInkBOMsSlaveId === materials1Row.sInkBOMsSlaveId &&
2296 2296 commonUtils.isEmptyObject(item.sInkBOMsMaterialsId));
2297 2297  
2298   - if(commonUtils.isNotEmptyArr(materials0ChildData)) {
  2298 + if (commonUtils.isNotEmptyArr(materials0ChildData)) {
2299 2299 materials0ChildData.forEach((item, index) => {
2300 2300 tableSelectedRowKeys.push(item.sId);
2301 2301 });
... ... @@ -2305,14 +2305,14 @@ class QuotationPackTableTree extends Component {
2305 2305 this.props.onSaveState(addState);
2306 2306  
2307 2307 }
2308   - } else if(name === 'materials1' || name === 'materials2' || name === 'materials0Child'){ /* 删除电化铝、油墨子集 */
  2308 + } else if (name === 'materials1' || name === 'materials2' || name === 'materials0Child') { /* 删除电化铝、油墨子集 */
2309 2309 /* 从全部材料里 找到对应数据 进行删除 */
2310 2310 const {
2311   - sModelsId, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Data`]: tableData, materialsConfig, materialsData : materials0Data, token,
  2311 + sModelsId, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, [`${name}Data`]: tableData, materialsConfig, materialsData: materials0Data, token,
2312 2312 } = this.props;
2313   - if(commonUtils.isEmptyArr(tableSelectedRowKeys)) {
  2313 + if (commonUtils.isEmptyArr(tableSelectedRowKeys)) {
2314 2314 message.error('请选择数据!');
2315   - return ;
  2315 + return;
2316 2316 }
2317 2317 const { materialsData, materialsDelData } = this.props.onDataRowDel('materials', true, tableSelectedRowKeys);
2318 2318 const addState = { materialsData, materialsDelData };
... ... @@ -2325,9 +2325,9 @@ class QuotationPackTableTree extends Component {
2325 2325 handleCalculation = async (bSave, nextProps = this.props, isWait) => {
2326 2326 const dataUrl = `${commonConfig.server_host}business/addQuotationsheet?sModelsId=${nextProps.sModelsId}`;
2327 2327 const {
2328   - masterConfig, slaveConfig, slaveDelData, controlConfig, controlDelData, colorConfig,
2329   - colorData, colorDelData, materialsConfig, materialsDelData, processConfig, processDelData,
2330   - app, manyqtysConfig, manyqtysDelData, packConfig, packDelData, manyDataCache = [], dQuickQuoteProductQty,
  2328 + masterConfig, slaveConfig, slaveDelData, controlConfig, controlDelData, colorConfig,
  2329 + colorData, colorDelData, materialsConfig, materialsDelData, processConfig, processDelData,
  2330 + app, manyqtysConfig, manyqtysDelData, packConfig, packDelData, manyDataCache = [], dQuickQuoteProductQty,
2331 2331 } = nextProps;
2332 2332 let {
2333 2333 slaveData, controlData, materialsData, processData, masterData, manyqtysData, packData,
... ... @@ -2340,7 +2340,7 @@ class QuotationPackTableTree extends Component {
2340 2340 data.push(commonBusiness.mergeData('materials', `${materialsConfig.sTbName.toLowerCase()}_tmp`, materialsData, [], true));
2341 2341 data.push(commonBusiness.mergeData('process', `${processConfig.sTbName.toLowerCase()}_tmp`, processData, [], true));
2342 2342  
2343   - if(commonUtils.isNotEmptyObject(manyqtysConfig)) {
  2343 + if (commonUtils.isNotEmptyObject(manyqtysConfig)) {
2344 2344 data.push(commonBusiness.mergeData('manyqtys', `${manyqtysConfig.sTbName.toLowerCase()}_tmp`, manyqtysData?.map(item => {
2345 2345 delete item.manyData;
2346 2346 item.handleType = item.handleType || 'update';
... ... @@ -2357,9 +2357,9 @@ class QuotationPackTableTree extends Component {
2357 2357 if (cacheIndex === -1) {
2358 2358 message.warning(calculating);
2359 2359 }
2360   - const dataReturn = cacheIndex === -1 ?
  2360 + const dataReturn = cacheIndex === -1 ?
2361 2361 (await commonServices.postValueService(this.props.app.token, value, dataUrl)).data
2362   - : manyDataCache[cacheIndex];
  2362 + : manyDataCache[cacheIndex];
2363 2363 if (dataReturn.code === 1) { /* 成功 */
2364 2364 const valueReturn = dataReturn.dataset.rows[0];
2365 2365 const masterDataArr = valueReturn[`${masterConfig.sTbName.toLowerCase()}_tmp`];
... ... @@ -2372,7 +2372,7 @@ class QuotationPackTableTree extends Component {
2372 2372 masterData.sFormId = nextProps.masterData.sFormId;
2373 2373 masterData.sBillNo = nextProps.masterData.sBillNo;
2374 2374 }
2375   - masterData.handleType = masterData.sBillNo ? "update": "add";
  2375 + masterData.handleType = masterData.sBillNo ? "update" : "add";
2376 2376 if (masterData.handleType === 'update' && !commonUtils.isEmpty(sMakePerson)) {
2377 2377 masterData.sMakePerson = sMakePerson;
2378 2378 }
... ... @@ -2394,7 +2394,7 @@ class QuotationPackTableTree extends Component {
2394 2394 });;
2395 2395 processData = this.sortData(controlData, processData);
2396 2396 const addState = {};
2397   - if(commonUtils.isNotEmptyObject(manyqtysConfig)) {
  2397 + if (commonUtils.isNotEmptyObject(manyqtysConfig)) {
2398 2398 const manyqtysDataOld = cloneDeep(manyqtysData);
2399 2399 manyqtysData = valueReturn[`${manyqtysConfig.sTbName.toLowerCase()}_tmp`]?.map((item, index) => {
2400 2400 return {
... ... @@ -2464,7 +2464,7 @@ class QuotationPackTableTree extends Component {
2464 2464 data.push(commonBusiness.mergeData('materials', materialsConfig.sTbName, materialsData, materialsDelData));
2465 2465 data.push(commonBusiness.mergeData('process', processConfig.sTbName, processData, processDelData));
2466 2466  
2467   - if(commonUtils.isNotEmptyObject(manyqtysConfig)) {
  2467 + if (commonUtils.isNotEmptyObject(manyqtysConfig)) {
2468 2468 data.push(commonBusiness.mergeData('manyqtys', manyqtysConfig.sTbName, manyqtysData, manyqtysDelData));
2469 2469 }
2470 2470  
... ... @@ -2474,7 +2474,7 @@ class QuotationPackTableTree extends Component {
2474 2474 data, sClientType: '1', loading: false, sSysLogSrcId: masterData.sId,
2475 2475 });
2476 2476 this.props.onSaveState({
2477   - slaveData, packData, controlData, materialsData, processData, masterData, manyqtysData, ...addState,
  2477 + slaveData, packData, controlData, materialsData, processData, masterData, manyqtysData, ...addState,
2478 2478 });
2479 2479 } else {
2480 2480 if (isWait) {
... ... @@ -2760,24 +2760,24 @@ class QuotationPackTableTree extends Component {
2760 2760 this.props.onSaveData({
2761 2761 data, sClientType: '1', loading: false, sSysLogSrcId: masterData.sId, bIsUnCcg: false,
2762 2762 });
2763   - } else if(name === 'BtnWorkFlow') {
  2763 + } else if (name === 'BtnWorkFlow') {
2764 2764 const dataUrl = `${commonConfig.server_host}workOrderFlow/getWorkOrderFlow/`;
2765   - let {token} = this.props.app
2766   - let { slaveData, controlData, materialsData, processData, packData} = this.props
  2765 + let { token } = this.props.app
  2766 + let { slaveData, controlData, materialsData, processData, packData } = this.props
2767 2767 const value = {
2768   - slave:slaveData,
2769   - control:controlData,
2770   - materials:materialsData,
2771   - process:processData,
2772   - pack:packData
  2768 + slave: slaveData,
  2769 + control: controlData,
  2770 + materials: materialsData,
  2771 + process: processData,
  2772 + pack: packData
2773 2773 }
2774   - let dataReturn = (await commonServices.postValueService(token,value,dataUrl)).data;
  2774 + let dataReturn = (await commonServices.postValueService(token, value, dataUrl)).data;
2775 2775 if (commonUtils.isNotEmptyObject(dataReturn)) {
2776 2776 if (dataReturn.code === 1) {
2777 2777 const flowData = dataReturn.dataset.rows[0];
2778 2778 if (commonUtils.isNotEmptyObject(flowData)) {
2779 2779 this.props.onSaveState({
2780   - flowData: flowData,workFlowVisible:true
  2780 + flowData: flowData, workFlowVisible: true
2781 2781 });
2782 2782 // localStorage.setItem('flow', JSON.stringify(flowData));
2783 2783 }
... ... @@ -2851,6 +2851,11 @@ class QuotationPackTableTree extends Component {
2851 2851 const dataUrl = `${commonConfig.server_host}bill/billCopyToCheck/?sModelsId=${sModelsId}&sActiveId=${sActiveId}&tbSuffix=${tbSuffix}&sName=${formRoute}`;
2852 2852 const values = { sSlaveId: sId };
2853 2853 const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data;
  2854 + if (copyTo.name === 'BtnCopyTo.quoquotation') {
  2855 + const sId = commonUtils.createSid()
  2856 + const newCopyTo = this.deepReplaceString(copyTo, copyTo?.masterData?.sId, sId);
  2857 + copyTo = newCopyTo
  2858 + }
2854 2859 if (dataReturn.code === 1) {
2855 2860 // eslint-disable-next-line no-underscore-dangle
2856 2861 const _this = this; // 解决confirm中this指向问题;
... ... @@ -2879,7 +2884,39 @@ class QuotationPackTableTree extends Component {
2879 2884 },
2880 2885 });
2881 2886 }
  2887 + deepReplaceString = (data, targetVal, newVal) => {
  2888 + const isObj = v => v && typeof v === 'object' && !Array.isArray(v);
  2889 + const isArr = v => Array.isArray(v);
2882 2890  
  2891 + const walk = item => {
  2892 + if (typeof item === 'string') {
  2893 + // 普通字符串直接替换
  2894 + if (item === targetVal) return newVal;
  2895 +
  2896 + //如果是 JSON 字符串,就解析→递归→再 stringify
  2897 + if ((item.startsWith('{') && item.endsWith('}')) || (item.startsWith('[') && item.endsWith(']'))) {
  2898 + try {
  2899 + const parsed = JSON.parse(item);
  2900 + const rebuilt = walk(parsed);
  2901 + return JSON.stringify(rebuilt);
  2902 + } catch (e) {
  2903 + /* 不是合法 JSON,原样返回 */
  2904 + }
  2905 + }
  2906 + return item;
  2907 + }
  2908 +
  2909 + if (isArr(item)) return item.map(walk);
  2910 + if (isObj(item)) {
  2911 + const tmp = {};
  2912 + for (const [k, v] of Object.entries(item)) tmp[k] = walk(v);
  2913 + return tmp;
  2914 + }
  2915 + return item; // 数字、布尔、null 等
  2916 + };
  2917 +
  2918 + return walk(data);
  2919 + }
2883 2920 /* 确定要删除 */
2884 2921 handleOkDel = async (props) => {
2885 2922 /* 数据参数 */
... ... @@ -3000,7 +3037,7 @@ class QuotationPackTableTree extends Component {
3000 3037 }
3001 3038 const sId = sIdArray.toString();
3002 3039 onSendSocketMessage('copyfinish', 'noAction', sId, userinfo.sId, null, null);
3003   - } else if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(masterData.sSrcSlaveId)) {
  3040 + } else if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(masterData.sSrcSlaveId)) {
3004 3041 const sIdArray = [];
3005 3042 /* 处理只有单主表解锁问题 */
3006 3043 sIdArray.push(masterData.sSrcSlaveId);
... ... @@ -3081,7 +3118,7 @@ class QuotationPackTableTree extends Component {
3081 3118 app, sModelsId, token, sModelsType,
3082 3119 } = this.props;
3083 3120 const bCkxCopyFromTechnology = app.systemData.filter(item => item.sName === 'CkxCopyFromTechnology')[0].sValue;
3084   - const bCopyFromProcessCard = (commonUtils.isNotEmptyObject(copyTo.oldFormId) && copyTo.oldFormId === copyTo.newFormId);
  3121 + const bCopyFromProcessCard = (commonUtils.isNotEmptyObject(copyTo.oldFormId) && copyTo.oldFormId === copyTo.newFormId);
3085 3122 if (bCkxCopyFromTechnology === '1' && !bCopyFromProcessCard) {
3086 3123 if (slaveData.length > 1) {
3087 3124 const dataUrl = `${commonConfig.server_host}business/getCopyToQuotationData/?sModelsId=${sModelsId}`;
... ... @@ -4040,7 +4077,7 @@ class QuotationPackTableTree extends Component {
4040 4077 tableDataRow.sSlaveId = ' ';
4041 4078 tableDataRow.sCombinedMemo = '合版信息';
4042 4079 tableDataRow.sAllId = tableDataRow.sId;
4043   - if(commonUtils.isEmptyObject(tableDataRow.sPartsName)) {
  4080 + if (commonUtils.isEmptyObject(tableDataRow.sPartsName)) {
4044 4081 tableDataRow.sPartsName = commonUtils.isNotEmptyArr(slaveData) ? slaveData[0].sProductName : '';
4045 4082 }
4046 4083 let dProductQty = 0;
... ... @@ -4053,7 +4090,7 @@ class QuotationPackTableTree extends Component {
4053 4090 });
4054 4091 tableDataRow.dPartsQty = dProductQty;
4055 4092 /* 点击新增按钮 控制表自动默认增一条 同时默认新增一条合版表 */
4056   - if(commonUtils.isNotEmptyArr(slaveData) && slaveData.length === 1 && commonUtils.isEmptyArr(packData)){
  4093 + if (commonUtils.isNotEmptyArr(slaveData) && slaveData.length === 1 && commonUtils.isEmptyArr(packData)) {
4057 4094 const packDataRow = this.handlePackDataAdd(slaveData[0], 0, tableDataRow.sId, 'add');
4058 4095 packDataRow.dCombineQty = 1;
4059 4096 packData.push(packDataRow);
... ... @@ -4099,7 +4136,7 @@ class QuotationPackTableTree extends Component {
4099 4136 const {
4100 4137 [`${name}Data`]: tableData, [`${name}Config`]: tableConfig, masterConfig, controlSelectedRowKeys, sModelsId, token, slaveSelectedRowKeys, processSelectedRowKeys,
4101 4138 slaveConfig, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, slaveData, controlData, materialsData: materialsDataOld, processData: processDataOld, colorData: colorDataOld,
4102   - controlDelData: controlDelDataOld, materialsDelData: materialsDelDataOld, processDelData: processDelDataOld, colorDelData: colorDelDataOld,slaveDelData: slaveDelDataOld
  4139 + controlDelData: controlDelDataOld, materialsDelData: materialsDelDataOld, processDelData: processDelDataOld, colorDelData: colorDelDataOld, slaveDelData: slaveDelDataOld
4103 4140 } = this.props;
4104 4141 const controlDataOld = controlData.slice(0);
4105 4142 let { masterData } = this.props;
... ... @@ -4121,7 +4158,7 @@ class QuotationPackTableTree extends Component {
4121 4158 const dataUrl = `${commonConfig.server_host}salesorder/getTmpInfoBySql/?sModelsId=${sModelsId}`;
4122 4159 const sConfigformId = commonUtils.isEmpty(selectConfig) ? '' : selectConfig.sParentId;
4123 4160 const sRowData = selectData;
4124   - const sControlName = selectConfig.sControlName; /* 按钮名称 */
  4161 + const sControlName = selectConfig.sControlName; /* 按钮名称 */
4125 4162 // const sSqlCondition = { sId: selectData[0].sSlaveId }; /* 后台根据rowData自己取 */
4126 4163 const condition = { sConfigformId, sControlName, sRowData };
4127 4164 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
... ... @@ -4130,10 +4167,10 @@ class QuotationPackTableTree extends Component {
4130 4167 const returnDataSet = dataReturn.dataset.rows[0];
4131 4168 const returnData = {};
4132 4169 const copyToMasterDetailConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}`.toLowerCase());
4133   - const copyToSlaveDetailConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add','').replace('_edit','').trim() === `${copyTo.name}.slave`.toLowerCase());
4134   - const copyToControlConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add','').replace('_edit','').trim() === `${copyTo.name}.control`.toLowerCase());
4135   - const copyToMaterialsConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add','').replace('_edit','').trim() === `${copyTo.name}.materials`.toLowerCase());
4136   - const copyToProcessConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add','').replace('_edit','').trim() === `${copyTo.name}.process`.toLowerCase());
  4170 + const copyToSlaveDetailConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add', '').replace('_edit', '').trim() === `${copyTo.name}.slave`.toLowerCase());
  4171 + const copyToControlConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add', '').replace('_edit', '').trim() === `${copyTo.name}.control`.toLowerCase());
  4172 + const copyToMaterialsConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add', '').replace('_edit', '').trim() === `${copyTo.name}.materials`.toLowerCase());
  4173 + const copyToProcessConfig = copyTo.config.filter(item => item.sControlName.toLowerCase().replace('_add', '').replace('_edit', '').trim() === `${copyTo.name}.process`.toLowerCase());
4137 4174 const masterDetailAssignField = commonUtils.isNotEmptyArr(copyToMasterDetailConfig) ? copyToMasterDetailConfig[0].sAssignField : '';
4138 4175 const slaveDetailAssignField = commonUtils.isNotEmptyArr(copyToSlaveDetailConfig) ? copyToSlaveDetailConfig[0].sAssignField : '';
4139 4176 const copyToColorConfig = copyTo.config.filter(item => item.sControlName.toLowerCase() === `${copyTo.name}.param`.toLowerCase());
... ... @@ -4143,13 +4180,13 @@ class QuotationPackTableTree extends Component {
4143 4180 const colorAssignField = commonUtils.isNotEmptyArr(copyToColorConfig) ? copyToColorConfig[0].sAssignField : '';
4144 4181  
4145 4182 /* 判断是插入 还是删除 */
4146   - if(commonUtils.isNotEmptyArr(copyToControlConfig)) {
4147   - if(commonUtils.isNotEmptyArr(controlSelectedRowKeys)) {
4148   - if(!copyToControlConfig[0].sControlName.includes('_add') && !copyToControlConfig[0].sControlName.includes('_edit')) { /* 删除 */
  4183 + if (commonUtils.isNotEmptyArr(copyToControlConfig)) {
  4184 + if (commonUtils.isNotEmptyArr(controlSelectedRowKeys)) {
  4185 + if (!copyToControlConfig[0].sControlName.includes('_add') && !copyToControlConfig[0].sControlName.includes('_edit')) { /* 删除 */
4149 4186 controlData = [];
4150 4187 const controlDelData = commonUtils.isEmptyArr(controlDelDataOld) ? [] : controlDelDataOld;
4151 4188 const controlDataFilterData = controlDataOld.filter(obj => controlSelectedRowKeys.includes(obj.sId));
4152   - if(commonUtils.isNotEmptyArr(controlDataFilterData)) {
  4189 + if (commonUtils.isNotEmptyArr(controlDataFilterData)) {
4153 4190 controlDataFilterData.forEach((item) => {
4154 4191 item.handleType = 'del';
4155 4192 controlDelData.push(item);
... ... @@ -4162,12 +4199,12 @@ class QuotationPackTableTree extends Component {
4162 4199 }
4163 4200 }
4164 4201  
4165   - if(commonUtils.isNotEmptyArr(copyToMaterialsConfig)) {
4166   - if(!copyToMaterialsConfig[0].sControlName.includes('_add') && !copyToMaterialsConfig[0].sControlName.includes('_edit')) { /* 删除 */
  4202 + if (commonUtils.isNotEmptyArr(copyToMaterialsConfig)) {
  4203 + if (!copyToMaterialsConfig[0].sControlName.includes('_add') && !copyToMaterialsConfig[0].sControlName.includes('_edit')) { /* 删除 */
4167 4204 materialsData = [];
4168 4205 const materialsDelData = commonUtils.isEmptyArr(materialsDelDataOld) ? [] : materialsDelDataOld;
4169 4206 const materialsDataFilterData = materialsDataOld.filter(obj => controlSelectedRowKeys.includes(obj.sControlId));
4170   - if(commonUtils.isNotEmptyArr(materialsDataFilterData)) {
  4207 + if (commonUtils.isNotEmptyArr(materialsDataFilterData)) {
4171 4208 materialsDataFilterData.forEach((item) => {
4172 4209 item.handleType = 'del';
4173 4210 materialsDelData.push(item);
... ... @@ -4177,12 +4214,12 @@ class QuotationPackTableTree extends Component {
4177 4214 }
4178 4215 }
4179 4216  
4180   - if(commonUtils.isNotEmptyArr(copyToProcessConfig)) {
4181   - if(!copyToProcessConfig[0].sControlName.includes('_add') && !copyToProcessConfig[0].sControlName.includes('_edit')) { /* 删除 */
  4217 + if (commonUtils.isNotEmptyArr(copyToProcessConfig)) {
  4218 + if (!copyToProcessConfig[0].sControlName.includes('_add') && !copyToProcessConfig[0].sControlName.includes('_edit')) { /* 删除 */
4182 4219 processData = [];
4183 4220 const processDelData = commonUtils.isEmptyArr(processDelDataOld) ? [] : processDelDataOld;
4184 4221 const processDataFilterData = processDataOld.filter(obj => controlSelectedRowKeys.includes(obj.sControlId));
4185   - if(commonUtils.isNotEmptyArr(processDataFilterData)) {
  4222 + if (commonUtils.isNotEmptyArr(processDataFilterData)) {
4186 4223 processDataFilterData.forEach((item) => {
4187 4224 item.handleType = 'del';
4188 4225 processDelData.push(item);
... ... @@ -4192,8 +4229,8 @@ class QuotationPackTableTree extends Component {
4192 4229 }
4193 4230 }
4194 4231  
4195   - if(commonUtils.isNotEmptyArr(colorAssignField)) {
4196   - if(!colorAssignField[0].sControlName.includes('_add') && !colorAssignField[0].sControlName.includes('_edit')) { /* 删除 */
  4232 + if (commonUtils.isNotEmptyArr(colorAssignField)) {
  4233 + if (!colorAssignField[0].sControlName.includes('_add') && !colorAssignField[0].sControlName.includes('_edit')) { /* 删除 */
4197 4234 colorData = [];
4198 4235 const colorDelData = commonUtils.isEmptyArr(colorDelDataOld) ? [] : colorDelDataOld;
4199 4236 if (commonUtils.isNotEmptyArr(colorDataOld) && colorDataOld.length > 0) {
... ... @@ -4219,7 +4256,7 @@ class QuotationPackTableTree extends Component {
4219 4256 let iControlIndex = -1;
4220 4257 if (!commonUtils.isEmpty(controlSelectedRowKeys)) {
4221 4258 iControlIndex = controlData.findIndex(item => controlSelectedRowKeys.includes(item.sId));
4222   - if(iControlIndex > -1) {
  4259 + if (iControlIndex > -1) {
4223 4260 controlSelectedRow = controlData[iControlIndex];
4224 4261 }
4225 4262 }
... ... @@ -4241,7 +4278,7 @@ class QuotationPackTableTree extends Component {
4241 4278 }
4242 4279 }
4243 4280 }
4244   - if(commonUtils.isNotEmptyObject(returnDataSet)) {
  4281 + if (commonUtils.isNotEmptyObject(returnDataSet)) {
4245 4282 /* 数据塞到Data中 */
4246 4283 for (const key of Object.keys(returnDataSet)) {
4247 4284 const sName = `${key}Data`;
... ... @@ -4262,7 +4299,7 @@ class QuotationPackTableTree extends Component {
4262 4299 masterData = { ...masterData, ...commonFunc.getAssignFieldValue(masterDetailAssignField, returnData.slaveData[0], newCopyTo) }; // 取赋值字段
4263 4300 }
4264 4301  
4265   - if(commonUtils.isNotEmptyObject(copyToSlaveDetailConfig)) {
  4302 + if (commonUtils.isNotEmptyObject(copyToSlaveDetailConfig)) {
4266 4303 slaveData.forEach((item, iSlaveIndex) => {
4267 4304 if (commonUtils.isNotEmptyArr(returnData.slaveData)) {
4268 4305 item = { ...item, ...commonFunc.getAssignFieldValue(slaveDetailAssignField, returnData.slaveData[0], newCopyTo) }; // 取赋值字段
... ... @@ -4279,12 +4316,12 @@ class QuotationPackTableTree extends Component {
4279 4316 returnData.controlData.forEach((controlItem) => {
4280 4317 newCopyTo.control = controlItem;
4281 4318 let controlRow = commonFunc.getDefaultData(config.controlConfig, newCopyTo); // 取默认值
4282   - if(copyToControlConfig[0].sControlName.includes('_edit')) {
  4319 + if (copyToControlConfig[0].sControlName.includes('_edit')) {
4283 4320 controlRow = { ...controlSelectedRow, ...commonFunc.getAssignFieldValue(controlAssignField, controlItem, newCopyTo) }; // 取赋值字段
4284   - if(iControlIndex > -1) {
4285   - controlData[iControlIndex] = { ...controlSelectedRow, ...controlRow};
  4321 + if (iControlIndex > -1) {
  4322 + controlData[iControlIndex] = { ...controlSelectedRow, ...controlRow };
4286 4323 }
4287   - } else {
  4324 + } else {
4288 4325 controlRow = { ...controlRow, ...commonFunc.getAssignFieldValue(controlAssignField, controlItem, newCopyTo) }; // 取赋值字段
4289 4326 controlRow.handleType = 'add';
4290 4327 controlRow.sId = commonUtils.createSid();
... ... @@ -4505,7 +4542,7 @@ class QuotationPackTableTree extends Component {
4505 4542 config.colorConfig = colorConfig;
4506 4543 config.packConfig = packConfig;
4507 4544  
4508   - const condition = { sCardId: selectData[0].sId, sRowData:selectData };
  4545 + const condition = { sCardId: selectData[0].sId, sRowData: selectData };
4509 4546 const dataUrl = `${commonConfig.server_host}salesorder/getProcessCardDataByCustomIdProductId/?sModelsId=${sModelsId}`;
4510 4547 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
4511 4548 if (dataReturn.code === 1) {
... ... @@ -4576,20 +4613,20 @@ class QuotationPackTableTree extends Component {
4576 4613 if (commonUtils.isNotEmptyArr(returnData.slaveData)) {
4577 4614 returnData.slaveData.forEach((slaveItem, iIndex) => {
4578 4615 /* 从工艺卡数据集 找到从表相同产品ID,客户ID */
4579   - const iSameIndex = slaveData.findIndex(itemCurrent => itemCurrent.sProductId === slaveItem.sProductId && itemCurrent.sCustomerId === slaveItem.sCustomerId);
4580   - if(iSameIndex > -1){
  4616 + const iSameIndex = slaveData.findIndex(itemCurrent => itemCurrent.sProductId === slaveItem.sProductId && itemCurrent.sCustomerId === slaveItem.sCustomerId);
  4617 + if (iSameIndex > -1) {
4581 4618 // masterData = { ...masterData, ...commonFunc.getAssignFieldValue(masterDetailAssignField, slaveItem, newCopyTo) }; // 取赋值字段
4582 4619 slaveData[iSameIndex].sOriginalId = commonUtils.isNotEmptyObject(slaveItem.sSlaveId) ? slaveItem.sSlaveId : slaveItem.sId; /* 原始sId */
4583   - slaveData[iSameIndex] = { ...slaveData[iSameIndex], ...commonFunc.getAssignFieldValue(slaveDetailAssignField,slaveItem, newCopyTo) }; // 取赋值字段
  4620 + slaveData[iSameIndex] = { ...slaveData[iSameIndex], ...commonFunc.getAssignFieldValue(slaveDetailAssignField, slaveItem, newCopyTo) }; // 取赋值字段
4584 4621 if (bProductQtySelf) {
4585 4622 dProductQty += commonUtils.isNull(slaveItem.dProductQty, 0);
4586 4623 } else {
4587 4624 dProductQty += commonUtils.isNull(slaveItem.dProductQty, 0) + commonUtils.isNull(slaveItem.dGiveQty, 0) + commonUtils.isNull(slaveItem.dStockupQty, 0);
4588 4625 }
4589   - } else if(commonUtils.isNotEmptyObject(slaveDetailAssignField)){ /* 其他数据 新增 */
  4626 + } else if (commonUtils.isNotEmptyObject(slaveDetailAssignField)) { /* 其他数据 新增 */
4590 4627 newCopyTo.slave = slaveItem;
4591   - let slaveRow ={};
4592   - slaveRow = { ...slaveRow, ...commonFunc.getAssignFieldValue(slaveDetailAssignField,slaveItem, newCopyTo) }; // 取赋值字段
  4628 + let slaveRow = {};
  4629 + slaveRow = { ...slaveRow, ...commonFunc.getAssignFieldValue(slaveDetailAssignField, slaveItem, newCopyTo) }; // 取赋值字段
4593 4630 slaveRow.handleType = 'add';
4594 4631 slaveRow.sId = commonUtils.createSid();
4595 4632 slaveRow.sParentId = masterData.sId;
... ... @@ -4875,8 +4912,8 @@ class QuotationPackTableTree extends Component {
4875 4912 const treeState = this.handleGetControlTreeData(controlData, true);
4876 4913 /* 因全部材料对应的是materials0 */
4877 4914 const materials0Data = materialsData;
4878   - addState.materials0Data = materials0Data;
4879   - addState.materials0DelData = addState.materialsDelData;
  4915 + addState.materials0Data = materials0Data;
  4916 + addState.materials0DelData = addState.materialsDelData;
4880 4917 this.props.onSaveState({
4881 4918 [`${name}ChooseVisible`]: false,
4882 4919 processData,
... ... @@ -4894,7 +4931,7 @@ class QuotationPackTableTree extends Component {
4894 4931 this.props.getServiceError(dataReturn.msg);
4895 4932 }
4896 4933 }
4897   - }else if (name === 'productProcessInfo' && commonUtils.isNotEmptyObject(selectConfig) && selectConfig.sControlName.includes('mainproductProcessInfo')) { /* 复制从主产品工艺卡 */
  4934 + } else if (name === 'productProcessInfo' && commonUtils.isNotEmptyObject(selectConfig) && selectConfig.sControlName.includes('mainproductProcessInfo')) { /* 复制从主产品工艺卡 */
4898 4935 if (commonUtils.isNotEmptyArr(selectData)) {
4899 4936 const { slaveData: slaveDataOld } = this.props;
4900 4937 const slaveData = [];
... ... @@ -4946,7 +4983,7 @@ class QuotationPackTableTree extends Component {
4946 4983 config.colorConfig = colorConfig;
4947 4984 config.packConfig = packConfig;
4948 4985  
4949   - const condition = { sCardId: selectData[0].sId, sRowData:selectData };
  4986 + const condition = { sCardId: selectData[0].sId, sRowData: selectData };
4950 4987 const dataUrl = `${commonConfig.server_host}salesorder/getProcessCardDataByCustomIdProductId/?sModelsId=${sModelsId}`;
4951 4988 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
4952 4989 if (dataReturn.code === 1) {
... ... @@ -5267,16 +5304,16 @@ class QuotationPackTableTree extends Component {
5267 5304 this.props.getServiceError(dataReturn.msg);
5268 5305 }
5269 5306 }
5270   - }else if (name === 'productProcessInfo' && commonUtils.isNotEmptyObject(selectConfig) && selectConfig.sControlName.includes('subproductProcessInfo')) { /* 复制从子工艺卡*/
  5307 + } else if (name === 'productProcessInfo' && commonUtils.isNotEmptyObject(selectConfig) && selectConfig.sControlName.includes('subproductProcessInfo')) { /* 复制从子工艺卡*/
5271 5308 if (commonUtils.isNotEmptyArr(selectData)) {
5272   - const {slaveSelectedRowKeys, packData}=this.props;
  5309 + const { slaveSelectedRowKeys, packData } = this.props;
5273 5310 let iSlaveIndex = -1;
5274 5311 if (!commonUtils.isEmpty(slaveSelectedRowKeys)) {
5275 5312 iSlaveIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys.toString());
5276 5313 }
5277   - let {controlData} = this.props;
5278   - if(commonUtils.isEmptyArr(controlData)){
5279   - controlData=[]
  5314 + let { controlData } = this.props;
  5315 + if (commonUtils.isEmptyArr(controlData)) {
  5316 + controlData = []
5280 5317 }
5281 5318 const materialsData = [];
5282 5319 const processData = [];
... ... @@ -5288,20 +5325,20 @@ class QuotationPackTableTree extends Component {
5288 5325 const colorDelData = commonUtils.isEmptyArr(colorDelDataOld) ? [] : colorDelDataOld;
5289 5326 /* 选择子产品工艺卡 如果选择的从表的packData合拼的其他的 则不删除 没有合拼产品的 或是合拼产品为1的删除 */
5290 5327 controlDataOld.forEach((item) => {
5291   - const jsonArr =commonUtils.isEmptyObject(item.sCombinedMemo)? []: JSON.parse(item.sCombinedMemo);
5292   - if((jsonArr.length ===1 && jsonArr[0].sProductNo === slaveData[iSlaveIndex].sProductNo)){
  5328 + const jsonArr = commonUtils.isEmptyObject(item.sCombinedMemo) ? [] : JSON.parse(item.sCombinedMemo);
  5329 + if ((jsonArr.length === 1 && jsonArr[0].sProductNo === slaveData[iSlaveIndex].sProductNo)) {
5293 5330 item.handleType = 'del';
5294 5331 controlDelData.push(item);
5295 5332 let tableDataIndex = controlData.findIndex(itemOld => itemOld.sId === item.sId);
5296   - if(tableDataIndex > -1){
  5333 + if (tableDataIndex > -1) {
5297 5334 controlData.splice(tableDataIndex, 1);
5298 5335 }
5299 5336 }
5300 5337 });
5301 5338 addState.controlDelData = controlDelData;
5302 5339 materialsDataOld.forEach((item) => {
5303   - const filterData= controlDelData.filter(itemControl => itemControl.sId.includes(item.sControlId));
5304   - if(commonUtils.isNotEmptyArr(filterData)){
  5340 + const filterData = controlDelData.filter(itemControl => itemControl.sId.includes(item.sControlId));
  5341 + if (commonUtils.isNotEmptyArr(filterData)) {
5305 5342 item.handleType = 'del';
5306 5343 materialsDelData.push(item);
5307 5344 }
... ... @@ -5309,8 +5346,8 @@ class QuotationPackTableTree extends Component {
5309 5346 });
5310 5347 addState.materialsDelData = materialsDelData;
5311 5348 processDataOld.forEach((item) => {
5312   - const filterData= controlDelData.filter(itemControl => itemControl.sId.includes(item.sControlId ));
5313   - if(commonUtils.isNotEmptyArr(filterData)){
  5349 + const filterData = controlDelData.filter(itemControl => itemControl.sId.includes(item.sControlId));
  5350 + if (commonUtils.isNotEmptyArr(filterData)) {
5314 5351 item.handleType = 'del';
5315 5352 processDelData.push(item);
5316 5353 }
... ... @@ -5332,7 +5369,7 @@ class QuotationPackTableTree extends Component {
5332 5369 config.colorConfig = colorConfig;
5333 5370 config.packConfig = packConfig;
5334 5371  
5335   - const condition = { sCardId: selectData[0].sId, sRowData:selectData };
  5372 + const condition = { sCardId: selectData[0].sId, sRowData: selectData };
5336 5373 const dataUrl = `${commonConfig.server_host}salesorder/getProcessCardDataByCustomIdProductId/?sModelsId=${sModelsId}`;
5337 5374 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
5338 5375 if (dataReturn.code === 1) {
... ... @@ -5753,7 +5790,7 @@ class QuotationPackTableTree extends Component {
5753 5790 }
5754 5791 }));
5755 5792 }
5756   - } else if(name ==='materials') {
  5793 + } else if (name === 'materials') {
5757 5794 /* 将工序选中行 作为对应工序给材料 */
5758 5795 const iProcessIndex = commonUtils.isNotEmptyArr(processSelectedRowKeys) ? processDataOld.findIndex(item => item.sId === processSelectedRowKeys[0]) : -1;
5759 5796 let processRow = {};
... ... @@ -5790,7 +5827,7 @@ class QuotationPackTableTree extends Component {
5790 5827 name = 'materials';
5791 5828 }
5792 5829 const {
5793   - [`${name}Data`]: tableData, [`${name}Config`]: tableConfig, controlSelectedRowKeys, materialsConfig,masterConfig,
  5830 + [`${name}Data`]: tableData, [`${name}Config`]: tableConfig, controlSelectedRowKeys, materialsConfig, masterConfig,
5794 5831 } = this.props;
5795 5832 const { masterData } = this.props;
5796 5833 const { controlData } = this.props;
... ... @@ -5853,7 +5890,7 @@ class QuotationPackTableTree extends Component {
5853 5890 const targetname = 'process';
5854 5891 const {
5855 5892 [`${targetname}Data`]: tableData, [`${targetname}Config`]: tableConfig, controlSelectedRowKeys, sModelsId, token,
5856   - materialsConfig, processConfig,masterConfig,
  5893 + materialsConfig, processConfig, masterConfig,
5857 5894 } = this.props;
5858 5895 const { masterData } = this.props;
5859 5896 if (name === 'chooseProductProcess') {
... ... @@ -5998,7 +6035,7 @@ class QuotationPackTableTree extends Component {
5998 6035 }
5999 6036  
6000 6037  
6001   - handleViewChoose= (name, sName, record) => {
  6038 + handleViewChoose = (name, sName, record) => {
6002 6039 const { sId } = record; /* 控制表主键 */
6003 6040 const { enabled, slaveData } = this.props;
6004 6041 let { packData } = this.props;
... ... @@ -6168,11 +6205,11 @@ class QuotationPackTableTree extends Component {
6168 6205 });
6169 6206 } else if (name === 'process' && sName === 'sColorSerialMemo') {
6170 6207 this.props.onViewChoose(name, sName, record);
6171   - } else if(name === 'process' && (sName === 'sParams' || sName ==='sQuoParams')) {
  6208 + } else if (name === 'process' && (sName === 'sParams' || sName === 'sQuoParams')) {
6172 6209 this.props.onViewClick(name, sName, record);
6173 6210 }
6174 6211 }
6175   - handlePackDataAdd= (item, index, sControlId, handleType) => {
  6212 + handlePackDataAdd = (item, index, sControlId, handleType) => {
6176 6213 const tableDataRow = {};
6177 6214 if (handleType === 'add') {
6178 6215 tableDataRow.sId = commonUtils.createSid();
... ... @@ -6404,7 +6441,7 @@ class QuotationPackTableTree extends Component {
6404 6441 tableDataRow.dProfitMoney = commonUtils.convertFixNum(commonUtils.isNull(dProductMoney, 0) - commonUtils.isNull(tableDataRow.dProductTaxMoney, 0) - commonUtils.isNull(tableDataRow.dStandardMoney, 0) - commonUtils.isNull(masterData.dPackMoney, 0) - commonUtils.isNull(masterData.dTransportMoney, 0), dNetMoney);
6405 6442 }
6406 6443 // eslint-disable-next-line no-mixed-operators
6407   - tableDataRow.dProfitRate = commonUtils.isNull(tableDataRow.dStandardMoney, 0) !== 0 ? commonUtils.convertFixNum(commonUtils.isNull(tableDataRow.dProfitMoney, 0) / commonUtils.isNull(tableDataRow.dStandardMoney, 0) * 100, 2) : 0;
  6444 + tableDataRow.dProfitRate = commonUtils.isNull(tableDataRow.dStandardMoney, 0) !== 0 ? commonUtils.convertFixNum(commonUtils.isNull(tableDataRow.dProfitMoney, 0) / commonUtils.isNull(tableDataRow.dStandardMoney, 0) * 100, 2) : 0;
6408 6445 } else if ((sFieldName === 'dProfitRate') && !commonUtils.isEmpty(tableDataRow.dStandardMoney)) {
6409 6446 /* 利润 = 标准金额 dStandMoney * 利润率 dProfitRate */
6410 6447 tableDataRow.dProfitMoney = commonUtils.convertFixNum((commonUtils.isNull(tableDataRow.dStandardMoney, 0)) * (commonUtils.isNull(tableDataRow.dProfitRate, 0) / 100), dNetMoney);
... ... @@ -6516,27 +6553,27 @@ class QuotationPackTableTree extends Component {
6516 6553 packDataRow = this.handlePackDataAdd(tableDataRow, 0, sControlId);
6517 6554 // packDataRow.dCombineQty = 1;
6518 6555 const pIndex = packData.findIndex(item => item.sId === itemPack.sId);
6519   - if (pIndex > -1){
6520   - packData[pIndex] = { ...packData[pIndex], ...packDataRow}; /* 根据选中的从表 找到所有的合版数据,将合版数据中的产品换成切换后的产品 */
  6556 + if (pIndex > -1) {
  6557 + packData[pIndex] = { ...packData[pIndex], ...packDataRow }; /* 根据选中的从表 找到所有的合版数据,将合版数据中的产品换成切换后的产品 */
6521 6558 let sCombinedMemoStr = ''; /* 将控制表合版信息中的产品换成新选择的产品 */
6522   - if(commonUtils.isNotEmptyArr(controlDataNew)) {
  6559 + if (commonUtils.isNotEmptyArr(controlDataNew)) {
6523 6560 const iControlIndex = controlDataNew.findIndex(item => item.sId === sControlId);
6524 6561 if (iControlIndex > -1) {
6525 6562 sCombinedMemoStr = controlDataNew[iControlIndex].sCombinedMemo;
6526   - if(sCombinedMemoStr) {
6527   - const sCombinedMemoArr = commonUtils.isNotEmptyObject(sCombinedMemoStr) ? JSON.parse(sCombinedMemoStr): {};
6528   - if(commonUtils.isNotEmptyArr(sCombinedMemoArr)) {
  6563 + if (sCombinedMemoStr) {
  6564 + const sCombinedMemoArr = commonUtils.isNotEmptyObject(sCombinedMemoStr) ? JSON.parse(sCombinedMemoStr) : {};
  6565 + if (commonUtils.isNotEmptyArr(sCombinedMemoArr)) {
6529 6566 const iIndex = sCombinedMemoArr.findIndex(item => item.sId === itemPack.sId);
6530   - if(iIndex > -1){
6531   - const addState ={};
  6567 + if (iIndex > -1) {
  6568 + const addState = {};
6532 6569 addState.sProductId = tableDataRow.sProductId; /* 产品id */
6533 6570 addState.sCustomerId = tableDataRow.sCustomerId; /* 客户id */
6534 6571 addState.sCustomerName = tableDataRow.sCustomerName; /* 客户名称 */
6535 6572 addState.sProductName = tableDataRow.sProductName; /* 产品名称 */
6536 6573 addState.sProductNo = tableDataRow.sProductNo; /* 产品编号 */
6537   - sCombinedMemoArr[iIndex] ={...sCombinedMemoArr[iIndex], ...addState};
  6574 + sCombinedMemoArr[iIndex] = { ...sCombinedMemoArr[iIndex], ...addState };
6538 6575 const sCombinedMemo = commonUtils.isNotEmptyArr(sCombinedMemoArr) ? JSON.stringify(sCombinedMemoArr) : ''; /* JSON对象转换为字符串存放到合版信息中 */
6539   - controlDataNew[iControlIndex].sCombinedMemo =sCombinedMemo;
  6576 + controlDataNew[iControlIndex].sCombinedMemo = sCombinedMemo;
6540 6577 controlDataNew[iControlIndex].sPartsName = tableDataRow.sProductName;
6541 6578 }
6542 6579 }
... ... @@ -6608,19 +6645,19 @@ class QuotationPackTableTree extends Component {
6608 6645 tableDataRow.iOppositeColor = tableDataRow.iPositiveColor;
6609 6646 tableDataRow.iOppositeSpecialColor = tableDataRow.iPositiveSpecialColor;
6610 6647 }
6611   - } else if ( sFieldName === 'dSinglePQty' ) { /* 排版数改变时 如果该控制表合版数据只有一条 则改变packData该条的拼版数 改变备注 */
6612   - if(commonUtils.isNotEmptyArr(packData)){
  6648 + } else if (sFieldName === 'dSinglePQty') { /* 排版数改变时 如果该控制表合版数据只有一条 则改变packData该条的拼版数 改变备注 */
  6649 + if (commonUtils.isNotEmptyArr(packData)) {
6613 6650 const packFilterData = packData.filter(item => item.sControlId === tableDataRow.sId);
6614   - if (commonUtils.isNotEmptyArr(packFilterData) && packFilterData.length ===1 ) {
  6651 + if (commonUtils.isNotEmptyArr(packFilterData) && packFilterData.length === 1) {
6615 6652 const iIndex = packData.findIndex(itemPack => itemPack.sId === packFilterData[0].sId);
6616   - const addState ={};
6617   - if(tableDataRow.dSinglePQty > 0){
  6653 + const addState = {};
  6654 + if (tableDataRow.dSinglePQty > 0) {
6618 6655 addState.dCombineQty = tableDataRow.dSinglePQty;
6619 6656 addState.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType;
6620   - if(iIndex > -1) {
6621   - packData[iIndex] ={ ...packData[iIndex] , ...addState};
6622   - const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty,sCombinePartsName }= packData[iIndex];
6623   - const tableCombineSelectedData =[];
  6657 + if (iIndex > -1) {
  6658 + packData[iIndex] = { ...packData[iIndex], ...addState };
  6659 + const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty, sCombinePartsName } = packData[iIndex];
  6660 + const tableCombineSelectedData = [];
6624 6661 const jsonObj = {};
6625 6662 jsonObj.sId = sId;
6626 6663 jsonObj.sProductNo = sProductNo; /* 产品编号 */
... ... @@ -6630,7 +6667,7 @@ class QuotationPackTableTree extends Component {
6630 6667 jsonObj.sCombinePartsName = sCombinePartsName; /* 合版部件名称 */
6631 6668 tableCombineSelectedData.push(jsonObj);
6632 6669 const sCombinedMemo = commonUtils.isNotEmptyArr(tableCombineSelectedData) ? JSON.stringify(tableCombineSelectedData) : ''; /* JSON对象转换为字符串存放到合版信息中 */
6633   - tableDataRow.sCombinedMemo =commonUtils.isNotEmptyObject(sCombinedMemo)? sCombinedMemo: '合版信息';
  6670 + tableDataRow.sCombinedMemo = commonUtils.isNotEmptyObject(sCombinedMemo) ? sCombinedMemo : '合版信息';
6634 6671 }
6635 6672 }
6636 6673 }
... ... @@ -6648,8 +6685,8 @@ class QuotationPackTableTree extends Component {
6648 6685 }
6649 6686 });
6650 6687 }
6651   - if(sFieldName === 'dPartsLength' || sFieldName === 'dPartsWidth' || sFieldName === 'dMachineLength' || sFieldName === 'dMachineWidth'
6652   - || sFieldName === 'sPrintingPlate' || sFieldName === 'sCutMethod' || sFieldName === 'sSpineDirection' || sFieldName === 'iPrintMode' || sFieldName === 'dBite' || sFieldName === 'dBlood' ) {
  6688 + if (sFieldName === 'dPartsLength' || sFieldName === 'dPartsWidth' || sFieldName === 'dMachineLength' || sFieldName === 'dMachineWidth'
  6689 + || sFieldName === 'sPrintingPlate' || sFieldName === 'sCutMethod' || sFieldName === 'sSpineDirection' || sFieldName === 'iPrintMode' || sFieldName === 'dBite' || sFieldName === 'dBlood') {
6653 6690 /* 计算材料开数 */
6654 6691 if (true) {
6655 6692 // if (commonUtils.isNotEmptyArr(slaveData)) {
... ... @@ -6663,7 +6700,7 @@ class QuotationPackTableTree extends Component {
6663 6700  
6664 6701  
6665 6702 let slaveDataRow = {};
6666   - if(commonUtils.isNotEmptyArr(slaveData)) {
  6703 + if (commonUtils.isNotEmptyArr(slaveData)) {
6667 6704 if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) {
6668 6705 slaveDataRow = slaveData[0];
6669 6706 } else if (commonUtils.isEmptyObject(tableDataRow.sCombinedMemo) || tableDataRow.sCombinedMemo === '合版信息') {
... ... @@ -6678,16 +6715,16 @@ class QuotationPackTableTree extends Component {
6678 6715 }
6679 6716 }
6680 6717 }
6681   - if(commonUtils.isNotEmptyObject(slaveDataRow)) {
  6718 + if (commonUtils.isNotEmptyObject(slaveDataRow)) {
6682 6719 /* 如果有展开尺寸 则取展开尺寸 否则取产品规格 */
6683 6720 let sProductStyle = '';
6684   - if(slaveDataRow.sPartsStyle) {
  6721 + if (slaveDataRow.sPartsStyle) {
6685 6722 sProductStyle = slaveDataRow.sPartsStyle;
6686   - }else if(slaveDataRow.sProductStyle) {
  6723 + } else if (slaveDataRow.sProductStyle) {
6687 6724 sProductStyle = slaveDataRow.sProductStyle;
6688 6725 }
6689 6726 if (sProductStyle) {
6690   - let dProductLength = !commonUtils.isEmpty(sProductStyle) && sProductStyle.split('*').length > 1 ? sProductStyle.split('*')[0] : 0;
  6727 + let dProductLength = !commonUtils.isEmpty(sProductStyle) && sProductStyle.split('*').length > 1 ? sProductStyle.split('*')[0] : 0;
6691 6728 dProductLength = commonUtils.convertStrToNumber(commonUtils.isNull(dProductLength, 0)); /* 产品长 */
6692 6729 dProductLength = (typeof dProductLength === 'number' && !isNaN(dProductLength)) ? dProductLength : 0; /* 产品长 */
6693 6730 let dProductWidth = !commonUtils.isEmpty(sProductStyle) && sProductStyle.split('*').length > 1 ? sProductStyle.split('*')[1] : 0;
... ... @@ -6736,18 +6773,18 @@ class QuotationPackTableTree extends Component {
6736 6773 // }
6737 6774 // }
6738 6775  
6739   - if(commonUtils.isNotEmptyArr(packData)){
  6776 + if (commonUtils.isNotEmptyArr(packData)) {
6740 6777 const packFilterData = packData.filter(item => item.sControlId === tableDataRow.sId);
6741   - if (commonUtils.isNotEmptyArr(packFilterData) && packFilterData.length ===1 ) {
  6778 + if (commonUtils.isNotEmptyArr(packFilterData) && packFilterData.length === 1) {
6742 6779 const iIndex = packData.findIndex(itemPack => itemPack.sId === packFilterData[0].sId);
6743   - const addState ={};
6744   - if(tableDataRow.dSinglePQty > 0){
  6780 + const addState = {};
  6781 + if (tableDataRow.dSinglePQty > 0) {
6745 6782 addState.dCombineQty = tableDataRow.dSinglePQty;
6746 6783 addState.handleType = commonUtils.isEmpty(tableDataRow.handleType) ? 'update' : tableDataRow.handleType;
6747   - if(iIndex > -1) {
6748   - packData[iIndex] ={ ...packData[iIndex] , ...addState};
6749   - const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty,sCombinePartsName }= packData[iIndex];
6750   - const tableCombineSelectedData =[];
  6784 + if (iIndex > -1) {
  6785 + packData[iIndex] = { ...packData[iIndex], ...addState };
  6786 + const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty, sCombinePartsName } = packData[iIndex];
  6787 + const tableCombineSelectedData = [];
6751 6788 const jsonObj = {};
6752 6789 jsonObj.sId = sId;
6753 6790 jsonObj.sProductNo = sProductNo; /* 产品编号 */
... ... @@ -6757,17 +6794,17 @@ class QuotationPackTableTree extends Component {
6757 6794 jsonObj.sCombinePartsName = sCombinePartsName; /* 合版部件名称 */
6758 6795 tableCombineSelectedData.push(jsonObj);
6759 6796 const sCombinedMemo = commonUtils.isNotEmptyArr(tableCombineSelectedData) ? JSON.stringify(tableCombineSelectedData) : ''; /* JSON对象转换为字符串存放到合版信息中 */
6760   - tableDataRow.sCombinedMemo =commonUtils.isNotEmptyObject(sCombinedMemo)? sCombinedMemo: '合版信息';
  6797 + tableDataRow.sCombinedMemo = commonUtils.isNotEmptyObject(sCombinedMemo) ? sCombinedMemo : '合版信息';
6761 6798 }
6762 6799 }
6763 6800 }
6764 6801 } else { /* packData没数据时 */
6765 6802 const packDataRow = this.handlePackDataAdd(slaveDataRow, 0, tableDataRow.sId, 'add');
6766 6803 packDataRow.dCombineQty = tableDataRow.dSinglePQty;
6767   - packDataRow.dFactProductQty = commonUtils.isNull(slaveDataRow.dProductQty, 0); /* 排版数为1时,实际生产数 = 产品数 */
  6804 + packDataRow.dFactProductQty = commonUtils.isNull(slaveDataRow.dProductQty, 0); /* 排版数为1时,实际生产数 = 产品数 */
6768 6805 if (tableDataRow.dSinglePQty > 0) {
6769   - const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty,sCombinePartsName }= packDataRow;
6770   - const tableCombineSelectedData =[];
  6806 + const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty, sCombinePartsName } = packDataRow;
  6807 + const tableCombineSelectedData = [];
6771 6808 const jsonObj = {};
6772 6809 jsonObj.sId = sId;
6773 6810 jsonObj.sProductNo = sProductNo; /* 产品编号 */
... ... @@ -6777,7 +6814,7 @@ class QuotationPackTableTree extends Component {
6777 6814 jsonObj.sCombinePartsName = sCombinePartsName; /* 合版部件名称 */
6778 6815 tableCombineSelectedData.push(jsonObj);
6779 6816 const sCombinedMemo = commonUtils.isNotEmptyArr(tableCombineSelectedData) ? JSON.stringify(tableCombineSelectedData) : ''; /* JSON对象转换为字符串存放到合版信息中 */
6780   - tableDataRow.sCombinedMemo =commonUtils.isNotEmptyObject(sCombinedMemo)? sCombinedMemo: '合版信息';
  6817 + tableDataRow.sCombinedMemo = commonUtils.isNotEmptyObject(sCombinedMemo) ? sCombinedMemo : '合版信息';
6781 6818 packData.push(packDataRow);
6782 6819 }
6783 6820 }
... ... @@ -6911,20 +6948,20 @@ class QuotationPackTableTree extends Component {
6911 6948 }
6912 6949 }
6913 6950 this.props.onSaveState({ [`${name}Data`]: tableData });
6914   - }else if (name === 'materials0' || name === 'materials1' || name === 'materials2' || name === 'materials0Child') {
  6951 + } else if (name === 'materials0' || name === 'materials1' || name === 'materials2' || name === 'materials0Child') {
6915 6952 name = 'materials';
6916 6953 const {
6917 6954 [`${name}Data`]: tableData, controlData, controlSelectedRowKeys, materials0Data, materials0SelectedRowKeys,
6918 6955 } = this.props;
6919 6956 let oldRowMap = {};
6920   - if(sFieldName === 'sInkBOM') {
  6957 + if (sFieldName === 'sInkBOM') {
6921 6958 const iOldIndex = tableData.findIndex(item => item.sId === sId);
6922   - if(iOldIndex > -1) {
  6959 + if (iOldIndex > -1) {
6923 6960 const tableDataOldRow = JSON.parse(JSON.stringify(tableData[iOldIndex]));
6924   - oldRowMap ={
6925   - sInkBOMId : tableDataOldRow.sInkBOMId,
6926   - sInkBOMsSlaveId : tableDataOldRow.sInkBOMsSlaveId,
6927   - sInkBOMsMaterialsId : tableDataOldRow.sInkBOMsMaterialsId,
  6961 + oldRowMap = {
  6962 + sInkBOMId: tableDataOldRow.sInkBOMId,
  6963 + sInkBOMsSlaveId: tableDataOldRow.sInkBOMsSlaveId,
  6964 + sInkBOMsMaterialsId: tableDataOldRow.sInkBOMsMaterialsId,
6928 6965 }
6929 6966 }
6930 6967 }
... ... @@ -6938,7 +6975,7 @@ class QuotationPackTableTree extends Component {
6938 6975 tableData[iIndex] = tableDataRow;
6939 6976 }
6940 6977 this.props.onSaveState({ [`${name}Data`]: tableData });
6941   - }else if ( name === 'materialsChild') { /* 替代料 */
  6978 + } else if (name === 'materialsChild') { /* 替代料 */
6942 6979 name = 'materials';
6943 6980 const {
6944 6981 [`${name}Data`]: tableData, controlData, controlSelectedRowKeys, materials0Data, materials0SelectedRowKeys,
... ... @@ -7183,7 +7220,7 @@ class QuotationPackTableTree extends Component {
7183 7220 handleCancelProductCombinationChooseModal = () => {
7184 7221 this.props.onSaveState({ productCombinationVisible: false });
7185 7222 };
7186   - handleSelectProductCombination= () => {
  7223 + handleSelectProductCombination = () => {
7187 7224 const {
7188 7225 controlData, sCombinationsControlId, packData, enabled, app,
7189 7226 } = this.props;
... ... @@ -7409,7 +7446,7 @@ class QuotationPackTableTree extends Component {
7409 7446 });
7410 7447 }
7411 7448 this.props.onSaveState({
7412   - [`${name}Data`]: tableData, [`${name}Pagination`]: { ...tablePagination, total: tableData.length, current: 9999 }, [`${name}SelectedRowKeys`]: tableSelectedNewRowKeys, treeSelectedKeys: tableSelectedNewRowKeys, packData,...treeState,
  7449 + [`${name}Data`]: tableData, [`${name}Pagination`]: { ...tablePagination, total: tableData.length, current: 9999 }, [`${name}SelectedRowKeys`]: tableSelectedNewRowKeys, treeSelectedKeys: tableSelectedNewRowKeys, packData, ...treeState,
7413 7450 });
7414 7451 }
7415 7452 }
... ... @@ -7588,12 +7625,12 @@ class QuotationPackTableTree extends Component {
7588 7625 commonUtils.isNull(tableDataRow.iOppositeSpecialColor, 0));
7589 7626 } else {
7590 7627 if (tableDataRow.iPrintModePo !== 2) { // 单面样本
7591   - tableDataRow.dPlateQty = Math.ceil( (commonUtils.isNull(tableDataRow.dSumPQty, 0) * 0.5) / tableDataRow.dSinglePQty);
  7628 + tableDataRow.dPlateQty = Math.ceil((commonUtils.isNull(tableDataRow.dSumPQty, 0) * 0.5) / tableDataRow.dSinglePQty);
7592 7629 tableDataRow.iStick = Math.ceil(tableDataRow.dPlateQty);
7593 7630 tableDataRow.dSumPlateQty = tableDataRow.iStick * (commonUtils.isNull(tableDataRow.iPositiveColor, 0) +
7594 7631 commonUtils.isNull(tableDataRow.iPositiveSpecialColor, 0));
7595 7632 } else {
7596   - tableDataRow.dPlateQty = Math.ceil(commonUtils.isNull(tableDataRow.dSumPQty, 0) / commonUtils.isNull(commonUtils.nullIf(tableDataRow.dSinglePQty, 0), 1));
  7633 + tableDataRow.dPlateQty = Math.ceil(commonUtils.isNull(tableDataRow.dSumPQty, 0) / commonUtils.isNull(commonUtils.nullIf(tableDataRow.dSinglePQty, 0), 1));
7597 7634 tableDataRow.iStick = Math.ceil(tableDataRow.dPlateQty / 2);
7598 7635 }
7599 7636 tableDataRow.dSumPlateQty = tableDataRow.iStick * (
... ... @@ -7786,12 +7823,12 @@ class QuotationPackTableTree extends Component {
7786 7823  
7787 7824 /* 主产品选中时 清除所有表格选中 */
7788 7825 handleTotalTreeSelect = (name, checkedKeys, e) => {
7789   - const bMainProduct = (e && e.node && e.node.treeNode) ? e.node.treeNode.isRoot: false; /* 主产品 */
  7826 + const bMainProduct = (e && e.node && e.node.treeNode) ? e.node.treeNode.isRoot : false; /* 主产品 */
7790 7827 this.props.onTreeSelect(name, checkedKeys, e);
7791   - if(bMainProduct){
  7828 + if (bMainProduct) {
7792 7829 this.props.onSaveState({
7793   - slaveSelectedRowKeys:[],
7794   - controlSelectedRowKeys:[],
  7830 + slaveSelectedRowKeys: [],
  7831 + controlSelectedRowKeys: [],
7795 7832 });
7796 7833 }
7797 7834 };
... ... @@ -7845,15 +7882,15 @@ class QuotationPackTableTree extends Component {
7845 7882  
7846 7883 handleDrag = (data) => {
7847 7884 let { controlSelectedRowKeys } = this.props;
7848   - if(this.props.enabled && controlSelectedRowKeys.length) {
7849   - if(true) {
  7885 + if (this.props.enabled && controlSelectedRowKeys.length) {
  7886 + if (true) {
7850 7887 // process : 0-1-2 部品工序 : 3成品工序;
7851 7888 let processData = this.props.processData.slice(0);
7852 7889  
7853 7890 let preDataIndex = 0;
7854 7891 let preData = data.filter(item => item.sControlId === this.props.controlSelectedRowKeys[0]).map((item) => {
7855 7892 preDataIndex = preDataIndex + 1;
7856   - return {...item, iOrder: preDataIndex}
  7893 + return { ...item, iOrder: preDataIndex }
7857 7894 });
7858 7895  
7859 7896 // let afterDataIndex = 0;
... ... @@ -7863,56 +7900,56 @@ class QuotationPackTableTree extends Component {
7863 7900 // });
7864 7901 let allData = preData; //.concat(afterData);
7865 7902 allData.forEach((item, index) => {
7866   - if(item.sControlId === this.props.controlSelectedRowKeys[0]) {
7867   - if(!allData[index].handleType) {
  7903 + if (item.sControlId === this.props.controlSelectedRowKeys[0]) {
  7904 + if (!allData[index].handleType) {
7868 7905 allData[index].handleType = 'update';
7869 7906 }
7870 7907 }
7871 7908 });
7872 7909 processData = processData.filter(item => item.sControlId !== this.props.controlSelectedRowKeys[0]);
7873 7910 processData = processData.concat(allData);
7874   - this.props.onSaveState({ processData});
  7911 + this.props.onSaveState({ processData });
7875 7912 } else {
7876 7913 // process : 0-1-2 部品工序 : 3成品工序;
7877 7914 let processData = this.props.processData.slice(0);
7878 7915 let preDataIndex = 0;
7879 7916 let preData = data.filter(item => item.sType === '0' && item.sControlId === this.props.controlSelectedRowKeys[0]).map((item) => {
7880 7917 preDataIndex = preDataIndex + 1;
7881   - return {...item, iOrder: preDataIndex}
  7918 + return { ...item, iOrder: preDataIndex }
7882 7919 });
7883 7920 let inDataIndex = 0;
7884 7921 let inData = data.filter(item => item.sType === '1' && item.sControlId === this.props.controlSelectedRowKeys[0]).map((item) => {
7885 7922 inDataIndex = inDataIndex + 1;
7886   - return {...item, iOrder: inDataIndex}
  7923 + return { ...item, iOrder: inDataIndex }
7887 7924 });
7888 7925 let afterDataIndex = 0;
7889 7926 let afterData = data.filter(item => item.sType === '2' && item.sControlId === this.props.controlSelectedRowKeys[0]).map((item) => {
7890 7927 afterDataIndex = afterDataIndex + 1;
7891   - return {...item, iOrder: afterDataIndex}
  7928 + return { ...item, iOrder: afterDataIndex }
7892 7929 });
7893 7930 let allData = preData.concat(inData, afterData);
7894 7931 allData.forEach((item, index) => {
7895   - if(item.sControlId === this.props.controlSelectedRowKeys[0]) {
7896   - if(!allData[index].handleType) {
  7932 + if (item.sControlId === this.props.controlSelectedRowKeys[0]) {
  7933 + if (!allData[index].handleType) {
7897 7934 allData[index].handleType = 'update';
7898 7935 }
7899 7936 }
7900 7937 });
7901 7938 processData = processData.filter(item => item.sControlId !== this.props.controlSelectedRowKeys[0]);
7902 7939 processData = processData.concat(allData);
7903   - this.props.onSaveState({ processData});
  7940 + this.props.onSaveState({ processData });
7904 7941 }
7905 7942 }
7906 7943 }
7907 7944  
7908 7945 handleProductDrag = (data) => {
7909   - if(this.props.enabled) {
  7946 + if (this.props.enabled) {
7910 7947 // process : 0-1-2 部品工序 : 3成品工序;
7911 7948 let processData = this.props.processData.slice(0);
7912 7949 let dataIndex = 0;
7913 7950 const allData = data.filter(item => item.sType === '3' && item.sCombinePartsName === this.props.slaveSelectedRowKeys[0]).map((item) => {
7914 7951 dataIndex = dataIndex + 1;
7915   - return {...item, iOrder: dataIndex, handleType: item.handleType ? item.handleType : 'update'};
  7952 + return { ...item, iOrder: dataIndex, handleType: item.handleType ? item.handleType : 'update' };
7916 7953 });
7917 7954 processData = processData.filter(item => item.sCombinePartsName !== this.props.slaveSelectedRowKeys[0]);
7918 7955 processData = processData.concat(allData);
... ... @@ -8010,7 +8047,7 @@ const QuotationComponent = Form.create({
8010 8047 })((props) => {
8011 8048 const {
8012 8049 form, onReturnForm, masterConfig: masterConfigOld, slaveData, slavePagination, sModelsId, sTabId, app, Loading, colorConfigGrdVisible, productCombinationVisible, combinePartsChooseVisible,
8013   - sisColorChooseVisible, finishedMaterialsColumn, finishedMaterialsConfig, finishedProcessColumn, finishedProcessConfig, isLayout, isLayout2,visible, checkConditions, checkPersonData, sModelsType,
  8050 + sisColorChooseVisible, finishedMaterialsColumn, finishedMaterialsConfig, finishedProcessColumn, finishedProcessConfig, isLayout, isLayout2, visible, checkConditions, checkPersonData, sModelsType,
8014 8051 formData,
8015 8052 materialsInfoList,
8016 8053 materialsChildInfoList,
... ... @@ -8020,12 +8057,12 @@ const QuotationComponent = Form.create({
8020 8057 } = props;
8021 8058 // 关联slave合版进行筛选control的数据
8022 8059 let controlTableData = [];
8023   - if(commonBusiness.getTableTypes('control', props).data && commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.slaveData)) {
  8060 + if (commonBusiness.getTableTypes('control', props).data && commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.slaveData)) {
8024 8061 const iSlaveIndex = props.slaveData.findIndex(item => item.sId === props.slaveSelectedRowKeys[0]);
8025   - const slaveSelectedRow = props.slaveData[iSlaveIndex] || {sProductNo: 0};
8026   - if(iSlaveIndex !== -1) {
  8062 + const slaveSelectedRow = props.slaveData[iSlaveIndex] || { sProductNo: 0 };
  8063 + if (iSlaveIndex !== -1) {
8027 8064 commonBusiness.getTableTypes('control', props).data.forEach(item => {
8028   - if(item.sCombinedMemo && item.sCombinedMemo !== '' && item.sCombinedMemo !== '合版信息') {
  8065 + if (item.sCombinedMemo && item.sCombinedMemo !== '' && item.sCombinedMemo !== '合版信息') {
8029 8066 const sCombinedMemoArr = commonUtils.isJSON(item.sCombinedMemo) ? JSON.parse(item.sCombinedMemo) : [];
8030 8067 const getSlaveSelectedRowChildren = (allData, sId) => {
8031 8068 let result = [];
... ... @@ -8040,7 +8077,7 @@ const QuotationComponent = Form.create({
8040 8077 const slaveSelectedRowChildren = getSlaveSelectedRowChildren(props.slaveData, slaveSelectedRow.sId);
8041 8078 const slaveRows = [slaveSelectedRow, ...slaveSelectedRowChildren];
8042 8079 const len = sCombinedMemoArr.filter(item => item.sProductNo && slaveRows.some(slaveRow => slaveRow.sProductNo === item.sProductNo)).length;
8043   - if(len) {
  8080 + if (len) {
8044 8081 controlTableData.push(item);
8045 8082 }
8046 8083 } else {
... ... @@ -8052,8 +8089,8 @@ const QuotationComponent = Form.create({
8052 8089 }
8053 8090 }
8054 8091 // 之前代码默认会选中第一行,第一行可能已经被筛选掉,需要判断
8055   - if(controlTableData.length && props.controlSelectedRowKeys[0] !== controlTableData[0].sId && controlTableData.map(item => item.sId).indexOf(props.controlSelectedRowKeys[0]) === -1) {
8056   - if(commonUtils.isNotEmptyArr(props.slaveSelectedRowKeys)) {
  8092 + if (controlTableData.length && props.controlSelectedRowKeys[0] !== controlTableData[0].sId && controlTableData.map(item => item.sId).indexOf(props.controlSelectedRowKeys[0]) === -1) {
  8093 + if (commonUtils.isNotEmptyArr(props.slaveSelectedRowKeys)) {
8057 8094 props.onSaveState({
8058 8095 controlSelectedRowKeys: [controlTableData[0].sId]
8059 8096 });
... ... @@ -8066,7 +8103,7 @@ const QuotationComponent = Form.create({
8066 8103 const slaveLen = props.slaveData ? props.slaveData.length : 0;
8067 8104 let stickyHeight = 0;
8068 8105 let stickyTabHeight = 0;
8069   - if(layoutChange) {
  8106 + if (layoutChange) {
8070 8107 if (controlLen && controlLen < 5) {
8071 8108 stickyTabHeight += (slaveLen * 29) + 40;
8072 8109 stickyHeight += (controlLen * 29) + 40 + 30 - 4;
... ... @@ -8075,7 +8112,7 @@ const QuotationComponent = Form.create({
8075 8112 }
8076 8113 stickyHeight += 40;
8077 8114 } else {
8078   - if(props.currentTab === 1) {
  8115 + if (props.currentTab === 1) {
8079 8116 if (controlLen && controlLen < 5) {
8080 8117 stickyHeight = (controlLen * 29) + 40 + 30 - 4; // 153
8081 8118 } else {
... ... @@ -8284,11 +8321,11 @@ const QuotationComponent = Form.create({
8284 8321 bRowClick: true
8285 8322 };
8286 8323  
8287   - let bShowMaterials = true;
  8324 + let bShowMaterials = true;
8288 8325 const iMaterialsIndex = props && props.masterConfig ? props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnChooseMaterials') : -1;
8289 8326 bShowMaterials = iMaterialsIndex > -1;
8290 8327  
8291   - let bShowProcess = true;
  8328 + let bShowProcess = true;
8292 8329 const iProcessIndex = props && props.masterConfig ? props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnChooseProcess') : -1;
8293 8330 bShowProcess = iProcessIndex > -1;
8294 8331  
... ... @@ -8373,7 +8410,7 @@ const QuotationComponent = Form.create({
8373 8410 showLine: true,
8374 8411 };
8375 8412  
8376   - /* 整体树结构 */
  8413 + /* 整体树结构 */
8377 8414 const totalname = 'totalTree';
8378 8415 const totalTreeProps = {
8379 8416 ...commonBusiness.getTreeTypes('totalTree', props),
... ... @@ -8455,7 +8492,7 @@ const QuotationComponent = Form.create({
8455 8492 return val.sType !== '3';
8456 8493 });
8457 8494 }
8458   - if(isQianCai) {
  8495 + if (isQianCai) {
8459 8496 const pre = res.filter(item => item.sType == '0').sort((a, b) => a.iOrder - b.iOrder);
8460 8497 const after = res.filter(item => (item.sType == '1' || item.sType == '2')).sort((a, b) => a.iOrder - b.iOrder);
8461 8498 res = pre.concat(after);
... ... @@ -8478,37 +8515,37 @@ const QuotationComponent = Form.create({
8478 8515 // materials : 0-1部件材料 : 2成品材料;
8479 8516 // process : 0-1-2 部品工序 : 3成品工序;
8480 8517 // bfinal: 是否成品
8481   - const { materialsData, materials0Data, processSelectedRowKeys, processData, controlSelectedRowKeys, controlData } = props;
  8518 + const { materialsData, materials0Data, processSelectedRowKeys, processData, controlSelectedRowKeys, controlData } = props;
8482 8519 let oriData = commonUtils.isNotEmptyArr(data.data) ? data.data : [];
8483 8520 let res = [];
8484 8521 let newData = [];
8485 8522 let processRow = {};
8486 8523 let controlRow = {};
8487 8524  
8488   - if(commonUtils.isNotEmptyArr(controlData) && commonUtils.isNotEmptyArr(controlSelectedRowKeys)){ /* 没有工序选中行 则不进行数据过滤 */
  8525 + if (commonUtils.isNotEmptyArr(controlData) && commonUtils.isNotEmptyArr(controlSelectedRowKeys)) { /* 没有工序选中行 则不进行数据过滤 */
8489 8526 const iIndex = controlData.findIndex(item => controlSelectedRowKeys.includes(item.sId));
8490   - if(iIndex > -1) {
  8527 + if (iIndex > -1) {
8491 8528 controlRow = controlData[iIndex];
8492 8529 }
8493 8530 }
8494 8531  
8495   - if(commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyArr(processSelectedRowKeys)){ /* 没有工序选中行 则不进行数据过滤 */
  8532 + if (commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyArr(processSelectedRowKeys)) { /* 没有工序选中行 则不进行数据过滤 */
8496 8533 const iIndex = processData.findIndex(item => processSelectedRowKeys.includes(item.sId));
8497   - if(iIndex > -1) {
  8534 + if (iIndex > -1) {
8498 8535 processRow = processData[iIndex];
8499 8536 }
8500 8537 }
8501 8538 if (type === 'materials') {
8502 8539 /* 根据工序表选中行的部件id +工序id 过滤全部材料数据 */
8503   - if(commonUtils.isNotEmptyObject(processRow)){
8504   - const filterData = oriData.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId
  8540 + if (commonUtils.isNotEmptyObject(processRow)) {
  8541 + const filterData = oriData.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId
8505 8542 && commonUtils.isEmptyObject(item.sParentMaterialsId));
8506 8543 if (commonUtils.isNotEmptyArr(filterData)) {
8507 8544 newData = filterData;
8508 8545 }
8509 8546 res = newData;
8510   - } else if(commonUtils.isNotEmptyObject(controlRow)){
8511   - const filterData = oriData.filter(item => item.sControlId === controlRow.sId && commonUtils.isEmptyObject(item.sParentMaterialsId) );
  8547 + } else if (commonUtils.isNotEmptyObject(controlRow)) {
  8548 + const filterData = oriData.filter(item => item.sControlId === controlRow.sId && commonUtils.isEmptyObject(item.sParentMaterialsId));
8512 8549 if (commonUtils.isNotEmptyArr(filterData)) {
8513 8550 newData = filterData;
8514 8551 }
... ... @@ -8517,17 +8554,17 @@ const QuotationComponent = Form.create({
8517 8554 res = oriData;
8518 8555 }
8519 8556  
8520   - } else if (type === 'materials0' || type ==='materials1' || type === 'materials2') {
  8557 + } else if (type === 'materials0' || type === 'materials1' || type === 'materials2') {
8521 8558 /* 根据工序表选中行的部件id +工序id 过滤全部材料数据 */
8522   - if(commonUtils.isNotEmptyObject(processRow)){
8523   - const filterData = materialsData.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId
  8559 + if (commonUtils.isNotEmptyObject(processRow)) {
  8560 + const filterData = materialsData.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId
8524 8561 && commonUtils.isEmptyObject(item.sParentMaterialsId));
8525 8562 if (commonUtils.isNotEmptyArr(filterData)) {
8526 8563 newData = filterData;
8527 8564 }
8528 8565 res = newData;
8529   - } else if(commonUtils.isNotEmptyObject(controlRow)){
8530   - const filterData = materialsData.filter(item => item.sControlId === controlRow.sId && commonUtils.isEmptyObject(item.sParentMaterialsId) );
  8566 + } else if (commonUtils.isNotEmptyObject(controlRow)) {
  8567 + const filterData = materialsData.filter(item => item.sControlId === controlRow.sId && commonUtils.isEmptyObject(item.sParentMaterialsId));
8531 8568 if (commonUtils.isNotEmptyArr(filterData)) {
8532 8569 newData = filterData;
8533 8570 }
... ... @@ -8541,16 +8578,16 @@ const QuotationComponent = Form.create({
8541 8578 const sSqlCondition = config ? config.sSqlCondition : 'materials0.sBclassifyName.油墨';
8542 8579 if (sSqlCondition) {
8543 8580 let targetTbName = sSqlCondition.split('.')[0]; /* 1.表名 control */
8544   - if(commonUtils.isEmptyObject(targetTbName)) {
  8581 + if (commonUtils.isEmptyObject(targetTbName)) {
8545 8582 targetTbName = 'materials0';
8546 8583 }
8547 8584 let filteredValue = sSqlCondition.split('.')[1]; /* 2.解析filterValue: controlSelectedRowKeys */
8548 8585 let sParentKey = sSqlCondition.split('.')[2]; /* 2.解析本身表对应的值,如控制表筛选材料表 则材料表的sControlId = 控制表的controlSelectedRowKeys[0] */
8549   - if(commonUtils.isEmptyObject(targetTbName)){
8550   - if(type === 'materials1') { /* materials0.sBclassifyName.油墨 */
  8586 + if (commonUtils.isEmptyObject(targetTbName)) {
  8587 + if (type === 'materials1') { /* materials0.sBclassifyName.油墨 */
8551 8588 filteredValue = 'sBclassifyName';
8552 8589 sParentKey = '油墨';
8553   - } else if(type ==='materials2') { /* materials0.sBclassifyName.电化铝 */
  8590 + } else if (type === 'materials2') { /* materials0.sBclassifyName.电化铝 */
8554 8591 filteredValue = 'sBclassifyName';
8555 8592 sParentKey = '电化铝';
8556 8593 }
... ... @@ -8571,12 +8608,12 @@ const QuotationComponent = Form.create({
8571 8608 } else if (type === 'materials2') {
8572 8609 /* 过滤后的 materials0Data */
8573 8610 let materials0FilterData = [];
8574   - if(commonUtils.isNotEmptyObject(processRow) && commonUtils.isNotEmptyArr(materials0Data)){
  8611 + if (commonUtils.isNotEmptyObject(processRow) && commonUtils.isNotEmptyArr(materials0Data)) {
8575 8612 const filterData = materials0Data.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId && commonUtils.isEmptyObject(item.sParentMaterialsId));
8576 8613 if (commonUtils.isNotEmptyArr(filterData)) {
8577 8614 materials0FilterData = filterData;
8578 8615 }
8579   - }else if(commonUtils.isNotEmptyObject(controlRow) && commonUtils.isNotEmptyArr(materials0Data)){
  8616 + } else if (commonUtils.isNotEmptyObject(controlRow) && commonUtils.isNotEmptyArr(materials0Data)) {
8580 8617 const filterData = materials0Data.filter(item => item.sControlId === controlRow.sId && commonUtils.isEmptyObject(item.sParentMaterialsId));
8581 8618 if (commonUtils.isNotEmptyArr(filterData)) {
8582 8619 materials0FilterData = filterData;
... ... @@ -8589,16 +8626,16 @@ const QuotationComponent = Form.create({
8589 8626 const sSqlCondition = config ? config.sSqlCondition : 'materials0.sBclassifyName.油墨';
8590 8627 if (sSqlCondition) {
8591 8628 let targetTbName = sSqlCondition.split('.')[0]; /* 1.表名 control */
8592   - if(commonUtils.isEmptyObject(targetTbName)) {
  8629 + if (commonUtils.isEmptyObject(targetTbName)) {
8593 8630 targetTbName = 'materials0';
8594 8631 }
8595 8632 let filteredValue = sSqlCondition.split('.')[1]; /* 2.解析filterValue: controlSelectedRowKeys */
8596 8633 let sParentKey = sSqlCondition.split('.')[2]; /* 2.解析本身表对应的值,如控制表筛选材料表 则材料表的sControlId = 控制表的controlSelectedRowKeys[0] */
8597   - if(commonUtils.isEmptyObject(targetTbName)){
8598   - if(type === 'materials1') { /* materials0.sBclassifyName.油墨 */
  8634 + if (commonUtils.isEmptyObject(targetTbName)) {
  8635 + if (type === 'materials1') { /* materials0.sBclassifyName.油墨 */
8599 8636 filteredValue = 'sBclassifyName';
8600 8637 sParentKey = '油墨';
8601   - } else if(type ==='materials2') { /* materials0.sBclassifyName.电化铝 */
  8638 + } else if (type === 'materials2') { /* materials0.sBclassifyName.电化铝 */
8602 8639 filteredValue = 'sBclassifyName';
8603 8640 sParentKey = '电化铝';
8604 8641 }
... ... @@ -8613,15 +8650,15 @@ const QuotationComponent = Form.create({
8613 8650  
8614 8651 }
8615 8652 res = newData;
8616   - } else if( type === 'materials1Child') {
  8653 + } else if (type === 'materials1Child') {
8617 8654 /* 过滤后的 materials0Data */
8618 8655 let materials0FilterData = [];
8619   - if(commonUtils.isNotEmptyObject(processRow) && commonUtils.isNotEmptyArr(materials0Data)){
8620   - const filterData = materials0Data.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId );
  8656 + if (commonUtils.isNotEmptyObject(processRow) && commonUtils.isNotEmptyArr(materials0Data)) {
  8657 + const filterData = materials0Data.filter(item => item.sControlId === processRow.sControlId && item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId);
8621 8658 if (commonUtils.isNotEmptyArr(filterData)) {
8622 8659 materials0FilterData = filterData;
8623 8660 }
8624   - }else if(commonUtils.isNotEmptyObject(controlRow) && commonUtils.isNotEmptyArr(materials0Data)){
  8661 + } else if (commonUtils.isNotEmptyObject(controlRow) && commonUtils.isNotEmptyArr(materials0Data)) {
8625 8662 const filterData = materials0Data.filter(item => item.sControlId === controlRow.sId);
8626 8663 if (commonUtils.isNotEmptyArr(filterData)) {
8627 8664 materials0FilterData = filterData;
... ... @@ -8634,16 +8671,16 @@ const QuotationComponent = Form.create({
8634 8671 const sSqlCondition = config && commonUtils.isNotEmptyObject(config.sSqlCondition) ? config.sSqlCondition : 'materials0.sBclassifyName.油墨';
8635 8672 if (sSqlCondition) {
8636 8673 let targetTbName = sSqlCondition.split('.')[0]; /* 1.表名 control */
8637   - if(commonUtils.isEmptyObject(targetTbName)) {
  8674 + if (commonUtils.isEmptyObject(targetTbName)) {
8638 8675 targetTbName = 'materials0';
8639 8676 }
8640 8677 let filteredValue = sSqlCondition.split('.')[1]; /* 2.解析filterValue: controlSelectedRowKeys */
8641 8678 let sParentKey = sSqlCondition.split('.')[2]; /* 2.解析本身表对应的值,如控制表筛选材料表 则材料表的sControlId = 控制表的controlSelectedRowKeys[0] */
8642   - if(commonUtils.isEmptyObject(targetTbName)){
8643   - if(type === 'materials1') { /* materials0.sBclassifyName.油墨 */
  8679 + if (commonUtils.isEmptyObject(targetTbName)) {
  8680 + if (type === 'materials1') { /* materials0.sBclassifyName.油墨 */
8644 8681 filteredValue = 'sBclassifyName';
8645 8682 sParentKey = '油墨';
8646   - } else if(type ==='materials2') { /* materials0.sBclassifyName.电化铝 */
  8683 + } else if (type === 'materials2') { /* materials0.sBclassifyName.电化铝 */
8647 8684 filteredValue = 'sBclassifyName';
8648 8685 sParentKey = '电化铝';
8649 8686 }
... ... @@ -8658,12 +8695,12 @@ const QuotationComponent = Form.create({
8658 8695  
8659 8696 }
8660 8697  
8661   - if( type ==='materials1Child') { /* 油墨过滤子集 */
  8698 + if (type === 'materials1Child') { /* 油墨过滤子集 */
8662 8699 const { materials1Data, materials1SelectedRowKeys } = props;
8663   - let materials1Row ={}; /* 油墨子级 */
8664   - if(commonUtils.isNotEmptyArr(materials1Data) && commonUtils.isNotEmptyArr(materials1SelectedRowKeys)){ /* 没有工序选中行 则不进行数据过滤 */
  8700 + let materials1Row = {}; /* 油墨子级 */
  8701 + if (commonUtils.isNotEmptyArr(materials1Data) && commonUtils.isNotEmptyArr(materials1SelectedRowKeys)) { /* 没有工序选中行 则不进行数据过滤 */
8665 8702 const iIndex = materials1Data.findIndex(item => materials1SelectedRowKeys.includes(item.sId));
8666   - if(iIndex > -1) {
  8703 + if (iIndex > -1) {
8667 8704 materials1Row = materials1Data[iIndex];
8668 8705 }
8669 8706 }
... ... @@ -8671,21 +8708,21 @@ const QuotationComponent = Form.create({
8671 8708 }
8672 8709  
8673 8710  
8674   - } else if(type ==='materials0Child') { /* 全部材料 过滤替代料 */
  8711 + } else if (type === 'materials0Child') { /* 全部材料 过滤替代料 */
8675 8712 const { materials0Data, materials0SelectedRowKeys } = props;
8676   - let materials0Row ={}; /* 油墨子级 */
8677   - if(commonUtils.isNotEmptyArr(materials0Data) && commonUtils.isNotEmptyArr(materials0SelectedRowKeys)){ /* 没有工序选中行 则不进行数据过滤 */
  8713 + let materials0Row = {}; /* 油墨子级 */
  8714 + if (commonUtils.isNotEmptyArr(materials0Data) && commonUtils.isNotEmptyArr(materials0SelectedRowKeys)) { /* 没有工序选中行 则不进行数据过滤 */
8678 8715 const iIndex = materials0Data.findIndex(item => materials0SelectedRowKeys.includes(item.sId));
8679   - if(iIndex > -1) {
  8716 + if (iIndex > -1) {
8680 8717 materials0Row = materials0Data[iIndex];
8681 8718 }
8682 8719 }
8683   - if(commonUtils.isNotEmptyObject(materials0Row)) { /* 根据工序过滤所有替代料 */
  8720 + if (commonUtils.isNotEmptyObject(materials0Row)) { /* 根据工序过滤所有替代料 */
8684 8721 res = oriData.filter(item => item.sParentMaterialsId === materials0Row.sId);
8685   - } else if(commonUtils.isNotEmptyObject(processRow)) { /* 根据工序过滤所有替代料 */
  8722 + } else if (commonUtils.isNotEmptyObject(processRow)) { /* 根据工序过滤所有替代料 */
8686 8723 res = oriData.filter(item => item.sProcessId === processRow.sProcessId && item.sProcessTbId === processRow.sId);
8687   - } else if(commonUtils.isNotEmptyObject(controlRow)){
8688   - res = oriData.filter(item => item.sControlId=== controlRow.sId && commonUtils.isNotEmptyObject(item.sParentMaterialsId));
  8724 + } else if (commonUtils.isNotEmptyObject(controlRow)) {
  8725 + res = oriData.filter(item => item.sControlId === controlRow.sId && commonUtils.isNotEmptyObject(item.sParentMaterialsId));
8689 8726 }
8690 8727  
8691 8728 } else {
... ... @@ -8738,8 +8775,8 @@ const QuotationComponent = Form.create({
8738 8775 materialsInfoList.forEach((item, index) => {
8739 8776  
8740 8777  
8741   - const tableNameProps = index === 0 ? `materialsTable` : `materialsTable${index -1}`;
8742   - const tableName = index === 0 ? `materials` : `materials${index -1}`;
  8778 + const tableNameProps = index === 0 ? `materialsTable` : `materialsTable${index - 1}`;
  8779 + const tableName = index === 0 ? `materials` : `materials${index - 1}`;
8743 8780 materialsTablePropsList[`${tableNameProps}Props`] = {
8744 8781 ...commonBusiness.getTableTypes(tableName, props),
8745 8782 // tableBelone: 'list',
... ... @@ -8991,7 +9028,7 @@ const QuotationComponent = Form.create({
8991 9028 chooseProdutProcessConfig = props.masterConfig.gdsconfigformslave[iIndex];
8992 9029 }
8993 9030 let slaveFinalData = [];
8994   - let slaveFinalSelectedRowKeys =[];
  9031 + let slaveFinalSelectedRowKeys = [];
8995 9032 if (commonUtils.isNotEmptyArr(props.slaveData)) {
8996 9033 slaveFinalData = JSON.parse(JSON.stringify(props.slaveData));
8997 9034 if (commonUtils.isNotEmptyArr(slaveFinalData) && slaveFinalData.length > 0) {
... ... @@ -9000,7 +9037,7 @@ const QuotationComponent = Form.create({
9000 9037 });
9001 9038 }
9002 9039 /* 选择成品工序 只有一条从表 则默认选中 */
9003   - if(slaveFinalData.length ===1){
  9040 + if (slaveFinalData.length === 1) {
9004 9041 slaveFinalSelectedRowKeys.push(slaveFinalData[0].sSlaveId);
9005 9042 }
9006 9043 }
... ... @@ -9047,7 +9084,7 @@ const QuotationComponent = Form.create({
9047 9084 chooseProductMaterialsConfig = props.masterConfig.gdsconfigformslave[iIndex];
9048 9085 }
9049 9086 let slaveFinalData = [];
9050   - let slaveFinalSelectedRowKeys =[];
  9087 + let slaveFinalSelectedRowKeys = [];
9051 9088 if (commonUtils.isNotEmptyArr(props.slaveData)) {
9052 9089 slaveFinalData = JSON.parse(JSON.stringify(props.slaveData));
9053 9090 if (commonUtils.isNotEmptyArr(slaveFinalData) && slaveFinalData.length > 0) {
... ... @@ -9056,7 +9093,7 @@ const QuotationComponent = Form.create({
9056 9093 });
9057 9094 }
9058 9095 /* 选择成品材料 只有一条从表 则默认选中 */
9059   - if(slaveFinalData.length ===1){
  9096 + if (slaveFinalData.length === 1) {
9060 9097 slaveFinalSelectedRowKeys.push(slaveFinalData[0].sSlaveId);
9061 9098 }
9062 9099 }
... ... @@ -9210,10 +9247,10 @@ const QuotationComponent = Form.create({
9210 9247 const setTop = commonFunc.showMessage(app.commonConst, 'setTop');/* 置顶 */
9211 9248 const setBottom = commonFunc.showMessage(app.commonConst, 'setBottom');/* 置底 */
9212 9249 let sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */
9213   - if(commonUtils.isNotEmptyObject(props) && props.sParamModalType) {
9214   - if(props.sParamModalType === 'sQuo') {
9215   - sProcessParams = commonFunc.showMessage(app.commonConst, 'sQuoParams');/* 选择报价参数标题 */
9216   - if(commonUtils.isEmpty(sProcessParams)) {
  9250 + if (commonUtils.isNotEmptyObject(props) && props.sParamModalType) {
  9251 + if (props.sParamModalType === 'sQuo') {
  9252 + sProcessParams = commonFunc.showMessage(app.commonConst, 'sQuoParams');/* 选择报价参数标题 */
  9253 + if (commonUtils.isEmpty(sProcessParams)) {
9217 9254 sProcessParams = '报价参数标准';
9218 9255 }
9219 9256 }
... ... @@ -9221,11 +9258,11 @@ const QuotationComponent = Form.create({
9221 9258 // eslint-disable-next-line jsx-a11y/anchor-is-valid
9222 9259 const operateAdd = <a title="添加同级" alt="" onClick={props.enabled ? props.onDataRowAdd.bind(this, 'control', true, 'sameNode') : null}>{props.enabled ? setAdd.img : setAdd.disableimg} </a>;
9223 9260 // eslint-disable-next-line jsx-a11y/anchor-is-valid
9224   - const operateAddChild = <a title="添加子级" onClick={props.enabled ? props.onDataRowAdd.bind(this, 'control', true, 'childNode') : null}>{props.enabled ? setAddChild.img : setAddChild.disableimg }</a>;
  9261 + const operateAddChild = <a title="添加子级" onClick={props.enabled ? props.onDataRowAdd.bind(this, 'control', true, 'childNode') : null}>{props.enabled ? setAddChild.img : setAddChild.disableimg}</a>;
9225 9262 // eslint-disable-next-line jsx-a11y/anchor-is-valid
9226 9263 const operateCopy = <a title="复制" onClick={props.enabled ? props.onDataRowCopy.bind(this, 'control', false, 'isChild') : null}>{props.enabled ? setCopy.img : setCopy.disableimg}</a>;
9227 9264 // eslint-disable-next-line jsx-a11y/anchor-is-valid
9228   - const operateUpdate = <a title="复制全部" onClick={props.enabled ? props.onDataRowCopyAll.bind(this, 'control', false, 'isChild') : null}>{props.enabled ? setCopyAll.img : setCopyAll.disableimg }</a>;
  9265 + const operateUpdate = <a title="复制全部" onClick={props.enabled ? props.onDataRowCopyAll.bind(this, 'control', false, 'isChild') : null}>{props.enabled ? setCopyAll.img : setCopyAll.disableimg}</a>;
9229 9266 // eslint-disable-next-line jsx-a11y/anchor-is-valid
9230 9267 const operateDel = <a title="删除" onClick={props.enabled ? props.onDataRowDel.bind(this, 'control', true, '') : null}>{props.enabled ? setDelete.img : setDelete.disableimg}</a>;
9231 9268  
... ... @@ -9251,7 +9288,7 @@ const QuotationComponent = Form.create({
9251 9288 }
9252 9289 }
9253 9290  
9254   - const bFinalMaterialsTabShow = commonUtils.isEmptyObject(finishedMaterialsConfig) ? false :(bSplitMaterials ? true : false); /* 没有成品材料配置 则材料Tab不展示 */
  9291 + const bFinalMaterialsTabShow = commonUtils.isEmptyObject(finishedMaterialsConfig) ? false : (bSplitMaterials ? true : false); /* 没有成品材料配置 则材料Tab不展示 */
9255 9292 const bFinalProcessTabShow = commonUtils.isEmptyObject(finishedProcessConfig) ? false : (bSplitProcess ? true : false); /* 没有成品工序配置 则工序Tab不展示 */
9256 9293  
9257 9294 const panelExtra = (type) => {
... ... @@ -9259,9 +9296,9 @@ const QuotationComponent = Form.create({
9259 9296 /* 根据materials找到其组所有配置头 */
9260 9297  
9261 9298 let radioConfigArr = [];
9262   - if(commonUtils.isNotEmptyArr(formData)) {
  9299 + if (commonUtils.isNotEmptyArr(formData)) {
9263 9300 // radioConfigArr = formData.filter(item => commonUtils.isNotEmptyObject(item.sGrd) && item.sGrd.includes(type) );
9264   - radioConfigArr = formData.filter(item => commonUtils.isNotEmptyObject(item.sGrd) && item.sGrd.includes(type) && item.bGrdVisible );
  9301 + radioConfigArr = formData.filter(item => commonUtils.isNotEmptyObject(item.sGrd) && item.sGrd.includes(type) && item.bGrdVisible);
9265 9302 // console.log('radioConfigArr:', radioConfigArr);
9266 9303 }
9267 9304 if (type === 'material') {
... ... @@ -9274,10 +9311,10 @@ const QuotationComponent = Form.create({
9274 9311 {/*<Radio value={6}>{materialsFlInfo}</Radio>*/}
9275 9312 {
9276 9313 radioConfigArr.map((child, index) => {
9277   - const radioTitle = child.showName;
9278   - const radioValue = index + 2 + 10;
  9314 + const radioTitle = child.showName;
  9315 + const radioValue = index + 2 + 10;
9279 9316 // console.log('radioValue', radioTitle, radioValue);
9280   - return(
  9317 + return (
9281 9318 <Radio value={radioValue}>{radioTitle}</Radio>
9282 9319 )
9283 9320 })
... ... @@ -9333,14 +9370,14 @@ const QuotationComponent = Form.create({
9333 9370 props.onActiveKey(e);
9334 9371 };
9335 9372  
9336   - const okButtonStyle ={
9337   - style:{
9338   - display:"none",
9339   - backgroundColor:"red"
  9373 + const okButtonStyle = {
  9374 + style: {
  9375 + display: "none",
  9376 + backgroundColor: "red"
9340 9377 }
9341 9378 }
9342 9379 const cancelButtonStyle = {
9343   - htmlType:"退出",
  9380 + htmlType: "退出",
9344 9381 style: {
9345 9382 width: 70,
9346 9383 height: 50,
... ... @@ -9405,15 +9442,15 @@ const QuotationComponent = Form.create({
9405 9442 res = (
9406 9443 <div>
9407 9444 <Tabs className={styles.slaveTabs}
9408   - style={{ paddingTop: '10px', marginRight: '10px', marginTop: '-10px', backgroundColor: '#fff' }}
9409   - onChange={tabChange}>
  9445 + style={{ paddingTop: '10px', marginRight: '10px', marginTop: '-10px', backgroundColor: '#fff' }}
  9446 + onChange={tabChange}>
9410 9447 <TabPane tab="部件材料" key={4} ></TabPane>
9411 9448 <TabPane tab="部件工序" key={5} ></TabPane>
9412   - {bFinalMaterialsTabShow ? <TabPane tab="成品材料" key={2} ></TabPane> :''}
9413   - {bFinalProcessTabShow? <TabPane tab="成品工序" key={3} ></TabPane> :''}
  9449 + {bFinalMaterialsTabShow ? <TabPane tab="成品材料" key={2} ></TabPane> : ''}
  9450 + {bFinalProcessTabShow ? <TabPane tab="成品工序" key={3} ></TabPane> : ''}
9414 9451 </Tabs>
9415 9452 {props.currentTab === 4 && bMaterialShow ?
9416   - <StaticEditTable {...materialsPropsType} setOpterationColumn="Y" bModalAdd noVlist selfTableHeight={82}/> : ''
  9453 + <StaticEditTable {...materialsPropsType} setOpterationColumn="Y" bModalAdd noVlist selfTableHeight={82} /> : ''
9417 9454 }
9418 9455 {finishedMaterialsColumn && props.currentTab === 2 ?
9419 9456 <StaticEditTable {...finishedMaterialsPropsType} bFinished bModalAdd setOpterationColumn="Y" selfTableHeight={82} noVlist /> : ''
... ... @@ -9421,7 +9458,7 @@ const QuotationComponent = Form.create({
9421 9458 {props.currentTab === 5 && bProcessShow ?
9422 9459 <StaticEditTable {...processPropsType} setOpterationColumn="Y" bModalAdd dragHandle selfTableHeight={330} noVlist /> : ''
9423 9460 }
9424   - {finishedProcessColumn && props.currentTab === 3?
  9461 + {finishedProcessColumn && props.currentTab === 3 ?
9425 9462 <StaticEditTable {...finishedProcessPropsType} bFinished bModalAdd setOpterationColumn="Y" dragHandle selfTableHeight={330} noVlist /> : ''
9426 9463 }
9427 9464 <Layout className="processList">
... ... @@ -9438,48 +9475,48 @@ const QuotationComponent = Form.create({
9438 9475 res = (
9439 9476 <Collapse defaultActiveKey={props.activeKey} onChange={activeKeyChange} className="custom-collapse">
9440 9477 <Panel collapsible="header"
9441   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('1') !== -1)? '90deg' : '0deg'})`}} />)}
9442   - showArrow={false}
9443   - extra={materialsInfo}
9444   - key="1"
  9478 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('1') !== -1) ? '90deg' : '0deg'})` }} />)}
  9479 + showArrow={false}
  9480 + extra={materialsInfo}
  9481 + key="1"
9445 9482 >
9446   - <StaticEditTable {...materialsPropsType} setOpterationColumn="Y" bModalAdd noVlist selfTableHeight={82}/>
  9483 + <StaticEditTable {...materialsPropsType} setOpterationColumn="Y" bModalAdd noVlist selfTableHeight={82} />
9447 9484 </Panel>
9448 9485 {
9449 9486 bSplitMaterials ?
9450 9487 <Panel collapsible="header"
9451   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('3') !== -1)? '90deg' : '0deg'})`}} />)}
9452   - showArrow={false}
9453   - extra={productMaterialsInfo}
9454   - key="3"
  9488 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('3') !== -1) ? '90deg' : '0deg'})` }} />)}
  9489 + showArrow={false}
  9490 + extra={productMaterialsInfo}
  9491 + key="3"
9455 9492 >
9456 9493 <StaticEditTable {...finishedMaterialsPropsType} bFinished bModalAdd setOpterationColumn="Y" selfTableHeight={82} noVlist />
9457 9494 </Panel> : ''
9458 9495 }
9459 9496 <Panel collapsible="header"
9460   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('2') !== -1)? '90deg' : '0deg'})`}} />)}
9461   - showArrow={false}
9462   - extra={processInfo}
9463   - key="2"
  9497 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('2') !== -1) ? '90deg' : '0deg'})` }} />)}
  9498 + showArrow={false}
  9499 + extra={processInfo}
  9500 + key="2"
9464 9501 >
9465 9502 <StaticEditTable {...processPropsType} setOpterationColumn="Y" bModalAdd dragHandle selfTableHeight={330} noVlist />
9466 9503 </Panel>
9467 9504 {
9468 9505 bSplitProcess ?
9469 9506 <Panel collapsible="header"
9470   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('4') !== -1)? '90deg' : '0deg'})`}} />)}
9471   - showArrow={false}
9472   - extra={productProcessInfo}
9473   - key="4"
  9507 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('4') !== -1) ? '90deg' : '0deg'})` }} />)}
  9508 + showArrow={false}
  9509 + extra={productProcessInfo}
  9510 + key="4"
9474 9511 >
9475 9512 <StaticEditTable {...finishedProcessPropsType} bFinished bModalAdd setOpterationColumn="Y" dragHandle selfTableHeight={330} noVlist />
9476 9513 </Panel> : ''
9477 9514 }
9478 9515 <Panel collapsible="header"
9479   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('5') !== -1)? '90deg' : '0deg'})`}} />)}
9480   - showArrow={false}
9481   - extra={manyqtysInfo}
9482   - key="5"
  9516 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('5') !== -1) ? '90deg' : '0deg'})` }} />)}
  9517 + showArrow={false}
  9518 + extra={manyqtysInfo}
  9519 + key="5"
9483 9520 >
9484 9521 <StaticEditTable {...manyqtysPropsType} setOpterationColumn="Y" selfTableHeight={82} noVlist />
9485 9522 </Panel>
... ... @@ -9489,12 +9526,12 @@ const QuotationComponent = Form.create({
9489 9526 res = (
9490 9527 <Collapse defaultActiveKey={props.activeKey} onChange={activeKeyChange} className="custom-collapse">
9491 9528 <Panel collapsible="header"
9492   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('2') !== -1)? '90deg' : '0deg'})`}} />)}
9493   - showArrow={false}
9494   - extra={panelExtra('process')}
9495   - key="2"
  9529 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('2') !== -1) ? '90deg' : '0deg'})` }} />)}
  9530 + showArrow={false}
  9531 + extra={panelExtra('process')}
  9532 + key="2"
9496 9533 >
9497   - { props.currentTab2 === 1 && commonUtils.isNotEmptyObject(processShowLeft) ?
  9534 + {props.currentTab2 === 1 && commonUtils.isNotEmptyObject(processShowLeft) ?
9498 9535 <div>
9499 9536 <Row gutter={[8, 0]}>
9500 9537 <Col span={processShowLeft.iColValue} order={1} id={props.processTableId}>
... ... @@ -9530,28 +9567,28 @@ const QuotationComponent = Form.create({
9530 9567 </Row>
9531 9568 </div> : props.currentTab2 === 1 && <StaticEditTable {...processPropsType} setOpterationColumn="Y" bModalAdd dragHandle selfTableHeight={330} noVlist />
9532 9569 }
9533   - { props.currentTab2 === 3 && bSplitProcess && <StaticEditTable {...finishedProcessPropsType} bFinished bModalAdd setOpterationColumn="Y" dragHandle selfTableHeight={330} noVlist /> }
  9570 + {props.currentTab2 === 3 && bSplitProcess && <StaticEditTable {...finishedProcessPropsType} bFinished bModalAdd setOpterationColumn="Y" dragHandle selfTableHeight={330} noVlist />}
9534 9571 </Panel>
9535 9572  
9536 9573 <Panel collapsible="header"
9537   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('1') !== -1)? '90deg' : '0deg'})`}} />)}
9538   - showArrow={false}
9539   - extra={panelExtra('material')}
9540   - key="1"
  9574 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('1') !== -1) ? '90deg' : '0deg'})` }} />)}
  9575 + showArrow={false}
  9576 + extra={panelExtra('material')}
  9577 + key="1"
9541 9578 >
9542 9579 {/*{ props.currentTab === 11 && <StaticEditTable {...materialsPropsType} setOpterationColumn="Y" bModalAdd noVlist selfTableHeight={82}/> }*/}
9543 9580  
9544   - { props.materialsInfoList?.map((item, index) => {
  9581 + {props.materialsInfoList?.map((item, index) => {
9545 9582 let num = 12 + index;
9546   - const tablePropsName = index ===0 ? `materialsTableProps` : `materialsTable${index - 1}Props`;
  9583 + const tablePropsName = index === 0 ? `materialsTableProps` : `materialsTable${index - 1}Props`;
9547 9584 const materialsOtherPropsType = materialsTablePropsList[tablePropsName];
9548 9585 let sWidth = '100%';
9549 9586 /* 找到子级 左右列 */
9550   - let materialsChildTableProps ={};
9551   - if(commonUtils.isNotEmptyArr(materialsChildInfoList)) {
  9587 + let materialsChildTableProps = {};
  9588 + if (commonUtils.isNotEmptyArr(materialsChildInfoList)) {
9552 9589 const iIndex = materialsChildInfoList.findIndex(child => child.includes(item));
9553   - if(iIndex > -1) {
9554   - materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`];
  9590 + if (iIndex > -1) {
  9591 + materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`];
9555 9592 sWidth = '50%';
9556 9593 } else {
9557 9594 sWidth = '100%';
... ... @@ -9562,15 +9599,15 @@ const QuotationComponent = Form.create({
9562 9599 return (
9563 9600 props.currentTab === num &&
9564 9601 <div className='dlhStyle'>
9565   - <div style={{width:sWidth}}> <StaticEditTable {...materialsOtherPropsType} setOpterationColumn="Y" noVlist selfTableHeight={82}/> </div>
  9602 + <div style={{ width: sWidth }}> <StaticEditTable {...materialsOtherPropsType} setOpterationColumn="Y" noVlist selfTableHeight={82} /> </div>
9566 9603 {
9567   - commonUtils.isNotEmptyObject(materialsChildTableProps)?
9568   - <div style={{width:sWidth}}> <StaticEditTable {...materialsChildTableProps} setOpterationColumn="Y" noVlist selfTableHeight={82}/> </div>
  9604 + commonUtils.isNotEmptyObject(materialsChildTableProps) ?
  9605 + <div style={{ width: sWidth }}> <StaticEditTable {...materialsChildTableProps} setOpterationColumn="Y" noVlist selfTableHeight={82} /> </div>
9569 9606 : ''
9570 9607 }
9571 9608 </div>
9572 9609 )
9573   - }) }
  9610 + })}
9574 9611  
9575 9612 {/*{ props.currentTab === 13 &&*/}
9576 9613 {/*<div className='dlhStyle'>*/}
... ... @@ -9584,10 +9621,10 @@ const QuotationComponent = Form.create({
9584 9621 {
9585 9622 commonUtils.isNotEmptyObject(manyqtysConfig) ?
9586 9623 <Panel collapsible="header"
9587   - header={(<RightOutlined style={{fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('3') !== -1)? '90deg' : '0deg'})`}} />)}
9588   - showArrow={false}
9589   - extra={panelExtra('manyQty')}
9590   - key="3"
  9624 + header={(<RightOutlined style={{ fontSize: '12px', transition: 'ease 0.3s', transform: `rotate(${(props.activeKey.indexOf('3') !== -1) ? '90deg' : '0deg'})` }} />)}
  9625 + showArrow={false}
  9626 + extra={panelExtra('manyQty')}
  9627 + key="3"
9591 9628 >
9592 9629 <StaticEditTable {...manyqtysPropsType} setOpterationColumn="Y" selfTableHeight={330} noVlist />
9593 9630 </Panel> : ''
... ... @@ -9647,13 +9684,13 @@ const QuotationComponent = Form.create({
9647 9684 <div
9648 9685 className="workerOrderControlTable"
9649 9686 style={{
9650   - marginLeft: '10px', display: bControlShow ? 'block' : 'none', top: props.currentTab === 1 ? 0 : `${stickyTabHeight}px`,
9651   - }}
  9687 + marginLeft: '10px', display: bControlShow ? 'block' : 'none', top: props.currentTab === 1 ? 0 : `${stickyTabHeight}px`,
  9688 + }}
9652 9689 >
9653   - <div className="processList" style={{ marginBottom: '0px', position: 'sticky', top: '0px', zIndex: 99 }}>
  9690 + <div className="processList" style={{ marginBottom: '0px', position: 'sticky', top: '0px', zIndex: 99 }}>
9654 9691 <StaticEditTable {...controlPropsType} setOpterationColumn="Y" selfTableHeight={82} noVlist />
9655 9692 </div>
9656   - { renderByLayout() }
  9693 + {renderByLayout()}
9657 9694 </div>
9658 9695 {
9659 9696 colorConfigGrdVisible ?
... ... @@ -9686,7 +9723,7 @@ const QuotationComponent = Form.create({
9686 9723 <div style={{ float: 'left', width: '60%' }}>
9687 9724 <Checkbox.Group style={{ width: '100%' }} onChange={props.onChange1}>
9688 9725 <Row>
9689   - { commonUtils.isNotEmptyObject(checkPersonData) ?
  9726 + {commonUtils.isNotEmptyObject(checkPersonData) ?
9690 9727 checkPersonData.map((item) => {
9691 9728 return (
9692 9729 <Col span={8}>
... ... @@ -9818,7 +9855,7 @@ const QuotationComponent = Form.create({
9818 9855 <AntdDraggableModal
9819 9856 width={1000}
9820 9857 bodyStyle={{
9821   - display:'flex',justifyContent:'center', minHeight: 500, overflow: 'auto',
  9858 + display: 'flex', justifyContent: 'center', minHeight: 500, overflow: 'auto',
9822 9859 }}
9823 9860 title="查看开版图"
9824 9861 visible={props.showSinglePQtyPictureVisible}
... ... @@ -9827,11 +9864,11 @@ const QuotationComponent = Form.create({
9827 9864 footer={null}
9828 9865 forbidResize
9829 9866 >
9830   - <div style={{ display:'flex', width:'100%' }}>
9831   - <div style={{ display:'flex', width:'50%', 'justifyContent': 'center' }}>
  9867 + <div style={{ display: 'flex', width: '100%' }}>
  9868 + <div style={{ display: 'flex', width: '50%', 'justifyContent': 'center' }}>
9832 9869 <ShowImgPQty {...props} />
9833 9870 </div>
9834   - <div style={{ display:'flex', width:'50%'}}>
  9871 + <div style={{ display: 'flex', width: '50%' }}>
9835 9872 <ShowImgM {...props} />
9836 9873 </div>
9837 9874 </div>
... ... @@ -9897,10 +9934,10 @@ const QuotationComponent = Form.create({
9897 9934 cancelButtonProps={cancelButtonStyle}
9898 9935 onCancel={props.onCancelModal.bind(this, 'workFlowVisible')}
9899 9936 closable
9900   - style={{ backgroundColor:'#ffffff', top: 0 }}
9901   - // footer={null}
  9937 + style={{ backgroundColor: '#ffffff', top: 0 }}
  9938 + // footer={null}
9902 9939 >
9903   - <WorkFlow {...props} />
  9940 + <WorkFlow {...props} />
9904 9941 </AntdDraggableModal>
9905 9942  
9906 9943 : ''
... ... @@ -9930,10 +9967,10 @@ const QuotationComponent = Form.create({
9930 9967 onCancel={props.onCancelProcessParamsModalVisible}
9931 9968 onSaveState={props.onSaveState}
9932 9969 forbidResize
9933   - // footer={null}
  9970 + // footer={null}
9934 9971 >
9935 9972 <div className="sProcessParamsModal" style={{ height: '80%', overflowY: 'auto' }}>
9936   - { commonUtils.isNotEmptyArr(props.sProcessParamsSelects) ?
  9973 + {commonUtils.isNotEmptyArr(props.sProcessParamsSelects) ?
9937 9974 props.sProcessParamsSelects.map((child) => {
9938 9975 const sMemo = child.sName.toLowerCase().endsWith('memo');
9939 9976 let enabledNew = !child.bReadonly;
... ... @@ -9982,7 +10019,7 @@ const QuotationComponent = Form.create({
9982 10019 visible={props.sParamsModalVisible}
9983 10020 onOk={props.onParamsOk}
9984 10021 onCancel={props.onCancelModal.bind(this, 'sParamsModalVisible')}
9985   - // footer={null}
  10022 + // footer={null}
9986 10023 >
9987 10024 <div className="xly-bill-list" >
9988 10025 <StaticEditTable {...sParamProps} footer="hidden" noVlist />
... ... @@ -10065,13 +10102,13 @@ const QuotationComponent = Form.create({
10065 10102 </>
10066 10103 )}
10067 10104  
10068   - { true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>}
10069   - { true ? '' :
  10105 + {true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>}
  10106 + {true ? '' :
10070 10107 <div className="xly-filter-tree">
10071 10108 <StaticEditTree {...totalTreeProps} />
10072 10109 <div className="xly-tree-close">
10073 10110 {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
10074   - <a onClick={props.onEjectRight}> <img src={CloseRight} alt="close"/></a>
  10111 + <a onClick={props.onEjectRight}> <img src={CloseRight} alt="close" /></a>
10075 10112 </div>
10076 10113 </div>
10077 10114 }
... ...