Commit e5fd2b6f9ad242e020f14538958437865ad389ea
1 parent
d170b997
1.处理MES所有提示类的英文翻译
Showing
11 changed files
with
131 additions
and
92 deletions
package.json
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | "version": "1.0.5", |
| 4 | 4 | "private": true, |
| 5 | 5 | "scripts": { |
| 6 | - "start": "set port=8543&roadhog server --progress --watch --colors --profile", | |
| 6 | + "start": "set port=9543&roadhog server --progress --watch --colors --profile", | |
| 7 | 7 | "build": "roadhog build", |
| 8 | 8 | "lint": "eslint --ext .js src test", |
| 9 | 9 | "precommit": "npm run lint" |
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | "babel-runtime": "6.26.0", |
| 28 | 28 | "classnames": "^2.2.6", |
| 29 | 29 | "copy-to-clipboard": "^3.3.1", |
| 30 | - "core-js": "2.5.7", | |
| 30 | + "core-js": "^3.44.0", | |
| 31 | 31 | "dhtmlx-gantt": "^7.1.6", |
| 32 | 32 | "dva": "^2.4.1", |
| 33 | 33 | "dva-router-config": "^1.1.0", | ... | ... |
src/components/Common/CommonHooks/useCommonBase.js
| ... | ... | @@ -1952,7 +1952,7 @@ const useCommonBase = props => { |
| 1952 | 1952 | const currentState = nextProps || state; |
| 1953 | 1953 | const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); |
| 1954 | 1954 | const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); |
| 1955 | - const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '确认'); | |
| 1955 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 1956 | 1956 | // 加入mes通用参数 |
| 1957 | 1957 | const { app } = props; |
| 1958 | 1958 | const { tableNameCompareJson = {} } = currentState; |
| ... | ... | @@ -2144,9 +2144,9 @@ const useCommonBase = props => { |
| 2144 | 2144 | }); |
| 2145 | 2145 | } else if (code === -8) { |
| 2146 | 2146 | Modal.info({ |
| 2147 | - title: "温馨提示:", | |
| 2147 | + title: FriendlyReminder, | |
| 2148 | 2148 | content: <div>{handleGetMsg(msg)}</div>, |
| 2149 | - okText: "确认", | |
| 2149 | + okText: BtnSure, | |
| 2150 | 2150 | onOk() { |
| 2151 | 2151 | onConfirm && onConfirm(); |
| 2152 | 2152 | }, | ... | ... |
src/components/Common/CommonInstructSet.js
| ... | ... | @@ -251,7 +251,7 @@ const instructSetInit = async props => { |
| 251 | 251 | ...resultData |
| 252 | 252 | }; |
| 253 | 253 | } |
| 254 | - | |
| 254 | + | |
| 255 | 255 | } catch (error) { |
| 256 | 256 | props.btnConfig.error? props.btnConfig.error(error) : ''; |
| 257 | 257 | throw new Error(error); |
| ... | ... | @@ -1099,6 +1099,10 @@ const handleMsg = async (props, instruct) => { |
| 1099 | 1099 | ...utils.getDatasetDataList(props, instruct).dataOneObj |
| 1100 | 1100 | }); |
| 1101 | 1101 | } |
| 1102 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 1103 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 1104 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 1105 | + const errorPrompt = commonFunc.showLocalMessage(props, 'errorPrompt', '错误提示'); | |
| 1102 | 1106 | |
| 1103 | 1107 | message.destroy(); |
| 1104 | 1108 | if (code === 1) { |
| ... | ... | @@ -1110,18 +1114,18 @@ const handleMsg = async (props, instruct) => { |
| 1110 | 1114 | throw new Error(msg); |
| 1111 | 1115 | } else if (code === 2) { |
| 1112 | 1116 | Modal.info({ |
| 1113 | - title: "温馨提示:", | |
| 1117 | + title: FriendlyReminder, | |
| 1114 | 1118 | content: <div>{msg}</div>, |
| 1115 | - okText: "确认", | |
| 1119 | + okText: BtnSure, | |
| 1116 | 1120 | onOk() {} |
| 1117 | 1121 | }); |
| 1118 | 1122 | } else if (code === -7) { |
| 1119 | 1123 | const result = await new Promise(resolve => { |
| 1120 | 1124 | Modal.confirm({ |
| 1121 | - title: "温馨提示:", | |
| 1125 | + title: FriendlyReminder, | |
| 1122 | 1126 | content: <div>{msg}</div>, |
| 1123 | - okText: "确认", | |
| 1124 | - cancelText: "取消", | |
| 1127 | + okText: BtnSure, | |
| 1128 | + cancelText: BtnCancel, | |
| 1125 | 1129 | onOk() { |
| 1126 | 1130 | resolve(true); |
| 1127 | 1131 | }, |
| ... | ... | @@ -1135,9 +1139,9 @@ const handleMsg = async (props, instruct) => { |
| 1135 | 1139 | } |
| 1136 | 1140 | } else if (code === -8) { |
| 1137 | 1141 | Modal.error({ |
| 1138 | - title: "错误提示:", | |
| 1142 | + title: errorPrompt, | |
| 1139 | 1143 | content: <div>{msg}</div>, |
| 1140 | - okText: "确认", | |
| 1144 | + okText: BtnSure, | |
| 1141 | 1145 | onOk() {} |
| 1142 | 1146 | }); |
| 1143 | 1147 | throw new Error(msg); |
| ... | ... | @@ -1280,6 +1284,19 @@ const handleFaceAuth = async (props, instruct) => { |
| 1280 | 1284 | const mesSysbrands = commonUtils.convertStrToObj( |
| 1281 | 1285 | localStorage.getItem("mesSysbrands") |
| 1282 | 1286 | ); |
| 1287 | + const selectMethod = commonFunc.showLocalMessage(props, 'selectMethod', '请选择验证方式'); | |
| 1288 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 1289 | + const accountPwd = commonFunc.showLocalMessage(props, 'account', '账号密码'); | |
| 1290 | + const faceRecognition = commonFunc.showLocalMessage(props, 'faceRecognition', '人脸识别'); | |
| 1291 | + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 1292 | + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); | |
| 1293 | + const enterAccountPwd = commonFunc.showLocalMessage(props, 'enterAccountPwd', '请输入账号密码'); | |
| 1294 | + const nameNotEmpty = commonFunc.showLocalMessage(props, 'NameNotEmpty', '账号/姓名不能为空!'); | |
| 1295 | + const passwordNotEmpty = commonFunc.showLocalMessage(props, 'PasswordNotEmpty', '密码不能为空!'); | |
| 1296 | + const account = commonFunc.showLocalMessage(props, 'account', '账号'); | |
| 1297 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 1298 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 1299 | + | |
| 1283 | 1300 | const { tempMasterData = {} } = props; |
| 1284 | 1301 | |
| 1285 | 1302 | // 遍历登录文本组件 |
| ... | ... | @@ -1325,13 +1342,13 @@ const handleFaceAuth = async (props, instruct) => { |
| 1325 | 1342 | |
| 1326 | 1343 | const loginType = await new Promise(resolve => { |
| 1327 | 1344 | Modal.confirm({ |
| 1328 | - title: "温馨提示:", | |
| 1329 | - content: "请选择验证方式", | |
| 1345 | + title: FriendlyReminder, | |
| 1346 | + content: selectMethod, | |
| 1330 | 1347 | closable: true, |
| 1331 | 1348 | maskClosable: true, |
| 1332 | 1349 | wrapClassName: "mesCommonModal", |
| 1333 | - cancelText: "账号密码", | |
| 1334 | - okText: "人脸识别", | |
| 1350 | + cancelText: accountPwd, | |
| 1351 | + okText: faceRecognition, | |
| 1335 | 1352 | onOk() { |
| 1336 | 1353 | resolve(1); |
| 1337 | 1354 | }, |
| ... | ... | @@ -1350,7 +1367,7 @@ const handleFaceAuth = async (props, instruct) => { |
| 1350 | 1367 | // 人脸识别 |
| 1351 | 1368 | result = await new Promise(resolve => { |
| 1352 | 1369 | const modal = Modal.info({ |
| 1353 | - title: "人脸识别", | |
| 1370 | + title: faceRecognition, | |
| 1354 | 1371 | keyboard: false, |
| 1355 | 1372 | content: ( |
| 1356 | 1373 | <FaceDetect |
| ... | ... | @@ -1373,7 +1390,7 @@ const handleFaceAuth = async (props, instruct) => { |
| 1373 | 1390 | /> |
| 1374 | 1391 | ), |
| 1375 | 1392 | wrapClassName: "xlyFaceAuthModal", |
| 1376 | - okText: "取消", | |
| 1393 | + okText: btnCancel, | |
| 1377 | 1394 | onOk() { |
| 1378 | 1395 | resolve({ |
| 1379 | 1396 | stop: true |
| ... | ... | @@ -1408,24 +1425,24 @@ const handleFaceAuth = async (props, instruct) => { |
| 1408 | 1425 | result = await new Promise(resolve => { |
| 1409 | 1426 | loginInfo = {}; |
| 1410 | 1427 | Modal.confirm({ |
| 1411 | - title: "请输入账号密码:", | |
| 1428 | + title: enterAccountPwd, | |
| 1412 | 1429 | content: ( |
| 1413 | 1430 | <Form layout="vertical" size="large"> |
| 1414 | 1431 | {loginConfig.map(item => handleGetFormItem(props, item))} |
| 1415 | 1432 | </Form> |
| 1416 | 1433 | ), |
| 1417 | 1434 | wrapClassName: "mesCommonModal mesLoginForm", |
| 1418 | - cancelText: "取消", | |
| 1419 | - okText: "确定", | |
| 1435 | + cancelText: BtnCancel, | |
| 1436 | + okText: BtnSure, | |
| 1420 | 1437 | onOk(e) { |
| 1421 | 1438 | if (e.name) { |
| 1422 | 1439 | if (!loginInfo.sUserNo && !loginInfo.sUserName) { |
| 1423 | - message.error("账号/姓名不能为空!"); | |
| 1440 | + message.error(nameNotEmpty); | |
| 1424 | 1441 | return; |
| 1425 | 1442 | } |
| 1426 | 1443 | |
| 1427 | 1444 | if (!loginInfo.sPassWord) { |
| 1428 | - message.error("密码不能为空!"); | |
| 1445 | + message.error(passwordNotEmpty); | |
| 1429 | 1446 | return; |
| 1430 | 1447 | } |
| 1431 | 1448 | |
| ... | ... | @@ -2122,6 +2139,11 @@ const handleCalcprocedure = async (props, instruct) => { |
| 2122 | 2139 | const { dataset = "*", sButtonParam, sProName } = instruct; |
| 2123 | 2140 | const datasetList = dataset.split(","); |
| 2124 | 2141 | |
| 2142 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 2143 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 2144 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 2145 | + const errorPrompt = commonFunc.showLocalMessage(props, 'errorPrompt', '错误提示'); | |
| 2146 | + | |
| 2125 | 2147 | // 获取页面所有tableName |
| 2126 | 2148 | const tableNameList = Object.keys(props) |
| 2127 | 2149 | .filter(key => { |
| ... | ... | @@ -2177,18 +2199,18 @@ const handleCalcprocedure = async (props, instruct) => { |
| 2177 | 2199 | throw new Error(msg); |
| 2178 | 2200 | } else if (code === 2) { |
| 2179 | 2201 | Modal.info({ |
| 2180 | - title: "温馨提示:", | |
| 2202 | + title: FriendlyReminder, | |
| 2181 | 2203 | content: <div>{msg}</div>, |
| 2182 | - okText: "确认", | |
| 2204 | + okText: BtnSure, | |
| 2183 | 2205 | onOk() {} |
| 2184 | 2206 | }); |
| 2185 | 2207 | } else if (code === -7) { |
| 2186 | 2208 | const result = await new Promise(resolve => { |
| 2187 | 2209 | Modal.confirm({ |
| 2188 | - title: "温馨提示:", | |
| 2210 | + title: FriendlyReminder, | |
| 2189 | 2211 | content: <div>{msg}</div>, |
| 2190 | - okText: "确认", | |
| 2191 | - cancelText: "取消", | |
| 2212 | + okText: BtnSure, | |
| 2213 | + cancelText: BtnCancel, | |
| 2192 | 2214 | onOk() { |
| 2193 | 2215 | resolve(true); |
| 2194 | 2216 | }, |
| ... | ... | @@ -2202,9 +2224,9 @@ const handleCalcprocedure = async (props, instruct) => { |
| 2202 | 2224 | } |
| 2203 | 2225 | } else if (code === -8) { |
| 2204 | 2226 | Modal.error({ |
| 2205 | - title: "错误提示:", | |
| 2227 | + title: errorPrompt, | |
| 2206 | 2228 | content: <div>{msg}</div>, |
| 2207 | - okText: "确认", | |
| 2229 | + okText: BtnCancel, | |
| 2208 | 2230 | onOk() {} |
| 2209 | 2231 | }); |
| 2210 | 2232 | throw new Error(msg); |
| ... | ... | @@ -2502,7 +2524,7 @@ const utils = { |
| 2502 | 2524 | return tableData[0]; |
| 2503 | 2525 | } else if (filterType === "last") { |
| 2504 | 2526 | return tableData[tableData.length - 1]; |
| 2505 | - } | |
| 2527 | + } | |
| 2506 | 2528 | |
| 2507 | 2529 | return tableData; |
| 2508 | 2530 | }, | ... | ... |
src/components/Common/commonBusiness.js
| ... | ... | @@ -188,7 +188,7 @@ export async function saveData(param) { |
| 188 | 188 | return dataReturn; |
| 189 | 189 | } else if (dataReturn.code === 2) { |
| 190 | 190 | Modal.info({ |
| 191 | - title: '温馨提示', | |
| 191 | + // title: '温馨提示', | |
| 192 | 192 | content: ( |
| 193 | 193 | // eslint-disable-next-line react/react-in-jsx-scope |
| 194 | 194 | <div> | ... | ... |
src/mes/common/buttonComponent/index.js
| ... | ... | @@ -228,14 +228,14 @@ const ButtonComponent = props => { |
| 228 | 228 | |
| 229 | 229 | const menuOrderList3 = [ |
| 230 | 230 | ["设备保养", 21], |
| 231 | - ["设备点检", 22], | |
| 231 | + // ["设备点检", 22], | |
| 232 | 232 | ["设备维修", 23], |
| 233 | 233 | ["设备资料", 24] |
| 234 | 234 | ]; |
| 235 | 235 | |
| 236 | 236 | const menuOrderListEnglish3 = [ |
| 237 | 237 | ["Equipment Maintenance", 21], |
| 238 | - ["Equipment Check", 22], | |
| 238 | + // ["Equipment Check", 22], | |
| 239 | 239 | ["Equipment Repair", 23], |
| 240 | 240 | ["Equipment Documentation", 24] |
| 241 | 241 | ]; | ... | ... |
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -1289,8 +1289,9 @@ const CommonModelComponent = props => { |
| 1289 | 1289 | height = "100%" |
| 1290 | 1290 | } = item; |
| 1291 | 1291 | console.log('ssconfigLists', configList, sEntireTabName ); |
| 1292 | - const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName + '1111' : | |
| 1292 | + const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName : | |
| 1293 | 1293 | sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; |
| 1294 | + console.log('sEntireTabNameNew', sEntireTabNameNew); | |
| 1294 | 1295 | const advancedStyle = |
| 1295 | 1296 | mode === "advanced" |
| 1296 | 1297 | ? { | ... | ... |
src/mes/common/commonOperationBarComponent/index.js
| ... | ... | @@ -74,17 +74,20 @@ const useCommonOperationBarComponentEvent = props => { |
| 74 | 74 | |
| 75 | 75 | return returnData; |
| 76 | 76 | }; |
| 77 | - | |
| 77 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 78 | + const confirmOperation = commonFunc.showLocalMessage(props, 'confirmOperation', '是否确认此操作'); | |
| 79 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 80 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 78 | 81 | // 按钮点击事件 |
| 79 | 82 | const clickRef = useRef(null); |
| 80 | 83 | const handleBtnClick = async (config, searchField) => { |
| 81 | 84 | if (config?.sMinValue === "99") { // 二次确认 |
| 82 | 85 | const result = await new Promise(resolve => { |
| 83 | 86 | Modal.confirm({ |
| 84 | - title: "温馨提示:", | |
| 85 | - content: "是否确认此操作?", | |
| 86 | - okText: "确认", | |
| 87 | - cancelText: "取消", | |
| 87 | + title: FriendlyReminder, | |
| 88 | + content: confirmOperation, | |
| 89 | + okText: BtnSure, | |
| 90 | + cancelText: BtnCancel, | |
| 88 | 91 | onOk() { |
| 89 | 92 | setTimeout(() => { |
| 90 | 93 | resolve(true); | ... | ... |
src/mes/costomPageFun/index.js
| ... | ... | @@ -4,6 +4,7 @@ import { message, Form, Modal } from "antd"; |
| 4 | 4 | import * as commonUtils from "@/utils/utils"; |
| 5 | 5 | import * as commonConfig from "@/utils/config"; |
| 6 | 6 | import * as commonServices from "@/services/services"; |
| 7 | +import * as commonFunc from "@/components/Common/commonFunc"; | |
| 7 | 8 | import FaceDetect from "@/components/FaceDetect"; |
| 8 | 9 | import ShowType from "@/components/Common/CommonComponent"; |
| 9 | 10 | const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { |
| ... | ... | @@ -1317,7 +1318,7 @@ const handleZlxjCheck = async (props, btnName) => { |
| 1317 | 1318 | message.warning('人脸信息获取失败,请重新尝试!'); |
| 1318 | 1319 | return; |
| 1319 | 1320 | } |
| 1320 | - | |
| 1321 | + | |
| 1321 | 1322 | const table0DataNew = cloneDeep(table0Data); |
| 1322 | 1323 | const table1DataNew = cloneDeep(table1Data); |
| 1323 | 1324 | table0DataNew[0].sCurRole = sCurRole; |
| ... | ... | @@ -1388,15 +1389,27 @@ const handleGetFormItem = (props, item) => { |
| 1388 | 1389 | |
| 1389 | 1390 | const getFaceResult = async (props) => { |
| 1390 | 1391 | let faceResult = false; |
| 1392 | + | |
| 1393 | + | |
| 1394 | + const selectMethod = commonFunc.showLocalMessage(props, 'selectMethod', '请选择验证方式'); | |
| 1395 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 1396 | + const accountPwd = commonFunc.showLocalMessage(props, 'account', '账号密码'); | |
| 1397 | + const faceRecognition = commonFunc.showLocalMessage(props, 'faceRecognition', '人脸识别'); | |
| 1398 | + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 1399 | + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); | |
| 1400 | + const enterAccountPwd = commonFunc.showLocalMessage(props, 'enterAccountPwd', '请输入账号密码'); | |
| 1401 | + const nameNotEmpty = commonFunc.showLocalMessage(props, 'NameNotEmpty', '账号/姓名不能为空!'); | |
| 1402 | + const passwordNotEmpty = commonFunc.showLocalMessage(props, 'PasswordNotEmpty', '密码不能为空!'); | |
| 1403 | + const account = commonFunc.showLocalMessage(props, 'account', '账号'); | |
| 1391 | 1404 | const loginType = await new Promise(resolve => { |
| 1392 | 1405 | Modal.confirm({ |
| 1393 | - title: "温馨提示:", | |
| 1394 | - content: "请选择验证方式", | |
| 1406 | + title: FriendlyReminder, | |
| 1407 | + content: selectMethod, | |
| 1395 | 1408 | closable: true, |
| 1396 | 1409 | maskClosable: true, |
| 1397 | 1410 | wrapClassName: "mesCommonModal", |
| 1398 | - cancelText: "账号密码", | |
| 1399 | - okText: "人脸识别", | |
| 1411 | + cancelText:accountPwd, | |
| 1412 | + okText: faceRecognition, | |
| 1400 | 1413 | onOk() { |
| 1401 | 1414 | resolve(1); |
| 1402 | 1415 | }, |
| ... | ... | @@ -1415,7 +1428,7 @@ const getFaceResult = async (props) => { |
| 1415 | 1428 | // 人脸识别 |
| 1416 | 1429 | faceResult = await new Promise(resolve => { |
| 1417 | 1430 | const modal = Modal.info({ |
| 1418 | - title: "人脸识别", | |
| 1431 | + title: faceRecognition, | |
| 1419 | 1432 | keyboard: false, |
| 1420 | 1433 | content: ( |
| 1421 | 1434 | <FaceDetect |
| ... | ... | @@ -1429,7 +1442,7 @@ const getFaceResult = async (props) => { |
| 1429 | 1442 | /> |
| 1430 | 1443 | ), |
| 1431 | 1444 | wrapClassName: "xlyFaceAuthModal", |
| 1432 | - okText: "取消", | |
| 1445 | + okText: btnCancel, | |
| 1433 | 1446 | onOk() { |
| 1434 | 1447 | resolve(false); |
| 1435 | 1448 | } |
| ... | ... | @@ -1463,24 +1476,24 @@ const getFaceResult = async (props) => { |
| 1463 | 1476 | faceResult = await new Promise(resolve => { |
| 1464 | 1477 | loginInfo = {}; |
| 1465 | 1478 | Modal.confirm({ |
| 1466 | - title: "请输入账号密码:", | |
| 1479 | + title: enterAccountPwd, | |
| 1467 | 1480 | content: ( |
| 1468 | 1481 | <Form layout="vertical" size="large"> |
| 1469 | 1482 | {loginConfig.map(item => handleGetFormItem(props, item))} |
| 1470 | 1483 | </Form> |
| 1471 | 1484 | ), |
| 1472 | 1485 | wrapClassName: "mesCommonModal mesLoginForm", |
| 1473 | - cancelText: "取消", | |
| 1474 | - okText: "确定", | |
| 1486 | + cancelText: btnCancel, | |
| 1487 | + okText: btnSure, | |
| 1475 | 1488 | onOk(e) { |
| 1476 | 1489 | if (e.name) { |
| 1477 | 1490 | if (!loginInfo.sUserNo && !loginInfo.sUserName) { |
| 1478 | - message.error("账号/姓名不能为空!"); | |
| 1491 | + message.error(nameNotEmpty); | |
| 1479 | 1492 | return; |
| 1480 | 1493 | } |
| 1481 | 1494 | |
| 1482 | 1495 | if (!loginInfo.sPassWord) { |
| 1483 | - message.error("密码不能为空!"); | |
| 1496 | + message.error(passwordNotEmpty); | |
| 1484 | 1497 | return; |
| 1485 | 1498 | } |
| 1486 | 1499 | ... | ... |
src/mes/indexMes/index.js
| ... | ... | @@ -630,7 +630,7 @@ const HeaderConponent = () => { |
| 630 | 630 | destroyOnClose={true} |
| 631 | 631 | maskClosable={false} |
| 632 | 632 | wrapClassName={ styles.ztwwwww }> |
| 633 | - <MachineMessageComponent e={objRef.current} shutDown={handleCancel} /> | |
| 633 | + <MachineMessageComponent e={objRef.current} shutDown={handleCancel} props ={props} /> | |
| 634 | 634 | </Modal> |
| 635 | 635 | |
| 636 | 636 | </div> |
| ... | ... | @@ -639,7 +639,7 @@ const HeaderConponent = () => { |
| 639 | 639 | |
| 640 | 640 | |
| 641 | 641 | // 停机状态栏 |
| 642 | -const MachineMessageComponent = ({ e , shutDown }) => { | |
| 642 | +const MachineMessageComponent = ({ e , shutDown, props }) => { | |
| 643 | 643 | const value = e.item?.props?.value || {}; |
| 644 | 644 | const { current: startTime } = useRef(moment().format("YYYY-MM-DD HH:mm:ss")); |
| 645 | 645 | const { backgroundColor, conent2, fontSize } = value; |
| ... | ... | @@ -675,12 +675,17 @@ const MachineMessageComponent = ({ e , shutDown }) => { |
| 675 | 675 | }; |
| 676 | 676 | }, []); |
| 677 | 677 | |
| 678 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 679 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 680 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 681 | + const confirmState = commonFunc.showLocalMessage(props, 'confirmState', '确认退出该状态?'); | |
| 682 | + | |
| 678 | 683 | const handleMenuClose = () => { |
| 679 | 684 | Modal.confirm({ |
| 680 | - title: "温馨提示:", | |
| 681 | - content: <div>确认退出该状态?</div>, | |
| 682 | - okText: "确认", | |
| 683 | - cancelText: "取消", | |
| 685 | + title: FriendlyReminder, | |
| 686 | + content: <div>{confirmState}</div>, | |
| 687 | + okText: BtnSure, | |
| 688 | + cancelText: BtnCancel, | |
| 684 | 689 | zIndex: 2000, |
| 685 | 690 | onOk() { |
| 686 | 691 | shutDown() | ... | ... |
src/mes/scheduledTasks/machineTasks/index.js
| ... | ... | @@ -699,6 +699,8 @@ |
| 699 | 699 | const btnsearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询'); |
| 700 | 700 | const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部'); |
| 701 | 701 | const sWorkOrderNo = commonFunc.showLocalMessage(props, 'sWorkOrderNo', '工单编号'); |
| 702 | + const deviceInfo = commonFunc.showLocalMessage(props, 'deviceInfo', '设备信息'); | |
| 703 | + const TasksQty = commonFunc.showLocalMessage(props, 'TasksQty', '今日完成任务批次/产量(个)'); | |
| 702 | 704 | return ( |
| 703 | 705 | <div className={styles.tasksBox}> |
| 704 | 706 | <Row className={`tasksBg tasksTable`}> |
| ... | ... | @@ -756,7 +758,7 @@ |
| 756 | 758 | </Col> |
| 757 | 759 | </Row> |
| 758 | 760 | <Row gutter={[15, 0]} className={`tasksBg marginTop taskInfo`}> |
| 759 | - <h2>设备信息</h2> | |
| 761 | + <h2>{deviceInfo}</h2> | |
| 760 | 762 | <Col span={4} className="taskInfoBox"> |
| 761 | 763 | <div className={"leftBox"}> |
| 762 | 764 | <img src={taskInfoIcon} alt={taskInfoData.sMachineNameTitle} /> |
| ... | ... | @@ -809,7 +811,7 @@ |
| 809 | 811 | <div className={"leftBox"}> |
| 810 | 812 | <img src={taskIcon} alt={taskInfoData.tStartingUpTimeTitle} /> |
| 811 | 813 | <div> |
| 812 | - <h3>今日完成任务批次/产量(个):</h3> | |
| 814 | + <h3>{TasksQty}:</h3> | |
| 813 | 815 | <p> |
| 814 | 816 | {taskInfoData.iFinishTaskBatchConent} /{" "} |
| 815 | 817 | {taskInfoData.iFinishProductionNumConent} | ... | ... |
src/pad/verifyScrapBill/index.js
| ... | ... | @@ -287,7 +287,10 @@ const useVerifyScrapBillEvent = props => { |
| 287 | 287 | props.onBackList(); |
| 288 | 288 | } |
| 289 | 289 | }; |
| 290 | - | |
| 290 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 291 | + const confirmDelete = commonFunc.showLocalMessage(props, 'confirmDelete', '确定删除'); | |
| 292 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 293 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 291 | 294 | // 删除 |
| 292 | 295 | const handleBtnDel = () => { |
| 293 | 296 | const handleOkDel = async () => { |
| ... | ... | @@ -299,24 +302,6 @@ const useVerifyScrapBillEvent = props => { |
| 299 | 302 | masterData, |
| 300 | 303 | slaveConfig |
| 301 | 304 | } = props; |
| 302 | - // const { userinfo, systemData } = app; | |
| 303 | - // const { sMakePerson } = masterData; /* 本单据制单人 */ | |
| 304 | - // const { sUserName, sType } = userinfo; /* 登录用户 */ | |
| 305 | - // const iIndex = systemData.findIndex( | |
| 306 | - // item => item.sName === "CkxModifyBillNoMakePerson" | |
| 307 | - // ); | |
| 308 | - // if (iIndex > -1) { | |
| 309 | - // const sValue = systemData[iIndex].sValue; | |
| 310 | - // if (sValue === "0") { | |
| 311 | - // /* 系统未启用非制单人修改单据,普通用户非制单人不可以修改制单人的单据 */ | |
| 312 | - // if (sType !== "sysadmin" && sUserName !== sMakePerson) { | |
| 313 | - // message.error( | |
| 314 | - // commonFunc.showMessage(app.commonConst, "NoDelByNoMakePerson") | |
| 315 | - // ); | |
| 316 | - // return; | |
| 317 | - // } | |
| 318 | - // } | |
| 319 | - // } | |
| 320 | 305 | |
| 321 | 306 | const value = { |
| 322 | 307 | sClientType: "1", |
| ... | ... | @@ -349,10 +334,10 @@ const useVerifyScrapBillEvent = props => { |
| 349 | 334 | }; |
| 350 | 335 | |
| 351 | 336 | Modal.confirm({ |
| 352 | - title: "温馨提示:", | |
| 353 | - content: <div>确认删除?</div>, | |
| 354 | - okText: "确认", | |
| 355 | - cancelText: "取消", | |
| 337 | + title: FriendlyReminder, | |
| 338 | + content: <div>{confirmDelete}</div>, | |
| 339 | + okText: BtnSure, | |
| 340 | + cancelText: BtnCancel, | |
| 356 | 341 | onOk() { |
| 357 | 342 | handleOkDel(); |
| 358 | 343 | } |
| ... | ... | @@ -485,7 +470,9 @@ const VerifyScrapBill = baseProps => { |
| 485 | 470 | sProcessParentId: currentProcessParentId |
| 486 | 471 | } |
| 487 | 472 | }; |
| 488 | - | |
| 473 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 474 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');4 | |
| 475 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 489 | 476 | return ( |
| 490 | 477 | <div className={styles.verifyScrapBill}> |
| 491 | 478 | <div className={styles.toolBar}> |
| ... | ... | @@ -498,10 +485,10 @@ const VerifyScrapBill = baseProps => { |
| 498 | 485 | onClick={() => { |
| 499 | 486 | if (enabled) { |
| 500 | 487 | Modal.confirm({ |
| 501 | - title: "温馨提示:", | |
| 488 | + title: FriendlyReminder, | |
| 502 | 489 | content: "单据未保存,是否保存后返回?", |
| 503 | - okText: "确认", | |
| 504 | - cancelText: "取消", | |
| 490 | + okText: BtnSure, | |
| 491 | + cancelText: BtnCancel, | |
| 505 | 492 | onOk() { |
| 506 | 493 | props.onBtnSave(() => { |
| 507 | 494 | props.onBackList(); |
| ... | ... | @@ -640,8 +627,14 @@ const FormComponent = props => { |
| 640 | 627 | return <CommonViewTable {...viewProps} />; |
| 641 | 628 | }; |
| 642 | 629 | |
| 630 | + | |
| 643 | 631 | // 表格 |
| 644 | 632 | const TableComponent = props => { |
| 633 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 634 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | |
| 635 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 636 | + const confirmDelRow = commonFunc.showLocalMessage(props, 'confirmDelRow', '确认删除行?'); | |
| 637 | + | |
| 645 | 638 | const baseProps = commonBusiness.getTableTypes("slave", { |
| 646 | 639 | ...props, |
| 647 | 640 | noStorageColumn: true |
| ... | ... | @@ -655,10 +648,10 @@ const TableComponent = props => { |
| 655 | 648 | bAddFirst: true, |
| 656 | 649 | onMesTableLineDel: (...args) => { |
| 657 | 650 | Modal.confirm({ |
| 658 | - title: "温馨提示:", | |
| 659 | - content: <div>确认删除行?</div>, | |
| 660 | - okText: "确认", | |
| 661 | - cancelText: "取消", | |
| 651 | + title: FriendlyReminder, | |
| 652 | + content: <div>{confirmDelRow}</div>, | |
| 653 | + okText: BtnSure, | |
| 654 | + cancelText: BtnCancel, | |
| 662 | 655 | onOk() { |
| 663 | 656 | props.onMesTableLineDel(...args); |
| 664 | 657 | } | ... | ... |