瀏覽代碼

我的库存和出库确认国际化修改

caojunjie 4 年之前
父節點
當前提交
c5eb4f214a
共有 4 個文件被更改,包括 45 次插入30 次删除
  1. 16 3
      common/locales/zh.js
  2. 2 2
      common/request/request.js
  3. 15 11
      pages/home/Scan-code-out/index.vue
  4. 12 14
      pages/home/my-stock/my-stock.vue

+ 16 - 3
common/locales/zh.js

@@ -95,8 +95,9 @@ export default {
 	unified:{
 		networkstate: '无网络,请连接网络后再试~',
 		nodata:'暂无数据',
-		Loading:'加载中...',
+		Loading:'加载中',
 		error:'出错啦',
+		search:'搜索',
 		//下面是日历的周一到周天
 		sun:'日',
 		mon:'一',
@@ -153,6 +154,7 @@ export default {
 		attention:'注:所有的奖励均在达到签约任务后给予兑现。',
 		confirm: '扫码确认',
 		networkstate:'网络繁忙,请稍后再试~',
+		notincluded:'未入库轮胎'
 	},
 	//出入库明细
 	scancodeenter: {
@@ -177,8 +179,9 @@ export default {
 		participation:'参加',
 		noparticipation:'不参加',
 		networkstate:'网络繁忙,请稍后再试~',
-		Loading:'加载中...',
-		determine:'确定'
+		Loading:'加载中',
+		determine:'确定',
+		delivery:'成功出库轮胎'
 	},
 	//胎号查询
 	numberquery:{
@@ -207,5 +210,15 @@ export default {
 		approved:'审核通过',
 		deleted:'已删除',
 		notreviewed:'待审核'
+	},
+	//我的库存
+	stock:{
+		tips: '请输入胎号或规格',
+		specifications:'轮胎规格',
+		stock:'库存',
+		tabs_a: '全部',
+		loadmore:'无数据',
+		loading:'努力加载中',
+		nomore:'没有更多啦',
 	}
 }

+ 2 - 2
common/request/request.js

@@ -27,9 +27,9 @@ export function request(config) {
 	// uEnvProd;生产模式,点击发行
 	if (process.env.NODE_ENV === 'production') {
 	    //测试接口
-		baseURL = "http://b2bcnapi.sailuntire.com/allstell/test/app"
+		// baseURL = "http://b2bcnapi.sailuntire.com/allstell/test/app"
 		//正式接口
-		// baseURL = "http://b2bcnapi.sailuntire.com/allstell/app";
+		baseURL = "http://b2bcnapi.sailuntire.com/allstell/app";
 	};
     let newVar = axios.create({
         baseURL: baseURL,

+ 15 - 11
pages/home/Scan-code-out/index.vue

@@ -5,27 +5,27 @@
 			<view style="width: 100%;height: 42rpx;margin-top: 30rpx;margin-bottom: 10rpx;text-align: center;">成功信息</view>
 			<u-table border-color="#f2f2f2">
 				<u-tr class="u-tr">
-					<u-td class="u-td">{{successCount}}</u-td>
-					<u-td class="u-td">成功出库轮胎</u-td>
+					<u-td class="u-td">{{successCount}}{{$t('scancodeenter.strip')}}</u-td>
+					<u-td class="u-td">{{$t('scancodeenter.delivery')}}</u-td>
 				</u-tr>
 			</u-table>
 			<view style="width: 100%;height: 42rpx;margin-top: 30rpx;margin-bottom: 10rpx;text-align: center;">失败信息</view>
 			<u-table border-color="#f2f2f2" font-size="20rpx">
 				<u-tr class="u-tr">
-					<u-th class="u-th">轮胎胎号</u-th>
-					<u-th class="u-th">失败原因</u-th>
+					<u-th class="u-th">{{$t('scanningconfirm.number')}}</u-th>
+					<u-th class="u-th">{{$t('scanningconfirm.failreason')}}</u-th>
 				</u-tr>
 				<u-tr class="u-tr" v-for="(item,index) in notBelongStoreBrandTyreNumbers" :key="index">
 					<u-td class="u-td">{{item}}</u-td>
-					<u-td class="u-td">非门店经营品牌</u-td>
+					<u-td class="u-td">{{$t('scanningconfirm.stateA')}}</u-td>
 				</u-tr>
 				<u-tr class="u-tr" v-for="(item,index) in nonRegularTyreNumbers" :key="index">
 					<u-td class="u-td">{{item}}</u-td>
-					<u-td class="u-td">非正规胎号</u-td>
+					<u-td class="u-td">{{$t('scanningconfirm.stateB')}}</u-td>
 				</u-tr>
 				<u-tr class="u-tr" v-for="(item,index) in notScanInTyres" :key="index">
 					<u-td class="u-td">{{item}}</u-td>
-					<u-td class="u-td">未入库轮胎</u-td>
+					<u-td class="u-td">{{$t('scanningconfirm.notincluded')}}</u-td>
 				</u-tr>
 			</u-table>
 		</u-modal>
@@ -34,8 +34,8 @@
 			<view class="behind"></view>
 			<view class="content">
 				<view class="content-one">
-					<view>胎号</view>
-					<view>物料</view>
+					<view>{{$t('scanningconfirm.number_s')}}</view>
+					<view>{{$t('scanningconfirm.materiel')}}</view>
 				</view>
 				<view v-for="(item,index) in datalist" :key="index">
 					<view class="content-two">
@@ -47,7 +47,7 @@
 		</view>
 		<u-toast ref="repeat" position="bottom" />
 		<view class="tail" @click="location">
-			扫码确认
+			{{$t('scanningconfirm.confirm')}}
 		</view>
 	</view>
 </template>
@@ -135,7 +135,11 @@
 					
 					this.datalist = ''
 				}).catch(err => {
-					
+					uni.showToast({
+						icon: 'none',
+						title: this.$t('scanningconfirm.networkstate'),
+						position: "bottom"
+					})
 				}).finally(() => {
 					// Loading.close()
 				})

+ 12 - 14
pages/home/my-stock/my-stock.vue

@@ -3,7 +3,7 @@
 		<!-- 我的库存 -->
 		<view class="content-top">
 			<u-navbar :background="background" back-icon-color="#ffffff" is-fixed :border-bottom="false">
-				<u-search placeholder="请输入轮胎规格" v-model="keyword" style="margin-right: 26rpx;color: #FFFFFF !important;" @custom="handleSearch"></u-search>
+				<u-search :placeholder="$t('stock.tips')" v-model="keyword" :action-text="$t('unified.search')" style="margin-right: 26rpx;color: #FFFFFF !important;" @custom="handleSearch"></u-search>
 			</u-navbar>
 			<u-tabs ref="tabs" name="brandName" :list="brandlLst" bg-color="#0094FE" active-color="#ffffff" inactive-color="#ffffff"
 			 font-size="30" :current="current" @change="handleFilterBrand"></u-tabs>
@@ -11,8 +11,8 @@
 		<scroll-view scroll-y @scrolltolower="scrollBottom" class="scroll-view-container">
 			<view class="content-center">
 				<view class="list-row u-flex list-title">
-					<view class="list-left">轮胎规格</view>
-					<view class="list-right">库存</view>
+					<view class="list-left">{{$t('stock.specifications')}}</view>
+					<view class="list-right">{{$t('stock.stock')}}</view>
 				</view>
 				<template v-if="datalist&&datalist.length">
 					<view class="list-row u-flex u-skeleton" v-for="item in datalist" :key="item.matDescribe">
@@ -20,7 +20,7 @@
 						<view class="list-right u-skeleton-rect">{{item.stock}}</view>
 					</view>
 				</template>
-				<u-empty v-else text="暂无数据" mode="list"></u-empty>
+				<u-empty v-else :text="$t('unified.nodata')" mode="list"></u-empty>
 			</view>
 			<u-loadmore v-if="datalist&&datalist.length" :status="loadStatus" bgColor="#f2f2f2" :load-text="loadText"></u-loadmore>
 		</scroll-view>
@@ -43,7 +43,7 @@
 				keyword: "", //搜索规格
 				currentBrand: "", //选中的品牌
 				brandlLst: [{
-					brandName: "全部"
+					brandName: this.$t('stock.tabs_a')
 				}],
 				// 分页信息
 				first: 0,
@@ -52,9 +52,9 @@
 				totalPage: 0, //总页码数
 				loadStatus: "loadmore",
 				loadText: {
-					loadmore: '轻轻上拉',
-					loading: '努力加载中',
-					nomore: '没有更多啦'
+					loadmore: this.$t('stock.loadmore'),
+					loading: this.$t('stock.loading'),
+					nomore: this.$t('stock.nomore')
 				},
 				// 数据信息
 				datalist: []
@@ -62,7 +62,7 @@
 		},
 		onLoad() {
 			uni.showLoading({
-				title: "加载中"
+				title: this.$t('unified.Loading')
 			});
 			this.handleGetFilterData();
 			this.handleGetData();
@@ -73,7 +73,7 @@
 				if (this.loadStatus == "loadmore") {
 					this.loadStatus = 'loading';
 					uni.showLoading({
-						title: "加载中"
+						title: this.$t('unified.Loading')
 					});
 					// 模拟数据加载
 					this.first += 1;
@@ -114,7 +114,7 @@
 						// 获取品牌列表
 						_this.brandlLst = res.data.data;
 						_this.brandlLst.unshift({
-							brandName: "全部",
+							brandName: _this.$t('stock.tabs_a'),
 							brandCode: "all"
 						});
 					} else {
@@ -143,7 +143,7 @@
 			// 获取数据
 			handleGetData() {
 				uni.showLoading({
-					title: "加载中"
+					title: this.$t('unified.Loading')
 				});
 				var _this = this;
 				request({
@@ -228,9 +228,7 @@
 		margin: 0 auto 0 auto;
 		border-radius: 20rpx;
 		background-color: #FFFFFF;
-
 		padding: 26rpx;
-
 		.list-row {
 			justify-content: space-between;
 			border-bottom: 1px solid #E8E8E8;