diff --git a/src/mobile/common/CommobileBase.js b/src/mobile/common/CommobileBase.js index 1e15fe6..dc8370c 100644 --- a/src/mobile/common/CommobileBase.js +++ b/src/mobile/common/CommobileBase.js @@ -318,6 +318,10 @@ export default (ChildComponent) => { const { token, sModelsId, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, } = this.state; + const friendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示'); + + const btnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确认'); + const configDataId = configData.sId; const dataUrl = `${commonConfig.server_host}business/getBusinessDataByFormcustomId/${configDataId}?sModelsId=${sModelsId}`; const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; @@ -343,8 +347,8 @@ export default (ChildComponent) => { this.setState(addState); } } else if (dataReturn.code === -8) { - Modal.alert('温馨提示', dataReturn.msg || '出错了', [ - { text: '确认' }, + Modal.alert(friendlyReminder, dataReturn.msg || '出错了', [ + { text: btnSure }, ]); } else { this.getServiceError(dataReturn); diff --git a/src/mobile/common/CommobileSearchComponent.js b/src/mobile/common/CommobileSearchComponent.js index b28670d..7848ba2 100644 --- a/src/mobile/common/CommobileSearchComponent.js +++ b/src/mobile/common/CommobileSearchComponent.js @@ -16,6 +16,7 @@ import moment from 'moment'; import ShowType from './CommobileComponent'; // eslint-disable-next-line import/first import { createForm } from 'rc-form'; +import * as commonFunc from "@/components/Common/commonFunc"; // const data = [ @@ -469,6 +470,12 @@ class CommobileSearchComponent extends React.Component { const { label, initData, show, slavePagination, token, slaveFilterCondition, slaveConfig, showScan, app, sModelsId, masterData, } = this.props; + const allDataTitle = commonFunc.showLocalMessage(this.props, 'allData', '全部数据'); + const filter = commonFunc.showLocalMessage(this.props, 'filter', '筛选'); + const clearConditions = commonFunc.showLocalMessage(this.props, 'clearConditions', '清空条件'); + + const btnSure = commonFunc.showLocalMessage(this.props, 'btnSure', '确定'); + const showName = []; const solutionData = []; if (commonUtils.isNotEmptyArr(slaveFilterCondition) && commonUtils.isNotEmptyArr(slaveConfig)) { @@ -483,12 +490,12 @@ class CommobileSearchComponent extends React.Component { }); } const total = commonUtils.isEmptyObject(slavePagination) ? 0 : slavePagination.total; - const showlabel = commonUtils.isEmptyObject(label) ? '全部数据' : label; + const showlabel = commonUtils.isEmptyObject(label) ? allDataTitle : label; const downUrl = `${commonConfig.file_host}file/download?savePathStr=/home/monkey/xlyerp/modlePath/Down.png&sModelsId=100&token=${token}`; const upUrl = `${commonConfig.file_host}file/download?savePathStr=/home/monkey/xlyerp/modlePath/Up.png&sModelsId=100&token=${token}`; const imgUrl = show ? upUrl : downUrl; const tabs = [ - { title: 筛选 }, + { title: {filter} }, { title: {showlabel} @@ -517,16 +524,16 @@ class CommobileSearchComponent extends React.Component { return (
-
+
@@ -537,13 +544,17 @@ class CommobileSearchComponent extends React.Component { value={this.state.scanValue} onChange={this.handleChangleInput} onCancel={this.handleCancel} - ref={(el) => { this.inputSearch = el; }} + ref={el => { + this.inputSearch = el; + }} />
{ console.log('onChange', index, tab); }} + onChange={(tab, index) => { + console.log("onChange", index, tab); + }} onTabClick={(tab, index) => { if (index === 1) { this.handleClick(); @@ -552,70 +563,76 @@ class CommobileSearchComponent extends React.Component { modal1: true, }); this.props.onSaveState({ - show: false, + show: false, }); } }} >
-
- {show ? initData ? menuEl : loadingEl : null} + {show ? (initData ? menuEl : loadingEl) : null} {show ?
: null}
{ alert('afterClose'); }} > - `${showlabel}`}> - { - solutionData.map((item, index) => { - const showTypeProps = { - app, - record: {}, - sId: item.sId, /* 修改当前编号(数据格式:字符串) */ - name: 'slave', - form: this.props.form, - formId: sModelsId, - getSqlDropDownData: this.props.getSqlDropDownData, - getSqlCondition: this.props.getSqlCondition, - handleSqlDropDownNewRecord: this.props.handleSqlDropDownNewRecord, - getFloatNum: this.props.getFloatNum, - getDateFormat: this.props.getDateFormat, - onChange: this.handleMasterChange, - showConfig: item, - formItemLayout: {}, - textArea: false, - enabled: true, - dataValue: commonUtils.isNotEmptyObject(masterData) ? masterData[item.sName] : '', - bTable: true, - onFilterDropDownData: this.props.onFilterDropDownData, - onSaveState: this.props.onSaveState, - }; - return ( -
- {/* eslint-disable-next-line react/no-array-index-key */} -
- -
- + {solutionData.map((item, index) => { + const showTypeProps = { + app, + record: {}, + sId: item.sId /* 修改当前编号(数据格式:字符串) */, + name: "slave", + form: this.props.form, + formId: sModelsId, + getSqlDropDownData: this.props.getSqlDropDownData, + getSqlCondition: this.props.getSqlCondition, + handleSqlDropDownNewRecord: this.props.handleSqlDropDownNewRecord, + getFloatNum: this.props.getFloatNum, + getDateFormat: this.props.getDateFormat, + onChange: this.handleMasterChange, + showConfig: item, + formItemLayout: {}, + textArea: false, + enabled: true, + dataValue: commonUtils.isNotEmptyObject(masterData) ? masterData[item.sName] : "", + bTable: true, + onFilterDropDownData: this.props.onFilterDropDownData, + onSaveState: this.props.onSaveState, + }; + return ( +
+ {/* eslint-disable-next-line react/no-array-index-key */} +
+
- ); - }) - } + +
+ ); + })} - - + + {" "} + + + + {" "} + + diff --git a/src/mobile/common/CommobileSubBill.js b/src/mobile/common/CommobileSubBill.js index 1b78763..4fabdcd 100644 --- a/src/mobile/common/CommobileSubBill.js +++ b/src/mobile/common/CommobileSubBill.js @@ -1959,7 +1959,7 @@ class CommobileBill extends React.Component { let sValue = record === undefined ? undefined : record[showConfig.sName]; if (showConfig.sDropDownType === 'const') { let showDropDown = []; - if (typeof showConfig.showDropDown === 'object') { + if (typeof showConfig.showDropDown === "object") { // eslint-disable-next-line prefer-destructuring showDropDown = showConfig.showDropDown; } else { @@ -2016,10 +2016,12 @@ class CommobileBill extends React.Component { */ tabShowInfo = (params) => { const { slaveChildConfig, slave0Config, slaveConfig } = this.props; + const detail = commonFunc.showLocalMessage(this.props, 'detail', '明细'); + const sum = commonFunc.showLocalMessage(this.props, 'sum', '汇总'); const { ModalListProps, otherProps, TabComponentSum, temp, tabPage } = params; let tabs = [ - { title: 明细 }, - { title: 汇总 }, + { title: {detail} }, + { title: {sum} }, ]; let contentTab = <> diff --git a/src/mobile/common/MessageMobile.js b/src/mobile/common/MessageMobile.js index 82bae25..c513cba 100644 --- a/src/mobile/common/MessageMobile.js +++ b/src/mobile/common/MessageMobile.js @@ -9,6 +9,7 @@ import CommobileBase from '../../mobile/common/CommobileBase'; import CommobileListEvent from './CommobileListEvent'; import styles from '../../routes/mobile/IndexMobile.less'; import NewsMobile from './NewsMobile'; +import * as commonFunc from "@/components/Common/commonFunc"; // eslint-disable-next-line no-unused-vars // import ExamineMobile from './ExamineMobile'; // import CommobileBill from './CommobileBill'; @@ -18,12 +19,7 @@ const dataSource = new ListView.DataSource({ rowHasChanged: (row1, row2) => row2, }); // eslint-disable-next-line no-unused-vars -const tabs = [ - { title: 消息 }, - { title: 待处理 }, - { title: 已处理 }, - { title: 我的申请 }, -]; + class MessageMobile extends React.Component { constructor(props) { super(props); @@ -58,6 +54,17 @@ class MessageMobile extends React.Component { render() { const { slaveConfig, slaveData: slaveDataOld } = this.props; + const message = commonFunc.showLocalMessage(this.props, 'message', '汇总'); + const pending = commonFunc.showLocalMessage(this.props, 'pending', '待处理'); + const handled = commonFunc.showLocalMessage(this.props, 'handled', '已处理'); + const application = commonFunc.showLocalMessage(this.props, "application", "我的申请"); + + const tabs = [ + { title: {message} }, + { title: {pending} }, + { title: {handled} }, + { title: {application} }, + ]; const { tabPage } = this.state; const slaveDataOld2 = slaveDataOld === undefined ? [] : slaveDataOld; const slaveData = dataSource.cloneWithRows(slaveDataOld2); diff --git a/src/mobile/common/MyselfMobile.js b/src/mobile/common/MyselfMobile.js index 7147f96..d5ccdf6 100644 --- a/src/mobile/common/MyselfMobile.js +++ b/src/mobile/common/MyselfMobile.js @@ -10,6 +10,7 @@ import setting from '../../assets/mobile/setting.png'; import mailList from '../../assets/mobile/mailList.png'; import recommendation from '../../assets/mobile/recommendation.png'; import CommobileListEvent from './CommobileListEvent'; +import * as commonFunc from '../../components/Common/commonFunc'; // eslint-disable-next-line prefer-destructuring const Item = List.Item; @@ -56,6 +57,14 @@ class myselfMobile extends React.Component { sDepartName = '暂无'; } } + const companyContactList = commonFunc.showLocalMessage(this.props, 'companyContactList', '企业通讯录'); + const ModifyPassword = commonFunc.showLocalMessage(this.props, 'ModifyPassword', '修改密码'); + const recommend = commonFunc.showLocalMessage(this.props, 'recommend', '推荐给好友'); + const aboutSoftware = commonFunc.showLocalMessage(this.props, 'aboutSoftware', '关于软件'); + const Logout = commonFunc.showLocalMessage(this.props, 'Logout', '退出登录'); + + + const sUserNameFirst = sUserName.charAt(0); return ( @@ -77,7 +86,7 @@ class myselfMobile extends React.Component { onClick={this.btnOnclick.bind(this, 'contacts')} style={{ margin: '10px 0' }} > - 企业通讯录 + {companyContactList} - 修改密码 + {ModifyPassword} - 推荐给好友 + {recommend} - 关于软件 + {aboutSoftware}
); diff --git a/src/mobile/common/RevisePasswordMobile.js b/src/mobile/common/RevisePasswordMobile.js index baab766..423b7ae 100644 --- a/src/mobile/common/RevisePasswordMobile.js +++ b/src/mobile/common/RevisePasswordMobile.js @@ -7,6 +7,7 @@ import 'antd-mobile-v2/dist/antd-mobile.css'; // import * as commonUtils from '../../utils/utils'; import CommobileBase from '../../mobile/common/CommobileBase'; import CommobileListEvent from './CommobileListEvent'; +import * as commonFunc from '../../components/Common/commonFunc'; import styles from '../mobile.less'; import config from '../../utils/config'; @@ -20,6 +21,7 @@ class RevisePasswordMobile extends React.Component { sOldPwd: '', sUserPwd: '', sUserPwdAgain: '', + app: props.app, }; this.obj = {}; } @@ -66,46 +68,56 @@ class RevisePasswordMobile extends React.Component { dispatch({ type: 'app/editPwd', payload: { url, value: values, editPwdType: 'mobile' } }); } render() { + const {app}= this.state; + const ModifyPassword = commonFunc.showMessage(app.commonConst, 'ModifyPassword');/* 修改密码 */ + const oldPassword = commonFunc.showMessage(app.commonConst, 'oldPassword');/* 原密码 */ + + const newPassword = commonFunc.showMessage(app.commonConst, 'newPassword');/* 新密码 */ + const confirmNewPassword = commonFunc.showMessage(app.commonConst, 'confirmNewPassword');/* 确认新密码 */ + const btnBack = commonFunc.showMessage(app.commonConst, 'btnBack');/* 返回 */ + + const btnSave = commonFunc.showMessage(app.commonConst, 'BtnSave');/* 确认 */ return (
返回
, - ] - } + leftContent={[
{btnBack}
]} rightContent={[ -
保存
, +
+ {btnSave} +
, ]} - onLeftClick={() => { window.history.back(-1); }} + onLeftClick={() => { + window.history.back(-1); + }} className={styles.iconColor} > - 修改密码 + {ModifyPassword} -
+
this.inputRef = el} />
this.inputRef = el} /> this.inputRef = el} /> diff --git a/src/mobile/common/SceneMobile.js b/src/mobile/common/SceneMobile.js index 151c3ea..8ff355b 100644 --- a/src/mobile/common/SceneMobile.js +++ b/src/mobile/common/SceneMobile.js @@ -10,6 +10,7 @@ import * as commonUtils from '../../utils/utils'; import ShowType from './CommobileComponent'; import CommobileBase from './CommobileBase'; import CommobileBillEvent from './CommobileBillEvent'; +import * as commonFunc from "@/components/Common/commonFunc"; class SceneMobile extends React.Component { constructor(props) { @@ -224,12 +225,15 @@ class SceneMobile extends React.Component { onFilterDropDownData: this.props.onFilterDropDownData, onSaveState: this.props.onSaveState, }; + const btnBackEbc = commonFunc.showMessage(app.commonConst, 'btnBackEbc');/* 返回 */ + + const iconSettingShow = true; return iframeVisible ? (