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

预约相关接口调试

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