xhj 3 anni fa
parent
commit
ba92f55526

+ 3 - 0
machineAndCell/machineInfo/machineInfo.css

@@ -62,6 +62,9 @@
 	text-align: center;
 	color: #A8A5A5;
 }
+.cell-item .error-sta{
+	margin-top: 20rpx;
+}
 
 /* 按钮 */
 .bottom-btns{

+ 4 - 3
machineAndCell/machineInfo/machineInfo.vue

@@ -4,10 +4,11 @@
 			<view class="cell-item" v-for="item,index in groupList">
 				<view class="cell-item-num">{{item.doorId?item.doorId:0}}</view>
 				<block v-if="item.boxEnable==0">
+					<view :style="(item.boxStatus==5||item.boxStatus==6)?'margin-top: 30rpx;':'margin-top: 70rpx;'"></view>
 					<view class="error-sta" v-if="item.boxStatus==5">
 						异常
 					</view>
-					<view v-else-if="item.boxStatus==6">
+					<view class="error-sta" v-else-if="item.boxStatus==6">
 						电池通讯故障
 					</view>
 					<view class="error-sta">
@@ -15,10 +16,10 @@
 					</view>
 				</block>
 				<block v-else>
-					<view class="error-sta" v-if="item.boxStatus==5">
+					<view class="error-sta" v-if="item.boxStatus==5" style="margin-top: 70rpx;">
 						异常
 					</view>
-					<view class="error-sta" v-else-if="item.boxStatus==6">
+					<view class="error-sta" v-else-if="item.boxStatus==6" style="margin-top: 70rpx;">
 						电池通讯故障
 					</view>
 					<block v-else>

+ 2 - 0
pages/index/index.vue

@@ -597,6 +597,8 @@
 			init() {
 				this.$refs.chart.init(echarts, async chart => {
 					// let echartData = await this.getEchartData()
+					this.option.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
+					this.option.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
 					this.option.legend.itemHeight = 10 * this.rpxTopxScale
 					this.option.legend.itemWidth = 40 * this.rpxTopxScale
 					this.option.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})

+ 6 - 4
pages/operationData/operationData.vue

@@ -516,6 +516,8 @@
 			init() {
 				this.$refs.chart.init(echarts, async chart => {
 					// let echartData = await this.getEchartData()
+					this.option.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
+					this.option.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
 					this.option.legend.itemHeight = 10 * this.rpxTopxScale
 					this.option.legend.itemWidth = 40 * this.rpxTopxScale
 					this.option.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
@@ -527,10 +529,10 @@
 				if (this.$refs.chart2) {
 					this.$refs.chart2.init(echarts, async chart => {
 						// let echartData = await this.getEchartData()
-						this.option2.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
+						this.option2.xAxis[0].data = this.barEchartData.turnoverList.map(item=>{return item.showTime})
 						this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
 						this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
-						this.option2.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
+						this.option2.series[0].data = this.barEchartData.turnoverList.map(item=>{return item.orderCount})
 						this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
 						chart.setOption(this.option2);
 					});
@@ -538,10 +540,10 @@
 				if (this.$refs.chart3) {
 					this.$refs.chart3.init(echarts, async chart => {
 						// let echartData = await this.getEchartData()
-						this.option3.xAxis[0].data = this.echartData.profitList.map(item=>{return item.showTime})
+						this.option3.xAxis[0].data = this.barEchartData.profitList.map(item=>{return item.showTime})
 						this.option3.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
 						this.option3.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
-						this.option3.series[0].data = this.echartData.profitList.map(item=>{return item.profit})
+						this.option3.series[0].data = this.barEchartData.profitList.map(item=>{return item.profit})
 						this.option3.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
 						chart.setOption(this.option3);
 					});

+ 21 - 5
pages/operationDataPersonal/operationDataPersonal.vue

@@ -27,11 +27,11 @@
 					<view class="sssb-data sssb-color">{{useProfit?useProfit:0}}</view>
 				</view>
 			</view>
-			<view style="margin-top: 30rpx;height:500rpx">
+			<view style="margin-top: 30rpx;height:500rpx" v-if="showEchart">
 				<view class="echart-title">近一周营业额度(元)图表数据</view>
 				<l-echart ref="chart2" @finished="init"></l-echart>
 			</view>
-			<view style="margin-top: 30rpx;height:500rpx">
+			<view style="margin-top: 30rpx;height:500rpx" v-if="showEchart">
 				<view class="echart-title">近一周收益额度(元)</view>
 				<l-echart ref="chart3" @finished="init"></l-echart>
 			</view>
@@ -57,6 +57,7 @@
 				pxToRpxScale: 0,
 				rpxTopxScale: 0,
 				
+				showEchart:false,
 				merchantId:null,
 				storeId:null,
 				
@@ -188,7 +189,10 @@
 								show: true,
 								position: 'top',
 								color: '#FF770F',
-								formatter: '¥{c}',
+								formatter: (res)=>{
+									if(res.value>0) return '¥'+res.value
+									else return ''
+								},
 							},
 						},
 						data: [285, 200, 285, 300, 285, 285, 320],
@@ -233,10 +237,10 @@
 				if (this.$refs.chart2) {
 					this.$refs.chart2.init(echarts, async chart => {
 						// let echartData = await this.getEchartData()
-						this.option2.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
+						this.option2.xAxis[0].data = this.echartData.turnoverList.map(item=>{return item.showTime})
 						this.option2.yAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
 						this.option2.xAxis[0].axisLabel.fontSize = 13 * this.rpxTopxScale
-						this.option2.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
+						this.option2.series[0].data = this.echartData.turnoverList.map(item=>{return item.orderCount})
 						this.option2.series[0].label.normal.fontSize = 13 * this.rpxTopxScale
 						chart.setOption(this.option2);
 					});
@@ -255,6 +259,7 @@
 			},
 			async getStatisticData(){
 				await this.getBarEchartData()
+				this.showEchart = true
 				this.init()
 			},
 			getBarEchartData() {
@@ -274,6 +279,17 @@
 			},
 		},
 		mounted() {
+			const systemInfo = uni.getSystemInfoSync();
+			// px转换到rpx的比例
+			let pxToRpxScale = 750 / systemInfo.windowWidth;
+			this.pxToRpxScale = pxToRpxScale
+			this.rpxTopxScale = systemInfo.windowWidth / 750
+			let systems = {
+				ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
+				navigationHeight: 44 * pxToRpxScale // 导航栏的高度
+			};
+			systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
+			this.systems = systems;
 		},
 		onPageScroll: function(e) {
 		}

+ 1 - 1
pages/user/user.vue

@@ -7,7 +7,7 @@
 				<image :src="userInfos.avatar ? userInfos.avatar : '/static/images/userimg.png'" mode="aspectFit"
 					class="user" ></image>
 				<view class="mines"  v-if="isLogin">
-					<view class="ddflex">{{userInfos.nickName}}
+					<view class="ddflex">{{userInfos.nickName?userInfos.nickName:userInfos.username?userInfos.username:''}}
 					</view>
 					<text class="edu" v-if="userInfos.mobile">{{userInfos.mobile}}</text>
 				</view>

+ 8 - 1
warning/machineAlarm/machineAlarm.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view style="overflow: hidden;">
 		<!-- @click="openPop(item) -->
 		<view class="order-item" v-for="item,index in groupList">
 			<view class="ddflex order-item-header">
@@ -28,6 +28,12 @@
 				</view>
 			</view>
 		</view>
+		<view v-if="groupList.length==0">
+			<view class="nodata">
+				<image :src="picUrlss+'empty.png'"></image>
+				<text>暂无告警~</text>
+			</view>
+		</view>
 		
 		<bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒"
 			@closePop="closePop()" @popSubmit="popSubmit()">
@@ -57,6 +63,7 @@
 		props: {},
 		data() {
 			return {
+				picUrlss: req.public.picUrls,
 				showPop: false,
 				tempData: null,
 				

+ 75 - 33
warning/orderAlarm/orderAlarm.vue

@@ -1,13 +1,13 @@
 <template>
-	<view>
+	<view style="overflow: hidden;">
 		<!-- tab -->
 		<view class="tab-box ddflex">
 			<view class="fflex ddflex">
-				<view :class="'tab-item fflex '+(queryType==''?'tab-item-active':'')" @click="queryTypeChange(0)">
+				<view :class="'tab-item fflex '+(queryType==2?'tab-item-active':'')" @click="queryTypeChange(2)">
 					<view>待处理</view>
 					<image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
 				</view>
-				<view :class="'tab-item fflex '+(queryType==1?'tab-item-active':'')" @click="queryTypeChange(1)">
+				<view :class="'tab-item fflex '+(queryType==3?'tab-item-active':'')" @click="queryTypeChange(3)">
 					<view>已处理</view>
 					<image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
 				</view>
@@ -52,21 +52,34 @@
 				<view v-if="item.isException!==0" class="order-btns ddflex">
 					<view class="order-btn-time">2022-12-31 17:16:37</view>
 					<view style="justify-content: flex-end;" class="ddflex">
-						<view class="order-btn" v-if="item.status>1&&item.refundStatus==0" @click.stop="openPop(item)">退款</view>
-						<view class="order-btn" v-else @click.stop="finishOrder">结束订单</view>
+						<view class="order-btn" v-if="item.status>1&&item.refundStatus==0" @click.stop="openPop(item,'退款')">退款</view>
+						<view class="order-btn" v-else @click.stop="openPop(item,'结算')">结算</view>
+						<view class="order-btn" @click.stop="finishOrder">处理</view>
 					</view>
 				</view>
 			</view>
 		</view>
+		<view v-if="groupList.length==0">
+			<view class="nodata">
+				<image :src="picUrlss+'empty.png'"></image>
+				<text>暂无订单~</text>
+			</view>
+		</view>
 
-		<bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='true' title="退款"
+		<bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='true' :title="popTitle"
 			@closePop="closePop()" @popSubmit="popSubmit()">
-			<view class="apply-info-box">
+			<view class="apply-info-box" v-if="popTitle=='退款'">
 				<view class="reason-input">
-					<input v-model="tempData.rmoney" placeholder="请填写退款金额"></input>
+					<input v-model="tempData.rmoney" type="number"  placeholder="请填写退款金额"></input>
 				</view>
 				<view>请填写退款金额,最多可退¥{{tempData.payMoney}}</view>
 			</view>
+			<view class="apply-info-box" v-if="popTitle=='结算'">
+				<view class="reason-input">
+					<input v-model="tempData.rmoney" type="number" placeholder="是否调整订单金额"></input>
+				</view>
+				<view>如需调整订单金额,请填写调整后的订单金额,否则无需填写</view>
+			</view>
 		</bottom-pop>
 
 	</view>
@@ -84,8 +97,8 @@
 		props: {},
 		data() {
 			return {
-
-				queryType: 0,
+				picUrlss: req.public.picUrls,
+				queryType: 2,
 
 				groupList: [],
 				page: 1,
@@ -96,6 +109,7 @@
 				// 筛选弹窗
 				showPop: false,
 				tempData: null,
+				popTitle:''
 			}
 		},
 		onLoad(options) {
@@ -156,10 +170,17 @@
 			},
 			
 			// 弹窗打开
-			openPop(item,index) {
-				this.tempData = item;
-				this.tempData.rmoney = item.payMoney
-				this.showPop = true
+			openPop(item,title) {
+				this.popTitle = title
+				if(title=='退款'){
+					this.tempData = item;
+					this.tempData.rmoney = item.payMoney
+					this.showPop = true
+				}else if(title=='结算'){
+					this.tempData = item;
+					this.tempData.rmoney = 0
+					this.showPop = true
+				}
 			},
 			// 弹窗关闭
 			closePop() {
@@ -168,36 +189,57 @@
 			},
 			// 弹窗确认
 			popSubmit() {
-				if(Number(this.tempData.rmoney)>Number(this.tempData.payMoney)) return req.msg('退款金额超出支付金额')
-				uni.showModal({
-					title: '提示',
-					content: "确定退款?",
-					success: (res) => {
-						if (res.confirm) {
-							req.getRequest('/admin/v2/order/refund', {
-								id: this.tempData.id,
-								refundMoney:this.tempData.rmoney
-							}, data => {
-								this.tempData = null
-								this.showPop = false
-								res.msg('订单已退款')
-								this.getMachineList()
-							})
+				if(this.popTitle=='退款'){
+					if(Number(this.tempData.rmoney)>Number(this.tempData.payMoney)) return req.msg('退款金额超出支付金额')
+					uni.showModal({
+						title: '提示',
+						content: "确定退款?",
+						success: (res) => {
+							if (res.confirm) {
+								req.getRequest('/admin/v2/order/refund', {
+									id: this.tempData.id,
+									refundMoney:this.tempData.rmoney
+								}, data => {
+									this.tempData = null
+									this.showPop = false
+									res.msg('订单已退款')
+									this.getMachineList()
+								})
+							}
 						}
-					}
-				})
+					})
+				}else if(this.popTitle=='结算'){
+					uni.showModal({
+						title: '提示',
+						content: "确定结算?",
+						success: (res) => {
+							if (res.confirm) {
+								req.getRequest('/admin/v2/order/settle', {
+									id: this.tempData.id,
+									settleMoney:this.tempData.rmoney,
+									settleType:2
+								}, data => {
+									this.tempData = null
+									this.showPop = false
+									res.msg('订单已结算')
+									this.getMachineList()
+								})
+							}
+						}
+					})
+				}
 			},
 			// 结束订单
 			finishOrder(item) {
 				uni.showModal({
 					title: '提示',
-					content: "确定结束该订单?",
+					content: "确定直接处理该订单?如需调整订单金额请取消并点击结算操作,如需退款请取消并点击退款操作",
 					success: (res) => {
 						if (res.confirm) {
 							req.getRequest('/admin/v2/order/settle', {
 								id: item.id
 							}, data => {
-								res.msg('订单已结束')
+								res.msg('订单已处理')
 								this.getMachineList()
 							})
 						}

+ 10 - 2
warning/reconditionAlarm/reconditionAlarm.vue

@@ -1,7 +1,7 @@
 <template>
-	<view>
+	<view style="overflow: hidden;">
 		<!-- @click="openPop(item)" -->
-		<view class="order-item" v-for="item,index in 10" >
+		<view class="order-item" v-for="item,index in groupList" >
 			<view class="ddflex order-item-header">
 				<view class="order-time">类型:{{item.type}}</view>
 				<block>
@@ -29,6 +29,13 @@
 			</view>
 		</view>
 		
+		<view v-if="groupList.length==0">
+			<view class="nodata">
+				<image :src="picUrlss+'empty.png'"></image>
+				<text>暂无提醒~</text>
+			</view>
+		</view>
+		
 		
 		<view style="height: 185rpx;" class="savepadding"></view>
 		<view class="bottom-btns savepadding">
@@ -66,6 +73,7 @@
 		props: {},
 		data() {
 			return {
+				picUrlss: req.public.picUrls,
 				showPop: false,
 				tempData: null,
 				

+ 9 - 2
warning/userAlarm/userAlarm.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view style="overflow: hidden;">
 		<!-- @click="openPop(item)" -->
 		<view class="order-item" v-for="item,index in groupList" >
 			<view class="ddflex order-item-header">
@@ -39,6 +39,13 @@
 			</view>
 		</view>
 		
+		<view v-if="groupList.length==0">
+			<view class="nodata">
+				<image :src="picUrlss+'empty.png'"></image>
+				<text>暂无报障~</text>
+			</view>
+		</view>
+		
 		<bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='false' title="解除提醒"
 			@closePop="closePop()" @popSubmit="popSubmit()">
 			<view>
@@ -67,7 +74,7 @@
 		props: {},
 		data() {
 			return {
-				
+				picUrlss: req.public.picUrls,
 				showPop: false,
 				tempData: null,