Commit 04e38ae6acbac1c6ea621de36ae82ab9368a22fc
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
7 changed files
with
34 additions
and
14 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(props, 'fieldNotNull', '字段不能为空'); | ||
| 1832 | + | ||
| 1833 | + const fieldNotZero = commonFunc.showLocalMessage(props, 'fieldNotZero', '字段不能为0'); | ||
| 1834 | + | ||
| 1835 | + const errorMessage = commonFunc.showLocalMessage(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(); |
src/components/Manufacture/CommonPackEvent.js
| @@ -1484,6 +1484,7 @@ const ParamsChooseNewModal = props => { | @@ -1484,6 +1484,7 @@ const ParamsChooseNewModal = props => { | ||
| 1484 | 1484 | ||
| 1485 | const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ; | 1485 | const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ; |
| 1486 | 1486 | ||
| 1487 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); | ||
| 1487 | 1488 | ||
| 1488 | return props[modalName] ? ( | 1489 | return props[modalName] ? ( |
| 1489 | <AntdDraggableModal | 1490 | <AntdDraggableModal |
src/components/Manufacture/WorkOrderPack/WorkOrderPack.js
| @@ -1199,8 +1199,10 @@ class WorkOrderPack extends Component { | @@ -1199,8 +1199,10 @@ class WorkOrderPack extends Component { | ||
| 1199 | return; | 1199 | return; |
| 1200 | } | 1200 | } |
| 1201 | } | 1201 | } |
| 1202 | + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。'); | ||
| 1203 | + | ||
| 1202 | if (['manufacture/workOrder'].includes(sModelsType) && !calculated) { | 1204 | if (['manufacture/workOrder'].includes(sModelsType) && !calculated) { |
| 1203 | - message.warning('自动计算中,请稍后再试。'); | 1205 | + message.warning(calculating); |
| 1204 | await this.handleCalculation(true); | 1206 | await this.handleCalculation(true); |
| 1205 | } else { | 1207 | } else { |
| 1206 | const data = []; | 1208 | const data = []; |
src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
| @@ -1648,8 +1648,10 @@ class WorkOrderPack extends Component { | @@ -1648,8 +1648,10 @@ class WorkOrderPack extends Component { | ||
| 1648 | // return; | 1648 | // return; |
| 1649 | // } | 1649 | // } |
| 1650 | // } | 1650 | // } |
| 1651 | + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。'); | ||
| 1652 | + | ||
| 1651 | if (sModelsType.includes('manufacture/workOrder') && !calculated) { | 1653 | if (sModelsType.includes('manufacture/workOrder') && !calculated) { |
| 1652 | - message.warning('自动计算中,请稍后再试。'); | 1654 | + message.warning(calculating); |
| 1653 | await this.handleCalculation(true); | 1655 | await this.handleCalculation(true); |
| 1654 | } else { | 1656 | } else { |
| 1655 | const data = []; | 1657 | const data = []; |
src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
| @@ -1547,7 +1547,8 @@ class WorkOrderPack extends Component { | @@ -1547,7 +1547,8 @@ class WorkOrderPack extends Component { | ||
| 1547 | }); | 1547 | }); |
| 1548 | return; | 1548 | return; |
| 1549 | } | 1549 | } |
| 1550 | - console.log('3332', 1111); | 1550 | + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。'); |
| 1551 | + | ||
| 1551 | if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props) || !commonBusiness.validateTable(controlConfig, controlData, this.props) || | 1552 | if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props) || !commonBusiness.validateTable(controlConfig, controlData, this.props) || |
| 1552 | (!commonBusiness.validateTable(materialsConfig, materialsData, this.props)) || !commonBusiness.validateTable(processConfig, processData, this.props) || | 1553 | (!commonBusiness.validateTable(materialsConfig, materialsData, this.props)) || !commonBusiness.validateTable(processConfig, processData, this.props) || |
| 1553 | !commonBusiness.validateTable(colorConfig, colorData, this.props)) { | 1554 | !commonBusiness.validateTable(colorConfig, colorData, this.props)) { |
| @@ -1582,7 +1583,7 @@ class WorkOrderPack extends Component { | @@ -1582,7 +1583,7 @@ class WorkOrderPack extends Component { | ||
| 1582 | } | 1583 | } |
| 1583 | } | 1584 | } |
| 1584 | if (sModelsType.includes('manufacture/workOrder') && !calculated && bAutoCalculate) { | 1585 | if (sModelsType.includes('manufacture/workOrder') && !calculated && bAutoCalculate) { |
| 1585 | - message.warning('自动计算中,请稍后再试。'); | 1586 | + message.warning(calculating); |
| 1586 | await this.handleCalculation(true); | 1587 | await this.handleCalculation(true); |
| 1587 | } else { | 1588 | } else { |
| 1588 | const data = []; | 1589 | const data = []; |
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
| @@ -2695,8 +2695,12 @@ const WorkOrderPackTableTreeNewEvent = props => { | @@ -2695,8 +2695,12 @@ const WorkOrderPackTableTreeNewEvent = props => { | ||
| 2695 | form.validateFields(async err => { | 2695 | form.validateFields(async err => { |
| 2696 | if (err) { | 2696 | if (err) { |
| 2697 | // 验证失败 | 2697 | // 验证失败 |
| 2698 | + const language = props?.app?.userinfo?.sLanguage || 'sChinese'; // 默认简体中文 | ||
| 2699 | + const requiredText = language === 'sEnglish' ? 'is Required' : | ||
| 2700 | + (language === 'sBig5' ? '為必填項' : '为必填项'); | ||
| 2698 | for (const key of Object.keys(err)) { | 2701 | for (const key of Object.keys(err)) { |
| 2699 | - message.warning(err[key].errors[0].message); | 2702 | + const sContent = err[key].errors[0].message?.replace('为必填项', requiredText); |
| 2703 | + message.warning(sContent); | ||
| 2700 | } | 2704 | } |
| 2701 | props.onSaveState({ | 2705 | props.onSaveState({ |
| 2702 | loading: false, | 2706 | loading: false, |
| @@ -2748,8 +2752,10 @@ const WorkOrderPackTableTreeNewEvent = props => { | @@ -2748,8 +2752,10 @@ const WorkOrderPackTableTreeNewEvent = props => { | ||
| 2748 | }); | 2752 | }); |
| 2749 | return; | 2753 | return; |
| 2750 | } | 2754 | } |
| 2755 | + const calculating = commonFunc.showLocalMessage(props, 'calculating', '自动计算中,请稍后再试。'); | ||
| 2756 | + | ||
| 2751 | if (sModelsType.includes("manufacture/workOrder") && !calculated) { | 2757 | if (sModelsType.includes("manufacture/workOrder") && !calculated) { |
| 2752 | - message.warning("自动计算中,请稍后再试。"); | 2758 | + message.warning(calculating); |
| 2753 | await props.handleCalculation("workOrder", true); | 2759 | await props.handleCalculation("workOrder", true); |
| 2754 | } else { | 2760 | } else { |
| 2755 | const data = []; | 2761 | const data = []; |
| @@ -3492,7 +3498,7 @@ const processProps = props => { | @@ -3492,7 +3498,7 @@ const processProps = props => { | ||
| 3492 | return; | 3498 | return; |
| 3493 | } | 3499 | } |
| 3494 | /* 外置处理业务 */ | 3500 | /* 外置处理业务 */ |
| 3495 | - const { gdsformconst, slaveData, controlData, controlSelectedRowKeys, slaveSelectedRowKeys, [`${name}Data`]: tableData } = props; | 3501 | + const { gdsformconst, slaveData, controlData, controlSelectedRowKeys, slaveSelectedRowKeys, [`${name}Data`]: tableData = [] } = props; |
| 3496 | const tableDataRow = props.onDataRowAdd(name, true); | 3502 | const tableDataRow = props.onDataRowAdd(name, true); |
| 3497 | if (commonUtils.isEmptyArr(controlSelectedRowKeys) && !bFinished) { | 3503 | if (commonUtils.isEmptyArr(controlSelectedRowKeys) && !bFinished) { |
| 3498 | message.warn(commonFunc.showMessage(gdsformconst, "pleaseChooseParts")); // 请选择部件 | 3504 | message.warn(commonFunc.showMessage(gdsformconst, "pleaseChooseParts")); // 请选择部件 |
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| @@ -2348,9 +2348,11 @@ class QuotationPackTableTree extends Component { | @@ -2348,9 +2348,11 @@ class QuotationPackTableTree extends Component { | ||
| 2348 | data.push(commonBusiness.mergeData('pack', `${packConfig.sTbName.toLowerCase()}_tmp`, packData, [], true)); | 2348 | data.push(commonBusiness.mergeData('pack', `${packConfig.sTbName.toLowerCase()}_tmp`, packData, [], true)); |
| 2349 | const value = { data, sClientType: '1', sGuid: masterData.sId }; | 2349 | const value = { data, sClientType: '1', sGuid: masterData.sId }; |
| 2350 | 2350 | ||
| 2351 | + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。'); | ||
| 2352 | + | ||
| 2351 | const cacheIndex = dQuickQuoteProductQty === undefined ? -1 : manyDataCache.findIndex(item => item.dManyQty === dQuickQuoteProductQty); | 2353 | const cacheIndex = dQuickQuoteProductQty === undefined ? -1 : manyDataCache.findIndex(item => item.dManyQty === dQuickQuoteProductQty); |
| 2352 | if (cacheIndex === -1) { | 2354 | if (cacheIndex === -1) { |
| 2353 | - message.warning('自动计算中,请稍后再试。'); | 2355 | + message.warning(calculating); |
| 2354 | } | 2356 | } |
| 2355 | const dataReturn = cacheIndex === -1 ? | 2357 | const dataReturn = cacheIndex === -1 ? |
| 2356 | (await commonServices.postValueService(this.props.app.token, value, dataUrl)).data | 2358 | (await commonServices.postValueService(this.props.app.token, value, dataUrl)).data |