Commit 04e38ae6acbac1c6ea621de36ae82ab9368a22fc

Authored by 陈鑫涛
2 parents 04ef50b1 a38f5878

Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main

src/components/Common/commonBusiness.js
... ... @@ -1828,6 +1828,13 @@ export function getCharConfig(name, charType, dataID, order, width, height) {
1828 1828 export function validatePramsNotEmpty(props) {
1829 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 1838 const allTableConfig = commonFunc.getAllTableConfig(props);
1832 1839 const bParamsMustConfigList = [];
1833 1840 Object.keys(allTableConfig).forEach(tableName => {
... ... @@ -1900,15 +1907,15 @@ export function validatePramsNotEmpty(props) {
1900 1907 if (mustValue === undefined || mustValue === '') {
1901 1908 if (paramConfig[bMustList[iIndex]] === "色序") {
1902 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 1913 else if (paramConfig[bMustList[iIndex]] === "电化铝版本") {
1907 1914 if (commonUtils.isEmpty(rowData.sAlumiteBomBillNo)) {
1908   - sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`;
  1915 + sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`;
1909 1916 }
1910 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 1925 iIndex = 0;
1919 1926 for(const zeroValue of bNotZeroValueList) {
1920 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 1930 iIndex = iIndex + 1;
1924 1931 }
... ... @@ -1952,9 +1959,8 @@ export function validatePramsNotEmpty(props) {
1952 1959  
1953 1960 if (commonUtils.isNotEmptyStr(sTipAll)) {
1954 1961 Modal.error({
1955   - title: "错误提示:",
  1962 + title: errorMessage,
1956 1963 content: <div>{handleGetMsg(sTipAll)}</div>,
1957   - okText: "确认",
1958 1964 onOk() {}
1959 1965 });
1960 1966 throw new Error();
... ...
src/components/Manufacture/CommonPackEvent.js
... ... @@ -1484,6 +1484,7 @@ const ParamsChooseNewModal = props =&gt; {
1484 1484  
1485 1485 const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ;
1486 1486  
  1487 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
1487 1488  
1488 1489 return props[modalName] ? (
1489 1490 <AntdDraggableModal
... ...
src/components/Manufacture/WorkOrderPack/WorkOrderPack.js
... ... @@ -1199,8 +1199,10 @@ class WorkOrderPack extends Component {
1199 1199 return;
1200 1200 }
1201 1201 }
  1202 + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。');
  1203 +
1202 1204 if (['manufacture/workOrder'].includes(sModelsType) && !calculated) {
1203   - message.warning('自动计算中,请稍后再试。');
  1205 + message.warning(calculating);
1204 1206 await this.handleCalculation(true);
1205 1207 } else {
1206 1208 const data = [];
... ...
src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
... ... @@ -1648,8 +1648,10 @@ class WorkOrderPack extends Component {
1648 1648 // return;
1649 1649 // }
1650 1650 // }
  1651 + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。');
  1652 +
1651 1653 if (sModelsType.includes('manufacture/workOrder') && !calculated) {
1652   - message.warning('自动计算中,请稍后再试。');
  1654 + message.warning(calculating);
1653 1655 await this.handleCalculation(true);
1654 1656 } else {
1655 1657 const data = [];
... ...
src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
... ... @@ -1547,7 +1547,8 @@ class WorkOrderPack extends Component {
1547 1547 });
1548 1548 return;
1549 1549 }
1550   - console.log('3332', 1111);
  1550 + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。');
  1551 +
1551 1552 if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props) || !commonBusiness.validateTable(controlConfig, controlData, this.props) ||
1552 1553 (!commonBusiness.validateTable(materialsConfig, materialsData, this.props)) || !commonBusiness.validateTable(processConfig, processData, this.props) ||
1553 1554 !commonBusiness.validateTable(colorConfig, colorData, this.props)) {
... ... @@ -1582,7 +1583,7 @@ class WorkOrderPack extends Component {
1582 1583 }
1583 1584 }
1584 1585 if (sModelsType.includes('manufacture/workOrder') && !calculated && bAutoCalculate) {
1585   - message.warning('自动计算中,请稍后再试。');
  1586 + message.warning(calculating);
1586 1587 await this.handleCalculation(true);
1587 1588 } else {
1588 1589 const data = [];
... ...
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
... ... @@ -2695,8 +2695,12 @@ const WorkOrderPackTableTreeNewEvent = props =&gt; {
2695 2695 form.validateFields(async err => {
2696 2696 if (err) {
2697 2697 // 验证失败
  2698 + const language = props?.app?.userinfo?.sLanguage || 'sChinese'; // 默认简体中文
  2699 + const requiredText = language === 'sEnglish' ? 'is Required' :
  2700 + (language === 'sBig5' ? '為必填項' : '为必填项');
2698 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 2705 props.onSaveState({
2702 2706 loading: false,
... ... @@ -2748,8 +2752,10 @@ const WorkOrderPackTableTreeNewEvent = props =&gt; {
2748 2752 });
2749 2753 return;
2750 2754 }
  2755 + const calculating = commonFunc.showLocalMessage(props, 'calculating', '自动计算中,请稍后再试。');
  2756 +
2751 2757 if (sModelsType.includes("manufacture/workOrder") && !calculated) {
2752   - message.warning("自动计算中,请稍后再试。");
  2758 + message.warning(calculating);
2753 2759 await props.handleCalculation("workOrder", true);
2754 2760 } else {
2755 2761 const data = [];
... ... @@ -3492,7 +3498,7 @@ const processProps = props =&gt; {
3492 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 3502 const tableDataRow = props.onDataRowAdd(name, true);
3497 3503 if (commonUtils.isEmptyArr(controlSelectedRowKeys) && !bFinished) {
3498 3504 message.warn(commonFunc.showMessage(gdsformconst, "pleaseChooseParts")); // 请选择部件
... ...
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
... ... @@ -2348,9 +2348,11 @@ class QuotationPackTableTree extends Component {
2348 2348 data.push(commonBusiness.mergeData('pack', `${packConfig.sTbName.toLowerCase()}_tmp`, packData, [], true));
2349 2349 const value = { data, sClientType: '1', sGuid: masterData.sId };
2350 2350  
  2351 + const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。');
  2352 +
2351 2353 const cacheIndex = dQuickQuoteProductQty === undefined ? -1 : manyDataCache.findIndex(item => item.dManyQty === dQuickQuoteProductQty);
2352 2354 if (cacheIndex === -1) {
2353   - message.warning('自动计算中,请稍后再试。');
  2355 + message.warning(calculating);
2354 2356 }
2355 2357 const dataReturn = cacheIndex === -1 ?
2356 2358 (await commonServices.postValueService(this.props.app.token, value, dataUrl)).data
... ...