Commit ec1f31f18f9a2a61f6aaf494f6eda55925d8e14e

Authored by 陈鑫涛
2 parents 003ed0c7 b0be4f74

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

Showing 47 changed files with 273 additions and 112 deletions
src/assets/hasCancel_english.png 0 → 100644

40 KB

src/assets/hasChecked.png 0 → 100644

107 KB

src/assets/hasChecked_big5.png 0 → 100644

106 KB

src/assets/hasChecked_english.png 0 → 100644

101 KB

src/assets/hasChecking_big5.png 0 → 100644

181 KB

src/assets/hasChecking_english.png 0 → 100644

170 KB

src/assets/haveCancel_big5.png 0 → 100644

40 KB

src/assets/haveCancel_english.png 0 → 100644

40 KB

src/assets/haveSubmit_english.png 0 → 100644

172 KB

src/assets/haveSubmit_english1.png 0 → 100644

172 KB

src/assets/haveSubmit_sBig5.png 0 → 100644

189 KB

src/components/AuditInformation/AuditInformation.js
... ... @@ -112,8 +112,8 @@ class AuditInformation extends Component {
112 112 }
113 113 };
114 114 render() {
115   - const { pageLoading, masterData } = this.props;
116   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  115 + const { masterData, sModelsType, app } = this.props;
  116 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
117 117 return (
118 118 <Spin spinning={pageLoading}>
119 119 <WorkOrderComponent
... ...
src/components/Common/CommonBillDeliverEvent.js
... ... @@ -5135,8 +5135,8 @@ export default (ChildComponent) =&gt; {
5135 5135 };
5136 5136  
5137 5137 render() {
5138   - const { masterData } = this.props;
5139   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  5138 + const { masterData, sModelsType, app } = this.props;
  5139 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
5140 5140 return (
5141 5141 <ChildComponent
5142 5142 {...this.props}
... ...
src/components/Common/CommonBillEvent.js
... ... @@ -9979,8 +9979,8 @@ export default (ChildComponent) =&gt; {
9979 9979 }
9980 9980 };
9981 9981 render() {
9982   - const { masterData } = this.props;
9983   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  9982 + const { masterData, sModelsType, app } = this.props;
  9983 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
9984 9984 return (
9985 9985 <ChildComponent
9986 9986 {...this.props}
... ...
src/components/Common/CommonCheckBillEvent.js
... ... @@ -5541,8 +5541,8 @@ export default (ChildComponent) =&gt; {
5541 5541 }
5542 5542  
5543 5543 render() {
5544   - const { masterData } = this.props;
5545   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  5544 + const { masterData, sModelsType, app } = this.props;
  5545 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
5546 5546 return (
5547 5547 <ChildComponent
5548 5548 {...this.props}
... ...
src/components/Common/CommonComponent/index.js
1 1 import moment from 'moment';
2 2 import React, { Component, createRef } from 'react';
3 3 import reactComponentDebounce from '@/components/Common/ReactDebounce';
  4 +import * as commonFunc from '@/components/Common//commonFunc';/* 通用单据方法 */ /* 通用单据方法 */
4 5 // import '@ant-design/compatible/assets/index.css';
5 6 import {
6 7 InputNumber,
... ... @@ -1010,10 +1011,14 @@ export default class CommonComponent extends Component {
1010 1011 };
1011 1012  
1012 1013 getSearchProps = () => {
  1014 + let chooseTitle = '选择';
  1015 + if(commonUtils.isNotEmptyObject(this.props.app) && commonUtils.isNotEmptyObject(this.props.app.commonConst)) {
  1016 + chooseTitle = commonFunc.showMessage(this.props.app.commonConst, 'choose') ;
  1017 + }
1013 1018 const obj = {
1014 1019 onKeyDown: this.onKeyDown,
1015 1020 onChange: e => this.handleSelectOptionEvent(e.target.value), /* 数据改变回带到父组件 */
1016   - value: commonUtils.isUndefined(this.state.dataValue) ? '选择' : commonUtils.strUndefinedToEmpty(this.state.dataValue), /* 数据值 */
  1021 + value: commonUtils.isUndefined(this.state.dataValue) ? chooseTitle : commonUtils.strUndefinedToEmpty(this.state.dataValue), /* 数据值 */
1017 1022 };
1018 1023 return obj;
1019 1024 }
... ... @@ -1113,6 +1118,10 @@ export default class CommonComponent extends Component {
1113 1118 const {
1114 1119 sTableTitleSql, iVisCount, sName, sDateFormat,
1115 1120 } = this.props.showConfig;
  1121 + let chooseTitle = '选择';
  1122 + if(commonUtils.isNotEmptyObject(this.props.app) && commonUtils.isNotEmptyObject(this.props.app.commonConst)) {
  1123 + chooseTitle = commonFunc.showMessage(this.props.app.commonConst, 'choose') ;
  1124 + }
1116 1125 if (commonUtils.isNotEmptyStr(sTableTitleSql) && iVisCount > 1) {
1117 1126 return <Select ref={(ref) => { this.selectTableRef = ref; }} {...this.getSelectTableProps()}>{this.getSelectTableOption()}</Select>;
1118 1127 }
... ... @@ -1251,7 +1260,7 @@ export default class CommonComponent extends Component {
1251 1260 return <Select {...this.getSelectProps()} >{this.getSelectOption()}</Select>;
1252 1261 }
1253 1262 } else if (this.state.enabled && commonUtils.isNotEmptyObject(this.props.showConfig.sName) && this.props.showConfig.sDropDownType === 'popup') { /* 通用弹窗 */
1254   - return (<Search placeholder="选择" defaultValue="选择" {...this.getSearchProps()} onSearch={this.onFieldPopupModal.bind(this, this.props.showConfig, this.props.name)} />);
  1263 + return (<Search placeholder={chooseTitle} defaultValue={chooseTitle} {...this.getSearchProps()} onSearch={this.onFieldPopupModal.bind(this, this.props.showConfig, this.props.name)} />);
1255 1264 } else if (this.firstDataIndex === 'i' || this.firstDataIndex === 'd') { /* 数字输入框(整形i和浮点型d) */
1256 1265 return innerInputProps.readOnly ? <span onKeyDown={this.onKeyDown} suppressContentEditableWarning contentEditable="true"><InputNumberA {...innerInputProps} /></span> :
1257 1266 location.pathname.includes('quotationPackTableTree') && this.props.name === 'control' && this.props.showConfig.sName === 'dSinglePQty' ? <span style={{ position: 'relative' }}><InputNumberA {...innerInputProps} /><span onClick={this.handleViewClick} style={{ position: 'absolute', right: '2px' }}><EyeOutlined /></span></span> : <InputNumberA {...innerInputProps} style={{ width: '100%' }} />;
... ...
src/components/Common/CommonElementEvent.js
... ... @@ -391,7 +391,18 @@ export default (ChildComponent) =&gt; {
391 391 customizeParamConfig = customizeParamConfigNew;
392 392 }
393 393  
  394 + /* 自定义参数 */
  395 + let selfParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizevariable')) ?
  396 + formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {};
  397 + let selfParamColumn = [];
  398 + if(commonUtils.isNotEmptyArr(selfParamConfig)) {
  399 + selfParamColumn = commonFunc.getHeaderConfig(selfParamConfig);
  400 + }
  401 + console.log('systemParamColumn', selfParamConfig, selfParamColumn);
  402 +
  403 +
394 404 this.handleGetSlaveData('Set', 'param', paramConfig);
  405 + this.handleGetSlaveData('Set', 'selfParam', selfParamConfig);
395 406 let addState = {};
396 407 let addStateMaster = {};
397 408  
... ... @@ -411,6 +422,7 @@ export default (ChildComponent) =&gt; {
411 422 config.masterConfig = masterConfig;
412 423 config.paramConfig = paramConfig;
413 424 config.customizeParamConfig = customizeParamConfig;
  425 + config.selfParamConfig = selfParamConfig;
414 426 addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
415 427 } else {
416 428 addStateMaster = await this.handleGetSlaveData('One', undefined, masterConfig);
... ... @@ -468,6 +480,9 @@ export default (ChildComponent) =&gt; {
468 480 if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
469 481 this.handleGetSlaveData('customizeParam', 'customizeParam', customizeParamConfig);
470 482 }
  483 + if (commonUtils.isNotEmptyObject(selfParamConfig)) {
  484 + this.handleGetSlaveData('Set', 'selfParam', selfParamConfig);
  485 + }
471 486 }
472 487  
473 488 let customizeParamColumn = [];
... ... @@ -529,6 +544,8 @@ export default (ChildComponent) =&gt; {
529 544 systemFunctionData,
530 545 bussinessFunctionData,
531 546 bReceived,
  547 + selfParamConfig,
  548 + selfParamColumn,
532 549 pageLoading: false,
533 550 ...addState,
534 551 ...addState1,
... ... @@ -1895,7 +1912,7 @@ export default (ChildComponent) =&gt; {
1895 1912 const {
1896 1913 sModelsType, masterConfig, slaveConfig, iPlcNoConfig, siscommonstyleproductclassifyConfig, contactConfig, addressConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, supplyConfig,
1897 1914 stockConfig, customerInfoConfig, picFileConfig, eleemployeeConfig, elemachineConfig, jurgroupConfig, customergroupConfig, supplygroupConfig,
1898   - persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, paramConfig, userConfig, phaseConfig, conditionConfig, sischeckphaselogininfoConfig,
  1915 + persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, paramConfig, selfParamConfig, userConfig, phaseConfig, conditionConfig, sischeckphaselogininfoConfig,
1899 1916 sisproductclassifyProcessClassifyConfig, sysmsguserConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, eleteststandarditemConfig, formData, approveGroupConfig,
1900 1917 brandgroupConfig, slave0Config, memoDataList,
1901 1918 } = this.props;
... ... @@ -1934,6 +1951,7 @@ export default (ChildComponent) =&gt; {
1934 1951 this.handleGetSlaveData('One', null, masterConfig, bEditClick);
1935 1952 } else if (sModelsType === 'system/sisformulaInfo') {
1936 1953 this.handleGetSlaveData('Set', 'param', paramConfig, bEditClick);
  1954 + this.handleGetSlaveData('Set', 'selfParam', selfParamConfig, bEditClick);
1937 1955 this.handleGetSlaveData('One', undefined, masterConfig, bEditClick);
1938 1956 let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {};
1939 1957 /* 获取主表自定义列名为自定义变量配置 */
... ... @@ -2351,6 +2369,7 @@ export default (ChildComponent) =&gt; {
2351 2369 userDelData, phaseDelData, conditionDelData, sisproductclassifyProcessClassifyData, sisproductclassifyProcessClassifyDelData,
2352 2370 siscommonstyleproductclassifyConfig, siscommonstyleproductclassifyData, siscommonstyleproductclassifyDelData, customerInfoData,
2353 2371 customerInfoDelData, sysmsguserConfig, customergroupOldData, customergroupOldDelData, supplygroupOldData, supplygroupOldDelData,
  2372 + selfParamConfig, selfParamData,selfParamDelData,
2354 2373 processgroupOldData, processgroupOldDelData, jurgroupOldData, jurgroupOldDelData, persongroupOldData, persongroupOldDelData, drivergroupOldData, drivergroupOldDelData,
2355 2374 eleknifemouldproductData, eleknifemouldproductDelData, eleknifemouldfileData, eleknifemouldfileDelData, eleteststandarditemData, eleteststandarditemDelData,
2356 2375 customizeParamConfig, customizeParamData, customizeParamDelData, dynamicParamData, dynamicParamDelData, departgroupOldData, departgroupOldDelData, customizeParamName,
... ... @@ -2766,6 +2785,9 @@ export default (ChildComponent) =&gt; {
2766 2785 } else if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
2767 2786 data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamData, customizeParamDelData));
2768 2787 }
  2788 + if (commonUtils.isNotEmptyObject(selfParamConfig)) {
  2789 + data.push(commonBusiness.mergeData('selfParam', selfParamConfig.sTbName, selfParamData, selfParamDelData));
  2790 + }
2769 2791 } else if (sModelsType === 'smg/sendMailMsg') {
2770 2792 masterData.sContent = masterData.sContentMemo;
2771 2793 masterData.sType = '1';
... ... @@ -4709,8 +4731,8 @@ export default (ChildComponent) =&gt; {
4709 4731 this.props.onSaveState({ slavePagination });
4710 4732 };
4711 4733 render() {
4712   - const { masterData, sModelsType } = this.props;
4713   - const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType);
  4734 + const { masterData, sModelsType, app } = this.props;
  4735 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
4714 4736 return (
4715 4737 <ChildComponent
4716 4738 {...this.props}
... ...
src/components/Common/CommonGroupBillEvent.js
... ... @@ -4421,8 +4421,8 @@ export default (ChildComponent) =&gt; {
4421 4421 }
4422 4422  
4423 4423 render() {
4424   - const { masterData } = this.props;
4425   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  4424 + const { masterData, sModelsType, app } = this.props;
  4425 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
4426 4426 return (
4427 4427 <ChildComponent
4428 4428 {...this.props}
... ...
src/components/Common/CommonJurisdictionEvent.js
... ... @@ -522,8 +522,8 @@ export default (ChildComponent) =&gt; {
522 522 this.props.onSaveState({ [`${name}${optionName}Keys`]: value });
523 523 }
524 524 render() {
525   - const { masterData } = this.props;
526   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  525 + const { masterData, sModelsType, app } = this.props;
  526 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
527 527 return (
528 528 <ChildComponent
529 529 {...this.props}
... ...
src/components/Common/CommonJurisdictionNewEvent.js
... ... @@ -776,8 +776,8 @@ export default (ChildComponent) =&gt; {
776 776 };
777 777  
778 778 render() {
779   - const { masterData } = this.props;
780   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  779 + const { masterData, sModelsType, app } = this.props;
  780 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
781 781 return (
782 782 <ChildComponent
783 783 {...this.props}
... ...
src/components/Common/CommonListSelectTree/index.js
... ... @@ -627,7 +627,8 @@ const CommonListComponent = Form.create({
627 627 enabled: true,
628 628 };
629 629 }
630   -
  630 + const BtnSure =commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';
  631 + const BtnCancel =commonFunc.showMessage(app.commonConst, 'BtnCancel') || '取消';
631 632 if (commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit) {
632 633 tableFilterProps = {
633 634 ...tableFilterProps,
... ... @@ -747,8 +748,8 @@ const CommonListComponent = Form.create({
747 748 width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px',
748 749 }}
749 750 >
750   - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button>
751   - <Button type="primary" onClick={props.onSelect}>确认</Button>
  751 + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}> {BtnCancel}</Button>
  752 + <Button type="primary" onClick={props.onSelect}> {BtnSure}</Button>
752 753 </div>
753 754 </div>
754 755 </Layout>
... ...
src/components/Common/CommonListTreeSelect/index.js
... ... @@ -534,7 +534,10 @@ const CommonListComponent = Form.create({
534 534 rowSelection: props.rowSelection,
535 535 };
536 536 }
537   -
  537 +
  538 + const BtnSure =commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';
  539 + const BtnCancel =commonFunc.showMessage(app.commonConst, 'BtnCancel') || '取消';
  540 +
538 541 const realizeHeight = commonUtils.isNotEmptyNumber(props.realizeHeight) ? props.realizeHeight : 0;
539 542 const btnClick = (btn) => {
540 543 const { sControlName } = btn;
... ... @@ -566,7 +569,7 @@ const CommonListComponent = Form.create({
566 569 };
567 570  
568 571 return (
569   - <Form >
  572 + <Form>
570 573 <Layout>
571 574 <Layout>
572 575 <div id="modalTreeChooseProcess">
... ... @@ -609,8 +612,8 @@ const CommonListComponent = Form.create({
609 612 }
610 613 </div>
611 614 <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}>
612   - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button>
613   - <Button type="primary" onClick={props.onSelect}>确认</Button>
  615 + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button>
  616 + <Button type="primary" onClick={props.onSelect}> {BtnSure}</Button>
614 617 </div>
615 618 </div> : ''
616 619 }
... ...
src/components/Common/CommonNewBillEvent.js
... ... @@ -5841,8 +5841,8 @@ export default (ChildComponent) =&gt; {
5841 5841 }
5842 5842  
5843 5843 render() {
5844   - const { masterData } = this.props;
5845   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  5844 + const { masterData, sModelsType, app } = this.props;
  5845 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
5846 5846 return (
5847 5847 <ChildComponent
5848 5848 {...this.props}
... ...
src/components/Common/CommonNewTabBillEvent.js
... ... @@ -6981,9 +6981,8 @@ export default (ChildComponent) =&gt; {
6981 6981 }
6982 6982  
6983 6983 render() {
6984   - const { masterData } = this.props;
6985   - const imgSrc = commonBusiness.handleAddIcon(masterData);
6986   - const imgPersonSrc = commonBusiness.handleCheckIcon(masterData);
  6984 + const { masterData, sModelsType, app } = this.props;
  6985 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
6987 6986 return (
6988 6987 <ChildComponent
6989 6988 {...this.props}
... ...
src/components/Common/CommonProductionPlanEvent.js
... ... @@ -1017,8 +1017,8 @@ export default (ChildComponent) =&gt; {
1017 1017 this.props.onSaveState({ [modelVisible]: false });
1018 1018 };
1019 1019 render() {
1020   - const { masterData } = this.props;
1021   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  1020 + const { masterData, sModelsType, app } = this.props;
  1021 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
1022 1022 return (
1023 1023 <ChildComponent
1024 1024 {...this.props}
... ...
src/components/Common/CommonProductionPlanOutsideEvent.js
... ... @@ -903,8 +903,8 @@ export default (ChildComponent) =&gt; {
903 903 }
904 904 }
905 905 render() {
906   - const { masterData } = this.props;
907   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  906 + const { masterData, sModelsType, app } = this.props;
  907 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
908 908 return (
909 909 <ChildComponent
910 910 {...this.props}
... ...
src/components/Common/CommonSubBillEvent.js
... ... @@ -6839,8 +6839,8 @@ export default (ChildComponent) =&gt; {
6839 6839 };
6840 6840  
6841 6841 render() {
6842   - const { masterData } = this.props;
6843   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  6842 + const { masterData, sModelsType, app } = this.props;
  6843 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
6844 6844 return (
6845 6845 <ChildComponent
6846 6846 {...this.props}
... ...
src/components/Common/CommonView/index.js
... ... @@ -9,6 +9,7 @@ import ShowType from &#39;@/components/Common/CommonComponent&#39;;
9 9 import AntdDraggableModal from '@/components/Common/AntdDraggableModal';
10 10 import CommonListSelectTree from '@/components/Common/CommonListSelectTree';
11 11 import * as commonUtils from '@/utils/utils';/* 通用方法 */
  12 +import * as commonFunc from '@/components/Common/commonFunc';/* 单据业务功能 */
12 13  
13 14 const FormItem = Form.Item;
14 15 // const EachInputHeight = 32;
... ... @@ -291,6 +292,8 @@ export default class CommonView extends Component {
291 292 expanded: true,
292 293 });
293 294 }
  295 + const afterSave = commonFunc.showMessage(this.props.app.commonConst, 'afterSave') ||
  296 + '保存后自动生成';/* 保存后自动生成 */
294 297  
295 298 return (
296 299 <Tooltip title="master" placement="topLeft" visible={this.props.showTableName}>
... ... @@ -475,7 +478,7 @@ export default class CommonView extends Component {
475 478 ].includes(child.sName)
476 479 ) ?
477 480 <Col style={{ display: enabled ? 'block' : 'none' }} className="speacialNote" key={child.sId} span="12">
478   - {sModelsType !== 'smg/sendMailMsg' ? '保存后自动生成' : '发送消息无需生成单据号'}
  481 + {sModelsType !== 'smg/sendMailMsg' ? afterSave : afterSave}
479 482 </Col> : '' }
480 483 </Col>
481 484 );
... ...
src/components/Common/PersonCenter/PersonCenter.js
... ... @@ -862,6 +862,8 @@ const PersonCenterOnlineUser = Form.create({
862 862 app,
863 863 } = props;
864 864 const { userinfo } = app;
  865 + const BtnSure =commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';
  866 + const BtnCancel =commonFunc.showMessage(app.commonConst, 'BtnCancel') || '取消';
865 867 const OnlineUsers = commonFunc.showMessage(props.app.commonConst, 'OnlineUsers');/* 在线用户 */
866 868  
867 869 const Website = commonFunc.showMessage(props.app.commonConst, 'Website');/* 站点数 */
... ... @@ -937,39 +939,36 @@ const PersonCenterOnlineUser = Form.create({
937 939 const title = `${OnlineUserName}${commonUtils.isNotEmptyObject(onlineUserDataNew) ? `【 ${Website}:${onlineUserDataNew.consumerCount}\xa0\xa0\xa0\xa0\xa0${ExpirationDate}:${onlineUserDataNew.afterTime}` : ''} 】`;
938 940 return (
939 941 <div>
940   - {
941   - onlineUserVisible ?
942   - <AntdDraggableModal
943   - title={title}
944   - width="80%"
945   - visible={onlineUserVisible}
946   - onCancel={handleCancel}
947   - afterClose={handleCancel}
948   - footer={null}
  942 + {onlineUserVisible ? (
  943 + <AntdDraggableModal title={title} width="80%" visible={onlineUserVisible} onCancel={handleCancel} afterClose={handleCancel} footer={null}>
  944 + <div
  945 + style={{ width: "100%", height: tableHeight + "px" }}
  946 + ref={ref => {
  947 + if (ref) {
  948 + ref.querySelector(".ant-table-container").style.height = tableHeight + "px";
  949 + ref.querySelector(".ant-table-body").style.height = tableHeight - 30 + "px";
  950 + // ref.querySelectorAll('.ant-table-cell-fix-right').forEach(item => {
  951 + // if (item.previousSibling) {
  952 + // item.previousSibling.style.display = 'none';
  953 + // }
  954 + // });
  955 + }
  956 + }}
949 957 >
950   - <div
951   - style={{ width: '100%', height: tableHeight + 'px' }}
952   - ref={(ref) => {
953   - if (ref) {
954   - ref.querySelector('.ant-table-container').style.height = tableHeight + 'px';
955   - ref.querySelector('.ant-table-body').style.height = tableHeight - 30 + 'px';
956   - // ref.querySelectorAll('.ant-table-cell-fix-right').forEach(item => {
957   - // if (item.previousSibling) {
958   - // item.previousSibling.style.display = 'none';
959   - // }
960   - // });
961   - }
962   - }}
963   - >
964   - <StaticEditTable {...onlineUserProps} setOpterationColumn="Y" noVlist />
965   - </div>
966   - <div className='ant-modal-footer' style={{ padding: '8px 0 0 0' }}>
967   - <Button key="back" onClick={handleCancel}>取消</Button>
968   - <Button key="submit" type="primary" onClick={handleCancel}>确认</Button>
969   - </div>
970   - </AntdDraggableModal>
971   - : ''
972   - }
  958 + <StaticEditTable {...onlineUserProps} setOpterationColumn="Y" noVlist />
  959 + </div>
  960 + <div className="ant-modal-footer" style={{ padding: "8px 0 0 0" }}>
  961 + <Button key="back" onClick={handleCancel}>
  962 + {BtnCancel}
  963 + </Button>
  964 + <Button key="submit" type="primary" onClick={handleCancel}>
  965 + {BtnSure}
  966 + </Button>
  967 + </div>
  968 + </AntdDraggableModal>
  969 + ) : (
  970 + ""
  971 + )}
973 972 </div>
974 973 );
975 974 });
... ...
src/components/Common/SearchComponent/index.js
... ... @@ -716,7 +716,7 @@ export default class SearchComponent extends Component {
716 716 handleFields = (searchColumns) => {
717 717 /* 默认快捷过滤 */
718 718 if (commonUtils.isEmptyArr(searchColumns)) { return; }
719   - const { masterData, searchRowKeys } = this.props;
  719 + const { masterData, searchRowKeys, app } = this.props;
720 720 const children = searchRowKeys.map((key) => {
721 721 const { [`sFirst-${key}`]: sFirstValue, [`sSecond-${key}`]: sSecondValue, [`${key}disabled`]: disabled } = masterData;
722 722 const firstDataIndex = commonUtils.isEmpty(sFirstValue) ? 's' :
... ... @@ -750,8 +750,11 @@ export default class SearchComponent extends Component {
750 750 sDropDownType: 'sql',
751 751 bNotEmpty: true,
752 752 iVisCount: 1,
753   - dropDownData: sSecondConditionPro && DropDownType === 'sql' ? commonConfig.seaJudge.s_proDropDown : sSecondConditionPro ? commonConfig.seaJudge.s_pro : commonConfig.seaJudge[firstDataIndex],
754   - bCanInput: false,
  753 + dropDownData: this.getTranslatedSeaJudge(
  754 + sSecondConditionPro && DropDownType === 'sql' ? 's_proDropDown' :
  755 + sSecondConditionPro ? 's_pro' : firstDataIndex,
  756 + app?.userinfo?.sLanguage
  757 + ), bCanInput: false,
755 758 };
756 759 const showThirdConfig = {
757 760 sId,
... ... @@ -1235,6 +1238,71 @@ export default class SearchComponent extends Component {
1235 1238 sGroupByList,
1236 1239 });
1237 1240 };
  1241 + /* 在类中添加一个方法用于处理多语言转换*/
  1242 + getTranslatedSeaJudge = (type, sLanguage) => {
  1243 + const { seaJudge } = commonConfig;
  1244 + const judgeMap = seaJudge[type] || [];
  1245 +
  1246 + // 定义翻译映射
  1247 + const translations = {
  1248 + sEnglish: {
  1249 + '包含': 'Contains',
  1250 + '不包含': 'Not Contains',
  1251 + '等于': 'Equal',
  1252 + '大于': 'Greater Than',
  1253 + '小于': 'Less Than',
  1254 + '大于等于': 'Greater Than or Equal',
  1255 + '小于等于': 'Less Than or Equal',
  1256 + '区间': 'Between',
  1257 + '区间(默认今天)': 'Between (Default Today)',
  1258 + '区间(默认昨天)': 'Between (Default Yesterday)',
  1259 + '区间时间': 'Between Time',
  1260 + '今日': 'Today',
  1261 + '今日未清': 'Unfinished Today',
  1262 + '今天之前': 'Before Today',
  1263 + '明天之前': 'Before Tomorrow',
  1264 + '后天之前': 'Before Day After Tomorrow',
  1265 + '本月': 'This Month',
  1266 + '上月': 'Last Month',
  1267 + '本周': 'This Week',
  1268 + '上周': 'Last Week',
  1269 + '本期间': 'This Period'
  1270 + },
  1271 + sBig5: {
  1272 + '包含': '包含',
  1273 + '不包含': '不包含',
  1274 + '等于': '等於',
  1275 + '大于': '大於',
  1276 + '小于': '小於',
  1277 + '大于等于': '大於等於',
  1278 + '小于等于': '小於等於',
  1279 + '区间': '區間',
  1280 + '区间(默认今天)': '區間(默認今天)',
  1281 + '区间(默认昨天)': '區間(默認昨天)',
  1282 + '区间时间': '區間時間',
  1283 + '今日': '今日',
  1284 + '今日未清': '今日未清',
  1285 + '今天之前': '今天之前',
  1286 + '明天之前': '明天之前',
  1287 + '后天之前': '後天之前',
  1288 + '本月': '本月',
  1289 + '上月': '上月',
  1290 + '本周': '本周',
  1291 + '上周': '上周',
  1292 + '本期间': '本期間'
  1293 + }
  1294 + };
  1295 +
  1296 + if (sLanguage === 'sEnglish' || sLanguage === 'sBig5') {
  1297 + return judgeMap.map(item => ({
  1298 + ...item,
  1299 + value: translations[sLanguage][item.value] || item.value
  1300 + }));
  1301 + }
  1302 +
  1303 + return judgeMap;
  1304 +};
  1305 +
1238 1306 render() {
1239 1307 const {
1240 1308 searchSolution, searchColumns, expand, activeTagId, sType, modalVisible, modalSolutionNameVisible, confirmLoading, masterData, columnSettingVisible, app,
... ...
src/components/Common/commonBusiness.js
... ... @@ -12,10 +12,19 @@ import * as commonFunc from &#39;./commonFunc&#39;; /* 通用单据方法 */
12 12 import commonConfig from '../../utils/config';
13 13 import * as commonServices from '../../services/services';
14 14 import imgCheck from '../../assets/hasChecked.svg'; /* 已审核ICON */
  15 +import imgCheckBig5 from '../../assets/hasChecked_big5.png'; /* 已审核ICON-繁体 */
  16 +import imgCheckEnglish from '../../assets/hasChecked_english.png'; /* 已审核ICON-英文 */
15 17 import imgInvalid from '../../assets/haveCancel.png'; /* 已作废ICON */
  18 +import imgInvalidBig5 from '../../assets/haveCancel_big5.png'; /* 已作废ICON */
  19 +import imgInvalidEnglish from '../../assets/haveCancel_english.png'; /* 已作废ICON */
16 20 import imgChecking from '../../assets/haveChecking.svg'; /* 审核中 */
  21 +import imgCheckingBig5 from '../../assets/hasChecking_big5.png'; /* 审核中-繁体 */
  22 +import imgCheckingEnglish from '../../assets/hasChecking_english.png'; /* 审核中-英文 */
  23 +
17 24 import imgCheckPerson from '../../assets/personChecked1.png'; /* 审核中 */
18 25 import imgSubmit from '../../assets/haveSubmited.svg'; /* 已提交 */
  26 +import imgSubmitBig5 from '../../assets/haveSubmit_sBig5.png'; /* 审核中-繁体 */
  27 +import imgSubmitEnglish from '../../assets/haveSubmit_english.png'; /* 审核中-英文 */
19 28 import { cloneDeep } from 'lodash';
20 29  
21 30 // -----------------------------------------------------------------------
... ... @@ -138,8 +147,13 @@ export function validateField(values, props) {
138 147 }
139 148 /** 添加审核或者作废图标 */
140 149 // eslint-disable-next-line no-unused-vars
141   -export function handleAddIcon(masterData, sModelsType) {
  150 +export function handleAddIcon(masterData, sModelsType, app = {}) {
142 151 let imgSrc = '';
  152 + // 从app中获取用户语言设置
  153 + const userLanguage = app?.userinfo?.sLanguage || 'sChinese'; // 默认简体中文
  154 + const isTraditionalChinese = userLanguage === 'sBig5';
  155 + const isEnglish = userLanguage === 'sEnglish';
  156 +
143 157 if (commonUtils.isNotEmptyObject(masterData)) {
144 158 const {
145 159 bInvalid,
... ... @@ -148,21 +162,21 @@ export function handleAddIcon(masterData, sModelsType) {
148 162 bSubmit,
149 163 } = masterData;
150 164 if (bInvalid) {
151   - imgSrc = imgInvalid;
  165 + imgSrc = isEnglish ? imgInvalidEnglish : (isTraditionalChinese ? imgInvalidBig5 : imgInvalid);
152 166 } else if (bCheck) {
153 167 if (commonUtils.isNotEmptyStr(sModelsType) && sModelsType.includes('element/')) {
154 168 if (sModelsType.includes('element/customerInfo')) {
155   - imgSrc = imgCheck;
  169 + imgSrc = isEnglish ? imgCheckEnglish : (isTraditionalChinese ? imgCheckBig5 : imgCheck);
156 170 } else {
157 171 imgSrc = '';
158 172 }
159 173 } else {
160   - imgSrc = imgCheck;
  174 + imgSrc = isEnglish ? imgCheckEnglish : (isTraditionalChinese ? imgCheckBig5 : imgCheck);
161 175 }
162 176 } else if (sStatus === '2') {
163   - imgSrc = imgChecking;
  177 + imgSrc = isEnglish ? imgCheckingEnglish : (isTraditionalChinese ? imgCheckingBig5 : imgChecking);
164 178 } else if (bSubmit) {
165   - imgSrc = imgSubmit;
  179 + imgSrc = isEnglish ? imgSubmitEnglish : (isTraditionalChinese ? imgSubmitBig5 : imgSubmit);
166 180 }
167 181 }
168 182 return imgSrc;
... ...
src/components/CommonElementEvent/SisformulaInfo.js
... ... @@ -114,6 +114,8 @@ const SisformulaComponent = Form.create({
114 114 const tabCalculationParameter = commonFunc.showMessage(app.commonConst, 'tabCalculationParameter');/* 计算参数 */
115 115 const tabSystemFunction = commonFunc.showMessage(app.commonConst, 'tabSystemFunction');/* 系统函数 */
116 116 const tabBusinessFunction = commonFunc.showMessage(app.commonConst, 'tabBusinessFunction');/* 业务函数 */
  117 + const tabBusinessParameters = commonFunc.showMessage(app.commonConst, 'tabBusinessParameters');/* 自定义参数 */
  118 +
117 119 const showTypeProps = {
118 120 record: masterData,
119 121 name: 'master',
... ... @@ -146,6 +148,16 @@ const SisformulaComponent = Form.create({
146 148 rowSelection: null,
147 149 };
148 150  
  151 + /* 自定义参数 */
  152 + const selfParamPropsType = {
  153 + ...commonBusiness.getTableTypes('selfParam', props),
  154 + tableProps: {
  155 + AutoTableHeight: 255,
  156 + },
  157 + // bNaturalWidth: true, /* 原始宽度 不进行最后一列计算 */
  158 + rowSelection: null,
  159 + };
  160 +
149 161 const customizeParamPropsTypeArr = [];
150 162 if (commonUtils.isNotEmptyArr(props.customizeParamName)) {
151 163 props.customizeParamName.forEach((paramName) => {
... ... @@ -263,6 +275,9 @@ const SisformulaComponent = Form.create({
263 275 <TabPane tab={tabBusinessFunction} key={5}>
264 276 <TabParam {...commonBusiness.getShowTableSelectTypes('bussinessFunction', props, 'value')} />
265 277 </TabPane>
  278 + <TabPane tab={tabBusinessParameters} key={6}>
  279 + { commonUtils.isNotEmptyObject(selfParamPropsType) ? <StaticEditTable {...selfParamPropsType} setOpterationColumn="Y" footer="hidden" /> : ''}
  280 + </TabPane>
266 281 </Tabs>
267 282 {/* <div style={{ height: '1px', backgroundColor: '#d9d9d9', width: '100%' }} /> */}
268 283 <TabCounter {...props} />
... ...
src/components/Manufacture/ProcessCard/ProcessCard.js
... ... @@ -2927,8 +2927,8 @@ class ProcessCard extends Component {
2927 2927 }
2928 2928  
2929 2929 render() {
2930   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
2931   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  2930 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  2931 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
2932 2932 return (
2933 2933 <Spin spinning={pageLoading}>
2934 2934 <ProcessCardComponent
... ...
src/components/Manufacture/ProcessCardPack/ProcessCardPack.js
... ... @@ -4515,8 +4515,8 @@ class ProcessCardPack extends Component {
4515 4515 });
4516 4516 }
4517 4517 render() {
4518   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
4519   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  4518 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  4519 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
4520 4520 return (
4521 4521 <Spin spinning={pageLoading}>
4522 4522 <ProcessCardComponent
... ...
src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js
... ... @@ -6717,8 +6717,8 @@ class ProcessCardPackTableTree extends Component {
6717 6717 });
6718 6718 }
6719 6719 render() {
6720   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
6721   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  6720 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  6721 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
6722 6722 return (
6723 6723 <Spin spinning={pageLoading}>
6724 6724 <ProcessCardComponent
... ...
src/components/Manufacture/ProcessCardPackTableTreeNew/index.js
... ... @@ -3581,8 +3581,8 @@ const ToolBarComponent = props =&gt; {
3581 3581  
3582 3582 // 审核状态
3583 3583 const AvatarComponent = props => {
3584   - const { masterData } = props;
3585   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  3584 + const { masterData, sModelsType, app } = props;
  3585 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
3586 3586 if (!imgSrc) return "";
3587 3587 return (
3588 3588 <div className={styles.avatar}>
... ...
src/components/Manufacture/WorkOrder/WorkOrder.js
... ... @@ -3707,8 +3707,8 @@ class WorkOrder extends Component {
3707 3707 }
3708 3708  
3709 3709 render() {
3710   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
3711   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  3710 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  3711 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
3712 3712 return (
3713 3713 <Spin spinning={pageLoading}>
3714 3714 <WorkOrderComponent
... ...
src/components/Manufacture/WorkOrderPack/WorkOrderPack.js
... ... @@ -5451,8 +5451,8 @@ class WorkOrderPack extends Component {
5451 5451 }
5452 5452  
5453 5453 render() {
5454   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
5455   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  5454 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  5455 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
5456 5456 return (
5457 5457 <Spin spinning={pageLoading}>
5458 5458 <WorkOrderComponent
... ...
src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
... ... @@ -7288,8 +7288,8 @@ class WorkOrderPack extends Component {
7288 7288 }
7289 7289  
7290 7290 render() {
7291   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
7292   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  7291 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  7292 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
7293 7293 const addState = {};
7294 7294 const { processConfig = {} } = this.props;
7295 7295 const { gdsconfigformslave = [] } = processConfig;
... ...
src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
... ... @@ -6774,8 +6774,8 @@ class WorkOrderPack extends Component {
6774 6774 }
6775 6775  
6776 6776 render() {
6777   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
6778   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  6777 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  6778 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
6779 6779 const addState = {};
6780 6780 const { processConfig = {} } = this.props;
6781 6781 const { gdsconfigformslave = [] } = processConfig;
... ...
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
... ... @@ -4048,8 +4048,8 @@ const ToolBarComponent = props =&gt; {
4048 4048  
4049 4049 // 审核状态
4050 4050 const AvatarComponent = props => {
4051   - const { masterData } = props;
4052   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  4051 + const { masterData, sModelsType, app } = props;
  4052 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
4053 4053 if (!imgSrc) return "";
4054 4054 return (
4055 4055 <div className={styles.avatar}>
... ...
src/components/ProductionReport/ProductionReport.js
... ... @@ -1118,7 +1118,7 @@ class ProductionReport extends Component {
1118 1118  
1119 1119 render() {
1120 1120 const {
1121   - pageLoading, masterData, visible, checkConditions, checkPersonData, app,
  1121 + pageLoading, masterData, visible, checkConditions, checkPersonData, app, sModelsType,
1122 1122 } = this.props;
1123 1123 const checkCondition = commonFunc.showMessage(app.commonConst, 'checkCondition');/* 审核条件 */
1124 1124 const checkSmemo = commonFunc.showMessage(app.commonConst, 'checkSmemo');/* 备注 */
... ... @@ -1131,7 +1131,7 @@ class ProductionReport extends Component {
1131 1131 dataIndex: 'sMemo',
1132 1132 key: 'sMemo',
1133 1133 }];
1134   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  1134 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
1135 1135 const btnSure = commonFunc.showMessage(app.commonConst, 'btnSure');/* 确认 */
1136 1136 const check = commonFunc.showMessage(app.commonConst, 'check');/* 审核 */
1137 1137 const BtnClose = commonFunc.showMessage(app.commonConst, 'BtnClose');/* 关闭 */
... ...
src/components/QuoQuotation/Quotation/Quotation.js
... ... @@ -3705,8 +3705,8 @@ class Quotation extends Component {
3705 3705 }
3706 3706  
3707 3707 render() {
3708   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
3709   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  3708 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  3709 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
3710 3710 return (
3711 3711 <Spin spinning={pageLoading}>
3712 3712 <QuotationComponent
... ...
src/components/QuoQuotation/QuotationPack/QuotationPack.js
... ... @@ -5315,8 +5315,8 @@ class QuotationPack extends Component {
5315 5315 }
5316 5316 }
5317 5317 render() {
5318   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
5319   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  5318 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  5319 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app );
5320 5320 return (
5321 5321 <Spin spinning={pageLoading}>
5322 5322 <QuotationComponent
... ...
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
... ... @@ -7915,8 +7915,8 @@ class QuotationPackTableTree extends Component {
7915 7915 }
7916 7916 }
7917 7917 render() {
7918   - const { pageLoading, masterData, fastOrderModalVisible } = this.props;
7919   - const imgSrc = commonBusiness.handleAddIcon(masterData);
  7918 + const { pageLoading, masterData, fastOrderModalVisible, sModelsType, app } = this.props;
  7919 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
7920 7920 return (
7921 7921 <Spin spinning={pageLoading}>
7922 7922 <QuotationComponent
... ...
src/routes/indexPage.js
... ... @@ -2,6 +2,8 @@ import { useEffect, useState } from &#39;react&#39;;
2 2 import { connect } from 'umi';
3 3 import { ConfigProvider, Layout } from 'antd-v4';
4 4 import zhCN from 'antd-v4/lib/locale-provider/zh_CN';
  5 +import enUS from 'antd-v4/lib/locale-provider/en_US';
  6 +import zhTW from 'antd-v4/lib/locale-provider/zh_TW'; // 导入繁体中文语言包
5 7 // import Search from '../components/Common/Search';
6 8 import PersonCenter from './personCenter/personCenter';
7 9 import Feedback from './feedback/feedback';
... ... @@ -11,8 +13,9 @@ import styles from &#39;./indexPage.less&#39;;
11 13  
12 14 const { Header, Content } = Layout;
13 15  
14   -function IndexPage() {
  16 +function IndexPage({ app }) {
15 17 const [key, setKey] = useState(0);
  18 + const currentLanguage = app?.userinfo?.sLanguage || 'zhCN'; // 默认为中文
16 19  
17 20 useEffect(() => {
18 21 window.xlyReload = () => {
... ... @@ -20,8 +23,20 @@ function IndexPage() {
20 23 };
21 24 }, []);
22 25  
  26 + // 根据用户语言选择对应的语言包
  27 + const getLocale = () => {
  28 + switch(currentLanguage) {
  29 + case 'sEnglish':
  30 + return enUS;
  31 + case 'sBig5':
  32 + return zhTW;
  33 + default:
  34 + return zhCN;
  35 + }
  36 + };
  37 +
23 38 return (
24   - <ConfigProvider locale={zhCN}>
  39 + <ConfigProvider locale={getLocale()}>
25 40 <Layout key={key}>
26 41 <Header className={styles.header}>
27 42 <div className={styles.headerRight}>
... ... @@ -48,4 +63,4 @@ function IndexPage() {
48 63  
49 64 IndexPage.propTypes = {};
50 65  
51   -export default connect()(IndexPage);
  66 +export default connect(({ app }) => ({ app }))(IndexPage);
... ...
src/utils/common/message.js
1 1 /* eslint-disable */
2 2 import { Modal, message as antdMessage } from 'antd-v4';
3 3 import { Modal as mobileModal } from 'antd-mobile-v2';
  4 +import commonConfig from '../config';
4 5  
5 6 const { warning } = Modal;
6 7 const antdMobileAlert = mobileModal.alert;
... ... @@ -24,15 +25,22 @@ const openConfirm = (config) =&gt; {
24 25 };
25 26  
26 27 const fn = () => {
  28 + const userinfo = JSON.parse(localStorage.getItem(`${commonConfig.prefix}userinfo`)) || {};
  29 + const language = userinfo.sLanguage || 'sChinese'; // 默认简体中文
  30 + const isEnglish = language === 'sEnglish';
  31 +
  32 + // 使用语言设置
  33 + const sTitle = isEnglish ? 'Reminder' : language === 'sBig5' ? '溫馨提示' : '温馨提示';
  34 + const okText = language === 'sEnglish' ? 'Confirm' : language === 'sBig5' ? '確認': '确认';
27 35 if (location.pathname.toLocaleLowerCase().includes('mobile')) {
28   - antdMobileAlert('温馨提示', secondContent || '出错了', [
  36 + antdMobileAlert(sTitle, secondContent || '出错了', [
29 37 { text: '确认', },
30 38 ])
31 39 } else {
32 40 warning({
33   - title: '温馨提示',
  41 + title: sTitle,
34 42 content: <div style={{ maxHeight: '50vh', overflowY: 'auto' }} >{secondContent || '出错了'}</div>,
35   - okText: '确认',
  43 + okText: okText,
36 44 zIndex: 1000,
37 45 width,
38 46 ...rest,
... ... @@ -52,6 +60,11 @@ const openConfirm = (config) =&gt; {
52 60 export const message = {
53 61 ...antdMessage,
54 62 error: (content, ...rest) => {
55   - openConfirm({ message: content, ...rest });
  63 + const userinfo = JSON.parse(localStorage.getItem(`${commonConfig.prefix}userinfo`)) || {};
  64 + const language = userinfo.sLanguage || 'sChinese'; // 默认简体中文
  65 + const requiredText = language === 'sEnglish' ? 'is Required' :
  66 + (language === 'sBig5' ? '為必填項' : '为必填项');
  67 + const sContent = content?.replace('为必填项', requiredText);
  68 + openConfirm({ message: sContent, ...rest });
56 69 },
57 70 };
... ...