|
@@ -8,7 +8,7 @@
|
|
|
<text>筛选</text> <u-icon name="arrow-down"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
|
|
|
+ <scroll-view class="product-list" scroll-y>
|
|
|
<view class="st-detailList-main">
|
|
|
<view class="st-detailList-main-item" v-for="(item, index) in listData" :key="item.id" @click="toViewDetail(item)">
|
|
|
<view class="st-detailList-item-con flex align_center">
|
|
@@ -60,51 +60,58 @@
|
|
|
<view>VIN详情</view>
|
|
|
<view class="st-detailList-item-con flex">
|
|
|
<view class="pimgs">
|
|
|
- <u-image :src="tempData.productMainPic&&tempData.productMainPic.imageUrl?tempData.productMainPic.imageUrl:`../../static/${theme}/def_img@2x.png`" width="100" height="100" border-radius="10"></u-image>
|
|
|
+ <u-image :src="tempData.icon?tempData.icon:`../../static/${tempData.icon}/def_img@2x.png`" width="100" height="100" border-radius="10"></u-image>
|
|
|
</view>
|
|
|
<view class="flex_1 pimgs_right">
|
|
|
- <view class="padding_3">{{tempData.name || '--'}} </view>
|
|
|
+ <view class="padding_3">{{tempData.modelInfo || '--'}} </view>
|
|
|
<view class="font_13">
|
|
|
- VIN:LJJLDS234DD323453
|
|
|
+ VIN:{{tempData.vinCode}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</div>
|
|
|
<div class="cpb_body flex justify_between">
|
|
|
<div class="cpb_tab">
|
|
|
- <div class="active">空调滤清器</div>
|
|
|
- <div>空气滤清器</div>
|
|
|
- <div>机油滤清器</div>
|
|
|
+ <div :class="selFlag==0?'active':''" @click="changeSel(0)">空调滤清器</div>
|
|
|
+ <div :class="selFlag==1?'active':''" @click="changeSel(1)">空气滤清器</div>
|
|
|
+ <div :class="selFlag==2?'active':''" @click="changeSel(2)">机油滤清器</div>
|
|
|
</div>
|
|
|
- <div class="cpb_cart-list">
|
|
|
+ <div class="cpb_cart-list" v-if="productList.length>0">
|
|
|
<div
|
|
|
v-for="(item, index) in productList"
|
|
|
- :key="item.id"
|
|
|
+ :key="index"
|
|
|
>
|
|
|
<view class="nav-right-item flex">
|
|
|
<view class="uni-col-2">
|
|
|
- <u-image :src="item.product&&item.product.images?item.product.images:`../../static/${$config('themePath')}/def_img@2x.png`" width="100" height="100" border-radius="30"></u-image>
|
|
|
+ <u-image :src="item.icon?item.icon:`../../static/${item.icon}/def_img@2x.png`" width="100" height="100" border-radius="30"></u-image>
|
|
|
</view>
|
|
|
<view class="item-info uni-col-10">
|
|
|
<view class="item-name">
|
|
|
- {{item.product.productName}}
|
|
|
+ {{item.productName}}
|
|
|
</view>
|
|
|
<view class="item-detail">
|
|
|
<view class="item-detail-info align_center flex justify_between">
|
|
|
<view>
|
|
|
{{item.productCode}}
|
|
|
</view>
|
|
|
- <view class="flex justify_end">
|
|
|
+ <!-- 判断是否铺货 -->
|
|
|
+ <view class="flex justify_end" v-if="item.isShelfProduct">
|
|
|
<text class="item-detail-text">
|
|
|
- 库存:{{item.stockQty?item.stockQty:0}} {{item.product&&item.product.unit}}
|
|
|
+ 库存:{{item.currQty?item.currQty:0}}
|
|
|
</text>
|
|
|
</view>
|
|
|
+ <view class="flex justify_end isShelf" v-else>
|
|
|
+ 暂未铺货
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <view class="cpb_cart-list" v-else>
|
|
|
+ <u-empty text="数据为空" mode="data"></u-empty>
|
|
|
+ </view>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -139,7 +146,8 @@
|
|
|
detail: null,
|
|
|
tempData: null,
|
|
|
productList: [],
|
|
|
- shelfSn:''//货架名称
|
|
|
+ shelfSn:'',//货架名称,
|
|
|
+ selFlag:0
|
|
|
}
|
|
|
},
|
|
|
onNavigationBarButtonTap(e){
|
|
@@ -172,10 +180,6 @@
|
|
|
}
|
|
|
this.getList(ajaxData);
|
|
|
this.theme = getApp().globalData.theme
|
|
|
- // uni.setNavigationBarTitle({
|
|
|
- // title: this.detail.shelfName
|
|
|
- // })
|
|
|
- // this.getList()
|
|
|
},
|
|
|
methods:{
|
|
|
toPage(url){
|
|
@@ -183,18 +187,20 @@
|
|
|
url:url
|
|
|
})
|
|
|
},
|
|
|
- // 刷新列表
|
|
|
+ // 搜索查询新列表
|
|
|
refreshList(val){
|
|
|
- debugger
|
|
|
this.params =val ? val : {},
|
|
|
this.listData = []
|
|
|
this.totalNum = 0
|
|
|
+ delete val.date;
|
|
|
let ajaxData={
|
|
|
shelf_sn:this.shelfSn,
|
|
|
pageNo:1,
|
|
|
pageSize: this.pageSize
|
|
|
}
|
|
|
-
|
|
|
+ if(val){
|
|
|
+ Object.assign(ajaxData,val);
|
|
|
+ }
|
|
|
this.getList(ajaxData);
|
|
|
},
|
|
|
// 列表
|
|
@@ -217,16 +223,30 @@
|
|
|
this.status = "loadmore"
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- // 查看销售记录
|
|
|
+ changeSel(num){
|
|
|
+ this.selFlag=num;
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.toViewDetail(this.tempData);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看详情
|
|
|
toViewDetail(row){
|
|
|
this.tempData = row
|
|
|
- this.showCart = true
|
|
|
+ queryDetail({id:row.id}).then(res => {
|
|
|
+ this.showCart = true
|
|
|
+ if(this.selFlag == 0){
|
|
|
+ this.productList=res.data.airConditionerFilter
|
|
|
+ }else if(this.selFlag == 1){
|
|
|
+ this.productList=res.data.airFilterFlag
|
|
|
+ }else{
|
|
|
+ this.productList=res.data.engineOilFilterFlag
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
- // scroll-view到底部加载更多
|
|
|
+ //到底部加载更多
|
|
|
onReachBottom() {
|
|
|
-
|
|
|
if(this.listData.length < this.totalNum){
|
|
|
this.pageNo += 1
|
|
|
let ajaxData={
|
|
@@ -375,7 +395,6 @@
|
|
|
margin-right: 16upx;
|
|
|
}
|
|
|
.pimgs_right{
|
|
|
- background-color: red;
|
|
|
width:calc(100% - 66upx);
|
|
|
}
|
|
|
.font_13{
|
|
@@ -441,6 +460,9 @@
|
|
|
color: #999;
|
|
|
margin-left: 20upx;
|
|
|
}
|
|
|
+ .isShelf{
|
|
|
+ color:coral;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|