Commit 22da2838 authored by 盖献康's avatar 盖献康

bug(67347) - 医院自有设备 之前时间不可预约

bug(67365) - 按钮样式
bug(67366) - 平台的设备可以预约无法点击
parent daab4ff6
......@@ -238,7 +238,7 @@
:header-cell-style="{background:'#F4F4F4'}"
empty-text="当前暂无可预约设备"
>
<el-table-column show-overflow-tooltip="true" label="设备名称" align="center" prop="deviceName" />
<el-table-column :show-overflow-tooltip="true" label="设备名称" align="center" prop="deviceName" />
<el-table-column label="检查日期" align="center" prop="checkDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkDate, '{y}/{m}/{d}') }}</span>
......@@ -260,7 +260,7 @@
type="success"
size="mini"
plain
:disabled="parseInt(currentPayAmount) > parseInt(currentHospital.currentBalance)"
:disabled="accordingToTime(scope.row.checkTime) || (parseInt(scope.row.price) > parseInt(currentHospital.currentBalance)) || currentHospital.currentBalance === 0 || currentHospital.currentBalance === null"
@click="handleBookNow(scope.row)"
>立即预约
</el-button>
......@@ -270,6 +270,7 @@
type="success"
size="mini"
plain
:disabled="accordingToTime(scope.row.checkTime)"
@click="handleBookNow(scope.row)"
>立即预约
</el-button>
......@@ -286,7 +287,7 @@
:page-sizes="[10, 20, 50]"
@pagination="getDevice"
/>
<div style="display: flex; justify-content: left; margin-top: 20px">
<div style="display: flex; justify-content: left; margin-top: 20px;padding-bottom: 30px;">
<el-button class="resetBtn" icon="el-icon-back" @click="goBack"> </el-button>
</div>
</div>
......@@ -314,7 +315,9 @@ export default {
}
},
checkDetail: {},
queryParams: {},
queryParams: {
checkDate: null
},
total: 0,
subscribeMessage: {},
deviceQueryParams: {
......@@ -359,6 +362,30 @@ export default {
methods: {
moneyFormat,
parseTime,
// 根据当前条数据时间段判断能不能点击
accordingToTime(checkTime) {
const currentTime = parseTime(new Date(), '{y}-{m}-{d}')
console.log('checkTime', checkTime)
console.log('currentTime', currentTime)
console.log('this.queryParams.checkDate', this.queryParams.checkDate)
if (this.queryParams.checkDate === null || this.queryParams.checkDate === currentTime) {
if (checkTime !== null && checkTime !== '') {
// 计算的时间
const startTime = checkTime.split('-')[0]
// 当前时间
const currentDay = new Date().getHours() + ':' + String(new Date().getMinutes()).padStart(2, '0')
// 计算的时间小于当前时间就false
if (startTime < currentDay) {
return true
} else {
return false
}
}
} else {
return false
}
return false
},
getManage() {
getManage(this.currentCheckId).then(response => {
this.subscribeMessage = response.data
......
......@@ -432,8 +432,8 @@
type="success"
class="el-button--success--solid--four"
plain
@click="handleSubscribeDevice(scope.row)"
:disabled="accordingToTime(scope.row.checkTime)"
@click="handleSubscribeDevice(scope.row)"
>立即预约
</el-button>
</template>
......
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