Commit 7820302a49e54a27370fbfcd9f71887b02cb7575
1 parent
f8fa67c9
1.处理工艺参数的错误提示
Showing
1 changed file
with
12 additions
and
6 deletions
src/components/Common/commonBusiness.js
| @@ -1828,6 +1828,13 @@ export function getCharConfig(name, charType, dataID, order, width, height) { | @@ -1828,6 +1828,13 @@ export function getCharConfig(name, charType, dataID, order, width, height) { | ||
| 1828 | export function validatePramsNotEmpty(props) { | 1828 | export function validatePramsNotEmpty(props) { |
| 1829 | let result = true; | 1829 | let result = true; |
| 1830 | 1830 | ||
| 1831 | + const fieldNotNull = commonFunc.showLocalMessage(this.props, 'fieldNotNull', '字段不能为空'); | ||
| 1832 | + | ||
| 1833 | + const fieldNotZero = commonFunc.showLocalMessage(this.props, 'fieldNotZero', '字段不能为0'); | ||
| 1834 | + | ||
| 1835 | + const errorMessage = commonFunc.showLocalMessage(this.props, 'errorMessage', '错误提示'); | ||
| 1836 | + | ||
| 1837 | + | ||
| 1831 | const allTableConfig = commonFunc.getAllTableConfig(props); | 1838 | const allTableConfig = commonFunc.getAllTableConfig(props); |
| 1832 | const bParamsMustConfigList = []; | 1839 | const bParamsMustConfigList = []; |
| 1833 | Object.keys(allTableConfig).forEach(tableName => { | 1840 | Object.keys(allTableConfig).forEach(tableName => { |
| @@ -1900,15 +1907,15 @@ export function validatePramsNotEmpty(props) { | @@ -1900,15 +1907,15 @@ export function validatePramsNotEmpty(props) { | ||
| 1900 | if (mustValue === undefined || mustValue === '') { | 1907 | if (mustValue === undefined || mustValue === '') { |
| 1901 | if (paramConfig[bMustList[iIndex]] === "色序") { | 1908 | if (paramConfig[bMustList[iIndex]] === "色序") { |
| 1902 | if (commonUtils.isEmpty(rowData.sColorSerialMemo)) { | 1909 | if (commonUtils.isEmpty(rowData.sColorSerialMemo)) { |
| 1903 | - sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`; | 1910 | + sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`; |
| 1904 | } | 1911 | } |
| 1905 | } | 1912 | } |
| 1906 | else if (paramConfig[bMustList[iIndex]] === "电化铝版本") { | 1913 | else if (paramConfig[bMustList[iIndex]] === "电化铝版本") { |
| 1907 | if (commonUtils.isEmpty(rowData.sAlumiteBomBillNo)) { | 1914 | if (commonUtils.isEmpty(rowData.sAlumiteBomBillNo)) { |
| 1908 | - sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`; | 1915 | + sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`; |
| 1909 | } | 1916 | } |
| 1910 | } else { | 1917 | } else { |
| 1911 | - sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`; | 1918 | + sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`; |
| 1912 | } | 1919 | } |
| 1913 | } | 1920 | } |
| 1914 | 1921 | ||
| @@ -1918,7 +1925,7 @@ export function validatePramsNotEmpty(props) { | @@ -1918,7 +1925,7 @@ export function validatePramsNotEmpty(props) { | ||
| 1918 | iIndex = 0; | 1925 | iIndex = 0; |
| 1919 | for(const zeroValue of bNotZeroValueList) { | 1926 | for(const zeroValue of bNotZeroValueList) { |
| 1920 | if (zeroValue === undefined || zeroValue === '0' || zeroValue === 0) { | 1927 | if (zeroValue === undefined || zeroValue === '0' || zeroValue === 0) { |
| 1921 | - sTip = `${sTip}【${paramConfig[bNotZeroList[iIndex]]}】字段不能0!xpm`; | 1928 | + sTip = `${sTip}【${paramConfig[bNotZeroList[iIndex]]}】${fieldNotZero}!xpm`; |
| 1922 | } | 1929 | } |
| 1923 | iIndex = iIndex + 1; | 1930 | iIndex = iIndex + 1; |
| 1924 | } | 1931 | } |
| @@ -1952,9 +1959,8 @@ export function validatePramsNotEmpty(props) { | @@ -1952,9 +1959,8 @@ export function validatePramsNotEmpty(props) { | ||
| 1952 | 1959 | ||
| 1953 | if (commonUtils.isNotEmptyStr(sTipAll)) { | 1960 | if (commonUtils.isNotEmptyStr(sTipAll)) { |
| 1954 | Modal.error({ | 1961 | Modal.error({ |
| 1955 | - title: "错误提示:", | 1962 | + title: errorMessage, |
| 1956 | content: <div>{handleGetMsg(sTipAll)}</div>, | 1963 | content: <div>{handleGetMsg(sTipAll)}</div>, |
| 1957 | - okText: "确认", | ||
| 1958 | onOk() {} | 1964 | onOk() {} |
| 1959 | }); | 1965 | }); |
| 1960 | throw new Error(); | 1966 | throw new Error(); |