Commit 623687f3 by zhangzhen

细节优化

parent e09cb261
...@@ -59,13 +59,10 @@ ...@@ -59,13 +59,10 @@
</view> </view>
<view class="part" v-if="val.deviceList.el"> <view class="part" v-if="val.deviceList.el">
<text class="text-title">取电开关</text> <text class="text-title">取电开关</text>
<view v-if="val.deviceList.el.status >=1" class=""> <view class="">
<!-- <button @tap="onDeviceRun(20,val.deviceList.el.devId)" class="cu-btn bg-blue margin-right-sm">开启</button> <button @tap="onDeviceRun(20,val.deviceList.el.roomId)" class="cu-btn bg-blue margin-right-sm">开启</button>
<button @tap="onDeviceRun(40,val.deviceList.el.devId)" class="cu-btn bg-blue">关闭</button> --> <button @tap="onDeviceRun(40,val.deviceList.el.roomId)" class="cu-btn bg-blue">关闭</button>
<switch data-type="door" :data-index="index" :data-k="k" :data-id="val.deviceList.el.roomId" @change="onSwitchDoor" :class="val.deviceList.el.status==3?'checked':''" :checked="val.deviceList.el.status==3?true:false" color="#e54d42"></switch> <!-- <switch data-type="door" :data-index="index" :data-k="k" :data-id="val.deviceList.el.roomId" @change="onSwitchDoor" :class="val.deviceList.el.status==3?'checked':''" :checked="val.deviceList.el.status==3?true:false" color="#e54d42"></switch> -->
</view>
<view v-else class="">
<text>离线</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -235,10 +232,10 @@ import moment from "@/common/moment"; ...@@ -235,10 +232,10 @@ import moment from "@/common/moment";
this.list[index].show = !this.list[index].show; this.list[index].show = !this.list[index].show;
this.$forceUpdate(); this.$forceUpdate();
}, },
onSwitchDoor(e){ // onSwitchDoor(e){
let t = e.target.value? 20: 40 // let t = e.target.value? 20: 40
this.onDeviceRun(t,e.target.dataset.id) // this.onDeviceRun(t,e.target.dataset.id)
}, // },
onDeviceRun(opType,roomId){ onDeviceRun(opType,roomId){
let that = this; let that = this;
if(this.deviceTime){ if(this.deviceTime){
...@@ -262,10 +259,23 @@ import moment from "@/common/moment"; ...@@ -262,10 +259,23 @@ import moment from "@/common/moment";
icon:"success", icon:"success",
title:this.optionStatus[opType]+"成功" title:this.optionStatus[opType]+"成功"
}) })
setTimeout(()=>{ }else{
that.deviceTime = false; uni.showToast({
},5000) icon:"none",
title: '操作失败'
})
} }
setTimeout(()=>{
that.deviceTime = false;
},5000)
}).catch(err=>{
uni.showToast({
icon:"none",
title: '操作失败'
})
setTimeout(()=>{
that.deviceTime = false;
},5000)
}) })
} }
} }
......
...@@ -36,19 +36,16 @@ ...@@ -36,19 +36,16 @@
<view class="flex-1 flex-col"> <view class="flex-1 flex-col">
<view class="info"> <view class="info">
<text class="text-title text-bold">预约包间:</text> <text class="text-title text-bold">预约包间:</text>
<text class="text-title ">{{orderInfo.roomName||'-'}}{{orderInfo.roomTypeName?'【'+orderInfo.roomTypeName+'】':''}}</text> <text class="text-title text-bold text-lg">{{orderInfo.roomName||'-'}}{{orderInfo.roomTypeName?'【'+orderInfo.roomTypeName+'】':''}}</text>
</view>
<view class="info">
<text class="text-title text-bold">{{orderInfo.orderType==1?'下单':'续单'}}时间:</text>
<text class="text-title ">{{orderInfo.updateTime || orderInfo.createTime||'-'}}</text>
</view> </view>
<view class="info"> <view class="info">
<text class="text-title text-bold">开始时间:</text> <text class="text-title text-bold">开始时间:</text>
<text class="text-title ">{{orderInfo.preStartDate||'00:00'}}</text> <text class="text-title text-bold text-lg">{{orderInfo.preStartDate||'00:00'}}</text>
</view> </view>
<view class="info"> <view class="info">
<text class="text-title text-bold">结束时间:</text> <text class="text-title text-bold">结束时间:</text>
<text class="text-title ">{{orderInfo.preEndDate ||'00:00'}}</text> <text class="text-title text-bold text-lg">{{orderInfo.preEndDate ||'00:00'}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -77,6 +74,10 @@ ...@@ -77,6 +74,10 @@
</view> </view>
</view> </view>
<view class="flex-between"> <view class="flex-between">
<text class="text-gray">{{orderInfo.orderType==1?'下单':'续单'}}时间:</text>
<text class="text-title ">{{orderInfo.updateTime || orderInfo.createTime||'-'}}</text>
</view>
<view class="flex-between">
<text class="text-gray">支付时间</text> <text class="text-gray">支付时间</text>
<text class="text-title">{{orderInfo.payTime||'-'}}</text> <text class="text-title">{{orderInfo.payTime||'-'}}</text>
</view> </view>
......
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
<button class="cu-btn block bg-blue lg round " @tap="onShowKeyboard('xmKeyboard')">新增</button> <button class="cu-btn block bg-blue lg round " @tap="onShowKeyboard('xmKeyboard')">新增</button>
</view> </view>
</view> </view>
<view class="foot-box" v-else>
<view class="btn-box">
<button class="cu-btn block bg-blue lg round " @tap="onDel">删除</button>
</view>
</view>
<uni-popup ref="popupConfirm" type="dialog"> <uni-popup ref="popupConfirm" type="dialog">
...@@ -73,6 +78,9 @@ ...@@ -73,6 +78,9 @@
this.deleteIndex = e.index this.deleteIndex = e.index
this.$refs.popupConfirm.open(); this.$refs.popupConfirm.open();
}, },
onDel(){
this.onClick({index:0})
},
close() { close() {
this.$refs.popupConfirm.close() this.$refs.popupConfirm.close()
}, },
...@@ -102,10 +110,16 @@ ...@@ -102,10 +110,16 @@
this.$refs.xmKeyboard.toShow() this.$refs.xmKeyboard.toShow()
}, },
onSave(e) { onSave(e) {
console.log(e)
let obj = { let obj = {
name: e name: e
} }
if(e.length<7 || !/[a-zA-Z]/.test(e[1])){
uni.showToast({
icon:"none",
title:"车牌号输入不正确"
})
return
}
plateNumberBind({ plateNumberBind({
id:this.userInfo.id, id:this.userInfo.id,
numberplate:e numberplate:e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment