diff --git a/src/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue b/src/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue index 8224970..af55483 100644 --- a/src/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue +++ b/src/page-subspecialty/views/modules/nurseManagement/UBMOrder.vue @@ -20,38 +20,28 @@ - + 已开医嘱: -
- 是 +
+
-
- 否 +
+
- - - - -
眼别: @@ -67,10 +57,10 @@ 散瞳: -
+
-
+
@@ -85,13 +75,11 @@
- - - - - - - - + @@ -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() + }) } } } diff --git a/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue b/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue index 94651ab..4df4c38 100644 --- a/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue +++ b/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/doctor-schedule.vue @@ -54,7 +54,7 @@ -

{{ item.doctorName }}

+

{{ item.itemName }}

@@ -62,10 +62,10 @@
- +
-
+
-

+

约满

-

{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.numSourceTotal }}

+

{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.maxNumber }}

已约

-

{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.numSourceTotal }}

+

{{ weekInfoItem.morning.orderNum }} / {{ weekInfoItem.morning.maxNumber }}

详情

-

排台管理

+
- +
-
+
-

+

约满

-

{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.numSourceTotal }}

+

{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.maxNumber }}

已约

-

{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.numSourceTotal }}

+

{{ weekInfoItem.after.orderNum }} / {{ weekInfoItem.after.maxNumber }}

详情

-

排台管理

+
- { + 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 diff --git a/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/number-detail-manage.vue b/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/number-detail-manage.vue index a318be8..f50823d 100644 --- a/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/number-detail-manage.vue +++ b/src/page-subspecialty/views/modules/nurseManagement/reservation/schedule/number-detail-manage.vue @@ -1,130 +1,29 @@ @@ -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 { } diff --git a/src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue b/src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue index d21de6b..8956c17 100644 --- a/src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue +++ b/src/page-subspecialty/views/modules/nurseManagement/reservation/subList/index.vue @@ -18,7 +18,7 @@ /> - +