|
@@ -29,8 +29,9 @@
|
|
|
</view>
|
|
|
<!-- <u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
|
|
|
:is-scroll="false" :current="current" @change="change"></u-tabs> -->
|
|
|
- <u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand"
|
|
|
- value-name="brandId" label-name="brandName" :list="brandList"></u-select>
|
|
|
+ <!-- <u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand"
|
|
|
+ value-name="brandId" label-name="brandName" :list="brandList"></u-select> -->
|
|
|
+ <u-action-sheet :list="list_a" @click="click" @close="close" v-model="showBrand"></u-action-sheet>
|
|
|
<u-calendar style=" color: #fff;" @click="calendar" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
|
|
|
<view>
|
|
|
<u-search style="width: 320rpx;" placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch"
|
|
@@ -108,6 +109,7 @@
|
|
|
}, {
|
|
|
name: '时间',
|
|
|
}],
|
|
|
+ list_a: [],
|
|
|
brandList: JSON.parse(JSON.stringify([])),
|
|
|
current: 0,
|
|
|
// 默认页数
|
|
@@ -250,7 +252,7 @@
|
|
|
// 获取品牌列表
|
|
|
getBrandList() {
|
|
|
request({
|
|
|
- url: '/baseReq/getBrandList',
|
|
|
+ url: '/baseReq/getBrandListByStoreId',
|
|
|
method: 'post',
|
|
|
data: {
|
|
|
storeId: this.$store.state.storeInfo.storeId,
|
|
@@ -258,6 +260,15 @@
|
|
|
}
|
|
|
}).then(res => {
|
|
|
this.brandList = JSON.parse(JSON.stringify(res.data.data))
|
|
|
+ for (var i = 0; i < this.brandList.length; i++) {
|
|
|
+ this.list_a.push({
|
|
|
+ brandCode: this.brandList[i].brandCode,
|
|
|
+ text: this.brandList[i].brandName,
|
|
|
+ color: '#000',
|
|
|
+ fontSize: 28
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(this.list_a)
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
})
|
|
@@ -272,15 +283,14 @@
|
|
|
// 搜索框
|
|
|
handleSearch(e) {
|
|
|
console.log(e)
|
|
|
-
|
|
|
this.data()
|
|
|
this.datalist = []
|
|
|
},
|
|
|
// 点击获取品牌
|
|
|
- confirm(e) {
|
|
|
+ click(e) {
|
|
|
console.log(e)
|
|
|
- console.log(e[0].label)
|
|
|
- this.label = e[0].label
|
|
|
+ console.log(this.list_a[e].text)
|
|
|
+ this.label = this.list_a[e].text
|
|
|
uni.showLoading({
|
|
|
title: '加载中...'
|
|
|
});
|
|
@@ -322,9 +332,9 @@
|
|
|
// 点击取消按钮
|
|
|
|
|
|
|
|
|
- clear() {
|
|
|
- this.current = 0
|
|
|
- console.log("@@")
|
|
|
+ close() {
|
|
|
+ console.log("@@@")
|
|
|
+ this.whole()
|
|
|
},
|
|
|
change(index) {
|
|
|
this.current = index;
|
|
@@ -341,21 +351,16 @@
|
|
|
}
|
|
|
},
|
|
|
onReachBottom() {
|
|
|
- console.log("@@@")
|
|
|
- console.log(this.count)
|
|
|
- console.log(this.datalength)
|
|
|
- console.log(this.current1)
|
|
|
this.status = 'loading';
|
|
|
setTimeout(() => {
|
|
|
- if (this.datalist.length >= this.count) {
|
|
|
- this.status = 'nomore';
|
|
|
- } else {
|
|
|
- this.current1 = ++this.current1;
|
|
|
- this.data()
|
|
|
-
|
|
|
- }
|
|
|
- }, 1000)
|
|
|
-
|
|
|
+ if (this.datalist.length >= this.count) {
|
|
|
+ this.status = 'nomore';
|
|
|
+ } else {
|
|
|
+ this.current1 = ++this.current1;
|
|
|
+ this.data()
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|