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

检查管理-bug

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