Browse Source

单人改约和取消预约完成

360view
bianyaqi 2 years ago
parent
commit
fdbfad9049
  1. 95
      src/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue
  2. 245
      src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue
  3. 273
      src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/number-detail-manage.vue
  4. 24
      src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue

95
src/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue

@ -20,38 +20,28 @@
</div>
<el-form-item label="负责医生:">
<el-col :span="12">
<el-select v-model="form.doctor" placeholder="请选择">
<el-select v-model="form.doctorId" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in doctorList"
:key="item.employeeId"
:label="item.realName"
:value="item.employeeId"
/>
</el-select>
</el-col>
<el-col :span="12" style="display: flex;align-items: center">
已开医嘱:
<div class="radioItem" @click="form.mydriasis='是'">
<input :checked="form.mydriasis==='是'" type="radio">
<div class="radioItem" @click="form.docAdvice=true">
<input :checked="form.docAdvice" type="radio">
</div>
<div class="radioItem" @click="form.mydriasis='否'">
<input :checked="form.mydriasis==='否'" type="radio">
<div class="radioItem" @click="form.docAdvice=false">
<input :checked="!form.docAdvice" type="radio">
</div>
</el-col>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="form.remark" autosize type="textarea" />
</el-form-item>
<el-form-item label="负责医生:">
<el-select v-model="form.doc" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<div style="display: flex;padding:0 0 20px 20px">
<el-col :span="10" style="display: flex;align-items: center">
眼别:
@ -67,10 +57,10 @@
</el-col>
<el-col :span="7" style="display: flex;align-items: center">
散瞳:
<div class="radioItem" @click="form.mydriasis=!form.mydriasis">
<div class="radioItem" @click="form.mydriasis=true">
<input :checked="form.mydriasis" type="radio">
</div>
<div class="radioItem" @click="form.mydriasis=!form.mydriasis">
<div class="radioItem" @click="form.mydriasis=false">
<input :checked="!form.mydriasis" type="radio">
</div>
</el-col>
@ -85,13 +75,11 @@
</el-col>
</div>
<el-form-item required label="预约时间:">
<el-col :span="11">
<el-date-picker v-model="form.date" type="date" placeholder="选择日期" style="width: 100%;" />
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="11">
<el-time-picker v-model="form.date2" placeholder="选择时间" style="width: 100%;" />
</el-col>
<el-date-picker
v-model="form.date"
type="datetime"
placeholder="选择日期时间"
/>
</el-form-item>
</el-form>
</my-dialog>
@ -125,42 +113,53 @@ export default {
doctor: '',
docAdvice: '',
remark: '',
doc: '',
doctorId: '',
eyeLevel: '',
mydriasis: false,
miosis: '',
date: '',
date2: ''
date: ''
},
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}]
doctorList: []
}
},
watch: {
isShow(val) {
this.show = val
},
'patientInfo.id'() {
this.$nextTick(() => {
this.form.doctorId = this.patientInfo.doctorId
this.form.doctorName = this.patientInfo.doctorName
this.form.date = this.patientInfo.appointDate
})
}
},
created() {
this.getDoctorList()
},
methods: {
getDoctorList() {
this.$http.get('/sys/user', { params: { position: '门诊医师' }}).then(data => {
this.doctorList = data.data.data
})
},
closeDialog(val) {
this.$emit('close', val)
},
handleSave() {
this.closeDialog()
const params = {
appointDate: this.$moment(this.form.date).format('YYYY-MM-DD HH:mm:ss'),
doctorId: this.form.doctorId,
doctorName: this.form.doctorName,
patientId: this.patientInfo.patientId,
patientName: this.patientInfo.patientName,
id: this.patientInfo.id
}
this.$http.post('/appoint/updateAppointInfo', params).then(() => {
this.$message.success('修改成功')
this.$emit('editSuccess')
this.closeDialog()
})
}
}
}

245
src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue

@ -54,7 +54,7 @@
<!-- <div class="list-img">
<img src="@/assets/img/avatar.png" alt="">
</div> -->
<p>{{ item.doctorName }}</p>
<p>{{ item.itemName }}</p>
</div>
</div>
</el-col>
@ -62,10 +62,10 @@
<div class="surplu-num">
<div v-show="sortName==='保存设置'" class="surplu-num-morning">
<div class="morning">
<el-input v-model="weekInfoItem.morning.numSourceTotal" placeholder="" @change="changeInput($event,index,weekInfoIndex,'morning')" />
<el-input v-model="weekInfoItem.morning.maxNumber" placeholder="" @change="changeInput($event,index,weekInfoIndex,'morning')" />
</div>
</div>
<div v-show="sortName==='批量排台'" class="surplu-num-morning">
<div v-show="sortName==='预约配置'" class="surplu-num-morning">
<!-- 上午预定后 -->
<div
v-show="selectedShow && weekInfoItem.date == rowListObj.operaDate && rowListObj.mainDoctorName == item.doctorName && rowListObj.morOrAft===1"
@ -83,20 +83,20 @@
@mouseover.stop="mouseoverHandle(index,weekInfoIndex,weekInfoItem,'morning')"
@mouseout="mouseoutHandle"
>
<p v-show="weekInfoItem.morning.numSourceTotal<=0" class="none"></p>
<p v-show="!weekInfoItem.morning.isAppoint" class="none"></p>
<div
v-show="weekInfoItem.morning.numSourceTotal>0 && (weekInfoItem.morning.numSourceTotal == weekInfoItem.morning.orderNum)"
v-show="weekInfoItem.morning.isAppoint && (weekInfoItem.morning.maxNumber == weekInfoItem.morning.orderNum)"
class="yue-man"
>
<p>约满</p>
<p>{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.numSourceTotal }}</p>
<p>{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.maxNumber }}</p>
</div>
<div
v-show="weekInfoItem.morning.numSourceTotal>0 && (weekInfoItem.morning.numSourceTotal > weekInfoItem.morning.orderNum) "
v-show="weekInfoItem.morning.isAppoint && (weekInfoItem.morning.maxNumber > weekInfoItem.morning.orderNum) "
class="yi-yue"
>
<p>已约</p>
<p>{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.numSourceTotal }}</p>
<p>{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.maxNumber }}</p>
</div>
<!-- 判断上午号是否有剩余加号显示暂时不用v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='morning' && weekInfoItem.morning.surplusNum>0" -->
<div
@ -104,7 +104,7 @@
class="show-plus-one"
>
<p @click="numberMangeClick(item,weekInfoItem,1,'排台详情')">详情</p>
<p @click="numberMangeClick(item,weekInfoItem,1,'排台管理')">排台管理</p>
<!-- <p @click="numberMangeClick(item,weekInfoItem,1,'排台管理')">排台管理</p>-->
</div>
<div
v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='morning'&& title =='plus'"
@ -116,10 +116,10 @@
</div>
<div v-show="sortName==='保存设置'" class="surplu-num-after">
<div class="after">
<el-input v-model="weekInfoItem.after.numSourceTotal" placeholder="" @change="changeInput($event,index,weekInfoIndex,'after')" />
<el-input v-model="weekInfoItem.after.maxNumber" placeholder="" @change="changeInput($event,index,weekInfoIndex,'after')" />
</div>
</div>
<div v-show="sortName==='批量排台'" class="surplu-num-after">
<div v-show="sortName==='预约配置'" class="surplu-num-after">
<!-- 下午预定后 -->
<div
v-show="selectedShow && weekInfoItem.date == rowListObj.operaDate && rowListObj.mainDoctorName == item.doctorName && rowListObj.morOrAft===2"
@ -138,20 +138,20 @@
@mouseover.stop="mouseoverHandle(index,weekInfoIndex,weekInfoItem,'after')"
@mouseout="mouseoutHandle"
>
<p v-show="weekInfoItem.after.numSourceTotal<=0" class="none"></p>
<p v-show="!weekInfoItem.after.isAppoint" class="none"></p>
<div
v-show="weekInfoItem.after.numSourceTotal>0 && (weekInfoItem.after.numSourceTotal == weekInfoItem.after.orderNum)"
v-show="weekInfoItem.after.isAppoint && (weekInfoItem.after.maxNumber == weekInfoItem.after.orderNum)"
class="yue-man"
>
<p>约满</p>
<p>{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.numSourceTotal }}</p>
<p>{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.maxNumber }}</p>
</div>
<div
v-show="weekInfoItem.after.numSourceTotal>0 && (weekInfoItem.after.numSourceTotal > weekInfoItem.after.orderNum) "
v-show="weekInfoItem.after.isAppoint && (weekInfoItem.after.maxNumber > weekInfoItem.after.orderNum) "
class="yi-yue"
>
<p>已约</p>
<p>{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.numSourceTotal }}</p>
<p>{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.maxNumber }}</p>
</div>
<!-- 判断下午好是否有剩余加号显示暂时不用v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='after' && weekInfoItem.after.surplusNum>0 -->
<div
@ -159,7 +159,7 @@
class="show-plus-one"
>
<p @click="numberMangeClick(item,weekInfoItem,2,'排台详情')">详情</p>
<p @click="numberMangeClick(item,weekInfoItem,2,'排台管理')">排台管理</p>
<!-- <p @click="numberMangeClick(item,weekInfoItem,2,'排台管理')">排台管理</p>-->
</div>
<div
v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && mouseMoveIsShow && showMorningAfterText==='after' && title =='plus'"
@ -189,7 +189,7 @@
@getScheduleList="getScheduleList"
@rowList="rowList"
/>
<setOperaTime
<setOperaTime--
v-if="setOperaTimeVisible"
ref="setOperaTimeRef"
:source-flag="sourceFlag"
@ -276,12 +276,12 @@ export default {
doctorName: "刘灿",
weekInfo: [{
after: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 10,
scheduledPatients: [],
},
morning: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 5,
scheduledPatients: [],
},
@ -289,12 +289,12 @@ export default {
weekName: "周一",
},{
after: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
morning: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
@ -302,12 +302,12 @@ export default {
weekName: "周二",
},{
after: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
morning: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
@ -315,12 +315,12 @@ export default {
weekName: "周三",
},{
after: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
morning: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
@ -328,12 +328,12 @@ export default {
weekName: "周四",
},{
after: {
numSourceTotal: 10,
maxNumber: 10,
orderNum: 0,
scheduledPatients: [],
},
morning: {
numSourceTotal: 10,
maxNumber: 10,
orderNum: 0,
scheduledPatients: [],
},
@ -341,12 +341,12 @@ export default {
weekName: "周五",
},{
after: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
morning: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
@ -354,12 +354,12 @@ export default {
weekName: "周六",
},{
after: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
morning: {
numSourceTotal: 0,
maxNumber: 0,
orderNum: 0,
scheduledPatients: [],
},
@ -370,7 +370,8 @@ export default {
patientList: [],
rowListObj: {},
operaTypeList: [],
sortName:'预约配置'
sortName:'预约配置',
projectList:[]
};
},
filters: {
@ -407,26 +408,93 @@ export default {
this.initData(null);
this.getScheduleList()
},
methods: {
getProjectSetting(){
this.$http.get('/appoint/itemList',{
params:{
limit:10,
page:1
}
}).then( data =>{
this.projectList = data.data.data.list
this.handleIsAppiont()
})
},
//
handleIsAppiont(){
this.doctorList.forEach(item=>{
const weekInfo = this.projectList.find(pro=>pro.itemId===item.itemId)
item.weekInfo.forEach(week=>{
weekInfo.openVoList.forEach(open=>{
if (open.time==='上午'){
switch (week.weekName){
case '周一':
this.$set(week.morning,'isAppoint',open.monTime)
break
case '周二':
this.$set(week.morning,'isAppoint',open.tuesTime)
break
case '周三':
this.$set(week.morning,'isAppoint',open.wedTime)
break
case '周四':
this.$set(week.morning,'isAppoint',open.thurTime)
break
case '周五':
this.$set(week.morning,'isAppoint',open.friTime)
break
case '周六':
this.$set(week.morning,'isAppoint',open.satTime)
break
case '周日':
this.$set(week.morning,'isAppoint',open.sunTime)
break
}
}else{
switch (week.weekName){
case '周一':
this.$set(week.after,'isAppoint',open.monTime)
break
case '周二':
this.$set(week.after,'isAppoint',open.tuesTime)
break
case '周三':
this.$set(week.after,'isAppoint',open.wedTime)
break
case '周四':
this.$set(week.after,'isAppoint',open.thurTime)
break
case '周五':
this.$set(week.after,'isAppoint',open.friTime)
break
case '周六':
this.$set(week.after,'isAppoint',open.satTime)
break
case '周日':
this.$set(week.after,'isAppoint',open.sunTime)
break
}
}
})
})
})
},
changeInput(e,index,weekInfoIndex,morOrAft) {
// console.log(typeof Number(e));
// console.log(e);
var pattern = /^[0-9][0-9]*$/
var regex=/^[0]+/
this.doctorList[index].weekInfo[weekInfoIndex][morOrAft].numSourceTotal = e.replace(regex,"");
this.doctorList[index].weekInfo[weekInfoIndex][morOrAft].maxNumber = e.replace(regex,"");
if (!pattern.test(e)) {
this.$message({
message: '只能输入正整数哦',
type: 'warning'
})
this.doctorList[index].weekInfo[weekInfoIndex][morOrAft].numSourceTotal = 0
this.doctorList[index].weekInfo[weekInfoIndex][morOrAft].maxNumber = 0
}
},
//
async getScheduleList() {
this.pageLoading = true
const { data: res } = await this.$http.get('/opera/schedule', {
const { data: res } = await this.$http.get('/appoint/getAppointCalendarInfo', {
params: {
searchDate: this.newDate,
}
@ -434,68 +502,24 @@ export default {
if (res.code === 0) {
this.pageLoading = false
this.doctorList = res.data
this.getProjectSetting()
} else {
this.pageLoading = false
this.$message.error(res.msg)
}
},
//
//
allPtClick() {
if(this.sortName === '批量排台') {
this.sortName = '保存设置'
// this.getBatchNumSet()
} else {
this.sortName = '批量排台'
// this.batchNumSave()
}
},
//
async getBatchNumSet() {
const loading = this.$loading({
lock: true,
text: '加载中请稍等...',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
})
const { data: res } = await this.$http.get('/num/source/set/getBatchNumSet', {
params: {
searchDate: this.newDate,
}
})
if (res.code === 0) {
loading.close()
this.doctorList = res.data
} else {
loading.close()
this.$message.error(res.msg)
}
},
//
async batchNumSave() {
const loading = this.$loading({
lock: true,
text: '保存中请稍等...',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
})
const {data:res} = await this.$http.post('num/source/set/batchNumSet',{
dtoList:this.doctorList,
searchDate:this.newDate
})
if(res.code===0) {
loading.close()
this.$message({
message: '保存成功',
type: 'success'
});
} else {
loading.close()
this.$message.error(res.msg)
}
// if(this.sortName === '') {
// this.sortName = ''
// // this.getBatchNumSet()
// } else {
// this.sortName = ''
// // this.batchNumSave()
// }
},
//
rowList(rowList) {
console.log(rowList);
this.rowListObj = rowList
this.$emit('rowList', rowList)
this.selectedShow = true
@ -518,7 +542,7 @@ export default {
const index = _.findIndex(that.days, function (o) {
return o.getDate() === new Date(that.newDate).getDate();
});
this.sortName === '批量排台' ? this.getScheduleList() : this.getBatchNumSet()
this.sortName === '预约配置' ? this.getScheduleList() : this.getBatchNumSet()
// console.log("index: ", index);
this.tabIndex = index;
},
@ -568,7 +592,7 @@ export default {
d.setDate(d.getDate() - 7);
this.initData(d);
this.newDate = dateFilterTwo(this.days[0])
this.sortName === '批量排台' ? this.getScheduleList() : this.getBatchNumSet()
this.sortName === '预约配置' ? this.getScheduleList() : this.getBatchNumSet()
},
//
@ -577,7 +601,7 @@ export default {
d.setDate(d.getDate() + 7);
this.initData(d);
this.newDate = dateFilterTwo(this.days[0])
this.sortName === '批量排台' ? this.getScheduleList() : this.getBatchNumSet()
this.sortName === '预约配置' ? this.getScheduleList() : this.getBatchNumSet()
},
//
pickPre(year, month) {
@ -618,13 +642,13 @@ export default {
//
mouseoverHandle(index, weekInfoIndex, weekInfoItem, showMorningAfterText) {
// console.log(weekInfoItem[showMorningAfterText]);
let numSourceTotal = weekInfoItem[showMorningAfterText].numSourceTotal
let maxNumber = weekInfoItem[showMorningAfterText].maxNumber
let orderNum = weekInfoItem[showMorningAfterText].orderNum
this.currentIndex = index
this.currentWeekIndex = weekInfoIndex
this.showMorningAfterText = showMorningAfterText
this.mouseMoveIsShow = this.title == 'plus' ? (numSourceTotal > 0 && numSourceTotal !== orderNum ? true : false) : true
this.mouseMoveIsShow = this.title == 'plus' ? (maxNumber > 0 && maxNumber !== orderNum ? true : false) : true
},
//
mouseoutHandle() {
@ -659,27 +683,20 @@ export default {
//
async numberMangeClick(item, weekInfoItem, morOrAft, title) {
this.numberMangeClickFun(item, weekInfoItem, morOrAft, title)
// if (this.title === 'plus' && this.titleButton !== '') {
// //
// const { data: res } = await this.$http.post('/num/source/authorDoctor', {
// doctorCode: item.doctorCode,
// operaVOList: this.operaTypeList
// })
// if (res.code === 0) {
// this.numberMangeClickFun(item, weekInfoItem, morOrAft, title)
// } else {
// this.$message.error(res.msg)
// }
// } else {
// this.numberMangeClickFun(item, weekInfoItem, morOrAft, title)
// }
},
numberMangeClickFun(item, weekInfoItem, morOrAft, title) {
this.numberManageVisible = true
this.$nextTick(() => {
console.log(weekInfoItem.date);
this.$refs.numberManageRef.mainDoctorName = item.doctorName
console.log(weekInfoItem);
console.log(item);
if (morOrAft===1){
this.$refs.numberManageRef.appointPatients = weekInfoItem.morning.appointPatients
this.$refs.numberManageRef.dateInfo = weekInfoItem.date + '上午'
}else {
this.$refs.numberManageRef.appointPatients = weekInfoItem.after.appointPatients
this.$refs.numberManageRef.dateInfo = weekInfoItem.date + '下午'
}
this.$refs.numberManageRef.projectName = item.itemName
this.$refs.numberManageRef.weekName = weekInfoItem.weekName
this.$refs.numberManageRef.morOrAft = morOrAft
this.$refs.numberManageRef.title = title

273
src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/number-detail-manage.vue

@ -1,130 +1,29 @@
<template>
<el-dialog top="30px" class="number-manage" append-to-body :visible.sync="visible" width="70%" :title="title" @close="closeDialog">
<div class="number-manage-head">
<div class="head-content">
<span class="head-content-left">
<span>医生姓名:</span>
<span>{{ doctorName }}</span>
</span>
<span class="head-content-right">
<span>排台日期:</span>
<span>{{ dataForm.operaDate }}</span>
<span>{{ weekName }}</span>
<span>{{ morOrAft===1 ? '上午' : '下午' }}</span>
</span>
</div>
</div>
<el-form v-if="title !=='排台详情'" ref="dataForm" :model="dataForm" :rules="dataRule" class="form-content">
<div class="form-one">
<el-form-item label="总数:" prop="total" label-width="70px" class="total-form">
<el-input-number
v-model="dataForm.total"
controls-position="right"
:min="1"
/>
</el-form-item>
</div>
<div class="button" @click="creatNumberClick">生成预约号</div>
</el-form>
<div class="number-list">
<el-table
ref="multipleTable"
class="number-table"
:highlight-current-row="title !=='排台管理' ? true : false"
:data="dataList"
tooltip-effect="dark"
style="width: 100%"
:height="title==='排台管理' ? '300px' : '450px'"
:row-class-name="tableRowClassName"
@row-click="rowClick"
@selection-change="handleSelectionChange"
>
<el-table-column v-if="title !=='排台详情'" type="selection" width="55" />
<el-table-column type="index" label="序号" />
<el-table-column prop="appointmentDate" label="预约日期" align="center" />
<el-table-column label="时间段" align="center">
<template slot-scope="scope">{{ scope.row.morOrAft===1 ? '上午' : '下午' }}</template>
</el-table-column>
<el-table-column label="预约时间" align="center">
<template slot-scope="scope">{{ scope.row.appointmentTime ? scope.row.appointmentTime.substr(0, 5) : '-' }}</template>
</el-table-column>
<template v-if="title=='排台详情'">
<el-table-column
prop="patientName"
label="姓名"
>
<template slot-scope="scope">{{ scope.row.patientName ? scope.row.patientName : '-' }}</template>
</el-table-column>
<el-table-column
prop="patientSex"
label="性别"
>
<template slot-scope="scope">{{ scope.row.patientSex ? scope.row.patientSex : '-' }}</template>
</el-table-column>
<el-table-column
prop="patientAge"
label="年龄"
>
<template slot-scope="scope">{{ scope.row.patientSex ? scope.row.patientAge : '-' }}</template>
</el-table-column>
</template>
<!-- 状态 0:可用1:已预约,2:已过时 -->
<el-table-column label="号源状态" prop="status" header-align="center" align="center">
<template slot-scope="scope">
<div v-show="scope.row.status == 0">
<span class="circle-status circle-blue" />
<span>可用</span>
</div>
<div v-show="scope.row.status == 1">
<span class="circle-status circle-green" />
<span>已预约</span>
</div>
<div v-show="scope.row.status == 2">
<span class="circle-status circle-red" />
<span>已过时</span>
</div>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" header-align="center" align="center">
<template slot-scope="scope">
<!-- 号源状态 0 可用 1 已预约 2 过时 -->
<span
v-if="title==='排台详情' && scope.row.status=== 1 && new Date(scope.row.appointmentDate + ' ' + (morOrAft=== 1 ? '12:00:00' : '20:00:00') ) > new Date()"
style="color: #1890ff; padding-right: 8px"
class="operation-details"
@click="editHandle(scope.row,'修改')"
>修改</span>
<span
v-if="title==='排台管理' && scope.row.status ===0 && new Date(scope.row.appointmentDate + ' ' + (morOrAft=== 1 ? '12:00:00' : '20:00:00') ) > new Date()"
style="color: #fd4d4f; padding-right: 8px"
class="operation-details"
@click="deleteHandle(scope.row)"
>删除</span>
<span
v-if="(title==='排台管理' && scope.row.status ===1) ||
(title==='排台详情' && scope.row.status ===0) ||
scope.row.status ===2 ||
new Date(scope.row.appointmentDate + ' ' + (morOrAft=== 1 ? '12:00:00' : '20:00:00') ) < new Date()"
></span>
</template>
</el-table-column>
</el-table>
</div>
<template v-if="title !=='排台详情'" slot="footer">
<div>
<el-button v-if="title==='排台管理' && dataList.length>0" type="danger" plain @click="batchDeleteClick">批量删除</el-button>
</div>
<el-dialog top="30px" class="number-manage" append-to-body :visible.sync="visible" width="50%" :title="title" @close="closeDialog">
<div slot="title">
<div>
<el-button @click="visible = false">关闭</el-button>
<div class="title_header">已约患者列表</div>
<div style="margin: 8px 0">{{ dateInfo }}</div>
<div>{{ projectName }}</div>
</div>
</template>
<editOperation
v-if="editOperationVisible"
ref="editOperationRef"
@closeDialog="editOperationVisible=false"
@getPatientList="getPatientList"
/>
</div>
<el-row style="margin-bottom: 15px">
<el-col style="margin: 8px" :span="11">
<el-button style="width: 100%" size="mini" icon="el-icon-plus" type="primary" @click="addOrder">新增预约</el-button>
</el-col>
<el-col v-for="(item,index) in appointPatients" :key="index" :span="11" class="patientBox">
<div class="patient_left">
<div style="margin-right: 8px;color: #1C76FD;">{{ item.appointDate }}</div>
<div style="margin-right: 8px">{{ item.patientName }}</div>
<div style="margin-right: 8px">{{ item.patientSex }}</div>
<div>{{ item.patientAge }}</div>
</div>
<div class="patient_right">
<div class="edit">改约</div>
<div class="delete">删除</div>
</div>
</el-col>
</el-row>
</el-dialog>
</template>
@ -142,6 +41,9 @@ export default {
data() {
return {
visible: false,
dateInfo: '',
appointPatients: [],
projectName: '',
morOrAft: '', //
weekName: '', //
title: '',
@ -183,46 +85,10 @@ export default {
this.$nextTick(() => {
this.$refs.dataForm ? this.$refs.dataForm.resetFields() : '' //
this.dataForm.morOrAft = this.morOrAft
this.title === '排台详情' ? this.getPatientList() : this.getSourceList()
})
},
//
async getPatientList() {
const { data: res } = await this.$http.get('/opera/schedule/getScheduleInfo', {
params: {
doctorCode: this.dataForm.doctorCode, //
morOrAft: this.morOrAft, // morOrAft --1:2:
searchDate: this.dataForm.operaDate //
}
// this.title === '' ? this.getPatientList() : this.getSourceList()
})
if (res.code === 0) {
this.dataList = res.data
} else {
this.$message.error(res.msg)
}
},
//
async creatNumberClick() {
const time = this.morOrAft === 1 ? '12:00:00' : '20:00:00'
const operaDateTime = this.dataForm.operaDate + ' ' + time
//
const operaTime = new Date(operaDateTime)
//
const nowTime = new Date()
if (operaTime > nowTime) {
const { data: res } = await this.$http.post('/num/source/createNumSource', this.dataForm)
if (res.code === 0) {
this.getSourceList()
} else {
this.$message.error(res.msg)
}
} else {
this.$message({
message: '当前日期已过时,不可生成号源',
type: 'warning'
})
}
},
addOrder() {},
//
async getSourceList() {
const { data: res } = await this.$http.get('/num/source/getList', {
@ -348,66 +214,41 @@ export default {
}
</style>
<style lang="scss">
.number-manage {
.el-input {
width: auto;
}
.el-form-item {
margin-bottom: 12px;
}
.el-form-item__content {
::v-deep .el-dialog__header{
background:linear-gradient(rgba(27, 91, 251, 0.8) , #1B5BFB 100%);
color: #fff;
}
.title_header{
font-size: 20px;
font-weight: bold;
}
.patientBox{
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 8px 4px 16px;
background: #EFF4FF;
border: 1px solid rgba(27, 91, 251, 0.2);
border-radius: 2px;
font-size: 14px;
line-height: 22px;
margin: 8px;
.patient_left{
display: flex;
}
.form-content {
.patient_right{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px dashed #d6d6d6;
}
.total-form,
.time-form {
margin-bottom: 0;
}
.button {
border: 1px solid #1b6de6;
padding: 10px 10px;
color: #1b6de6;
.edit{
cursor: pointer;
width: 150px;
text-align: center;
border-radius: 6px;
user-select: none;
color: #1C76FD;
}
.button:hover {
background: #1b6de6;
color: #fff;
}
.number-table {
margin-top: 8px;
}
.el-table-column--selection .cell {
padding-left: 10px;
}
.el-input-group {
width: 80%;
}
.el-date-editor.el-input, .el-date-editor.el-input__inner {
// width: 80%;
}
.el-table__body tr.current-row>td.el-table__cell {
color: #fff;
background: #1b6de6;
}
.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
border: none;
}
.el-dialog__footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
.delete{
color: #FF4D4F;
cursor: pointer;
user-select: none;
margin-left: 8px;
}
}
</style>

24
src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue

@ -18,7 +18,7 @@
/>
</el-select>
<el-select
v-model="project"
v-model="dataForm.itemId"
style="margin-left: 15px"
placeholder="请选择"
size="small"
@ -57,7 +57,7 @@
{{ scope.row.appointDate ? scope.row.appointDate : '-' }}
</template>
</el-table-column>
<el-table-column label="检查项目" prop="appointItemName" header-align="center" align="center" />
<el-table-column label="检查项目" prop="itemName" header-align="center" align="center" />
<el-table-column label="眼别" prop="eyeType" header-align="center" align="center" />
<el-table-column label="操作" header-align="center" align="center" width="200px">
<template slot-scope="scope">
@ -71,7 +71,7 @@
</div>
</div>
<re-dialog :projects="selectedProjects" :is-show="reDialogShow" @close="closeReDialog" />
<u-b-m-order :patient-info="patientInfo" :is-show="ubmShow" @close="closeUbmDialog" />
<u-b-m-order ref="ubmOrder" :patient-info="patientInfo" :is-show="ubmShow" @editSuccess="editSuccess" @close="closeUbmDialog" />
<detail-view
v-if="detailViewVisible"
ref="viewRef"
@ -112,7 +112,8 @@ export default {
patientInfo: null,
dataForm: {
appointStatus: '',
searchType: '0'
searchType: '0',
itemId: ''
},
options: [
{
@ -141,7 +142,6 @@ export default {
label: '全部'
}],
projects: [],
project: '全部项目',
selectedProjects: [],
doctorList: [],
operaList: [],
@ -159,6 +159,12 @@ export default {
queryProjects() {
this.$http.get('/patient/getZlItemDict', { params: { isAppoint: 1 }}).then(data => {
this.projects = data.data.data
this.projects.unshift({
caseName: '',
enable: 1,
itemId: '',
itemName: '全部项目'
})
})
},
//
@ -171,6 +177,9 @@ export default {
closeUbmDialog(val) {
this.ubmShow = val
},
editSuccess() {
this.getDataListInitial()
},
// index
tableCellClassName({ row, column, rowIndex, columnIndex }) {
row.index = rowIndex
@ -188,6 +197,8 @@ export default {
},
//
editOpera(scopeRow) {
this.patientInfo = scopeRow
this.$refs.ubmOrder.form.patient = this.patientInfo.patientName
this.currentRow = scopeRow
this.ubmShow = true
},
@ -196,7 +207,7 @@ export default {
this.$confirmFun('确定要取消此患者预约吗?').then(async() => {
const { data: res } = await this.$http.get('/appoint/delAppiontInfo', {
params: {
patientId: scopeRow.patientId
id: scopeRow.id
}
})
if (res.code === 0) {
@ -213,7 +224,6 @@ export default {
// 360
checkPatientDetail(scopeRow) {
this.detailViewVisible = true
this.patientInfo = scopeRow
}
}
}

Loading…
Cancel
Save