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

变更计划

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