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

预约详情添加

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