浏览代码

明细优化

tong 4 年之前
父节点
当前提交
bac14155ba

+ 1 - 1
pages/me/Delivery-details/index.vue

@@ -216,7 +216,7 @@
 				this.show = true
 				if (this.list_a.length == 0) {
 					request({
-						url: '/baseReq/getBrandList',
+						url: '/baseReq/getBrandListByStoreId',
 						method: 'Post',
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,

+ 28 - 23
pages/me/Reward-details/index.vue

@@ -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)
+
 
 		}
 	}

+ 12 - 10
pages/me/Settlement-center/index.vue

@@ -40,7 +40,9 @@
 </template>
 
 <script>
-	import {mapMutations} from 'vuex'
+	import {
+		mapMutations
+	} from 'vuex'
 	import {
 		request
 	} from '../../../common/request/request'
@@ -101,14 +103,14 @@
 								this.checkboxList[i] = false
 							}
 							this.inStore()
-						}else {
-						console.log(res)
-						uni.showToast({
-							title: res.data.msg,
-							icon: "none",
-							duration: _this.$store.state.showToastDuration
-						});
-					}
+						} else {
+							console.log(res)
+							uni.showToast({
+								title: res.data.msg,
+								icon: "none",
+								duration: _this.$store.state.showToastDuration
+							});
+						}
 
 					}).catch(err => {
 						console.log(err + "")
@@ -178,7 +180,7 @@
 
 						} else {
 							uni.showToast({
-								title: '核销返利失败!',
+								title: '请选择要核销返利!',
 								icon: 'none',
 								duration: 2000
 							});

+ 1 - 1
pages/me/Warehousing-details/index.vue

@@ -217,7 +217,7 @@
 				this.show = true
 				if (this.list_a.length == 0) {
 					request({
-						url: '/baseReq/getBrandList',
+						url: '/baseReq/getBrandListByStoreId',
 						method: 'Post',
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,