Commit 1913c09651d8f5dc10a59eaf4a99d54dc840f79e
1 parent
b0be4f74
1.修复主表多页签的多语言翻译
Showing
1 changed file
with
30 additions
and
5 deletions
src/components/Common/CommonNewBill.js
| ... | ... | @@ -2622,7 +2622,12 @@ const BillComponent = Form.create({ |
| 2622 | 2622 | // 匹配数字 |
| 2623 | 2623 | // eslint-disable-next-line no-unused-vars |
| 2624 | 2624 | let num = item.replace(/[^\d]/g, '').trim(); |
| 2625 | - const tabName = item.replace(/\d+/g,''); | |
| 2625 | + let tabName = item.replace(/\d+/g,''); | |
| 2626 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2627 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2628 | + if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2629 | + tabName =tableConfigArr[0].showName; | |
| 2630 | + } | |
| 2626 | 2631 | return ( |
| 2627 | 2632 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2628 | 2633 | <div> |
| ... | ... | @@ -2699,7 +2704,12 @@ const BillComponent = Form.create({ |
| 2699 | 2704 | // 匹配数字 |
| 2700 | 2705 | // eslint-disable-next-line no-unused-vars |
| 2701 | 2706 | let num = item.replace(/[^\d]/g, '').trim(); |
| 2702 | - const tabName = item.replace(/\d+/g,''); | |
| 2707 | + let tabName = item.replace(/\d+/g,''); | |
| 2708 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2709 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2710 | + if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2711 | + tabName =tableConfigArr[0].showName; | |
| 2712 | + } | |
| 2703 | 2713 | return ( |
| 2704 | 2714 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2705 | 2715 | <div> |
| ... | ... | @@ -2784,7 +2794,12 @@ const BillComponent = Form.create({ |
| 2784 | 2794 | // 匹配数字 |
| 2785 | 2795 | // eslint-disable-next-line no-unused-vars |
| 2786 | 2796 | let num = item.replace(/[^\d]/g, '').trim(); |
| 2787 | - const tabName = item.replace(/\d+/g,''); | |
| 2797 | + let tabName = item.replace(/\d+/g,''); | |
| 2798 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2799 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2800 | + if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2801 | + tabName =tableConfigArr[0].showName; | |
| 2802 | + } | |
| 2788 | 2803 | return ( |
| 2789 | 2804 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2790 | 2805 | <div> |
| ... | ... | @@ -2830,7 +2845,12 @@ const BillComponent = Form.create({ |
| 2830 | 2845 | // 匹配数字 |
| 2831 | 2846 | // eslint-disable-next-line no-unused-vars |
| 2832 | 2847 | let num = item.replace(/[^\d]/g, '').trim(); |
| 2833 | - const tabName = item.replace(/\d+/g,''); | |
| 2848 | + let tabName = item.replace(/\d+/g,''); | |
| 2849 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2850 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2851 | + if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2852 | + tabName =tableConfigArr[0].showName; | |
| 2853 | + } | |
| 2834 | 2854 | return ( |
| 2835 | 2855 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2836 | 2856 | <div> |
| ... | ... | @@ -2876,7 +2896,12 @@ const BillComponent = Form.create({ |
| 2876 | 2896 | // 匹配数字 |
| 2877 | 2897 | // eslint-disable-next-line no-unused-vars |
| 2878 | 2898 | let num = item.replace(/[^\d]/g, '').trim(); |
| 2879 | - const tabName = item.replace(/\d+/g,''); | |
| 2899 | + let tabName = item.replace(/\d+/g,''); | |
| 2900 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2901 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2902 | + if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2903 | + tabName = tableConfigArr[0].showName; | |
| 2904 | + } | |
| 2880 | 2905 | return ( |
| 2881 | 2906 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2882 | 2907 | <div> | ... | ... |