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