国际化

This commit is contained in:
2025-09-12 13:13:29 +08:00
parent caef2ecc53
commit 2ebaeac1e9
18 changed files with 533 additions and 331 deletions

View File

@@ -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;

92
locale/en.json Normal file
View File

@@ -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"
}
}

22
locale/index.js Normal file
View File

@@ -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

36
locale/uni-app.en.json Normal file
View File

@@ -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": {}
}

View File

@@ -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": {}
}

92
locale/zh-Hans.json Normal file
View File

@@ -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": "数量必须为非负数"
}
}

View File

@@ -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
})

View File

@@ -1,15 +1,15 @@
<template>
<view class="home_wraper">
<view class="zd_content">
<view class="header">首页</view>
<view class="header">{{$t('home.title')}}</view>
<view class="userInfo-wrap">
<view class="userInfo">
<text v-if="userName !== ''" class="p1">{{userName}}</text>
<text class="p2">欢迎进入宁波富佳手持系统</text>
<text class="p2">{{$t('home.message')}}</text>
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">退出</view>
<view class="exit-text">{{$t('home.exit')}}</view>
</view>
</view>
<view class="zd_home_wrapper">
@@ -32,13 +32,13 @@
return {
userName: '',
menuList: [
{title: '物料组盘', icon: 'RF01', path: '/pages/manage/wlzp'},
{title: '定点作业', icon: 'RF02', path: '/pages/manage/ddzy'},
{title: '组盘入库', icon: 'RF03', path: '/pages/manage/zprk'},
{title: '人工叫料', icon: 'RF04', path: '/pages/manage/rgjl'},
{title: '手工移库', icon: 'RF05', path: '/pages/manage/sgyk'},
{title: '作业管理', icon: 'RF06', path: '/pages/manage/zygl'},
{title: '点位更新', icon: 'RF07', path: '/pages/manage/dwgx'}
{title: this.$t('home.MaterialPalletizing'), icon: 'RF01', path: '/pages/manage/wlzp'},
{title: this.$t('home.FixedpointOperation'), icon: 'RF02', path: '/pages/manage/ddzy'},
{title: this.$t('home.PalletizingWarehousing'), icon: 'RF03', path: '/pages/manage/zprk'},
{title: this.$t('home.ManualMaterialRequest'), icon: 'RF04', path: '/pages/manage/rgjl'},
{title: this.$t('home.ManualWarehouseTransfer'), icon: 'RF05', path: '/pages/manage/sgyk'},
{title: this.$t('home.OperationManagement'), icon: 'RF06', path: '/pages/manage/zygl'},
{title: this.$t('home.PointUpdate'), icon: 'RF07', path: '/pages/manage/dwgx'}
],
show: false,
secM: []

View File

@@ -1,23 +1,23 @@
<template>
<view class="zd_content bg">
<view class="p1">欢迎来到</view>
<view class="p2">宁波富佳手持系统</view>
<view class="p1">{{$t('login.text1')}}</view>
<view class="p2">{{$t('login.text2')}}</view>
<view class="input-box">
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
<input class="large-input" type="text" :placeholder="$t('login.enterusername')" v-model="user">
</view>
<div class="input-box">
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password" autocomplete=off>
<input class="large-input" :password="!showPassword" :placeholder="$t('login.enterpassword')" v-model="password" autocomplete=off>
<uni-icons :type="showPassword ? 'eye-filled' : 'eye'" size="20" :color="showPassword ? '#ff6a00' : '#999'" @tap="showPassword = !showPassword"></uni-icons>
</div>
<view class="zd-row radio-box">
<view class="zd-col-2 zd-row jccenter radio-icon-wrap" :class="{'radio-icon-wrap_checked': saveUser}" @tap="toSaveUser">
<uni-icons type="checkmarkempty" size="14" :color="saveUser ? '#ff6a00' : '#fff'"></uni-icons>
</view>
<view class="zd-col-13 radio-label">记住用户名</view>
<view class="zd-col-4 setup-text" @tap="setup">设置</view>
<view class="zd-col-5 setup-text" @tap="isUpdate">升级版本</view>
<view class="zd-col-12 radio-label">{{$t('login.remember')}}</view>
<view class="zd-col-4 setup-text" @tap="setup">{{$t('login.settings')}}</view>
<view class="zd-col-8 setup-text" @tap="isUpdate">{{$t('login.upgrade')}}</view>
</view>
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
<button class="login-btn" :disabled="disabled" @tap="toLogin">{{$t('login.login')}}</button>
<view v-if="version !== ''" class="version-name">v{{version}}</view>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
</view>
@@ -68,19 +68,7 @@
},
async toLogin() {
this.disabled = true
if (this.user === '') {
uni.showToast({
title: '用户名不能为空',
icon: 'none'
})
this.disabled = false
return
}
if (this.password === '') {
uni.showToast({
title: '密码不能为空',
icon: 'none'
})
if (this.user === '' || this.password === '') {
this.disabled = false
return
}

View File

@@ -1,24 +1,22 @@
<template>
<view class="zd_container">
<nav-bar title="设置" :inner2="true" @goIn="goIn"></nav-bar>
<nav-bar :title="$t('login.settings')" :inner2="true" @goIn="goIn" :show="false"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="setup-item">
<view class="setup-label">LMS地址</view>
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
<view>
<view class="filter_label">{{$t('setting.language')}}</view>
<view class="filter_select">
<uni-data-select :placeholder="$t('utils.selectPlaceholder')" :emptyTips="$t('utils.selectEmptyTips')" v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
<view>
<view class="filter_label">{{$t('setting.server')}}</view>
<input type="text" class="filter_input" v-model="addrip">
</view>
<!-- <view class="setup-item">
<view class="setup-label">ACS地址</view>
<input type="text" class="setup-input" placeholder="请输入ACS地址" v-model="acsip">
</view> -->
<!-- <view class="setup-item">
<view class="setup-label">刷新时间(s)</view>
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
</view> -->
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-24 button-primary" @click="_submit">确认</button>
<button class="zd-col-24 button-primary" @click="_submit">{{$t('button.confirm')}}</button>
</view>
</view>
</template>
@@ -32,11 +30,43 @@
data() {
return {
addrip: this.$store.getters.baseUrl,
acsip: this.$store.getters.acsUrl,
setTime: this.$store.getters.setTime / 1000
options1: [{text: '中文',value: 'zh-Hans'}, {text: 'English', value: 'en'}],
index1: '',
systemLocale: '',
applicationLocale: ''
};
},
onLoad() {
let systemInfo = uni.getSystemInfoSync();
this.systemLocale = systemInfo.language;
this.applicationLocale = uni.getLocale();
console.log(this.applicationLocale)
this.index1 = this.applicationLocale.split('-')[0]
this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
uni.onLocaleChange((e) => {
this.applicationLocale = e.locale;
})
},
methods: {
onLocaleChange(e) {
if (this.isAndroid) {
uni.showModal({
content: this.$t('setting.language-change-confirm'),
success: (res) => {
if (res.confirm) {
uni.setLocale(e);
}
}
})
} else {
uni.setLocale(e);
this.$i18n.locale = e;
}
},
selectChange1(e) {
this.onLocaleChange(e)
this.index1 = e
},
goIn () {
uni.redirectTo({
url: '/pages/login/login'
@@ -44,28 +74,10 @@
},
_submit () {
if (this.addrip === '') {
uni.showToast({
title: '请填写LMS地址',
icon: 'none'
})
return
}
if (this.acsip === '') {
uni.showToast({
title: '请填写ACS地址',
icon: 'none'
})
return
}
// if (this.setTime === '') {
// uni.showToast({
// title: '请填写刷新时间',
// icon: 'none'
// })
// return
// }
// 存值
this.$store.dispatch('setConfig',{baseUrl: this.addrip, acsUrl: this.acsip, setTime: this.setTime * 1000})
this.$store.dispatch('setConfig',{baseUrl: this.addrip})
uni.redirectTo({
url: '/pages/login/login'
})
@@ -73,19 +85,3 @@
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
.setup-item
width 100%
margin-bottom 40rpx
.setup-label
_font(24rpx,40rpx,#000)
.setup-input
_wh(100%, 80rpx)
background #fff
_font(28rpx,80rpx,#323232)
padding 0 28rpx
border 2px solid #e9ecf3
border-radius 12rpx
</style>

View File

@@ -4,13 +4,9 @@
<nav-bar :title="title" :inner="true"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="val1">
</view>
<view>
<view class="filter_label">{{$t('label.Material')}}</view>
<input type="text" class="filter_input" v-model="val1">
</view>
</view>
<view class="zd_wrapper grid-wraper">
@@ -18,9 +14,9 @@
<table>
<thead>
<tr>
<th>物料名称</th>
<th><view style="width: 300rpx;">物料规格</view></th>
<th>物料编码</th>
<th>{{$t('label.MaterialName')}}</th>
<th><view style="width: 300rpx;">{{$t('MaterialSpecification')}}</view></th>
<th>{{$t('MaterialCode')}}</th>
</tr>
</thead>
<tbody>
@@ -36,9 +32,9 @@
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-8 button-primary" @tap="searchList">查询</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
<button class="zd-col-5 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-8 button-primary" @tap="searchList">{{$t('button.search')}}</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -4,31 +4,23 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">起点点位</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val1"
/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.StartPosition')}}</view>
<search-box
v-model="val1"
/>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">终点点位</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val2"
/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.EndPosition')}}</view>
<search-box
v-model="val2"
/>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_transferConfirm">确认</button>
<button class="zd-col-6 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_transferConfirm">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -4,22 +4,18 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1"/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.Pointlocation')}}</view>
<search-box v-model="val1"/>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">点位载具</span>
<view class="is-required">
<view class="filter_label">{{$t('label.Pointlocationcarrier')}}</view>
<view class="zd-row">
<view class="zd-col-18">
<search-box v-model="val2"/>
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_schPointGetPoint">{{$t('button.search')}}</button>
</view>
<view class="zd-col-12">
<search-box v-model="val2"/>
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_schPointGetPoint">查询</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
@@ -27,12 +23,12 @@
<table>
<thead>
<tr>
<th>序号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>载具号</th>
<th>数量</th>
<th>单位</th>
<th>{{$t('th.Serialnumber')}}</th>
<th>{{$t('label.MaterialCode')}}</th>
<th>{{$t('label.MaterialName')}}</th>
<th>{{$t('label.CarrierCode')}}</th>
<th>{{$t('th.Quantity')}}</th>
<th>{{$t('th.Unit')}}</th>
</tr>
</thead>
<tbody>
@@ -50,9 +46,9 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !dataList.length}" :disabled="disabled" @tap="_schPointBinding">绑定</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !dataList.length}" :disabled="disabled" @tap="_schPointDissect">清载具</button>
<button class="zd-col-5 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !dataList.length}" :disabled="disabled" @tap="_schPointBinding">{{$t('button.Bind')}}</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || !dataList.length}" :disabled="disabled" @tap="_schPointDissect">{{$t('button.Clearcarrier')}}</button>
</view>
</view>
</template>

View File

@@ -4,37 +4,29 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">出库库区</span>
</view>
<view class="zd-col-17 filter_select">
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
<view>
<view class="filter_label">{{$t('label.OutWarehouseArea')}}</view>
<view class="filter_select">
<uni-data-select :placeholder="$t('utils.selectPlaceholder')" :emptyTips="$t('utils.selectEmptyTips')" v-model="index" :localdata="options"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料查询</span>
</view>
<view class="zd-col-12">
<input type="text" class="filter_input" v-model="val2">
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_linegetMaterialDtl">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">终点站点</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1"/>
<view>
<view class="filter_label">{{$t('label.MaterialInquiry')}}</view>
<view class="zd-row">
<view class="zd-col-18">
<input type="text" class="filter_input" v-model="val2">
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_linegetMaterialDtl">{{$t('button.search')}}</button>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">目的楼层</span>
</view>
<view class="zd-col-17 filter_select">
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
<view class="is-required">
<view class="filter_label">{{$t('label.EndPosition')}}</view>
<search-box v-model="val1"/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.DestinationFloor')}}</view>
<view class="filter_select">
<uni-data-select :placeholder="$t('utils.selectPlaceholder')" :emptyTips="$t('utils.selectEmptyTips')" v-model="index1" :localdata="options1"></uni-data-select>
</view>
</view>
</view>
@@ -43,13 +35,13 @@
<table>
<thead>
<tr>
<th>库位</th>
<th>载具编码</th>
<th>物料名称</th>
<th>物料规格</th>
<th>物料编码</th>
<th>数量</th>
<th>单位</th>
<th>{{$t('th.WarehouseLocation')}}</th>
<th>{{$t('label.CarrierCode')}}</th>
<th>{{$t('label.MaterialName')}}</th>
<th>{{$t('label.MaterialSpecification')}}</th>
<th>{{$t('label.MaterialCode')}}</th>
<th>{{$t('th.Quantity')}}</th>
<th>{{$t('th.Unit')}}</th>
</tr>
</thead>
<tbody>
@@ -68,8 +60,8 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId || !val1 || !index1}" @tap="_callMaterialConfirm">确认</button>
<button class="zd-col-6 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId || !val1 || !index1}" @tap="_callMaterialConfirm">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -4,30 +4,22 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">移出货位</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1"/>
<view>
<view class="filter_label">{{$t('label.RemoveLocation')}}</view>
<search-box v-model="val1"/>
</view>
<view>
<view class="filter_label">{{$t('label.RemoveCarrier')}}</view>
<view class="zd-row">
<view class="zd-col-18">
<search-box v-model="val2"/>
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_movestorQuerydtl">{{$t('button.search')}}</button>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">移出载具</span>
</view>
<view class="zd-col-12">
<search-box v-model="val2"/>
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_movestorQuerydtl">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">移入货位</span>
</view>
<view class="zd-col-17">
<search-box v-model="val3"/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.MoveLocation')}}</view>
<search-box v-model="val3"/>
</view>
</view>
<view class="zd_wrapper grid-wraper">
@@ -35,12 +27,12 @@
<table>
<thead>
<tr>
<th>序号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>载具号</th>
<th>数量</th>
<th>单位</th>
<th>{{$t('th.Serialnumber')}}</th>
<th>{{$t('label.MaterialCode')}}</th>
<th>{{$t('label.MaterialName')}}</th>
<th>{{$t('label.CarrierCode')}}</th>
<th>{{$t('label.Quantity')}}</th>
<th>{{$t('label.Unit')}}</th>
</tr>
</thead>
<tbody>
@@ -58,8 +50,8 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val3 || !dataList.length}" :disabled="disabled" @tap="_movestorMove">确认</button>
<button class="zd-col-6 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val3 || !dataList.length}" :disabled="disabled" @tap="_movestorMove">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -4,63 +4,43 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1"/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.CarrierCode')}}</view>
<search-box v-model="val1"/>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input" v-model="currentData.material_code" @tap="toJump">
</view>
<view>
<view class="filter_label">{{$t('label.MaterialCode')}}</view>
<input type="text" class="filter_input" v-model="currentData.material_code" @tap="toJump">
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料名称</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialName')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料规格</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialSpecification')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料数量</span>
</view>
<view class="zd-col-17">
<input type="number" class="filter_input filter_input_disabled" v-model="totalQty" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialQuantity')}}</view>
<input type="number" class="filter_input filter_input_disabled" v-model="totalQty" disabled>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<button class="mini-btn" type="primary" size="mini" style="display: block;" @tap="addmater">添加料框</button>
<button class="mini-btn" type="primary" size="mini" style="display: block;" @tap="addmater">{{$t('button.AddMaterialBox')}}</button>
<view v-if="dataList.length" class="slide_new">
<table>
<thead>
<tr>
<th width="50%">料框号</th>
<th width="30%">数量</th>
<th>操作</th>
<th width="50%">{{$t('th.MaterialBoxNumber')}}</th>
<th width="30%">{{$t('Quantity')}}</th>
<th>{{$t('button.Operation')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td><input class="sin_input" :class="{ 'input-error': e.mater_frame === '' }" type="text" placeholder="请输入料框号" v-model="e.mater_frame" @blur="checkMaterFrame(i)" @input="clearError(i)" ref="materFrameInputs"></td>
<td><input class="sin_input" :class="{ 'input-error': e.mater_frame === '' }" type="text" v-model="e.mater_frame" @blur="checkMaterFrame(i)" @input="clearError(i)" ref="materFrameInputs"></td>
<td><input class="sin_input" type="number" v-model="e.qty" @blur="checkQty(i)"></td>
<td><button class="mini-btn" type="primary" size="mini" style="display: block" @tap="delItem(i)">删除</button></td>
<td><button class="mini-btn" type="primary" size="mini" style="display: block" @tap="delItem(i)">{{$t('button.Delete')}}</button></td>
</tr>
</tbody>
</table>
@@ -68,8 +48,8 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1}" :disabled="disabled" @tap="_groupPlate">组盘确认</button>
<button class="zd-col-6 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !val1}" :disabled="disabled" @tap="_groupPlate">{{$t('button.confirm')}}</button>
</view>
</view>
</template>
@@ -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

View File

@@ -4,68 +4,46 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">起点站点</span>
</view>
<view class="zd-col-17">
<search-box
v-model="val2"
@handleChange="handleChange"
/>
</view>
<view class="is-required">
<view class="filter_label">{{$t('label.StartPosition')}}</view>
<search-box
v-model="val2"
@handleChange="handleChange"
/>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-12">
<view class="is-required">
<view class="filter_label">{{$t('label.CarrierCode')}}</view>
</view>
<view class="zd-row">
<view class="zd-col-18">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_getVehicleMaterial(val1)">查询</button>
<button class="mini-btn" type="primary" size="mini" style="margin-right: 0" @tap="_getVehicleMaterial(val1)">{{$t('button.search')}}</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">入库库区</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
<view class="is-required">
<view class="filter_label">{{$t('label.WarehouseArea')}}</view>
<view class="filter_select">
<uni-data-select :placeholder="$t('utils.selectPlaceholder')" :emptyTips="$t('utils.selectEmptyTips')" v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料名称</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialName')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料规格</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialSpecification')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料编号</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialCode')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料数量</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
</view>
<view>
<view class="filter_label">{{$t('label.MaterialQuantity')}}</view>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
</view>
</view>
<view v-if="dataList.length" class="zd_wrapper grid-wraper">
@@ -73,8 +51,8 @@
<table>
<thead>
<tr>
<th width="60%">料框号</th>
<th width="40%">数量</th>
<th width="60%">{{$t('th.MaterialBoxNumber')}}</th>
<th width="40%">{{$t('th.Quantity')}}</th>
</tr>
</thead>
<tbody>
@@ -88,8 +66,8 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_confirmIn">确认</button>
<button class="zd-col-6 button-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_confirmIn">{{$t('button.confirm')}}</button>
</view>
</view>
</template>

View File

@@ -1,16 +1,12 @@
<template>
<view class="zd_container">
<view class="zd_container" :class="{'en_class': applicationLocale === 'en'}">
<!-- 作业管理 -->
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">关键字</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1"/>
</view>
<view>
<view class="filter_label">{{$t('label.Keyword')}}</view>
<search-box v-model="val1"/>
</view>
</view>
<view class="zd_wrapper grid-wraper">
@@ -18,15 +14,11 @@
<table>
<thead>
<tr>
<th>载具号</th>
<th>起点</th>
<th>终点</th>
<th>状态</th>
<th>作业号</th>
<!-- <th>作业类型</th>
<th>设备号</th>
<th>当前步骤</th>
<th>异常信息</th> -->
<th>{{$t('label.CarrierCode')}}</th>
<th>{{$t('th.Startpoint')}}</th>
<th>{{$t('th.Endpoint')}}</th>
<th>{{$t('th.Status')}}</th>
<th>{{$t('th.Jobnumber')}}</th>
</tr>
</thead>
<tbody>
@@ -43,10 +35,10 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-5 button-primary" @tap="_schTaskQueryTask">查询</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_schTaskAgainTask">重新下发</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_forceConfirm">强制完成</button>
<button class="zd-col-5 button-default" @tap="toEmpty">{{$t('button.clear')}}</button>
<button class="zd-col-5 button-primary" @tap="_schTaskQueryTask">{{$t('button.search')}}</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_schTaskAgainTask">{{$t('button.Reissue')}}</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_forceConfirm">{{$t('button.Forcecompletion')}}</button>
</view>
</view>
</template>
@@ -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 () {