diff --git a/src/components/Common/commonBusiness.js b/src/components/Common/commonBusiness.js
index 2095272..97e96ef 100644
--- a/src/components/Common/commonBusiness.js
+++ b/src/components/Common/commonBusiness.js
@@ -1828,6 +1828,13 @@ export function getCharConfig(name, charType, dataID, order, width, height) {
export function validatePramsNotEmpty(props) {
let result = true;
+ const fieldNotNull = commonFunc.showLocalMessage(props, 'fieldNotNull', '字段不能为空');
+
+ const fieldNotZero = commonFunc.showLocalMessage(props, 'fieldNotZero', '字段不能为0');
+
+ const errorMessage = commonFunc.showLocalMessage(props, 'errorMessage', '错误提示');
+
+
const allTableConfig = commonFunc.getAllTableConfig(props);
const bParamsMustConfigList = [];
Object.keys(allTableConfig).forEach(tableName => {
@@ -1900,15 +1907,15 @@ export function validatePramsNotEmpty(props) {
if (mustValue === undefined || mustValue === '') {
if (paramConfig[bMustList[iIndex]] === "色序") {
if (commonUtils.isEmpty(rowData.sColorSerialMemo)) {
- sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`;
+ sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`;
}
}
else if (paramConfig[bMustList[iIndex]] === "电化铝版本") {
if (commonUtils.isEmpty(rowData.sAlumiteBomBillNo)) {
- sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`;
+ sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`;
}
} else {
- sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】字段不能为空!xpm`;
+ sTip = `${sTip}【${paramConfig[bMustList[iIndex]]}】${fieldNotNull}xpm`;
}
}
@@ -1918,7 +1925,7 @@ export function validatePramsNotEmpty(props) {
iIndex = 0;
for(const zeroValue of bNotZeroValueList) {
if (zeroValue === undefined || zeroValue === '0' || zeroValue === 0) {
- sTip = `${sTip}【${paramConfig[bNotZeroList[iIndex]]}】字段不能0!xpm`;
+ sTip = `${sTip}【${paramConfig[bNotZeroList[iIndex]]}】${fieldNotZero}!xpm`;
}
iIndex = iIndex + 1;
}
@@ -1952,9 +1959,8 @@ export function validatePramsNotEmpty(props) {
if (commonUtils.isNotEmptyStr(sTipAll)) {
Modal.error({
- title: "错误提示:",
+ title: errorMessage,
content:
{handleGetMsg(sTipAll)}
,
- okText: "确认",
onOk() {}
});
throw new Error();
diff --git a/src/components/Manufacture/CommonPackEvent.js b/src/components/Manufacture/CommonPackEvent.js
index 33caf1e..1f98f88 100644
--- a/src/components/Manufacture/CommonPackEvent.js
+++ b/src/components/Manufacture/CommonPackEvent.js
@@ -1484,6 +1484,7 @@ const ParamsChooseNewModal = props => {
const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ;
+ const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
return props[modalName] ? (
{
form.validateFields(async err => {
if (err) {
// 验证失败
+ const language = props?.app?.userinfo?.sLanguage || 'sChinese'; // 默认简体中文
+ const requiredText = language === 'sEnglish' ? 'is Required' :
+ (language === 'sBig5' ? '為必填項' : '为必填项');
for (const key of Object.keys(err)) {
- message.warning(err[key].errors[0].message);
+ const sContent = err[key].errors[0].message?.replace('为必填项', requiredText);
+ message.warning(sContent);
}
props.onSaveState({
loading: false,
@@ -2748,8 +2752,10 @@ const WorkOrderPackTableTreeNewEvent = props => {
});
return;
}
+ const calculating = commonFunc.showLocalMessage(props, 'calculating', '自动计算中,请稍后再试。');
+
if (sModelsType.includes("manufacture/workOrder") && !calculated) {
- message.warning("自动计算中,请稍后再试。");
+ message.warning(calculating);
await props.handleCalculation("workOrder", true);
} else {
const data = [];
@@ -3492,7 +3498,7 @@ const processProps = props => {
return;
}
/* 外置处理业务 */
- const { gdsformconst, slaveData, controlData, controlSelectedRowKeys, slaveSelectedRowKeys, [`${name}Data`]: tableData } = props;
+ const { gdsformconst, slaveData, controlData, controlSelectedRowKeys, slaveSelectedRowKeys, [`${name}Data`]: tableData = [] } = props;
const tableDataRow = props.onDataRowAdd(name, true);
if (commonUtils.isEmptyArr(controlSelectedRowKeys) && !bFinished) {
message.warn(commonFunc.showMessage(gdsformconst, "pleaseChooseParts")); // 请选择部件
diff --git a/src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js b/src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
index f55582a..f2fa296 100644
--- a/src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
+++ b/src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
@@ -2348,9 +2348,11 @@ class QuotationPackTableTree extends Component {
data.push(commonBusiness.mergeData('pack', `${packConfig.sTbName.toLowerCase()}_tmp`, packData, [], true));
const value = { data, sClientType: '1', sGuid: masterData.sId };
+ const calculating = commonFunc.showLocalMessage(this.props, 'calculating', '自动计算中,请稍后再试。');
+
const cacheIndex = dQuickQuoteProductQty === undefined ? -1 : manyDataCache.findIndex(item => item.dManyQty === dQuickQuoteProductQty);
if (cacheIndex === -1) {
- message.warning('自动计算中,请稍后再试。');
+ message.warning(calculating);
}
const dataReturn = cacheIndex === -1 ?
(await commonServices.postValueService(this.props.app.token, value, dataUrl)).data