Commit 6a8c4b17 authored by 盖献康's avatar 盖献康

Merge remote-tracking branch 'origin/master'

parents f62f0510 d309fdb2
......@@ -75,3 +75,11 @@ export function deleteTreat(id) {
method: 'delete'
})
}
// 编辑病例
export function editRecord(data) {
return request({
url: '/business/record',
method: 'put',
data
})
}
......@@ -16,6 +16,13 @@ export function getRegister(id) {
method: 'get'
})
}
// 查询挂号详细--录入诊断
export function inputDiagnosis(id) {
return request({
url: '/business/register/inputDiagnosis/' + id,
method: 'get'
})
}
// 新增挂号
export function addRegister(data) {
......
import request from '@/utils/request'
// 查询治疗/检查项目管理列表
// 启用诊室不分页列表
export function consultRoomListAll(query) {
return request({
url: '/system/room/listAll',
......@@ -8,3 +8,21 @@ export function consultRoomListAll(query) {
params: query
})
}
// 查询治疗列表
export function selectTreatListP(query) {
return request({
url: '/business/treat/treatList',
method: 'get',
params: query
})
}
// 查询治疗列表不分页
export function selectTreatAll(query) {
return request({
url: '/business/treat/useListAll',
method: 'get',
params: query
})
}
......@@ -174,7 +174,7 @@ export const constantRoutes = [
// 病历详情
{
path: 'medical-detail/:id',
component: () => import('@/views/medical-record-management/medical-detail'),
component: () => import('@/views/medical-record-management/medical-edit'),
name: 'MedicalDetail',
props: true,
meta: {
......
......@@ -134,6 +134,13 @@ export function parseStrEmpty(str) {
return str;
}
/**
* 判断传入内容是否为空
*/
export function isEmpty(str) {
return parseStrEmpty(str) === ''
}
// 数据合并
export function mergeRecursive(source, target) {
for (var p in target) {
......
This diff is collapsed.
......@@ -2,7 +2,15 @@
<div style="background-color: #FFFFFF;">
<div class="app-container">
<!--顶部搜索区-->
<el-form v-show="showSearch" ref="queryForm" class="form-style" :inline="true" :model="queryParams" label-width="68px" size="small">
<el-form
v-show="showSearch"
ref="queryForm"
:inline="true"
:model="queryParams"
class="form-style"
label-width="68px"
size="small"
>
<el-form-item prop="petNickname">
<el-input
v-model="queryParams.petNickname"
......@@ -102,32 +110,43 @@
</el-form>
<el-table
ref="table"
v-loading="loading"
:data="recordList"
:header-cell-style="{background:'#E8E9E8'}"
border
@selection-change="handleSelectionChange"
>
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" show-overflow-tooltip label="序号" min-width="80" type="index" />
<el-table-column align="center" show-overflow-tooltip label="病历号" min-width="80" prop="visitNumber" />
<el-table-column align="center" show-overflow-tooltip label="宠物昵称" min-width="80" prop="petNickname" />
<el-table-column align="center" show-overflow-tooltip label="宠物ID" prop="nickname" />
<el-table-column align="center" show-overflow-tooltip label="宠主姓名" prop="nickname" />
<el-table-column align="center" show-overflow-tooltip label="宠主手机号" prop="petOwnerNumber" />
<el-table-column align="center" show-overflow-tooltip label="归档医院" prop="deptId" />
<el-table-column align="center" show-overflow-tooltip label="主治兽医" prop="doctorName" />
<el-table-column align="center" show-overflow-tooltip label="所属科室" prop="departmentId" />
<el-table-column align="center" show-overflow-tooltip label="就诊日期" prop="visitTime" width="180">
<el-table-column align="center" type="selection" width="55"/>
<el-table-column align="center" label="序号" min-width="80" show-overflow-tooltip type="index"/>
<el-table-column align="center" label="病历号" min-width="80" prop="medicalRecordNo" show-overflow-tooltip/>
<el-table-column align="center" label="宠物昵称" min-width="80" prop="petNickname" show-overflow-tooltip/>
<el-table-column align="center" label="宠物ID" prop="petsId" show-overflow-tooltip/>
<el-table-column align="center" label="宠主姓名" prop="petNickname" show-overflow-tooltip/>
<el-table-column align="center" label="宠主手机号" prop="petOwnerPhone" show-overflow-tooltip/>
<el-table-column align="center" label="归档医院" prop="hospitalName" show-overflow-tooltip/>
<el-table-column align="center" label="主治兽医" prop="doctorName" show-overflow-tooltip/>
<el-table-column align="center" label="所属科室" prop="hospitalDepartmentName" show-overflow-tooltip/>
<el-table-column align="center" label="就诊日期" prop="visitDate" show-overflow-tooltip width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.visitDate, '{y}/{m}/{d}') }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="宠物保险" prop="insure" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.visitTime, '{y}-{m}-{d}') }}</span>
<dict-tag :options="dict.type.pet_insure" :value="scope.row.insure"/>
</template>
</el-table-column>
<el-table-column align="center" show-overflow-tooltip label="宠物保险" prop="visitOffice" />
<el-table-column align="center" show-overflow-tooltip class-name="small-padding fixed-width" label="操作" min-width="180">
<el-table-column
align="center"
class-name="small-padding fixed-width"
label="操作"
min-width="180"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-button
v-hasPermi="['business:case:edit']"
v-hasPermi="['business:record:edit']"
icon="el-icon-document"
plain
size="mini"
......@@ -137,7 +156,7 @@
>详情
</el-button>
<el-button
v-hasPermi="['business:case:edit']"
v-hasPermi="['business:record:edit']"
icon="el-icon-edit"
plain
size="mini"
......@@ -167,6 +186,8 @@ import { listRecord } from '@/api/business/record'
export default {
name: 'MedicalRecordManagement',
// 数据字典
dicts: ['pet_insure'],
data() {
return {
doctorNameList: [],
......@@ -255,7 +276,7 @@ export default {
*/
async selectAll(selection = [], all = true) {
// 如果已经全选并且是非一直全选操作则清空选择
if (this.articleList.length !== selection.length && !all) {
if (this.recordList.length !== selection.length && !all) {
this.effectTableSelect([])
} else {
await this.changeTableSelect()
......@@ -271,6 +292,7 @@ export default {
*/
async changeTableSelect(notIncludeIds = []) {
// 获取反选的数据
// 需要一个可以根据条件和params.notIncludeIds排除部分数据的不分页查询的接口
const { data } = await listAllArticle({
...this.queryParams,
params: {
......@@ -311,12 +333,14 @@ export default {
getList() {
this.loading = true
listRecord(this.queryParams).then(response => {
this.recordList = response.rows
console.log('病历列表的数据:', response)
this.recordList = response.rows.rows
console.log('这是病历,我要开始取字段了!', this.recordList)
this.total = response.total
this.loading = false
// 取消按钮
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
......@@ -382,8 +406,9 @@ export default {
::v-deep .el-table .disabledCheck .cell .el-checkbox__inner {
display: none;
}
//顶部搜索框样式
.form-style{
.form-style {
margin-bottom: 20px;
}
</style>
......@@ -105,7 +105,7 @@ export default {
// 宠物表格数据
petsList: [],
// 遮罩层
loading: true,
loading: false,
// 查询参数
queryParams: {
// 导出列表
......@@ -134,7 +134,7 @@ export default {
}
},
created() {
this.getList()
// this.getList()
},
methods: {
/** 列表区--多选框选中数据 */
......@@ -184,6 +184,7 @@ export default {
this.loading = true
this.queryParams.params = { ...this.queryParams.params }
const queryParams = deepClone(this.queryParams)
if (queryParams.petCode || queryParams.ownerName || queryParams.phone) {
getPetInfo(queryParams).then(response => {
console.log('查询宠物宠主信息:', this.petsList)
this.petsList = response.rows
......@@ -192,6 +193,7 @@ export default {
})
}
}
}
}
</script>
......
......@@ -5,7 +5,7 @@
<div v-if="docList.length>0" class="doctor-card">
<!--标签-->
<div class="progress-tip">
<div class="tip-green" />
<div class="tip-green"/>
<div
class="tip-content"
>挂号信息
......@@ -53,16 +53,16 @@
</div>
</div>
<!--分割线-->
<div class="divider" />
<div class="divider"/>
<!--卡片中间部分-->
<div class="mid-bottom-framework">
<div
v-for="(item,index) in docList"
:key="index"
v-for="(pic,picIndex) in item.pictureUrl"
:key="`picIndex${picIndex}`"
class="mid-bottom"
>
<el-image
:src="baseURL+item.pictureUrl"
:src="baseURL+pic"
class="mid-bottom-inner"
fit="cover"
/>
......@@ -111,24 +111,24 @@
>
<div class="detail" @click="doctorDetail(item.id)">
<div class="detail-img">
<el-image :src="require('@/assets/register/xinzengguahao_xiangqing@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_xiangqing@2x.png')"/>
</div>
<el-button
type="text"
>详情
</el-button>
</div>
<!--给它传一个userId,一个类型和一个默认页数-->
<div class="register" @click="registration(item.userId,'0',item)">
<!--给它传一个userId,一个类型-->
<div class="register" @click="registration(item.userId,'0',item,0)">
<div class="register-img">
<el-image :src="require('@/assets/register/xinzengguahao_guahaohui@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_guahaohui@2x.png')"/>
</div>
<el-button type="text">挂号</el-button>
</div>
<!--给它传一个userId,一个类型和一个默认页数-->
<div class="add" @click="registration(item.userId, '1',item)">
<div class="add" @click="registration(item.userId, '1',item,0)">
<div class="add-img">
<el-image :src="require('@/assets/register/xinzengguahao_jiahao@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_jiahao@2x.png')"/>
</div>
<el-button type="text">加号</el-button>
</div>
......@@ -140,7 +140,7 @@
<div v-else class="doctor-card">
<!--标签-->
<div class="progress-tip">
<div class="tip-green" />
<div class="tip-green"/>
<div
class="tip-content"
>挂号信息
......@@ -148,12 +148,29 @@
</div>
<!-- 详细内容-->
<div>
<div style=" margin: 20px; height: 200px; border: 1px solid #d6d7d7;">
<div style="margin-left:45%;margin-top: 5%;">
<div style=" width:50px;height: 50px;">
<el-image :src="require('@/assets/register/zanwushuju.png')" />
<div
style=" margin: 20px;
height: 303px;
background: #FFFFFF;
opacity: 1;
border: 1px solid #E5E5E5;
"
>
<div
style=" display: flex;
align-items: center;
flex-direction: column;margin-top: 9%;"
>
<div style=" width:115px;height: 74px;">
<el-image :src="require('@/assets/register/guahao_img_wushuju@2x.png')"/>
</div>
<div
style="font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 400;
color: #AFAFAF;"
>暂无数据
</div>
<div style="color: #b2b2b2">暂无数据</div>
</div>
</div>
</div>
......@@ -200,8 +217,8 @@ export default {
this.$emit('doctorDetail', id.toString())
},
/** 显示挂号/加号弹窗*/
registration(userId, type, data) {
this.$emit('registration', { id: userId.toString(), type, data })
registration(userId, type, data, cur) {
this.$emit('registration', { id: userId.toString(), type, data, cur })
}
}
}
......
<template>
<el-dialog
:before-close="closeModle"
:title="registrationType === 'usual' ? '挂号' : '加号'"
:title="registrationType === '0' ? '挂号' : '加号'"
:visible.sync="isShow"
append-to-body
class="register-modle"
......@@ -9,11 +9,11 @@
>
<el-form ref="queryForm" :inline="true" :model="queryParams" label-width="100px" size="small">
<el-form-item label="主治兽医:" prop="petNickname">
<el-input v-model="queryParams.mainDoctor"/>
<el-input v-model="singleDoctor.doctorName" disabled />
</el-form-item>
<el-form-item label="是否首诊:" prop="petSex">
<el-select
v-model="queryParams.fristVisit"
v-model="queryParams.firstVisit"
clearable
placeholder="请选择首诊情况"
style="width: 100%"
......@@ -43,9 +43,9 @@
<span>{{ parseTime(scope.row.workDate, '{y}/{m}/{d}') }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="时段" min-width="80" prop="hours" show-overflow-tooltip/>
<el-table-column align="center" label="总放号数" min-width="80" prop="allCount" show-overflow-tooltip/>
<el-table-column align="center" label="剩余号数" min-width="80" prop="residueCount" show-overflow-tooltip/>
<el-table-column align="center" label="时段" min-width="80" prop="hours" show-overflow-tooltip />
<el-table-column align="center" label="总放号数" min-width="80" prop="allCount" show-overflow-tooltip />
<el-table-column align="center" label="剩余号数" min-width="80" prop="residueCount" show-overflow-tooltip />
<el-table-column
align="center"
label="门诊诊查费"
......@@ -54,14 +54,15 @@
show-overflow-tooltip
/>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" min-width="160">
<template slot-scope="scope">
<template #default="{row}">
<el-button
:disabled="!inTimeRange(row.hours.split('~')[0], row.hours.split('~')[1])"
icon="el-icon-document"
plain
size="mini"
style="width: 80px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(95,181,75);"
type="success"
@click="addReservation(scope.row)"
@click="addReservation(row)"
>立即预约
</el-button>
</template>
......@@ -73,6 +74,8 @@
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
@current-change="handleCurrentChange"
@pagination="getRegisterMsg"
/>
<div slot="footer" class="dialog-footer">
<el-button @click="closeModle"> </el-button>
......@@ -83,6 +86,7 @@
<script>
import { addRegister, checkPet, timeRegister } from '@/api/business/register'
import { parseTime } from '@/utils/ruoyi'
import moment from 'moment'
export default {
name: 'RegisterModle',
......@@ -95,10 +99,14 @@ export default {
type: String,
default: 'usual'
},
// 医生id用来获取详情等信息(挂号)
doctorId: {
type: String
}, // 医生id用来获取详情等信息(挂号)
type: Number
},
// 当前页
// currentPage: {
// type: Number
// },
// 新增挂号宠物的所有信息
doctorForm: {
type: Object
......@@ -131,17 +139,19 @@ export default {
loading: true,
queryParams: {
mainDoctor: '',
firstVisit: '0'
firstVisit: '0',
pageNum: 1,
pageSize: 10
},
fristVisitOptions: [
{
label: '是',
value: 1
value: '1'
},
{
label: '否',
value: 0
value: '0'
}
]
}
......@@ -152,18 +162,60 @@ export default {
this.getRegisterMsg()
}
},
created() {
// 获取当前时间
this.currentTime()
this.getRegisterMsg()
},
methods: {
/**
* 获取当前时间
*/
currentTime() {
// TODO: 请清除该行输出
console.log(`这是我需要的当前时间:`, moment().format('YYYY/MM/DD HH:mm:ss'))
},
/**
* 判断当前时间是否在传入的时间范围中
* @param start 开始时间 时:分
* @param end 结束时间 时:分
*/
inTimeRange(start, end) {
const current = moment()
const startTime = moment({ hour: start.split(':')[0], minute: start.split(':')[1] })
const endTime = moment({ hour: end.split(':')[0], minute: end.split(':')[1] })
// TODO: 请清除该行输出
console.log(`current`, current.format('YYYY/MM/DD HH:mm:ss'))
// TODO: 请清除该行输出
console.log(`startTime.format('YYYY/MM/DD HH:mm:ss')`, startTime.format('YYYY/MM/DD HH:mm:ss'))
// TODO: 请清除该行输出
console.log(`endTime.format('YYYY/MM/DD HH:mm:ss')`, endTime.format('YYYY/MM/DD HH:mm:ss'))
return current.isBetween(startTime, endTime, 'minute')
},
parseTime,
// 获取相应id的医生详情
/**
* 获取医生当日排班列表
* currentPage默认值为0,是加号弹出框时的逻辑(registrationType = 1为加号)
* 在初次进入加号时currentPage字段保证后台返回当时页面
* 再次点击分页按钮后按照正常页面传值 currentPage被赋值大于0
* */
getRegisterMsg() {
console.log('HHHHHHHHHHHHHHHUUUUUUUUUUUUUUUUUU', this.doctorId, this.currentPage, this.registrationType)
console.log('getRegisterMsg', this.doctorId, this.currentPage, this.registrationType)
timeRegister({
userId: this.doctorId,
type: this.registrationType,
currentPage: this.currentPage
currentPage: this.currentPage,
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize
}).then(response => {
console.log('哈哈哈哈哈哈哈:', response)
console.log('哈哈哈哈dsds哈哈哈:', response)
this.petsList = response.rows.rows
console.log('这是预约数据:', this.petsList)
this.total = response.total
if (this.registrationType === '1' && this.currentPage === 0) {
this.queryParams.pageNum = response.rows.currentPage
this.currentPage = response.rows.currentPage
}
})
},
// 新增预约接口
......@@ -173,13 +225,16 @@ export default {
console.log('这是宠物宠主本身的信息:', this.doctorForm)
console.log('这是当日挂号列表信息 :', this.singleDoctor)
console.log('这就是被父级传过来的宠主和名下宠物列表信息:', this.petForm)
if (this.doctorForm.petsId === '-') {
this.doctorForm.petsId = null
}
// 进度
const temp = {
// 给接口所需的宠物赋值
petOwnerBo: this.petForm,
type: this.registrationType,
// 宠物宠主本身的信息
petsId: null,
petsId: this.doctorForm.petsId || null,
petType: this.doctorForm.petStatus,
petOwnersId: this.doctorForm.ownerId,
ownersId: this.doctorForm.ownersId,
......@@ -196,7 +251,7 @@ export default {
insure: this.doctorForm.insure,
// 进度
checkSchedule: '0',
payAmount: null,
payAmount: this.singleDoctor.examinationFee,
payType: '0',
// 这是当日挂号列表信息
doctorId: this.singleDoctor.doctorCode,
......@@ -226,35 +281,33 @@ export default {
doctorTitleLabel: this.singleDoctor.doctorTitleValue
}
console.log('终极大表', temp)
// 进入挂号页面先获取是否有重复的宠物数据
// 进入挂号页面先获取是否有重复的宠物数据--选择宠物不需要
if (this.doctorForm.petStatus === '0') {
checkPet(temp).then(({ msg }) => {
console.log('aaa,这是关键判断是否已存在宠物的数据', msg)
if (msg) {
this.$modal.confirm('当前宠物已经存在是否覆盖数据')
.then(_ => {
addRegister(temp).then(response => {
console.log('这是确认完成后调用新增挂号的数据返参', response)
this.$message({
type: 'success',
message: '预约成功!'
})
this.$emit('registerModleClose', false)
this.submit(temp)
})
} else {
this.submit(temp)
}
})
} else {
addRegister(temp).then(response => {
this.submit(temp)
}
},
submit(data) {
addRegister(data).then(response => {
console.log('这是确认不存在后调用新增挂号的数据返参', response)
this.$message({
type: 'success',
message: '预约成功!'
})
this.$emit('registerModleClose', false)
this.$emit('registerModleClose', { type: 'addRegisterSuccess', id: response.data.id })
})
}
})
},
submit() {
},
/** 关闭弹窗*/
closeModle() {
......@@ -277,7 +330,7 @@ export default {
},
/** 功能按钮--搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
// this.queryParams.pageNum = 1
// 重置选择
this.effectTableSelect([])
this.getList()
......
......@@ -3,7 +3,7 @@
<div class="schedule-info">
<!-- 1--tip样式-->
<div class="progress-tip">
<div class="tip-green" />
<div class="tip-green"/>
<div
class="tip-content"
>进度信息
......@@ -13,7 +13,7 @@
<div class="progress-base">
<div class="display-base">
<!-- 1--单个的背景,,后面按状态位切换样式-->
<div class="bkg-on">
<div :class="[scheduleKey.checkSchedule === '0'? 'bkg-on' : 'bkg-off']">
<!--1.预约/现场挂号-->
<div
class="content-inner"
......@@ -21,25 +21,23 @@
<div
class="avatar"
>
<el-image :src="require('@/assets/register/xinzengguahao_yuyue@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_yuyue@2x.png')"/>
</div>
<div
class="title"
>1.预约/现场挂号
</div>
<div
class="status-on"
>进行中
</div>
<div class="status-on" v-if="scheduleKey.registrationTime!=null">{{ scheduleKey.registrationTime }}</div>
<div class="status-off" v-else>暂未挂号</div>
</div>
</div>
<!-- 箭头指示-->
<div class="arrow">
<el-image :src="require('@/assets/register/xinzengguahao_jaintou@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_jaintou@2x.png')"/>
</div>
<!-- 2--单个的背景,,后面按状态位切换样式-->
<div
class="bkg-off"
:class="[scheduleKey.checkSchedule === '1'? 'bkg-on' : 'bkg-off']"
>
<!--2.录入诊断信息-->
<div
......@@ -48,80 +46,83 @@
<div
class="avatar"
>
<el-image :src="require('@/assets/register/xinzengguahao_luru@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_luru@2x.png')"/>
</div>
<div
class="title"
>2.录入诊断信息
</div>
<div
class="status-off"
>暂未录入
</div>
<div class="status-on" v-if="scheduleKey.diagnosisTime!=null">{{ scheduleKey.diagnosisTime }}</div>
<div class="status-off" v-else>暂未录入</div>
</div>
</div>
<!-- 箭头指示-->
<div class="arrow">
<el-image :src="require('@/assets/register/xinzengguahao_jaintou@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_jaintou@2x.png')"/>
</div>
<!-- 3--单个的背景,,后面按状态位切换样式-->
<div
class="bkg-off"
:class="[scheduleKey.checkSchedule === '2'? 'bkg-on' : 'bkg-off']"
>
<!--3.开具处方单-->
<!--3.生成病例报告-->
<div
class="content-inner"
>
<div
class="avatar"
>
<el-image :src="require('@/assets/register/xinzengguahao_kaichuangfdan@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_shengchengbaogao@2x.png')"/>
</div>
<div
class="title"
>3.开具处方单
</div>
<div
class="status-off"
>暂未开具
>3.生成病例报告
</div>
<div class="status-on" v-if="scheduleKey.reportTime!=null">{{ scheduleKey.reportTime }}</div>
<div class="status-off" v-else>暂未生成</div>
</div>
</div>
<!-- 箭头指示-->
<div class="arrow">
<el-image :src="require('@/assets/register/xinzengguahao_jaintou@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_jaintou@2x.png')"/>
</div>
<!-- 4--单个的背景,,后面按状态位切换样式-->
<div
class="bkg-off"
:class="[scheduleKey.checkSchedule === '3'? 'bkg-on' : 'bkg-off']"
>
<!--4.生成病例报告-->
<!--4.开具处方单-->
<div
class="content-inner"
>
<div
class="avatar"
>
<el-image :src="require('@/assets/register/xinzengguahao_shengchengbaogao@2x.png')" />
<el-image :src="require('@/assets/register/xinzengguahao_kaichuangfdan@2x.png')"/>
</div>
<div
class="title"
>4.生成病例报告
</div>
<div
class="status-off"
>暂未生成
>4.开具处方单
</div>
<div class="status-on" v-if="scheduleKey.recipelTime!=null">{{ scheduleKey.recipelTime }}</div>
<div class="status-off" v-else>暂未开具</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'ScheduleInfo'
name: 'ScheduleInfo',
props: {
scheduleKey: {
type: Object
},
data() {
return {}
}
}
}
</script>
......@@ -198,12 +199,14 @@ export default {
font-weight: 400;
color: #AFAFAF;
}
//头像
.avatar {
width: 44px;
height: 44px;
margin-bottom: 14px;
}
//标题
.title {
font-size: 14px;
......@@ -212,6 +215,7 @@ export default {
color: #333333;
margin-bottom: 14px;
}
//预约/挂号
.content-inner {
display: flex;
......
......@@ -26,12 +26,12 @@
<el-row :gutter="41">
<el-col :span="8">
<el-form-item label="宠物ID:" prop="petsId">
<el-input v-model="form.petsId" :disabled="true" maxlength="20"/>
<el-input v-model="form.petsId" :disabled="true" maxlength="20" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宠物昵称:" prop="petNickname">
<el-input v-model="form.petNickname" :disabled="!isEdit" maxlength="20" placeholder="请输入宠物昵称"/>
<el-input v-model="form.petNickname" :disabled="!isEdit" maxlength="20" placeholder="请输入宠物昵称" />
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -85,16 +85,20 @@
</el-col>
<el-col :span="8">
<el-form-item label="宠物体重:" prop="petWeight">
<div style="display: flex;margin-right: 2px;">
<div>
<el-input
v-model="form.petWeight"
:disabled="!isEdit"
/>
<!-- <span class="pet-weight-single">kg</span>-->
</div>
<div>kg</div>
</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="宠物毛色:" prop="petColor">
<el-input v-model="form.petColor" :disabled="!isEdit" maxlength="20" placeholder="请输入宠物毛色"/>
<el-input v-model="form.petColor" :disabled="!isEdit" maxlength="20" placeholder="请输入宠物毛色" />
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -160,7 +164,7 @@
<el-row v-if="isEdit && !showPetInfo" :gutter="41">
<el-col :span="8">
<el-form-item label="宠主手机号:" prop="masterPhone">
<el-input v-model="form.masterPhone" :disabled="!isEdit" maxlength="11" @blur="checkOwner"/>
<el-input v-model="form.masterPhone" :disabled="!isEdit" maxlength="11" @blur="checkOwner" />
</el-form-item>
</el-col>
</el-row>
......@@ -209,15 +213,17 @@
</el-form>
<!--进度信息-->
<schedule-info/>
<schedule-info :schedule-key="scheduleKey" />
<!-- 医生卡片-->
<doctor-card @doctorDetail="handleDoctor" @registration="handleRegister"/>
<doctor-card @doctorDetail="handleDoctor" @registration="handleRegister" />
<!-- 宠物选择弹框-->
<choose-pet :is-show="showPetModle" @petChoose="petChoose" @petModleClose="closePetModle"/>
<choose-pet :is-show="showPetModle" @petChoose="petChoose" @petModleClose="closePetModle" />
<!-- 医生详情弹出框 -->
<doctor-detail :doctor-id="doctorId" :is-show="showDoctorModle" @doctorModleClose="closeDoctorModle"/>
<doctor-detail :doctor-id="doctorId" :is-show="showDoctorModle" @doctorModleClose="closeDoctorModle" />
<!-- 挂号/加号弹出框-->
<register-modle
v-if="showRegistrationModle"
:current-page="currentPage"
:doctor-form="test"
:doctor-id="doctorIdNd"
:is-show="showRegistrationModle"
......@@ -228,8 +234,7 @@
/>
<!-- 选择宠物-->
<div slot="footer" class="dialog-footer">
<el-button class="queryBtn" icon="el-icon-check" @click="submitForm">提 交</el-button>
<el-button class="resetBtn" icon="el-icon-back" @click="cancel">返 回</el-button>
<el-button class="resetBtn" icon="el-icon-back" @click="goBack">返 回</el-button>
</div>
</div>
</template>
......@@ -255,6 +260,8 @@ export default {
},
data() {
return {
// 进度
scheduleKey: { checkSchedule: '0' },
// 宠物出生日期校验
pickerOptions: {
disabledDate(time) {
......@@ -266,9 +273,10 @@ export default {
showPetInfo: false, // 回显宠主详细信息
doctorId: '', // 医生id用来获取详情等信息(详情)
// 医生id用来获取详情等信息(挂号+加号)
doctorIdNd: '',
petForm: '',
registrationType: 'usual', // 挂号/加号
doctorIdNd: 0,
petForm: {},
registrationType: '0', // 挂号/加号
currentPage: 0,
isEdit: false, // 表单是否可编辑 默认不可编辑
statusList: [
{
......@@ -294,7 +302,7 @@ export default {
petColor: '',
sterilizationStatus: '',
vaccineSituation: '',
petInsure: '',
insure: '',
// 宠主信息开始
masterPhone: '',
nickName: '',
......@@ -317,6 +325,34 @@ export default {
showDoctorModle: false, // 医生详情弹出框
showRegistrationModle: false, // 挂号详情弹出框
rules: {
// 宠物昵称非空校验
petNickname: [
{ required: true, message: '宠物昵称不能为空', trigger: 'change' }
],
// 宠物性别非空校验
petSex: [
{ required: true, message: '宠物性别不能为空', trigger: 'change' }
],
// 宠物生日非空校验
petBirthday: [
{ required: true, message: '宠物生日不能为空', trigger: 'change' }
],
// 宠物体重非空校验
petWeight: [
{ required: true, message: '宠物体重不能为空', trigger: 'change' }
],
// 绝育情况非空校验
sterilizationStatus: [
{ required: true, message: '绝育情况不能为空', trigger: 'change' }
],
// 疫苗情况非空校验
vaccineSituation: [
{ required: true, message: '疫苗情况不能为空', trigger: 'change' }
],
// 保险情况非空校验
insure: [
{ required: true, message: '保险情况不能为空', trigger: 'change' }
],
poName: [{ required: true, message: '诊位名称不能为空', trigger: 'change' },
{ min: 2, max: 20, message: '诊位名称必须介于 2 和 20 之间', trigger: 'change' },
{ pattern: /([\u4e00-\u9fa5]|[a-z]+|[0-9]+)/g, message: '诊位名称为中英文数字', trigger: 'change' }],
......@@ -338,7 +374,7 @@ export default {
petColor: '',
sterilizationStatus: '',
vaccineSituation: '',
petInsure: ''
insure: ''
}
Object.assign(this.form, temp)
......@@ -348,6 +384,10 @@ export default {
this.getpesonlist()
},
methods: {
/** 返回跳转列表页 */
goBack() {
this.$router.push('/service-management/registration-queue')
},
/** 根据手机号判断宠主是否存在,不存在新增宠主 回显宠主信息*/
checkOwner() {
checkPetOwner({ phone: this.form.masterPhone }).then(response => {
......@@ -373,6 +413,7 @@ export default {
// 选择新增宠物,使表单可编辑
handleAdd() {
this.isEdit = true
this.showPetInfo = false
this.showPetModle = false
this.form.petStatus = '0'
console.log('给预约挂号传的宠物状态:', this.form.petStatus)
......@@ -381,7 +422,7 @@ export default {
handleChoose() {
this.isEdit = false
this.showPetModle = true
this.form.petStatus = '1'
this.form.petStatus = '2'
console.log('给预约挂号传的宠物状态:', this.form.petStatus)
},
/** 关闭选择宠物回调*/
......@@ -402,7 +443,7 @@ export default {
petColor: petData.petColor,
sterilizationStatus: petData.sterilizationStatus,
vaccineSituation: petData.vaccineSituation,
petInsure: petData.insure,
insure: petData.insure,
nickName: petOwnerBo.nickName,
phoneNumber: petOwnerBo.phoneNumber,
ownersId: petOwnerBo.ownersId,
......@@ -413,6 +454,8 @@ export default {
cardBalance: petOwnerBo.cardBalance
}
Object.assign(this.form, temp)
this.petForm = petOwnerBo
this.form['ownerId'] = petOwnerBo.id
this.showPetInfo = true
},
/** 医生详情 */
......@@ -425,35 +468,34 @@ export default {
closeDoctorModle() {
this.showDoctorModle = false
},
/** 关闭挂号回调*/
closeRegisterModle(data) {
this.showRegistrationModle = false
if (data && data.type === 'addRegisterSuccess') {
this.$router.push(`/service-management/registration-detail/${data.id}/detail`)
}
},
/** 提交按钮*/
submitForm() {
console.log('这是提交按钮!')
},
/** 挂号详情 */
handleRegister(params) {
this.$refs['from'].validate(valid => {
if (valid) {
console.log('params', params)
this.showRegistrationModle = true
this.doctorIdNd = params.id
this.doctorIdNd = params.data.userId
console.log('超级超级超级超级重要!!!', this.doctorIdNd)
this.registrationType = params.type
this.singleDoctor = params.data
this.currentPage = params.cur
this.test = { ...this.form }
this.choosePetTest = { ...this.chooseForm }
console.log('this.form', this.form)
console.log('this.form', this.chooseForm)
},
/** 关闭挂号回调*/
closeRegisterModle() {
this.showRegistrationModle = false
},
submitForm() {
console.log('表单参数', this.form)
this.$refs['from'].validate(valid => {
if (valid) {
// addPosition(this.form).then(res => {
// console.log('添加后的信息', res)
// if (res.code === 200) {
// this.$router.push({
// path: '/administrative-management/position-management'
// })
// this.$message.success('操作成功')
// }
// })
console.log('this.test', this.test)
}
})
},
......
......@@ -69,8 +69,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8091`,
target: `http://114.67.241.140:8091`,
target: `http://localhost:8091`,
// target: `http://114.67.241.140:8091`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
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