提交 8b93590d 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
......@@ -139,6 +139,14 @@
let residentCrumbList = sessionStorage.getItem('residentCrumb');
this.residentCrumb = JSON.parse(residentCrumbList);
},
mounted() {
this.getResidentDetail({
patientId: this.$route.query.patientId,
planId: this.$route.query.planId
}); //获取居民详情
this.getGroupList(); //获取分组列表
},
computed: {
...mapState('planManage', {
residentDetail: state => state.residentDetail,
......@@ -148,14 +156,6 @@
groupList: state => state.groupList
})
},
mounted() {
this.getResidentDetail({
patientId: this.$route.query.patientId,
planId: this.$route.query.planId
}); //获取居民详情
this.getGroupList(); //获取分组列表
},
methods: {
...mapActions('planManage', ['getResidentDetail', 'getNodeTimeContent', 'getGroupList']),
changePlan() {
......@@ -163,7 +163,7 @@
planPatientsId: this.residentDetail.fPlanDto.planPatientsId,
planId: this.residentDetail.fPlanDto.id,
patientId: this.residentDetail.patientId,
yLabelList: this.residentDetail.labelIdList,
yLabelList: this.residentDetail.labelIdList||[],
startDate: this.residentDetail.fPlanDto.timeStr,
planIdOld: this.residentDetail.fPlanDto.id,
}
......
......@@ -70,7 +70,7 @@
</div>
</template>
<script>
import {sendReservation} from '@/utils/followup/followapis'
import {sendReservation, getCheckReservation} from '@/utils/followup/followapis'
import NoEnough from './no-enough'
import { mapState, mapActions } from 'vuex'
export default {
......@@ -78,6 +78,7 @@
data(){
return{
reservationDialog: true,
sendFlagLast: null,
reservationForm: {
appointmentDate: '',
appointmentRange: '',
......@@ -165,13 +166,13 @@
...mapState('reservationManage',{
getRevervationNum: state => state.getRevervationNum,
userName: state => state.userName,
checkRevervationData: state => state.checkRevervationData,
// checkRevervationData: state => state.checkRevervationData,
})
},
mounted(){
},
methods: {
...mapActions('reservationManage', ['getReservationPatients', 'getCheckReservation']),
...mapActions('reservationManage', ['getReservationPatients']),
changeHandler(val) {
this.getReservationPatients({makeAnAppointDate: val});
},
......@@ -184,34 +185,31 @@
}
this.$emit('closeSendReserve',false)
},
async initLastCheck() {
await this.getCheckReservation({
content: '',
validContents: this.validContents
})
},
closeSendReserve(formName){
let _self = this;
_self.$refs[formName].validate((valid) => {
if (valid) {
//校验额度是否不够
_self.initLastCheck();
const { sendFlag } = _self.checkRevervationData;
console.log('sendFlag',sendFlag)
if(sendFlag){ //额度还可用
sendReservation({
...this.reservationForm,
patientAppointList: this.selectList
}).then(({data}) => {
this.$refs['reservationForm'].resetFields();
this.$emit('closeSendReserve',false);
})
}else {
console.log('余额不足')
// 额度不足
this.isNoEnoughShow = true;
return;
}
getCheckReservation({
content: '',
validContents: this.validContents
}).then(({data}) => {
const sendFlagLast = data.sendFlag;
if(sendFlagLast){ //额度还可用
sendReservation({
...this.reservationForm,
patientAppointList: this.selectList
}).then(({data}) => {
this.$refs['reservationForm'].resetFields();
this.$emit('closeSendReserve',false);
})
}else {
console.log('余额不足')
// 额度不足
this.isNoEnoughShow = true;
return;
}
})
} else {
return false;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册