Przeglądaj źródła

Merge branch 'test' of git.echepei.com:sailun/sailun-tbr-web into test

qukaidi 4 lat temu
rodzic
commit
0404b1a891

+ 1 - 0
pages/home/index.vue

@@ -68,6 +68,7 @@
 			};
 		},
 		onLoad() {
+			console.log("@@@")
 			uni.$on('login', (data) => {
 				this.loginStatus = data.msg
 			})

+ 6 - 9
pages/me/Reward-details/index.vue

@@ -8,10 +8,10 @@
 					<view class="content">
 						<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 @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-calendar style=" color: #fff;" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
 						<view @click="search">
-							<u-search placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @custom="handleSearch" :show-action="true" :animation="true"></u-search>
+							<u-search placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch" :show-action="false" :animation="true"></u-search>
 						</view>
 					</view>
 					<view v-if="count!=0">
@@ -19,8 +19,6 @@
 						<view class="content-one-view">
 						</view>
 						<view class="content-one-text">获得奖励:{{item.money}}元</view>
-			
-			
 						<view class="content-two">
 							<view class="">
 								轮胎型号
@@ -110,6 +108,9 @@
 		methods: {
 			// 获取奖励明细
 			data() {
+				uni.showLoading({
+					title: '加载中...'
+				});
 				request({
 						url: '/myPage/getPageScanRewordList',
 						method: 'post',
@@ -165,10 +166,7 @@
 						}
 					}).then(res => {
 						console.log(res)
-						// this.datalist = res.data.data
 						this.datalist = this.datalist.concat(res.data.data)
-						console.log(res.data.data)
-						console.log(this.datalist)
 						this.count = res.data.count
 						// 判断扫码类型
 						for (var i = 0; i < res.data.data.length; i++) {
@@ -201,7 +199,6 @@
 						}
 					}).then(res => {
 						this.brandList = JSON.parse(JSON.stringify(res.data.data))	
-						
 					}).catch(err => {
 						console.log(err)
 					})
@@ -216,11 +213,11 @@
 			// 搜索框
 			handleSearch(e) {
 				console.log(e)
+				this.datalist = []
 				this.data()
 			},
 			// 点击获取品牌
 			confirm(e) {
-				
 				console.log(e)
 				console.log(e[0].label)
 				this.label = e[0].label

+ 1 - 27
pages/me/Settlement-center/index.vue

@@ -84,34 +84,14 @@
 							'userId':this.$store.state.storeInfo.userId
 						}
 					}).then(res => {
-						console.log(res)
 						console.log(res.data)
 						this.datalist = res.data.data
 						this.Arry.length = this.datalist.length
+						// 每个新建数组长度为空,全选为false
 						for(var i=0;i<this.datalist.length;i++){
 							this.Arry[i] = []
 							this.checkboxList[i] = false
 						}
-						console.log(this.checkboxList)
-						console.log(res.data.data[0].storegentBrandList)
-						// 遍历
-						if (this.choice == 0) {
-							for (var l = 0; l < res.data.data.length; l++) {
-								this.storegentBrandList = res.data.data[l].storegentBrandList
-								for (var i = 0; i < res.data.data[l].storegentBrandList.length; i++) {
-									// this.checkboxList[i] = false
-								}
-							}
-						} else {
-							for (var l = 0; l < res.data.data.length; l++) {
-								this.storegentBrandList = res.data.data[l].storegentBrandList
-								for (var i = 0; i < res.data.data[l].storegentBrandList.length; i++) {
-									// this.checkboxList[i] = true
-								}
-							}
-						}
-
-
 					}).catch(err => {
 						console.log(err + "")
 					})
@@ -193,17 +173,11 @@
 			},
 			// 选中任一checkbox时,由checkbox-group触发
 			checkboxGroupChange(e) {
-				// console.log(e);
-				// console.log("###");
 			},
 			// 全选
 			checkedAll(index,e) {
-				console.log(e)
-				// this.isCheckedAll = !this.isCheckedAll
-				// this.Arry[index] = []
 				console.log(index,e)
 				let newArr=[]
-				// this.isCheckedAll = !this.isCheckedAll
 				if(this.Arry[index].length == e.storegentBrandList.filter((item)=>{
 					return item.usableMoney != 0
 				}).length ){

+ 95 - 61
pages/me/Statistical-task/index.vue

@@ -23,8 +23,10 @@
 						</view>
 					</view>
 					<view class="content-one">
-						<canvas :canvas-id="'mouthPie' + index" :id="'mouthPie' + index" class="charts" @touchstart="touchPie($event,'mouthPie' + index)"></canvas>
-						<canvas :canvas-id="'quarterPie' + index" :id="'quarterPie' + index" class="charts" @touchstart="touchPie($event,'quarterPie' + index)"></canvas>
+						<!--  -->
+						<canvas :canvas-id="'mouthPie' + index" :id="'mouthPie' + index" class="charts" @touchstart="touchPie($event,'mouthPie' + index)" ></canvas>
+						<!-- -->
+						<canvas :canvas-id="'quarterPie' + index" :id="'quarterPie' + index" class="charts"  @touchstart="touchPie($event,'quarterPie' + index)"></canvas>
 					</view>
 				</view>
 			</view>
@@ -43,7 +45,7 @@
 		isJSON
 	} from '@/common/checker.js';
 	var _self;
-	var canvaPie = null;
+	// var canvaPie = null;
 
 	export default {
 		data() {
@@ -81,14 +83,19 @@
 			}
 		},
 		onLoad() {
+			
 			_self = this;
 			_self.cWidth = uni.upx2px(370);
 			_self.cHeight = uni.upx2px(320);
 			// this.showPie('canvasRing')
 		},
 		created() {
+			
+		},
+		onShow() {
 			this.getDate()
 		},
+		
 		methods: {
 			getDate() {
 				request({
@@ -101,46 +108,11 @@
 						}
 					}).then(res => {
 						console.log(res)
-						console.log(this.$store.state.storeInfo.storeId)
 						this.orderList = res.data.data
+						this.getPieData()
 						
 						
-						for(var i=0;i<res.data.data.length;i++){
-							let  monthPie = {
-								series: []
-							};
-							let quarterPie = {
-								series: []
-							}
-							for(var j=0;j<res.data.data[i].storeMonthList.length;j++){
-								let monthObj = {
-									data:null,
-									name:'',
-									percent:''
-								}
-								let quarterObj = {
-									data:null,
-									name:'',
-									percent:'',
-								}
-								
-								monthObj.data = res.data.data[i].storeMonthList[j].data
-								monthObj.name = res.data.data[i].storeMonthList[j].name
-								monthObj.percent = res.data.data[i].storeMonthList[j].percent
-								quarterObj.data = res.data.data[i].storeQuarterList[j].data
-								quarterObj.name = res.data.data[i].storeQuarterList[j].name
-								quarterObj.percent = res.data.data[i].storeQuarterList[j].percent
-								
-								console.log('^^^^',monthObj)
-								console.log('9999999',quarterObj)
-								monthPie.series.push(monthObj)
-								quarterPie.series.push(quarterObj)
-							}
-							
-							console.log(`mouthPie${i}`,monthPie,quarterPie)
-							 this.showPie(`mouthPie${i}`,monthPie);
-							 this.showPie(`quarterPie${i}`,quarterPie)
-						}
+						// this.showPie('mouthPie0',monthPie);
 					}).catch(err => {
 						console.log(err)
 					})
@@ -151,8 +123,66 @@
 						}, 300)
 					})
 			},
-			showPie(canvasId, chartData,percent) {
-				console.log('8888888',canvasId,chartData,percent)
+			getPieData(){
+				console.log('5555')
+				for(var i=0;i<this.orderList.length;i++){
+					var  monthPie = {
+						series: []
+					};
+					var quarterPie = {
+						series: []
+					}
+					for(var j=0;j<this.orderList[i].storeMonthList.length;j++){
+						let monthObj = {
+							data:null,
+							name:'',
+							percent:'',
+							format:(val)=>{
+									console.log(val)
+									// return val.toFixed(0) + ''
+									return val * 100 + '%'
+									}
+							
+						}
+						let quarterObj = {
+							data:null,
+							name:'',
+							percent:'',
+							format:(val)=>{
+									console.log(val)
+									// return val.toFixed(0) + ''
+									
+									return val * 100 + '%'
+									}
+						}
+						
+						
+						monthObj.data = this.orderList[i].storeMonthList[j].data
+						monthObj.name = this.orderList[i].storeMonthList[j].name
+						monthObj.percent = this.orderList[i].storeMonthList[j].percent
+						
+						quarterObj.data = this.orderList[i].storeQuarterList[j].data
+						quarterObj.name = this.orderList[i].storeQuarterList[j].name
+						quarterObj.percent = this.orderList[i].storeQuarterList[j].percent
+						
+						// console.log('^^^^',monthObj)
+						// console.log('9999999',quarterObj)
+						monthPie.series.push(monthObj)
+						quarterPie.series.push(quarterObj)
+						// console.log(quarterPie.series[0].format)
+					}
+					
+					// console.log(`mouthPie${i}`,monthPie,quarterPie)
+					
+					 this.showPie(`mouthPie${i}`,monthPie);
+					 this.showPie(`quarterPie${i}`,quarterPie)
+					// this[`${this.refVal}`]
+				}
+				// this.showPie('mouthPie0',monthPie);
+			},
+			showPie(canvasId, chartData) {
+				console.log('88888')
+				console.log(canvasId,chartData)
 				canvasObj[canvasId]=new uCharts({
 					$this: _self,
 					canvasId: canvasId,
@@ -164,9 +194,9 @@
 						position: 'bottom',
 						float: 'center',
 						itemGap: 10,
-						padding: 2,
+						padding: 0,
 						lineHeight: 26,
-						margin: 1,
+						margin: 6,
 						//backgroundColor:'rgba(41,198,90,0.2)',
 						//borderColor :'rgba(41,198,90,0.5)',
 						borderWidth: 1
@@ -191,9 +221,9 @@
 					},
 					extra: {
 						pie: {
-							offsetAngle: 0,
-							ringWidth: 15 * _self.pixelRatio,
-							labelWidth: 1
+							ringWidth: 12 * _self.pixelRatio,
+							labelWidth: 0.1,
+							offsetAngle:0
 						}
 					},
 				});
@@ -210,7 +240,11 @@
 			// 	});
 			// },
 			touchPie(e,id){
-				console.log(e)
+				console.log(e,id)
+				
+				// canvaPie.touchLegend(e, {
+				// 	animation: false
+				// });
 				canvasObj[id].showToolTip(e, {
 						format: function (item) {
 								return item.name + ':' + item.data 
@@ -232,9 +266,9 @@
 		height: 331rpx;
 		background: url(../../../static/sailun/background.png) no-repeat;
 		background-size: 750rpx 331rpx;
-
+	
 	}
-
+	
 	.qiun-charts-one {
 		width: 6rpx;
 		height: 30rpx;
@@ -243,7 +277,7 @@
 		top: 20rpx;
 		left: 30rpx;
 	}
-
+	
 	.qiun-charts-two {
 		position: relative;
 		top: -18rpx;
@@ -251,7 +285,7 @@
 		font-size: 26rpx;
 		font-weight: bold;
 	}
-
+	
 	.content {
 		width: 702rpx;
 		height: 410rpx;
@@ -261,23 +295,23 @@
 		margin: 0 auto;
 		position: relative;
 		top: 20rpx;
-
+	
 		margin-bottom: 40rpx;
-
+	
 	}
-
+	
 	.content-one {
 		display: flex;
 		justify-content: space-between;
 	}
-
+	
 	.charts {
 		width: 380rpx;
 		height: 450rpx;
 		position: relative;
 		top: -20rpx;
 	}
-
+	
 	.qiun-charts-three>view:nth-child(1) {
 		width: 24rpx;
 		height: 24rpx;
@@ -287,7 +321,7 @@
 		top: 20rpx;
 		left: 30rpx;
 	}
-
+	
 	.qiun-charts-three>view:nth-child(2) {
 		width: 180rpx;
 		height: 22rpx;
@@ -301,12 +335,12 @@
 		left: 40rpx;
 		border-top-right-radius: 12rpx;
 	}
-
+	
 	.qiun-charts-four {
 		position: relative;
 		right: 200rpx;
 	}
-
+	
 	.qiun-charts-four>view:nth-child(1) {
 		width: 24rpx;
 		height: 24rpx;
@@ -316,7 +350,7 @@
 		top: 20rpx;
 		left: 30rpx;
 	}
-
+	
 	.qiun-charts-four>view:nth-child(2) {
 		width: 150rpx;
 		height: 22rpx;

+ 35 - 15
pages/me/Write-off-management/index.vue

@@ -9,6 +9,9 @@
 					<view class="order-one">
 					</view>
 					<text class="order-one-text">核销金额:¥{{res.amount}}</text>
+					<view class="order-one-view">
+						{{b2bStatus}}
+					</view>
 					<view class="order-one-xian">
 					</view>
 					<view class="order-two">
@@ -21,10 +24,18 @@
 					</view>
 					<view class="order-two">
 						<view class="">
-							核审时间
+							审核时间
+						</view>
+						<view class="">
+							{{res.agentAuditTime}}
+						</view>
+					</view>
+					<view class="order-two">
+						<view class="">
+							{{res.brandName}}轮胎
 						</view>
 						<view class="">
-							{{res.b2bAuditTime}}
+							¥{{res.amount}}
 						</view>
 					</view>
 					<view class="order-two">
@@ -101,15 +112,13 @@
 						// 页数
 						this.pages = res.data.data.pages
 						for (let i = 0; i < res.data.data.records.length; i++) {
-							console.log(res.data.data.records[i].b2bStatus)
-							if (res.data.data.records[i].b2bStatus == 0) {
+							console.log(res.data.data.records[i].status)
+							if (res.data.data.records[i].status == 0) {
 								this.b2bStatus = "待审核"
-							} else if (res.data.data.records[i].b2bStatus == 1) {
-								this.b2bStatus = "审核未通过"
-							} else if (res.data.data.records[i].b2bStatus == 2) {
-								this.b2bStatus = "审核通过"
+							} else if (res.data.data.records[i].status == 2) {
+								this.b2bStatus = "已审核"
 							} else {
-								this.b2bStatus = "已过期"
+								this.b2bStatus = "已失效"
 							}
 						}
 
@@ -158,14 +167,12 @@
 						// this.orderList = this.orderList.concat(res.data.data.records)
 						for (let i = 0; i < res.data.data.records.length; i++) {
 							console.log(res.data.data.records[i].b2bStatus)
-							if (res.data.data.records[i].b2bStatus == 0) {
+							if (res.data.data.records[i].status == 0) {
 								this.b2bStatus = "待审核"
-							} else if (res.data.data.records[i].b2bStatus == 1) {
-								this.b2bStatus = "审核未通过"
-							} else if (res.data.data.records[i].b2bStatus == 2) {
-								this.b2bStatus = "审核通过"
+							} else if (res.data.data.records[i].status == 2) {
+								this.b2bStatus = "已审核"
 							} else {
-								this.b2bStatus = "已过期"
+								this.b2bStatus = "已失效"
 							}
 						}
 					}).catch(err => {
@@ -213,6 +220,19 @@
 		width: 100%;
 		// padding-left:30rpx;
 	}
+	.order-one-view{
+		width: 120rpx;
+		line-height: 40rpx;
+		background-color: #0094FE;
+		position: relative;
+		left: 575rpx;
+		top: -35rpx;
+		border-top-left-radius:50rpx;
+		border-bottom-left-radius:50rpx;
+		font-size: 12rpx;
+		color: #fff;
+		text-align: center;
+	}
 
 	// 插件代码
 	.order {

+ 2 - 2
pages/msg/System-message/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 系统消息页面 -->
 	<view class="header">
-		<view class="content" v-for="(item,index) in orderList" @click="inDetails" :key="index">
+		<view class="content" v-for="(item,index) in orderList" :key="index">
 			<view class="content-one">
 				<text class="content-one-first">{{item.msgTitle}}</text>
 				<text class="content-one-second">{{item.data}}</text>
@@ -13,7 +13,7 @@
 			<text class="content-three">
 				{{msgContent.replace(/<[^>]+>/g,"")}}
 			</text>
-			<view class="content-five" v-if="item.sendUserId==17||item.sendUserId==19">
+			<view class="content-five" @click="inDetails" v-if="item.sendUserId==17||item.sendUserId==19">
 				<text class="content-five-first">查看订单详情</text>
 				<text class="content-five-second">
 					<u-icon name="arrow-right"></u-icon>