提交 a87fb529 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

变更计划

上级 ba2d3f13
......@@ -117,6 +117,15 @@ export const changePlan = (data) => {
description: '变更计划',
})
};
export const finishPlan = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/status`),
method: 'put',
data: data,
description: '变更计划',
})
};
export const deletePlan = (planId) => {
return fetch({
headers,
......
......@@ -28,13 +28,14 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button>
<el-button class="button-white" @click="clickClose" size="small" plain>确 定</el-button>
<el-button class="button-white" @click="finishFollowUp" size="small" plain>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { finishPlan } from '../../../../utils/followup/followapis'
export default {
name: "finish-followup",
props: {
......@@ -66,6 +67,32 @@
clickClose() {
this.$emit('closeFinishFollowup',false)
},
finishFollowUp() {
const { changeCode, planId, patientIdList } = this.finishData;
finishPlan({
changeCode,
planId,
patientIdList,
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '操作成功!',
type: 'success'
});
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).then(() => {
this.$message({
message: `${data.message}`,
type: 'error'
});
});
}
}
}
</script>
......
......@@ -11,7 +11,8 @@
<div class="title"><p>基本信息</p></div>
<div class="h-btn">
<el-button class="button-white" plain size="small" @click="changePlan">计划变更</el-button>
<el-button class="button-white" plain size="small" @click="finishFollowup">结束随访</el-button>
<el-button v-if="status==1" class="button-white" plain size="small" @click="finishFollowup">结束随访</el-button>
<el-button v-if="status==2" class="button-white" plain size="small" @click="finishFollowup">恢复随访</el-button>
</div>
</div>
<div class="base-info">
......@@ -130,6 +131,7 @@
planChangeData: {}, //变更信息
finishData: {}, //结束信息
planDetails: {}, //计划详情
status: null
}
},
created() {
......@@ -168,10 +170,12 @@
this.showChangePlan = isShow
},
finishFollowup() {
let patientIdList = [];
patientIdList.push(this.residentDetail.patientId)
this.finishData = {
patientName: this.residentDetail.patientName,
changeCode: this.status,
patientIdList: this.residentDetail.patientId,
patientIdList: patientIdList,
}
this.showFinishFollowup = true;
},
......@@ -189,6 +193,7 @@
},
residentDetail(val) {
this.planDetails = val.fPlanDto
this.status = val.fPlanDto.status
}
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册