Commit d0c2c7488c49fb91515c118c48f5e961b1494ddd

Authored by Min
1 parent 95f8f43c

1.完善主表多页签标题的多语言翻译

src/components/Common/CommonGroupBill.js
... ... @@ -2065,7 +2065,11 @@ const BillComponent = Form.create({
2065 2065 // 匹配数字
2066 2066 // eslint-disable-next-line no-unused-vars
2067 2067 let num = item.replace(/[^\d]/g, '').trim();
2068   - const tabName = item.replace(/\d+/g,'');
  2068 + let tabName = item.replace(/\d+/g,'');
  2069 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2070 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2071 + tabName=tableConfigArr[0].showName;
  2072 + }
2069 2073 return (
2070 2074 <TabPane tab={tabName} key={num} className="xly-bill-list">
2071 2075 <div>
... ... @@ -2103,7 +2107,11 @@ const BillComponent = Form.create({
2103 2107 // 匹配数字
2104 2108 // eslint-disable-next-line no-unused-vars
2105 2109 let num = item.replace(/[^\d]/g, '').trim();
2106   - const tabName = item.replace(/\d+/g,'');
  2110 + let tabName = item.replace(/\d+/g,'');
  2111 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2112 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2113 + tabName=tableConfigArr[0].showName;
  2114 + }
2107 2115 return (
2108 2116 <TabPane tab={tabName} key={num} className="xly-bill-list">
2109 2117 <div>
... ... @@ -2139,7 +2147,11 @@ const BillComponent = Form.create({
2139 2147 // 匹配数字
2140 2148 // eslint-disable-next-line no-unused-vars
2141 2149 let num = item.replace(/[^\d]/g, '').trim();
2142   - const tabName = item.replace(/\d+/g,'');
  2150 + let tabName = item.replace(/\d+/g,'');
  2151 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2152 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2153 + tabName=tableConfigArr[0].showName;
  2154 + }
2143 2155 return (
2144 2156 <TabPane tab={tabName} key={num} className="xly-bill-list">
2145 2157 <div>
... ... @@ -2175,7 +2187,11 @@ const BillComponent = Form.create({
2175 2187 // 匹配数字
2176 2188 // eslint-disable-next-line no-unused-vars
2177 2189 let num = item.replace(/[^\d]/g, '').trim();
2178   - const tabName = item.replace(/\d+/g,'');
  2190 + let tabName = item.replace(/\d+/g,'');
  2191 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2192 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2193 + tabName=tableConfigArr[0].showName;
  2194 + }
2179 2195 return (
2180 2196 <TabPane tab={tabName} key={num} className="xly-bill-list">
2181 2197 <div>
... ... @@ -2211,7 +2227,11 @@ const BillComponent = Form.create({
2211 2227 // 匹配数字
2212 2228 // eslint-disable-next-line no-unused-vars
2213 2229 let num = item.replace(/[^\d]/g, '').trim();
2214   - const tabName = item.replace(/\d+/g,'');
  2230 + let tabName = item.replace(/\d+/g,'');
  2231 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2232 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2233 + tabName=tableConfigArr[0].showName;
  2234 + }
2215 2235 return (
2216 2236 <TabPane tab={tabName} key={num} className="xly-bill-list">
2217 2237 <div>
... ... @@ -2247,7 +2267,11 @@ const BillComponent = Form.create({
2247 2267 // 匹配数字
2248 2268 // eslint-disable-next-line no-unused-vars
2249 2269 let num = item.replace(/[^\d]/g, '').trim();
2250   - const tabName = item.replace(/\d+/g,'');
  2270 + let tabName = item.replace(/\d+/g,'');
  2271 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2272 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2273 + tabName=tableConfigArr[0].showName;
  2274 + }
2251 2275 return (
2252 2276 <TabPane tab={tabName} key={num} className="xly-bill-list">
2253 2277 <div>
... ...
src/components/Common/CommonNewListBill.js
... ... @@ -2345,7 +2345,11 @@ const BillComponent = Form.create({
2345 2345 // 匹配数字
2346 2346 // eslint-disable-next-line no-unused-vars
2347 2347 let num = item.replace(/[^\d]/g, '').trim();
2348   - const tabName = item.replace(/\d+/g,'');
  2348 + let tabName = item.replace(/\d+/g,'');
  2349 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2350 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2351 + tabName=tableConfigArr[0].showName;
  2352 + }
2349 2353 return (
2350 2354 <TabPane tab={tabName} key={num} className="xly-bill-list">
2351 2355 <div>
... ... @@ -2385,7 +2389,11 @@ const BillComponent = Form.create({
2385 2389 // 匹配数字
2386 2390 // eslint-disable-next-line no-unused-vars
2387 2391 let num = item.replace(/[^\d]/g, '').trim();
2388   - const tabName = item.replace(/\d+/g,'');
  2392 + let tabName = item.replace(/\d+/g,'');
  2393 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2394 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2395 + tabName=tableConfigArr[0].showName;
  2396 + }
2389 2397 return (
2390 2398 <TabPane tab={tabName} key={num} className="xly-bill-list">
2391 2399 <div>
... ... @@ -2469,7 +2477,11 @@ const BillComponent = Form.create({
2469 2477 // 匹配数字
2470 2478 // eslint-disable-next-line no-unused-vars
2471 2479 let num = item.replace(/[^\d]/g, '').trim();
2472   - const tabName = item.replace(/\d+/g,'');
  2480 + let tabName = item.replace(/\d+/g,'');
  2481 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2482 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2483 + tabName=tableConfigArr[0].showName;
  2484 + }
2473 2485 return (
2474 2486 <TabPane tab={tabName} key={num} className="xly-bill-list">
2475 2487 <div>
... ... @@ -2547,7 +2559,11 @@ const BillComponent = Form.create({
2547 2559 // 匹配数字
2548 2560 // eslint-disable-next-line no-unused-vars
2549 2561 let num = item.replace(/[^\d]/g, '').trim();
2550   - const tabName = item.replace(/\d+/g,'');
  2562 + let tabName = item.replace(/\d+/g,'');
  2563 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2564 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2565 + tabName=tableConfigArr[0].showName;
  2566 + }
2551 2567 return (
2552 2568 <TabPane tab={tabName} key={num} className="xly-bill-list">
2553 2569 <div>
... ... @@ -2586,7 +2602,11 @@ const BillComponent = Form.create({
2586 2602 // 匹配数字
2587 2603 // eslint-disable-next-line no-unused-vars
2588 2604 let num = item.replace(/[^\d]/g, '').trim();
2589   - const tabName = item.replace(/\d+/g,'');
  2605 + let tabName = item.replace(/\d+/g,'');
  2606 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2607 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2608 + tabName=tableConfigArr[0].showName;
  2609 + }
2590 2610 return (
2591 2611 <TabPane tab={tabName} key={num} className="xly-bill-list">
2592 2612 <div>
... ... @@ -2625,7 +2645,11 @@ const BillComponent = Form.create({
2625 2645 // 匹配数字
2626 2646 // eslint-disable-next-line no-unused-vars
2627 2647 let num = item.replace(/[^\d]/g, '').trim();
2628   - const tabName = item.replace(/\d+/g,'');
  2648 + let tabName = item.replace(/\d+/g,'');
  2649 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2650 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2651 + tabName=tableConfigArr[0].showName;
  2652 + }
2629 2653 return (
2630 2654 <TabPane tab={tabName} key={num} className="xly-bill-list">
2631 2655 <div>
... ...
src/components/Common/CommonNewTabBill.js
... ... @@ -2386,7 +2386,11 @@ const BillComponent = Form.create({
2386 2386 // 匹配数字
2387 2387 // eslint-disable-next-line no-unused-vars
2388 2388 let num = item.replace(/[^\d]/g, '').trim();
2389   - const tabName = item.replace(/\d+/g,'');
  2389 + let tabName = item.replace(/\d+/g,'');
  2390 + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
  2391 + if(commonUtils.isNotEmptyArr(tableConfigArr)) {
  2392 + tabName =tableConfigArr[0].showName;
  2393 + }
2390 2394 return (
2391 2395 <TabPane tab={tabName} key={num} className="xly-bill-list">
2392 2396 <div>
... ...