| | |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="捐献者姓名" prop="name"> |
| | | <el-form-item label="患者姓名" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | placeholder="请输入捐献者姓名" |
| | | placeholder="请输入患者姓名" |
| | | clearable |
| | | style="width: 200px" |
| | | /> |
| | |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | label="捐献者姓名" |
| | | label="状态" |
| | | align="center" |
| | | prop="reportStatus" |
| | | width="100" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.reportStatus | statusFilter"> |
| | | {{ scope.row.reportStatus | statusTextFilter }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="转运状态" align="center" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getTransportStatusTag(scope.row)"> |
| | | {{ getTransportStatusText(scope.row) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="患者姓名" |
| | | align="center" |
| | | prop="name" |
| | | width="100" |
| | |
| | | prop="treatmenthospitalname" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="状态" |
| | | align="center" |
| | | prop="reportStatus" |
| | | width="100" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.reportStatus | statusFilter"> |
| | | {{ scope.row.reportStatus | statusTextFilter }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="转运状态" align="center" width="100"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getTransportStatusTag(scope.row)"> |
| | | {{ getTransportStatusText(scope.row) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="350" |
| | | > |
| | | |
| | | <el-table-column label="操作" align="center" fixed="right" width="350"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-check" |
| | | @click="handleApprove(scope.row)" |
| | | v-if="scope.row.reportStatus === '2' && scope.row.delFlag === 0" |
| | | >审批</el-button |
| | | >确认</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-truck" |
| | | :type="shouldShowTransportButton(scope.row) ? 'primary' : 'text'" |
| | | :type="getTransportStatustype(scope.row)" |
| | | @click="handleTransport(scope.row)" |
| | | v-if="shouldShowTransportButton(scope.row)" |
| | | :disabled="!canGoToTransport(scope.row)" |
| | |
| | | <case-detail :caseData="currentCase" @close="detailOpen = false" /> |
| | | </el-dialog> |
| | | |
| | | <!-- 审批弹框 --> |
| | | <!-- 确认弹框 --> |
| | | <el-dialog |
| | | title="案例审批" |
| | | title="案例确认" |
| | | :visible.sync="approveOpen" |
| | | width="80vw" |
| | | append-to-body |
| | |
| | | </div> |
| | | </el-aside> |
| | | |
| | | <!-- 右侧:审批表单 --> |
| | | <!-- 右侧:确认表单 --> |
| | | <el-main style="padding: 20px;"> |
| | | <el-form |
| | | ref="approveForm" |
| | |
| | | :rules="approveRules" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="审批结果" prop="approveResult"> |
| | | <el-form-item label="确认结果" prop="approveResult"> |
| | | <el-radio-group v-model="approveForm.approveResult"> |
| | | <el-radio label="3">同意</el-radio> |
| | | <el-radio label="4">驳回</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="审批意见" prop="approveOpinion"> |
| | | <el-form-item label="确认意见" prop="approveOpinion"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="approveForm.approveOpinion" |
| | | placeholder="请输入详细的审批意见,包括通过或驳回的理由" |
| | | placeholder="请输入详细的确认意见,包括通过或驳回的理由" |
| | | :rows="6" |
| | | maxlength="500" |
| | | show-word-limit |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="捐献者姓名" prop="name"> |
| | | <el-form-item label="患者姓名" prop="name"> |
| | | <el-input |
| | | v-model="editForm.name" |
| | | placeholder="请输入捐献者姓名" |
| | | placeholder="请输入患者姓名" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | placeholder="请选择血型" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="A型" value="A" /> |
| | | <el-option label="B型" value="B" /> |
| | | <el-option label="O型" value="O" /> |
| | | <el-option label="AB型" value="AB" /> |
| | | <el-option label="A型" :value="1" /> |
| | | <el-option label="B型" :value="2" /> |
| | | <el-option label="O型" :value="3" /> |
| | | <el-option label="AB型" :value="4" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | caseList: [], |
| | | // 详情弹框是否显示 |
| | | detailOpen: false, |
| | | // 审批弹框是否显示 |
| | | // 确认弹框是否显示 |
| | | approveOpen: false, |
| | | // 编辑弹框是否显示 |
| | | editOpen: false, |
| | |
| | | name: undefined, |
| | | reportStatus: undefined |
| | | }, |
| | | // 审批表单 |
| | | // 确认表单 |
| | | approveForm: { |
| | | id: null, |
| | | approveResult: "3", |
| | | approveOpinion: "" |
| | | }, |
| | | // 审批表单验证 |
| | | // 确认表单验证 |
| | | approveRules: { |
| | | approveResult: [ |
| | | { required: true, message: "请选择审批结果", trigger: "change" } |
| | | { required: true, message: "请选择确认结果", trigger: "change" } |
| | | ], |
| | | approveOpinion: [ |
| | | { required: true, message: "请输入审批意见", trigger: "blur" } |
| | | { required: true, message: "请输入确认意见", trigger: "blur" } |
| | | ] |
| | | }, |
| | | // 编辑表单 |
| | |
| | | { required: true, message: "请输入案例编号", trigger: "blur" } |
| | | ], |
| | | name: [ |
| | | { required: true, message: "请输入捐献者姓名", trigger: "blur" } |
| | | { required: true, message: "请输入患者姓名", trigger: "blur" } |
| | | ], |
| | | sex: [{ required: true, message: "请选择性别", trigger: "change" }], |
| | | age: [{ required: true, message: "请输入年龄", trigger: "blur" }], |
| | |
| | | statusFilter(reportStatus) { |
| | | const statusMap = { |
| | | "1": "info", // 已上报 |
| | | "2": "warning", // 已阅读(待审批) |
| | | "2": "warning", // 已阅读(待确认) |
| | | "3": "success", // 已同意 |
| | | "4": "danger" // 已驳回 |
| | | }; |
| | |
| | | ) { |
| | | return "查看转运单"; |
| | | } else { |
| | | return "前往转运单"; |
| | | return "创建转运单"; |
| | | } |
| | | } |
| | | return "转运"; |
| | | return "无需转运"; |
| | | }, |
| | | |
| | | getTransportStatustype(row) { |
| | | if (row.isTransport == "1") { |
| | | return "info"; // 不需要转运 |
| | | } |
| | | if ( |
| | | row.serviceTransport && |
| | | Array.isArray(row.serviceTransport) && |
| | | row.serviceTransport.length > 0 |
| | | ) { |
| | | // 根据转运单状态显示不同颜色 |
| | | const transport = row.serviceTransport[0]; |
| | | if (transport.transitStatus) { |
| | | return "primary"; // 有转运信息但无状态 |
| | | } |
| | | return "primary"; // 有转运信息但无状态 |
| | | } |
| | | return "success"; // 需要转运但无转运信息 |
| | | }, |
| | | /** 获取转运状态标签样式 */ |
| | | getTransportStatusTag(row) { |
| | | if (row.isTransport === "1") { |
| | |
| | | } |
| | | return "primary"; // 有转运信息但无状态 |
| | | } |
| | | return "danger"; // 需要转运但无转运信息 |
| | | return "success"; // 需要转运但无转运信息 |
| | | }, |
| | | |
| | | /** 获取转运状态文本 */ |
| | |
| | | ) { |
| | | // 已有转运单,跳转到转运单详情页 |
| | | const transport = caseData.serviceTransport[0]; |
| | | this.goToTransportDetail(transport.id, row.caseNo); |
| | | this.goToTransportDetail(transport.id, row.name); |
| | | } else { |
| | | // 没有转运单,跳转到创建转运单页面 |
| | | this.goToCreateTransport(row); |
| | |
| | | |
| | | /** 跳转到创建转运单页面 */ |
| | | goToCreateTransport(caseData) { |
| | | // 这里可以跳转到创建转运单的页面 |
| | | // 方式1:在新页面打开 |
| | | this.$router.push({ |
| | | path: "/report/transfer", |
| | | query: { |
| | | autoCreate: "true", |
| | | autoCreate: "true", //跳转转运标识 |
| | | caseId: caseData.id, |
| | | caseNo: caseData.caseNo, |
| | | patName: caseData.name, |
| | |
| | | treatmentHospitalName: caseData.treatmenthospitalname |
| | | } |
| | | }); |
| | | |
| | | // 方式2:在当前页面打开弹框(推荐) |
| | | // this.openTransportDialog(caseData); |
| | | }, |
| | | |
| | | /** 打开转运单弹框 */ |
| | |
| | | }, |
| | | |
| | | /** 跳转到转运单详情页 */ |
| | | goToTransportDetail(transportId, caseNo) { |
| | | goToTransportDetail(transportId, name) { |
| | | this.$router.push({ |
| | | path: "/report/transfer", |
| | | query: { |
| | | id: transportId, |
| | | caseNo: caseNo |
| | | autoCreate: "true", |
| | | patName: name |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 审批按钮操作 */ |
| | | /** 确认按钮操作 */ |
| | | async handleApprove(row) { |
| | | try { |
| | | const response = await donateInfo(row.id); |
| | |
| | | this.approveForm.approveResult = "3"; |
| | | this.approveForm.approveOpinion = ""; |
| | | this.approveOpen = true; |
| | | this.$modal.msgError("获取详情失败,但已打开审批窗口"); |
| | | this.$modal.msgError("获取详情失败,但已打开确认窗口"); |
| | | } |
| | | }, |
| | | |
| | | /** 提交审批 */ |
| | | /** 提交确认 */ |
| | | async submitApprove() { |
| | | try { |
| | | const valid = await this.$refs.approveForm.validate(); |
| | |
| | | }; |
| | | |
| | | await donateEdit(approveData); |
| | | this.$modal.msgSuccess("审批成功"); |
| | | this.$modal.msgSuccess("确认成功"); |
| | | this.approveOpen = false; |
| | | this.getList(); |
| | | } |
| | | } catch (error) { |
| | | console.error("审批失败:", error); |
| | | console.error("确认失败:", error); |
| | | if (error !== "cancel") { |
| | | this.$modal.msgError("审批失败"); |
| | | this.$modal.msgError("确认失败"); |
| | | } |
| | | } |
| | | }, |
| | |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | /* 审批弹框样式 */ |
| | | /* 确认弹框样式 */ |
| | | .approve-dialog >>> .el-dialog__body { |
| | | padding: 0; |
| | | } |