提交 8a31d4be 编写于 作者: yi.li's avatar yi.li

预约相关接口调试

上级 65840761
......@@ -58,7 +58,7 @@ export default {
getReservationPatients({
...payload
}).then(({data}) => {
context.commit('GET_REVERVATION_NUM', data.number)
context.commit('GET_REVERVATION_NUM', data)
})
},
// getConstantsData({commit}) {
......
......@@ -141,7 +141,7 @@ export const getReservationPatients = (data) => {
export const changeReservationStatus = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/appoint/status/`),
url: getFollowUpSC(`/followup/appoint/status/`),
method: 'post',
data: data,
description: '手动变更预约状态',
......@@ -150,7 +150,7 @@ export const changeReservationStatus = (data) => {
export const sendReservation = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/appoint/`),
url: getFollowUpSC(`/followup/appoint/`),
method: 'post',
data: data,
description: '发送预约',
......
......@@ -146,17 +146,17 @@
pageNo: currentPage || this.paginationSet.pageNo,
pageSize: this.paginationSet.pageSize,
});
const {pageNum, pageSize, totalRow} = this.planList;
const {pageNo, pageSize, totalRow} = this.planList;
this.paginationSet.total = totalRow;
this.paginationSet = {
...this.paginationSet,
pageNo: pageNum,
pageNo: pageNo,
pageSize: pageSize,
}
},
reseat(){
this.searchData.name = '';
this.searchData.startYear = '0';
this.searchData.startYear = '';
this.search(1);
},
addNewPlan(){
......
......@@ -18,19 +18,19 @@
</el-form-item>
<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 label="3">已接受</el-radio>
<el-radio label="4">已拒绝</el-radio>
</el-radio-group>
</el-form-item>
<!--appointStatus:1是已接受,2是已拒绝-->
<el-form-item v-if="reservationForm.appointStatus == 1" label="预约时间" required>
<!--appointStatus:3是已接受,4是已拒绝-->
<el-form-item v-if="reservationForm.appointStatus == 3" label="预约时间" required>
<div style="display: flex;">
<el-form-item prop="appointmentDate">
<el-date-picker
type="date"
v-model="reservationForm.appointmentDate"
placeholder="请选择预约日期"
value-format="timestamp"
value-format="yyyy-MM-dd"
value="yyyy-MM-dd"
:picker-options="pickerOptions"
@change="changeHandler">
......@@ -68,18 +68,6 @@
data(){
return{
reservationDialog: true,
// 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,
......@@ -174,7 +162,6 @@
closeChangeReserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
console.log('保存的内容',this.reservationForm)
changeReservationStatus({
...this.reservationForm
}).then(({data}) => {
......@@ -188,7 +175,8 @@
});
},
changeHandler(val) {
this.getReservationPatients({time: val});
this.getReservationPatients({makeAnAppointDate: val});
console.log('日期',this.getRevervationNum)
},
}
}
......
......@@ -16,7 +16,9 @@
:label-position="'left'"
size="small">
<el-form-item label="已选居民">
<span>{{checkData.total}}</span><span>(微信发送{{checkData.weChatNum}}人;短信发送{{checkData.messageNum}}人)</span>
<!--<span>{{checkData.total}}</span>-->
<span>{{selectList.length}}</span>
<span>(微信发送{{checkData.weChatNum}}人;短信发送{{checkData.messageNum}}人)</span>
</el-form-item>
<el-form-item label="预约时间" required>
<div style="display: flex;">
......@@ -77,7 +79,7 @@
reservationForm: {
appointmentDate: '',
appointmentRange: '',
patientAppointList: [],
// patientAppointList: [],
},
timeRangeOptions: [
{
......@@ -164,7 +166,7 @@
methods: {
...mapActions('reservationManage', ['getReservationPatients']),
changeHandler(val) {
this.getReservationPatients({time: val});
this.getReservationPatients({makeAnAppointDate: val});
},
closeSendReserve1(){
if (this.$refs['reservationForm']) {
......
......@@ -242,8 +242,6 @@
this.$refs[formName].resetFields();
},
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;
},
......@@ -274,17 +272,20 @@
async sendReservation() {
if(this.selectionData.length > 0){
this.selectList = this.selectionData;
await this.getCheckReservation({
patientIds: this.ids
})
const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
//判断短信余额是否不足
// if(this.hasSmsBalance){
if(parseInt(messageNum) <= parseInt(messageCount)){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
//发送预约校验接口
// await this.getCheckReservation({
// patientIds: this.ids
// })
// const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
// //判断短信余额是否不足
// // if(this.hasSmsBalance){
// if(parseInt(messageNum) <= parseInt(messageCount)){
// this.isDialogShow = true;
// }else {
// this.isNoEnoughShow = true;
// }
//暂时不校验
this.isDialogShow = true;
}else if(this.selectionData.length > 100){
this.$message.warning('每次最多选择100条单条随访进行预约!');
......@@ -296,31 +297,39 @@
},
async sendReservationRow(row){
let newList = [];
newList.push(row);
newList.push({
planId: row.fuPlanId,
patientId: row.patientId,
planName: row.name,
patientsTimesId: row.fuPlanPatientTimesId,
type: row.fuPlanType,
});
this.selectList = newList;
await this.getCheckReservation({
patientIds: row.nickId
})
const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
//判断短信余额是否不足
// if(this.hasSmsBalance){
if(parseInt(messageNum) <= parseInt(messageCount)){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
//发送预约校验
// await this.getCheckReservation({
// patientIds: row.patientId
// })
// const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
// //判断短信余额是否不足
// // if(this.hasSmsBalance){
// if(parseInt(messageNum) <= parseInt(messageCount)){
// this.isDialogShow = true;
// }else {
// this.isNoEnoughShow = true;
// }
//暂时不做校验
this.isDialogShow = true;
},
changeReserveClick(row){
// this.needPara = row;
this.needPara = {
nickname: row.nickname,
appointmentDate: '',
appointmentRange: '',
planId: row.planId,
planId: row.fuPlanId,
patientId: row.patientId,
planName: row.planName,
patientsTimesId: row.patientsTimesId,
typeStr: '',
planName: row.name,
patientsTimesId: row.fuPlanPatientTimesId,
type: row.fuPlanType,
changeReason: '',
appointStatus: null
};
......@@ -336,11 +345,28 @@
this.isChangeReservation = val;
},
handleSelectionChange(val){
for(let i in val){
for(let j in val[i]) {
if(j == 'fuPlanId') {
val[i]['planId'] = val[i][j];
// delete val[i]['fuPlanId'];
}
if(j == 'name') {
val[i]['planName'] = val[i][j];
}
if(j == 'fuPlanPatientTimesId') {
val[i]['patientsTimesId'] = val[i][j];
}
if(j == 'fuPlanType') {
val[i]['type'] = val[i][j];
}
}
}
this.selectionData = val;
let idsArray = [];
if (val.length > 0) {
for(let i=0; i<val.length; i++){
idsArray.push(val[i].nickId)
idsArray.push(val[i].patientId)
}
this.ids = idsArray.join(",")
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册