From 2ebaeac1e9f28edbc2e8bea6092a3ffdd710815d Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 12 Sep 2025 13:13:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/style/layout.styl | 28 +++++++++-- locale/en.json | 92 ++++++++++++++++++++++++++++++++++ locale/index.js | 22 +++++++++ locale/uni-app.en.json | 36 ++++++++++++++ locale/uni-app.zh-Hans.json | 36 ++++++++++++++ locale/zh-Hans.json | 92 ++++++++++++++++++++++++++++++++++ main.js | 2 + pages/home/home.vue | 20 ++++---- pages/login/login.vue | 30 ++++------- pages/login/setup.vue | 96 +++++++++++++++++------------------- pages/manage/common/cxwl.vue | 22 ++++----- pages/manage/ddzy.vue | 32 +++++------- pages/manage/dwgx.vue | 42 +++++++--------- pages/manage/rgjl.vue | 64 +++++++++++------------- pages/manage/sgyk.vue | 52 +++++++++---------- pages/manage/wlzp.vue | 72 ++++++++++----------------- pages/manage/zprk.vue | 86 ++++++++++++-------------------- pages/manage/zygl.vue | 40 +++++++-------- 18 files changed, 533 insertions(+), 331 deletions(-) create mode 100644 locale/en.json create mode 100644 locale/index.js create mode 100644 locale/uni-app.en.json create mode 100644 locale/uni-app.zh-Hans.json create mode 100644 locale/zh-Hans.json diff --git a/common/style/layout.styl b/common/style/layout.styl index d3aaa20..a4014a3 100644 --- a/common/style/layout.styl +++ b/common/style/layout.styl @@ -71,17 +71,18 @@ uni-button:after { height: 80rpx !important; font-size: 28rpx !important; color: #606266; - padding: 0 !important; - border: 0 !important; + padding: 0 10rpx !important; + border: 1rpx solid #e5e5e5 !important; } .filter_input { width: 100%; height: 80rpx; line-height: 80rpx; - border: 0; + border: 1rpx solid #e5e5e5; background-color: transparent; font-size: 28rpx; color: #606266; + padding: 0 10rpx; } .filter_input_disabled { background-color: #eee; @@ -96,6 +97,11 @@ uni-button:after { justify-content: flex-start; align-items: center; } +.is-required .filter_label:after { + content: "*"; + color: #D7592F; + margin-left: 4px; +} .tab-line { _wh(32rpx, 10rpx) background-color #fff @@ -232,8 +238,12 @@ uni-button:after { box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7); } .button-default { + display: flex; + align-items: center; + justify-content: center; font-size: 34rpx; - line-height: 88rpx; + line-height: 34rpx; + height: 88rpx; color: #ff6a00; text-align: center; letter-spacing: 4rpx; @@ -243,8 +253,12 @@ uni-button:after { border-radius: 10rpx; } .button-primary { + display: flex; + align-items: center; + justify-content: center; font-size: 34rpx; - line-height: 88rpx; + line-height: 34rpx; + height: 88rpx; color: #fff; text-align: center; letter-spacing: 4rpx; @@ -253,6 +267,10 @@ uni-button:after { border: 2rpx solid #ff6a00; border-radius: 10rpx; } +.en_class .button-primary { + font-size: 28rpx; + line-height: 28rpx; +} .button-info, .submit-button[disabled] { background-color: #c9c9c9; border: 2rpx solid #c9c9c9; diff --git a/locale/en.json b/locale/en.json new file mode 100644 index 0000000..81ad05f --- /dev/null +++ b/locale/en.json @@ -0,0 +1,92 @@ +{ + "login": { + "enterusername": "Please enter the username", + "enterpassword": "Please enter the password", + "remember": "Remember username", + "settings": "Settings", + "upgrade": "Upgrade version", + "login": "Log in", + "text1": "Welcome to", + "text2": "Ningbo Fujia Handheld System!" + }, + "setting": { + "language": "Language", + "server": "Server address", + "refresh": "Refresh time", + "language-change-confirm": "Applying this setting will restart the App." + }, + "upgrade": { + "new-version": "New version found", + "text1": "There is a new version of Ningbo Fujia again. Upgrade to the latest version and enjoy more abundant, stable and fast functions and experiences!", + "text2": "The installation package is downloading. Please wait.", + "upgrade-now": "Upgrade immediately" + }, + "home": { + "title": "Home page", + "message": "Welcome to the Ningbo Fujia Handheld System!", + "exit": "Exit", + "MaterialPalletizing": "Material Palletizing", + "FixedpointOperation": "Fixed - point Operation", + "PalletizingWarehousing": "Palletizing and Warehousing", + "ManualMaterialRequest": "Manual Material Request", + "ManualWarehouseTransfer": "Manual Warehouse Transfer", + "OperationManagement": "Operation Management", + "PointUpdate": "Point Update", + "QueryMaterials": "Query Materials" + }, + "utils": { + "loading": "Loading...", + "read-more": "Read more", + "no-more": "No more", + "selectPlaceholder": "Please select", + "selectEmptyTips": "No options available" + }, + "button": { + "clear": "Clear", + "search": "Query", + "cancel": "Cancel", + "confirm": "Confirm", + "Operation": "Operation", + "Delete": "Delete", + "AddMaterialBox": "Add Material Box", + "Reissue": "Re - issue", + "Forcecompletion": "Force completion", + "Bind": "Bind", + "Clearcarrier": "Clear carrier" + }, + "label": { + "CarrierCode": "Carrier Code", + "Material": "Material", + "MaterialCode": "Material Code", + "MaterialName": "Material Name", + "MaterialSpecification": "Material Specification", + "MaterialQuantity": "Material Quantity", + "StartPosition": "Starting Point Position", + "EndPosition": "Ending Point Position", + "WarehouseArea": "Warehousing Area", + "OutWarehouseArea": "Outbound Warehouse Area", + "MaterialInquiry": "Material Inquiry", + "DestinationFloor": "Destination Floor", + "RemoveLocation": "Remove from Storage Location", + "RemoveCarrier": "Remove from Carrier", + "MoveLocation": "Move into Storage Location", + "Keyword": "Keyword", + "Pointlocation": "Point location", + "Pointlocationcarrier": "Point - location carrier" + }, + "th": { + "MaterialBoxNumber": "Material Box Number", + "Quantity": "Quantity", + "WarehouseLocation": "Warehouse Location", + "Unit": "Unit", + "Serialnumber": "No.", + "Startpoint": "Starting point", + "Endpoint": "End point", + "Status": "Status", + "Jobnumber": "Job number" + }, + "toast": { + "boxnotduplicated": "The material box number cannot be repeated.", + "quantitynonnegative": "The quantity must be a non - negative number" + } +} \ No newline at end of file diff --git a/locale/index.js b/locale/index.js new file mode 100644 index 0000000..304e30c --- /dev/null +++ b/locale/index.js @@ -0,0 +1,22 @@ + +import en from './en.json' +import zhHans from './zh-Hans.json' +const messages = { + 'en': en, + 'zh-Hans': zhHans +} + +let i18nConfig = { + silentTranslationWarn: true, + locale: uni.getLocale(), + messages +} + +import Vue from 'vue' +import VueI18n from 'vue-i18n' +Vue.use(VueI18n) + +const i18n = new VueI18n(i18nConfig) + +export default i18n + diff --git a/locale/uni-app.en.json b/locale/uni-app.en.json new file mode 100644 index 0000000..acb9998 --- /dev/null +++ b/locale/uni-app.en.json @@ -0,0 +1,36 @@ +{ + "common": { + "uni.app.quit": "Press again to exit the application", + "uni.async.error": "Connection to server timeout, click on screen to retry", + "uni.showActionSheet.cancel": "Cancel", + "uni.showToast.unpaired": "Please note that showToast and hideToast must be paired for use", + "uni.showLoading.unpaired": "Please note that showLoading and hideLoading must be paired for use", + "uni.showModal.cancel": "Cancel", + "uni.showModal.confirm": "Ok", + "uni.chooseImage.cancel": "Cancel", + "uni.chooseImage.sourceType.album": "Select from album", + "uni.chooseImage.sourceType.camera": "Capture", + "uni.chooseVideo.cancel": "Cancel", + "uni.chooseVideo.sourceType.album": "Select from album", + "uni.chooseVideo.sourceType.camera": "Capture", + "uni.previewImage.cancel": "Cancel", + "uni.previewImage.button.save": "Save image", + "uni.previewImage.save.success": "Successfully saved image to album", + "uni.previewImage.save.fail": "Saving image to album failed", + "uni.setClipboardData.success": "Content copied", + "uni.scanCode.title": "Scan Code", + "uni.scanCode.album": "Album", + "uni.scanCode.fail": "Recognition failed", + "uni.scanCode.flash.on": "Tap to illuminate", + "uni.scanCode.flash.off": "Tap to close", + "uni.startSoterAuthentication.authContent": "Fingerprint recognition in progress...", + "uni.picker.done": "Complete", + "uni.picker.cancel": "Cancel", + "uni.video.danmu": "Barrage", + "uni.video.volume": "Volume", + "uni.button.feedback.title": "Problem feedback", + "uni.button.feedback.send": "Send" + }, + "ios": {}, + "android": {} +} \ No newline at end of file diff --git a/locale/uni-app.zh-Hans.json b/locale/uni-app.zh-Hans.json new file mode 100644 index 0000000..78cfef2 --- /dev/null +++ b/locale/uni-app.zh-Hans.json @@ -0,0 +1,36 @@ +{ + "common": { + "uni.app.quit": "再按一次退出应用", + "uni.async.error": "连接服务器超时,点击屏幕重试", + "uni.showActionSheet.cancel": "取消", + "uni.showToast.unpaired": "请注意 showToast 与 hideToast 必须配对使用", + "uni.showLoading.unpaired": "请注意 showLoading 与 hideLoading 必须配对使用", + "uni.showModal.cancel": "取消", + "uni.showModal.confirm": "确定", + "uni.chooseImage.cancel": "取消", + "uni.chooseImage.sourceType.album": "从相册选择", + "uni.chooseImage.sourceType.camera": "拍摄", + "uni.chooseVideo.cancel": "取消", + "uni.chooseVideo.sourceType.album": "从相册选择", + "uni.chooseVideo.sourceType.camera": "拍摄", + "uni.previewImage.cancel": "取消", + "uni.previewImage.button.save": "保存图像", + "uni.previewImage.save.success": "保存图像到相册成功", + "uni.previewImage.save.fail": "保存图像到相册失败", + "uni.setClipboardData.success": "内容已复制", + "uni.scanCode.title": "扫码", + "uni.scanCode.album": "相册", + "uni.scanCode.fail": "识别失败", + "uni.scanCode.flash.on": "轻触照亮", + "uni.scanCode.flash.off": "轻触关闭", + "uni.startSoterAuthentication.authContent": "指纹识别中...", + "uni.picker.done": "完成", + "uni.picker.cancel": "取消", + "uni.video.danmu": "弹幕", + "uni.video.volume": "音量", + "uni.button.feedback.title": "问题反馈", + "uni.button.feedback.send": "发送" + }, + "ios": {}, + "android": {} +} \ No newline at end of file diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json new file mode 100644 index 0000000..6de8b0e --- /dev/null +++ b/locale/zh-Hans.json @@ -0,0 +1,92 @@ +{ + "login": { + "enterusername": "请输入用户名", + "enterpassword": "请输入密码", + "remember": "记住用户名", + "settings": "设置", + "upgrade": "升级版本", + "login": "登录", + "text1": "欢迎来到", + "text2": "宁波富佳手持系统!" + }, + "setting": { + "language": "语言", + "server": "服务器地址", + "refresh": "刷新时间", + "language-change-confirm": "应用此设置将重启App" + }, + "upgrade": { + "new-version": "发现新版本", + "text1": "宁波富佳又有新版本了,升级到最新版本,享受更丰富、稳定、快速的功能和体验!", + "text2": "安装包下载中,请稍后", + "upgrade-now": "立即升级" + }, + "home": { + "title": "首页", + "message": "欢迎进入宁波富佳手持系统!", + "exit": "退出", + "MaterialPalletizing": "物料组盘", + "FixedpointOperation": "定点作业", + "PalletizingWarehousing": "组盘入库", + "ManualMaterialRequest": "人工叫料", + "ManualWarehouseTransfer": "手工移库", + "OperationManagement": "作业管理", + "PointUpdate": "点位更新", + "QueryMaterials": "查询物料" + }, + "utils": { + "loading": "加载中...", + "read-more": "查看更多", + "no-more": "没有更多", + "selectPlaceholder": "请选择", + "selectEmptyTips": "无选项" + }, + "button": { + "clear": "清空", + "search": "查询", + "cancel": "取消", + "confirm": "确定", + "Operation": "操作", + "Delete": "删除", + "AddMaterialBox": "添加料框", + "Reissue": "重新下发", + "Forcecompletion": "强制完成", + "Bind": "绑定", + "Clearcarrier": "清载具" + }, + "label": { + "CarrierCode": "载具编码", + "Material": "物料", + "MaterialCode": "物料编码", + "MaterialName": "物料名称", + "MaterialSpecification": "物料规格", + "MaterialQuantity": "物料数量", + "StartPosition": "起点点位", + "EndPosition": "终点点位", + "WarehouseArea": "入库库区", + "OutWarehouseArea": "出库库区", + "MaterialInquiry": "物料查询", + "DestinationFloor": "目的楼层", + "RemoveLocation": "移出货位", + "RemoveCarrier": "移出载具", + "MoveLocation": "移入货位", + "Keyword": "关键字", + "Pointlocation": "点位", + "Pointlocationcarrier": "点位载具" + }, + "th": { + "MaterialBoxNumber": "料框号", + "Quantity": "数量", + "WarehouseLocation": "库位", + "Unit": "单位", + "Serialnumber": "序号", + "Startpoint": "起点", + "Endpoint": "终点", + "Status": "状态", + "Jobnumber": "作业号" + }, + "toast": { + "boxnotduplicated": "料框号不能重复", + "quantitynonnegative": "数量必须为非负数" + } +} \ No newline at end of file diff --git a/main.js b/main.js index 1abc647..ad9c57c 100644 --- a/main.js +++ b/main.js @@ -1,5 +1,6 @@ import App from './App' import Vue from 'vue' +import i18n from './locale/index.js' Vue.config.productionTip = false App.mpType = 'app' @@ -28,6 +29,7 @@ Vue.directive('enterNumber', { import store from '@/vuex/store.js' const app = new Vue({ + i18n, ...App, store }) diff --git a/pages/home/home.vue b/pages/home/home.vue index 708280f..70e6b7a 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -1,15 +1,15 @@ diff --git a/pages/manage/dwgx.vue b/pages/manage/dwgx.vue index e2b1f2a..bc4fe3f 100644 --- a/pages/manage/dwgx.vue +++ b/pages/manage/dwgx.vue @@ -4,22 +4,18 @@ - - - 点位 - - - - + + {{$t('label.Pointlocation')}} + - - - 点位载具 + + {{$t('label.Pointlocationcarrier')}} + + + + + - - - - @@ -27,12 +23,12 @@ - - - - - - + + + + + + @@ -50,9 +46,9 @@ - - - + + + diff --git a/pages/manage/rgjl.vue b/pages/manage/rgjl.vue index c6a226a..71c62a6 100644 --- a/pages/manage/rgjl.vue +++ b/pages/manage/rgjl.vue @@ -4,37 +4,29 @@ - - - 出库库区 - - - + + {{$t('label.OutWarehouseArea')}} + + - - - 物料查询 - - - - - - - - - 终点站点 - - - + + {{$t('label.MaterialInquiry')}} + + + + + - - - 目的楼层 - - - + + {{$t('label.EndPosition')}} + + + + {{$t('label.DestinationFloor')}} + + @@ -43,13 +35,13 @@
序号物料编码物料名称载具号数量单位{{$t('th.Serialnumber')}}{{$t('label.MaterialCode')}}{{$t('label.MaterialName')}}{{$t('label.CarrierCode')}}{{$t('th.Quantity')}}{{$t('th.Unit')}}
- - - - - - - + + + + + + + @@ -68,8 +60,8 @@ - - + + diff --git a/pages/manage/sgyk.vue b/pages/manage/sgyk.vue index bce4873..eb0845d 100644 --- a/pages/manage/sgyk.vue +++ b/pages/manage/sgyk.vue @@ -4,30 +4,22 @@ - - - 移出货位 - - - + + {{$t('label.RemoveLocation')}} + + + + {{$t('label.RemoveCarrier')}} + + + + + - - - 移出载具 - - - - - - - - - 移入货位 - - - - + + {{$t('label.MoveLocation')}} + @@ -35,12 +27,12 @@
库位载具编码物料名称物料规格物料编码数量单位{{$t('th.WarehouseLocation')}}{{$t('label.CarrierCode')}}{{$t('label.MaterialName')}}{{$t('label.MaterialSpecification')}}{{$t('label.MaterialCode')}}{{$t('th.Quantity')}}{{$t('th.Unit')}}
- - - - - - + + + + + + @@ -58,8 +50,8 @@ - - + + diff --git a/pages/manage/wlzp.vue b/pages/manage/wlzp.vue index cc90904..4d60595 100644 --- a/pages/manage/wlzp.vue +++ b/pages/manage/wlzp.vue @@ -4,63 +4,43 @@ - - - 载具编码 - - - - + + {{$t('label.CarrierCode')}} + - - - 物料编码 - - - - + + {{$t('label.MaterialCode')}} + - - - 物料名称 - - - - + + {{$t('label.MaterialName')}} + - - - 物料规格 - - - - + + {{$t('label.MaterialSpecification')}} + - - - 物料数量 - - - - + + {{$t('label.MaterialQuantity')}} + - +
序号物料编码物料名称载具号数量单位{{$t('th.Serialnumber')}}{{$t('label.MaterialCode')}}{{$t('label.MaterialName')}}{{$t('label.CarrierCode')}}{{$t('label.Quantity')}}{{$t('label.Unit')}}
- - - + + + - + - +
料框号数量操作{{$t('th.MaterialBoxNumber')}}{{$t('Quantity')}}{{$t('button.Operation')}}
@@ -68,8 +48,8 @@
- - + +
@@ -114,7 +94,7 @@ methods: { toJump () { uni.navigateTo({ - url: '/pages/manage/common/cxwl?title=查询物料' + url: '/pages/manage/common/cxwl?title=' + this.$t('home.QueryMaterials') }) }, addmater () { @@ -139,7 +119,7 @@ const isDuplicate = this.dataList.some((item, i) => i !== index && item.mater_frame === mater_frame) if (isDuplicate) { uni.showToast({ - title: '料框号重复', + title: this.$t('toast.boxnotduplicated'), icon: 'none' }) // 清空当前料框号 @@ -150,7 +130,7 @@ const { qty } = this.dataList[index] if (qty < 0) { uni.showToast({ - title: '数量必须为非负数', + title: this.$t('toast.quantitynonnegative'), icon: 'none' }) // 重置数量为0 diff --git a/pages/manage/zprk.vue b/pages/manage/zprk.vue index 523d907..35f0a0a 100644 --- a/pages/manage/zprk.vue +++ b/pages/manage/zprk.vue @@ -4,68 +4,46 @@ - - - 起点站点 - - - - + + {{$t('label.StartPosition')}} + - - - 载具编码 - - + + {{$t('label.CarrierCode')}} + + + - + - - - 入库库区 - - - + + {{$t('label.WarehouseArea')}} + + - - - 物料名称 - - - - + + {{$t('label.MaterialName')}} + - - - 物料规格 - - - - + + {{$t('label.MaterialSpecification')}} + - - - 物料编号 - - - - + + {{$t('label.MaterialCode')}} + - - - 物料数量 - - - - + + {{$t('label.MaterialQuantity')}} + @@ -73,8 +51,8 @@ - - + + @@ -88,8 +66,8 @@ - - + + diff --git a/pages/manage/zygl.vue b/pages/manage/zygl.vue index 02b27bf..365e688 100644 --- a/pages/manage/zygl.vue +++ b/pages/manage/zygl.vue @@ -1,16 +1,12 @@ @@ -63,15 +55,17 @@ data() { return { title: '', - val1: '', + val1: '', dataList: [], pkId: '', pkObj: {}, - disabled: false + disabled: false, + applicationLocale: '' }; }, onLoad (options) { this.title = options.title + this.applicationLocale = uni.getLocale() }, methods: { toEmpty () {
料框号数量{{$t('th.MaterialBoxNumber')}}{{$t('th.Quantity')}}