Commit aee1fccb authored by 盖献康's avatar 盖献康

检查管理-bug

parent 0765284a
......@@ -125,7 +125,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="缴费时间">
<span>{{ parseTime(checkDetail.payTime, '{y}/{m}/{d} {h}:{m}') }}</span>
<span>{{ parseTime(checkDetail.payTime, '{y}/{m}/{d} {h}:{i}') }}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -150,7 +150,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="下单时间">
<span>{{ parseTime(checkDetail.appointTime, '{y}/{m}/{d} {h}:{m}') || '-' }}</span>
<span>{{ parseTime(checkDetail.appointTime, '{y}/{m}/{d} {h}:{i}') || '-' }}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -176,7 +176,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="检查状态">
<span v-show="checkDetail.checkSchedule !== '3'">未检查</span>
<span v-show="checkDetail.checkSchedule === '0' || checkDetail.checkSchedule === '1'">-</span>
<span v-show="checkDetail.checkSchedule === '2'">未检查</span>
<span v-show="checkDetail.checkSchedule === '3'">已检查</span>
</el-form-item>
</el-col>
......@@ -294,6 +295,10 @@ export default {
},
/** 点击确认 */
centerDialogVisible() {
if (this.videoReport === null) {
this.$message.error('请上传报告')
return
}
this.checkDetail.shadowReport = this.videoReport
this.checkDetail.reportTime = parseTime(new Date())
this.checkDetail.checkSchedule = '3'
......
......@@ -187,7 +187,8 @@ export default {
// 下拉可选择的设备
selectableDevice: [],
// 检查表ID
currentCheckId: null
currentCheckId: null,
currentPayAmount: null
}
},
created() {
......@@ -202,8 +203,9 @@ export default {
}
this.deviceQueryParams.checkTypeList.push(this.subscribeMessage.checkItemsId)
this.currentCheckId = this.subscribeMessage.id
this.currentPayAmount = this.subscribeMessage.payAmount
this.getDevice()
this.getAllDevice()
this.getAllDevice(this.subscribeMessage.checkItemsId)
},
methods: {
// 点击立即预约
......@@ -225,6 +227,8 @@ export default {
checkMessage.appointTime = parseTime(new Date())
checkMessage.checkStartTime = row.checkDate + ' ' + checkTimeList[0]
checkMessage.checkEndTime = row.checkDate + ' ' + checkTimeList[1]
checkMessage.checkSchedule = '2' // 把进度改为预约检查
checkMessage.devicePrice = this.currentPayAmount
console.log('需要修改的对象', checkMessage)
const list = []
list.push(checkMessage)
......@@ -254,8 +258,10 @@ export default {
})
},
// 获取所有设备
getAllDevice() {
deviceUseInSubscribeList({ isPrivate: '1' }).then(res => {
getAllDevice(checkItemsId) {
const list = []
list.push(checkItemsId)
deviceUseInSubscribeList({ isPrivate: '1', checkTypeList: list }).then(res => {
this.selectableDevice = res.data
})
},
......
......@@ -131,32 +131,32 @@
<template slot-scope="scope">
<dict-tag
:options="dict.type.payment_status"
:value="scope.row.insure"
:value="scope.row.payType"
/>
</template>
</el-table-column>
<el-table-column label="预约状态" align="center" :show-overflow-tooltip="true" prop="checkSchedule">
<template slot-scope="scope">
<span v-show="scope.row.checkSchedule < 2">未预约</span>
<span v-show="scope.row.checkSchedule >= 2">已预约</span>
<span v-show="scope.row.checkSchedule < 2" style="color: #F56C6C">未预约</span>
<span v-show="scope.row.checkSchedule >= 2" style="color: #67C23A">已预约</span>
</template>
</el-table-column>
<el-table-column label="检查状态" align="center" :show-overflow-tooltip="true" prop="checkSchedule">
<template slot-scope="scope">
<span v-show="scope.row.checkSchedule !== '3'">未检查</span>
<span v-show="scope.row.checkSchedule === '0' || scope.row.checkSchedule === '1'">-</span>
<span v-show="scope.row.checkSchedule === '2'">未检查</span>
<span v-show="scope.row.checkSchedule === '3'">已检查</span>
</template>
</el-table-column>
<el-table-column label="检查日期" align="center" :show-overflow-tooltip="true" prop="reportTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkStartTime, '{y}/{m}/{d}') }}</span>
<span>{{ parseTime(scope.row.checkStartTime, '{y}/{m}/{d}') || '-'}}</span>
</template>
</el-table-column>
<el-table-column label="检查时段" align="center" :show-overflow-tooltip="true" prop="checkStartTime" width="80">
<template slot-scope="scope">
<span>{{
parseTime(scope.row.checkStartTime, '{h}:{i}') + '-' + parseTime(scope.row.checkEndTime, '{h}:{i}')
}}</span>
<span v-if="scope.row.checkStartTime === null && scope.row.checkEndTime === null">{{ '-' }}</span>
<span v-else>{{ parseTime(scope.row.checkStartTime, '{h}:{i}') + '-' + parseTime(scope.row.checkEndTime, '{h}:{i}') || '-'}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
......@@ -372,12 +372,13 @@ export default {
// 设备下拉框
selectableDevice: [],
// 当前的检查ID
currentCheckId: null
currentCheckId: null,
// 当前的设备服务费
currentPayAmount: null
}
},
created() {
this.getList()
this.getAllDevice()
},
methods: {
parseTime,
......@@ -462,8 +463,10 @@ export default {
})
},
/** 获取所有设备用于设备下拉 */
getAllDevice() {
deviceUseInSubscribeList({ isPrivate: '1' }).then(res => {
getAllDevice(checkItemsId) {
const list = []
list.push(checkItemsId)
deviceUseInSubscribeList({ isPrivate: '1', checkTypeList: list }).then(res => {
console.log('设备下拉框', res)
this.selectableDevice = res.data
})
......@@ -518,9 +521,11 @@ export default {
this.deviceQueryParams.checkTypeList = [...new Set(this.deviceQueryParams.checkTypeList)]
this.deviceQueryParams.reservationTime = this.getCurrentTime()
this.currentCheckId = row.id
this.currentPayAmount = row.payAmount
console.log('点击立即预约后的状态', this.deviceQueryParams)
// 设置检查项目id
this.getDevice()
this.getAllDevice(row.checkItemsId)
},
// 获取当前时间
getCurrentTime() {
......@@ -541,7 +546,7 @@ export default {
confirmButtonClass: 'queryBtn',
type: 'warning'
}).then(() => {
console.log('确定后...')
console.log('确定后...', row)
const checkMessage = {}
const checkTimeList = row.checkTime.split('-')
checkMessage.id = this.currentCheckId
......@@ -550,6 +555,8 @@ export default {
checkMessage.appointTime = parseTime(new Date())
checkMessage.checkStartTime = row.checkDate + ' ' + checkTimeList[0]
checkMessage.checkEndTime = row.checkDate + ' ' + checkTimeList[1]
checkMessage.checkSchedule = '2' // 把进度改为预约检查
checkMessage.devicePrice = this.currentPayAmount
console.log('需要修改的对象', checkMessage)
const list = []
list.push(checkMessage)
......@@ -558,6 +565,7 @@ export default {
this.$modal.msgSuccess('预约设备成功')
}
})
this.open = false
})
},
/** 获取设备列表 */
......
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