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,7 +2622,12 @@ const BillComponent = Form.create({ | ||
| 2622 | // 匹配数字 | 2622 | // 匹配数字 |
| 2623 | // eslint-disable-next-line no-unused-vars | 2623 | // eslint-disable-next-line no-unused-vars |
| 2624 | let num = item.replace(/[^\d]/g, '').trim(); | 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 | return ( | 2631 | return ( |
| 2627 | <TabPane tab={tabName} key={num} className="xly-bill-list"> | 2632 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2628 | <div> | 2633 | <div> |
| @@ -2699,7 +2704,12 @@ const BillComponent = Form.create({ | @@ -2699,7 +2704,12 @@ const BillComponent = Form.create({ | ||
| 2699 | // 匹配数字 | 2704 | // 匹配数字 |
| 2700 | // eslint-disable-next-line no-unused-vars | 2705 | // eslint-disable-next-line no-unused-vars |
| 2701 | let num = item.replace(/[^\d]/g, '').trim(); | 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 | return ( | 2713 | return ( |
| 2704 | <TabPane tab={tabName} key={num} className="xly-bill-list"> | 2714 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2705 | <div> | 2715 | <div> |
| @@ -2784,7 +2794,12 @@ const BillComponent = Form.create({ | @@ -2784,7 +2794,12 @@ const BillComponent = Form.create({ | ||
| 2784 | // 匹配数字 | 2794 | // 匹配数字 |
| 2785 | // eslint-disable-next-line no-unused-vars | 2795 | // eslint-disable-next-line no-unused-vars |
| 2786 | let num = item.replace(/[^\d]/g, '').trim(); | 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 | return ( | 2803 | return ( |
| 2789 | <TabPane tab={tabName} key={num} className="xly-bill-list"> | 2804 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2790 | <div> | 2805 | <div> |
| @@ -2830,7 +2845,12 @@ const BillComponent = Form.create({ | @@ -2830,7 +2845,12 @@ const BillComponent = Form.create({ | ||
| 2830 | // 匹配数字 | 2845 | // 匹配数字 |
| 2831 | // eslint-disable-next-line no-unused-vars | 2846 | // eslint-disable-next-line no-unused-vars |
| 2832 | let num = item.replace(/[^\d]/g, '').trim(); | 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 | return ( | 2854 | return ( |
| 2835 | <TabPane tab={tabName} key={num} className="xly-bill-list"> | 2855 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2836 | <div> | 2856 | <div> |
| @@ -2876,7 +2896,12 @@ const BillComponent = Form.create({ | @@ -2876,7 +2896,12 @@ const BillComponent = Form.create({ | ||
| 2876 | // 匹配数字 | 2896 | // 匹配数字 |
| 2877 | // eslint-disable-next-line no-unused-vars | 2897 | // eslint-disable-next-line no-unused-vars |
| 2878 | let num = item.replace(/[^\d]/g, '').trim(); | 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 | return ( | 2905 | return ( |
| 2881 | <TabPane tab={tabName} key={num} className="xly-bill-list"> | 2906 | <TabPane tab={tabName} key={num} className="xly-bill-list"> |
| 2882 | <div> | 2907 | <div> |