提交 1de09918 编写于 作者: yi.li's avatar yi.li

预约详情添加

上级 05f02ff9
......@@ -10,6 +10,7 @@ export default {
},
checkRevervationData: {},//发送预约校验
constantsData: {},//获取常量
getRevervationNum: null,
},
mutations: {
GET_RESERVATION_LIST(state, payload) {
......@@ -21,6 +22,9 @@ export default {
GET_CONSTANS_DATA(state, payload) {
state.constantsData = payload
},
GET_REVERVATION_NUM(state, payload) {
state.getRevervationNum = payload
},
},
actions: {
getReservationList(context, payload) {
......@@ -46,9 +50,15 @@ export default {
}).then(({data}) => {
context.commit('GET_CONSTANS_DATA', data)
})
},
getReservationPatients(context, payload) {
followApi.getReservationPatients({
...payload
}).then(({data}) => {
context.commit('GET_REVERVATION_NUM', data.number)
// this.reservationForm.hasReservedNumber = data.number;
})
},
// getConstantsData({commit}) {
// return new Promise(async (resolve, reject)=>{
// const res = await followApi.getBasicData({
......
......@@ -88,6 +88,13 @@ const reservationManageApi = [
name: 'getReservationPatients',
description: '查看预约人数',
},
{
url: '/appoint/status/',
method: 'post',
params: 'data',
name: 'changeReservationStatus',
description: '手动变更预约状态',
},
]
/*工作台*/
......
......@@ -14,28 +14,30 @@
label-suffix=":"
label-width="120px">
<el-form-item label="变更居民">
<span>{{reservationForm.nickname}}</span>
<span>{{reservationForm.nickName}}</span>
</el-form-item>
<el-form-item label="预约状态" required prop="reserveStatus">
<el-radio-group v-model="reservationForm.reserveStatus">
<el-radio label="已接受"></el-radio>
<el-radio label="已拒绝"></el-radio>
<el-form-item label="预约状态" required prop="appointStatus">
<el-radio-group v-model="reservationForm.appointStatus">
<el-radio label="1">已接受</el-radio>
<el-radio label="2">已拒绝</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="reservationForm.reserveStatus == '已接受'" label="预约时间" required>
<!--appointStatus:1是已接受,2是已拒绝-->
<el-form-item v-if="reservationForm.appointStatus == 1" label="预约时间" required>
<div style="display: flex;">
<el-form-item prop="reservationDate">
<el-form-item prop="appointmentDate">
<el-date-picker
type="date"
v-model="reservationForm.reservationDate"
v-model="reservationForm.appointmentDate"
placeholder="请选择预约日期"
value-format="yyyy-MM-dd"
value-format="timestamp"
value="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
@change="changeHandler">
</el-date-picker>
</el-form-item>
<el-form-item prop="timeRange">
<el-select v-model="reservationForm.timeRange" placeholder="请选择时间段" clearable style="margin-left:20px;">
<el-form-item prop="appointmentRange">
<el-select v-model="reservationForm.appointmentRange" placeholder="请选择时间段" clearable style="margin-left:20px;">
<el-option
v-for="item in timeRangeOptions"
:key="item.value"
......@@ -45,10 +47,10 @@
</el-select>
</el-form-item>
</div>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{reservationForm.hasReservedNumber}}人,请确保能在此时间段完成预约的随访任务</p>
<p class="warn-tips" v-if="reservationForm.appointmentDate">该日期已经成功预约{{getRevervationNum}}人,请确保能在此时间段完成预约的随访任务</p>
</el-form-item>
<el-form-item label="变更原因" prop="reason">
<el-input type="textarea" v-model="reservationForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
<el-input type="textarea" v-model="reservationForm.changeReason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -59,19 +61,25 @@
</div>
</template>
<script>
import followApi from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default {
components: {},
data(){
return{
reservationDialog: true,
reservationForm: {
nickname: '呆呆',
reserveStatus: '',
reason: '',
reservationDate: '',
timeRange: '',
},
// reservationForm: {
// nickName: row.nickName,
// appointmentDate: '',
// appointmentRange: '',
// planId: row.planId,
// patientId: row.patientId,
// planName: row.planName,
// patientsTimesId: row.patientsTimesId,
// typeStr: '',
// changeReason: '',
// appointStatus: null
// },
timeRangeOptions: [
{
value: 1,
......@@ -120,9 +128,9 @@
label: '20:00-21:00'
}],
rules: {
reserveStatus: [{ required: true, message: '请选择预约状态', trigger: 'change' }],
reservationDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
timeRange: [{ required: true, message: '请选择时间段', trigger: 'change' }],
appointStatus: [{ required: true, message: '请选择预约状态', trigger: 'change' }],
appointmentDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
appointmentRange: [{ required: true, message: '请选择时间段', trigger: 'change' }],
},
pickerOptions: {
disabledDate(time) {
......@@ -135,13 +143,28 @@
isChangeReservation: {
type: Boolean,
default: false
},
reservationForm: {
type: Object,
default: function () {
return {}
}
}
},
watch: {
reservationForm(val) {
this.reservationForm = val;
}
},
computed: {
...mapState('reservationManage',{
getRevervationNum: state => state.getRevervationNum,
})
},
mounted(){
},
methods: {
...mapActions('reservationManage', ['getReservationPatients']),
closeChangeReserve1(){
if (this.$refs['reservationForm']) {
this.$refs['reservationForm'].resetFields();
......@@ -151,15 +174,22 @@
closeChangeReserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.$refs['reservationForm']) {
console.log('保存的内容',this.reservationForm)
followApi.changeReservationStatus({
...this.reservationForm
}).then(({data}) => {
this.$message.success('变更成功!');
this.$emit('closeChangeReserve',false);
this.$refs['reservationForm'].resetFields();
}
this.$emit('closeChangeReserve',false)
})
} else {
return false;
}
});
},
changeHandler(val) {
this.getReservationPatients({time: val});
},
}
}
</script>
......
......@@ -40,7 +40,7 @@
</el-select>
</el-form-item>
</div>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{reservationForm.hasReservedNumber}}人,请确保能在此时间段完成预约的随访任务</p>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{getRevervationNum}}人,请确保能在此时间段完成预约的随访任务</p>
</el-form-item>
</el-form>
<div class="reservation-content content-list" v-if="reservationForm.reservationDate && reservationForm.timeRange">
......@@ -66,7 +66,7 @@
</div>
</template>
<script>
import followApi from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default {
components: {},
data(){
......@@ -145,16 +145,16 @@
checkData: {},
},
computed: {
...mapState('reservationManage',{
getRevervationNum: state => state.getRevervationNum,
})
},
mounted(){
},
methods: {
...mapActions('reservationManage', ['getReservationPatients']),
changeHandler(val) {
followApi.getReservationPatients({
time: val
}).then(({data}) => {
this.reservationForm.hasReservedNumber = data.number;
})
this.getReservationPatients({time: val});
},
closeSendReserve1(){
if (this.$refs['reservationForm']) {
......
......@@ -70,7 +70,7 @@
label="姓名"
align="center">
<template slot-scope="scope">
<el-button type="text" @click="goPatientDetail(scope.row.planId, scope.row.nickId)" >{{scope.row.nickName}}</el-button>
<el-button type="text" @click="goPatientDetail(scope.row)" >{{scope.row.nickName}}</el-button>
</template>
</el-table-column>
<el-table-column
......@@ -120,7 +120,8 @@
</div>
<send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" @closeSendReserve="closeSendReserve"></send-reservation>
<no-enough :isNoEnoughShow="isNoEnoughShow" @closeTipsDialog="closeTipsDialog"></no-enough>
<change-reservation :isChangeReservation="isChangeReservation" @closeChangeReserve="closeChangeReserve"></change-reservation>
<change-reservation :isChangeReservation="isChangeReservation" @closeChangeReserve="closeChangeReserve" :reservationForm="needPara"></change-reservation>
<followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail" :enteringInfo="enteringInfo"></followup-detail>
</div>
</template>
......@@ -133,13 +134,15 @@
import SendReservation from './dialog/send-reservation';
import NoEnough from './dialog/no-enough';
import ChangeReservation from "./dialog/change-reservation";
import followupDetail from "@/views/followup/record-manage/dialog/followupDetail";
export default {
name: "reservation-list",
components: {
ChangeReservation,
BreadCrumb,
SendReservation,
NoEnough
NoEnough,
followupDetail
},
data() {
return {
......@@ -174,6 +177,8 @@
isChangeReservation: false, //变更预约状态dialog展示
selectionData: [],
ids: '',
needPara: {},
dialogDetailShow: false,
}
},
created() {
......@@ -197,10 +202,14 @@
...mapState('reservationManage',{
reservationList: state => state.reservationList,
checkRevervationData: state => state.checkRevervationData,
}),
...mapState('recordManage',{
enteringInfo: state => state.enteringInfo,
})
},
methods: {
...mapActions('reservationManage', ['getReservationList','getCheckReservation']),
...mapActions('recordManage', [ 'getEnteringInfo']),
handleSizeChangePre(pageSize) {
this.getReservationList({
pageSize,
......@@ -224,10 +233,11 @@
resetSearchData(formName) {
this.$refs[formName].resetFields();
},
goPatientDetail(patientId) { //预约详情页
alert(1+patientId)
this.$router.push('/followup/plan-manage/resident-detail')
async goPatientDetail(row) { //预约详情页
// alert(1+patientId)
// this.$router.push('/followup/plan-manage/resident-detail')
await this.getEnteringInfo({patientId: row.patientId,fuPlanPatientTimesId: row.fuPlanPatientTimesId});
this.dialogDetailShow = true;
},
setSearchData() {
const { planName, mobilePhone, timeStatus, nickName } = this.searchData;
......@@ -288,7 +298,20 @@
this.isNoEnoughShow = true;
}
},
changeReserveClick(){
changeReserveClick(row){
// this.needPara = row;
this.needPara = {
nickName: row.nickName,
appointmentDate: '',
appointmentRange: '',
planId: row.planId,
patientId: row.patientId,
planName: row.planName,
patientsTimesId: row.patientsTimesId,
typeStr: '',
changeReason: '',
appointStatus: null
};
this.isChangeReservation = true;
},
closeSendReserve(val){
......@@ -310,6 +333,9 @@
this.ids = idsArray.join(",")
}
},
closeDetail(val){
this.dialogDetailShow = val;
},
},
watch: {
status(val) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册