Commit 28db2287 authored by 高滢's avatar 高滢

治疗详情页

parent 877e5bee
...@@ -21,8 +21,25 @@ export function selectTreatListP(query) { ...@@ -21,8 +21,25 @@ export function selectTreatListP(query) {
// 查询治疗列表不分页 // 查询治疗列表不分页
export function selectTreatAll(query) { export function selectTreatAll(query) {
return request({ return request({
url: '/business/treat/useListAll', url: '/business/treat/treatListAll',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 修改治疗管理
export function updateTreatList(data) {
return request({
url: '/business/treat',
method: 'put',
data: data
})
}
// 通过id查询详情
export function getTreatDetail(id) {
return request({
url: '/business/treat/' + id,
method: 'get'
})
}
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="宠物性别"> <el-form-item label="宠物性别">
<span>{{ checkDetail.petSex === '0' ? '公' : (checkDetail.petSex === '1' ? '母' : '未知')}}</span> <span>{{ checkDetail.petSex === '0' ? '公' : (checkDetail.petSex === '1' ? '母' : '未知') }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="宠物体重"> <el-form-item label="宠物体重">
<span>{{ checkDetail.petWeight + 'kg'}}</span> <span>{{ checkDetail.petWeight + 'kg' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -112,7 +112,14 @@ ...@@ -112,7 +112,14 @@
<span class="title-text">缴费信息</span> <span class="title-text">缴费信息</span>
</div> </div>
<!-- 缴费信息 --> <!-- 缴费信息 -->
<el-row> <el-row v-show="treatSchedule<=1">
<el-col :span="8">
<el-form-item label="代缴费金额">
<span>{{ checkDetail.payAmount }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="treatSchedule>1">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="缴费金额"> <el-form-item label="缴费金额">
<span>{{ checkDetail.payAmount }}</span> <span>{{ checkDetail.payAmount }}</span>
...@@ -129,41 +136,46 @@ ...@@ -129,41 +136,46 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title-paragraph" style="white-space: nowrap;"> <div v-show="treatSchedule >= 2" style="display: flex;align-items: center;">
<span class="title-text">分配信息</span> <div class="tip1" />
<div class="title-text">分配信息</div>
<div v-show="treatSchedule === 2" style="margin-left: auto;padding-right: 50px">
<el-button class="fourWordsBtn" @click="handleSubscribe">分配诊室</el-button>
</div>
</div> </div>
<!-- 预约信息 --> <!-- 预约信息 -->
<el-row> <el-row v-show="treatSchedule>=3">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检查类型"> <el-form-item label="诊室">
<span>{{ checkDetail.checkType === '0' ? '医院自有服务' : '预约外部服务' }}</span> <span>{{ checkDetail.consultRoomName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备服务费用"> <el-form-item label="治疗日期">
<span>{{ checkDetail.devicePrice }}</span> <span>{{ checkDetail.treatStartTime }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="下单时间"> <el-form-item label="治疗时间">
<span>{{ checkDetail.appointTime || '-' }}</span> <span>{{ checkDetail.treatStartTime || '-' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="checkDetail.checkSchedule < 2" style="position: relative;left: 42px;"> <el-row v-show="treatSchedule === 2" style="position: relative;left: 42px;">
<el-col :span="8"> <el-col :span="8">
暂未分配 暂未分配
</el-col> </el-col>
</el-row> </el-row>
<div> <div>
<div style="display: flex;align-items: center;"> <div v-show="treatSchedule>=3" style="display: flex;align-items: center;">
<div class="tip1" /> <div class="tip1" />
<div class="title-text">治疗信息</div> <div class="title-text">治疗信息</div>
<div style="margin-left: auto;padding-right: 50px"> <div v-show="treatSchedule===3" style="margin-left: auto;padding-right: 50px">
<el-button class="fourWordsBtn" >上传日志</el-button> <el-button class="fourWordsBtn">上传日志</el-button>
</div> </div>
</div> </div>
<!-- 检查信息 --> <!-- 检查信息 -->
<div v-show="treatSchedule>=3">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="治疗类型"> <el-form-item label="治疗类型">
...@@ -172,8 +184,8 @@ ...@@ -172,8 +184,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="treatSchedule < 4">未治疗</span>
<span v-show="checkDetail.checkSchedule === 3">已检查</span> <span v-show="treatSchedule === 4">已治疗</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -196,29 +208,241 @@ ...@@ -196,29 +208,241 @@
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div>
</el-form> </el-form>
<div style="padding-left: 10px"> <div style="padding-left: 10px">
<el-button style="width: 98px;height: 32px;" icon="el-icon-back" class="resetBtn" @click="goBack">返 回</el-button> <el-button style="width: 98px;height: 32px;" icon="el-icon-back" class="resetBtn" @click="goBack">返 回</el-button>
</div> </div>
<!-- 添加或修改业务管理-检查管理对话框 -->
<el-dialog title="分配诊室" :visible.sync="open" width="800px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false">
<div style="display: flex;padding-bottom: 20px;">
<div class="tip1" />
<div style="padding-top: 3px;padding-left: 18px;color: #666666; font-weight: 500; font-size: 16px;">预约记录</div>
</div>
<el-form :model="allocationForm" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="诊室">
<el-select v-model="allocationForm.consultRoomIdList" clearable multiple collapse-tags placeholder="请选择诊室" @change="allocationFormChangeName">
<el-option
v-for="item in consultingName"
:key="item.id"
:label="item.consultingName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="治疗日期">
<el-date-picker
v-model="treatStartTime"
type="date"
placeholder="请选择治疗日期"
@change="allocationFormChangeTime"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="appointmentRoomList"
style="width: 100%"
>
<el-table-column prop="consultRoomName" align="left" label="诊室名称" />
<el-table-column prop="treatStartTime" align="left" label="治疗日期" />
<el-table-column prop="treatStartTime" align="left" label="治疗时段">
<template slot-scope="scope">
<span v-show="scope.row.treatStartTime!== null">{{ parseTime(scope.row.treatStartTime, '{h}:{m}') }}</span>
<span v-show="scope.row.treatEndTime!== null">~{{ parseTime(scope.row.treatEndTime, '{h}:{m}') }}</span>
<span v-show="scope.row.treatStartTime === null&& scope.row.treatEndTime=== null">-</span>
</template>
</el-table-column>
<el-table-column align="left" label="治疗时长" />
<el-table-column prop="treatOperator" align="left" label="治疗负责人" />
</el-table>
<div style="display: flex;padding-top: 20px;padding-bottom: 20px;">
<div class="tip1" />
<div style="padding-top: 3px;padding-left: 18px;color: #666666; font-weight: 500; font-size: 16px;">添加预约</div>
</div>
<el-form ref="treatTimeForm" :model="appointmentRoom" :rules="treatTimerules" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="诊室" prop="consultRoomId">
<el-select v-model="reservationForm.consultRoomName" clearable placeholder="请选择诊室" value-key="id" @change="getconsultingName">
<el-option
v-for="item in consultingName"
:key="item.id"
:label="item.consultingName"
:value="item"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="治疗日期" prop="treatDate">
<el-date-picker
v-model="appointmentRoom.treatDate"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
:disabled-date="disabledDate"
placeholder="请选择治疗日期"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="开始时间" prop="sTime">
<el-time-select
v-model="appointmentRoom.sTime"
is-range
placeholder="请选择开始时间"
format="HH:mm"
value-format="HH:mm"
:picker-options="{
start: '00:00',
step: '01:00',
end: '12:00',
maxTime:appointmentRoom.eTime
}"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="eTime">
<el-time-select
v-model="appointmentRoom.eTime"
is-range
placeholder="请选择结束时间"
format="HH:mm"
value-format="HH:mm"
:picker-options="{
start: '00:00',
step: '01:00',
end: '12:00',
minTime:appointmentRoom.sTime
}"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<div style="padding-top: 20px;">
<el-button style="width: 98px;height: 32px;" class="queryBtn" icon="el-icon-check" @click="submitForm">提交</el-button>
<el-button style="width: 98px;height: 32px;" icon="el-icon-back" class="resetBtn" @click="cancel"> </el-button>
</div>
</el-row>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {consultRoomListAll, getTreatDetail, updateTreatList} from '@/api/business/treatment'
export default { export default {
name: 'TreatmentDetail', name: 'TreatmentDetail',
data() { data() {
return { return {
// 诊室下拉框
consultingName: [],
// 预约诊室限制日期
pickerOptions: {
disabledDate: time => {
return time.getTime() < Date.now() - 8.64e7 // 禁用今天以前的日期
}
},
treatTimerules: {},
// 预约诊室
appointmentRoom: {
id: '',
consultRoomId: '',
treatDate: '',
sTime: '',
eTime: ''
},
// 添加预约表单参数
reservationForm: {},
// 分配诊室搜索预约记录
allocationForm: {
treatSchedule: '2',
consultRoomIdList: [],
treatStartTimeS: '',
treatStartTimeE: ''
},
open: false,
treatSchedule: '',
checkDetail: {}, checkDetail: {},
schedule: 1 schedule: 1,
treatId: ''
} }
}, },
created() { created() {
const detail = this.$route.query.detail this.treatId = localStorage.getItem('treatId')
this.checkDetail = detail console.log('treatId', this.treatId)
this.schedule = parseInt(this.checkDetail.checkSchedule) + 1 this.getTreatDetails()
console.log('传过来的详情信息', detail) this.getConsultList()
}, },
methods: { methods: {
// 获取诊室下拉框
getConsultList() {
consultRoomListAll({ status: '0' }).then(res => {
this.consultingName = res
console.log('诊室', res)
})
},
// 预约诊室获取名字
getconsultingName(value) {
this.reservationForm.consultRoomName = value.consultingName
this.reservationForm.consultRoomId = value.id
console.log(value)
},
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7 // 禁用今天以前的日期
},
/** 预约提交按钮 */
submitForm() {
this.reservationForm.treatStartTime = this.appointmentRoom.treatDate + ' ' + this.appointmentRoom.sTime
this.reservationForm.treatEndTime = this.appointmentRoom.treatDate + ' ' + this.appointmentRoom.eTime
this.reservationForm.treatSchedule = '2'
const reservation = []
reservation.push(this.reservationForm)
console.log('this.reservationForm', this.reservationForm)
this.$refs['treatTimeForm'].validate(valid => {
if (valid) {
updateTreatList(reservation).then(res => {
this.$modal.msgSuccess('预约成功')
this.getTreatDetails()
this.cancel()
})
}
})
},
// 取消按钮
cancel() {
this.open = false
this.rest()
},
// 分配诊室
handleSubscribe() {
this.open = true
this.appointmentRoom.id = this.treatId
this.reservationForm = this.checkDetail
},
// 页面的详情信息
getTreatDetails() {
getTreatDetail(this.treatId).then(res => {
this.checkDetail = res.data
console.log('详情', res)
this.schedule = parseInt(res.data.treatSchedule) + 1
this.treatSchedule = parseInt(this.checkDetail.treatSchedule) + 1
})
},
// 点击 预约信息-立即预约 // 点击 预约信息-立即预约
bookNow() { bookNow() {
this.$router.push({ this.$router.push({
......
...@@ -218,11 +218,17 @@ ...@@ -218,11 +218,17 @@
:data="appointmentRoomList" :data="appointmentRoomList"
style="width: 100%" style="width: 100%"
> >
<el-table-column prop="date" align="left" label="诊室名称" /> <el-table-column prop="consultRoomName" align="left" label="诊室名称" />
<el-table-column prop="date" align="left" label="治疗日期" /> <el-table-column prop="treatStartTime" align="left" label="治疗日期" />
<el-table-column prop="date" align="left" label="治疗时段" /> <el-table-column prop="treatStartTime" align="left" label="治疗时段">
<el-table-column prop="date" align="left" label="治疗时长" /> <template slot-scope="scope">
<el-table-column prop="date" align="left" label="治疗负责人" /> <span v-show="scope.row.treatStartTime!== null">{{ parseTime(scope.row.treatStartTime, '{h}:{m}') }}</span>
<span v-show="scope.row.treatEndTime!== null">~{{ parseTime(scope.row.treatEndTime, '{h}:{m}') }}</span>
<span v-show="scope.row.treatStartTime === null&& scope.row.treatEndTime=== null">-</span>
</template>
</el-table-column>
<el-table-column align="left" label="治疗时长" />
<el-table-column prop="treatOperator" align="left" label="治疗负责人" />
</el-table> </el-table>
<div style="display: flex;padding-top: 20px;padding-bottom: 20px;"> <div style="display: flex;padding-top: 20px;padding-bottom: 20px;">
<div class="tip1" /> <div class="tip1" />
...@@ -232,12 +238,12 @@ ...@@ -232,12 +238,12 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="诊室" prop="consultRoomId"> <el-form-item label="诊室" prop="consultRoomId">
<el-select v-model="appointmentRoom.consultRoomId" clearable placeholder="请选择诊室"> <el-select v-model="reservationForm.consultRoomName" clearable placeholder="请选择诊室" value-key="id" @change="getconsultingName">
<el-option <el-option
v-for="item in consultingName" v-for="item in consultingName"
:key="item.id" :key="item.id"
:label="item.consultingName" :label="item.consultingName"
:value="item.id" :value="item"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -247,6 +253,8 @@ ...@@ -247,6 +253,8 @@
<el-date-picker <el-date-picker
v-model="appointmentRoom.treatDate" v-model="appointmentRoom.treatDate"
type="date" type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions" :picker-options="pickerOptions"
:disabled-date="disabledDate" :disabled-date="disabledDate"
placeholder="请选择治疗日期" placeholder="请选择治疗日期"
...@@ -302,9 +310,9 @@ ...@@ -302,9 +310,9 @@
</template> </template>
<script> <script>
import { delManage, addManage, updateManage } from '@/api/business/manage' import { delManage } from '@/api/business/manage'
import { listReservationDevice } from '@/api/business/device' import { listReservationDevice } from '@/api/business/device'
import { consultRoomListAll, selectTreatAll, selectTreatListP } from '@/api/business/treatment' import { consultRoomListAll, selectTreatAll, selectTreatListP, updateTreatList } from '@/api/business/treatment'
export default { export default {
name: 'MedicalRecordManagement', name: 'MedicalRecordManagement',
...@@ -361,6 +369,7 @@ export default { ...@@ -361,6 +369,7 @@ export default {
}, },
// 分配诊室搜索预约记录 // 分配诊室搜索预约记录
allocationForm: { allocationForm: {
treatSchedule: '2',
consultRoomIdList: [], consultRoomIdList: [],
treatStartTimeS: '', treatStartTimeS: '',
treatStartTimeE: '' treatStartTimeE: ''
...@@ -395,8 +404,8 @@ export default { ...@@ -395,8 +404,8 @@ export default {
isAsc: '', isAsc: '',
orderByColumn: '' orderByColumn: ''
}, },
// 表单参数 // 添加预约表单参数
form: {}, reservationForm: {},
// 设备集合 // 设备集合
deviceList: [] deviceList: []
} }
...@@ -410,6 +419,7 @@ export default { ...@@ -410,6 +419,7 @@ export default {
getAppointmentRecord() { getAppointmentRecord() {
console.log('this.allocationForm', this.allocationForm) console.log('this.allocationForm', this.allocationForm)
selectTreatAll(this.allocationForm).then(res => { selectTreatAll(this.allocationForm).then(res => {
this.appointmentRoomList = res.data
console.log('预约记录', res) console.log('预约记录', res)
}) })
}, },
...@@ -421,6 +431,7 @@ export default { ...@@ -421,6 +431,7 @@ export default {
}, },
// 弹出框重置 // 弹出框重置
rest() { rest() {
this.reservationForm.consultRoomName = ''
this.appointmentRoomList = [] this.appointmentRoomList = []
// 预约诊室 // 预约诊室
this.appointmentRoom = { this.appointmentRoom = {
...@@ -431,19 +442,30 @@ export default { ...@@ -431,19 +442,30 @@ export default {
} }
// 分配诊室搜索预约记录 // 分配诊室搜索预约记录
this.allocationForm = { this.allocationForm = {
treat_schedule: '2',
consultRoomIdList: '', consultRoomIdList: '',
treatStartTimeS: '', treatStartTimeS: '',
treatStartTimeE: '' treatStartTimeE: ''
} }
}, },
// 预约诊室获取名字
getconsultingName(value) {
this.reservationForm.consultRoomName = value.consultingName
this.reservationForm.consultRoomId = value.id
console.log(value)
},
// 预约诊室搜索 // 预约诊室搜索
allocationFormChangeName() { allocationFormChangeName(value) {
this.allocationForm.consultRoomIdList = this.allocationForm.consultRoomIdList.map(str => parseInt(str))
this.getAppointmentRecord() this.getAppointmentRecord()
}, },
allocationFormChangeTime() { allocationFormChangeTime(value) {
if (value !== '' && value !== null) {
this.allocationForm.treatStartTimeS = this.treatStartTime + ' 00:00:00' this.allocationForm.treatStartTimeS = this.treatStartTime + ' 00:00:00'
this.allocationForm.treatStartTimeE = this.treatStartTime + ' 23:59:59' this.allocationForm.treatStartTimeE = this.treatStartTime + ' 23:59:59'
} else {
this.allocationForm.treatStartTimeS = ''
this.allocationForm.treatStartTimeE = ''
}
this.getAppointmentRecord() this.getAppointmentRecord()
}, },
// 获取诊室下拉框 // 获取诊室下拉框
...@@ -482,11 +504,12 @@ export default { ...@@ -482,11 +504,12 @@ export default {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
}, },
/** 立即预约 */ /** 分配诊室 */
handleSubscribe(row) { handleSubscribe(row) {
this.open = true this.open = true
console.log('点击立即预约', row) console.log('点击立即预约', row)
this.appointmentRoom.id = row.id this.appointmentRoom.id = row.id
this.reservationForm = row
}, },
/** 获取设备列表 */ /** 获取设备列表 */
getDevice() { getDevice() {
...@@ -519,6 +542,7 @@ export default { ...@@ -519,6 +542,7 @@ export default {
/** 详情 */ /** 详情 */
handleDetails(row) { handleDetails(row) {
console.log('点击详情后', row) console.log('点击详情后', row)
localStorage.setItem('treatId', row.id)
this.$router.push({ this.$router.push({
name: 'TreatmentDetail', name: 'TreatmentDetail',
query: { detail: row } query: { detail: row }
...@@ -526,21 +550,18 @@ export default { ...@@ -526,21 +550,18 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs['form'].validate(valid => { this.reservationForm.treatStartTime = this.appointmentRoom.treatDate + ' ' + this.appointmentRoom.sTime
this.reservationForm.treatEndTime = this.appointmentRoom.treatDate + ' ' + this.appointmentRoom.eTime
this.reservationForm.treatSchedule = '2'
const reservation = []
reservation.push(this.reservationForm)
console.log('this.reservationForm', this.reservationForm)
this.$refs['treatTimeForm'].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { updateTreatList(reservation).then(res => {
updateManage(this.form).then(response => { this.$modal.msgSuccess('预约成功')
this.$modal.msgSuccess('修改成功') this.cancel()
this.open = false
this.getList()
}) })
} else {
addManage(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
} }
}) })
}, },
......
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