|
@@ -4,7 +4,7 @@
|
|
|
<view class="sTopBox">
|
|
|
<view class="searchInputBox" >
|
|
|
<image src="../../static/img/icon_search.png" mode="" class="simg"></image>
|
|
|
- <input v-model="value" type="text" placeholder="请输入商品"
|
|
|
+ <input v-model="name" type="text" placeholder="请输入商品"
|
|
|
placeholder-class="ip" class="ssinput" @confirm="searchFn" focus>
|
|
|
<image src="../../static/img/icon_search_del.png" mode="" class="search_del" @click="searchDel"></image>
|
|
|
</view>
|
|
@@ -22,17 +22,18 @@
|
|
|
<view class="glName">{{item.name}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="jiyouBox" v-if="loading">
|
|
|
+ <view class="jiyouBox">
|
|
|
|
|
|
<view class="jylineBox">
|
|
|
- <view class="jyline" v-for="(item,index) in 5" @click="godetail(item)"><!-- MaintainPartList -->
|
|
|
+ <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)"><!-- MaintainPartList -->
|
|
|
<view class="jyimgBox">
|
|
|
- <!-- <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image> -->
|
|
|
- <image src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
|
|
|
+ <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
|
|
|
+ <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
|
|
|
</view>
|
|
|
<view class="lineRgiht">
|
|
|
- <view class="goodsName">品牌 规格型号</view>
|
|
|
- <view class="goodsMs">长了就换行显示,不要省略,长了就换行显示,不要省略,长了就换行显示,不要省略</view>
|
|
|
+ <view class="goodsName">{{item.name}} {{item.factoryNumber}}</view>
|
|
|
+ <view class="goodsMs">{{item.specificationModel}}</view>
|
|
|
+ <view class="goodsMs">{{item.modelRemark}}</view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -70,10 +71,12 @@
|
|
|
componentCode:'',
|
|
|
leftData:[
|
|
|
{name:'全部',componentCode:''},
|
|
|
- {name:'点火线圈',componentCode:'003001'},
|
|
|
- {name:'火花塞',componentCode:'003003'},
|
|
|
+ {name:'点火线圈',componentCode:'001006003'},
|
|
|
+ {name:'火花塞',componentCode:'001006001'},
|
|
|
],
|
|
|
leftIndex:0,
|
|
|
+ pageIndex:1,
|
|
|
+ name:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -81,9 +84,17 @@
|
|
|
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
|
this.optdata=opt;
|
|
|
this.queryMaintainPartList()
|
|
|
- this.queryOilInfoByGroupID()
|
|
|
+ // this.queryOilInfoByGroupID()
|
|
|
},
|
|
|
methods: {
|
|
|
+ leftFn(index,item){
|
|
|
+ this.pageIndex=1
|
|
|
+ this.MaintainPartList=[]
|
|
|
+ this.leftIndex=index
|
|
|
+ this.componentCode=item.componentCode
|
|
|
+ // this.componentName=item.name
|
|
|
+ this.queryMaintainPartList()
|
|
|
+ },
|
|
|
goinstallation(){
|
|
|
uni.navigateTo({
|
|
|
url:'installation?groupIds='+this.optdata.id+'&componentId='
|
|
@@ -126,18 +137,27 @@
|
|
|
//this.MaintainPartList= this.oldMaintainPartList.filter(item => item.modelRemark.includes(name))
|
|
|
}
|
|
|
},
|
|
|
+ searchFn(){
|
|
|
+ this.pageIndex=1
|
|
|
+ this.MaintainPartList=[]
|
|
|
+ this.queryMaintainPartList()
|
|
|
+ },
|
|
|
queryMaintainPartList(){
|
|
|
this.loading=false;
|
|
|
uni.showLoading({ title: '加载中'});
|
|
|
- this.$http('partsByOpen/queryMaintainPartList', {
|
|
|
- groupId:this.optdata.id,
|
|
|
- componentCode:'015001',
|
|
|
+ this.$http('partsByOpen/queryPartsListV2', {
|
|
|
+ //groupId:this.optdata.id,
|
|
|
+ pageSize:20,
|
|
|
+ pageIndex:this.pageIndex,
|
|
|
+ categoryCodes:this.componentCode,
|
|
|
+ name:this.name
|
|
|
|
|
|
},'POST').then(res => {
|
|
|
this.loading=true;
|
|
|
uni.hideLoading();
|
|
|
- this.MaintainPartList=res.data
|
|
|
- this.oldMaintainPartList=res.data
|
|
|
+ //this.MaintainPartList=res.data
|
|
|
+ this.MaintainPartList=this.MaintainPartList.concat(res.data)
|
|
|
+ // this.oldMaintainPartList=res.data
|
|
|
// this.modelRemarkTab(1)
|
|
|
})
|
|
|
},
|
|
@@ -174,7 +194,12 @@
|
|
|
url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 上拉加载更多
|
|
|
+ onReachBottom() {
|
|
|
+ this.pageIndex++;
|
|
|
+ this.queryMaintainPartList()
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -424,7 +449,7 @@ color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
|
|
|
width: 36rpx;height: 34rpx;margin-top: 23rpx;margin-left:30rpx;
|
|
|
}
|
|
|
.goosLeft{
|
|
|
- width: 190rpx;
|
|
|
+ width: 170rpx;
|
|
|
font-size: 26rpx;
|
|
|
color: #3C3C3C;
|
|
|
background: #F6F6F6;
|
|
@@ -435,7 +460,7 @@ color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
|
|
|
}
|
|
|
.goodsLefeLine{
|
|
|
display: flex;justify-content: center;
|
|
|
- padding: 22rpx 0;
|
|
|
+ padding: 22rpx 10rpx;
|
|
|
}
|
|
|
.glActive{
|
|
|
background: #ffffff;
|