提交 46732f7b 编写于 作者: yi.li's avatar yi.li

预约校验增加是否超过发送时间范围的字段

上级 74828ec3
...@@ -192,23 +192,28 @@ ...@@ -192,23 +192,28 @@
//校验额度是否不够 //校验额度是否不够
getCheckReservation({ getCheckReservation({
content: '', content: '',
validContents: this.validContents validContents: _self.validContents
}).then(({data}) => { }).then(({data}) => {
const sendFlagLast = data.sendFlag; const sendFlagLast = data.sendFlag;
const inServiceTimeFlag = data.inServiceTimeFlag;
if(sendFlagLast){ //额度还可用 if(sendFlagLast){ //额度还可用
sendReservation({ sendReservation({
...this.reservationForm, ...this.reservationForm,
patientAppointList: this.selectList patientAppointList: _self.selectList
}).then(({data}) => { }).then(({data}) => {
this.$refs['reservationForm'].resetFields(); _self.$refs['reservationForm'].resetFields();
this.$emit('closeSendReserve',false); _self.$emit('closeSendReserve',false);
}) })
}else { }else {
console.log('余额不足') if(!inServiceTimeFlag) {
_self.$message.warning('已超过发送时间范围!');
return;
}else {
// 额度不足 // 额度不足
this.isNoEnoughShow = true; _self.isNoEnoughShow = true;
return; return;
} }
}
}) })
} else { } else {
return false; return false;
......
...@@ -281,13 +281,18 @@ ...@@ -281,13 +281,18 @@
content: '', content: '',
validContents:this.validContents validContents:this.validContents
}) })
const { sendFlag } = this.checkRevervationData const { sendFlag, inServiceTimeFlag } = this.checkRevervationData
//判断短信余额是否不足 //判断短信余额是否不足
if(sendFlag){ if(sendFlag){
this.isDialogShow = true; this.isDialogShow = true;
}else {
if(!inServiceTimeFlag) {
this.$message.warning('已超过发送时间范围!');
return;
}else { }else {
this.isNoEnoughShow = true; this.isNoEnoughShow = true;
} }
}
}, },
sendReservation() { sendReservation() {
if(this.selectionData.length > 0){ if(this.selectionData.length > 0){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册