Commit 623687f3 by zhangzhen

细节优化

parent e09cb261
......@@ -59,13 +59,10 @@
</view>
<view class="part" v-if="val.deviceList.el">
<text class="text-title">取电开关</text>
<view v-if="val.deviceList.el.status >=1" class="">
<!-- <button @tap="onDeviceRun(20,val.deviceList.el.devId)" class="cu-btn bg-blue margin-right-sm">开启</button>
<button @tap="onDeviceRun(40,val.deviceList.el.devId)" 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>
</view>
<view v-else class="">
<text>离线</text>
<view class="">
<button @tap="onDeviceRun(20,val.deviceList.el.roomId)" class="cu-btn bg-blue margin-right-sm">开启</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> -->
</view>
</view>
</view>
......@@ -235,10 +232,10 @@ import moment from "@/common/moment";
this.list[index].show = !this.list[index].show;
this.$forceUpdate();
},
onSwitchDoor(e){
let t = e.target.value? 20: 40
this.onDeviceRun(t,e.target.dataset.id)
},
// onSwitchDoor(e){
// let t = e.target.value? 20: 40
// this.onDeviceRun(t,e.target.dataset.id)
// },
onDeviceRun(opType,roomId){
let that = this;
if(this.deviceTime){
......@@ -262,10 +259,23 @@ import moment from "@/common/moment";
icon:"success",
title:this.optionStatus[opType]+"成功"
})
setTimeout(()=>{
that.deviceTime = false;
},5000)
}else{
uni.showToast({
icon:"none",
title: '操作失败'
})
}
setTimeout(()=>{
that.deviceTime = false;
},5000)
}).catch(err=>{
uni.showToast({
icon:"none",
title: '操作失败'
})
setTimeout(()=>{
that.deviceTime = false;
},5000)
})
}
}
......
......@@ -36,19 +36,16 @@
<view class="flex-1 flex-col">
<view class="info">
<text class="text-title text-bold">预约包间:</text>
<text class="text-title ">{{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>
<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">开始时间:</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 class="info">
<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>
......@@ -77,6 +74,10 @@
</view>
</view>
<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-title">{{orderInfo.payTime||'-'}}</text>
</view>
......
......@@ -23,6 +23,11 @@
<button class="cu-btn block bg-blue lg round " @tap="onShowKeyboard('xmKeyboard')">新增</button>
</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">
......@@ -73,6 +78,9 @@
this.deleteIndex = e.index
this.$refs.popupConfirm.open();
},
onDel(){
this.onClick({index:0})
},
close() {
this.$refs.popupConfirm.close()
},
......@@ -102,10 +110,16 @@
this.$refs.xmKeyboard.toShow()
},
onSave(e) {
console.log(e)
let obj = {
name: e
}
if(e.length<7 || !/[a-zA-Z]/.test(e[1])){
uni.showToast({
icon:"none",
title:"车牌号输入不正确"
})
return
}
plateNumberBind({
id:this.userInfo.id,
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