yeguodong 3 months ago
parent
commit
ee48a7baae

+ 17 - 0
src/api/inspections/yj-req.js

@@ -0,0 +1,17 @@
+import request from '../../utils/request'
+
+export function queryYjReqIndex(data) {
+  return request({
+    url: '/yjReq/queryYjReqIndex',
+    method: 'post',
+    data,
+  })
+}
+
+export function uploadYjPdf(data) {
+  return request({
+    url: '/yjReq/uploadYjPdf',
+    method: 'post',
+    data,
+  })
+}

+ 19 - 6
src/components/medical-insurance/medfee-analyse/Index.vue

@@ -1,7 +1,11 @@
 <template>
   <div class="component-box-wrapper__fullscreen layout_container" :style="{zIndex}">
-    <div style="font-size: 18px !important; margin-bottom: 20px">医保费用明细</div>
-    <div style="position: fixed; top: 12px; right: 20px; width: 100%; text-align: right">
+    <div style="display: flex; margin-bottom: 20px">
+      <div style="font-size: 18px !important;">
+        医保费用明细
+      </div>
+    </div>
+    <div style="position: fixed; top: 12px; right: 20px; width: 120px; text-align: right">
       <el-button circle icon="Download" title="导出Excel" type="primary" @click="exportExcel"></el-button>
       <el-button circle icon="Close" title="关闭" type="danger" @click="close"></el-button>
     </div>
@@ -88,14 +92,18 @@ import {useZIndex} from "element-plus";
 import {Export} from "@/utils/ExportExcel";
 
 const props = defineProps({
-  type: {
+  setlStatus: {
     type: String,
     default: 'settled',
   },
   mdtrtId: {
     type: String,
     required: true,
-  }
+  },
+  setlType: {
+    type: String,
+    default: '21',
+  },
 })
 
 const emits = defineEmits(['close'])
@@ -144,7 +152,8 @@ const handleClickChrgLv = (key, level) => {
 const fetchFeedtle = () => {
   const param = {
     mdtrtId: props.mdtrtId,
-    type: props.type,
+    setlStatus: props.setlStatus,
+    setlType: props.setlType,
   }
   queryFeeDetails(param).then((res) => {
     psninfo.value = res.psninfo
@@ -182,8 +191,12 @@ const close = () => {
 const zIndex = ref(0)
 onMounted(() => {
   zIndex.value = useZIndex().nextZIndex()
-  fetchFeedtle()
+  if (props.mdtrtId) {
+    fetchFeedtle()
+  }
 })
+
+defineExpose({fetchFeedtle})
 </script>
 
 <style scoped>

+ 13 - 0
src/utils/emr/emr-init-v2.ts

@@ -281,3 +281,16 @@ export enum RevisionShowMode {
   卡片,
   嵌入,
 }
+
+export function getBusiness(editor: EditType) {
+  const tmp = editor.getDataElements("business", true);
+
+  const data = {};
+  for (const key in tmp) {
+    const item = tmp[key];
+    if (key !== item.id) {
+      data[key] = item;
+    }
+  }
+  return data;
+}

+ 2 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -158,6 +158,7 @@ import { EmrEditCreateLimit } from "@/views/hospitalization/zhu-yuan-yi-sheng/el
 import { DataElements, EditorMode, EditType, Runtime } from "@/utils/emr/edit";
 import {
   getBcjlUserInfo,
+  getBusiness,
   parsingFragmentDataElements,
   RevisionShowMode,
   useEmrInit,
@@ -624,7 +625,7 @@ const clickSaveData = async () => {
   };
 
   if (!isCourse()) {
-    data.emrDataElement = editor.getDataElements("business", false, true);
+    data.emrDataElement = getBusiness(editor);
   }
 
   const saveErrorMsg = await triggerScript(

+ 5 - 0
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue

@@ -99,6 +99,11 @@ const selectAll = data => {
       show-overflow
     >
       <vxe-column type="checkbox" title="名称" />
+      <vxe-column title="部位/标本">
+        <template #default="{ row }">
+          {{ row.inspectPartName }}{{ row.inspectStuffName }}
+        </template>
+      </vxe-column>
     </vxe-table>
 
     <template #footer>

+ 153 - 0
src/views/med-tec-mod/JcReportUpload.vue

@@ -0,0 +1,153 @@
+<template>
+  <div class="layout_container">
+    <header class="round-header">
+      <el-date-picker
+          type="daterange"
+          v-model="daterange"
+          :shortcuts="shortcuts"
+          style="width: 200px"
+          :clearable="false"
+      />
+      <el-input
+          v-model="inquiry.patNo"
+          clearable
+          placeholder="住院号/门诊ID"
+          style="width: 100px;margin-left: 12px"
+      />
+      <el-divider direction="vertical" />
+      <el-button
+        type="primary"
+        @click="getYjReq"
+      >
+        查询医技申请
+      </el-button>
+    </header>
+    <div class="layout_container layout-horizontal">
+      <aside class="layout_el-table">
+        <el-table
+          :data="yjReqList"
+          stripe
+          highlight-current-row
+          @row-click="handleClickRow"
+        >
+          <el-table-column prop="patNo" :label="patNoType" width="70"/>
+          <el-table-column prop="patName" label="患者姓名" width="70" />
+          <el-table-column prop="reqNo" label="申请号" width="90" />
+          <el-table-column prop="groupName" label="申请内容" width="140" />
+          <el-table-column prop="reqDate" label="申请时间" width="130" />
+        </el-table>
+      </aside>
+      <div class="layout_main">
+        <div>
+          报告文件:请上传报告pdf文件
+          <el-upload
+              class="upload-demo"
+              ref="upload"
+              :action="apiUrl + '/yjReq/uploadYjPdf'"
+              :headers="header"
+              :file-list="fileList"
+              :limit="1"
+              :data="currentReq"
+              :on-exceed="fileSizeOutLimit"
+              :on-success="uploadSuccess"
+              :on-error="uploadError"
+              :auto-upload="false"
+              accept=".pdf"
+          >
+            <template #trigger>
+              <el-button type="primary" icon="Picture">选取文件</el-button>
+            </template>
+            <el-button
+                style="margin-left: 10px"
+                type="success"
+                icon="Upload"
+                @click="submitUpload"
+            >上传到服务器
+            </el-button>
+            <template #tip>
+              <div class="el-upload__tip">
+                只能上传 pdf 文件
+              </div>
+            </template>
+          </el-upload>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import {queryYjReqIndex,uploadYjPdf} from "@/api/inspections/yj-req.js";
+import {shortcuts} from "@/data/shortcuts.js";
+import {getDateRangeFormatDate, getOneMonthOffset} from "@/utils/date.js";
+import { isDev } from "@/utils/public";
+import env from "@/utils/setting";
+import {ref} from "vue";
+import {ElMessage} from "element-plus";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+
+const daterange = ref([])
+const inquiry = reactive({
+  patNo: '',
+  start: '',
+  end: ''
+})
+
+const patNoType = computed(() => {
+  if (yjReqList.value.length === 0) {
+    return ''
+  }
+  let req = yjReqList.value[0]
+  return req.patientType === 'INPATIENT' ? '住院号' : '门诊ID'
+})
+const yjReqList = ref([])
+function getYjReq() {
+  const m = getDateRangeFormatDate(daterange.value)
+  inquiry.start = m.startTime
+  inquiry.end = m.endTime
+  queryYjReqIndex(inquiry).then(res => {
+    console.log(res)
+    yjReqList.value = res
+  })
+}
+
+const upload = ref(null);
+const currentReq = ref({})
+const apiUrl = env.VITE_BASE_URL;
+const header = {
+  token: localStorage.token,
+};
+
+function handleClickRow(row) {
+  currentReq.value = row
+}
+
+const fileList = ref([]);
+const submitUpload = () => {
+  if (!currentReq.value.reqNo) {
+    xcMessage.warning('请先选择一条医技申请!')
+    return;
+  }
+  upload.value.submit();
+};
+const fileSizeOutLimit = () => {
+  ElMessage.error("已经选取报告文件,如须更换请先移除已选取的文件!");
+};
+const uploadSuccess = () => {
+  ElMessage.success("上传成功!");
+  fileList.value = [];
+};
+const uploadError = () => {
+  ElMessage.error("上传失败!");
+};
+
+onMounted(() => {
+  const m = getOneMonthOffset()
+  daterange.value[0] = m.start
+  daterange.value[1] = m.end
+  if (isDev) {
+    daterange.value[0] = '2025-06-01'
+    inquiry.patNo = '317452-0'
+  }
+})
+</script>

+ 58 - 23
src/views/medical-insurance/allpatient/SiSettleDetailList.vue

@@ -61,12 +61,19 @@
     <div v-if="showOperatePane" style="margin-left: 30px; padding: 20px 0">
       <div>
         <div style="display: inline-block; width: 70px">患者类别:</div>
-        <el-radio v-model="outParam.type" :label="21" @change="setlTypeChange"
-          >住院</el-radio
-        >
-        <el-radio v-model="outParam.type" :label="11" @change="setlTypeChange"
-          >门诊</el-radio
-        >
+        <el-radio
+            v-model="outParam.type"
+            :label="21"
+            @change="setlTypeChange"
+          >
+          住院
+        </el-radio>
+        <el-radio
+            v-model="outParam.type"
+            :label="11"
+            @change="setlTypeChange">
+          门诊
+        </el-radio>
       </div>
       <div style="margin-top: 8px">
         <el-input
@@ -80,21 +87,20 @@
           v-model="outParam.label"
           @focus="getTimesList"
           placeholder="结算条目"
-          style="width: 230px"
         >
           <el-option
             v-for="item in timesList"
             :key="item.setlId"
             :value="item.label"
           >
-            <span style="color: #8492a6; font-size: 12px">{{
-              item.times
-            }}</span>
+            <span style="color: #8492a6; font-size: 12px">
+              {{item.times }}
+            </span>
             <el-divider direction="vertical"></el-divider>
             <span v-show="outParam.type === 21">
-              <span style="color: #8492a6; font-size: 12px">{{
-                item.ledgerSn
-              }}</span>
+              <span style="color: #8492a6; font-size: 12px">
+                {{item.ledgerSn }}
+              </span>
               <el-divider direction="vertical"></el-divider>
             </span>
             <span>{{ item.endtime }}</span>
@@ -102,10 +108,26 @@
         </el-select>
       </div>
       <div style="width: 100%; text-align: right; margin-top: 8px">
-        <el-button icon="Printer" @click="siPrint">打印</el-button>
-        <el-button type="primary" icon="Search" @click="executeQrySetlinfo">
-          查找</el-button
+        <el-button
+            type="primary"
+            icon="Search"
+            @click="executeQrySetlinfo"
         >
+          查询
+        </el-button>
+        <el-button
+          icon="Document"
+          type="primary"
+          @click="displayFeeDetl"
+        >
+          费用明细
+        </el-button>
+        <el-button
+            icon="Printer"
+            @click="siPrint"
+        >
+          打印
+        </el-button>
       </div>
       <div
         style="
@@ -121,13 +143,19 @@
     <div v-else style="position: fixed; top: 6px; right: 30px">
       <el-button type="danger" icon="Printer" @click="siPrint">打印</el-button>
     </div>
+    <MedfeeAnalyse
+        v-if="showFeeDetl"
+        setl-status="settled"
+        :mdtrt-id="setlinfo.mdtrtId"
+        :setl-type="outParam.type"
+        @close="showFeeDetl = false"
+    />
   </div>
 </template>
 
 <script setup>
 import { initLodop, getLodop } from "@/utils/c-lodop";
 import { computed, onMounted, reactive, ref } from "vue";
-import { ElMessage } from "element-plus";
 import router from "@/router";
 import {
   querySiSetlList,
@@ -138,6 +166,8 @@ import InpatientSetlList from "@/components/medical-insurance/settle-detail-list
 import OtherOutpatientSetlList from "@/components/medical-insurance/settle-detail-list/OtherOutpatientSetlList.vue";
 import EmployeeOutpatientSetlList from "@/components/medical-insurance/settle-detail-list/EmployeeOutpatientSetlList.vue";
 import env from "../../../utils/setting";
+import MedfeeAnalyse from "@/components/medical-insurance/medfee-analyse/Index.vue";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
 
 const path = router.currentRoute.value.fullPath;
 const showOperatePane = path === "/medins/qryManage/siSettleDetailList";
@@ -229,12 +259,7 @@ const executeQrySetlinfo = () => {
 
 const siPrint = () => {
   if (!setlinfo.value.mdtrtId) {
-    ElMessage({
-      message: "无法打印空白的结算清单!",
-      type: "warning",
-      duration: 2000,
-      showClose: true,
-    });
+    xcMessage.warning("无法打印空白的结算清单!")
     return;
   }
   const prntStyle =
@@ -267,6 +292,16 @@ onMounted(() => {
     executeQrySetlinfo();
   }
 });
+
+const showFeeDetl = ref(false);
+
+function displayFeeDetl() {
+  if (!setlinfo.value.mdtrtId) {
+    xcMessage.warning('请先查询结算单!')
+    return;
+  }
+  showFeeDetl.value = true
+}
 </script>
 
 <style scoped>

+ 1 - 1
src/views/medical-insurance/inpatient/InHospFeeUpload.vue

@@ -199,7 +199,7 @@
   </el-dialog>
   <MedfeeAnalyse
     v-if="showFeeDetl"
-    type="unsettled"
+    setl-status="unsettled"
     :mdtrt-id="patient.mdtrtId"
     @close="showFeeDetl = false"
   />

+ 553 - 412
src/views/medical-insurance/management/RecordManagement.vue

@@ -7,13 +7,13 @@
       <el-input v-model="psnIdNumber" placeholder="人员身份证号" clearable style="width: 180px"></el-input>
       <el-divider direction="vertical"></el-divider>
       <ReadCard
-        :pat-no="psnIdNumber"
-        biztype="01103"
-        @success="afterReadCard"
+          :pat-no="psnIdNumber"
+          biztype="01103"
+          @success="afterReadCard"
       />
       <el-button type="success" @click="queryPsnBaseInfo">参保信息</el-button>
-      <el-button type="primary" @click="startApplyRecord"> 开始备案 </el-button>
-      <el-button type="primary" @click="revokeRecord"> 撤销备案 </el-button>
+      <el-button type="primary" @click="startApplyRecord"> 开始备案</el-button>
+      <el-button type="primary" @click="revokeRecord"> 撤销备案</el-button>
       <span v-if="recordType === '2503'" style="margin-left: 12px">
         <el-button type="success" @click="querySpecialDiseaseRecords"> 备案查询 </el-button>
         <el-button type="success" @click="displayDateRange"> 用药记录 </el-button>
@@ -26,35 +26,35 @@
     <div>
       <el-descriptions :column="4" border>
         <el-descriptions-item>
-          <template #label> 姓名 </template>
+          <template #label> 姓名</template>
           {{ baseinfo.psnName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 性别 </template>
+          <template #label> 性别</template>
           {{ baseinfo.gendName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 证件类型 </template>
+          <template #label> 证件类型</template>
           {{ baseinfo.psnCertTypeName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 证件号码 </template>
+          <template #label> 证件号码</template>
           {{ baseinfo.certno }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 出生日期 </template>
+          <template #label> 出生日期</template>
           {{ baseinfo.brdy }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 年龄 </template>
+          <template #label> 年龄</template>
           {{ baseinfo.age }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 民族 </template>
+          <template #label> 民族</template>
           {{ baseinfo.natyName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template #label> 人员编号 </template>
+          <template #label> 人员编号</template>
           {{ baseinfo.psnNo }}
         </el-descriptions-item>
       </el-descriptions>
@@ -94,8 +94,8 @@
     </div>
   </div>
 
-  <el-dialog v-model="showSpecialDiseaseRecords" title="慢特病备案信息">
-    <el-table :data="specialDiseaseRecords" stripe>
+  <el-dialog v-model="showMtbRecords" title="慢特病备案信息">
+    <el-table :data="mtbRecords" stripe>
       <el-table-column property="begndate" label="开始日期"></el-table-column>
       <el-table-column prop="enddate" label="结束日期"></el-table-column>
       <el-table-column prop="opspDiseCode" label="病种编码"></el-table-column>
@@ -103,8 +103,8 @@
       <el-table-column prop="ideFixmedinsName" label="备案机构"></el-table-column>
     </el-table>
   </el-dialog>
-  <el-dialog v-model="showSpecialDiseaseUsedMedicines" title="慢特病用药记录">
-    <el-table :data="specialDiseaseUsedMedicines" stripe height="360">
+  <el-dialog v-model="showMtbUsedMedicines" title="慢特病用药记录">
+    <el-table :data="mtbUsedMedicines" stripe height="360">
       <el-table-column prop="fixmedinsCode" label="定点医药机构编号"></el-table-column>
       <el-table-column prop="fixmedinsName" label="定点医药机构名称"></el-table-column>
       <el-table-column prop="cnt" label="数量"></el-table-column>
@@ -134,9 +134,9 @@
       <el-button type="primary" @click="querySpecialDiseaseUsedMedicines" icon="Check">确定</el-button>
     </div>
   </el-dialog>
-  <el-dialog v-model="showFetchAllSpecialDiseaseRecords" title="门特备案记录" width="70%">
+  <el-dialog v-model="showFetchAllMtbUsedMedicines" title="门特备案记录" width="70%">
     <el-date-picker
-        v-model="fetchAllSpecialDiseaseRecordsDateRange"
+        v-model="fetchAllMtbRecordsDateRange"
         type="daterange"
         :shortcuts="maxHalfYear"
         range-separator="至"
@@ -148,7 +148,7 @@
     <el-divider direction="vertical"></el-divider>
     <el-button type="primary" icon="Check" @click="fetchAllSpecialDiseaseRecords">查询</el-button>
     <el-button type="primary" icon="Download" @click="exportExcel">导出Excel</el-button>
-    <el-table :data="allSpecialDiseaseRecords" height="400" stripe highlight-current-row>
+    <el-table :data="allMtbRecords" height="400" stripe highlight-current-row>
       <el-table-column prop="psnName" label="人员姓名"></el-table-column>
       <el-table-column prop="psnNo" label="人员编码"></el-table-column>
       <el-table-column prop="socialNo" label="身份证号"></el-table-column>
@@ -163,7 +163,7 @@
     </el-table>
   </el-dialog>
 
-  <el-dialog v-model="showApplySpecialDiseaseRecord" width="70%" title="人员慢特病备案申请">
+  <el-dialog v-model="showMtbRecord" width="70%" title="人员慢特病备案申请">
     <i style="color: red">* </i>人员类别:&nbsp;&nbsp;
     <el-radio v-model="perstype" :label="1">职工</el-radio>
     <el-radio v-model="perstype" :label="2">居民</el-radio>
@@ -171,49 +171,51 @@
     <el-row :gutter="5">
       <el-col :span="8">
         人员编号:
-        <el-input v-model="tempSpecialDiseaseRecord.psnNo" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.psnNo" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         险种类型:
-        <el-input v-model="tempSpecialDiseaseRecord.insutypeName" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.insutypeName" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         联系电话:
-        <el-input v-model="tempSpecialDiseaseRecord.tel" style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.tel" style="width: 160px"></el-input>
       </el-col>
     </el-row>
     <div style="height: 12px"></div>
     <el-row :gutter="5">
       <el-col :span="8">
         联系地址:
-        <el-input v-model="tempSpecialDiseaseRecord.addr" style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.addr" style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         参保地区:
-        <el-input v-model="tempSpecialDiseaseRecord.insuOptinsName" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.insuOptinsName" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         鉴定日期:
-        <el-date-picker v-model="tempSpecialDiseaseRecord.hospIdeDate" style="width: 160px"></el-date-picker>
+        <el-date-picker v-model="tempMtbRecord.hospIdeDate" style="width: 160px"></el-date-picker>
       </el-col>
     </el-row>
     <div style="height: 12px"></div>
     <el-row :gutter="5">
       <el-col :span="8">
         开始日期:
-        <el-date-picker v-model="tempSpecialDiseaseRecord.begndate" style="width: 160px"></el-date-picker>
+        <el-date-picker v-model="tempMtbRecord.begndate" style="width: 160px"></el-date-picker>
       </el-col>
       <el-col :span="8">
         结束日期:
-        <el-date-picker v-model="tempSpecialDiseaseRecord.enddate" style="width: 160px"></el-date-picker>
+        <el-date-picker v-model="tempMtbRecord.enddate" style="width: 160px"></el-date-picker>
       </el-col>
       <el-col :span="8">
         <div style="display: flex">
           <div>病种名称:</div>
           <div>
-            <el-autocomplete v-model="tempSpecialDiseaseRecord.opspDiseName"
-                             :fetch-suggestions="searchDiag" placeholder="请输入名称" clearable
-                             @select="handleSelectDiag">
+            <el-autocomplete
+                v-model="tempMtbRecord.opspDiseName"
+                :fetch-suggestions="searchDiag" placeholder="请输入名称" clearable
+                @select="handleSelectDiag"
+            >
               <template #default="{ item }">
                 <div style="height: 40px">
                   <div style="height: 16px; margin-top: 4px; font-size: 12px; color: #8492a6">
@@ -231,13 +233,19 @@
     <el-row :gutter="5">
       <el-col :span="8">
         病种编码:
-        <el-input v-model="tempSpecialDiseaseRecord.opspDiseCode" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.opspDiseCode" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         <div style="display: flex">
           <div>医师姓名:</div>
           <div>
-            <el-autocomplete v-model="tempSpecialDiseaseRecord.diagDrName" :fetch-suggestions="searchPhysician" placeholder="请输入姓名" clearable @select="handleSelectPhysician">
+            <el-autocomplete
+                v-model="tempMtbRecord.diagDrName"
+                :fetch-suggestions="searchPhysician"
+                placeholder="请输入姓名"
+                clearable
+                @select="handleSelectPhysician"
+            >
               <template #default="{ item }">
                 <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
                 <el-divider direction="vertical"></el-divider>
@@ -249,12 +257,109 @@
       </el-col>
       <el-col :span="8">
         医师编码:
-        <el-input v-model="tempSpecialDiseaseRecord.diagDrCodg" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempMtbRecord.diagDrCodg" disabled style="width: 160px"></el-input>
       </el-col>
     </el-row>
     <div style="margin-top: 24px; width: 100%; text-align: right">
-      <el-button plain icon="Close" @click="showApplySpecialDiseaseRecord = false">放弃备案</el-button>
-      <el-button type="primary" icon="Check" @click="submitSpecialDiseaseRecord">提交备案</el-button>
+      <el-button plain icon="Close" @click="showMtbRecord = false">放弃备案</el-button>
+      <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
+    </div>
+    <div style="height: 12px"></div>
+  </el-dialog>
+
+  <el-dialog v-model="showDdRecord" width="70%" title="定点备案申请">
+    <el-row :gutter="5">
+      <el-col :span="8">
+        人员编号:
+        <el-input v-model="tempDdRecord.psnNo" disabled style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        险种类型:
+        <el-input v-model="tempDdRecord.insutypeName" disabled style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        参保地区:
+        <el-input v-model="tempDdRecord.insuOptinsName" disabled style="width: 160px"></el-input>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <el-row :gutter="5">
+      <el-col :span="8">
+        联系电话:
+        <el-input v-model="tempDdRecord.tel" style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        联系地址:
+        <el-input v-model="tempDdRecord.addr" style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        业务申请类型:
+        <el-select
+            v-model="tempDdRecord.bizAppyType"
+            style="width: 160px"
+        >
+          <el-option value="01" label="门诊慢特病登记" />
+          <el-option value="08" label="异地安置登记" />
+          <el-option value="03" label="就医定点医疗机构登记" />
+        </el-select>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <el-row :gutter="5">
+      <el-col :span="8">
+        定点排序号:
+        <el-input
+            v-model="tempDdRecord.fixSrtNo"
+            style="width: 160px"
+        />
+      </el-col>
+      <el-col :span="8">
+        机构编号:
+        <el-input
+            v-model="tempDdRecord.fixmedinsCode"
+            disabled
+            style="width: 160px"
+        />
+      </el-col>
+      <el-col :span="8">
+        机构名称:
+        <el-input
+            v-model="tempDdRecord.fixmedinsName"
+            disabled
+            style="width: 160px"
+        />
+      </el-col>
+    </el-row>
+
+    <div style="height: 12px"></div>
+    <el-row :gutter="5">
+      <el-col :span="8">
+        开始日期:
+        <el-date-picker
+            v-model="tempDdRecord.begndate"
+            style="width: 160px" type="date"
+            format="YYYY-MM-DD"
+            value-format="YYYY-MM-DD"
+        />
+      </el-col>
+      <el-col :span="8">
+        结束日期:
+        <el-date-picker
+            v-model="tempDdRecord.enddate"
+            style="width: 160px" type="date"
+            format="YYYY-MM-DD"
+            value-format="YYYY-MM-DD"
+        />
+      </el-col>
+      <el-col :span="8">
+        补充说明:
+        <el-input v-model="tempDdRecord.memo" style="width: 160px"></el-input>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <div style="margin-top: 24px; width: 100%; text-align: right">
+      <el-button plain icon="Close" @click="showDdRecord = false">放弃备案</el-button>
+      <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
     </div>
     <div style="height: 12px"></div>
   </el-dialog>
@@ -263,99 +368,128 @@
     <el-row :gutter="5">
       <el-col :span="8">
         人员编号:
-        <el-input v-model="tempPsAcRecord.psnNo" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempWsRecord.psnNo" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         险种类型:
-        <el-input v-model="tempPsAcRecord.insutypeName" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempWsRecord.insutypeName" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         联系电话:
-        <el-input v-model="tempPsAcRecord.tel" style="width: 160px"></el-input>
+        <el-input v-model="tempWsRecord.tel" style="width: 160px"></el-input>
       </el-col>
     </el-row>
     <div style="height: 12px"></div>
     <el-row :gutter="5">
       <el-col :span="8">
         联系地址:
-        <el-input v-model="tempPsAcRecord.addr" style="width: 160px"></el-input>
+        <el-input v-model="tempWsRecord.addr" style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         参保地区:
-        <el-input v-model="tempPsAcRecord.insuAdmdvsName" disabled style="width: 160px"></el-input>
+        <el-input v-model="tempWsRecord.insuAdmdvsName" disabled style="width: 160px"></el-input>
       </el-col>
       <el-col :span="8">
         受伤日期:
-        <el-date-picker v-model="tempPsAcRecord.trumTime" style="width: 160px" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"></el-date-picker>
+        <el-date-picker v-model="tempWsRecord.trumTime" style="width: 160px" type="datetime"
+                        format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <el-row :gutter="5">
+      <el-col :span="8">
+        受伤部位:
+        <el-input v-model="tempWsRecord.trumPart" style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        受伤地点:
+        <el-input v-model="tempWsRecord.trumSite" style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        受伤原因:
+        <el-input v-model="tempWsRecord.trumRea" style="width: 160px"></el-input>
       </el-col>
     </el-row>
     <div style="height: 12px"></div>
     <el-row :gutter="5">
       <el-col :span="8">
         开始日期:
-        <el-date-picker v-model="tempPsAcRecord.begndate" style="width: 160px" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"></el-date-picker>
+        <el-date-picker v-model="tempWsRecord.begndate" style="width: 160px" type="date" format="YYYY-MM-DD"
+                        value-format="YYYY-MM-DD"></el-date-picker>
       </el-col>
       <el-col :span="8">
         结束日期:
-        <el-date-picker v-model="tempPsAcRecord.enddate" style="width: 160px" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"></el-date-picker>
+        <el-date-picker v-model="tempWsRecord.enddate" style="width: 160px" type="date" format="YYYY-MM-DD"
+                        value-format="YYYY-MM-DD"></el-date-picker>
+      </el-col>
+      <el-col :span="8">
+        补充说明:
+        <el-input v-model="tempWsRecord.memo" style="width: 160px"></el-input>
       </el-col>
     </el-row>
     <div style="height: 12px"></div>
     <div style="margin-top: 24px; width: 100%; text-align: right">
-      <el-button plain icon="Close" @click="showApplySpecialDiseaseRecord = false">放弃备案</el-button>
-      <el-button type="primary" icon="Check" @click="submitSpecialDiseaseRecord">提交备案</el-button>
+      <el-button plain icon="Close" @click="showWsRecord = false">放弃备案</el-button>
+      <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
     </div>
     <div style="height: 12px"></div>
   </el-dialog>
 
-    <el-dialog v-model="showSyRecord" width="70%" title="生育备案申请">
-        <el-row :gutter="5">
-            <el-col :span="8">
-                人员编号:
-                <el-input v-model="tempSyRecord.psnNo" disabled style="width: 160px"></el-input>
-            </el-col>
-            <el-col :span="8">
-                险种类型:
-                <el-input v-model="tempSyRecord.insutypeName" disabled style="width: 160px"></el-input>
-            </el-col>
-            <el-col :span="8">
-                联系电话:
-                <el-input v-model="tempSyRecord.tel" style="width: 160px"></el-input>
-            </el-col>
-        </el-row>
-        <div style="height: 12px"></div>
-        <el-row :gutter="5">
-            <el-col :span="8">
-                联系地址:
-                <el-input v-model="tempSyRecord.addr" style="width: 160px"></el-input>
-            </el-col>
-            <el-col :span="8">
-                参保地区:
-                <el-input v-model="tempSyRecord.insuAdmdvsName" disabled style="width: 160px"></el-input>
-            </el-col>
-        </el-row>
-        <div style="height: 12px"></div>
-        <el-row :gutter="5">
-            <el-col :span="8">
-                开始日期:
-                <el-date-picker v-model="tempSyRecord.begndate" style="width: 160px" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"></el-date-picker>
-            </el-col>
-            <el-col :span="8">
-                结束日期:
-                <el-date-picker v-model="tempSyRecord.enddate" style="width: 160px" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"></el-date-picker>
-            </el-col>
-        </el-row>
-        <div style="height: 12px"></div>
-        <div style="margin-top: 24px; width: 100%; text-align: right">
-            <el-button plain icon="Close" @click="showApplySpecialDiseaseRecord = false">放弃备案</el-button>
-            <el-button type="primary" icon="Check" @click="submitSpecialDiseaseRecord">提交备案</el-button>
-        </div>
-        <div style="height: 12px"></div>
-    </el-dialog>
+  <el-dialog v-model="showSyRecord" width="70%" title="生育备案申请">
+    <el-row :gutter="5">
+      <el-col :span="8">
+        人员编号:
+        <el-input v-model="tempSyRecord.psnNo" disabled style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        险种类型:
+        <el-input v-model="tempSyRecord.insutypeName" disabled style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        联系电话:
+        <el-input v-model="tempSyRecord.tel" style="width: 160px"></el-input>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <el-row :gutter="5">
+      <el-col :span="8">
+        联系地址:
+        <el-input v-model="tempSyRecord.addr" style="width: 160px"></el-input>
+      </el-col>
+      <el-col :span="8">
+        参保地区:
+        <el-input v-model="tempSyRecord.insuAdmdvsName" disabled style="width: 160px"></el-input>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <el-row :gutter="5">
+      <el-col :span="8">
+        开始日期:
+        <el-date-picker v-model="tempSyRecord.begndate" style="width: 160px" type="date" format="YYYY-MM-DD"
+                        value-format="YYYY-MM-DD"></el-date-picker>
+      </el-col>
+      <el-col :span="8">
+        结束日期:
+        <el-date-picker v-model="tempSyRecord.enddate" style="width: 160px" type="date" format="YYYY-MM-DD"
+                        value-format="YYYY-MM-DD"></el-date-picker>
+      </el-col>
+    </el-row>
+    <div style="height: 12px"></div>
+    <div style="margin-top: 24px; width: 100%; text-align: right">
+      <el-button plain icon="Close" @click="showSyRecord = false">放弃备案</el-button>
+      <el-button type="primary" icon="Check" @click="submitRecord">提交备案</el-button>
+    </div>
+    <div style="height: 12px"></div>
+  </el-dialog>
 
   <el-dialog v-model="showAllAppliedSpecicalDiseaseRecords" title="请选择要撤销的备案" width="70%">
     <div style="height: 12px"></div>
-    <el-table :data="allAppliedSpecialDiseaseRecords" stripe highlight-current-row @row-click="handleSelectAppliedSpecialDiseaseRecord">
+    <el-table
+        :data="allAppliedSpecialDiseaseRecords"
+        stripe
+        highlight-current-row
+        @row-click="handleSelectAppliedSpecialDiseaseRecord"
+    >
       <el-table-column prop="opspDiseCode" label="病种编码"></el-table-column>
       <el-table-column prop="opspDiseName" label="病种名称"></el-table-column>
       <el-table-column prop="hospIdeDate" label="鉴定日期"></el-table-column>
@@ -372,32 +506,35 @@
 </template>
 <script setup>
 import {
-    obtainBasicPersonInfo,
-    querySpecialChronicDiseasesAccreditation,
-    querySpecialChronicDiseasesMedicalRecord
+  obtainBasicPersonInfo,
+  querySpecialChronicDiseasesAccreditation,
+  querySpecialChronicDiseasesMedicalRecord
 } from "@/api/medical-insurance/si-query";
 import {ElMessage, ElMessageBox} from "element-plus";
 import {formatDate, formatDatetime} from "@/utils/date";
 import {maxHalfYear} from "@/data/shortcuts";
 import {
-    getAllSpcChrRcdsByPsnNo, revokeSpecialChronicDiseasesRecord,
-    selectAllSpcSlwRcds,
-    specialChronicDiseasesRecord,
-    personnelAccidentRecord,
-    birthRecord,
-    getZyActpatient,
-    revokePersonnelAccidentRecord
+  getAllSpcChrRcdsByPsnNo, 
+  revokeSpecialChronicDiseasesRecord,
+  selectAllSpcSlwRcds,
+  specialChronicDiseasesRecord,
+  personnelAccidentRecord,
+  personnelAssignmentRecord,
+  birthRecord,
+  getZyActpatient,
+  revokePersonnelAccidentRecord
 } from "@/api/medical-insurance/si-psn-rcd";
 import {Export} from "@/utils/ExportExcel";
 import {searchData} from "@/api/inpatient/dictionary";
 import ReadCard from "@/components/medical-insurance/readcard/Index.vue";
+import env from "@/utils/setting";
 
 const allRecordTypes = [
-    { value: '2503', label: '慢特病备案' },
-    { value: '2505', label: '定点备案' },
-    { value: '2560', label: '意外伤害备案' },
-    { value: '2562', label: '生育备案' },
-    // { value: '2501', label: '转院备案' },
+  {value: '2503', label: '慢特病备案'},
+  {value: '2505', label: '定点备案'},
+  {value: '2560', label: '意外伤害备案'},
+  {value: '2562', label: '生育备案'},
+  // { value: '2501', label: '转院备案' },
 ]
 const recordType = ref('2503')
 const psnIdNumber = ref('')
@@ -405,22 +542,24 @@ const psnIdNumber = ref('')
 const baseinfo = ref({})
 const currentInsuinfo = ref({})
 const perstype = ref(1)
-const specialDiseaseRecords = ref([])
-const showSpecialDiseaseRecords = ref(false)
-const specialDiseaseUsedMedicines = ref([])
-const showSpecialDiseaseUsedMedicines = ref(false)
+const mtbRecords = ref([])
+const showMtbRecords = ref(false)
+const mtbUsedMedicines = ref([])
+const showMtbUsedMedicines = ref(false)
 const dateRange = ref(null)
 const showDateRange = ref(false)
-const showFetchAllSpecialDiseaseRecords = ref(false)
-const fetchAllSpecialDiseaseRecordsDateRange = ref(null)
-const allSpecialDiseaseRecords = ref([])
-const showApplySpecialDiseaseRecord = ref(false);
+const showFetchAllMtbUsedMedicines = ref(false)
+const fetchAllMtbRecordsDateRange = ref(null)
+const allMtbRecords = ref([])
+const showMtbRecord = ref(false);
+const showDdRecord = ref(false);
 const showWsRecord = ref(false);
 const showSyRecord = ref(false);
-const tempSpecialDiseaseRecord = reactive({});
-const tempPsAcRecord = reactive({});
+const tempMtbRecord = reactive({});
+const tempDdRecord = reactive({});
+const tempWsRecord = reactive({});
 const tempSyRecord = reactive({});
-const actPatient = reactive({});
+const actPatient = ref({});
 
 const ybCard = reactive({
   mdtrtCertType: null,
@@ -465,7 +604,7 @@ const afterReadCard = result => {
         console.error("刷脸读卡数据解析失败:", error);
       }
     }
-    
+
     // 读卡成功后显示提示
     ElMessage({
       message: '读卡成功,已自动填充身份证号',
@@ -476,366 +615,368 @@ const afterReadCard = result => {
   }
 };
 
-const nullIdNumber = () => {
-    if (!psnIdNumber.value) {
-        ElMessage({
-            message: '请输入患者身份证号!',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return true
-    }
-    return false
-}
-
 const queryPsnBaseInfo = () => {
-    if (nullIdNumber()) {
-        return
-    }
-    const param = {
-      socialNo: psnIdNumber.value,
-      onlyQry: 1,
-      readCardResult: ybCard.readCardResult,
-      busCardInfo: ybCard.busCardInfo,
-      mdtrtCertType: ybCard.mdtrtCertType,
-    }
-    obtainBasicPersonInfo(param).then((res) => {
-        baseinfo.value = res
-    }).catch(() => {
-        baseinfo.value = {}
-    });
-    getZyActpatient(psnIdNumber.value).then(res => {
-        actPatient.value = res;
-    });
+  const param = {
+    socialNo: psnIdNumber.value,
+    onlyQry: 1,
+    readCardResult: ybCard.readCardResult || 'to be del',
+    busCardInfo: ybCard.busCardInfo,
+    mdtrtCertType: ybCard.mdtrtCertType,
+  }
+  obtainBasicPersonInfo(param).then((res) => {
+    baseinfo.value = res
+  }).catch(() => {
+    baseinfo.value = {}
+  });
+  getZyActpatient(psnIdNumber.value).then(res => {
+    actPatient.value = res;
+  });
 }
 
 const nullBaseinfo = (needInsuinfo) => {
-    if (!baseinfo.value.psnNo) {
-        ElMessage({
-            message: '请先查询参保信息!',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return true
-    }
-    if (needInsuinfo && !currentInsuinfo.value.insutype) {
-        ElMessage({
-            message: '请选择一条参保信息!',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return true
-    }
-    return false
+  if (!baseinfo.value.psnNo) {
+    ElMessage({
+      message: '请先查询参保信息!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
+    })
+    return true
+  }
+  if (needInsuinfo && !currentInsuinfo.value.insutype) {
+    ElMessage({
+      message: '请选择一条参保信息!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
+    })
+    return true
+  }
+  return false
 }
 
 const nullDateRange = () => {
-    if (!dateRange.value) {
-        ElMessage({
-            message: '请选择日期范围!',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return true
-    }
-    return false
+  if (!dateRange.value) {
+    ElMessage({
+      message: '请选择日期范围!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
+    })
+    return true
+  }
+  return false
 }
 
 const handleClickInsuinfo = (row) => {
-    currentInsuinfo.value = row
-    if (row.insutype === '310') {
-        perstype.value = 1
-    } else if (row.insutype === '390') {
-        perstype.value = 2
-    }
+  currentInsuinfo.value = row
+  if (row.insutype === '310') {
+    perstype.value = 1
+  } else if (row.insutype === '390') {
+    perstype.value = 2
+  }
 }
 
 const querySpecialDiseaseRecords = () => {
-    if (nullBaseinfo(true)) {
-        return
-    }
-    querySpecialChronicDiseasesAccreditation({
-        psnNo: baseinfo.value.psnNo,
-        admdvs: currentInsuinfo.value.insuplcAdmdvs,
-        needAllRcd: 1,
-    }).then((res) => {
-        specialDiseaseRecords.value = res
-        showSpecialDiseaseRecords.value = true
-    })
+  if (nullBaseinfo(true)) {
+    return
+  }
+  querySpecialChronicDiseasesAccreditation({
+    psnNo: baseinfo.value.psnNo,
+    admdvs: currentInsuinfo.value.insuplcAdmdvs,
+    needAllRcd: 1,
+  }).then((res) => {
+    mtbRecords.value = res
+    showMtbRecords.value = true
+  })
 }
 
 const displayDateRange = () => {
-    showDateRange.value = true
+  showDateRange.value = true
 }
 
 const querySpecialDiseaseUsedMedicines = () => {
-    if (nullBaseinfo(false)) {
-        return
-    }
-    if (nullDateRange()) {
-        return
-    }
-    const param = {
-        psnNo: baseinfo.value.psnNo,
-        begntime: formatDatetime(dateRange.value[0]),
-        endtime: formatDatetime(dateRange.value[1]),
-    }
-    querySpecialChronicDiseasesMedicalRecord(param).then((res) => {
-        showDateRange.value = false
-        specialDiseaseUsedMedicines.value = res
-        showSpecialDiseaseUsedMedicines.value = true
-    })
+  if (nullBaseinfo(false)) {
+    return
+  }
+  if (nullDateRange()) {
+    return
+  }
+  const param = {
+    psnNo: baseinfo.value.psnNo,
+    begntime: formatDatetime(dateRange.value[0]),
+    endtime: formatDatetime(dateRange.value[1]),
+  }
+  querySpecialChronicDiseasesMedicalRecord(param).then((res) => {
+    showDateRange.value = false
+    mtbUsedMedicines.value = res
+    showMtbUsedMedicines.value = true
+  })
 }
 
 const beforeFetchAllSpecialDiseaseRecords = () => {
-    showFetchAllSpecialDiseaseRecords.value = true
+  showFetchAllMtbUsedMedicines.value = true
 }
 
 const fetchAllSpecialDiseaseRecords = () => {
-    if (!fetchAllSpecialDiseaseRecordsDateRange.value) {
-        ElMessage({
-            message: '请选择日期范围!',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return true
-    }
-    const begntime = formatDate(fetchAllSpecialDiseaseRecordsDateRange.value[0])
-    const endtime = formatDate(fetchAllSpecialDiseaseRecordsDateRange.value[1])
-    selectAllSpcSlwRcds(begntime, endtime).then((res) => {
-        allSpecialDiseaseRecords.value = res
+  if (!fetchAllMtbRecordsDateRange.value) {
+    ElMessage({
+      message: '请选择日期范围!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
     })
+    return true
+  }
+  const begntime = formatDate(fetchAllMtbRecordsDateRange.value[0])
+  const endtime = formatDate(fetchAllMtbRecordsDateRange.value[1])
+  selectAllSpcSlwRcds(begntime, endtime).then((res) => {
+    allMtbRecords.value = res
+  })
 }
 
 const exportExcel = () => {
-    if (allSpecialDiseaseRecords.value.length === 0) {
-        ElMessage({
-            message: '没有可以导出的数据。',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return true
-    }
-    const title = {
-        psnName: '人员姓名',
-        psnNo: '人员编码',
-        socialNo: '身份证号',
-        opspDiseCode: '病种编码',
-        opspDiseName: '病种名称',
-        ideFixmedinsName: '鉴定机构',
-        hospIdeDate: '鉴定日期',
-        diagDrName: '诊断医师',
-        begndate: '开始日期',
-        enddate: '结束日期',
-        trtDclaDetlSn: '备案流水号',
-    }
-    Export(allSpecialDiseaseRecords.value, title, '门特备案详情')
+  if (allMtbRecords.value.length === 0) {
+    ElMessage({
+      message: '没有可以导出的数据。',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
+    })
+    return true
+  }
+  const title = {
+    psnName: '人员姓名',
+    psnNo: '人员编码',
+    socialNo: '身份证号',
+    opspDiseCode: '病种编码',
+    opspDiseName: '病种名称',
+    ideFixmedinsName: '鉴定机构',
+    hospIdeDate: '鉴定日期',
+    diagDrName: '诊断医师',
+    begndate: '开始日期',
+    enddate: '结束日期',
+    trtDclaDetlSn: '备案流水号',
+  }
+  Export(allMtbRecords.value, title, '门特备案详情')
 }
 
 const searchDiag = (queryString, cb) => {
-    if (queryString && queryString.length > 1) {
-        const param = {
-            method: 'name',
-            content: queryString,
-            target: 'slwspcdiag',
-            perstype: perstype.value,
-            medType: '14',
-        }
-        searchData(param).then((res) => {
-            cb(res)
-        })
+  if (queryString && queryString.length > 1) {
+    const param = {
+      method: 'name',
+      content: queryString,
+      target: 'slwspcdiag',
+      perstype: perstype.value,
+      medType: '14',
     }
+    searchData(param).then((res) => {
+      cb(res)
+    })
+  }
 }
 
 const handleSelectDiag = (item) => {
-    tempSpecialDiseaseRecord.opspDiseCode = item.code
-    tempSpecialDiseaseRecord.opspDiseName = item.name
+  tempMtbRecord.opspDiseCode = item.code
+  tempMtbRecord.opspDiseName = item.name
 }
 
 const searchPhysician = (queryString, cb) => {
-    if (queryString && queryString.length > 1) {
-        const param = {
-            method: 'name',
-            content: queryString,
-            target: 'physician',
-            medType: '14',
-        }
-        searchData(param).then((res) => {
-            cb(res)
-        })
+  if (queryString && queryString.length > 1) {
+    const param = {
+      method: 'name',
+      content: queryString,
+      target: 'physician',
+      medType: '14',
     }
+    searchData(param).then((res) => {
+      cb(res)
+    })
+  }
 }
 const handleSelectPhysician = (item) => {
-    tempSpecialDiseaseRecord.diagDrCodg = item.code
-    tempSpecialDiseaseRecord.diagDrName = item.name
+  tempMtbRecord.diagDrCodg = item.code
+  tempMtbRecord.diagDrName = item.name
 }
 
 const startApplyRecord = () => {
-    if (nullBaseinfo(true)) {
-        return
-    }
-    beforeApplySpecialDiseaseRecord();
+  if (nullBaseinfo(true)) {
+    return
+  }
+  beforeApplySpecialDiseaseRecord();
 }
 
 const beforeApplySpecialDiseaseRecord = () => {
-    tempSpecialDiseaseRecord.psnNo = baseinfo.value.psnNo
-    tempSpecialDiseaseRecord.psnName = baseinfo.value.psnName
-    tempSpecialDiseaseRecord.socialNo = baseinfo.value.certno
-    tempSpecialDiseaseRecord.insutype = currentInsuinfo.value.insutype
-    tempSpecialDiseaseRecord.insutypeName = currentInsuinfo.value.insutypeName
-    tempSpecialDiseaseRecord.insuOptins = currentInsuinfo.value.insuplcAdmdvs
-    tempSpecialDiseaseRecord.insuOptinsName = currentInsuinfo.value.insuplcAdmdvsName;
-
-    tempPsAcRecord.psnNo = baseinfo.value.psnNo;
-    tempPsAcRecord.insutype = currentInsuinfo.value.insutype;
-    tempPsAcRecord.insutypeName = currentInsuinfo.value.insutypeName
-    tempPsAcRecord.psnCertType = "01";
-    tempPsAcRecord.certno = baseinfo.value.certno;
-    tempPsAcRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs;
-    tempPsAcRecord.bizUsedFlag = "0";
-    tempPsAcRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs
-    tempPsAcRecord.insuAdmdvsName = currentInsuinfo.value.insuplcAdmdvsName;
-    tempPsAcRecord.admTime = actPatient.value.admissDate;
-
-    tempSyRecord.psnNo = baseinfo.value.psnNo;
-    tempSyRecord.psnCertType = "01";
-    tempSyRecord.certno = baseinfo.value.certno;
-    tempSyRecord.psnName = baseinfo.value.psnName;
-    tempSyRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs;
-
-    switch (recordType.value) {
-        case '2503':
-          showApplySpecialDiseaseRecord.value = true;
-          break;
-        case '2560':
-          showWsRecord.value = true;
-          break;
-        case '2562':
-          showWsRecord.value = true;
-          break;
-    }
+  switch (recordType.value) {
+    case '2503':
+      tempMtbRecord.psnNo = baseinfo.value.psnNo
+      tempMtbRecord.psnName = baseinfo.value.psnName
+      tempMtbRecord.socialNo = baseinfo.value.certno
+      tempMtbRecord.insutype = currentInsuinfo.value.insutype
+      tempMtbRecord.insutypeName = currentInsuinfo.value.insutypeName
+      tempMtbRecord.insuOptins = currentInsuinfo.value.insuplcAdmdvs
+      tempMtbRecord.insuOptinsName = currentInsuinfo.value.insuplcAdmdvsName;
+      showMtbRecord.value = true;
+      break;
+    case '2505':
+      tempDdRecord.psnNo = baseinfo.value.psnNo
+      tempDdRecord.insutype = currentInsuinfo.value.insutype
+      tempDdRecord.insutypeName = currentInsuinfo.value.insutypeName
+      tempDdRecord.insuOptins = currentInsuinfo.value.insuplcAdmdvs
+      tempDdRecord.insuOptinsName = currentInsuinfo.value.insuplcAdmdvsName;
+      tempDdRecord.fixmedinsCode = env.VITE_HOSPITAL_CODE
+      tempDdRecord.fixmedinsName = env.VITE_HOSPITAL_NAME
+      showDdRecord.value = true;
+      break;
+    case '2560':
+      tempWsRecord.psnNo = baseinfo.value.psnNo;
+      tempWsRecord.insutype = currentInsuinfo.value.insutype;
+      tempWsRecord.insutypeName = currentInsuinfo.value.insutypeName
+      tempWsRecord.psnCertType = "01";
+      tempWsRecord.certno = baseinfo.value.certno;
+      tempWsRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs;
+      tempWsRecord.bizUsedFlag = "0";
+      tempWsRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs
+      tempWsRecord.insuAdmdvsName = currentInsuinfo.value.insuplcAdmdvsName;
+      tempWsRecord.admTime = actPatient.value.admissDate;
+      showWsRecord.value = true;
+      break;
+    case '2562':
+      tempSyRecord.psnNo = baseinfo.value.psnNo;
+      tempSyRecord.psnCertType = "01";
+      tempSyRecord.certno = baseinfo.value.certno;
+      tempSyRecord.psnName = baseinfo.value.psnName;
+      tempSyRecord.insutype = currentInsuinfo.value.insutype;
+      tempSyRecord.insutypeName = currentInsuinfo.value.insutypeName
+      tempSyRecord.insuAdmdvs = currentInsuinfo.value.insuplcAdmdvs;
+      tempSyRecord.insuAdmdvsName = currentInsuinfo.value.insuplcAdmdvsName;
+      showSyRecord.value = true;
+      break;
+  }
 }
-const submitSpecialDiseaseRecord = () => {
-    switch (recordType.value) {
-        case '2503':
-            specialChronicDiseasesRecord(tempSpecialDiseaseRecord).then((res) => {
-                ElMessageBox.alert(res, {
-                  type: 'success',
-                  confirmButtonText: '确定',
-                }).then(() => {
-                  showApplySpecialDiseaseRecord.value = false
-                });
-            });
-            break;
-        case '2560':
-            personnelAccidentRecord(tempPsAcRecord).then((res) => {
-                ElMessageBox.alert(res, {
-                  type: 'success',
-                  confirmButtonText: '确定',
-                }).then(() => {
-                  showWsRecord.value = false
-                });
-            });
-          break;
-        case '2562':
-            console.log("tempSyRecord", tempSyRecord)
-            birthRecord(tempSyRecord).then((res) => {
-                ElMessageBox.alert(res, {
-                  type: 'success',
-                  confirmButtonText: '确定',
-                }).then(() => {
-                  showApplySpecialDiseaseRecord.value = false
-                });
-            });
-          break;
-    }
-
+const submitRecord = () => {
+  switch (recordType.value) {
+    case '2503':
+      specialChronicDiseasesRecord(tempMtbRecord).then((res) => {
+        ElMessageBox.alert(res, {
+          type: 'success',
+          confirmButtonText: '确定',
+        }).then(() => {
+          showMtbRecord.value = false
+        });
+      });
+      break;
+    case '2505':
+      personnelAssignmentRecord(tempDdRecord).then((res) => {
+        ElMessageBox.alert(res, {
+          type: 'success',
+          confirmButtonText: '确定',
+        }).then(() => {
+          showDdRecord.value = false
+        });
+      })
+      break;
+    case '2560':
+      personnelAccidentRecord(tempWsRecord).then((res) => {
+        ElMessageBox.alert(res, {
+          type: 'success',
+          confirmButtonText: '确定',
+        }).then(() => {
+          showWsRecord.value = false
+        });
+      });
+      break;
+    case '2562':
+      birthRecord(tempSyRecord).then((res) => {
+        ElMessageBox.alert(res, {
+          type: 'success',
+          confirmButtonText: '确定',
+        }).then(() => {
+          showSyRecord.value = false
+        });
+      });
+      break;
+  }
 }
 
 const revokeRecord = () => {
-    if (nullBaseinfo(false)) {
-        return
-    }
-    switch (recordType.value) {
-        case '2503':
-            beforeRevokeSpecialDiseaseRecord(recordType.value);
-            break;
-        case '2560':
-            let param = {
-                trtDclaDetlSn: "321300175395231330800000079007",
-                psnNo: baseinfo.value.psnNo,
-                memo: "出院不治"
-            }
-
-            revokePersonnelAccidentRecord(param).then(res => {
-                ElMessageBox.alert(res, {
-                    type: 'success',
-                    confirmButtonText: '确定',
-                }).then(() => {
-                });
-            });
-            break;
-    }
+  if (nullBaseinfo(false)) {
+    return
+  }
+  switch (recordType.value) {
+    case '2503':
+      beforeRevokeSpecialDiseaseRecord(recordType.value);
+      break;
+    case '2560':
+      let param = {
+        trtDclaDetlSn: "321300175395231330800000079007",
+        psnNo: baseinfo.value.psnNo,
+        memo: "出院不治"
+      }
+      revokePersonnelAccidentRecord(param).then(res => {
+        ElMessageBox.alert(res, {
+          type: 'success',
+          confirmButtonText: '确定',
+        }).then(() => {
+        });
+      });
+      break;
+  }
 }
 
 const allAppliedSpecialDiseaseRecords = ref([])
 const showAllAppliedSpecicalDiseaseRecords = ref(false)
 const beforeRevokeSpecialDiseaseRecord = () => {
-    getAllSpcChrRcdsByPsnNo(baseinfo.value.psnNo).then((res) => {
-        allAppliedSpecialDiseaseRecords.value = res
-        showAllAppliedSpecicalDiseaseRecords.value = true
-    })
+  getAllSpcChrRcdsByPsnNo(baseinfo.value.psnNo).then((res) => {
+    allAppliedSpecialDiseaseRecords.value = res
+    showAllAppliedSpecicalDiseaseRecords.value = true
+  })
 }
 
 const currentAppliedSpecialDiseaseRecord = ref({})
 const handleSelectAppliedSpecialDiseaseRecord = (row) => {
-    currentAppliedSpecialDiseaseRecord.value = row
+  currentAppliedSpecialDiseaseRecord.value = row
 }
 
 const abortRevokeSpecialDiseaseRecord = () => {
-    currentAppliedSpecialDiseaseRecord.value = {}
-    showAllAppliedSpecicalDiseaseRecords.value = false
+  currentAppliedSpecialDiseaseRecord.value = {}
+  showAllAppliedSpecicalDiseaseRecords.value = false
 }
 
 const confirmRevokeSpecialDiseaseRecord = () => {
-    if (!currentAppliedSpecialDiseaseRecord.value.psnNo) {
-        ElMessage({
-            message: '请选择要撤销的备案!',
-            type: 'warning',
-            duration: 2000,
-            showClose: true,
-        })
-        return
+  if (!currentAppliedSpecialDiseaseRecord.value.psnNo) {
+    ElMessage({
+      message: '请选择要撤销的备案!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
+    })
+    return
+  }
+  ElMessageBox.prompt('请填写撤销原因:', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    type: 'warning',
+    inputPattern: /\S/,
+    inputErrorMessage: '撤销原因为必填项!',
+  }).then(({value}) => {
+    currentAppliedSpecialDiseaseRecord.value.memo = value
+    const param = {
+      id: currentAppliedSpecialDiseaseRecord.value.id,
+      psnNo: currentAppliedSpecialDiseaseRecord.value.psnNo,
+      trtDclaDetlSn: currentAppliedSpecialDiseaseRecord.value.trtDclaDetlSn,
+      memo: value,
     }
-    ElMessageBox.prompt('请填写撤销原因:', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-        inputPattern: /\S/,
-        inputErrorMessage: '撤销原因为必填项!',
-    }).then(({ value }) => {
-        currentAppliedSpecialDiseaseRecord.value.memo = value
-        const param = {
-            id: currentAppliedSpecialDiseaseRecord.value.id,
-            psnNo: currentAppliedSpecialDiseaseRecord.value.psnNo,
-            trtDclaDetlSn: currentAppliedSpecialDiseaseRecord.value.trtDclaDetlSn,
-            memo: value,
-        }
-        revokeSpecialChronicDiseasesRecord(param).then((res) => {
-            ElMessage({
-                message: res,
-                type: 'success',
-                duration: 2000,
-                showClose: true,
-            })
-            abortRevokeSpecialDiseaseRecord()
-        })
-    }).catch(() => {})
+    revokeSpecialChronicDiseasesRecord(param).then((res) => {
+      ElMessage({
+        message: res,
+        type: 'success',
+        duration: 2000,
+        showClose: true,
+      })
+      abortRevokeSpecialDiseaseRecord()
+    })
+  }).catch(() => {
+  })
 }
 </script>

+ 2 - 3
src/views/mz-emr/emr-v2/index.tsx

@@ -10,6 +10,7 @@ import {
 } from "@/api/mz-emr/mz-emr";
 import { EditType, Runtime } from "@/utils/emr/edit";
 import {
+  getBusiness,
   getCurrentPersonnelInformation,
   UseEmrInitReturn,
 } from "@/utils/emr/emr-init-v2";
@@ -410,9 +411,7 @@ export const useMzEmrStore = () => {
           type: "success",
         });
         const tmpSaveParams = {
-          emrDataElement: JSON.stringify(
-            editor.getDataElements("business", false, true)
-          ),
+          emrDataElement: JSON.stringify(getBusiness(editor)),
           emrDocumentId: id,
           document: { document: editor!.getDocument() },
         };