| | |
| | | <template> |
| | | <div class="confirmation-detail"> |
| | | |
| | | <el-card class="detail-card"> |
| | | <!-- 基础信息 --> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">捐献确认基本信息</span> |
| | | <el-button |
| | | type="success" |
| | | style="float: right;" |
| | | @click="handleSave" |
| | | :loading="saveLoading" |
| | | > |
| | | 保存确认信息 |
| | | </el-button> |
| | | <span class="detail-title">捐献确认信息</span> |
| | | |
| | | </div> |
| | | |
| | | <el-form :model="form" ref="form" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="住院号" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="捐献者姓名" prop="name"> |
| | | <el-input v-model="form.name" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="form.sex" style="width: 100%"> |
| | | <el-option label="男" value="1" /> |
| | | <el-option label="女" value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="年龄" prop="age"> |
| | | <el-input v-model="form.age" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="疾病诊断" prop="diagnosisname"> |
| | | <el-input v-model="form.diagnosisname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="所在医疗机构" prop="treatmenthospitalname"> |
| | | <el-input v-model="form.treatmenthospitalname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="协调员1" prop="coordinatedusernameo"> |
| | |
| | | <el-date-picker |
| | | v-model="form.signdate" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { relativesList, relativesEdit } from "@/api/businessApi"; |
| | | import { relativesList, relativesEdit, relativesAdd } from "@/api/businessApi"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | |
| | | import CaseBasicInfo from "@/components/CaseBasicInfo"; |
| | | export default { |
| | | name: "ConfirmationDetail", |
| | | components: { |
| | | FilePreviewDialog |
| | | FilePreviewDialog, |
| | | CaseBasicInfo |
| | | }, |
| | | props: { |
| | | props: { |
| | | infoid: { |
| | | type: String, |
| | | default: true |
| | |
| | | dicts: ["sys_FamilyRelation"], |
| | | data() { |
| | | return { |
| | | caseId: null, |
| | | |
| | | // 是否编辑模式 |
| | | isEdit: false, |
| | | // 表单数据 |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.caseId = this.infoid; |
| | | this.isEdit = this.$route.query.confirm === "true"; |
| | | console.log(this.infoid, "this.infoid"); |
| | | |
| | | if (this.infoid) { |
| | | console.log(1); |
| | | |
| | | this.getDetail(this.infoid); |
| | | } |
| | | }, |
| | |
| | | this.loading = true; |
| | | try { |
| | | const response = await relativesList({ infoid }); |
| | | console.log(2); |
| | | |
| | | if (response.code === 200) { |
| | | console.log(3); |
| | | this.handleDetailData(response); |
| | | } else { |
| | | this.$message.error("获取详情失败:" + (response.msg || "未知错误")); |
| | |
| | | this.form = { |
| | | ...this.form, |
| | | id: detailData.id || this.$route.query.id, |
| | | infoid: detailData.infoid || this.infoid, |
| | | infoid: detailData.infoid || infoid, |
| | | caseNo: detailData.caseNo || "", |
| | | name: detailData.name || "", |
| | | sex: detailData.sex || "", |
| | |
| | | .toString() |
| | | .padStart(2, "0")}`; |
| | | }, |
| | | accomplish() { |
| | | this.$confirm("是否完成该案例捐献确认步骤?", "提醒", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.form.state = 3; |
| | | this.handleSave(); |
| | | }) |
| | | |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | // 保存确认信息 |
| | | async handleSave() { |
| | |
| | | |
| | | const saveData = { |
| | | ...this.form, |
| | | infoid: this.infoid, |
| | | organdecision: this.organdecision.join(","), |
| | | organdecisionOther: this.organdecisionOther |
| | | // assessannex字段已在updateAssessannexField中更新 |
| | | }; |
| | | |
| | | const response = await relativesEdit(saveData); |
| | | if (saveData.state == 1 || !saveData.state) { |
| | | saveData.state = 2; |
| | | } |
| | | let response = null; |
| | | if (saveData.id) { |
| | | response = await relativesEdit(saveData); |
| | | } else { |
| | | response = await relativesAdd(saveData); |
| | | } |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("保存成功"); |