xhj 3 yıl önce
ebeveyn
işleme
98ead73637

+ 2 - 2
app.css

@@ -22,8 +22,8 @@
 @import "./static/stylesheet.css";
 
 page {
-  --mina: #cd0b01;
-  --main: #cd0b01;
+  --mina: #EB692F;
+  --main: #EB692F;
   --btn: #cd0b01;
   --red: #FE0419;
   --black: #201d1d;

+ 1 - 1
machineAndCell/cellDetail/cellDetail.vue

@@ -148,7 +148,7 @@
 					uni.hideLoading()
 				})
 				req.getRequest('/admin/v2/battery/bmsData',{batteryId:this.id},res=>{
-					this.DHON = JSON.parse(res[0].State).DHON==1?true:false
+					this.DHON = JSON.parse(res[0].Seting).DHON==1?true:false
 				})
 			},
 			switchChange(value){

+ 1 - 1
pages/cell/cell.css

@@ -136,7 +136,7 @@
 .cell-option{
 	margin-top: 20rpx;
 	border-top: 1rpx solid #E6E6E6;
-	padding: 30rpx 0 0;
+	/* padding: 30rpx 0 0; */
 	line-height: 41rpx;
 	font-size: 28rpx;
 	font-family: Source Han Sans CN-Medium, Source Han Sans CN;

+ 7 - 4
pages/cell/cell.vue

@@ -69,7 +69,7 @@
 						</view>
 						<view class="cell-info  ddflex">
 							<view>电池Id:</view>
-							<view>{{item.batteryId}}</view>
+							<view>{{item.batteryId?item.batteryId:'暂无电池'}}</view>
 						</view>
 						<view class="cell-info  ddflex">
 							<view>设备编号:</view>
@@ -86,9 +86,9 @@
 					</view>
 				</view>
 				<view class="cell-option ddflex">
-					<view class="fflex" @click="jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
-					<view class="fflex" @click="jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
-					<view class="fflex" @click="jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
+					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
+					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
+					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
 				</view>
 			</view>
 		</view>
@@ -205,6 +205,9 @@
 			this.getMachineList(true)
 		},
 		methods: {
+			noCell(){
+				req.msg("暂无电池")
+			},
 			getP(type){
 				let p = 0
 				console.log('111')

+ 1 - 1
pages/index/index.css

@@ -158,6 +158,6 @@ page {
 	margin: 30rpx auto;
 }
 
-.wei-login{font-size: 24rpx;color: #333;text-align: center;padding: 0 30rpx 60rpx;margin-top: 80rpx;}
+.wei-login{font-size: 24rpx;color: #333;text-align: center;padding: 0 30rpx 60rpx;margin-top: 160rpx;}
 .wei-login image{width: 495rpx;height: 424rpx;margin: 0 auto 20rpx;}
 .cart-login{border: 1px solid var(--mina);font-size: 30rpx;color: var(--mina);font-weight: bold;height: 80rpx;line-height: 80rpx;border-radius: 40rpx;width: 260rpx;margin: 65rpx auto 0;}

+ 14 - 3
pages/index/index.vue

@@ -54,8 +54,8 @@
 
 		<!-- nav -->
 		<view v-if="!userInfo.storeId" class="nav-box ddflex">
-			<view class="nav-item">
-				<image class="nav-item-icon" src="../../static/pages/images/wdsj.png" @click="jumpUrl('/pages/myStore/myStore')"></image>
+			<view class="nav-item" @click="jumpUrl('/pages/myStore/myStore')">
+				<image class="nav-item-icon" src="../../static/pages/images/wdsj.png"></image>
 				<view class="nav-item-title">我的商家</view>
 			</view>
 			<view class="nav-item" @click="jumpUrl('/pages/myMerchant/myMerchant')">
@@ -99,7 +99,7 @@
 		</view>
 
 		<!-- 图表统计 -->
-		<view class="echart-box">
+		<view class="echart-box" v-if="!userInfo.storeId">
 			<view class="echart-box-header ddflex">
 				<view class="echart-box-title">营业额排名</view>
 				<!-- <view class="echart-box-timeType ddflex">
@@ -284,6 +284,7 @@
 				// 商家营业额排名
 				option2: {
 					tooltip: {
+						show:false,
 						trigger: 'axis',
 						axisPointer: {
 							type: 'shadow'
@@ -628,12 +629,19 @@
 					if(this.echartData.orderList.length>0){
 						this.option.xAxis[0].data = this.echartData.orderList.map(item=>{return item.showTime})
 						this.option.series[0].data = this.echartData.orderList.map(item=>{return item.orderCount})
+					}else{
+						this.option.xAxis[0].data = []
+						this.option.series[0].data = []
 					}
 					if(this.echartData.profitList.length>0){
 						this.option.series[1].data = this.echartData.profitList.map(item=>{return item.profit})
+					}else{
+						this.option.series[1].data = []
 					}
 					if(this.echartData.turnoverList.length>0){
 						this.option.series[2].data = this.echartData.turnoverList.map(item=>{return item.turnover})
+					}else{
+						this.option.series[2].data = []
 					}
 					chart.setOption(this.option);
 				});
@@ -643,6 +651,9 @@
 						if(this.storeRanking.length>0){
 							this.option2.yAxis[0].data = this.storeRanking.map(item=>{return item.name})
 							this.option2.series[0].data = this.storeRanking.map(item=>{return item.turnover})
+						}else{
+							this.option2.yAxis[0].data = []
+							this.option2.series[0].data = []
 						}
 						chart.setOption(this.option2);
 					});

+ 1 - 1
pages/machineLook/machineLook.css

@@ -136,7 +136,7 @@
 .cell-option{
 	margin-top: 20rpx;
 	border-top: 1rpx solid #E6E6E6;
-	padding: 30rpx 0 0;
+	/* padding: 30rpx 0 0; */
 	line-height: 41rpx;
 	font-size: 28rpx;
 	font-family: Source Han Sans CN-Medium, Source Han Sans CN;

+ 6 - 3
pages/machineLook/machineLook.vue

@@ -89,9 +89,9 @@
 					</view>
 				</view>
 				<view class="cell-option ddflex">
-					<view class="fflex" @click="jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
-					<view class="fflex" @click="jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
-					<view class="fflex" @click="jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
+					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/map/map?id='+item.batteryId)">定位</view>
+					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/BMS/BMS?id='+item.batteryId)">BMS</view>
+					<view class="fflex" style="padding-top: 30rpx;" @click="!item.batteryId?noCell():jumpUrl('/machineAndCell/cellDetail/cellDetail?id='+item.batteryId)">详情</view>
 				</view>
 			</view>
 		</view>
@@ -194,6 +194,9 @@
 			this.getMachineList(true)
 		},
 		methods: {
+			noCell(){
+				req.msg("暂无电池")
+			},
 			goback: function() {
 				var pages = getCurrentPages();
 				if(pages.length==1){

+ 8 - 0
pages/myMerchant/myMerchant.vue

@@ -64,6 +64,13 @@
 					<view class="sjyy-btn" @click.stop="jumpUrl('/pages/operationDataPersonal/operationDataPersonal?storeId='+item.id)">运营情况</view>
 				</view>
 			</view>
+			
+			<view v-if="groupList.length==0">
+				<view class="nodata">
+					<image :src="picUrlss+'empty.png'"></image>
+					<text>暂无门店~</text>
+				</view>
+			</view>
 		</view>
 	</view>
 </template>
@@ -77,6 +84,7 @@
 		props: {},
 		data() {
 			return {
+				picUrlss: req.public.picUrls,
 				groupList: [],
 				page: 1,
 				limit: 3,

+ 2 - 2
pages/order/order.vue

@@ -62,10 +62,10 @@
 						<view class="order-item-content-label">电池ID</view>
 						<view class="order-item-content-data fflex tover">{{item.batteryId}}</view>
 					</view>
-					<view class="order-item-content ddflex">
+					<!-- <view class="order-item-content ddflex">
 						<view class="order-item-content-label">电池型号</view>
 						<view class="order-item-content-data fflex tover">60V 30Ah</view>
-					</view>	
+					</view>	 -->
 					<view class="order-item-content ddflex">
 						<view class="order-item-content-label">租赁用户</view>
 						<view class="order-item-content-data fflex tover">{{item.realName}} {{item.phone}}</view>

+ 4 - 4
pages/orderDetail/orderDetail.vue

@@ -106,10 +106,10 @@
 				<view class="info-item-label">归还机柜</view>
 				<view class="info-item-data fflex tover">{{info.lease.returnDevId?info.lease.returnDevId:'-'}}</view>
 			</view>
-			<!-- <view class="info-item ddflex">
-				<view class="info-item-label">用户手机号</view>
-				<view class="info-item-data fflex tover">15200809658</view>
-			</view> -->
+			<view class="info-item ddflex">
+				<view class="info-item-label">用户</view>
+				<view class="info-item-data fflex tover">{{info.realName}} ({{info.phone}})</view>
+			</view>
 			<view class="info-item ddflex">
 				<view class="info-item-label">订单编号</view>
 				<view class="info-item-data fflex tover">{{info.orderNo}}</view>

+ 1 - 1
warning/orderAlarm/orderAlarm.css

@@ -112,7 +112,7 @@
 }
 .order-btn-time{
 	width: 266rpx;
-	line-height: 41rpx;
+	line-height: 56rpx;
 	font-size: 28rpx;
 	font-family: Source Han Sans CN-Medium, Source Han Sans CN;
 	font-weight: 500;

+ 23 - 17
warning/orderAlarm/orderAlarm.vue

@@ -18,7 +18,7 @@
 		<!-- 订单 -->
 		<view>
 			<view class="order-item" v-for="item,index in groupList"
-				@click="jumpUrl('/pages/orderDetail/orderDetail?id='+item)">
+				@click="jumpUrl('/pages/orderDetail/orderDetail?id='+item.id)">
 				<view class="ddflex order-item-header">
 					<view class="order-time">类型:{{item.type==2?'按次计费':item.type==3?'按时计费':''}}</view>
 					<block>
@@ -45,16 +45,22 @@
 						<view class="order-item-content-data fflex tover">{{item.batteryId}}</view>
 					</view>
 					<view class="order-item-content ddflex">
+						<view class="order-item-content-label">应付金额:</view>
+						<view class="order-item-content-data fflex tover" style="color: #EB5C20">{{item.totalMoney?'¥'+item.totalMoney:'-'}}</view>
+					</view>
+					<view class="order-item-content ddflex">
 						<view class="order-item-content-label">描述:</view>
-						<view class="order-item-content-data fflex tover">{{item.exceptionCause?item.exceptionCause:'无'}}</view>
+						<view class="order-item-content-data fflex tover">
+							<view style="color: #2A82E4;margin-left: 10rpx;text-decoration: underline;" @click.stop="jumpUrl('/warning/userAlarm/userAlarm?orderId='+item.id)">查看用户报障</view>
+						</view>
 					</view>
 				</view>
-				<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-btns ddflex">
+					<view class="order-btn-time">{{item.createDate}}</view>
+					<view v-if="item.isException==2" style="justify-content: flex-end;" class="ddflex">
 						<view class="order-btn" v-if="item.status==3&&item.refundStatus==0" @click.stop="openPop(item,'退款')">退款</view>
 						<view class="order-btn" v-if="item.status==0||item.status==1" @click.stop="openPop(item,'结算')">结算</view>
-						<view class="order-btn" @click.stop="finishOrder">处理</view>
+						<view class="order-btn" @click.stop="finishOrder(item)">处理</view>
 					</view>
 				</view>
 			</view>
@@ -70,13 +76,13 @@
 			@closePop="closePop()" @popSubmit="popSubmit()">
 			<view class="apply-info-box" v-if="popTitle=='退款'">
 				<view class="reason-input">
-					<input v-model="tempData.rmoney" type="number"  placeholder="请填写退款金额"></input>
+					<input v-model="tempData.rmoney" type="digit"  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>
+					<input v-model="tempData.rmoney" type="digit" placeholder="是否调整订单金额"></input>
 				</view>
 				<view>如需调整订单金额,请填写调整后的订单金额,否则无需填写</view>
 			</view>
@@ -196,13 +202,13 @@
 						content: "确定退款?",
 						success: (res) => {
 							if (res.confirm) {
-								req.getRequest('/admin/v2/order/refund', {
-									id: this.tempData.id,
+								req.postRequest('/admin/v2/order/refund', {
+									orderNo:this.tempData.orderNo,
 									refundMoney:this.tempData.rmoney
 								}, data => {
 									this.tempData = null
 									this.showPop = false
-									res.msg('订单已退款')
+									req.msg('订单已退款')
 									this.getMachineList()
 								})
 							}
@@ -214,14 +220,14 @@
 						content: "确定结算?",
 						success: (res) => {
 							if (res.confirm) {
-								req.getRequest('/admin/v2/order/settle', {
-									id: this.tempData.id,
+								req.postRequest('/admin/v2/order/settle', {
+									orderId: this.tempData.id,
 									settleMoney:this.tempData.rmoney,
 									settleType:2
 								}, data => {
 									this.tempData = null
 									this.showPop = false
-									res.msg('订单已结算')
+									req.msg('订单已结算')
 									this.getMachineList()
 								})
 							}
@@ -236,10 +242,10 @@
 					content: "确定直接处理该订单?如需调整订单金额请取消并点击结算操作,如需退款请取消并点击退款操作",
 					success: (res) => {
 						if (res.confirm) {
-							req.getRequest('/admin/v2/order/settle', {
-								id: item.id
+							req.postRequest('/admin/v2/order/finish', {
+								orderId:item.id
 							}, data => {
-								res.msg('订单已处理')
+								req.msg('订单已处理')
 								this.getMachineList()
 							})
 						}

+ 9 - 3
warning/userAlarm/userAlarm.vue

@@ -38,9 +38,9 @@
 				</view>
 				<view class="images-box ddflex">
 					<image class="images" v-for="it,idx in item.imageList" :src="it" mode="aspectFill" @click="previewImg(item.imageList,idx)"></image>
-					<view class="video" v-if="false">
-						<image style="width: 100%;height: 100%;"></image>
-						<image class="play-icon" src="../../static/images/play.png"></image>
+					<view class="video" v-if="item.videoUrl">
+						<video style="width: 100%;height: 100%;" :src="item.videoUrl"></video>
+						<!-- <image class="play-icon" src="../../static/images/play.png"></image> -->
 					</view>
 				</view>
 			</view>
@@ -95,9 +95,12 @@
 				limit: 10,
 				searchValue:'',
 				isQuerying:false,//正在查询数据
+				
+				orderId:null
 			}
 		},
 		onLoad(options) {
+			if(options.orderId) this.orderId = options.orderId
 			this.getMachineList()
 		},
 		onShow() {
@@ -139,6 +142,9 @@
 					page: this.page,
 					limit: this.limit,
 				}
+				if(this.orderId){ 
+					queryParams.orderId = this.orderId
+				}
 				req.getRequest(
 					'/admin/v2/alarm/userAlarmPage',
 					queryParams,