ソースを参照

出入库,胎号查询,我的品牌等中文语言包配置

caojunjie 4 年 前
コミット
55ffdcfdef

+ 46 - 15
common/locales/zh.js

@@ -11,7 +11,15 @@ export default {
 	//页面标题
 	pagetitle:{
 		entertitle:'入库明细',
-		outtitle:'出库明细'
+		outtitle:'出库明细',
+		numberquery:'胎号查询',
+		supplier:'我的供应商',
+		brandmanagement:'我的经营品牌'
+	},
+	unified:{
+		networkstate: '无网络,请连接网络后再试~',
+		nodata:'暂无数据',
+		Loading:'加载中...'
 	},
 	//扫码页面
 	scanenter: {
@@ -27,14 +35,13 @@ export default {
 		pleaseenter: '请输入胎号',
 		pleaseenter_s: '请输入轮胎胎号',
 		nodata: '请扫码或录入后再点击!',
-		networkstate: '无网络,请连接网络后再试~',
 		networkstate_s: '网络繁忙请稍后再试',
 		locationstate: '获取地址失败, 请检查是否开启定位权限~',
 		repeat: '请勿重复录入',
 		inputsuccess: '录入成功',
 		scansuccess: '扫码成功'
 	},
-	//入库明细
+	//入库明细
 	scancodeenter: {
 		total: '库存总量',
 		tips: '请输入胎号或规格',
@@ -50,18 +57,42 @@ export default {
 		strip:'条',
 		start:'开始',
 		end:'结束',
-		scrollingtips: [{
-				name: '努力加载中'
-			},
-			{
-				name: '没有更多啦'
-			},
-			{
-				name: '加载中'
-			}
-		],
-		nodata:'无数据',
+		loadmore:'无数据',
+		loading:'努力加载中',
+		nomore:'没有更多啦',
+		nodata:'暂无数据',
 		participation:'参加',
-		noparticipation:'不参加'
+		noparticipation:'不参加',
+		networkstate:'网络繁忙,请稍后再试~',
+		Loading:'加载中...',
+		determine:'确定'
+	},
+	//胎号查询
+	numberquery:{
+		clickscancode:'点击扫码',
+		input:'手动录入',
+		promptinput:'请扫码查询或手动录入',
+		errormessage:'请扫码或输入胎号',
+		query:'查询',
+		pleaseinput:'请输入胎号',
+		number:'轮胎胎号',
+		brand:'轮胎品牌',
+		specifications:'轮胎规格',
+		type:'操作类型',
+		time:'操作时间',
+		success:'查询成功',
+		networkstate:'网络繁忙,请稍后再试~',
+	},
+	//我的供应商
+	supplier:{
+		//暂无
+	},
+	//我的经营品牌
+	brandmanagement:{
+		reason:'原因',
+		rejected:'已拒绝',
+		approved:'审核通过',
+		deleted:'已删除',
+		notreviewed:'待审核'
 	}
 }

+ 30 - 30
pages/home/scancodequery/result.vue

@@ -4,18 +4,18 @@
 		<view class="head">
 			<view class="tips" @tap="$u.throttle(scanning, 500)">
 				<view>
-					<view><text>点击扫码</text></view>
+					<view><text>{{$t('numberquery.clickscancode')}}</text></view>
 				</view>
 			</view>
 			<view class="stripe"></view>
 			<view class="roll">
 				<view>
 					<view @click="show =! show">
-						<u-icon name="edit-pen"></u-icon>手动录入
+						<u-icon name="edit-pen"></u-icon>{{$t('numberquery.input')}}
 					</view>
 					<view class="lnput" v-if="show==false">
-						<input type="text" v-model="number" placeholder="请输入胎号" clearable="true" focus="true" />
-						<u-button type="primary" size="medium" @click="query">查询</u-button>
+						<input type="text" v-model="number" :placeholder="$t('numberquery.pleaseinput')" clearable="true" focus="true" />
+						<u-button type="primary" size="medium" @click="query">{{$t('numberquery.query')}}</u-button>
 					</view>
 					<view class="roll_s" v-else>
 						<view>{{datalist}}</view>
@@ -27,13 +27,13 @@
 					<u-line color="#f4f4f4" border-style="dashed" :hair-line="true" length="94%" style="margin: 0 auto;padding-top: 30rpx;" />
 				</view>
 				<view class="Exhibition" v-if="show_s == false">
-					<view><text>轮胎胎号</text><text>{{Information.tireNumber}}</text></view>
-					<view><text>轮胎品牌</text><text>{{Information.brand}}</text></view>
-					<view><text>轮胎规格</text><text>{{Information.specification}}</text></view>
-					<view><text>操作类型</text><text>{{Information.mouldInType}}</text></view>
-					<view><text>操作时间</text><text>{{Information.mouldInTime}}</text></view>
-					<view v-if="Information.mouldOutType != null "><text>操作类型</text><text>{{Information.mouldOutType}}</text></view>
-					<view v-if="Information.mouldOutTime != null "><text>操作时间</text><text>{{Information.mouldOutTime}}</text></view>
+					<view><text>{{$t('numberquery.number')}}</text><text>{{Information.tireNumber}}</text></view>
+					<view><text>{{$t('numberquery.brand')}}</text><text>{{Information.brand}}</text></view>
+					<view><text>{{$t('numberquery.specifications')}}</text><text>{{Information.specification}}</text></view>
+					<view><text>{{$t('numberquery.type')}}</text><text>{{Information.mouldInType}}</text></view>
+					<view><text>{{$t('numberquery.time')}}</text><text>{{Information.mouldInTime}}</text></view>
+					<view v-if="Information.mouldOutType != null "><text>{{$t('numberquery.type')}}</text><text>{{Information.mouldOutType}}</text></view>
+					<view v-if="Information.mouldOutTime != null "><text>{{$t('numberquery.time')}}</text><text>{{Information.mouldOutTime}}</text></view>
 				</view>
 				<view v-else style="margin-top: 100rpx;margin-bottom: 100rpx;">
 					<u-empty :text="text" mode="list"></u-empty>
@@ -51,8 +51,8 @@
 	export default {
 		data() {
 			return {
-				datalist: '请扫码查询或手动录入',
-				number:'',
+				datalist: this.$t('numberquery.promptinput'),
+				number: '',
 				empty: true,
 				mouldOutTime: '',
 				mouldOutType: '',
@@ -61,21 +61,21 @@
 				tireNumber: "",
 				brand: '',
 				specification: '',
-				text: '请扫码或输入胎号',
+				text: this.$t('numberquery.errormessage'),
 				show: true,
-				show_s:true,
-				Information:[]
+				show_s: true,
+				Information: []
 			}
 		},
 		onReady() {
 			uni.getNetworkType({
 				success: function(res) {
 					let none = res.networkType
-					
+
 					if (none == 'none') {
 						uni.showToast({
 							icon: 'none',
-							title: '无网络,请连接网络后再试~',
+							title: this.$t('unified.networkstate'),
 							position: "bottom"
 						})
 					}
@@ -88,7 +88,7 @@
 		},
 		methods: {
 			rendering() {
-				
+
 				request({
 					url: '/myapp/mouldSelect',
 					method: 'Post',
@@ -99,11 +99,11 @@
 					}
 				}).then(res => {
 					this.Information = []
-					
+
 					if (res.data.code == 0) {
 						uni.showToast({
 							icon: 'none',
-							title: '查询成功',
+							title: this.$t('numberquery.success'),
 							position: "bottom"
 						})
 						this.empty = false
@@ -120,10 +120,10 @@
 					}
 					this.text = res.data.msg
 				}).catch(err => {
-					
+
 					uni.showToast({
 						icon: 'none',
-						title: '出错了请联系管理员~',
+						title: this$t('numberquery.networkstate'),
 						position: "bottom"
 					})
 				}).finally(() => {
@@ -134,15 +134,15 @@
 				let this_ = this
 				uni.scanCode({
 					success: function(res) {
-						
-						
+
+
 						this_.datalist = res.result
 						this_.rendering()
 					}
 				})
 			},
 			query() {
-				
+
 				request({
 					url: '/myapp/mouldSelect',
 					method: 'Post',
@@ -153,11 +153,11 @@
 					}
 				}).then(res => {
 					this.Information = []
-					
+
 					if (res.data.code == 0) {
 						uni.showToast({
 							icon: 'none',
-							title: '查询成功',
+							title: this.$t('numberquery.success'),
 							position: "bottom"
 						})
 						this.empty = false
@@ -176,10 +176,10 @@
 					}
 					this.text = res.data.msg
 				}).catch(err => {
-					
+
 					uni.showToast({
 						icon: 'none',
-						title: '出错了请联系管理员~',
+						title: this$t('numberquery.networkstate'),
 						position: "bottom"
 					})
 				}).finally(() => {

+ 24 - 31
pages/me/Delivery-details/index.vue

@@ -2,38 +2,38 @@
 	<!-- 出库明细页面 -->
 	<view class="header">
 		<view class="header-one">
-			库存总量:<text>{{total}}</text>
+			{{$t('scancodeenter.total')}}:<text>{{total}}</text>
 		</view>
 		<view style="width: 100%;margin-top: 60rpx;">
 			<!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
 			 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
 			<view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
 				<view style="float: left;">
-					<text @tap="$u.throttle(whole, 500)">全部</text>
+					<text @tap="$u.throttle(whole, 500)">{{$t('scancodeenter.tabs_a')}}</text>
 					<view v-if="bottoma == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
 					<view v-else></view>
 				</view>
 				<view style="float: left;margin-left: 70rpx;">
-					<text @click="brand">品牌</text>
+					<text @click="brand">{{$t('scancodeenter.tabs_b')}}</text>
 					<view  v-if="bottomb == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
 					<view v-else></view>
 				</view>
 				<view style="float: left;margin-left: 70rpx;">
-					<text @click="time_s">时间</text>
+					<text @click="time_s">{{$t('scancodeenter.tabs_c')}}</text>
 					<view  v-if="bottomc == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
 					<view v-else></view>
 				</view>
 			</view>
-			<u-search class="inputbox" placeholder="请输入胎号或规格" @change="inputbox" v-model="keyword" :show-action="false"></u-search>
+			<u-search class="inputbox" :placeholder="$t('scancodeenter.tips')" @change="inputbox" v-model="keyword" :show-action="false"></u-search>
 		</view>
 		<view class="nothing" v-if="judge==true">
-			<u-empty text="暂无数据"></u-empty>
+			<u-empty :text="$t('scancodeenter.nodata')"></u-empty>
 		</view>
 		<view style="width: 100%;margin-top: 160rpx;">
 			<view class="block" v-for="(item, index) in itemList" :key="index">
 				<view class="title">
 					<view>|</view>
-					<view>单号:{{item.scanNum}} </view>
+					<view>{{$t('scancodeenter.number')}}:{{item.scanNum}} </view>
 					<view>{{item.scanTime.slice(0,10)}}</view>
 				</view>
 				<u-line color="#f4f4f4"></u-line>
@@ -45,25 +45,25 @@
 									{{item2.tireModel}}
 								</view>
 								<view class="">
-									{{item2.tyreCount}}
+									{{item2.tyreCount}}{{$t('scancodeenter.strip')}}
 								</view>
 							</view>
 							<view class="details" v-for="(item3,index) in item2.matnrMsgVOS" :key="index">
 								<view class="u-font-25">
-									<view>物料描述</view>
+									<view>{{$t('scancodeenter.describe')}}</view>
 									<view>{{item3.maktx}}</view>
 								</view>
 								<view class="u-font-25">
-									<view>轮胎胎号</view>
+									<view>{{$t('scancodeenter.number_d')}}</view>
 									<view>{{item3.tyreNum}}</view>
 								</view>
 								<view class="u-font-25">
-									<view>参加活动</view>
-									<view v-if="item3.satisfyActivity == 1">参加</view>
-									<view v-else>不参加</view>
+									<view>{{$t('scancodeenter.activity')}}</view>
+									<view v-if="item3.satisfyActivity == 1">{{$t('scancodeenter.participation')}}</view>
+									<view v-else>{{$t('scancodeenter.noparticipation')}}</view>
 								</view>
 								<view class="u-font-25">
-									<view>创建时间</view>
+									<view>{{$t('scancodeenter.creationtime')}}</view>
 									<view>{{item3.createDate}}</view>
 								</view>
 								<u-line color="#f4f4f4"></u-line>
@@ -76,7 +76,7 @@
 				<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
 			</view>
 			<u-action-sheet :list="list_a" @click="click" v-model="show" :mask-close-able="false" @close="close"></u-action-sheet>
-			<u-calendar v-model="show_d" toolTip="请选择日期范围" :mode="mode" @change="time" :mask-close-able="false"></u-calendar>
+			<u-calendar v-model="show_d" :toolTip="$t('scancodeenter.daterange')"  :mode="mode" @change="time" :mask-close-able="false" :start-text="$t('scancodeenter.start')" :end-text="$t('scancodeenter.end')"></u-calendar>
 		</view>
 	</view>
 </template>
@@ -96,18 +96,11 @@
 				show_d: false,
 				mode: 'range',
 				loadText: {
-					loadmore: '无数据',
-					loading: '努力加载中',
-					nomore: '没有更多啦'
+					loadmore: this.$t('scancodeenter.loadmore'),
+					loading: this.$t('scancodeenter.loading'),
+					nomore: this.$t('scancodeenter.nomore')
 				},
 				style: '.5rpx solid #FFFFFF',
-				list: [{
-					name: '全部'
-				}, {
-					name: '品牌'
-				}, {
-					name: '时间'
-				}],
 				brandCode: null,
 				list_a: [],
 				current: 0,
@@ -298,12 +291,8 @@
 			// },
 			getPage() {
 				
-				
-				
-				
-				
 				uni.showLoading({
-					title: '加载中...'
+					title: this.$t('unified.Loading')
 				});
 				
 				setTimeout(function() {
@@ -346,7 +335,11 @@
 					return this.itemList
 					}
 				}).catch(err => {
-					
+					uni.showToast({
+						icon: 'none',
+						title: this.$t('scancodeenter.networkstate'),
+						position: "bottom"
+					})
 				}).finally(() => {
 					// Loading.close()
 				})

+ 21 - 28
pages/me/Warehousing-details/index.vue

@@ -2,38 +2,38 @@
 	<!-- 入库明细页面 -->
 	<view class="header">
 		<view class="header-one">
-			库存总量:<text>{{total}}</text>
+			{{$t('scancodeenter.total')}}:<text>{{total}}</text>
 		</view>
 		<view style="width: 100%;margin-top: 60rpx;">
 			<!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
 			 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
 			<view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
 				<view style="float: left;">
-					<text @tap="$u.throttle(whole, 500)">全部</text>
+					<text @tap="$u.throttle(whole, 500)">{{$t('scancodeenter.tabs_a')}}</text>
 					<view v-if="bottoma == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
 					<view v-else></view>
 				</view>
 				<view style="float: left;margin-left: 70rpx;">
-					<text @click="brand">品牌</text>
+					<text @click="brand">{{$t('scancodeenter.tabs_b')}}</text>
 					<view  v-if="bottomb == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
 					<view v-else></view>
 				</view>
 				<view style="float: left;margin-left: 70rpx;">
-					<text @click="time_s">时间</text>
+					<text @click="time_s">{{$t('scancodeenter.tabs_c')}}</text>
 					<view  v-if="bottomc == true" style="width: 100%;height: 1rpx;background-color: #FFFFFF;border-radius: 10rpx;"></view>
 					<view v-else></view>
 				</view>
 			</view>
-			<u-search class="inputbox" placeholder="请输入胎号或规格" @change="inputbox" v-model="keyword" :show-action="false"></u-search>
+			<u-search class="inputbox" :placeholder="$t('scancodeenter.tips')" @change="inputbox" v-model="keyword" :show-action="false"></u-search>
 		</view>
 		<view class="nothing" v-if="judge==true">
-			<u-empty text="暂无数据"></u-empty>
+			<u-empty :text="$t('scancodeenter.nodata')"></u-empty>
 		</view>
 		<view style="width: 100%;margin-top: 160rpx;">
 			<view class="block" v-for="(item, index) in itemList" :key="index">
 				<view class="title">
 					<view>|</view>
-					<view>单号:{{item.scanNum}} </view>
+					<view>{{$t('scancodeenter.number')}}:{{item.scanNum}} </view>
 					<view>{{item.scanTime.slice(0,10)}}</view>
 				</view>
 				<u-line color="#f4f4f4"></u-line>
@@ -45,25 +45,25 @@
 									{{item2.tireModel}}
 								</view>
 								<view class="">
-									{{item2.tyreCount}}
+									{{item2.tyreCount}}{{$t('scancodeenter.strip')}}
 								</view>
 							</view>
 							<view class="details" v-for="(item3,index) in item2.matnrMsgVOS" :key="index">
 								<view class="u-font-25">
-									<view>物料描述</view>
+									<view>{{$t('scancodeenter.describe')}}</view>
 									<view>{{item3.maktx}}</view>
 								</view>
 								<view class="u-font-25">
-									<view>轮胎胎号</view>
+									<view>{{$t('scancodeenter.number_d')}}</view>
 									<view>{{item3.tyreNum}}</view>
 								</view>
 								<view class="u-font-25">
-									<view>参加活动</view>
-									<view v-if="item3.satisfyActivity == 1">参加</view>
-									<view v-else>不参加</view>
+									<view>{{$t('scancodeenter.activity')}}</view>
+									<view v-if="item3.satisfyActivity == 1">{{$t('scancodeenter.participation')}}</view>
+									<view v-else>{{$t('scancodeenter.noparticipation')}}</view>
 								</view>
 								<view class="u-font-25">
-									<view>创建时间</view>
+									<view>{{$t('scancodeenter.creationtime')}}</view>
 									<view>{{item3.createDate}}</view>
 								</view>
 								<u-line color="#f4f4f4"></u-line>
@@ -76,7 +76,7 @@
 				<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
 			</view>
 			<u-action-sheet :list="list_a" @click="click" v-model="show" :mask-close-able="false" @close="close"></u-action-sheet>
-			<u-calendar v-model="show_d" :toolTip="$t('scancodeenter.daterange')"  :mode="mode" @change="time" :mask-close-able="false" start-text="开始" end-text="结束"></u-calendar>
+			<u-calendar v-model="show_d" :toolTip="$t('scancodeenter.daterange')"  :mode="mode" @change="time" :mask-close-able="false" :start-text="$t('scancodeenter.start')" :end-text="$t('scancodeenter.end')"></u-calendar>
 		</view>
 	</view>
 </template>
@@ -96,18 +96,11 @@
 				show_d: false,
 				mode: 'range',
 				loadText: {
-					loadmore: '无数据',
-					loading: '努力加载中',
-					nomore: '没有更多啦'
+					loadmore: this.$t('scancodeenter.loadmore'),
+					loading: this.$t('scancodeenter.loading'),
+					nomore: this.$t('scancodeenter.nomore')
 				},
 				style: '.5rpx solid #FFFFFF',
-				list: [{
-					name: '全部'
-				}, {
-					name: '品牌'
-				}, {
-					name: '时间'
-				}],
 				brandCode: null,
 				list_a: [],
 				current: 0,
@@ -238,7 +231,7 @@
 					}).catch(err => {
 						uni.showToast({
 							icon: 'none',
-							title: '网络繁忙,请稍后再试~',
+							title: this.$t('scancodeenter.networkstate'),
 							position: "bottom"
 						})
 					}).finally(() => {
@@ -306,7 +299,7 @@
 				// 
 				// 
 				uni.showLoading({
-					title: '加载中...'
+					title: this.$t('scancodeenter.Loading')
 				});
 				setTimeout(function() {
 					uni.hideLoading();
@@ -351,7 +344,7 @@
 					// 
 					uni.showToast({
 						icon: 'none',
-						title: '网络繁忙,请稍后再试~',
+						title: this.$t('scancodeenter.networkstate'),
 						position: "bottom"
 					})
 				}).finally(() => {

+ 2 - 2
pages/me/management.vue

@@ -5,7 +5,7 @@
 			<view class="behind"></view>
 			<view class="below">
 				<view class="nothing" v-if="judge==true">
-					<u-empty mode="page" text="暂无数据"></u-empty>
+					<u-empty mode="page" :text="$t('unified.nodata')"></u-empty>
 				</view>
 				<view class="content" v-else v-for="(item, index) in supplier_s" :key="index">
 					<view class="content_s">
@@ -30,7 +30,7 @@
 								<u-icon name="orders-o" custom-prefix="van-icon" />
 								<u-input v-model="item.signCount" :disabled="true"/>
 							</u-form-item>
-							<u-form-item label="原因:" v-if="item.cause != null"><u-input v-model="item.cause" :disabled="true"/></u-form-item>
+							<u-form-item :label="$t('brandmanagement.reason')+':'" v-if="item.cause != null"><u-input v-model="item.cause" :disabled="true"/></u-form-item>
 						</view>
 					</view>
 				</view>

+ 2 - 2
pages/me/suppliers.vue

@@ -5,7 +5,7 @@
 			<view class="behind"></view>
 			<view class="below">
 				<view class="nothing" v-if="judge==true">
-					<u-empty mode="page" text="暂无数据"></u-empty>
+					<u-empty mode="page" :text="$t('unified.nodata')"></u-empty>
 				</view>
 				<view class="content" v-for="(item, index) in supplier_s" :key="index">
 					<view class="content_s">
@@ -37,7 +37,7 @@
 		},
 		created() {
 			uni.showLoading({
-				title: '加载中...'
+				title: this.$t('unified.Loading')
 			});
 			
 			setTimeout(function() {

+ 3 - 3
uview-ui/components/u-calendar/u-calendar.vue

@@ -51,7 +51,7 @@
 					<text v-if="endDate">-{{endDate}}</text>
 				</view>
 				<view class="u-calendar__bottom__btn">
-					<u-button :type="btnType" shape="circle" size="default" @click="btnFix(false)">确定</u-button>
+					<u-button :type="btnType" shape="circle" size="default" @click="btnFix(false)">{{$t('scancodeenter.determine')}}</u-button>
 				</view>
 			</view>
 		</view>
@@ -251,7 +251,7 @@
 				isStart: true,
 				min: null,
 				max: null,
-				weekDayZh: ['日', '一', '二', '三', '四', '五', '六']
+				// weekDayZh: ['日', '一', '二', '三', '四', '五', '六']
 			};
 		},
 		computed: {
@@ -385,7 +385,7 @@
 				this.daysArr=this.generateArray(1,this.days)
 				this.weekday = this.getWeekday(this.year, this.month);
 				this.weekdayArr=this.generateArray(1,this.weekday)
-				this.showTitle = `${this.year}年${this.month}月`;
+				this.showTitle = `${this.year} - ${this.month}`;
 				if (this.isChange && this.mode == 'date') {
 					this.btnFix(true);
 				}