Browse Source

Merge remote-tracking branch 'origin/淮海科技'

yeguodong 3 months ago
parent
commit
064352dc0a
27 changed files with 5653 additions and 1590 deletions
  1. 12 0
      print.md
  2. 17 0
      public/static/printcss/auto-print.css
  3. 18 0
      public/static/printcss/test.css
  4. 408 0
      src/api/case-front-sheet/tcm-sheet.js
  5. 37 21
      src/api/inpatient/transfer-in-of-expenses.js
  6. 0 1075
      src/components/inpatient/XiangMuLuRu.vue
  7. 858 0
      src/components/inpatient/frontsheet-printpage/TcmHeadPage.vue
  8. 548 0
      src/components/inpatient/frontsheet-printpage/TcmTailPage.vue
  9. 0 171
      src/components/med-tec-mod/RefundForProjectEntry.vue
  10. 4 0
      src/components/nursing-dashboard/RenderTable.vue
  11. 5 0
      src/components/search/Index.vue
  12. 24 27
      src/components/xmlr/components/FeeTableColumn.vue
  13. 2 2
      src/components/zfsf/PatientInfoHead.vue
  14. 34 0
      src/components/zfsf/PrintSelect.vue
  15. 428 0
      src/directives/v-cy-print.js
  16. 2 0
      src/main.js
  17. 119 0
      src/utils/cy-use/useVuePrint.tsx
  18. 193 118
      src/views/clinic/TransferInOfExpenses.vue
  19. 66 0
      src/views/clinic/transfer-expenses/print-outpatient-dzfp.vue
  20. 2752 0
      src/views/hospitalization/case-front-sheet/trdtnl-chns/FillChnsSheet.vue
  21. 33 15
      src/views/hospitalization/zfsf/CashierProcessInfo.vue
  22. 0 91
      src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/OrderTemplateMaintain.vue
  23. 0 5
      src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue
  24. 22 58
      src/views/hospitalization/zy-gl/AdvancePaymentDeal.vue
  25. 7 3
      src/views/hospitalization/zy-gl/ZyDaily.vue
  26. 58 2
      src/views/yp-inventory/YpPlanDetails.vue
  27. 6 2
      src/views/yp-inventory/YpPlanInfo.vue

+ 12 - 0
print.md

@@ -0,0 +1,12 @@
+# 打印帮助文档
+
+## 1. 使用vue3-print-nb 来打印页面内容
+
+```scss
+@page {
+  // 纸张大小  打印方向 portrait 横向 landscape 竖向
+  size: A4 landscape;
+  // 打印边距
+  margin: 40px;
+}
+```

+ 17 - 0
public/static/printcss/auto-print.css

@@ -0,0 +1,17 @@
+@media print {
+    @page {
+        size: auto;
+        margin: 0;
+        padding: 0 ;
+    }
+
+    body,
+    html {
+        height: max-content; /* 限制打印区域高度 */
+    }
+
+    * {
+        box-sizing: border-box;
+    }
+
+}

+ 18 - 0
public/static/printcss/test.css

@@ -0,0 +1,18 @@
+@media print {
+    @page {
+        size: auto;
+        margin: 20mm;
+        padding: 5px !important;
+        @bottom-right {
+            content: "第 " counter(page) " 页 / 共 " counter(pages) " 页";
+            height: 20px;
+        }
+        @top-center {
+            content: "长沙泰和医院"
+        }
+    }
+
+    .print-content {
+        border: 1px solid #000;
+    }
+}

+ 408 - 0
src/api/case-front-sheet/tcm-sheet.js

@@ -0,0 +1,408 @@
+import request from '../../utils/request'
+
+export function getSheetInfo(data) {
+    return request({
+        url: '/tcmFrontSheet/getSheetInfo',
+        method: 'post',
+        data,
+    })
+}
+
+export function saveTcmSheet(data) {
+    return request({
+        url: '/tcmFrontSheet/saveTcmSheet',
+        method: 'post',
+        data: data,
+    })
+}
+
+
+
+
+
+export function sheetSearch(data) {
+    return request({
+        url: '/sheetSearch/execute',
+        method: 'post',
+        data,
+    })
+}
+
+export function getSsfzSurgeriesByIcd(bah, times, icd) {
+    return request({
+        url: '/sheetSearch/getSsfzSurgeriesByIcd',
+        method: 'get',
+        params: {bah, times, icd},
+    })
+}
+
+export function executePrintVerify(data) {
+    return request({
+        url: '/tcmFrontSheet/printVerify',
+        method: 'post',
+        data: data,
+    })
+}
+
+export function fetchOutPatients(data) {
+    return request({
+        url: '/tcmFrontSheet/outPatients',
+        method: 'post',
+        data: data,
+    })
+}
+
+export function fetchSsfz(code, bah, times) {
+    return request({
+        url: '/tcmFrontSheet/fetchSsfz',
+        method: 'get',
+        params: {code, bah, times},
+    })
+}
+
+export function increaseDiagWeight(code) {
+    return request({
+        url: '/tcmFrontSheet/increaseDiagWeight',
+        method: 'get',
+        params: {code},
+    })
+}
+
+export function selectSiDiagByBaDiag(code) {
+    return request({
+        url: '/tcmFrontSheet/selectSiDiagByBaDiag',
+        method: 'get',
+        params: {code},
+    })
+}
+
+export function getYbDiags(bah, times) {
+    return request({
+        url: '/tcmFrontSheet/getYbDiags',
+        method: 'get',
+        params: {bah, times},
+    })
+}
+
+export function doSaveYbDiags(data) {
+    return request({
+        url: '/tcmFrontSheet/saveYbDiags',
+        method: 'post',
+        data: data,
+    })
+}
+
+export function frontsheetQualityCheck(data) {
+    return request({
+        url: '/tcmFrontSheet/frontsheetQualityCheck',
+        method: 'post',
+        data
+    })
+}
+
+export function isMedinsSetl(patNo, times) {
+    return request({
+        url: '/tcmFrontSheet/isMedinsSetl',
+        method: 'get',
+        params: { patNo, times }
+    })
+}
+
+export function getAllWards() {
+    return request({
+        url: '/tcmFrontSheet/getAllWards',
+        method: 'get',
+    })
+}
+
+export function basOutPatients(data) {
+    return request({
+        url: '/tcmFrontSheet/basOutPatients',
+        method: 'post',
+        data: data,
+    })
+}
+
+export function executeUnArchiveBa(data) {
+    return request({
+        url: '/tcmFrontSheet/unArchiveBa',
+        method: 'post',
+        data: data,
+    })
+}
+
+export function executeAdvanceSearch(data) {
+    return request({
+        url: '/tcmFrontSheet/advanceSearch',
+        method: 'post',
+        data: data,
+    })
+}
+
+export function analyzeDismissCount(data) {
+    return request({
+        url: '/tcmFrontSheet/analyzeDismissCount',
+        method: 'post',
+        data,
+    })
+}
+
+export function gethuiZhenLeiBie() {
+    return request({
+        url: '/huiZhenShenQing/huiZhenLeiBie',
+        method: 'get',
+    })
+}
+
+export function queryDept(code) {
+    return request({
+        url: '/huiZhenShenQing/queryDept',
+        method: 'get',
+        params: {code},
+    })
+}
+
+export function submitHuiZhenShenQing(data) {
+    return request({
+        url: '/huiZhenShenQing/submitHuiZhenShenQing',
+        method: 'post',
+        data,
+    })
+}
+
+export function chaKanHuiZhenShenQing(inpatientNo, admissTimes) {
+    return request({
+        url: '/huiZhenShenQing/chaKanHuiZhenShenQing',
+        method: 'get',
+        params: {inpatientNo, admissTimes},
+    })
+}
+
+export function shanChuHuiZhenShenQing(inpatientNo, admissTimes, actOrderNo, reqTimes) {
+    return request({
+        url: '/huiZhenShenQing/shanChuHuiZhenShenQing',
+        method: 'get',
+        params: {inpatientNo, admissTimes, actOrderNo, reqTimes},
+    })
+}
+
+export function pingJieZhenDuan(inpatientNo, admissTimes) {
+    return request({
+        url: '/huiZhenShenQing/pingJieZhenDuan',
+        method: 'get',
+        params: {inpatientNo, admissTimes},
+    })
+}
+
+export function huiZhenYiSheng(deptCode, hzType) {
+    return request({
+        url: '/huiZhenShenQing/huiZhenYiSheng',
+        method: 'get',
+        params: {deptCode, hzType},
+    })
+}
+
+export function huoQuHuanZheZhuYaoZhenDuan(patNo, times) {
+    return request({
+        url: '/huiZhenShenQing/huoQuHuanZheZhuYaoZhenDuan',
+        method: 'get',
+        params: {patNo, times},
+    })
+}
+
+export function analyzeQualityControl(data) {
+    return request({
+        url: '/tcmFrontSheet/analyzeQualityControl',
+        method: 'post',
+        data,
+    })
+}
+
+export function getConsultingDoctorInfo(searchCondition) {
+    return request({
+        url: '/huiZhenShenQing/getConsultingDoctorInfo',
+        method: 'get',
+        params: {searchCondition},
+    })
+}
+
+export function markDuplicate(data) {
+    return request({
+        url: '/tcmFrontSheet/markDuplicate',
+        method: 'post',
+        data,
+    })
+}
+
+export function markClosedown(data) {
+    return request({
+        url: '/tcmFrontSheet/markClosedown',
+        method: 'post',
+        data,
+    })
+}
+
+export function getMarkStateDetail(bah, times, type) {
+    return request({
+        url: '/tcmFrontSheet/getMarkStateDetail',
+        method: 'get',
+        params: { bah, times, type},
+    })
+}
+
+export function getLendOutDetail(bah, times) {
+    return request({
+        url: '/tcmFrontSheet/getLendOutDetail',
+        method: 'get',
+        params: { bah, times},
+    })
+}
+
+export function signedByDateCount(signDate) {
+    return request({
+        url: '/tcmFrontSheet/signedByDateCount',
+        method: 'get',
+        params: {signDate},
+    })
+}
+
+export function getSimpleSheetForLendOut(bah) {
+    return request({
+        url: '/tcmFrontSheet/getSimpleSheetForLendOut',
+        method: 'get',
+        params: {bah},
+    })
+}
+export function doLendOut(data) {
+    return request({
+        url: '/tcmFrontSheet/doLendOut',
+        method: 'post',
+        data,
+    })
+}
+
+export function getLendOutSheets() {
+    return request({
+        url: '/tcmFrontSheet/getLendOutSheets',
+        method: 'get',
+    })
+}
+
+export function returnLendOutSheet(id) {
+    return request({
+        url: '/tcmFrontSheet/returnLendOutSheet',
+        method: 'get',
+        params: {id},
+    })
+}
+
+export function submitQualityVerification(data) {
+    return request({
+        url: '/tcmFrontSheet/submitQualityVerification',
+        method: 'post',
+        data
+    })
+}
+
+export function fetchQualityVerifications(data) {
+    return request({
+        url: '/tcmFrontSheet/fetchQualityVerifications',
+        method: 'post',
+        data
+    })
+}
+
+export function executeAudit(data) {
+    return request({
+        url: '/tcmFrontSheet/executeAudit',
+        method: 'post',
+        data
+    })
+}
+
+export function revokeApprovedAudit(data) {
+    return request({
+        url: '/tcmFrontSheet/revokeApprovedAudit',
+        method: 'post',
+        data
+    })
+}
+
+export function fetchAuditHistories(data) {
+    return request({
+        url: '/tcmFrontSheet/fetchAuditHistories',
+        method: 'post',
+        data
+    })
+}
+
+export function fetchAuditCount(data) {
+    return request({
+        url: '/tcmFrontSheet/fetchAuditCount',
+        method: 'post',
+        data
+    })
+}
+
+export function getAllSmallDept() {
+    return request({
+        url: '/tcmFrontSheet/getAllSmallDept',
+        method: 'get',
+    })
+}
+
+export function fetchExportData(data) {
+    return request({
+        url: '/tcmFrontSheet/fetchExportData',
+        method: 'post',
+        data
+    })
+}
+
+export function getBaOpLogs(bah, times) {
+    return request({
+        url: '/tcmFrontSheet/getBaOpLogs',
+        method: 'get',
+        params: {bah, times},
+    })
+}
+
+export function fetchSheets(month, isHqms) {
+    return request({
+        url: '/frontSheetExport/fetchSheets',
+        method: 'get',
+        params: {month, isHqms},
+    })
+}
+
+export function getExportableDclData(data) {
+    return request({
+        url: '/frontSheetExport/getExportableDclData',
+        method: 'post',
+        data
+    })
+}
+
+export function fetchLeaderAudit(data) {
+    return request({
+        url: '/tcmFrontSheet/fetchLeaderAudit',
+        method: 'post',
+        data,
+    })
+}
+
+export function submitLeaderAudit(data) {
+    return request({
+        url: '/tcmFrontSheet/submitLeaderAudit',
+        method: 'post',
+        data
+    })
+}
+
+export function fetchLeaderExportData(data) {
+    return request({
+        url: '/tcmFrontSheet/fetchLeaderExportData',
+        method: 'post',
+        data
+    })
+}

+ 37 - 21
src/api/inpatient/transfer-in-of-expenses.js

@@ -1,19 +1,19 @@
-import request from '../../utils/request'
+import request from "../../utils/request";
 
 export function queryHuanZhe(inpatientNo) {
   return request({
-    url: '/transferInOfExpenses/queryHuanZhe',
-    method: 'get',
+    url: "/transferInOfExpenses/queryHuanZhe",
+    method: "get",
     params: { inpatientNo },
-  })
+  });
 }
 
 export function getSerialNo(serialNo, liShiFlag) {
   return request({
-    url: '/transferInOfExpenses/getSerialNo',
-    method: 'get',
+    url: "/transferInOfExpenses/getSerialNo",
+    method: "get",
     params: { serialNo, liShiFlag },
-  })
+  });
 }
 
 export function getZyJiMenZhenZhuangRuFeiYong(
@@ -24,32 +24,48 @@ export function getZyJiMenZhenZhuangRuFeiYong(
   pageSize
 ) {
   return request({
-    url: '/transferInOfExpenses/getZyJiMenZhenZhuangRuFeiYong',
-    method: 'get',
+    url: "/transferInOfExpenses/getZyJiMenZhenZhuangRuFeiYong",
+    method: "get",
     params: { inpatientNo, chargeCodeMX, admissTimes, currentPage, pageSize },
-  })
+  });
 }
 
 export function shanChuFeiYong(data) {
   return request({
-    url: '/transferInOfExpenses/shanChuFeiYong',
-    method: 'post',
+    url: "/transferInOfExpenses/shanChuFeiYong",
+    method: "post",
     data,
-  })
+  });
+}
+
+export function queryEntryName(pyCode) {
+  return request({
+    url: "/transferInOfExpenses/queryEntryName",
+    method: "get",
+    params: { pyCode },
+  });
 }
 
 export function baoCunHuanZheZhuYuanFeiYong(data) {
   return request({
-    url: '/transferInOfExpenses/baoCunHuanZheZhuYuanFeiYong',
-    method: 'post',
+    url: "/transferInOfExpenses/baoCunHuanZheZhuYuanFeiYong",
+    method: "post",
     data,
-  })
+  });
 }
 
-export function queryEntryName(pyCode) {
+export function correctInvoice(data) {
   return request({
-    url: '/transferInOfExpenses/queryEntryName',
-    method: 'get',
-    params: { pyCode },
-  })
+    url: "/transferInOfExpenses/correctInvoice",
+    method: "post",
+    data: data,
+  });
+}
+
+export function getDzfpQrcodeBySerialNo(serialNo) {
+  return request({
+    url: "/transferInOfExpenses/getDzfpQrcodeBySerialNo",
+    method: "get",
+    params: { serialNo },
+  });
 }

+ 0 - 1075
src/components/inpatient/XiangMuLuRu.vue

@@ -1,1075 +0,0 @@
-<template>
-  <div class="layout_display_flex_y">
-    <div>
-      <el-tag effect="dark" size="small">患者姓名: {{ patient.name }}</el-tag>
-      <el-tag effect="dark" size="small"
-        >住院号: {{ patient.inpatientNo }}
-      </el-tag>
-      <el-tag effect="dark" size="small">床号: {{ patient.bedNo }}</el-tag>
-      <el-tag effect="dark" size="small"
-        >住院次数: {{ patient.admissTimes }}
-      </el-tag>
-      <el-tag effect="dark" size="small"
-        >性别: {{ cptSex(patient.sex) }}
-      </el-tag>
-      住院号:
-      <el-input
-        v-model="inpatientNo"
-        clearable
-        placeholder="住院号"
-        style="width: 100px"
-      ></el-input>
-      <el-button icon="Search" type="primary" @click="chaXunHuanZheXinXi"
-        >查询患者信息
-      </el-button>
-      <el-button
-        icon="Close"
-        style="margin-left: 20px"
-        type="danger"
-        @click="guanBiDialog"
-        >关闭
-      </el-button>
-      <el-button
-        style="margin-left: 20px"
-        type="warning"
-        @click="chaoZuoZhiNan = true"
-        >操作指南
-      </el-button>
-    </div>
-    <div class="layout_flex_1-y">
-      <el-tabs v-model="xmlrTabs" type="border-card" class="el-tabs__fill">
-        <el-tab-pane label="已录入项目" name="ylrxm">
-          <div class="layout_display_flex_y">
-            <div>
-              项目名称:
-              <xc-combo-grid
-                v-model="patient"
-                clearable
-                style="width: 220px"
-                code="chargeCode"
-                name="chargeName"
-                :query-data-func="getChargeCode"
-              >
-                <el-table-column
-                  label="规格"
-                  prop="specification"
-                  width="250"
-                  show-overflow-tooltip
-                />
-                <el-table-column
-                  label="厂家"
-                  prop="manufactor"
-                  width="250"
-                  show-overflow-tooltip
-                />
-              </xc-combo-grid>
-              医嘱号:
-              <el-input
-                v-model="patient.actOrderNo"
-                clearable
-                placeholder="医嘱号"
-                style="width: 120px"
-              />
-              录入日期:
-              <el-date-picker
-                v-model="dateRange"
-                :shortcuts="shortcuts"
-                end-placeholder="结束日期"
-                placeholder="选择日期"
-                range-separator="至"
-                start-placeholder="开始日期"
-                style="width: 280px"
-                type="daterange"
-              ></el-date-picker>
-              <el-button
-                :icon="riQiPaiXu === 'DESC' ? 'CaretBottom' : 'CaretTop'"
-                type="success"
-                @click="
-                  riQiPaiXu === 'DESC'
-                    ? (riQiPaiXu = 'ASC')
-                    : (riQiPaiXu = 'DESC')
-                "
-                >{{ riQiPaiXu === "DESC" ? "日期降序" : "日期升序" }}
-              </el-button>
-              <el-select
-                v-model="feiYongLeiXingCode"
-                style="width: 70px"
-                @change="queryFeiYong"
-              >
-                <el-option
-                  v-for="item in feiYongLeiXing"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
-                >
-                  <span style="color: #8492a6; font-size: 12px">{{
-                    item.code
-                  }}</span>
-                  <el-divider direction="vertical"></el-divider>
-                  <span>{{ item.name }}</span>
-                </el-option>
-              </el-select>
-              <el-select v-model="patient.orderNo" style="width: 70px">
-                <el-option
-                  v-for="item in yiZhuTuiFeiLeiXing"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
-                >
-                  <span style="color: #8492a6; font-size: 12px">{{
-                    item.code
-                  }}</span>
-                  <el-divider direction="vertical"></el-divider>
-                  <span>{{ item.name }}</span>
-                </el-option>
-              </el-select>
-              <el-select v-model="patient.tuiFeiFlag" style="width: 70px">
-                <el-option
-                  v-for="item in tuiFeiLeiXin"
-                  :key="item.code"
-                  :label="item.name"
-                  :value="item.code"
-                >
-                  <span style="color: #8492a6; font-size: 12px">{{
-                    item.code
-                  }}</span>
-                  <el-divider direction="vertical"></el-divider>
-                  <span>{{ item.name }}</span>
-                </el-option>
-              </el-select>
-              <el-button icon="Search" type="primary" @click="queryFeiYong"
-                >查询
-              </el-button>
-              <el-button icon="Delete" type="danger" @click="xiangMuTuiFeiClick"
-                >退费
-              </el-button>
-              <!--     退费的费用详细       -->
-              <refund-for-project-entry
-                @refreshFee="queryFeiYong"
-                :is-drug="feiYongLeiXingCode === 1"
-                v-if="refundConfirmation.dialog"
-                @uncheck="refundUncheck"
-                :patient="patient"
-                v-model="refundConfirmation.dialog"
-                :list="refundConfirmation.data"
-              />
-              <el-button
-                v-if="userInfo.roles.findIndex(i => i === 1 || i === 8) > -1"
-                type="warning"
-                @click="sheZhiWeiYiVBao"
-                >设为医保
-              </el-button>
-            </div>
-            <div class="layout_flex_1-y">
-              <el-table
-                :data="cptTableDataHuanZheFeiYong"
-                height="100%"
-                class="eltable"
-                show-summary
-                :summary-method="getSummaries"
-                highlight-current-row
-                row-key="rowId"
-                ref="elTableRef"
-                stripe
-                @selection-change="handleSelectionChange"
-              >
-                <el-table-column
-                  style="width: 100px"
-                  type="selection"
-                  :reserve-selection="true"
-                ></el-table-column>
-                <el-table-column
-                  label="流水号"
-                  prop="detailSn"
-                  width="70px"
-                ></el-table-column>
-                <el-table-column
-                  label="医嘱号"
-                  prop="orderNo"
-                  width="70px"
-                ></el-table-column>
-                <el-table-column
-                  label="录入日期"
-                  prop="chargeDate"
-                  width="70px"
-                ></el-table-column>
-                <el-table-column
-                  label="项目编码"
-                  prop="chargeCodeMx"
-                ></el-table-column>
-                <el-table-column
-                  label="项目名称"
-                  prop="chargeName"
-                ></el-table-column>
-                <el-table-column
-                  label="规格"
-                  v-if="feiYongLeiXingCode !== 1"
-                  prop="specification"
-                ></el-table-column>
-                <el-table-column
-                  v-if="feiYongLeiXingCode === 1"
-                  label="药品名称"
-                  prop="drugname"
-                ></el-table-column>
-                <el-table-column
-                  label="执行科室"
-                  prop="execDept"
-                ></el-table-column>
-                <el-table-column
-                  label="申请科室"
-                  prop="deptCode"
-                ></el-table-column>
-                <el-table-column
-                  label="金额"
-                  prop="chargeFee"
-                ></el-table-column>
-                <el-table-column
-                  label="数量"
-                  prop="chargeAmount"
-                ></el-table-column>
-                <el-table-column label="状态" prop="chargeStatus">
-                  <template #default="scope">
-                    {{ costState(scope.row.chargeStatus) }}
-                  </template>
-                </el-table-column>
-                <el-table-column label="录入人" prop="opName"></el-table-column>
-                <el-table-column
-                  label="账单码"
-                  prop="billItemName"
-                ></el-table-column>
-                <el-table-column label="是否退费" prop="tuiFeiFlag">
-                  <template #default="scope">
-                    <span
-                      v-html="conversionRefundFlag(scope.row.oriDetailSn)"
-                      style="color: red"
-                    ></span>
-                    <br />
-                    <span v-if="scope.row.oriDetailSn > 0">
-                      <span style="color: #e6a23c">退费数据</span> <br />
-                      <span style="color: teal">
-                        原流水号为 <br />
-                        【 {{ scope.row.oriDetailSn }} 】
-                      </span>
-                    </span>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </div>
-            <div>
-              <el-pagination
-                :current-page="patient.currentPage"
-                :page-size="patient.pageSize"
-                :page-sizes="[20, 30, 40, 50]"
-                :total="total"
-                layout="total, sizes, prev, pager, next, jumper"
-                style="margin-top: 5px"
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-              ></el-pagination>
-            </div>
-          </div>
-        </el-tab-pane>
-        <!-- 项目录入 -->
-        <el-tab-pane
-          v-if="panDuanSFTongGuoBingShiJinRu"
-          label="项目录入"
-          name="xmlr"
-        >
-          <div class="layout_display_flex">
-            <div>
-              <HuoQuMuBan
-                ref="muBanRef"
-                @selectionFeiYong="xuanZeXiangMuTable"
-              />
-            </div>
-            <div
-              class="layout_flex_1-x layout_display_flex_y"
-              style="margin-left: 10px"
-            >
-              <div>
-                <el-button
-                  icon="Document"
-                  type="warning"
-                  @click="baoCunMuBanDialog = true"
-                >
-                  存模板
-                </el-button>
-                <el-button
-                  icon="Upload"
-                  type="primary"
-                  @click="shangChuanXiangMu"
-                  >保存
-                </el-button>
-                <el-button
-                  icon="Plus"
-                  type="success"
-                  @click="xinZhengXiangMuDialog = true"
-                >
-                  新增
-                </el-button>
-                <el-select
-                  v-model="zhiXingKeShi"
-                  filterable
-                  style="width: 180px; margin: 0px 10px 0px 10px"
-                >
-                  <el-option
-                    v-for="item in deptData"
-                    :key="item.code"
-                    :label="item.name"
-                    :value="item.code"
-                  >
-                    <span style="color: #8492a6; font-size: 12px">{{
-                      item.code
-                    }}</span>
-                    <el-divider direction="vertical"></el-divider>
-                    <span>{{ item.name }}</span></el-option
-                  >
-                </el-select>
-                <el-button
-                  icon="Edit"
-                  type="warning"
-                  @click="xieGaiZhiXingKeShi"
-                >
-                  修改执行科室
-                </el-button>
-              </div>
-              <div class="layout_flex_1-y">
-                <el-table
-                  :data="saveData"
-                  height="100%"
-                  class="eltable"
-                  highlight-current-row
-                  stripe
-                >
-                  <el-table-column label="录入信息">
-                    <el-table-column label="录入时间">
-                      <template #default>
-                        {{ getDatetime(new Date()) }}
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                      label="项目编码"
-                      prop="chargeCodeMx"
-                    ></el-table-column>
-                    <el-table-column
-                      label="名称"
-                      prop="chargeName"
-                    ></el-table-column>
-                    <el-table-column label="执行科室" prop="deptCode">
-                      <template #default="scope">
-                        <el-select
-                          v-model="scope.row.deptCode"
-                          filterable
-                          style="width: 90%"
-                        >
-                          <el-option
-                            v-for="item in deptData"
-                            :key="item.code"
-                            :label="item.name"
-                            :value="item.code"
-                          >
-                            <span style="color: #8492a6; font-size: 12px">{{
-                              item.code
-                            }}</span>
-                            <el-divider direction="vertical"></el-divider>
-                            <span>{{ item.name }}</span></el-option
-                          >
-                        </el-select>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                      label="单价"
-                      prop="chargeAmount"
-                    ></el-table-column>
-                    <el-table-column label="数量" prop="amount" width="130">
-                      <template #default="scope">
-                        <el-input-number
-                          v-model="scope.row.amount"
-                          :min="0"
-                          :precision="1"
-                          style="width: 120px"
-                        ></el-input-number>
-                      </template>
-                    </el-table-column>
-                  </el-table-column>
-                  <el-table-column label="金额">
-                    <template #default="scope">
-                      {{
-                        (scope.row.chargeAmount * scope.row.amount).toFixed(2)
-                      }}
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    label="账单码"
-                    prop="billItemName"
-                  ></el-table-column>
-                  <el-table-column
-                    label="规格"
-                    prop="descriptions"
-                  ></el-table-column>
-                  <el-table-column label="操作">
-                    <template #default="scope">
-                      <el-button
-                        type="danger"
-                        @click="shanChuXiangMuClick(scope.$index)"
-                      >
-                        删除
-                      </el-button>
-                    </template>
-                  </el-table-column>
-                </el-table>
-              </div>
-              <div style="height: max-content">
-                <el-tag> 项目总价:{{ xiangMuZongJia }}</el-tag>
-              </div>
-            </div>
-          </div>
-        </el-tab-pane>
-      </el-tabs>
-    </div>
-  </div>
-  <el-dialog v-model="chaoZuoZhiNan" title="操作指南">
-    <el-collapse v-model="activeName" accordion>
-      <el-collapse-item name="1" title="一、搜索">
-        <div>
-          1、搜索费用:项目名称一栏,可以根据编码、名称
-          、拼音首字母缩写查找(推荐使用编码查询这样会快一些,可选)
-        </div>
-        <div>
-          2、录入日期:项目的录入时间范围(可选),
-          日期排序-降序从大到小排序,升序-从小到大排序
-        </div>
-        <div>
-          3、费用类型:你需要查找的费用是,项目还是药品(请不要选择项目后一直搜索药品,这样是找不到的
-        </div>
-        <div>4、录入类型:该费用是怎么产生,护士录入,医嘱,医技</div>
-        <div>
-          5、费用状态:未退-代表该费用没有被退,已退-代表费用是退费数据,被退-代表那些正的被退了
-          <span style="color: red"
-            >(该条件只对在本系统中有效,如果无效请点击退费匹配
-            (退费匹配就在本页面的关闭旁边),或选择全部)</span
-          ><br />
-        </div>
-        <div>6、点击查询即可查询费用(如提示没有数据,请检查搜索的条件)</div>
-      </el-collapse-item>
-      <el-collapse-item name="2" title=" 二、退费">
-        1、选中表格中的多选按钮(小框框),然后点击退费即可,请仔细检查
-      </el-collapse-item>
-      <el-collapse-item name="3" title=" 三、撤销退费">
-        <div>
-          1、如果退费退错了,可以点击费用后面的撤销按钮,前提是该费用没有被上传到医保,如果已经上传了且你一定要把这一条费用完全删除,那请先要医保科撤销上传。
-        </div>
-        <div>
-          2、如果需要撤销退费的权限,请向信息科,提供工号,该权限只能提供给护士长。
-        </div>
-      </el-collapse-item>
-      <el-collapse-item name="4" title="  四、录入模板">
-        <div>
-          1、模板:进入系统会查询出您所在科室的模板(如果没有看见模板,请在个人中心中查看你的科室,如果不对请人资进行调整)
-        </div>
-        <div>
-          2、取模板:点击模板的名字后,出现一个小表格,然后点击小表格中的多选按钮,你所选择的费用会显示在录入信息的表格中(无法重复添加)
-        </div>
-        <div>
-          3、存模板:请在录入信息中添加你需要存的费用信息,然后点击存模板,会弹出一个对话框,输入名称,点击保存即可
-        </div>
-        <div>
-          4、修改:取一个一模一样名称的模板,即可修改,前提是这个模板是你创建的。
-        </div>
-        <div>5、删除:点击模板名称后面的删除。</div>
-      </el-collapse-item>
-      <el-collapse-item name="5" title="五、录入费用">
-        <div>
-          1、请选择需要录入的费用(如果模板中没有,请点击新增,然后进行搜索,可根据
-          名称、编码、首字母缩写 搜索,然后在下拉框中点击对应的费用)
-        </div>
-        <div>2、确认这些费用后点击保存即可</div>
-        <div>
-          3、修改执行科室,如果有费用需要录入到,别的科室可以点击表格中的执行科室修改,也可以一键修改,就在新增右边,在下拉框(这个可以根据中文来搜索)
-          选择对应的科室后点击修改执行科室。
-        </div>
-      </el-collapse-item>
-    </el-collapse>
-  </el-dialog>
-  <el-dialog v-model="xinZhengXiangMuDialog" :width="1500" title="新增项目">
-    <el-row>
-      <el-col :span="24">
-        搜索:
-        <el-select
-          v-model="chargePyCode"
-          :remote-method="rmChargePyCode"
-          clearable
-          default-first-option
-          style="width: 220px"
-          filterable
-          remote
-          @change="getDanGeXiangMu"
-        >
-          <el-option
-            v-for="item in xiangMuData.slice(
-              (danGeXiangMuCurrentPage - 1) * 20,
-              danGeXiangMuCurrentPage * 20
-            )"
-            :key="item.chargeCode"
-            :label="item.chargeName"
-            :value="item.chargeCode"
-          >
-            <span style="color: #ff0000; font-size: 12px">{{
-              item.chargeCode
-            }}</span>
-            <el-divider direction="vertical"></el-divider>
-            <span>
-              {{ item.chargeName }}
-              <span v-if="item.descriptions"> ({{ item.descriptions }}) </span>
-            </span>
-            <el-divider direction="vertical"></el-divider>
-            <span style="color: red"> {{ item.ybComment }}</span>
-            <el-divider direction="vertical"></el-divider>
-            <span style="color: #2eff00"> {{ item.chargeAmount }} 元</span>
-            <el-divider direction="vertical"></el-divider>
-          </el-option>
-          <el-pagination
-            :current-page="danGeXiangMuCurrentPage"
-            :page-size="20"
-            :pager-count="5"
-            :total="xiangMuData.length"
-            layout=" prev, pager, next,total"
-            small
-            style="margin-top: 5px"
-            @current-change="danGeXiangMuCurrentChange"
-          ></el-pagination>
-        </el-select>
-        <el-button type="success" @click="danGeXiangMuBaoCun">保存</el-button>
-      </el-col>
-      <el-col :span="24">
-        <el-table :data="danGeLuRuXiangMu" class="eltable">
-          <el-table-column
-            label="项目代码"
-            prop="chargeCodeMx"
-          ></el-table-column>
-          <el-table-column label="项目名称" prop="chargeName"></el-table-column>
-          <el-table-column label="单位" prop="spec"></el-table-column>
-          <el-table-column label="执行科室" prop="deptCode" />
-          <el-table-column
-            label="国家编码"
-            prop="nationalCode"
-          ></el-table-column>
-          <el-table-column
-            label="国家名称"
-            prop="nationalName"
-          ></el-table-column>
-          <el-table-column label="单价" prop="chargeAmount"></el-table-column>
-          <el-table-column label="数量" prop="amount" />
-          <el-table-column label="金额">
-            <template #default="scope">
-              {{ (scope.row.chargeAmount * scope.row.amount).toFixed(2) }}
-            </template>
-          </el-table-column>
-          <el-table-column label="账单码" prop="billItemName"></el-table-column>
-          <el-table-column
-            label="规格"
-            show-overflow-tooltip
-            prop="descriptions"
-          ></el-table-column>
-          <el-table-column label="删除">
-            <template #default="scope">
-              <el-button @click="danGeLuRuXiangMu.splice(scope.$index, 1)"
-                >删除
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-col>
-    </el-row>
-  </el-dialog>
-  <el-dialog v-model="baoCunMuBanDialog" title="保存模板">
-    <el-row>
-      <el-col :span="24">
-        模板名称:
-        <el-input
-          v-model="cunMuBanPojo.name"
-          maxlength="15"
-          show-word-limit
-          @blur="zhuanPinYin"
-        ></el-input>
-      </el-col>
-      <el-col :span="12">
-        拼音码:
-        <el-input
-          v-model="cunMuBanPojo.pyCode"
-          maxlength="8"
-          show-word-limit
-        ></el-input>
-      </el-col>
-      <el-col :span="12">
-        五笔码:
-        <el-input
-          v-model="cunMuBanPojo.dcode"
-          maxlength="8"
-          show-word-limit
-        ></el-input>
-      </el-col>
-      <el-col :span="12">
-        创建科室:
-        <el-input v-model="cunMuBanPojo.dept" disabled></el-input>
-      </el-col>
-      <el-col :span="12">
-        <el-button
-          icon="Upload"
-          style="margin-top: 10px"
-          type="primary"
-          @click="baoCunMuBan"
-          >保存
-        </el-button>
-      </el-col>
-    </el-row>
-  </el-dialog>
-</template>
-
-<script name="xiangMuLuRu" setup>
-import { costState, cptSex, conversionRefundFlag } from "@/utils/computed";
-import { shortcuts } from "@/data/shortcuts";
-import {
-  getChargeCode,
-  getHuanZheFeiYong,
-  getPyCode,
-  queryDanGeXiangMu,
-  shangChuanMuBan,
-  xiangMuFeiYongShangChuan,
-  xiuGaiZiFeiBiaoZhi,
-} from "@/api/inpatient/xiang-mu-lu-ru";
-import { ElMessage, ElMessageBox } from "element-plus";
-import { getDateRangeFormatDate, getDatetime } from "@/utils/date";
-import { clone } from "@/utils/clone";
-import { getPatientInfo } from "@/api/inpatient/patient";
-import { feiYongLeiXing, tuiFeiLeiXin, yiZhuTuiFeiLeiXing } from "@/data";
-import HuoQuMuBan from "@/components/med-tec-mod/HuoQuMuBan.vue";
-import { getDept } from "@/api/public-api";
-import { baseinfo } from "@/data/inpatient";
-import { listIsBlank, stringNotBlank } from "@/utils/blank-utils";
-import Sleep from "@/utils/sleep";
-import RefundForProjectEntry from "@/components/med-tec-mod/RefundForProjectEntry";
-import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
-import { useUserStore } from "@/pinia/user-store";
-import cyRefList from "@/utils/cyRefList";
-import Dig from "@/utils/math";
-import XEUtils from "xe-utils";
-import useCompRef from "@/utils/useCompRef";
-
-const emit = defineEmits(["close-xmlr"]);
-const userInfo = useUserStore().userInfo;
-const muBanRef = useCompRef(HuoQuMuBan);
-const chaoZuoZhiNan = ref(false);
-
-// 默认选中已录入项目
-const xmlrTabs = ref("ylrxm");
-const inpatientNo = ref("");
-const zhiXingKeShi = ref("");
-const dateRange = ref([]);
-// DESC 降 ASC 升
-const riQiPaiXu = ref("DESC");
-const activeName = ref("1");
-const feiYongLeiXingCode = ref(0);
-const chargeFeeTotal = ref(0);
-
-// 获取全部科室
-const deptData = ref([]);
-
-// 患者信息
-const patient = ref({});
-
-/**
- * 判断这个操作员是否可以退费
- */
-const panDuanSFTongGuoBingShiJinRu = ref(false);
-
-// 弹框 输入住院号
-const jinRuPanDuanSFXieDaiHuanZheXinXi = async () => {
-  await Sleep(300);
-  ElMessageBox.prompt("请输入患者住院号", "提示", {
-    confirmButtonText: "确定",
-    cancelButtonText: "取消",
-    inputPattern: /\S/,
-    inputErrorMessage: "患者住院号不能为空 (∩•̀ω•́)⊃-*⋆",
-    type: "warning",
-  })
-    .then(({ value }) => {
-      inpatientNo.value = value;
-      chaXunHuanZheXinXi();
-    })
-    .catch(() => {
-      guanBiDialog();
-    });
-};
-
-/**
- * 这个是 用户没有选择患者 就进来执行的
- */
-const chaXunHuanZheXinXi = () => {
-  getPatientInfo(inpatientNo.value)
-    .then(res => {
-      patient.value = res;
-      setDefault();
-      queryFeiYong();
-      if (patient.value.ward === userInfo.deptCode) {
-        panDuanSFTongGuoBingShiJinRu.value = true;
-      } else {
-        xmlrTabs.value = "ylrxm";
-        panDuanSFTongGuoBingShiJinRu.value = false;
-      }
-    })
-    .catch(() => {
-      patient.value = {};
-      jinRuPanDuanSFXieDaiHuanZheXinXi();
-    });
-};
-
-const total = ref(0);
-const elTableRef = ref();
-/**
- * 查询
- */
-const queryFeiYong = () => {
-  elTableRef.value.clearSelection();
-  let dateR = getDateRangeFormatDate(dateRange.value);
-  patient.value.startTime = dateR.startTime;
-  patient.value.endTime = dateR.endTime;
-  patient.value.riQiPaiXu = riQiPaiXu.value;
-  patient.value.feiYongLeiXingCode = feiYongLeiXingCode.value;
-  patient.value.currentPage = 1;
-  patient.value.total = 0;
-  patient.value.dept = null;
-  getHuanZheFeiYong(patient.value).then(async res => {
-    cptTableDataHuanZheFeiYong.value = res.data;
-    total.value = res.total;
-    chargeFeeTotal.value = res.chargeFeeTotal;
-    if (patient.value.admissWard === userInfo.deptCode) {
-      panDuanSFTongGuoBingShiJinRu.value = true;
-    }
-  });
-};
-
-const handleQueryFeiYong = () => {
-  let dateR = getDateRangeFormatDate(dateRange.value);
-  patient.value.startTime = dateR.startTime;
-  patient.value.endTime = dateR.endTime;
-  patient.value.riQiPaiXu = riQiPaiXu.value;
-  patient.value.feiYongLeiXingCode = feiYongLeiXingCode.value;
-  patient.value.total = total.value;
-  patient.value.dept = null;
-  getHuanZheFeiYong(patient.value).then(async res => {
-    cptTableDataHuanZheFeiYong.value = res.data;
-    if (patient.value.admissWard === userInfo.deptCode) {
-      panDuanSFTongGuoBingShiJinRu.value = true;
-    }
-  });
-};
-
-/**
- * 分页
- */
-const handleSizeChange = val => {
-  patient.value.pageSize = val;
-  handleQueryFeiYong();
-};
-
-const handleCurrentChange = val => {
-  patient.value.currentPage = val;
-  handleQueryFeiYong();
-};
-
-/**
- * 获取多选框的值
- */
-const handleSelectionChange = val => {
-  patient.value.list = val;
-};
-/** */
-const cptTableDataHuanZheFeiYong = ref([]);
-/**
- *  项目退费
- */
-let refundConfirmation = reactive({
-  dialog: false,
-  data: [],
-});
-
-/**
- * 退费取消选中
- * @param val
- */
-const refundUncheck = val => {
-  elTableRef.value.toggleRowSelection(val, false);
-};
-
-const xiangMuTuiFeiClick = () => {
-  refundConfirmation.data = elTableRef.value.getSelectionRows();
-  if (refundConfirmation.data.length === 0) {
-    ElMessage.error("请先选择退费数据");
-  } else {
-    refundConfirmation.dialog = true;
-  }
-};
-
-//////////////////////////////////// 以上全部是 已录入项目 //////////////////////////////////////////////////////////////////////////////
-const [saveData, saveProxy] = cyRefList("chargeCodeMx", item => {
-  return `项目${item.chargeCodeName}请勿重复添加。`;
-});
-
-const xuanZeXiangMuTable = val => {
-  for (let i = 0; i < val.length; i++) {
-    val[i].deptCode = patient.value.zkWard;
-  }
-  saveProxy.push(...val);
-};
-
-/**
- * 删除项目
- */
-const shanChuXiangMuClick = index => {
-  saveProxy.delIndex(index);
-};
-
-/**
- * 获取项目的总价
- */
-const xiangMuZongJia = computed(() => {
-  let sum = 0;
-  for (let i = 0; i < saveData.value.length; i++) {
-    sum += Dig.multiply(
-      saveData.value[i].chargeAmount,
-      saveData.value[i].amount
-    );
-  }
-  return XEUtils.toFixed(sum, 2);
-});
-
-//以下全部是  新增项目 对话框功能
-
-/**
- * 新增项目
- */
-const xinZhengXiangMuDialog = ref(false);
-
-// 项目拼音的code
-const chargePyCode = ref("");
-// 项目数据
-const xiangMuData = ref([]);
-
-/**
- * 远程搜索
- */
-const rmChargePyCode = val => {
-  if (val.length >= 2) {
-    queryDanGeXiangMu(val, 0).then(res => {
-      xiangMuData.value = res;
-    });
-  }
-};
-const danGeXiangMuCurrentPage = ref(1);
-
-const danGeXiangMuCurrentChange = val => {
-  danGeXiangMuCurrentPage.value = val;
-};
-/**
- * 用来获取新增对画框中选择的项目
- */
-const danGeLuRuXiangMu = ref([]);
-
-const getDanGeXiangMu = () => {
-  xiangMuData.value.filter(item => {
-    if (item.chargeCode === chargePyCode.value) {
-      item.deptCode = patient.value.zkWard;
-      danGeLuRuXiangMu.value.push(item);
-    }
-  });
-};
-
-/**
- * 单个项目保存
- */
-const danGeXiangMuBaoCun = () => {
-  if (danGeLuRuXiangMu.value.length === 0) {
-    ElMessage.error("请选择需要添加的项目");
-    return;
-  }
-
-  saveProxy.push(...danGeLuRuXiangMu.value);
-
-  danGeLuRuXiangMu.value = [];
-  chargePyCode.value = "";
-  xinZhengXiangMuDialog.value = false;
-};
-//以上全部是  新增项目 对话框功能
-
-// 下面就是上传 项目
-const shangChuanXiangMu = () => {
-  if (saveData.value.length === 0) {
-    ElMessage.error({
-      message: "请先选择需要上传的费用",
-      showClose: true,
-    });
-    return;
-  }
-  for (let i = 0; i < saveData.value.length; i++) {
-    if (saveData.value[i].deptCode === "") {
-      ElMessage.error({
-        message: "【" + saveData.value[i].chargeName + "】的执行科室为空",
-        showClose: true,
-      });
-      return;
-    }
-  }
-  let shangChuanFeiYong = {
-    inpatientNo: patient.value.inpatientNo,
-    admissTimes: patient.value.admissTimes,
-    ledgerSn: patient.value.ledgerSn,
-    dept: patient.value.admissDept,
-    zySerialNo: patient.value.zySerialNo,
-    ward: patient.value.zkWard,
-    referPhysician: patient.value.referPhysician,
-    list: saveData.value,
-    orderNo: 0,
-  };
-  // 在此处上传
-  ElMessageBox.confirm(
-    "共上传【" + saveData.value.length + "】条",
-    "请认真核对",
-    {
-      cancelButtonText: "取消",
-      confirmButtonText: "确定",
-    }
-  )
-    .then(() => {
-      xiangMuFeiYongShangChuan(shangChuanFeiYong).then(() => {
-        saveData.value = [];
-      });
-    })
-    .catch(() => {});
-};
-
-// 上面就是上传 项目
-
-// 下面就是保存的模板信息
-const cunMuBanPojo = ref({
-  pyCode: "",
-  dcode: "",
-  name: "",
-  paiXu: "",
-  dept: "",
-  deptCode: userInfo.deptCode,
-  list: [],
-});
-
-const baoCunMuBanDialog = ref(false);
-const baoCunMuBan = () => {
-  if (saveData.value.length === 0) {
-    ElMessage.error({
-      message: "请先选择项目",
-      showClose: true,
-    });
-    return;
-  }
-  if (
-    cunMuBanPojo.value.name === "" ||
-    cunMuBanPojo.value.pyCode === "" ||
-    cunMuBanPojo.value.dcode === ""
-  ) {
-    ElMessage.error({
-      message: "模板名称,拼音码,五笔码不能为空",
-      showClose: true,
-    });
-    return;
-  }
-  cunMuBanPojo.value.list = clone(saveData.value);
-  // 开始上传
-  shangChuanMuBan(cunMuBanPojo.value).then(() => {
-    cunMuBanPojo.value = {};
-    muBanRef.value?.reloadData();
-  });
-};
-
-// 获取到保存模板的拼音码和五笔码
-const zhuanPinYin = () => {
-  getPyCode(cunMuBanPojo.value.name).then(res => {
-    cunMuBanPojo.value.pyCode = res.pyCode;
-    cunMuBanPojo.value.dcode = res.wbCode;
-  });
-};
-
-// 上面就是保存的模板信息
-
-/** 关闭 对话框 */
-const guanBiDialog = () => {
-  emit("close-xmlr");
-};
-
-/**
- * 设置患者默认值
- */
-const setDefault = () => {
-  patient.value.currentPage = 1;
-  patient.value.pageSize = 40;
-  patient.value.total = 0;
-  patient.value.tuiFeiFlag = 3;
-  patient.value.orderNo = 2;
-  patient.value.deptCode = userInfo.deptCode;
-  zhiXingKeShi.value = patient.value.zkWard;
-};
-
-onMounted(async () => {
-  const tmpPatient = baseinfo();
-  if (stringNotBlank(tmpPatient?.inpatientNo)) {
-    patient.value = clone(baseinfo());
-    panDuanSFTongGuoBingShiJinRu.value = true;
-    await nextTick();
-    setDefault();
-    queryFeiYong();
-  } else {
-    await jinRuPanDuanSFXieDaiHuanZheXinXi();
-  }
-
-  getDept().then(res => {
-    deptData.value = res;
-  });
-});
-
-const xieGaiZhiXingKeShi = () => {
-  for (let i = 0; i < saveData.value.length; i++) {
-    saveData.value[i].deptCode = zhiXingKeShi.value;
-  }
-};
-
-const sheZhiWeiYiVBao = () => {
-  if (listIsBlank(patient.value.list)) {
-    ElMessage.error("请先选择需要修改的数据");
-    return;
-  }
-  ElMessageBox.confirm("请仔细检查.", "提示", {
-    confirmButtonText: "确认",
-    cancelButtonText: "取消",
-    type: "warning",
-  })
-    .then(() => {
-      xiuGaiZiFeiBiaoZhi(patient.value);
-    })
-    .catch(() => {});
-};
-
-function getSummaries(param) {
-  const { columns } = param;
-  const sums = [];
-  columns.forEach((column, index) => {
-    if (index === 0) {
-      sums[index] = "合计";
-    } else if (index === 9) {
-      sums[index] = `${chargeFeeTotal.value}(元)`;
-    } else {
-      sums[index] = "";
-    }
-  });
-  return sums;
-}
-</script>
-
-<style></style>

+ 858 - 0
src/components/inpatient/frontsheet-printpage/TcmHeadPage.vue

@@ -0,0 +1,858 @@
+<template>
+  <div style="width: 820px">
+    <div
+        style="
+        width: 770px;
+        margin-left: 35px;
+        border-left: 1px dashed gray;
+        padding-left: 35px;
+      "
+    >
+      <div
+          style="
+          -webkit-transform: translateX(-52px);
+          transform: translateX(-52px);
+          position: absolute;
+          color: black;
+          font-size: 14px;
+        "
+      >
+        装<br />订<br />线
+      </div>
+      <div>
+        <div style="width: 100%; font-size: 15px; text-align: center">
+          医疗机构:
+          <span style="font-weight: 700">
+              {{ env.VITE_HOSPITAL_NAME }}
+            </span>
+          ( 组织机构代码:
+          <span style="font-weight: 700">
+              {{ env.VITE_HOSPITAL_CODE }}
+            </span>
+          )
+        </div>
+        <h3 style="width: 100%; font-size: 17px; text-align: center">
+          中 医 住 院 病 案 首 页
+        </h3>
+        <div style="height: 25px; line-height: 25px; display: flex">
+          <div>
+            医疗付费方式:
+            {{filterNameInDic(patient.payWay, 'getPayMethod')}}
+          </div>
+          <div style="width: 120px; margin-left: 24px">
+            健康卡号: {{ patient.healthCardNo }}
+          </div>
+          <div style="width: 100px; margin-left: 24px">
+            第&nbsp;{{ patient.times }}&nbsp;次住院
+          </div>
+          <div style="width: 130px;margin-left: 12px">病案号: {{ patient.patNo }}</div>
+        </div>
+      </div>
+      <div style="border: 1px solid black; padding: 5px">
+        <div style="display: flex;align-items: end">
+          姓名
+          <span style="width: 130px;padding-left: 5px;border-bottom: 1px solid black">
+            {{patient.name}}
+          </span>
+          <span style="margin-left: 12px">性别</span>
+          <span style="width: 50px;padding-left: 5px; border-bottom: 1px solid black">
+            {{filterGenger(patient.gender)}}
+          </span>
+          <span style="margin-left: 12px">出生日期</span>
+          <div id="birthDate" style="display: flex;align-items: end">
+            <span
+                style="width: 35px;padding-left: 5px; border-bottom: 1px solid black"
+            >
+              {{patient.birthYear}}
+            </span>
+            年
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >
+              {{patient.birthMonth}}
+            </span>
+            月
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >
+              {{patient.birthDay}}
+            </span>
+            日
+          </div>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          年龄
+          <span
+              style="width: 25px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{patient.age}}
+          </span>
+          岁
+          <span style="margin-left: 12px; ">国籍</span>
+          <span style="width: 160px;padding-left: 5px; border-bottom: 1px solid black">
+            {{filterNameInDic(patient.country,'getCountry')}}
+          </span>
+          <span style="margin-left: 12px; ">(年龄不足1周岁的)年龄</span>
+          <span
+              style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{patient.infAge}}
+          </span>月
+          <span style="margin-left: 12px; ">(新生儿年龄≤28天)年龄</span>
+          <span
+              style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{patient.nbAge}}
+          </span>天
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          新生儿出生体重 (一孩
+          <span
+              style="width: 40px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{patient.nbWeight1}}
+          </span>克
+          <span style="margin-left: 12px; ">二孩</span>
+          <span
+              style="width: 40px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{patient.nbWeight2}}
+          </span>克)
+          <span style="margin-left: 12px; ">
+              新生儿入院体重
+            </span>
+          <span
+              style="width: 50px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.nbAdmWeight}}</span>克
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          身份证件类型
+          <span style="width: 160px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filterCertType(patient.certType)}}
+          </span>
+          <span style="margin-left: 12px; ">身份证件号码</span>
+          <span style="width: 160px;padding-left: 5px; border-bottom: 1px solid black">
+            {{patient.certNo}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          身份证件不详的具体原因
+          <span style="width: 140px;padding-left: 5px; border-bottom: 1px solid black">
+            {{filterNoCertReason(patient.noCertReason)}}
+          </span>
+          <span
+              v-if="patient.noCertReason === '9' "
+              style="width: 220px;padding-left: 5px;margin-left: 12px; border-bottom: 1px solid black"
+          >
+            {{patient.noCertReasonInput}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          <div style="display: flex;align-items: end">
+            <div style="width: 45px">出生地</div>
+            <span
+                style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.bpProvince}}</span>省(区、市)
+            <span
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.bpCity}}</span>市
+            <span
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.bpCounty}}</span>
+            县
+          </div>
+          <div style="display: flex;align-items: end;margin-left: 12px; ">
+            <div style="width: 30px">
+              籍贯
+            </div>
+            <span
+                style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.npProvince}}</span>省(区、市)
+            <span
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.npCity}}</span>市
+          </div>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          民族
+          <span style="width: 80px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filterNameInDic(patient.nation, 'getNation')}}
+          </span>
+          <div style="margin-left: 12px; width: 30px">职业</div>
+          <span style="padding-left: 5px;width: 300px; border-bottom: 1px solid black">
+            {{filterNameInDic(patient.occupation,'getOccupation')}}
+          </span>
+          <span style="margin-left: 12px; ">婚姻</span>
+          <span style="width: 80px;padding-left: 5px; border-bottom: 1px solid black">
+            {{filterNameInDic(patient.marriage,'getMarriageCode')}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          <div style="display: flex;align-items: end">
+            现住址
+            <div
+                style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.lpProvince}}</div>省(区、市)
+            <div
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.lpCity}}</div>市
+            <div
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.lpCounty}}</div>
+            县
+            <div
+                style="width: 100px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.lpSup}}</div>
+          </div>
+          <span style="margin-left: 12px; ">电话</span>
+          <span style="width: 90px;padding-left: 5px; border-bottom: 1px solid black">{{patient.phone}}</span>
+          <span style="margin-left: 12px; ">邮编</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.lpZipCode}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          <div style="display: flex;align-items: end">
+            户口地址
+            <div
+                style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.hpProvince}}</div>省(区、市)
+            <div
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.hpCity}}</div>市
+            <div
+                style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.hpCounty}}</div>
+            县
+            <div
+                style="width: 100px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.hpSup}}</div>
+          </div>
+          <span style="margin-left: 12px; ">邮编</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.hpZipCode}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          工作单位及地址
+          <span
+              style="width: 145px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.unitName}}</span>
+          /
+          <span
+              style="width: 145px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.unitPlace}}</span>
+          <span style="margin-left: 12px; ">单位电话</span>
+          <span
+              style="width: 90px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.unitPhone}}</span>
+          <span style="margin-left: 12px; ">邮编</span>
+          <span
+              style="width: 50px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.unitZipCode}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          联系人姓名
+          <span
+              style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.conName}}</span>
+          <span style="margin-left: 12px; ">关系</span>
+          <span style="width: 180px;padding-left: 5px; border-bottom: 1px solid black">
+            {{filterNameInDic(patient.conRel,'getRelations')}}
+          </span>
+          <span style="margin-left: 12px; ">地址</span>
+          <span
+              style="width: 180px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.conAddr}}</span>
+          <span style="margin-left: 12px; ">电话</span>
+          <span
+              style="width: 90px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.conPhone}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          入院途径
+          <span style="width: 130px;padding-left: 5px; border-bottom: 1px solid black">
+            {{filterAdmWay(patient.zyAdmWay)}}
+          </span>
+          <span style="margin-left: 12px; ">治疗类别</span>
+          <span
+              style="width: 100px;padding-left: 5px;border-bottom: 1px solid black"
+          >
+            {{filterTreatWay(patient.treatWay)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          <div style="display: flex;align-items: end">
+            入院时间
+            <span
+                style="width: 35px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.admissYear}}</span>年
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.admissMonth}}</span>月
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.admissDay}}</span>日
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.admissHour}}</span>时
+          </div>
+          <span style="margin-left: 12px; ">
+              入院科别
+            </span>
+          <span
+              style="width: 120px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.admissDeptName}}</span>
+          病房
+          <span
+              style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.admissWardName}}</span>
+          转科科别
+          <span
+              style="width: 120px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.transDeptName}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          <div style="display: flex;align-items: end">
+            出院时间
+            <span
+                style="width: 35px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.dismissYear}}</span>年
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.dismissMonth}}</span>月
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.dismissDay}}</span>日
+            <span
+                style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+            >{{patient.dismissHour}}</span>时
+          </div>
+
+          <span style="margin-left: 12px; ">出院科别</span>
+          <span
+              style="width: 120px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.dismissDeptName}}</span>
+          病房
+          <span
+              style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.dismissWardName}}</span>
+          实际住院
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.inHospDays}}</span>天
+        </div>
+        <div id="mzTcmDiag" style="display: flex;align-items: end;margin-top: 4px; ">
+          门(急)诊诊断(中医诊断)
+          <span
+              style="width: 280px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.mzTcmDiagName}}</span>
+          疾病编码
+          <span
+              style="width: 110px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.mzTcmDiagCode}}</span>
+        </div>
+        <div id="mzWstDiag" style="display: flex;align-items: end;margin-top: 4px; ">
+          门(急)诊诊断(西医诊断)
+          <span
+              style="width: 280px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.mzWstDiagName}}</span>
+          疾病编码
+          <span
+              style="width: 110px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.mzWstDiagCode}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          实施临床路径
+          <span
+              style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{filterUsePathway(patient.usePathway)}}
+          </span>
+
+          <span style="margin-left: 12px; ">临床路径管理</span>
+          <span
+              style="width: 80px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{filterPathwayMng(patient.pathwayMng)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px;">
+          使用医疗机构中药制剂
+          <span
+              style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{filter1Y2N(patient.useTcmPrep)}}
+          </span>
+
+          <span style="margin-left: 12px">使用中医诊疗设备</span>
+          <span
+              style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{filter1Y2N(patient.useTcmEqp)}}
+          </span>
+
+          <span style="margin-left: 12px; ">使用中医诊疗技术</span>
+          <span
+              style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{filter1Y2N(patient.useTcmTech)}}
+          </span>
+
+          <span style="margin-left: 12px; ">辨证施护</span>
+          <span
+              style="width: 60px;padding-left: 5px; border-bottom: 1px solid black"
+          >
+            {{filter1Y2N(patient.diaNursing)}}
+          </span>
+        </div>
+        <div
+            id="diagTable"
+            style="
+              height: max-content;
+              width: 720px;
+              margin-top: 2px;
+            "
+        >
+          <table
+              style="
+                  width: 720px;
+                  border: 1px solid black;
+                  border-collapse: collapse;
+                "
+          >
+            <thead>
+            <tr>
+              <th colspan="2">出院中医诊断</th>
+              <th>疾病编码</th>
+              <th>入院病情</th>
+              <th colspan="2">出院西医诊断</th>
+              <th>疾病编码</th>
+              <th>入院病情</th>
+              <th>治疗转归</th>
+            </tr>
+            </thead>
+            <tbody>
+            <tr v-for="n in 6">
+              <td>
+                <div style="width: 30px; ">
+                  <span v-if="n===1">主病</span>
+                  <span v-else-if="n===2">主证</span>
+                  <span v-else></span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 150px; ">
+                  <span
+                      style="border: none !important; "
+                  >{{patient.disdiagList[n-1].tcmName}}</span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 110px; ">
+                  <span
+                      style="border: none !important"
+                  >{{patient.disdiagList[n-1].tcmCode}}</span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 30px; ">
+                  <span
+                      style="border: none !important"
+                  >
+                    {{patient.disdiagList[n-1].tcmAdmStatus}}
+                  </span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 53px; ">
+                  <span v-if="n===1">主要诊断</span>
+                  <span v-else-if="n===2">其他诊断</span>
+                  <span v-else></span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 135px; ">
+                  <span
+                      style="border: none !important; "
+                  >{{patient.disdiagList[n-1].wstName}}</span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 100px; ">
+                  <span
+                      style="border: none !important;"
+                  >{{patient.disdiagList[n-1].wstCode}}</span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 30px; ">
+                  <span
+                      style="border: none !important;"
+                  >
+                    {{patient.disdiagList[n-1].wstAdmStatus}}
+                  </span>
+                </div>
+              </td>
+              <td>
+                <div style="width: 30px; ">
+                  <span
+                      style="border: none !important;"
+                  >
+                    {{patient.disdiagList[n-1].wstDisStatus}}
+                  </span>
+                </div>
+              </td>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr>
+              <td colspan="9">
+                <div style="font-size: 12px; ">
+                  <span>入院病情:</span>
+                  1.有,2.临床未确定,3.情况不明,4.无
+                  <span style="margin-left: 24px; ">治疗转归:</span
+                  >1.治愈,2.好转,3.未愈,5.死亡,9.其他
+                </div>
+              </td>
+            </tr>
+            </tfoot>
+          </table>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          损伤、中毒的外部原因
+          <span
+              style="width: 360px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.hurtReasonName}}</span>
+          <span style="margin-left: 12px; ">疾病编码</span>
+          <span
+              style="width: 110px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.hurtReasonCode}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          病理诊断
+          <span
+              style="width: 300px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.pthDiagName}}</span>
+          <span style="margin-left: 12px; ">病理编码</span>
+          <span
+              style="width: 90px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.pthDiagCode}}</span>
+          <span style="margin-left: 12px; ">病理号</span>
+          <span style="width: 70px;padding-left: 5px; border-bottom: 1px solid black">
+            {{patient.pthNo}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          药物过敏
+          <span style="width: 30px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filter1N2Y(patient.allergy)}}
+          </span>
+          ,过敏药物
+          <span
+              style="width: 160px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.allergyMed}}</span>
+          <span style="margin-left: 12px;">死亡患者尸检</span>
+          <span style="width: 50px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filter1Y2N(patient.autopsy)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          血型
+          <span style="width: 50px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filterBldType(patient.bloodType)}}
+          </span>
+          <span style="margin-left: 12px; ">Rh</span>
+          <span style="width: 50px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filterBldRh(patient.rh)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          科主任
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.kzyName}}</span>
+          <span style="margin-left: 12px; ">主任(副主任)医师</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.zyfzyDocName}}</span>
+          <span style="margin-left: 12px; ">主治医师</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.mainDocName}}</span>
+          <span style="margin-left: 12px; ">住院医师</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.admDocName}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          责任护士
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.dutyNurName}}</span>
+          <span style="margin-left: 12px; ">进修医师</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.jxDocName}}</span>
+          <span style="margin-left: 12px; ">实习医师</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.sxDocName}}</span>
+          <span style="margin-left: 12px; ">编码员</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.coderName}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px; ">
+          病案质量
+          <span style="width: 50px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filterSheetQuality(patient.sheetQuality)}}
+          </span>
+          <span style="margin-left: 12px; ">质控医师</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.qltyCtrlDocName}}</span>
+          <span style="margin-left: 12px; ">质控护士</span>
+          <span
+              style="width: 70px;padding-left: 5px; border-bottom: 1px solid black"
+          >{{patient.qltyCtrlNurseName}}</span>
+          <span style="margin-left: 12px; ">质控日期</span>
+          <div style="display: flex;align-items: end">
+              <span
+                  style="width: 35px;padding-left: 5px; border-bottom: 1px solid black"
+              >{{patient.qltyCtrlYear}}</span>
+              年
+              <span
+                  style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+              >{{patient.qltyCtrlMonth}}</span>
+              月
+              <span
+                  style="width: 20px;padding-left: 5px; border-bottom: 1px solid black"
+              >{{patient.qltyCtrlDay}}</span>
+              日
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import env from "@/utils/setting";
+
+const props = defineProps({
+  patient: {},
+  dics: {}
+})
+
+const filterNameInDic = (val, dic) => {
+  if (!val) {
+    return "";
+  }
+  const dicValue = props.dics[dic];
+  for (let i = 0; i < dicValue.length; i++) {
+    const dicItem = dicValue[i];
+    if (dicItem.code === val) {
+      return dicItem.name;
+    }
+  }
+  return "-";
+};
+
+function filterGenger(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '0':
+      return '未知的性别';
+    case '1':
+      return '男';
+    case '2':
+      return '女';
+    case '9':
+      return '未说明的性别';
+  }
+}
+
+function filterCertType(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '0':
+      return '居民身份证';
+    case '1':
+      return '护照';
+    case '2':
+      return '港澳台居民身份证/通行证';
+    case '4':
+      return '旅行证据';
+    case '9':
+      return '其他';
+  }
+}
+
+function filterNoCertReason(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return '三无人员';
+    case '2':
+      return '新生儿未办理';
+    case '3':
+      return '无完全民事行为能力';
+    case '4':
+      return '意识障碍';
+    case '9':
+      return '其他';
+  }
+}
+
+function filterAdmWay(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return '急诊';
+    case '2':
+      return '门诊';
+    case '3':
+      return '其他医疗机构转入';
+    case '9':
+      return '其他';
+  }
+}
+
+function filterTreatWay(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1.1':
+      return '中医';
+    case '1.2':
+      return '民族医';
+    case '2':
+      return '中西医';
+    case '3':
+      return '西医';
+  }
+}
+
+function filterUsePathway(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return '中医';
+    case '2':
+      return '西医';
+    case '3':
+      return '否';
+  }
+}
+
+function filterPathwayMng(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return '完成';
+    case '2':
+      return '变异';
+    case '3':
+      return '退出';
+    case '4':
+      return '未入'
+  }
+}
+
+function filterBldType(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return 'A';
+    case '2':
+      return 'B';
+    case '3':
+      return 'O';
+    case '4':
+      return 'AB'
+    case '5':
+      return '不详';
+    case '6':
+      return '未查'
+  }
+}
+
+function filterBldRh(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return '阴';
+    case '2':
+      return '阳';
+    case '3':
+      return '不详';
+    case '4':
+      return '未查'
+  }
+}
+
+function filterSheetQuality(val) {
+  if (!val) {
+    return "";
+  }
+  switch (val) {
+    case '1':
+      return '甲';
+    case '2':
+      return '乙';
+    case '3':
+      return '丙';
+  }
+}
+
+function filter1Y2N(val) {
+  if (val === '1' || val === 1) {
+    return '是'
+  } else if (val === '2' || val === 2) {
+    return '否'
+  }
+  return ''
+}
+
+function filter1N2Y(val) {
+  if (val === '1' || val === 1) {
+    return '无'
+  } else if (val === '2' || val === 2) {
+    return '有'
+  }
+  return ''
+}
+
+</script>
+
+<style scoped>
+table,
+th,
+td {
+  border: 1px solid black;
+  border-collapse: collapse;
+}
+
+td,
+th {
+  height: 24px;
+  padding-left: 4px;
+}
+</style>

+ 548 - 0
src/components/inpatient/frontsheet-printpage/TcmTailPage.vue

@@ -0,0 +1,548 @@
+<template>
+  <div style="width: 820px">
+    <div
+        style="
+        width: 790px;
+        margin-right: 35px;
+        border-right: 1px dashed gray;
+        padding-right: 35px;
+      "
+    >
+      <div style="border: 1px solid black; padding: 5px">
+        <table
+            style="border-collapse: collapse; width: 100%; "
+        >
+          <thead>
+          <tr>
+            <th rowspan="2">手术及操作编码</th>
+            <th rowspan="2" style="width: 70px">手术及操作日期</th>
+            <th rowspan="2" style="width: 10px">手术级别</th>
+            <th rowspan="2" style="width: 10px">手术类别</th>
+            <th rowspan="2">手术及操作名称</th>
+            <th colspan="3">手术及操作医师</th>
+            <th rowspan="2" style="width: 30px">切口类别</th>
+            <th rowspan="2" style="width: 30px">愈合等级</th>
+            <th rowspan="2">麻醉方式</th>
+            <th rowspan="2">麻醉医师</th>
+          </tr>
+          <tr>
+            <th>术者</th>
+            <th>I助</th>
+            <th>II助</th>
+          </tr>
+          </thead>
+          <tbody>
+          <tr v-for="n in 7" :key="n">
+            <td>
+              <div
+                  style="border: none !important; width: 70px"
+              >{{patient.surgeryList[n - 1].code}}</div>
+            </td>
+            <td style="padding: 3px">
+              <div
+                  style="border: none !important; width: 70px"
+              >{{patient.surgeryList[n - 1].date}}</div>
+            </td>
+            <td style="text-align-last: center">
+              <div
+                  style="border: none !important; width: 30px"
+              >
+                {{filterNameInDic(patient.surgeryList[n - 1].level, 'getOperateScale')}}
+              </div>
+            </td>
+            <td style="text-align-last: center">
+              <div
+                  style="border: none !important; width: 30px"
+              >
+                {{patient.surgeryList[n - 1].type}}
+              </div>
+            </td>
+            <td style="padding: 3px">
+              <div>
+                {{ patient.surgeryList[n - 1].name }}
+              </div>
+            </td>
+            <td>
+              <div
+                  style="border: none !important; width: 40px"
+              >{{patient.surgeryList[n - 1].operName}}</div>
+            </td>
+            <td style="width: 50px">
+              <div
+                  style="border: none !important; width: 40px"
+              >{{patient.surgeryList[n - 1].assistantName1}}</div>
+            </td>
+            <td style="width: 50px">
+              <div
+                  style="border: none !important; width: 40px"
+              >{{patient.surgeryList[n - 1].assistantName2}}</div>
+            </td>
+            <td style="text-align-last: center">
+              <div
+                  style="border: none !important"
+              >
+                {{patient.surgeryList[n - 1].cut}}
+              </div>
+            </td>
+            <td>
+              <div
+                  style="border: none !important"
+              >
+                {{patient.surgeryList[n - 1].heal}}
+              </div>
+            </td>
+            <td>
+              <div
+                  style="border: none !important"
+              >
+                {{filterNameInDic(patient.surgeryList[n - 1].anaesthesia,'getAnaesthesia')}}
+              </div>
+            </td>
+            <td>
+              <div>
+                {{patient.surgeryList[n - 1].anestorName}}
+              </div>
+            </td>
+          </tr>
+          </tbody>
+          <tfoot>
+          <tr>
+            <td colspan="4">
+              <div>
+                手术类别:1.择期手术 2.急诊手术
+              </div>
+            </td>
+            <td colspan="8">
+              <div>
+                切口类别:0. 0类切口 1. Ⅰ类切口 2. Ⅱ类切口 3. Ⅲ类切口
+              </div>
+              <div>
+                愈合等级:1.甲 2.乙 3.丙 9.其他
+              </div>
+            </td>
+          </tr>
+          </tfoot>
+        </table>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          离院方式
+          <span style="width: 220px;padding-left:5px;border-bottom: 1px solid black">
+            {{filterDisway(patient.zyDismissWay)}}
+          </span>
+          ,拟接收医疗机构名称
+          <span
+              style="width: 220px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.dismissDestination}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          是否有出院31天内再住院计划
+          <span style="width: 35px;padding-left: 5px;border-bottom: 1px solid black">
+            {{filter1N2Y(patient.admissAgain)}}
+          </span>
+          ,目的
+          <span
+              style="width: 300px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.admissAgainPurpose}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          颅脑损伤患者昏迷时间: 入院前
+          <span
+              style="width: 30px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.comaDaysBeforeAdmiss}}</span>天
+          <span
+              style="width: 30px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.comaHoursBeforeAdmiss}}</span>小时
+          <span
+              style="width: 30px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.comaMinutesBeforeAdmiss}}</span>分钟
+          <span style="margin-left: 12px">入院后</span>
+          <span
+              style="width: 30px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.comaDaysAfterAdmiss}}</span>天
+          <span
+              style="width: 30px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.comaHoursAfterAdmiss}}</span>小时
+          <span
+              style="width: 30px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.comaMinutesAfterAdmiss}}</span>分钟
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          住院费用(元): 总费用
+          <span style="width: 110px;padding-left: 5px;border-bottom: 1px solid black">
+            {{patient.totalCost}}
+          </span>
+          (自付金额:
+          <span style="width: 110px;padding-left: 5px;border-bottom: 1px solid black">
+            {{patient.selfPay}}
+          </span>)
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          1.综合医疗服务类: (1)一般医疗服务费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.ybylfwFee}}</span>
+          (中医辨证论治费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">
+            {{patient.zybzlzFee}}
+          </span>
+          中医辨证论治会诊费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">
+            {{patient.zybzlzhzFee}}
+          </span>)
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          (2)一般治疗操作费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.ybczzlFee}}</span>
+          (3)护理费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">{{patient.nursingFee}}</span>
+          (4)其他费用:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">{{patient.elseFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          2.诊断类: (5)病理诊断费:
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.blzdFee}}</span>
+          (6)实验室诊断费:
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.syszdFee}}</span>
+          (7)影像学诊断费:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.ctFee}}</span>
+          (8)临床诊断项目费:
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.lczdxmFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          3.治疗类: (9)非手术治疗项目费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.fsszlxmFee}}</span>
+          (临床物理治疗费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.lcwlzlFee}}</span>)
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          (10)手术治疗费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">{{patient.sszlFee}}</span>
+          (麻醉费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.anesthetizeFee}}</span>
+          &nbsp;&nbsp;手术费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">{{patient.surgeryFee}}</span>)
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          4.康复类: (11)康复费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">{{patient.recoverFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          5.中医类(中医和民族医医疗服务) (12)中医诊断:
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.tcmDiagFee}}</span>
+          (13)中医治疗
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.tcmTreatFee}}</span>
+          (中医外治:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmWzFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          中医骨伤:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmGsFee}}</span>
+          针刺与灸法:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmZcyjfFee}}</span>
+          中医推拿治疗:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmTnzlFee}}</span>
+          中医肛肠治疗:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmGczlFee}}</span>
+          中医特殊治疗:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmTszlFee}}</span>
+          )
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          (14)中医其他:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmOthFee}}</span>
+          (中药特殊调配加工:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmTstpjgFee}}</span>
+          辨证施膳:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.tcmBzssFee}}</span>
+          )
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          6.西药类: (15)西药费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.westMedicineFee}}</span>
+          (抗菌药物费用:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.kjywFee}}</span>
+          )
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          7.中药类: (16)中成药费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.zcyFee}}</span>
+          (医疗机构中药制剂费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.yjlgzyzjFee}}</span>
+          )
+          (17)中草药费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.herbalFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          8.血液和血液制品类: (18)血费:
+          <span style="width: 60px;padding-left: 5px;border-bottom: 1px solid black">{{patient.bloodFee}}</span>
+          (19)白蛋白类制品费:
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.albuminFee}}</span>
+          (20)球蛋白类制品费:
+          <span
+              style="width: 60px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.globulinFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          (21)凝血因子类制品费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.nxyzlzpFee}}</span>
+          (22)细胞因子类制品费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.xbyzlzpFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          9.耗材类: (23)检查用一次性医用材料费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.jcyycxyyclFee}}</span>
+          (24)治疗用一次性医用材料费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.zlyycxyyclFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          (25)手术用一次性医用材料费:
+          <span
+              style="width: 70px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.ssycxyyclFee}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          10.其他类: (26)其他费:
+          <span style="width: 70px;padding-left: 5px;border-bottom: 1px solid black">{{patient.otherFees}}</span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          <table style="border-collapse: collapse; width: 100%">
+            <thead>
+            <tr>
+              <th>重症监护室名称</th>
+              <th>进入重症监护室时间( 年 月 日 时 分)</th>
+              <th>转出重症监护室时间( 年 月 日 时 分)</th>
+            </tr>
+            </thead>
+            <tbody>
+            <tr v-for="n in 3">
+              <td>
+                <div style="height: 26px;line-height: 26px;padding-left: 5px">
+                  {{ patient.icuInfoList[n - 1].icuName }}
+                </div>
+              </td>
+              <td>
+                <div style="height: 26px;line-height: 26px;padding-left: 5px">
+                  {{ patient.icuInfoList[n - 1].startTime }}
+                </div>
+              </td>
+              <td>
+                <div style="height: 26px;line-height: 26px;padding-left: 5px">
+                  {{ patient.icuInfoList[n - 1].endTime }}
+                </div>
+              </td>
+            </tr>
+            </tbody>
+          </table>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          危重病例:
+          <span style="width: 60px;padding-left:5px;border-bottom: 1px solid black">
+            {{filter0N1Y(patient.wzbl)}}
+          </span>
+          <span style="margin-left: 12px">疑难病例:</span>
+          <span style="width: 60px;padding-left:5px;border-bottom: 1px solid black">
+            {{filter0N1Y(patient.ynbl)}}
+          </span>
+          <span style="margin-left: 12px">MDT病历:</span>
+          <span style="width: 60px;padding-left:5px;border-bottom: 1px solid black">
+            {{filter0N1Y(patient.mdtbl)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          单病种病例:
+          <span style="width: 60px;padding-left:5px;border-bottom: 1px solid black">
+            {{filter0N1Y(patient.dbzbl)}}
+          </span>
+          <span style="margin-left: 12px">日间手术病例:</span>
+          <span style="width: 60px;padding-left:5px;border-bottom: 1px solid black">
+            {{filter0N1Y(patient.rjssbl)}}
+          </span>
+          <span style="margin-left: 12px">教学查房病历:</span>
+          <span style="width: 60px;padding-left:5px;border-bottom: 1px solid black">
+            {{filter0N1Y(patient.jxcfbl)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          诊断符合情况: 门诊与出院
+          <span
+              style="margin-right: 12px;width:45px;padding-left:5px;border-bottom: 1px solid black"
+          >
+            {{filterZdfh(patient.mzycy)}}
+          </span>
+          入院与出院
+          <span style="width: 45px;padding-left:5px;border-bottom: 1px solid black">
+            {{filterZdfh(patient.ryycy)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          术前与术后
+          <span
+              style="margin-right: 12px;width: 45px;padding-left:5px;border-bottom: 1px solid black"
+          >
+            {{filterZdfh(patient.sqysh)}}
+          </span>
+          临床与病理
+          <span
+              style="margin-right: 12px;width: 45px;padding-left:5px;border-bottom: 1px solid black"
+          >
+            {{filterZdfh(patient.lcybl)}}
+          </span>
+          放射与病理
+          <span style="width: 45px;padding-left:5px;border-bottom: 1px solid black">
+            {{filterZdfh(patient.fsybl)}}
+          </span>
+        </div>
+        <div style="display: flex;align-items: end;margin-top: 4px">
+          抢救情况: 抢救
+          <span
+              style="width: 90px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.rescueTimes}}</span>次, 成功
+          <span
+              style="width: 90px;padding-left: 5px;border-bottom: 1px solid black"
+          >{{patient.rescueSuccessTimes}}</span>次
+        </div>
+        <div style="display: flex;align-items: center;margin-top: 6px">
+          同城互认:
+          1.无
+          <input type="checkbox" :checked="patient.tchrw"/>
+          <span style="margin-left: 12px">2.影像检查</span>
+          <input type="checkbox" :checked="patient.tchryxjc"/>
+          <span style="margin-left: 12px">3.检验检查</span>
+          <input type="checkbox" :checked="patient.tchrjyjc"/>
+          <span style="margin-left: 12px">4.病理检查</span>
+          <input type="checkbox" :checked="patient.tchrbljc"/>
+          <span style="margin-left: 12px">9.其他</span>
+          <input type="checkbox" :checked="patient.tchrqt"/>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+const props = defineProps({
+  patient: {},
+  dics: {}
+})
+
+const filterNameInDic = (val, dic) => {
+  if (!val) {
+    return "";
+  }
+  const dicValue = props.dics[dic];
+  for (let i = 0; i < dicValue.length; i++) {
+    const dicItem = dicValue[i];
+    if (dicItem.code === val) {
+      return dicItem.name;
+    }
+  }
+  return "-";
+};
+
+function filter0N1Y(val) {
+  if (val === '1' || val === 1) {
+    return '是'
+  } else if (val === '0' || val === 0) {
+    return '否'
+  }
+  return ''
+}
+
+function filter1N2Y(val) {
+  if (val === '1' || val === 1) {
+    return '无'
+  } else if (val === '2' || val === 2) {
+    return '有'
+  }
+  return ''
+}
+
+function filterDisway(val) {
+  if (!val) {
+    return ""
+  }
+  switch (val) {
+    case '1':
+      return '医嘱离院';
+    case '2':
+      return '医嘱转院';
+    case '3':
+      return '医嘱转社区卫生服务机构/乡镇卫生院';
+    case '4':
+      return '非医嘱离院'
+    case '5':
+      return '死亡';
+    case '9':
+      return '其他'
+  }
+}
+
+function filterZdfh(val) {
+  if (!val) {
+    return ''
+  }
+  switch (val) {
+    case '0':
+      return '未做'
+    case '1':
+      return '符合';
+    case '2':
+      return '不符合';
+    case '3':
+      return '不确定';
+  }
+}
+
+</script>
+
+<style scoped>
+table,
+th,
+td {
+  border: 1px solid black;
+  border-collapse: collapse;
+}
+
+td,
+th {
+  height: 24px;
+  padding-left: 4px;
+}
+</style>

+ 0 - 171
src/components/med-tec-mod/RefundForProjectEntry.vue

@@ -1,171 +0,0 @@
-<template>
-  <xc-dialog-v2 title="退费详细"
-                v-model="modelValue"
-                width="100%">
-    <page-layer>
-      <template #header>
-        数量:{{ chargeAmount }} 金额: {{
-          chargeFee.toLocaleString('zh', {
-            style: 'currency',
-            currency: 'cny',
-            currencyDisplay: 'name'
-          })
-        }}
-        <div v-if="isDrug">
-          药房:
-          <el-select v-model="groupNo">
-            <el-option value="71" label="门诊"/>
-            <el-option value="73" label="住院"/>
-          </el-select>
-        </div>
-        <el-button @click="confirmRefund('drugWithdrawal')" icon="Delete" type="danger"
-                   title="项目可直接退费,只有对应的执行科室可以退费,药品会产生药单,在药房确认退药后会产生退费数据,口服药无法退费。如药房拒绝可再次退费。">
-          {{ isDrug ? '退药且退费' : '退费' }}
-        </el-button>
-        <el-button v-if="needRule(1)"
-                   @click="confirmRefund('refundOnly')"
-                   icon="Delete"
-                   type="warning"
-                   title="只会生成退费的费用,不会产生药单到药房。">
-          仅退费不退药
-        </el-button>
-      </template>
-
-      <template #mainMaxContentHeight>
-        <div style="color: red">
-          请注意如果点击了【退费且退药】那么需要提交一次药单。
-        </div>
-        <xc-table :local-data="props.list"
-                  :height="400">
-          <el-table-column fixed="left" label="操作">
-            <template #default="scope">
-              <el-button @click="deleteData(scope.row,scope.row.$index)" icon="Delete" type="danger">
-                删除
-              </el-button>
-            </template>
-          </el-table-column>
-          <el-table-column label="流水号" prop="detailSn" width="70px"></el-table-column>
-          <el-table-column label="医嘱号" prop="orderNo" width="70px"></el-table-column>
-          <el-table-column label="录入日期" prop="chargeDate" width="70px"></el-table-column>
-          <el-table-column label="项目编码" prop="chargeCodeMx"></el-table-column>
-          <el-table-column label="项目名称" prop="chargeName"></el-table-column>
-          <el-table-column label="规格" prop="specification"></el-table-column>
-          <el-table-column label="药品名称" prop="drugname"></el-table-column>
-          <el-table-column label="执行科室" prop="execDept"></el-table-column>
-          <el-table-column label="申请科室" prop="deptCode"></el-table-column>
-          <el-table-column label="金额" prop="chargeFee"></el-table-column>
-          <el-table-column label="数量" prop="chargeAmount"></el-table-column>
-          <el-table-column label="状态" prop="chargeStatus">
-            <template #default="scope">
-              {{ costState(scope.row.chargeStatus) }}
-            </template>
-          </el-table-column>
-          <el-table-column label="录入人" prop="opName"></el-table-column>
-          <el-table-column label="账单码" prop="billItemName"></el-table-column>
-          <el-table-column label="是否退费" prop="tuiFeiFlag">
-            <template #default="scope">
-              <span v-html="conversionRefundFlag(scope.row.oriDetailSn)" style="color:red;"></span>
-              <br>
-              <span v-if="scope.row.oriDetailSn > 0">
-                    <span style="color: #e6a23c">退费数据</span> <br/>
-                    <span style="color: teal">
-                      原流水号为 <br/>
-                      【 {{ scope.row.oriDetailSn }} 】
-                    </span>
-                  </span>
-            </template>
-          </el-table-column>
-        </xc-table>
-
-      </template>
-    </page-layer>
-  </xc-dialog-v2>
-</template>
-
-<script setup>
-import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2";
-import XcTable from "@/components/xiao-chan/xc-table/XcTable";
-import {conversionRefundFlag, costState} from "@/utils/computed";
-import {ElMessageBox} from "element-plus";
-import PageLayer from "@/layout/PageLayer";
-import {refund} from "@/api/hospitalization-costs/hospitalization-costs-api";
-import {useVModel} from "@vueuse/core";
-import {needRule} from "@/utils/public";
-
-const props = defineProps({
-  modelValue: {
-    type: Boolean
-  },
-  list: {
-    type: Array,
-    default: []
-  },
-  isDrug: {
-    type: Boolean
-  },
-  patient: {
-    type: Object
-  }
-})
-
-const emit = defineEmits(['uncheck', 'update:modelValue', 'refreshFee'])
-
-const modelValue = useVModel(props, 'modelValue', emit)
-
-const chargeAmount = ref(0)
-const chargeFee = ref(0)
-const groupNo = ref('73')
-
-
-const confirmRefund = (flag) => {
-  let pharmacyName = groupNo.value === '71' ? '门诊' : '住院'
-  // 是否是药品退药 true
-  let isDrugWithdrawal = props.isDrug && flag === 'drugWithdrawal'
-  let title = isDrugWithdrawal ? `药品是否要退到 【${pharmacyName}】 药房` : '请确认数据'
-  ElMessageBox.confirm(title, '请您仔细确认', {
-    type: 'warning',
-    confirmButtonText: '我已确认',
-    cancelButtonText: '再看看',
-  }).then(async () => {
-    let data = {
-      inpatientNo: props.patient.inpatientNo,
-      admissTimes: props.patient.admissTimes,
-      groupNo: groupNo.value,
-      refundFlag: flag,
-      list: props.list,
-    }
-    await refund(data)
-    emit('refreshFee')
-    modelValue.value = false
-  }).catch(() => {
-
-  });
-}
-
-const deleteData = async (data, index) => {
-  await emit('uncheck', data)
-  props.list.splice(index, 1)
-  if (props.list.length === 0) {
-    modelValue.value = false
-  }
-  calculatedAmount()
-}
-
-const calculatedAmount = () => {
-  chargeAmount.value = 0
-  chargeFee.value = 0
-  props.list.forEach(item => {
-    chargeAmount.value += item.chargeAmount
-    chargeFee.value += item.chargeFee
-  })
-}
-
-onMounted(() => {
-  calculatedAmount()
-})
-
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 4 - 0
src/components/nursing-dashboard/RenderTable.vue

@@ -93,6 +93,10 @@ async function replace(query = true) {
       const totalCharacters = td.textContent.length;
       const totalDuration = totalCharacters * timePerCharacter;
 
+      marqueeDiv.querySelectorAll("br")?.forEach?.(item => {
+        item.remove();
+      });
+
       marqueeDiv.style.setProperty(
         "--translate-second",
         `${totalDuration * 0.05}s`

+ 5 - 0
src/components/search/Index.vue

@@ -106,6 +106,10 @@ const props = defineProps({
     type: String,
     required: true,
   },
+  zyType: {
+    type: String,
+    default: 'B'
+  },
   medType: {
     type: String,
     default: '',
@@ -146,6 +150,7 @@ const params = reactive({
   method: 'alpha',
   target: props.target,
   medType: props.medType,
+  zyType: props.zyType,
   page: 1,
   pageSize: 10,
   content: '',

+ 24 - 27
src/components/xmlr/components/FeeTableColumn.vue

@@ -1,36 +1,33 @@
-<script setup lang="ts">
-
-</script>
+<script setup lang="ts"></script>
 
 <template>
-  <el-table-column label="流水号" prop="detailSn" width="70px"/>
-  <el-table-column label="医嘱号" prop="orderNo" width="70px"/>
-  <el-table-column prop="chargeDate" label="录入日期" width="80px"/>
-  <el-table-column prop="chargeCodeMx" label="项目编码"/>
-  <el-table-column prop="chargeName" label="项目名称"/>
-  <el-table-column prop="genTime" label="执行时间" width="80px"/>
-  <el-table-column prop="execDept" label="执行科室"/>
-  <el-table-column prop="deptCode" label="申请科室"/>
-  <el-table-column prop="chargeFee" label="金额"/>
-  <el-table-column label="数量" prop="chargeAmount"/>
-  <el-table-column label="录入人" prop="opIdName"/>
-  <el-table-column label="账单码" prop="billItemName"/>
+  <el-table-column label="流水号" prop="detailSn" width="70px" />
+  <el-table-column label="医嘱号" prop="orderNo" width="70px" />
+  <el-table-column prop="chargeDate" label="录入日期" width="80px" />
+  <el-table-column prop="chargeCodeMx" label="项目编码" />
+  <el-table-column prop="chargeName" label="项目名称" />
+  <el-table-column prop="genTime" label="执行时间" width="80px" />
+  <el-table-column prop="execDept" label="执行科室" />
+  <el-table-column prop="deptCode" label="申请科室" />
+  <el-table-column prop="chargeFee" label="金额" />
+  <el-table-column label="数量" prop="chargeAmount" />
+  <el-table-column label="录入人" prop="opIdName" />
+  <el-table-column label="账单码" prop="billItemName" />
+  <el-table-column label="规格" prop="descriptions" />
   <el-table-column label="是否退费" prop="tuiFeiFlag">
     <template #default="scope">
-              <span v-if="scope.row.oriDetailSn === -1" style="color: red"
-              >已退费 <br/>
-              </span>
+      <span v-if="scope.row.oriDetailSn === -1" style="color: red"
+        >已退费 <br />
+      </span>
       <span v-if="scope.row.oriDetailSn > 0"
-      ><span style="color: #e6a23c">退费数据</span> <br/>
-                <span style="color: teal">
-                  原流水号为 <br/>
-                  【 {{ scope.row.oriDetailSn }} 】
-                </span>
-              </span>
+        ><span style="color: #e6a23c">退费数据</span> <br />
+        <span style="color: teal">
+          原流水号为 <br />
+          【 {{ scope.row.oriDetailSn }} 】
+        </span>
+      </span>
     </template>
   </el-table-column>
 </template>
 
-<style lang="scss">
-
-</style>
+<style lang="scss"></style>

+ 2 - 2
src/components/zfsf/PatientInfoHead.vue

@@ -9,9 +9,9 @@
   </div>
   <el-descriptions :column="6" border style="width:100%;" >
     <el-descriptions-item label="住院号">
-      <el-popover :visible="visible" :width="700" placement="right-end" trigger="click" @show="clearPatientTable">
+      <el-popover :visible="visible" :width="700" placement="right-end" trigger="click" @show="clearPatientTable" @hide="visible=false">
         <template #reference>
-          <el-input v-model="inpatientParam.inpatientNo"   @click="visible = true" style="width: 100px" @keyup.enter="queryChange" />
+          <el-input v-model="inpatientParam.inpatientNo" clearable :readonly="true"  @click="visible = true" style="width: 100px" @keyup.enter="queryChange" />
         </template>
         <div style="width: 670px;">
           <el-input v-model="headParam.inpatientNo" placeholder="支持住院号/姓名/门诊号查询" clearable @keyup.enter="selectPatientPage" style="width: 170px"></el-input>

+ 34 - 0
src/components/zfsf/PrintSelect.vue

@@ -0,0 +1,34 @@
+<template>
+  打印机:<el-select v-model="printer" placeholder="请选择打印机" style="width:150px" @change="codeChange">
+    <el-option v-for="item in printers" :key="item.code" :value="item.code" :label="item.name" ></el-option>
+  </el-select>
+</template>
+<script setup >
+import {onMounted} from "vue";
+const emit = defineEmits(['getPrintCode']);
+const printers = ref([])
+const printer = ref(null)
+const getPrinters = () => {
+  const count = LODOP.GET_PRINTER_COUNT();
+  for (let i = 0; i < count; i++) {
+    //根据设备序号获取设备名
+    const printerName = LODOP.GET_PRINTER_NAME(i);
+    printers.value.push({code: i, name: printerName})
+  }
+  printer.value = printers.value[0].code
+  codeChange()
+}
+
+const codeChange=()=>{
+  emit('getPrintCode',printer.value)
+}
+
+onMounted(() => {
+  setTimeout(() => {
+    getPrinters()
+  }, 500)
+})
+</script>
+<style scoped lang="scss">
+
+</style>

+ 428 - 0
src/directives/v-cy-print.js

@@ -0,0 +1,428 @@
+class e {
+  constructor(e) {
+    (this.standards = {
+      strict: "strict",
+      loose: "loose",
+      html5: "html5",
+    }),
+      (this.previewBody = null),
+      (this.close = null),
+      (this.previewBodyUtilPrintBtn = null),
+      (this.selectArray = []),
+      (this.counter = 0),
+      (this.settings = {
+        standard: this.standards.html5,
+      }),
+      Object.assign(this.settings, e),
+      this.init();
+  }
+
+  init() {
+    this.counter++, (this.settings.id = `printArea_${this.counter}`);
+    let e = "";
+    this.settings.url && !this.settings.asyncUrl && (e = this.settings.url);
+    let t = this;
+    if (this.settings.asyncUrl)
+      return void t.settings.asyncUrl(function (e) {
+        let i = t.getPrintWindow(e);
+        t.settings.preview ? t.previewIfrmaeLoad() : t.print(i);
+      }, t.settings.vue);
+    let i = this.getPrintWindow(e);
+    this.settings.url || this.write(i.doc),
+      this.settings.preview ? this.previewIfrmaeLoad() : this.print(i);
+  }
+
+  addEvent(e, t, i) {
+    e.addEventListener
+      ? e.addEventListener(t, i, !1)
+      : e.attachEvent
+        ? e.attachEvent("on" + t, i)
+        : (e["on" + t] = i);
+  }
+
+  previewIfrmaeLoad() {
+    let e = document.getElementById("vue-pirnt-nb-previewBox");
+    if (e) {
+      let t = this,
+        i = e.querySelector("iframe");
+      this.settings.previewBeforeOpenCallback(),
+        this.addEvent(i, "load", function () {
+          t.previewBoxShow(),
+            t.removeCanvasImg(),
+            t.settings.previewOpenCallback();
+        }),
+        this.addEvent(
+          e.querySelector(".previewBodyUtilPrintBtn"),
+          "click",
+          function () {
+            t.settings.beforeOpenCallback(),
+              t.settings.openCallback(),
+              i.contentWindow.print(),
+              t.settings.closeCallback();
+          }
+        );
+    }
+  }
+
+  removeCanvasImg() {
+    let e = this;
+    try {
+      if (e.elsdom) {
+        let t = e.elsdom.querySelectorAll(".canvasImg");
+        for (let e = 0; e < t.length; e++) t[e].remove();
+      }
+    } catch (t) {
+      console.log(t);
+    }
+  }
+
+  print(e) {
+    var t = this;
+    let i = document.getElementById(this.settings.id) || e.f,
+      l =
+        document.getElementById(this.settings.id).contentWindow ||
+        e.f.contentWindow;
+    t.settings.beforeOpenCallback(),
+      t.addEvent(i, "load", function () {
+        l.focus(),
+          t.settings.openCallback(),
+          l.print(),
+          i.remove(),
+          t.settings.closeCallback(),
+          t.removeCanvasImg();
+      });
+  }
+
+  write(e) {
+    e.open();
+    e.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`);
+    e.close();
+  }
+
+  docType() {
+    return this.settings.standard === this.standards.html5
+      ? "<!DOCTYPE html>"
+      : `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard === this.standards.loose ? " Transitional" : ""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard === this.standards.loose ? "loose" : "strict"}.dtd">`;
+  }
+
+  getHead() {
+    let e = "",
+      t = "",
+      i = "";
+    this.settings.extraHead &&
+      this.settings.extraHead.replace(/([^,]+)/g, t => {
+        e += t;
+      }),
+      [].forEach.call(document.querySelectorAll("link"), function (e) {
+        e.href.indexOf(".css") >= 0 &&
+          (t += `<link type="text/css" rel="stylesheet" href="${e.href}" >`);
+      });
+    let l = document.styleSheets;
+    if (l && l.length > 0)
+      for (let r = 0; r < l.length; r++)
+        try {
+          if (l[r].cssRules || l[r].rules) {
+            let e = l[r].cssRules || l[r].rules;
+            for (let t = 0; t < e.length; t++) i += e[t].cssText;
+          }
+        } catch (s) {
+          console.log(l[r].href + s);
+        }
+
+    this.settings.extraCss &&
+      this.settings.extraCss.replace(/([^,\s]+)/g, e => {
+        t += `<link type="text/css" rel="stylesheet" href="${e}">`;
+      });
+
+    let pageCss = "";
+    if (this.settings.extraPageCss) {
+      pageCss = `<style type="text/css">${this.settings.extraPageCss}</style>`;
+    }
+
+    return `<head><title>${this.settings.popTitle}</title>${e}${t}<style type="text/css">${i}</style>${pageCss}</head>`;
+  }
+
+  getBody() {
+    let e = this.settings.ids;
+    return (
+      (e = e.replace(new RegExp("#", "g"), "")),
+      (this.elsdom = this.beforeHanler(document.getElementById(e))),
+      "<body>" + this.getFormData(this.elsdom).outerHTML + "</body>"
+    );
+  }
+
+  beforeHanler(e) {
+    let t = e.querySelectorAll("canvas");
+    for (let i = 0; i < t.length; i++)
+      if (!t[i].style.display) {
+        let e = t[i].parentNode,
+          l = t[i].toDataURL("image/png"),
+          s = new Image();
+        (s.className = "canvasImg"),
+          (s.style.display = "none"),
+          (s.src = l),
+          e.appendChild(s);
+      }
+    return e;
+  }
+
+  getFormData(e) {
+    let t = e.cloneNode(!0),
+      i = t.querySelectorAll("input,select,textarea"),
+      l = t.querySelectorAll(".canvasImg,canvas"),
+      s = -1;
+    for (let r = 0; r < l.length; r++) {
+      let e = l[r].parentNode,
+        t = l[r];
+      "canvas" === t.tagName.toLowerCase()
+        ? e.removeChild(t)
+        : (t.style.display = "block");
+    }
+    for (let r = 0; r < i.length; r++) {
+      let t = i[r],
+        l = t.getAttribute("type"),
+        n = i[r];
+      if (
+        (l ||
+          (l =
+            "SELECT" === t.tagName
+              ? "select"
+              : "TEXTAREA" === t.tagName
+                ? "textarea"
+                : ""),
+        "INPUT" === t.tagName)
+      )
+        "radio" === l || "checkbox" === l
+          ? t.checked && n.setAttribute("checked", t.checked)
+          : ((n.value = t.value), n.setAttribute("value", t.value));
+      else if ("select" === l) {
+        s++;
+        for (let i = 0; i < e.querySelectorAll("select").length; i++) {
+          let l = e.querySelectorAll("select")[i];
+          if (
+            (!l.getAttribute("newbs") && l.setAttribute("newbs", i),
+            l.getAttribute("newbs") == s)
+          ) {
+            let i = e.querySelectorAll("select")[s].selectedIndex;
+            t.options[i].setAttribute("selected", !0);
+          }
+        }
+      } else (n.innerHTML = t.value), n.setAttribute("html", t.value);
+    }
+    return t;
+  }
+
+  getPrintWindow(e) {
+    var t = this.Iframe(e);
+    return {
+      f: t,
+      win: t.contentWindow || t,
+      doc: t.doc,
+    };
+  }
+
+  previewBoxShow() {
+    let e = document.getElementById("vue-pirnt-nb-previewBox");
+    e &&
+      (document.querySelector("html").setAttribute("style", "overflow: hidden"),
+      (e.style.display = "block"));
+  }
+
+  previewBoxHide() {
+    let e = document.getElementById("vue-pirnt-nb-previewBox");
+    e &&
+      (document
+        .querySelector("html")
+        .setAttribute("style", "overflow: visible;"),
+      e.querySelector("iframe") && e.querySelector("iframe").remove(),
+      (e.style.display = "none"));
+  }
+
+  previewBox() {
+    let e = document.getElementById("vue-pirnt-nb-previewBox"),
+      t = "previewBody";
+    if (e)
+      return (
+        e.querySelector("iframe") && e.querySelector("iframe").remove(),
+        {
+          close: e.querySelector(".previewClose"),
+          previewBody: e.querySelector(".previewBody"),
+        }
+      );
+    let i = document.createElement("div");
+    i.setAttribute("id", "vue-pirnt-nb-previewBox"),
+      i.setAttribute(
+        "style",
+        "position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"
+      ),
+      (i.style.zIndex = this.settings.zIndex);
+    let l = document.createElement("div");
+    l.setAttribute("class", "previewHeader"),
+      l.setAttribute("style", "padding: 5px 20px;"),
+      (l.innerHTML = this.settings.previewTitle),
+      i.appendChild(l),
+      (this.close = document.createElement("div"));
+    let s = this.close;
+    s.setAttribute("class", "previewClose"),
+      s.setAttribute(
+        "style",
+        "position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;"
+      );
+    let r = document.createElement("div"),
+      n = document.createElement("div");
+    r.setAttribute("class", "closeBefore"),
+      r.setAttribute(
+        "style",
+        "position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"
+      ),
+      n.setAttribute("class", "closeAfter"),
+      n.setAttribute(
+        "style",
+        "position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"
+      ),
+      s.appendChild(r),
+      s.appendChild(n),
+      l.appendChild(s),
+      (this.previewBody = document.createElement("div"));
+    let o = this.previewBody;
+    o.setAttribute("class", t),
+      o.setAttribute(
+        "style",
+        "display: flex;flex-direction: column; height: 100%;"
+      ),
+      i.appendChild(o);
+    let a = document.createElement("div");
+    a.setAttribute("class", "previewBodyUtil"),
+      a.setAttribute(
+        "style",
+        "height: 32px;background: #474747;position: relative;"
+      ),
+      o.appendChild(a),
+      (this.previewBodyUtilPrintBtn = document.createElement("div"));
+    let d = this.previewBodyUtilPrintBtn;
+    return (
+      d.setAttribute("class", "previewBodyUtilPrintBtn"),
+      (d.innerHTML = this.settings.previewPrintBtnLabel),
+      d.setAttribute(
+        "style",
+        "position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"
+      ),
+      a.appendChild(d),
+      document.body.appendChild(i),
+      {
+        close: this.close,
+        previewBody: this.previewBody,
+      }
+    );
+  }
+
+  iframeBox(e, t) {
+    let i = document.createElement("iframe");
+    return (
+      (i.style.border = "0px"),
+      (i.style.position = "absolute"),
+      (i.style.width = "0px"),
+      (i.style.height = "0px"),
+      (i.style.right = "0px"),
+      (i.style.top = "0px"),
+      i.setAttribute("id", e),
+      i.setAttribute("src", t),
+      i
+    );
+  }
+
+  Iframe(e) {
+    let t = this.settings.id;
+    e = e || new Date().getTime();
+    let i = this,
+      l = this.iframeBox(t, e);
+    try {
+      if (this.settings.preview) {
+        l.setAttribute("style", "border: 0px;flex: 1;");
+        let e = this.previewBox(),
+          t = e.previewBody,
+          s = e.close;
+        t.appendChild(l),
+          this.addEvent(s, "click", function () {
+            i.previewBoxHide();
+          });
+      } else document.body.appendChild(l);
+      (l.doc = null),
+        (l.doc = l.contentDocument
+          ? l.contentDocument
+          : l.contentWindow
+            ? l.contentWindow.document
+            : l.document);
+    } catch (s) {
+      throw new Error(s + ". iframes may not be supported in this browser.");
+    }
+    if (null == l.doc) throw new Error("Cannot find document.");
+    return l;
+  }
+}
+
+var t = {
+  directiveName: "print",
+  mounted(t, i, l) {
+    let s = i.instance,
+      r = "";
+    var n, o, a;
+    (o = "click"),
+      (a = () => {
+        if ("string" == typeof i.value) r = i.value;
+        else {
+          if ("object" != typeof i.value || !i.value.id)
+            return void window.print();
+          {
+            r = i.value.id;
+            let e = r.replace(new RegExp("#", "g"), "");
+            document.getElementById(e) ||
+              (console.log("id in Error"), (r = ""));
+          }
+        }
+        d();
+      }),
+      (n = t).addEventListener
+        ? n.addEventListener(o, a, !1)
+        : n.attachEvent
+          ? n.attachEvent("on" + o, a)
+          : (n["on" + o] = a);
+    const d = () => {
+      new e({
+        ids: r,
+        vue: s,
+        url: i.value.url,
+        standard: "",
+        extraHead: i.value.extraHead,
+        extraCss: i.value.extraCss,
+        extraPageCss: i.value.extraPageCss || "",
+        zIndex: i.value.zIndex || 20002,
+        previewTitle: i.value.previewTitle || "打印预览",
+        previewPrintBtnLabel: i.value.previewPrintBtnLabel || "打印",
+        popTitle: i.value.popTitle,
+        preview: i.value.preview || !1,
+        asyncUrl: i.value.asyncUrl,
+        previewBeforeOpenCallback() {
+          i.value.previewBeforeOpenCallback &&
+            i.value.previewBeforeOpenCallback(s);
+        },
+        previewOpenCallback() {
+          i.value.previewOpenCallback && i.value.previewOpenCallback(s);
+        },
+        openCallback() {
+          i.value.openCallback && i.value.openCallback(s);
+        },
+        closeCallback() {
+          i.value.closeCallback && i.value.closeCallback(s);
+        },
+        beforeOpenCallback() {
+          i.value.beforeOpenCallback && i.value.beforeOpenCallback(s);
+        },
+      });
+    };
+  },
+  install: function (e) {
+    e.directive("print", t);
+  },
+};
+export default t;

+ 2 - 0
src/main.js

@@ -29,6 +29,7 @@ import ContextMenu from "@imengyu/vue3-context-menu";
 import VTitle from "./directives/v-title";
 import VWaves from "./directives/v-waves";
 import VElBtn from "./directives/v-el-btn";
+import VCyPrint from "@/directives/v-cy-print.js";
 
 DomZIndex.getNext = () => {
   return useZIndex().nextZIndex();
@@ -48,6 +49,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 piniaInstall(app);
 app.use(ElementPlus, { locale: zhCn, size: "small" });
 app.use(DataVVue3);
+app.directive("cy-print", VCyPrint);
 app.directive("el-btn", VElBtn);
 app.directive("title", VTitle);
 app.directive("ClickOutside", ClickOutside);

+ 119 - 0
src/utils/cy-use/useVuePrint.tsx

@@ -0,0 +1,119 @@
+import { listNotBlank, stringIsBlank } from "@/utils/blank-utils";
+import { uuid } from "@/utils/getUuid";
+
+/**
+ * 如果使用了 useTable 的话,建议不要使用全局的 table 样式污染
+ * 建议 .xxxtable {
+ *   table{
+ *     asdsad
+ *   }
+ *
+ *   tr,td{
+ *     这样写
+ *   }
+ * }
+ * @param options
+ */
+export function useVuePrint(
+  options: {
+    id?: string;
+    extraCss?: string[];
+    hidden?: boolean;
+    contentStyle?: StyleValue;
+    extraPageCss?: string;
+    popTitle?: string;
+    useTable?: boolean;
+    previewBeforeOpenCallback: () => void;
+    previewOpenCallback: () => void;
+    openCallback: () => void;
+    closeCallback: () => void;
+    beforeOpenCallback: () => void;
+  } = {}
+) {
+  const {
+    hidden = true,
+    contentStyle = {
+      margin: 0,
+      padding: 0,
+    },
+    useTable = false,
+    ...printOjb
+  } = options;
+
+  if (listNotBlank(printOjb.extraCss)) {
+    let tmpExtraCss = "";
+    printOjb.extraCss.forEach(item => {
+      const str = "/static/printcss" + item;
+      tmpExtraCss += str + ",";
+    });
+
+    printOjb.extraCss = tmpExtraCss;
+  }
+
+  if (stringIsBlank(printOjb.id)) {
+    printOjb.id = uuid();
+  }
+
+  const buttonRef = shallowRef();
+
+  const printTemplate = defineComponent({
+    setup(props, { slots }) {
+      return () => (
+        <div style={hidden ? { height: 0, width: 0, overflow: "hidden" } : {}}>
+          <button
+            style={{ display: "none" }}
+            v-cy-print={printOjb}
+            ref={buttonRef}
+          ></button>
+          <div style={contentStyle} class="print-content" id={printOjb.id}>
+            {slots?.default?.()}
+          </div>
+        </div>
+      );
+    },
+  });
+
+  const tableTemplate = defineComponent({
+    setup(_, { slots }) {
+      const notStyle = { margin: 0, padding: 0, border: 0 };
+
+      return () => (
+        <div style={hidden ? { height: 0, width: 0, overflow: "hidden" } : {}}>
+          <button
+            style={{ display: "none" }}
+            v-cy-print={printOjb}
+            ref={buttonRef}
+          ></button>
+          <table style={notStyle} id={printOjb.id}>
+            {slots?.header ? (
+              <thead style={notStyle}>
+                <tr style={notStyle}>
+                  <th style={notStyle}>{slots?.header?.()}</th>
+                </tr>
+              </thead>
+            ) : null}
+            <tbody style={notStyle}>
+              <tr style={notStyle}>
+                <td style={notStyle}>{slots?.default?.()}</td>
+              </tr>
+            </tbody>
+            {slots?.footer ? (
+              <tfoot style={notStyle}>
+                <tr style={notStyle}>
+                  <td style={notStyle}>{slots?.footer?.()}</td>
+                </tr>
+              </tfoot>
+            ) : null}
+          </table>
+        </div>
+      );
+    },
+  });
+
+  async function print() {
+    await nextTick();
+    buttonRef.value.click();
+  }
+
+  return [useTable ? tableTemplate : printTemplate, print, printOjb];
+}

+ 193 - 118
src/views/clinic/TransferInOfExpenses.vue

@@ -1,57 +1,6 @@
 <template>
   <div class="layout_container">
-    <header>
-      住院号:
-      <el-input
-        v-model="inpatientNo"
-        clearable
-        placeholder="在此输入住院号"
-        prefix-icon="Search"
-        size="small"
-        style="width: 150px"
-        @blur="inpatientNo = $event.target.value.trim()"
-        @keyup.enter="queryClick"
-      >
-      </el-input>
-      <el-button style="margin-left: 10px" type="primary" @click="queryClick"
-        >查询患者信息
-      </el-button>
-      <el-divider direction="vertical"></el-divider>
-      机制号:
-      <el-input
-        v-model="serialNo"
-        clearable
-        onkeyup="this.value=this.value.replace(/\D/g,'') "
-        placeholder="在此输入机制号"
-        prefix-icon="Search"
-        size="small"
-        style="width: 150px"
-        @blur="serialNo = $event.target.value.trim()"
-        @keyup.enter="querySerialNo"
-      >
-      </el-input>
-      <el-select v-model="liShiFlag" size="small" style="width: 70px">
-        <el-option
-          v-for="item in chaKanLiShi"
-          :key="item.code"
-          :label="item.name"
-          :value="item.code"
-        ></el-option>
-      </el-select>
-      <el-button style="margin-left: 10px" type="primary" @click="querySerialNo"
-        >查询机制号信息
-      </el-button>
-      <el-button
-        style="margin-left: 10px"
-        type="warning"
-        @click="huanZheFeiYongDrawer = true"
-        >查看患者费用
-      </el-button>
-      <el-button style="margin-left: 10px" type="success" @click="baoCunClick"
-        >保存
-      </el-button>
-    </header>
-    <div>
+    <DefaultTemplate>
       <el-descriptions border title="基本信息">
         <el-descriptions-item>
           <template #label>
@@ -117,6 +66,83 @@
           <span style="color: red">{{ huanZheXinXi.balance }}</span>
         </el-descriptions-item>
       </el-descriptions>
+    </DefaultTemplate>
+    <ZyFeeTemplate>
+      <el-tag> 住院收费项目:合计【{{ zySum }}】</el-tag>
+      <el-table :data="zyXinXiList" height="100%" stripe>
+        <el-table-column label="项目名称" prop="itemName"></el-table-column>
+        <el-table-column label="收费编码" prop="chargeCodeMx"></el-table-column>
+        <el-table-column label="数量" prop="chargeQuantity"></el-table-column>
+        <el-table-column label="单价" prop="unitPrice"></el-table-column>
+        <el-table-column label="金额" prop="chargeFee"></el-table-column>
+      </el-table>
+    </ZyFeeTemplate>
+
+    <print-outpatient-dzfp ref="printQrCodeRef" />
+
+    <el-dialog v-model="saveStore.dialog" title="保存" destroy-on-close>
+      <div style="color: red">收费日期: {{ huanZheXinXi.chargeDate }}</div>
+      <div v-html="saveStore.message" style="color: red" />
+      <PatientInfo />
+      <div
+        style="height: 400px; display: flex; flex-direction: column"
+        class="layout_el-table"
+      >
+        <ZyTale />
+      </div>
+      <template #footer>
+        <el-button v-el-btn="saveStore.func" type="primary" size="default"
+          >保存
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <header>
+      住院号:
+      <el-input
+        v-model="inpatientNo"
+        clearable
+        placeholder="在此输入住院号"
+        prefix-icon="Search"
+        size="small"
+        style="width: 150px"
+        @blur="inpatientNo = $event.target.value.trim()"
+        @keyup.enter="queryClick"
+      >
+      </el-input>
+      <el-button style="margin-left: 10px" type="primary" @click="queryClick"
+        >患者
+      </el-button>
+      <el-divider direction="vertical"></el-divider>
+      机制号:
+      <el-input
+        v-model.number="serialNo"
+        clearable
+        onkeyup="this.value=this.value.replace(/\D/g,'') "
+        placeholder="在此输入机制号"
+        prefix-icon="Search"
+        size="small"
+        style="width: 150px"
+        @keyup.enter="querySerialNo"
+      >
+      </el-input>
+      <el-button style="margin-left: 10px" type="primary" @click="querySerialNo"
+        >机制
+      </el-button>
+      <el-button @click="handleQueryQrCode"> 电子发票</el-button>
+      <el-button
+        style="margin-left: 10px"
+        type="warning"
+        @click="huanZheFeiYongDrawer = true"
+        >患者费用
+      </el-button>
+      <el-button style="margin-left: 10px" type="success" @click="baoCunClick"
+        >保存并冲红
+      </el-button>
+      <el-button @click="handleOnlyChargeRed"> 仅充红</el-button>
+    </header>
+    <div>
+      <PatientInfo />
     </div>
     <div>
       收费日期:
@@ -165,17 +191,7 @@
         <el-button icon="Right" type="primary"></el-button>
       </div>
       <div class="layout_flex_1-x layout_el-table">
-        <el-tag> 住院收费项目:合计【{{ zySum }}】</el-tag>
-        <el-table :data="zyXinXiList" height="100%" stripe>
-          <el-table-column label="项目名称" prop="itemName"></el-table-column>
-          <el-table-column
-            label="收费编码"
-            prop="chargeCodeMx"
-          ></el-table-column>
-          <el-table-column label="数量" prop="chargeQuantity"></el-table-column>
-          <el-table-column label="单价" prop="unitPrice"></el-table-column>
-          <el-table-column label="金额" prop="chargeFee"></el-table-column>
-        </el-table>
+        <ZyTale />
       </div>
     </div>
   </div>
@@ -184,6 +200,7 @@
     v-model="huanZheFeiYongDrawer"
     size="50%"
     title="查看患者通过急门诊转入的费用"
+    destroy-on-close
   >
     <div class="layout_display_flex_y">
       <div>
@@ -288,10 +305,12 @@
   </el-drawer>
 </template>
 
-<script setup name="TransferInOfExpenses">
+<script setup lang="ts">
 import { ref } from "vue";
 import {
   baoCunHuanZheZhuYuanFeiYong,
+  correctInvoice,
+  getDzfpQrcodeBySerialNo,
   getSerialNo,
   getZyJiMenZhenZhuangRuFeiYong,
   queryEntryName,
@@ -300,25 +319,36 @@ import {
 } from "@/api/inpatient/transfer-in-of-expenses";
 import { cptSex } from "@/utils/computed";
 import { computed } from "vue";
-import { ElMessage, ElMessageBox } from "element-plus";
+import { ElMessage, ElTable } from "element-plus";
 import { compareDate, formatDatetime } from "@/utils/date";
-import { getServerDateApi, queryDept } from "@/api/public-api";
-import { stringNotBlank } from "@/utils/blank-utils";
+import { stringIsBlank, stringNotBlank } from "@/utils/blank-utils";
 import Dig from "@/utils/math";
 import SystemDeptSelect from "@/components/system/dept-select/SystemDeptSelect.vue";
+import { isDev } from "@/utils/public";
+import dayjs from "dayjs";
+import { CyMessageBox } from "@/utils/cy-message-box";
+import { useCompShallowRef } from "@/utils/useCompRef";
+import { BizException, ExceptionEnum } from "@/utils/BizException";
+import { createReusableTemplate } from "@vueuse/core";
+import PrintOutpatientDzfp from "@/views/clinic/transfer-expenses/print-outpatient-dzfp.vue";
 
 //查询条件
 //住院号
-const inpatientNo = ref(""); // 016868
+const inpatientNo = ref(isDev ? "022271" : "");
 //机制号
-const serialNo = ref(""); // 11516328
-//是否查看历史记录
-const liShiFlag = ref(0);
+const serialNo = ref(isDev ? 4744457 : null);
 //收费代码
 const chargeCodeMX = ref("");
 // 住院次数
 const admissTimes = ref("");
 
+const printQrCodeRef = useCompShallowRef(PrintOutpatientDzfp);
+
+let serialNoTmp = null;
+
+const [DefaultTemplate, PatientInfo] = createReusableTemplate();
+const [ZyFeeTemplate, ZyTale] = createReusableTemplate();
+
 const huanZheXinXi = ref({
   execUnit: "",
 });
@@ -337,17 +367,24 @@ const queryClick = async () => {
     });
     return;
   }
-  chargeDate.value = await getServerDateApi();
   deptList.value = [{ code: "1070000", name: "急诊科" }];
   queryHuanZhe(inpatientNo.value).then(res => {
     huanZheXinXi.value = res;
     admissTimes.value = res.admissTimes;
     huanZheXinXi.value.execUnit = "1070000";
 
-    chargeDate.value = new Date(huanZheXinXi.value.admissDate ?? "");
+    chargeDate.value = new Date(
+      dayjs(huanZheXinXi.value.admissDate ?? "").add(1, "minutes")
+    );
   });
 };
 
+function checkZyFee() {
+  if (zyXinXiList.value.length === 0) {
+    BizException(ExceptionEnum.MESSAGE_ERROR, "请选择要转入的费用");
+  }
+}
+
 //查询机制号
 const querySerialNo = () => {
   if (!serialNo.value) {
@@ -359,17 +396,19 @@ const querySerialNo = () => {
     });
     return;
   }
-  getSerialNo(serialNo.value, liShiFlag.value)
+  serialNoTmp = serialNo.value;
+  getSerialNo(serialNo.value)
     .then(res => {
       mzXinXiList.value = res;
     })
     .catch(() => {
+      serialNoTmp = null;
       mzXinXiList.value = [];
     });
 };
 
 //定义用来删除 多选框的选中状态 以及点击选中多选框
-const multipleTable = ref(null);
+const multipleTable = useCompShallowRef(ElTable);
 //点击多选框,把里面的内容添加进去
 const mzSelectChecked = (selection, row) => {
   zyXinXiList.value = selection;
@@ -448,6 +487,18 @@ const huanZheFeiYongCurrentChange = val => {
   }
 };
 
+const saveStore = reactive({
+  dialog: false,
+  message: "",
+  func: null,
+});
+
+function openSaveDialog(message) {
+  saveStore.dialog = true;
+  saveStore.message = message;
+  saveStore.func = handleSave;
+}
+
 //删除住院收费项目 前端删除 后端也删除 只是不执行一个查找的动作了
 const shanChuFeiYongClick = (index, val) => {
   shanChuFeiYong(val).then(res => {
@@ -475,15 +526,7 @@ const baoCunClick = () => {
     });
     return;
   }
-  if (zyXinXiList.value.length === 0) {
-    ElMessage({
-      type: "warning",
-      message: "请先选择要添加的费用",
-      showClose: true,
-      duration: 2500,
-    });
-    return;
-  }
+  checkZyFee();
   huanZheXinXi.value.list = zyXinXiList.value;
   if (huanZheXinXi.value.chargeDate === "") {
     return ElMessage.error({
@@ -495,41 +538,62 @@ const baoCunClick = () => {
       huanZheXinXi.value.name !== mzXinXiList.value[i].patientName &&
       typeof mzXinXiList.value[i].patientName !== "undefined"
     ) {
-      return ElMessageBox.confirm("", "提示", {
-        cancelButtonText: "取消",
-        confirmButtonText: "确定",
-        dangerouslyUseHTMLString: true,
-        type: "warning",
-        message: `门诊病人姓名【'${mzXinXiList.value[i].patientName}  '】住院病人姓名【'  ${huanZheXinXi.value.name}  '】不一致,是否继续?<br>收费日期:${huanZheXinXi.value.chargeDate}`,
-      })
-        .then(() => {
-          baoCunHuanZheZhuYuanFeiYong(huanZheXinXi.value).then(res => {
-            zyXinXiList.value = [];
-            mzXinXiList.value = [];
-          });
-        })
-        .catch(() => {});
+      return openSaveDialog(
+        `门诊病人姓名【'${mzXinXiList.value[i].patientName}'】住院病人姓名【'  ${huanZheXinXi.value.name}'】不一致,是否继续?`
+      );
     } else if (
       huanZheXinXi.value.name === mzXinXiList.value[i].patientName &&
       typeof mzXinXiList.value[i].patientName !== "undefined"
     ) {
-      return ElMessageBox.confirm("", "提示", {
-        cancelButtonText: "取消",
-        confirmButtonText: "确定",
-        dangerouslyUseHTMLString: true,
-        type: "warning",
-        message: `收费日期:${huanZheXinXi.value.chargeDate}`,
-      })
-        .then(() => {
-          baoCunHuanZheZhuYuanFeiYong(huanZheXinXi.value).then(res => {
-            zyXinXiList.value = [];
-            mzXinXiList.value = [];
-          });
-        })
-        .catch(() => {});
+      return openSaveDialog();
     }
   }
 };
+
+async function handleSave() {
+  await baoCunHuanZheZhuYuanFeiYong({
+    ...huanZheXinXi.value,
+    serialNo: serialNoTmp,
+  });
+  await handleCorrectInvoice();
+}
+
+async function handleCorrectInvoice(inputFee = true) {
+  checkZyFee();
+  const zyCodes = zyXinXiList.value.map(item => {
+    return item.chargeCodeMx;
+  });
+  const codes = [];
+
+  mzXinXiList.value.forEach(item => {
+    if (!zyCodes.includes(item.chargeCodeMx)) {
+      codes.push(item.chargeCodeMx);
+    }
+  });
+
+  const success = await correctInvoice({
+    serialNo: serialNoTmp,
+    codes: codes,
+  })
+    .then(res => {
+      handleOpenPrint(res);
+      return true;
+    })
+    .catch(() => {
+      if (inputFee) {
+        CyMessageBox.alert({
+          message: "保存费用成功,但冲红发票失败,可以点击仅冲红发票按钮重试",
+        });
+      }
+      return false;
+    });
+  if (success) {
+    zyXinXiList.value = [];
+    multipleTable.value.clearSelection();
+    saveStore.dialog = false;
+  }
+}
+
 //项目名称 数组
 const entryNameList = ref([]);
 
@@ -547,10 +611,21 @@ const chargeDate = ref(new Date());
 // 科室
 const deptList = ref([]);
 
-const chaKanLiShi = [
-  { code: 0, name: "当前" },
-  { code: 1, name: "历史" },
-];
-</script>
+function handleOpenPrint(res) {
+  if (stringIsBlank(res)) return;
+  handleQueryQrCode();
+}
 
-<style></style>
+function handleQueryQrCode() {
+  getDzfpQrcodeBySerialNo(serialNo.value).then(res => {
+    printQrCodeRef.value.print({ ...res, serialNo: serialNo.value });
+  });
+}
+
+async function handleOnlyChargeRed() {
+  checkZyFee();
+  saveStore.dialog = true;
+  saveStore.message = "仅充红,不会在录入住院费用了。";
+  saveStore.func = () => handleCorrectInvoice(false);
+}
+</script>

+ 66 - 0
src/views/clinic/transfer-expenses/print-outpatient-dzfp.vue

@@ -0,0 +1,66 @@
+<script setup lang="ts">
+import { useVuePrint } from "@/utils/cy-use/useVuePrint";
+import env from "@/utils/setting";
+
+const [PrintTemplate, print] = useVuePrint({
+  extraCss: ["/auto-print.css"],
+});
+
+type PrintData = {
+  total: string;
+  qrCode: string;
+  name: string;
+  printDate: string;
+  patientId: string;
+  serialNo: string;
+  opName: string;
+};
+
+const data = ref<PrintData>({});
+
+defineExpose({
+  async print(value: PrintData) {
+    data.value = value;
+    await nextTick();
+    print();
+  },
+});
+</script>
+
+<template>
+  <PrintTemplate style="margin: 10px">
+    <div>
+      <div class="mz_qrcode-print_header">
+        {{ env.VITE_HOSPITAL_NAME }}门诊缴费凭证
+      </div>
+      <el-row>
+        <el-col :span="12"> 姓名: {{ data.name }}</el-col>
+        <el-col :span="12"> 门诊号: {{ data.patientId }}</el-col>
+        <el-col :span="24"> 机制号:{{ data.serialNo }}</el-col>
+      </el-row>
+      <hr class="dashed-hr" />
+      <el-row>
+        <el-col :span="12"> 总金额:{{ data.total }}</el-col>
+        <el-col :span="12"> 收费员:{{ data.opName }}</el-col>
+        <el-col :span="24"> 打印日期:{{ data.printDate }}</el-col>
+        <el-col :span="24"> 电子发票二维码:</el-col>
+      </el-row>
+      <div style="text-align: center">
+        <img :src="`data:image/png;base64,${data.qrCode}`" alt="电子发票" />
+      </div>
+    </div>
+  </PrintTemplate>
+</template>
+
+<style lang="scss">
+.mz_qrcode-print_header {
+  font-size: 18px;
+  text-align: center;
+}
+
+.dashed-hr {
+  border: none; /* 移除默认边框 */
+  border-top: 1px dashed #000; /* 虚线样式 */
+  margin: 10px 0; /* 调整边距 */
+}
+</style>

+ 2752 - 0
src/views/hospitalization/case-front-sheet/trdtnl-chns/FillChnsSheet.vue

@@ -0,0 +1,2752 @@
+<template>
+  <div class="layout_container fill-sheet">
+    <header class="round-header">
+      <el-select
+          v-model="currentWard"
+          @change="handleWardChange"
+          style="width: 120px"
+          filterable
+      >
+        <el-option
+            v-for="item in userWards"
+            :key="item.code"
+            :value="item.code"
+            :label="item.name"
+        ></el-option>
+      </el-select>
+      <el-select
+          v-model="inOutStatus"
+          style="width: 80px; margin-right: 8px"
+          @change="changeInOutStatus"
+      >
+        <el-option
+            v-for="item in inOutOptions"
+            :key="item.code"
+            :value="item.code"
+            :label="item.name"
+        ></el-option>
+      </el-select>
+      <el-button
+          type="primary"
+          icon="Clock"
+          v-show="inOutStatus === 2"
+          @click="showSelectDateRange = true"
+      >
+        日期范围
+      </el-button>
+      <el-divider direction="vertical"></el-divider>
+      <el-input
+          v-model="inpatientNo"
+          style="width: 110px"
+          placeholder="住院号"
+          clearable
+      ></el-input>
+      <el-button
+          type="primary"
+          icon="Search"
+          @click="searchPatient"
+          style="margin-left: 8px"
+      >搜索患者
+      </el-button>
+      <el-divider direction="vertical"></el-divider>
+      <el-button
+          type="primary"
+          icon="Edit"
+          @click="openYbDiag"
+          v-if="inOutStatus === 1"
+      >
+        医保诊断
+      </el-button>
+      <el-button
+          type="primary"
+          icon="Upload"
+          @click="onSaveTcmSheet"
+      >
+        保存首页
+      </el-button>
+      <el-button
+          type="success"
+          icon="Printer"
+          @click="execPrint(1)"
+      >
+        打印正面
+      </el-button>
+      <el-button
+          type="success"
+          icon="Printer"
+          @click="execPrint(2)"
+      >
+        打印反面
+      </el-button>
+    </header>
+    <div class="layout_main layout_container layout-horizontal">
+      <aside class="layout_el-table">
+        <el-table
+            ref="asideTable"
+            :data="cptOverviews"
+            stripe
+            highlight-current-row
+            @row-click="handleClickOverview"
+        >
+          <el-table-column
+              prop="bedNo"
+              label="床号"
+              width="40"
+          ></el-table-column>
+          <el-table-column label="姓名" width="75">
+            <template #default="scope">
+              <img
+                  class="sex-icon"
+                  :src="scope.row.sex === 1 ? maleIcon : femaleIcon"
+                  alt=""
+              />
+              {{ scope.row.name }}
+            </template>
+          </el-table-column>
+          <el-table-column label="住院号-次数" width="85">
+            <template #default="scope">
+              <span style="font-weight: bold; color: black">
+                {{ scope.row.patNo }}
+              </span>
+              -{{ scope.row.times }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="doctorName" label="医生" width="90">
+            <template #header>
+              <span style="margin-right: 8px">医生</span>
+              <el-checkbox v-model="onlyShowMyPatients">我的</el-checkbox>
+            </template>
+          </el-table-column>
+        </el-table>
+      </aside>
+      <div
+          style="
+          min-width: 800px;
+          padding: 0 20px 0 35px;
+          overflow-y: scroll;
+          position: relative;
+        "
+          id="scrollWrapper"
+      >
+        <div>
+          <div style="width: 100%; font-size: 15px; text-align: center">
+            医疗机构:
+            <span style="font-weight: 700">
+              {{ env.VITE_HOSPITAL_NAME }}
+            </span>
+            ( 组织机构代码:
+            <span style="font-weight: 700">
+              {{ env.VITE_HOSPITAL_CODE }}
+            </span>
+            )
+          </div>
+          <h3 style="width: 100%; font-size: 17px; text-align: center">
+            中 医 住 院 病 案 首 页
+          </h3>
+          <div style="height: 25px; line-height: 25px; display: flex">
+            <div>
+              医疗付费方式:
+              <select
+                  id="payWay"
+                  v-model="patient.payWay"
+                  style="width: 155px"
+              >
+                <option
+                    v-for="(item, index) in dics.getPayMethod"
+                    :key="index"
+                    :value="item.code"
+                >
+                  &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+                </option>
+              </select>
+            </div>
+            <div style="width: 120px; margin-left: 24px">
+              健康卡号: {{ patient.healthCardNo }}
+            </div>
+            <div style="width: 100px; margin-left: 24px">
+              第&nbsp;{{ patient.times }}&nbsp;次住院
+            </div>
+            <div style="width: 130px;margin-left: 12px">病案号: {{ patient.patNo }}</div>
+          </div>
+        </div>
+        <div id="page1" style="border: 1px solid black; padding: 5px">
+          <div style="display: flex;align-items: end">
+            姓名
+            <input id="name" v-model="patient.name" style="width: 130px;padding-left: 5px"/>
+            <span style="margin-left: 12px">性别</span>
+            <select id="gender" v-model="patient.gender">
+              <option value="0">&nbsp;&nbsp;未知的性别&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;男&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;女&nbsp;&nbsp;</option>
+              <option value="9">&nbsp;&nbsp;未说明的性别&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">出生日期</span>
+            <div id="birthDate" style="display: flex;align-items: end">
+              <input
+                  v-model="patient.birthYear"
+                  style="width: 35px;padding-left: 5px"
+              />
+              年
+              <input
+                  v-model="patient.birthMonth"
+                  style="width: 20px;padding-left: 5px"
+              />
+              月
+              <input
+                  v-model="patient.birthDay"
+                  style="width: 20px;padding-left: 5px"
+              />
+              日
+            </div>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            年龄
+            <input
+                id="age"
+                v-model="patient.age"
+                type="number"
+                style="width: 25px;padding-left: 5px"
+            />
+            岁
+            <span style="margin-left: 12px">国籍</span>
+            <select id="country" v-model="patient.country" style="width: 160px">
+              <option
+                  v-for="(item, index) in dics.getCountry"
+                  :key="index"
+                  :value="item.code"
+              >
+                &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+              </option>
+            </select>
+            <span style="margin-left: 12px">(年龄不足1周岁的)年龄</span>
+            <input
+                id="infAge"
+                type="number"
+                v-model="patient.infAge"
+                style="width: 20px;padding-left: 5px"
+            />月
+            <span style="margin-left: 12px">(新生儿年龄≤28天)年龄</span>
+            <input
+                id="nbAge"
+                type="number"
+                v-model="patient.nbAge"
+                style="width: 20px;padding-left: 5px"
+            />天
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            新生儿出生体重 (一孩
+            <input
+                id="nbWeight1"
+                type="number"
+                v-model="patient.nbWeight1"
+                style="width: 40px;padding-left: 5px"
+            />克
+            <span style="margin-left: 12px">二孩</span>
+            <input
+                id="nbWeight2"
+                type="number"
+                v-model="patient.nbWeight2"
+                style="width: 40px;padding-left: 5px"
+            />克)
+            <span style="margin-left: 12px">
+              新生儿入院体重
+            </span>
+            <input
+                id="nbAdmWeight"
+                type="number"
+                v-model="patient.nbAdmWeight"
+                style="width: 50px;padding-left: 5px"
+            />克
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            身份证件类型
+            <select id="certType" v-model="patient.certType" style="width: 160px">
+              <option value="0">
+                &nbsp;&nbsp;居民身份证&nbsp;&nbsp;
+              </option>
+              <option value="1">
+                &nbsp;&nbsp;护照&nbsp;&nbsp;
+              </option>
+              <option value="2">
+                &nbsp;&nbsp;港澳台居民身份证/通行证&nbsp;&nbsp;
+              </option>
+              <option value="4">
+                &nbsp;&nbsp;旅行证据&nbsp;&nbsp;
+              </option>
+              <option value="9">
+                &nbsp;&nbsp;其他&nbsp;&nbsp;
+              </option>
+            </select>
+            <span style="margin-left: 12px">身份证件号码</span>
+            <input id="certNo" v-model="patient.certNo" style="width: 160px;padding-left: 5px"/>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            身份证件不详的具体原因
+            <select id="noCertReason" v-model="patient.noCertReason" style="width: 140px">
+              <option value="1">
+                &nbsp;&nbsp;三无人员&nbsp;&nbsp;
+              </option>
+              <option value="2">
+                &nbsp;&nbsp;新生儿未办理&nbsp;&nbsp;
+              </option>
+              <option value="3">
+                &nbsp;&nbsp;&nbsp;无完全民事行为能力&nbsp;
+              </option>
+              <option value="4">
+                &nbsp;&nbsp;意识障碍&nbsp;&nbsp;
+              </option>
+              <option value="9">
+                &nbsp;&nbsp;其他&nbsp;&nbsp;
+              </option>
+            </select>
+            <input
+                v-if="patient.noCertReason === '9' "
+                placeholder="请输入身份证件不详的原因"
+                id="noCertReasonInput"
+                v-model="patient.noCertReasonInput"
+                style="width: 220px;padding-left: 5px;margin-left: 12px"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            <div id="birthPlace" style="display: flex;align-items: end">
+              出生地
+              <input
+                  id="bpProvince"
+                  v-model="patient.bpProvince"
+                  style="width: 80px;padding-left: 5px"
+              />省(区、市)
+              <input
+                  id="bpCity"
+                  v-model="patient.bpCity"
+                  style="width: 60px;padding-left: 5px"
+              />市
+              <input
+                  id="bpCounty"
+                  v-model="patient.bpCounty"
+                  style="width: 60px;padding-left: 5px"
+              />
+              县
+            </div>
+            <div id="nativePlace" style="display: flex;align-items: end;margin-left: 12px">
+              籍贯
+              <input
+                  id="npProvince"
+                  v-model="patient.npProvince"
+                  style="width: 80px;padding-left: 5px"
+              />省(区、市)
+              <input
+                  id="npCity"
+                  v-model="patient.npCity"
+                  style="width: 60px;padding-left: 5px"
+              />市
+            </div>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            民族
+            <select id="nation" v-model="patient.nation">
+              <option
+                  v-for="(item, index) in dics.getNation"
+                  :key="index"
+                  :value="item.code"
+              >
+                &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+              </option>
+            </select>
+            <span style="margin-left: 12px">职业</span>
+            <select id="occupation" v-model="patient.occupation">
+              <option
+                  v-for="(item, index) in dics.getOccupation"
+                  :key="index"
+                  :value="item.code"
+              >
+                &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+              </option>
+            </select>
+            <span style="margin-left: 12px">婚姻</span>
+            <select id="marriage" v-model="patient.marriage">
+              <option
+                  v-for="(item, index) in dics.getMarriageCode"
+                  :key="index"
+                  :value="item.code"
+              >
+                &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+              </option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            <div id="livePlace">
+              现住址
+              <input
+                  id="lpProvince"
+                  v-model="patient.lpProvince"
+                  style="width: 80px;padding-left: 5px"
+              />省(区、市)
+              <input
+                  id="lpCity"
+                  v-model="patient.lpCity"
+                  style="width: 60px;padding-left: 5px"
+              />市
+              <input
+                  id="lpCounty"
+                  v-model="patient.lpCounty"
+                  style="width: 60px;padding-left: 5px"
+              />
+              县
+              <input
+                  id="lpSup"
+                  v-model="patient.lpSup"
+                  style="width: 100px;padding-left: 5px"
+                  placeholder="街道/小区/乡镇"
+              />
+            </div>
+            <span style="margin-left: 12px">电话</span>
+            <input id="phone" v-model="patient.phone" style="width: 90px;padding-left: 5px"/>
+            <span style="margin-left: 12px">邮编</span>
+            <input
+                id="lpZipCode"
+                v-model="patient.lpZipCode"
+                style="width: 70px;padding-left: 5px"
+                maxlength="6"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            <div id="hkPlace">
+              户口地址
+              <input
+                  id="hpProvince"
+                  v-model="patient.hpProvince"
+                  style="width: 80px;padding-left: 5px"
+              />省(区、市)
+              <input
+                  id="hpCity"
+                  v-model="patient.hpCity"
+                  style="width: 60px;padding-left: 5px"
+              />市
+              <input
+                  id="hpCounty"
+                  v-model="patient.hpCounty"
+                  style="width: 60px;padding-left: 5px"
+              />
+              县
+              <input
+                  id="hpSup"
+                  v-model="patient.hpSup"
+                  style="width: 100px;padding-left: 5px"
+                  placeholder="街道/小区/乡镇"
+              />
+            </div>
+            <span style="margin-left: 12px">邮编</span>
+            <input
+                id="hpZipCode"
+                v-model="patient.hpZipCode"
+                style="width: 70px;padding-left: 5px"
+                maxlength="6"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            工作单位及地址
+            <input
+                id="unitName"
+                v-model="patient.unitName"
+                style="width: 145px;padding-left: 5px"
+                placeholder="工作单位名称"
+            />
+            /
+            <input
+                id="unitPlace"
+                v-model.trim="patient.unitPlace"
+                style="width: 145px;padding-left: 5px"
+                placeholder="工作单位地址"
+            />
+            <span style="margin-left: 12px">单位电话</span>
+            <input
+                id="unitPhone"
+                v-model="patient.unitPhone"
+                style="width: 90px;padding-left: 5px"
+            />
+            <span style="margin-left: 12px">邮编</span>
+            <input
+                id="unitZipCode"
+                v-model="patient.unitZipCode"
+                style="width: 50px;padding-left: 5px"
+                maxlength="6"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            联系人姓名
+            <input
+                id="conName"
+                v-model="patient.conName"
+                style="width: 60px;padding-left: 5px"
+            />
+            <span style="margin-left: 12px">关系</span>
+            <select id="conRel" v-model="patient.conRel">
+              <option
+                  v-for="(item, index) in dics.getRelations"
+                  :key="index"
+                  :value="item.code"
+              >
+                &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+              </option>
+            </select>
+            <span style="margin-left: 12px">地址</span>
+            <input
+                id="conAddr"
+                v-model="patient.conAddr"
+                style="width: 180px;padding-left: 5px"
+            />
+            <span style="margin-left: 12px">电话</span>
+            <input
+                id="conPhone"
+                v-model.trim="patient.conPhone"
+                style="width: 90px;padding-left: 5px"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            入院途径
+            <select id="zyAdmWay" v-model="patient.zyAdmWay">
+              <option value="1">&nbsp;&nbsp;急诊&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;门诊&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;其他医疗机构转入&nbsp;&nbsp;</option>
+              <option value="9">&nbsp;&nbsp;其他&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">治疗类别</span>
+            <select
+                id="treatWay"
+                v-model="patient.treatWay"
+                style="width: 100px"
+            >
+              <option value="1.1">&nbsp;&nbsp;中医&nbsp;&nbsp;</option>
+              <option value="1.2">&nbsp;&nbsp;民族医&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;中西医&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;西医&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            <div id="admissDate">
+              入院时间
+              <input
+                  v-model="patient.admissYear"
+                  readonly
+                  style="width: 30px"
+              />年
+              <input
+                  v-model="patient.admissMonth"
+                  readonly
+                  style="width: 20px"
+              />月
+              <input
+                  v-model="patient.admissDay"
+                  readonly
+                  style="width: 20px"
+              />日
+              <input
+                  v-model="patient.admissHour"
+                  readonly
+                  style="width: 20px"
+              />时
+            </div>
+            <span style="margin-left: 12px">
+              入院科别
+            </span>
+            <input
+                v-model="patient.admissDeptName"
+                readonly
+                style="width: 120px;padding-left: 5px"
+            />
+            病房
+            <input
+                v-model="patient.admissWardName"
+                readonly
+                style="width: 80px;padding-left: 5px"
+            />
+            转科科别
+            <input
+                v-model="patient.transDeptName"
+                readonly
+                style="width: 120px;padding-left: 5px"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            <div id="dismissDate">
+              出院时间
+              <input
+                  v-model="patient.dismissYear"
+                  readonly
+                  style="width: 30px"
+              />年
+              <input
+                  v-model="patient.dismissMonth"
+                  readonly
+                  style="width: 20px"
+              />月
+              <input
+                  v-model="patient.dismissDay"
+                  readonly
+                  style="width: 20px"
+              />日
+              <input
+                  v-model="patient.dismissHour"
+                  readonly
+                  style="width: 20px"
+              />时
+            </div>
+
+            <span style="margin-left: 12px">出院科别</span>
+            <input
+                v-model="patient.dismissDeptName"
+                readonly
+                style="width: 120px;padding-left: 5px"
+            />
+            病房
+            <input
+                v-model="patient.dismissWardName"
+                readonly
+                style="width: 80px;padding-left: 5px"
+            />
+            实际住院
+            <input
+                id="inHospDays"
+                v-model="patient.inHospDays"
+                style="width: 70px;padding-left: 5px"
+            />天
+          </div>
+          <div id="mzTcmDiag" style="display: flex;align-items: end;margin-top: 4px">
+            门(急)诊诊断(中医诊断)
+            <input
+                v-model="patient.mzTcmDiagName"
+                readonly
+                style="width: 280px;padding-left: 5px"
+                @click="showSearchData('mzTcmDiag')"
+            />
+            疾病编码
+            <input
+                v-model="patient.mzTcmDiagCode"
+                readonly
+                style="width: 110px;padding-left: 5px"
+                @click="showSearchData('mzTcmDiag')"
+            />
+          </div>
+          <div id="mzWstDiag" style="display: flex;align-items: end;margin-top: 4px">
+            门(急)诊诊断(西医诊断)
+            <input
+                v-model="patient.mzWstDiagName"
+                readonly
+                style="width: 280px;padding-left: 5px"
+                @click="showSearchData('mzWstDiag')"
+            />
+            疾病编码
+            <input
+                v-model="patient.mzWstDiagCode"
+                readonly
+                style="width: 110px;padding-left: 5px"
+                @click="showSearchData('mzWstDiag')"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            实施临床路径
+            <select
+                id="usePathway"
+                v-model="patient.usePathway"
+                style="width: 80px"
+            >
+              <option value="1">&nbsp;&nbsp;中医</option>
+              <option value="2">&nbsp;&nbsp;西医</option>
+              <option value="3">&nbsp;&nbsp;否</option>
+            </select>
+
+            <span style="margin-left: 12px">临床路径管理</span>
+            <select
+                id="pathwayMng"
+                v-model="patient.pathwayMng"
+                style="width: 80px"
+            >
+              <option value="1">&nbsp;&nbsp;完成</option>
+              <option value="2">&nbsp;&nbsp;变异</option>
+              <option value="3">&nbsp;&nbsp;退出</option>
+              <option value="4">&nbsp;&nbsp;未入</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            使用医疗机构中药制剂
+            <select
+                id="useTcmPrep"
+                v-model="patient.useTcmPrep"
+                style="width: 60px"
+            >
+              <option value="1">&nbsp;&nbsp;是</option>
+              <option value="2">&nbsp;&nbsp;否</option>
+            </select>
+
+            <span style="margin-left: 12px">使用中医诊疗设备</span>
+            <select
+                id="useTcmEqp"
+                v-model="patient.useTcmEqp"
+                style="width: 60px"
+            >
+              <option value="1">&nbsp;&nbsp;是</option>
+              <option value="2">&nbsp;&nbsp;否</option>
+            </select>
+
+            <span style="margin-left: 12px">使用中医诊疗技术</span>
+            <select
+                id="useTcmTech"
+                v-model="patient.useTcmTech"
+                style="width: 60px"
+            >
+              <option value="1">&nbsp;&nbsp;是</option>
+              <option value="2">&nbsp;&nbsp;否</option>
+            </select>
+
+            <span style="margin-left: 12px">辨证施护</span>
+            <select
+                id="diaNursing"
+                v-model="patient.diaNursing"
+                style="width: 60px"
+            >
+              <option value="1">&nbsp;&nbsp;是</option>
+              <option value="2">&nbsp;&nbsp;否</option>
+            </select>
+          </div>
+          <table
+                style="
+                  width: calc(100% - 25px);
+                  margin-top: 8px;
+                  border-collapse: collapse;
+                "
+            >
+              <thead>
+              <tr>
+                <th colspan="2">出院中医诊断</th>
+                <th>疾病编码</th>
+                <th>入院病情</th>
+                <th colspan="2">出院西医诊断</th>
+                <th>疾病编码</th>
+                <th>入院病情</th>
+                <th>治疗转归</th>
+              </tr>
+              </thead>
+              <tbody>
+              <tr v-for="n in 6">
+                <td>
+                  <div style="width: 30px">
+                    <span v-if="n===1">主病</span>
+                    <span v-else-if="n===2">主证</span>
+                    <span v-else></span>
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 160px">
+                    <input
+                        style="border: none !important; "
+                        v-model="patient.disdiagList[n-1].tcmName"
+                        @click="onSrchTcmDiagFocus(n-1)"
+                        readonly
+                    />
+                    <div
+                        v-show="mngSrgryVsb[n-1]"
+                        style="text-align: center"
+                    >
+                      <el-button
+                          type="primary"
+                          icon="Edit"
+                          circle
+                          @click="showSearch = true"
+                      >
+                      </el-button>
+                      <el-button
+                          v-if="n > 1"
+                          type="danger"
+                          circle
+                          icon="Delete"
+                          @click="deleteTcmDiag(n - 1)"
+                      ></el-button>
+                    </div>
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 120px">
+                    <input
+                        style="border: none !important"
+                        v-model="patient.disdiagList[n-1].tcmCode"
+                        readonly
+                    />
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 30px">
+                    <select
+                        style="border: none !important"
+                        v-model="patient.disdiagList[n-1].tcmAdmStatus"
+                    >
+                      <option value="1">&nbsp;&nbsp;1&nbsp;&nbsp;</option>
+                      <option value="2">&nbsp;&nbsp;2&nbsp;&nbsp;</option>
+                      <option value="3">&nbsp;&nbsp;3&nbsp;&nbsp;</option>
+                      <option value="4">&nbsp;&nbsp;4&nbsp;&nbsp;</option>
+                    </select>
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 55px">
+                    <span v-if="n===1">主要诊断</span>
+                    <span v-else-if="n===2">其他诊断</span>
+                    <span v-else></span>
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 135px">
+                    <input
+                        style="border: none !important; "
+                        v-model="patient.disdiagList[n-1].wstName"
+                        @click="onSrchWstDiagFocus(n-1)"
+                        readonly
+                    />
+                    <div
+                        v-show="mngSrgryVsb[n-1]"
+                        style="text-align: center"
+                    >
+                      <el-button
+                          type="primary"
+                          icon="Edit"
+                          circle
+                          @click="showSearch = true"
+                      >
+                      </el-button>
+                      <el-button
+                          type="danger"
+                          circle
+                          icon="Delete"
+                          @click="deleteWstDiag(n - 1)"
+                      ></el-button>
+                    </div>
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 120px">
+                    <input
+                        style="border: none !important;"
+                        v-model="patient.disdiagList[n-1].wstCode"
+                        readonly
+                    />
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 30px">
+                    <select
+                        style="border: none !important;"
+                        v-model="patient.disdiagList[n-1].wstAdmStatus"
+                        @change="handleSelectCybq"
+                    >
+                      <option value="1">&nbsp;&nbsp;1&nbsp;&nbsp;</option>
+                      <option value="2">&nbsp;&nbsp;2&nbsp;&nbsp;</option>
+                      <option value="3">&nbsp;&nbsp;3&nbsp;&nbsp;</option>
+                      <option value="4">&nbsp;&nbsp;4&nbsp;&nbsp;</option>
+                    </select>
+                  </div>
+                </td>
+                <td>
+                  <div style="width: 30px">
+                    <select
+                        style="border: none !important;"
+                        v-model="patient.disdiagList[n-1].wstDisStatus"
+                        @change="handleSelectCybq"
+                    >
+                      <option value="1">&nbsp;&nbsp;1&nbsp;&nbsp;</option>
+                      <option value="2">&nbsp;&nbsp;2&nbsp;&nbsp;</option>
+                      <option value="3">&nbsp;&nbsp;3&nbsp;&nbsp;</option>
+                      <option value="4">&nbsp;&nbsp;5&nbsp;&nbsp;</option>
+                      <option value="4">&nbsp;&nbsp;9&nbsp;&nbsp;</option>
+                    </select>
+                  </div>
+                </td>
+              </tr>
+              </tbody>
+              <tfoot>
+              <tr>
+                <td colspan="9">
+                  <div style="font-size: 12px">
+                    <span>入院病情:</span>
+                    1.有,2.临床未确定,3.情况不明,4.无
+                    <span style="margin-left: 24px">治疗转归:</span
+                    >1.治愈,2.好转,3.未愈,5.死亡,9.其他
+                  </div>
+                </td>
+              </tr>
+              </tfoot>
+            </table>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            损伤、中毒的外部原因
+            <input
+                id="hurtReasonName"
+                v-model="patient.hurtReasonName"
+                readonly
+                style="width: 360px;padding-left: 5px"
+                @click="showSearchData('hurtReason')"
+            />
+            <span style="margin-left: 12px">疾病编码</span>
+            <input
+                id="hurtReasonCode"
+                v-model="patient.hurtReasonCode"
+                style="width: 110px;padding-left: 5px"
+                readonly
+            />
+            <el-button
+              type="danger"
+              style="margin-left: 5px"
+              circle
+              icon="Delete"
+              @click="clearLine('hurtReason')"
+          ></el-button>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            病理诊断
+            <input
+                id="pthDiagName"
+                v-model="patient.pthDiagName"
+                readonly
+                style="width: 300px;padding-left: 5px"
+                @click="showSearchData('pthDiag')"
+            />
+            <span style="margin-left: 12px">病理编码</span>
+            <input
+                id="pthDiagCode"
+                v-model="patient.pthDiagCode"
+                style="width: 90px;padding-left: 5px"
+                readonly
+            />
+            <span style="margin-left: 12px">病理号</span>
+            <input id="pthNo" v-model="patient.pthNo" style="width: 70px;padding-left: 5px"/>
+            <el-button
+              type="danger"
+              style="margin-left: 5px"
+              circle
+              icon="Delete"
+              @click="clearLine('pathologicDiag')"
+          ></el-button>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            药物过敏
+            <select
+                id="allergy"
+                v-model="patient.allergy"
+                @change="onAllergyChanged"
+            >
+              <option value="">&nbsp;&nbsp;&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;无&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;有&nbsp;&nbsp;</option>
+            </select>
+            ,过敏药物
+            <input
+                id="allergyMed"
+                v-model="patient.allergyMed"
+                style="width: 160px;padding-left: 5px"
+            />
+            <span style="margin-left: 12px;">死亡患者尸检</span>
+            <select id="autopsy" v-model="patient.autopsy">
+              <option value="">&nbsp;&nbsp;&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            血型
+            <select
+                id="bloodType"
+                v-model="patient.bloodType"
+                @change="handleSelectBloodType"
+            >
+              <option value="1">&nbsp;&nbsp;A&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;B&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;O&nbsp;&nbsp;</option>
+              <option value="4">&nbsp;&nbsp;AB&nbsp;&nbsp;</option>
+              <option value="5">&nbsp;&nbsp;不详&nbsp;&nbsp;</option>
+              <option value="6">&nbsp;&nbsp;未查&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">Rh</span>
+            <select id="rh" v-model="patient.rh">
+              <option value="1">&nbsp;&nbsp;阴&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;阳&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;不详&nbsp;&nbsp;</option>
+              <option value="4">&nbsp;&nbsp;未查&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            科主任
+            <input
+                id="kzyName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.kzyName"
+                @click="showSearchData('kzy')"
+            />
+            <span style="margin-left: 12px">主任(副主任)医师</span>
+            <input
+                id="zyfzyDocName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.zyfzyDocName"
+                @click="showSearchData('zyfzyDoc')"
+            />
+            <span style="margin-left: 12px">主治医师</span>
+            <input
+                id="mainDocName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.mainDocName"
+                @click="showSearchData('mainDoc')"
+            />
+            <span style="margin-left: 12px">住院医师</span>
+            <input
+                id="admDocName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.admDocName"
+                @click="showSearchData('admDoc')"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            责任护士
+            <input
+                id="dutyNurName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.dutyNurName"
+                @click="showSearchData('dutyNur')"
+            />
+            <span style="margin-left: 12px">进修医师</span>
+            <input
+                id="jxDocName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.jxDocName"
+                @click="showSearchData('jxDoc')"
+            />
+            <span style="margin-left: 12px">实习医师</span>
+            <input
+                id="sxDocName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.sxDocName"
+                @click="showSearchData('sxDoc')"
+            />
+            <span style="margin-left: 12px">编码员</span>
+            <input
+                id="coderName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.coderName"
+                @click="showSearchData('coder')"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            病案质量
+            <select
+                id="sheetQuality"
+                v-model="patient.sheetQuality"
+            >
+              <option value="1">&nbsp;&nbsp;甲&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;乙&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;丙&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">质控医师</span>
+            <input
+                id="qltyCtrlDocName"
+                readonly
+                style="width: 70px;padding-left: 5px"
+                v-model="patient.qltyCtrlDocName"
+                @click="showSearchData('qltyCtrlDoc')"
+            />
+            <span style="margin-left: 12px">质控护士</span>
+            <input
+                style="width: 70px;padding-left: 5px"
+                readonly
+                v-model="patient.qltyCtrlNurseName"
+                @click="showSearchData('qltyCtrlNurse')"
+            />
+            <span style="margin-left: 12px">质控日期</span>
+            <span id="qltyCtrlDate">
+              <input
+                  style="width: 30px"
+                  v-model="patient.qltyCtrlYear"
+              />
+              年
+              <input
+                  style="width: 20px"
+                  v-model="patient.qltyCtrlMonth"
+              />
+              月
+              <input
+                  style="width: 20px"
+                  v-model="patient.qltyCtrlDay"
+              />
+              日
+            </span>
+          </div>
+        </div>
+        <div id="page2" style="border: 1px solid black; padding: 5px">
+          <table
+              id="surgeryTable"
+              style="border-collapse: collapse; width: 100%; margin-left: -25px"
+          >
+            <thead>
+            <tr>
+              <th rowspan="2" style="border: none"></th>
+              <th rowspan="2">手术及操作编码</th>
+              <th rowspan="2" style="width: 70px">手术及操作日期</th>
+              <th rowspan="2" style="width: 10px">手术级别</th>
+              <th rowspan="2" style="width: 10px">手术类别</th>
+              <th rowspan="2">手术及操作名称</th>
+              <th colspan="3">手术及操作医师</th>
+              <th rowspan="2" style="width: 30px">切口类别</th>
+              <th rowspan="2" style="width: 30px">愈合等级</th>
+              <th rowspan="2">麻醉方式</th>
+              <th rowspan="2">麻醉医师</th>
+            </tr>
+            <tr>
+              <th>术者</th>
+              <th>I助</th>
+              <th>II助</th>
+            </tr>
+            </thead>
+            <tbody>
+            <tr v-for="n in defaultSurgerySize" :key="n">
+              <td style="border: none; width: 25px">
+                <div v-if="patient.surgeryList[n - 1].name">
+                  <div
+                      v-if="n > 1"
+                      class="order-arrow"
+                      @click="changeSurgeryOrder(n - 1, n - 2)"
+                  >
+                    ↑
+                  </div>
+                  <div
+                      v-if="n < defaultSurgerySize && patient.surgeryList[n].name"
+                      class="order-arrow"
+                      style="margin-top: 5px"
+                      @click="changeSurgeryOrder(n - 1, n)"
+                  >
+                    ↓
+                  </div>
+                  <div
+                      v-if="n === defaultSurgerySize"
+                      class="order-arrow"
+                      style="margin-top: 4px"
+                      @click="addSurgeSize"
+                  >
+                    +
+                  </div>
+                </div>
+              </td>
+              <td>
+                <input
+                    v-model="patient.surgeryList[n - 1].code"
+                    style="border: none !important; width: 70px"
+                    readonly
+                    @click="onSearchSurgeryFocus(n - 1)"
+                />
+                <div
+                    v-show="mngSrgryVsb[n - 1]"
+                    style="width: 100%; text-align: center"
+                >
+                  <el-button
+                      type="primary"
+                      circle
+                      icon="Edit"
+                      @click="showSearch = true"
+                  ></el-button>
+                  <el-button
+                      type="danger"
+                      circle
+                      icon="Delete"
+                      @click="deleteSurgery(n - 1)"
+                  ></el-button>
+                </div>
+              </td>
+              <td style="padding: 3px">
+                <input
+                    style="border: none !important; width: 70px"
+                    v-model="patient.surgeryList[n - 1].date"
+                    @click="showPickSurgeryDatetime(n - 1)"
+                    readonly
+                />
+              </td>
+              <td style="text-align-last: center">
+                <select
+                    style="border: none !important; width: 30px"
+                    v-model="patient.surgeryList[n - 1].level"
+                >
+                  <option
+                      v-for="(item, index) in dics.getOperateScale"
+                      :key="index"
+                      :value="item.code"
+                  >
+                    &nbsp;&nbsp;{{ item.code }}
+                  </option>
+                </select>
+              </td>
+              <td style="text-align-last: center">
+                <select
+                    style="border: none !important; width: 30px"
+                    v-model="patient.surgeryList[n - 1].type"
+                >
+                  <option value="1">&nbsp;&nbsp;1&nbsp;&nbsp;</option>
+                  <option value="2">&nbsp;&nbsp;2&nbsp;&nbsp;</option>
+                </select>
+              </td>
+              <td style="padding: 3px">
+                <div>
+                  {{ patient.surgeryList[n - 1].name }}
+                </div>
+              </td>
+              <td>
+                <input
+                    style="border: none !important; width: 40px"
+                    v-model="patient.surgeryList[n - 1].operName"
+                    @click="showSearchSurgerior('oper', n)"
+                />
+              </td>
+              <td style="width: 50px">
+                <div style="position: relative">
+                  <input
+                      style="border: none !important; width: 40px"
+                      v-model="patient.surgeryList[n - 1].assistantName1"
+                      @click="showSearchSurgerior('assist1', n)"
+                  />
+                  <div
+                      v-if="patient.surgeryList[n - 1].assistantName1"
+                      style="position: absolute; top: -20px; right: 0"
+                  >
+                    <el-button
+                        type="danger"
+                        circle
+                        icon="Delete"
+                        @click="deleteAssistant1(n - 1)"
+                    ></el-button>
+                  </div>
+                </div>
+              </td>
+              <td style="width: 50px">
+                <div style="position: relative">
+                  <input
+                      style="border: none !important; width: 40px"
+                      v-model="patient.surgeryList[n - 1].assistantName2"
+                      @click="showSearchSurgerior('assist2', n)"
+                  />
+                  <div
+                      v-if="patient.surgeryList[n - 1].assistantName2"
+                      style="position: absolute; top: -20px; right: 0"
+                  >
+                    <el-button
+                        type="danger"
+                        circle
+                        icon="Delete"
+                        @click="deleteAssistant2(n - 1)"
+                    ></el-button>
+                  </div>
+                </div>
+              </td>
+              <td style="text-align-last: center">
+                <select
+                    v-model="patient.surgeryList[n - 1].cut"
+                    style="border: none !important"
+                >
+                  <option value="0">&nbsp;&nbsp;0&nbsp;&nbsp;</option>
+                  <option value="1">&nbsp;&nbsp;1&nbsp;&nbsp;</option>
+                  <option value="2">&nbsp;&nbsp;2&nbsp;&nbsp;</option>
+                  <option value="3">&nbsp;&nbsp;3&nbsp;&nbsp;</option>
+                </select>
+              </td>
+              <td>
+                <select
+                    v-model="patient.surgeryList[n - 1].heal"
+                    style="border: none !important"
+                >
+                  <option value="1">&nbsp;&nbsp;甲&nbsp;&nbsp;</option>
+                  <option value="2">&nbsp;&nbsp;乙&nbsp;&nbsp;</option>
+                  <option value="3">&nbsp;&nbsp;丙&nbsp;&nbsp;</option>
+                  <option value="9">&nbsp;&nbsp;其他&nbsp;&nbsp;</option>
+                </select>
+              </td>
+              <td>
+                <select
+                    v-model="patient.surgeryList[n - 1].anaesthesia"
+                    style="border: none !important"
+                >
+                  <option
+                      v-for="(item, index) in dics.getAnaesthesia"
+                      :key="index"
+                      :value="item.code"
+                  >
+                    &nbsp;&nbsp;{{ item.name }}&nbsp;&nbsp;
+                  </option>
+                </select>
+              </td>
+              <td>
+                <div style="position: relative">
+                  <input
+                      style="border: none !important; width: 40px"
+                      v-model="patient.surgeryList[n - 1].anestorName"
+                      @click="showSearchSurgerior('anaesthesiaor', n)"
+                  />
+                  <div
+                      v-if="patient.surgeryList[n - 1].anestorName"
+                      style="position: absolute; top: -20px; right: 0"
+                  >
+                    <el-button
+                        type="danger"
+                        circle
+                        icon="Delete"
+                        @click="deleteAnestor(n - 1)"
+                    ></el-button>
+                  </div>
+                </div>
+              </td>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr>
+              <td style="border: none !important;"></td>
+              <td colspan="4">
+                <div>
+                  手术类别:1.择期手术 2.急诊手术
+                </div>
+              </td>
+              <td colspan="8">
+                <div>
+                  切口类别:0. 0类切口 1. Ⅰ类切口 2. Ⅱ类切口 3. Ⅲ类切口
+                </div>
+                <div>
+                  愈合等级:1.甲 2.乙 3.丙 9.其他
+                </div>
+              </td>
+            </tr>
+            </tfoot>
+          </table>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            离院方式
+            <select
+                id="zyDismissWay"
+                v-model="patient.zyDismissWay"
+                @change="onDismissWayChanged"
+            >
+              <option value="1">&nbsp;&nbsp;医嘱离院&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;医嘱转院&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;医嘱转社区卫生服务机构/乡镇卫生院&nbsp;&nbsp;</option>
+              <option value="4">&nbsp;&nbsp;非医嘱离院&nbsp;&nbsp;</option>
+              <option value="5">&nbsp;&nbsp;死亡&nbsp;&nbsp;</option>
+              <option value="9">&nbsp;&nbsp;其他&nbsp;&nbsp;</option>
+            </select>
+            ,拟接收医疗机构名称
+            <input
+                id="dismissDestination"
+                v-model="patient.dismissDestination"
+                style="width: 210px;padding-left: 5px"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            是否有出院31天内再住院计划
+            <select
+                id="admissAgain"
+                v-model="patient.admissAgain"
+                @change="onAdmissAgainChanged"
+            >
+              <option value="1">&nbsp;&nbsp;无&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;有&nbsp;&nbsp;</option>
+            </select>
+            ,目的
+            <input
+                id="admissAgainPurpose"
+                v-model="patient.admissAgainPurpose"
+                style="width: 300px;padding-left: 5px"
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            颅脑损伤患者昏迷时间: 入院前
+            <input
+                id="comaDaysBeforeAdmiss"
+                v-model="patient.comaDaysBeforeAdmiss"
+                style="width: 30px;padding-left: 5px"
+            />天
+            <input
+                id="comaHoursBeforeAdmiss"
+                v-model="patient.comaHoursBeforeAdmiss"
+                style="width: 30px;padding-left: 5px"
+            />小时
+            <input
+                id="comaMinutesBeforeAdmiss"
+                v-model="patient.comaMinutesBeforeAdmiss"
+                style="width: 30px;padding-left: 5px"
+            />分钟
+            <span style="margin-left: 12px;">入院后</span>
+            <input
+                id="comaDaysAfterAdmiss"
+                v-model="patient.comaDaysAfterAdmiss"
+                style="width: 30px;padding-left: 5px"
+            />天
+            <input
+                id="comaHoursAfterAdmiss"
+                v-model="patient.comaHoursAfterAdmiss"
+                style="width: 30px;padding-left: 5px"
+            />小时
+            <input
+                id="comaMinutesAfterAdmiss"
+                v-model="patient.comaMinutesAfterAdmiss"
+                style="width: 30px;padding-left: 5px"
+            />分钟
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            住院费用(元): 总费用
+            <input v-model="patient.totalCost" style="width: 110px;padding-left: 5px" readonly/>
+            (自付金额:
+            <input v-model="patient.selfPay" style="width: 110px;padding-left: 5px" readonly/>)
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            1.综合医疗服务类: (1)一般医疗服务费:
+            <input
+                v-model="patient.ybylfwFee"
+                style="width: 60px;padding-left: 5px"
+                readonly
+            />
+            (中医辨证论治费:
+            <input v-model="patient.zybzlzFee" style="width: 60px;padding-left: 5px"/>
+            中医辨证论治会诊费:
+            <input v-model="patient.zybzlzhzFee" style="width: 60px;padding-left: 5px"/>)
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            (2)一般治疗操作费:
+            <input
+                v-model="patient.ybczzlFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            (3)护理费:
+            <input v-model="patient.nursingFee" style="width: 50px;padding-left: 5px" readonly/>
+            (4)其他费用:
+            <input v-model="patient.elseFee" style="width: 70px;padding-left: 5px" readonly/>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            2.诊断类: (5)病理诊断费:
+            <input
+                v-model="patient.blzdFee"
+                style="width: 60px;padding-left: 5px"
+                readonly
+            />
+            (6)实验室诊断费:
+            <input
+                v-model="patient.syszdFee"
+                style="width: 60px;padding-left: 5px"
+                readonly
+            />
+            (7)影像学诊断费:
+            <input v-model="patient.ctFee" style="width: 60px;padding-left: 5px" readonly/>
+            (8)临床诊断项目费:
+            <input
+                v-model="patient.lczdxmFee"
+                style="width: 60px;padding-left: 5px"
+                readonly
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            3.治疗类: (9)非手术治疗项目费:
+            <input
+                v-model="patient.fsszlxmFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            (临床物理治疗费:
+            <input
+                v-model="patient.lcwlzlFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />)
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            (10)手术治疗费:
+            <input v-model="patient.sszlFee" style="width: 70px;padding-left: 5px" readonly/>
+            (麻醉费:
+            <input
+                v-model="patient.anesthetizeFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            &nbsp;&nbsp;手术费:
+            <input v-model="patient.surgeryFee" style="width: 70px;padding-left: 5px" readonly/>)
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            4.康复类: (11)康复费:
+            <input v-model="patient.recoverFee" style="width: 70px;padding-left: 5px" readonly/>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            5.中医类(中医和民族医医疗服务) (12)中医诊断:
+            <input
+                v-model="patient.tcmDiagFee"
+                style="width: 60px;padding-left: 5px"
+                readonly
+            />
+            (13)中医治疗
+            <input
+                v-model="patient.tcmTreatFee"
+                style="width: 60px;padding-left: 5px"
+                readonly
+            />
+            (中医外治:
+            <input v-model="patient.tcmWzFee" style="width: 60px;padding-left: 5px;"/>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            中医骨伤:
+            <input v-model="patient.tcmGsFee" style="width: 60px;padding-left: 5px;"/>
+            针刺与灸法:
+            <input v-model="patient.tcmZcyjfFee" style="width: 60px;padding-left: 5px;"/>
+            中医推拿治疗:
+            <input v-model="patient.tcmTnzlFee" style="width: 60px;padding-left: 5px;"/>
+            中医肛肠治疗:
+            <input v-model="patient.tcmGczlFee" style="width: 60px;padding-left: 5px;"/>
+            中医特殊治疗:
+            <input v-model="patient.tcmTszlFee" style="width: 60px;padding-left: 5px;"/>
+            )
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            (14)中医其他:
+            <input v-model="patient.tcmOthFee" style="width: 60px;padding-left: 5px"/>
+            (中药特殊调配加工:
+            <input v-model="patient.tcmTstpjgFee" style="width: 60px;padding-left: 5px"/>
+            辨证施膳:
+            <input v-model="patient.tcmBzssFee" style="width: 60px;padding-left: 5px"/>
+            )
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            6.西药类: (15)西药费:
+            <input
+                v-model="patient.westMedicineFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            (抗菌药物费用:
+            <input
+                v-model="patient.kjywFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            )
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            7.中药类: (16)中成药费:
+            <input
+                v-model="patient.zcyFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            (医疗机构中药制剂费:
+            <input
+                v-model="patient.yjlgzyzjFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            )
+            (17)中草药费:
+            <input
+                v-model="patient.herbalFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            8.血液和血液制品类: (18)血费:
+            <input v-model="patient.bloodFee" style="width: 50px;padding-left: 5px" readonly/>
+            (19)白蛋白类制品费:
+            <input
+                v-model="patient.albuminFee"
+                style="width: 50px;padding-left: 5px"
+                readonly
+            />
+            (20)球蛋白类制品费:
+            <input
+                v-model="patient.globulinFee"
+                style="width: 50px;padding-left: 5px"
+                readonly
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            (21)凝血因子类制品费:
+            <input
+                v-model="patient.nxyzlzpFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            (22)细胞因子类制品费:
+            <input
+                v-model="patient.xbyzlzpFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            9.耗材类: (23)检查用一次性医用材料费:
+            <input
+                v-model="patient.jcyycxyyclFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+            (24)治疗用一次性医用材料费:
+            <input
+                v-model="patient.zlyycxyyclFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            (25)手术用一次性医用材料费:
+            <input
+                v-model="patient.ssycxyyclFee"
+                style="width: 70px;padding-left: 5px"
+                readonly
+            />
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            10.其他类: (26)其他费:
+            <input v-model="patient.otherFees" style="width: 70px;padding-left: 5px" readonly/>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            <table style="border-collapse: collapse; width: calc(100% - 25px)">
+              <thead>
+              <tr>
+                <th>重症监护室名称</th>
+                <th>进入重症监护室时间( 年 月 日 时 分)</th>
+                <th>转出重症监护室时间( 年 月 日 时 分)</th>
+              </tr>
+              </thead>
+              <tbody>
+              <tr v-for="n in 3">
+                <td>
+                  <div style="height: 26px;line-height: 26px;padding-left: 5px">
+                    {{ patient.icuInfoList[n - 1].icuName }}
+                  </div>
+                </td>
+                <td>
+                  <div style="height: 26px;line-height: 26px;padding-left: 5px">
+                    {{ patient.icuInfoList[n - 1].startTime }}
+                  </div>
+                </td>
+                <td>
+                  <div style="height: 26px;line-height: 26px;padding-left: 5px">
+                    {{ patient.icuInfoList[n - 1].endTime }}
+                  </div>
+                </td>
+              </tr>
+              </tbody>
+            </table>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            危重病例:
+            <select v-model="patient.wzbl" style="width: 60px">
+              <option value="0">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">疑难病例:</span>
+            <select v-model="patient.ynbl" style="width: 60px">
+              <option value="0">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">MDT病历:</span>
+            <select v-model="patient.mdtbl" style="width: 60px">
+              <option value="0">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            单病种病例:
+            <select v-model="patient.dbzbl" style="width: 60px">
+              <option value="0">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">日间手术病例:</span>
+            <select v-model="patient.rjssbl" style="width: 60px">
+              <option value="0">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+            </select>
+            <span style="margin-left: 12px">教学查房病历:</span>
+            <select v-model="patient.jxcfbl" style="width: 60px">
+              <option value="0">&nbsp;&nbsp;否&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;是&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            诊断符合情况: 门诊与出院
+            <select
+                id="mzycy"
+                v-model="patient.mzycy"
+                style="margin-right: 12px"
+            >
+              <option value="0">&nbsp;&nbsp;未做&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;符合&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;不符合&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;不确定&nbsp;&nbsp;</option>
+            </select>
+            入院与出院
+            <select id="ryycy" v-model="patient.ryycy">
+              <option value="0">&nbsp;&nbsp;未做&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;符合&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;不符合&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;不确定&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            术前与术后
+            <select
+                id="sqysh"
+                v-model="patient.sqysh"
+                style="margin-right: 12px"
+            >
+              <option value="0">&nbsp;&nbsp;未做&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;符合&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;不符合&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;不确定&nbsp;&nbsp;</option>
+            </select>
+            临床与病理
+            <select
+                id="lcybl"
+                v-model="patient.lcybl"
+                style="margin-right: 12px"
+            >
+              <option value="0">&nbsp;&nbsp;未做&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;符合&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;不符合&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;不确定&nbsp;&nbsp;</option>
+            </select>
+            放射与病理
+            <select id="fsybl" v-model="patient.fsybl">
+              <option value="0">&nbsp;&nbsp;未做&nbsp;&nbsp;</option>
+              <option value="1">&nbsp;&nbsp;符合&nbsp;&nbsp;</option>
+              <option value="2">&nbsp;&nbsp;不符合&nbsp;&nbsp;</option>
+              <option value="3">&nbsp;&nbsp;不确定&nbsp;&nbsp;</option>
+            </select>
+          </div>
+          <div style="display: flex;align-items: end;margin-top: 4px">
+            抢救情况: 抢救
+            <input
+                id="rescueTimes"
+                v-model="patient.rescueTimes"
+                type="number"
+                style="width: 90px;padding-left: 5px"
+            />次, 成功
+            <input
+                id="rescueSuccessTimes"
+                v-model="patient.rescueSuccessTimes"
+                type="number"
+                style="width: 90px;padding-left: 5px"
+            />次
+          </div>
+          <div style="display: flex;align-items: center;margin-top: 6px">
+            同城互认:
+            1.无
+            <input type="checkbox" v-model="patient.tchrw"/>
+            <span style="margin-left: 12px">2.影像检查</span>
+            <input type="checkbox" v-model="patient.tchryxjc"/>
+            <span style="margin-left: 12px">3.检验检查</span>
+            <input type="checkbox" v-model="patient.tchrjyjc"/>
+            <span style="margin-left: 12px">4.病理检查</span>
+            <input type="checkbox" v-model="patient.tchrbljc"/>
+            <span style="margin-left: 12px">9.其他</span>
+            <input type="checkbox" v-model="patient.tchrqt"/>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div id="headpage" style="opacity: 0; position: fixed">
+    <HeadPage :patient="patient" :dics="dics"/>
+  </div>
+  <div id="tailpage" style="opacity: 0; position: fixed">
+    <TailPage :patient="patient" :dics="dics"/>
+  </div>
+
+  <el-drawer
+      v-model="showMessageDrawer"
+      title="首页保存/打印校验结果"
+      size="260px"
+      modal-class="modal-class"
+  >
+    <div class="page-inner">
+      <div
+          v-if="forceVerifies.length === 0 && adviceVerifies.length === 0"
+          class="no-verify-message"
+      >
+        暂无校验内容
+      </div>
+      <div
+          v-show="forceVerifies.length > 0"
+          style="padding: 8px 0 4px 0; font-weight: bold"
+      >
+        以下条目为强制要求,请完善。
+      </div>
+      <div
+          v-for="(item, index) in forceVerifies"
+          :key="index"
+          class="message-item"
+          :style="messageColor(index)"
+          @click="handleClickMessage(item.code, index)"
+      >
+        {{ index + 1 }}、{{ item.name }}
+      </div>
+      <div
+          v-show="adviceVerifies.length > 0"
+          style="padding: 8px 0 4px 0; font-weight: bold"
+      >
+        以下条目为建议执行,不做强制要求。
+      </div>
+      <div
+          v-for="(item, index) in adviceVerifies"
+          :key="index"
+          style="
+          padding: 6px;
+          margin-bottom: 6px;
+          border-radius: 4px;
+          background: #eea7a752;
+          color: #ff2b2b;
+        "
+      >
+        {{ index + 1 }}、{{ item.name }}
+      </div>
+    </div>
+  </el-drawer>
+  <div class="rightside-btn" @click="showMessageDrawer = !showMessageDrawer">
+    首页保存 / 打印校验结果
+  </div>
+
+  <el-dialog
+      v-model="showSelectDateRange"
+      title="出院日期"
+      width="320px"
+      draggable
+  >
+    <div style="height: 20px"></div>
+    请选择出院日期范围:
+    <div style="height: 10px"></div>
+    <el-date-picker
+        v-model="dateRange"
+        type="daterange"
+        range-separator="至"
+        start-placeholder="开始日期"
+        end-placeholder="结束日期"
+        :shortcuts="shortcuts"
+        style="width: 260px"
+    ></el-date-picker>
+    <div style="margin: 20px 0 10px 0; width: 100%; text-align: right">
+      <el-button type="primary" icon="Check" @click="confirmDateRange"
+      >确定
+      </el-button>
+    </div>
+  </el-dialog>
+  <el-dialog
+      v-model="showYbDiag"
+      title="医保出院诊断"
+      width="60%"
+      top="30px"
+      draggable
+  >
+    <el-tag>患者:{{ patient.name }}</el-tag>
+    <el-tag style="margin-left: 8px"
+    >医疗类别:{{ patient.medTypeName }}
+    </el-tag>
+    <el-tag style="margin-left: 8px">险种类型:{{ patient.insutype }}</el-tag>
+    <div style="height: 5px"></div>
+    <el-input
+        v-model="ybDiag.name"
+        placeholder="在此搜索诊断"
+        readonly
+        style="width: 160px"
+        @click="showSearchData('ybDiag')"
+    ></el-input>
+    <el-input
+        placeholder="诊断编码"
+        disabled
+        style="width: 100px"
+        v-model="ybDiag.code"
+    ></el-input>
+    <el-select
+        v-model="ybDiag.siDiagType"
+        style="width: 100px"
+        placeholder="诊断类别"
+    >
+      <el-option
+          v-for="item in diagTypes"
+          :key="item.code"
+          :value="item.code"
+          :label="item.name"
+      ></el-option>
+    </el-select>
+    <el-select
+        v-model="ybDiag.admissCond"
+        style="width: 100px"
+        placeholder="入院病情"
+    >
+      <el-option
+          v-for="item in admissConds"
+          :key="item.code"
+          :value="item.code"
+          :label="item.name"
+      ></el-option>
+    </el-select>
+    <el-select
+        v-model="ybDiag.cyzg"
+        style="width: 120px"
+        placeholder="出院转归"
+    >
+      <el-option
+          v-for="item in cyzgs"
+          :key="item.code"
+          :value="item.code"
+          :label="item.name"
+      ></el-option>
+    </el-select>
+    <el-divider direction="vertical"></el-divider>
+    <el-button
+        type="primary"
+        icon="Plus"
+        @click="addToYbDiags"
+    >
+      添加
+    </el-button>
+    <el-button
+        type="success"
+        icon="Upload"
+        @click="saveYbDiags"
+    >
+      保存
+    </el-button>
+    <el-table :data="ybDiags" stripe :height="200">
+      <el-table-column type="index" label="序号" width="45"></el-table-column>
+      <el-table-column prop="code" label="诊断编码"></el-table-column>
+      <el-table-column prop="name" label="诊断名称"></el-table-column>
+      <el-table-column
+          prop="siDiagType"
+          label="诊断类别"
+          width="80"
+      ></el-table-column>
+      <el-table-column
+          prop="admissCond"
+          label="入院病情"
+          width="80"
+      ></el-table-column>
+      <el-table-column
+          prop="cyzg"
+          label="出院转归"
+          width="80"
+      ></el-table-column>
+      <el-table-column
+          prop="operId"
+          label="录入人"
+          width="70"
+      ></el-table-column>
+      <el-table-column prop="opDate" label="录入日期"></el-table-column>
+      <el-table-column label="操作">
+        <template #default="scope">
+          <el-button
+              type="danger"
+              icon="Delete"
+              @click="deleteYbDiag(scope.$index)"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+  </el-dialog>
+  <el-dialog
+      v-model="showSurgeryDatetime"
+      title="请选择手术时间"
+      width="330px"
+      draggable
+  >
+    <div style="height: 12px"></div>
+    <el-date-picker
+        v-model="surgeryDatetime"
+        type="datetime"
+        placeholder="手术开始时间"
+    ></el-date-picker>
+    <template #footer>
+      <div>
+        <el-button
+            type="primary"
+            icon="Success"
+            @click="confirmSurgeryDatetime"
+        >
+          确定
+        </el-button>
+      </div>
+    </template>
+  </el-dialog>
+  <Search
+      v-if="showSearch"
+      width="500px"
+      :target="searchTarget"
+      :zy-type="zyType"
+      :show-emp-dept="searchTarget === 'physician'"
+      :show-yb-code="searchTarget === 'physician'"
+      title="数据搜索"
+      @close="showSearch = false"
+      @click-item="handleSelectSearch"
+  />
+</template>
+
+<script setup name="FillCaseFrontSheet">
+import {
+  autopsies,
+  clone,
+  haveOrNot,
+  yesOrNo,
+} from "../common";
+import {operations} from "@/data";
+import {getLodop, initLodop} from "@/utils/c-lodop";
+import {
+  doSaveYbDiags,
+  fetchOutPatients,
+  getAllDictionary,
+  getPatientOverview,
+  getUserWards,
+  getYbDiags,
+} from "@/api/case-front-sheet";
+import maleIcon from "@/assets/male-icon.png";
+import femaleIcon from "@/assets/female-icon.png";
+import {shortcuts} from "@/data/shortcuts";
+import {
+  formatDate,
+  formatDatetime,
+  getDatetime,
+  getOneMonthOffset,
+} from "@/utils/date";
+import HeadPage from "../../../../components/inpatient/frontsheet-printpage/TcmHeadPage.vue";
+import TailPage from "../../../../components/inpatient/frontsheet-printpage/TcmTailPage.vue";
+import {smoothScrollTableColumn} from "@/utils/el-table-scroll";
+import {xcMessage} from "@/utils/xiaochan-element-plus";
+import {useUserStore} from "@/pinia/user-store";
+import env from "../../../../utils/setting";
+import {getSheetInfo, saveTcmSheet} from "@/api/case-front-sheet/tcm-sheet.js";
+import Search from '@/components/search/Index.vue'
+
+const userStore = useUserStore();
+const userWards = ref([]);
+const currentWard = ref("");
+const inOutStatus = ref(1);
+const inOutOptions = initInOutOptions();
+const inpatientNo = ref("");
+const onlyShowMyPatients = ref(false);
+const overview = ref([]);
+const patient = ref({
+  disdiagList: [{}, {}, {}, {}, {}, {}],
+  surgeryList: [{}, {}, {}, {}, {}, {}, {}],
+  icuInfoList: [{}, {}, {}],
+  supplement: {}
+});
+const defaultSurgerySize = ref(7);
+const dics = ref({});
+const mngSrgryVsb = ref([false,false,false,false,false,false,false])
+const asideTable = ref(null);
+
+function addSurgeSize() {
+  patient.value.surgeryList.push({});
+  defaultSurgerySize.value += 1;
+}
+
+const cptOverviews = computed(() => {
+  return overview.value.filter(item => {
+    if (onlyShowMyPatients.value) {
+      return item.doctorCode === userStore.userInfo.code;
+    }
+    return true;
+  });
+});
+
+const searchPatient = () => {
+  if (!inpatientNo.value || inpatientNo.value.trim().length < 1) {
+    xcMessage.warning("请输入要搜索的住院号")
+    return;
+  }
+
+  const patientIndex = overview.value.findIndex(item => {
+    return item.patNo === inpatientNo.value.trim();
+  });
+  if (patientIndex === -1) {
+    xcMessage.warning("未找到住院号【" + inpatientNo.value.trim() + "】的患者信息")
+  } else {
+    const currentPatient = overview.value[patientIndex];
+    handleClickOverview(currentPatient);
+    smoothScrollTableColumn(asideTable.value, patientIndex, currentPatient);
+  }
+};
+
+function onSaveTcmSheet() {
+  saveTcmSheet(patient.value).then(res => {
+    patient.value.id = res;
+    xcMessage.success('保存成功')
+  })
+}
+
+const handleWardChange = () => {
+  if (inOutStatus.value === 1) {
+    fetchOverview();
+  } else {
+    confirmDateRange();
+  }
+};
+
+const dateRange = ref([]);
+const showSelectDateRange = ref(false);
+const changeInOutStatus = () => {
+  if (inOutStatus.value === 1) {
+    fetchOverview();
+  } else {
+    if (!dateRange.value || dateRange.value.length < 2) {
+      const oneMonth = getOneMonthOffset();
+      dateRange.value[0] = oneMonth.start;
+      dateRange.value[1] = oneMonth.end;
+    }
+    showSelectDateRange.value = true;
+  }
+};
+const confirmDateRange = () => {
+  if (!dateRange.value || dateRange.value.length < 2) {
+    xcMessage.warning("请选择时间范围")
+    return;
+  }
+  const param = {
+    ward: currentWard.value,
+    start: formatDate(dateRange.value[0]),
+    end: formatDate(dateRange.value[1]),
+  };
+  fetchOutPatients(param).then(res => {
+    overview.value = res;
+    showSelectDateRange.value = false;
+  });
+};
+
+const fetchOverview = () => {
+  getPatientOverview(currentWard.value).then(res => {
+    overview.value = res;
+  });
+};
+
+const currentRow = ref({});
+
+const handleClickOverview = row => {
+  currentRow.value = row;
+  fetchSheetInfo(row);
+};
+
+const fetchSheetInfo = row => {
+  if (
+      row.patNo !== patient.value.patNo ||
+      row.times !== patient.value.times
+  ) {
+    forceVerifies.value = [];
+    adviceVerifies.value = [];
+  }
+  row.inOutFlag = inOutStatus.value;
+  getSheetInfo(row).then(res => {
+    let s = res.surgeryList.length;
+    if (defaultSurgerySize.value - s > 0) {
+      for (let i = 0; i < defaultSurgerySize.value - s; i++) {
+        res.surgeryList.push({})
+      }
+    }
+    defaultSurgerySize.value = s > 7 ? s : 7;
+    patient.value = res;
+    patient.value.bedNo = row.bedNo;
+    patient.value.sex = row.sex;
+  });
+};
+
+const showSearch = ref(false);
+const insertDiag = ref(false);
+watchEffect(() => {
+  if (showSearch.value) {
+    setTimeout(() => {
+      mngSrgryVsb.value = ref([false,false,false,false,false,false,false])
+    }, 300);
+  } else {
+    insertDiag.value = false;
+  }
+});
+
+
+const showYbDiag = ref(false);
+const openYbDiag = () => {
+  if (nullPatient()) {
+    return;
+  }
+  getYbDiags(patient.value.patNo, patient.value.times).then(res => {
+    ybDiags.value = res;
+    showYbDiag.value = true;
+  });
+};
+
+const searchTarget = ref("");
+const searchTargetCode = ref("");
+const searchTargetName = ref("");
+const showSearchData = flag => {
+  if (flag === "hurtReason") {
+    searchTarget.value = "hurtReason";
+    searchTargetCode.value = "hurtReasonCode";
+    searchTargetName.value = "hurtReasonName";
+  } else if (flag === "pthDiag") {
+    searchTarget.value = "pthDiag";
+    searchTargetCode.value = "pthDiagCode";
+    searchTargetName.value = "pthDiagName";
+  } else if (flag === "kzy") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "kzy";
+    searchTargetName.value = "kzyName";
+  } else if (flag === "zyfzyDoc") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "zyfzyDoc";
+    searchTargetName.value = "zyfzyDocName";
+  } else if (flag === "mainDoc") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "mainDoc";
+    searchTargetName.value = "mainDocName";
+  } else if (flag === "admDoc") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "admDoc";
+    searchTargetName.value = "admDocName";
+  } else if (flag === "dutyNur") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "dutyNur";
+    searchTargetName.value = "dutyNurName";
+  } else if (flag === "jxDoc") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "jxDoc";
+    searchTargetName.value = "jxDocName";
+  } else if (flag === "sxDoc") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "sxDoc";
+    searchTargetName.value = "sxDocName";
+  } else if (flag === "coder") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "coder";
+    searchTargetName.value = "coderName";
+  } else if (flag === "qltyCtrlDoc") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "qltyCtrlDoc";
+    searchTargetName.value = "qltyCtrlDocName";
+  } else if (flag === "qltyCtrlNurse") {
+    searchTarget.value = "physician";
+    searchTargetCode.value = "qltyCtrlNurse";
+    searchTargetName.value = "qltyCtrlNurseName";
+  } else if (flag === "ybDiag") {
+    searchTarget.value = "diag";
+    searchTargetCode.value = "ybDiagCode";
+  } else if (flag === "mzWstDiag") {
+    searchTarget.value = "icd10";
+    searchTargetCode.value = "mzWstDiagCode";
+    searchTargetName.value = "mzWstDiagName";
+  } else if (flag === "mzTcmDiag") {
+    searchTarget.value = "tcmDiag";
+    searchTargetCode.value = "mzTcmDiagCode";
+    searchTargetName.value = "mzTcmDiagName";
+  }
+  showSearch.value = true;
+};
+
+const zyType = ref('B')
+const onSrchTcmDiagFocus = n => {
+  if (n > 0 && !patient.value.disdiagList[n - 1].tcmCode) {
+    xcMessage.warning("请按顺序填写")
+    return;
+  }
+  searchTarget.value = "tcmDiag";
+  searchTargetCode.value = "disdiagTcmCode" + n;
+  searchTargetName.value = "disdiagTcmName" + n;
+  zyType.value = n === 1 ? 'Z' : 'B';
+  if (!patient.value.disdiagList[n].tcmCode) {
+    showSearch.value = true;
+  } else {
+    mngSrgryVsb.value[n] = true;
+  }
+};
+const onSrchWstDiagFocus = n => {
+  if (n > 0 && !patient.value.disdiagList[n - 1].wstCode) {
+    xcMessage.warning("请按顺序填写")
+    return;
+  }
+  searchTarget.value = "icd10";
+  searchTargetCode.value = "disdiagWsgCode" + n;
+  searchTargetName.value = "disdiagWstName" + n;
+  if (!patient.value.disdiagList[n].wstCode) {
+    showSearch.value = true;
+  } else {
+    mngSrgryVsb.value[n] = true;
+  }
+}
+const showSearchSurgerior = (flag, index) => {
+  if (flag === "oper") {
+    searchTargetCode.value = "surgeryOper" + (index - 1);
+  } else if (flag === "assist1") {
+    searchTargetCode.value = "surgeryAssist1" + (index - 1);
+  } else if (flag === "assist2") {
+    searchTargetCode.value = "surgeryAssist2" + (index - 1);
+  } else {
+    searchTargetCode.value = "surgeryAnestor" + (index - 1);
+  }
+  searchTarget.value = "physician";
+  showSearch.value = true;
+};
+
+const handleSelectSearch = item => {
+  if (searchTargetCode.value.startsWith("surgery")) {
+    let offset = defaultSurgerySize.value > 10 ? 2 : 1;
+    let no = searchTargetCode.value.substr(
+        searchTargetCode.value.length - offset
+    );
+    switch (
+        searchTargetCode.value.substr(0, searchTargetCode.value.length - offset)
+      ) {
+      case "surgeryCode":
+        if (no > 0) {
+          patient.value.surgeryList[no] = clone(
+              patient.value.surgeryList[no - 1]
+          );
+        }
+        patient.value.surgeryList[no].sortNo = no;
+        patient.value.surgeryList[no].code = item.code;
+        patient.value.surgeryList[no].name = item.name;
+        patient.value.surgeryList[no].level = item.opScale;
+        break;
+      case "surgeryOper":
+        patient.value.surgeryList[no].operCode = item.code;
+        patient.value.surgeryList[no].operName = item.name;
+        break;
+      case "surgeryAssist1":
+        patient.value.surgeryList[no].assistantCode1 = item.code;
+        patient.value.surgeryList[no].assistantName1 = item.name;
+        break;
+      case "surgeryAssist2":
+        patient.value.surgeryList[no].assistantCode2 = item.code;
+        patient.value.surgeryList[no].assistantName2 = item.name;
+        break;
+      case "surgeryAnestor":
+        patient.value.surgeryList[no].anestorCode = item.code;
+        patient.value.surgeryList[no].anestorName = item.name;
+        break;
+    }
+  } else if (searchTargetCode.value.startsWith("disdiag")) {
+    let no = Number(searchTargetCode.value.substr(searchTargetCode.value.length - 1));
+    if (insertDiag.value) {
+      for (let i = 6; i > no; i--) {
+        patient.value.disdiagList[i] = clone(patient.value.disdiagList[i - 1]);
+      }
+      patient.value.disdiagList.splice(6);
+      insertDiag.value = false;
+    }
+    patient.value.disdiagList[no].sortNo = no;
+    if (searchTargetCode.value.startsWith("disdiagTcm")) {
+      patient.value.disdiagList[no].tcmCode = item.code;
+      patient.value.disdiagList[no].tcmName = item.name;
+    } else {
+      patient.value.disdiagList[no].wstCode = item.code;
+      patient.value.disdiagList[no].wstName = item.name;
+    }
+  } else if (searchTargetCode.value === "ybDiagCode") {
+    ybDiag.code = item.code;
+    ybDiag.name = item.name;
+    ybDiag.cyzg = 0;
+    ybDiag.siDiagType = 1;
+  } else {
+    patient.value[searchTargetCode.value] = item.code;
+    patient.value[searchTargetName.value] = item.name;
+  }
+  showSearch.value = false;
+};
+
+const showSurgeryDatetime = ref(false);
+const surgeryDatetime = ref(null);
+const currentSurgeryDatetimeIndex = ref(null);
+const showPickSurgeryDatetime = index => {
+  currentSurgeryDatetimeIndex.value = index;
+  let surgery = patient.value.surgeryList[index];
+  surgeryDatetime.value = surgery.date;
+  showSurgeryDatetime.value = true;
+};
+const confirmSurgeryDatetime = () => {
+  if (!surgeryDatetime.value) {
+    xcMessage.warning("手术开始时间不能为空!")
+    return;
+  }
+  patient.value.surgeryList[currentSurgeryDatetimeIndex.value].date =
+      formatDatetime(surgeryDatetime.value);
+  showSurgeryDatetime.value = false;
+};
+
+const ybDiag = reactive({});
+const cyzgs = initCyzgs();
+const admissConds = initAdmissConds();
+const diagTypes = initDiagTypes();
+
+const clearLine = option => {
+  switch (option) {
+    case "hurtReason":
+      patient.value.hurtReasonName = null;
+      patient.value.hurtReasonCode = null;
+      break;
+    case "pathologicDiag":
+      patient.value.pthDiagName = null;
+      patient.value.pthDiagCode = null;
+      patient.value.pthNo = null;
+      break;
+  }
+};
+
+const ybDiags = ref([]);
+const addToYbDiags = () => {
+  if (!ybDiag.siDiagType) {
+    xcMessage.warning("请选择诊断类别!")
+    return;
+  }
+  if (!ybDiag.admissCond) {
+    xcMessage.warning("请选择入院病情!")
+    return;
+  }
+  const temp = clone(ybDiag);
+  temp.diagType = 13;
+  temp.operId = userStore.userInfo.code;
+  temp.opDate = getDatetime();
+  temp.bzfx = "普通";
+  ybDiags.value.push(temp);
+  ybDiag.code = ybDiag.name = ybDiag.cyzg = "";
+};
+const deleteYbDiag = index => {
+  ybDiags.value.splice(index, 1);
+};
+const saveYbDiags = () => {
+  const param = {
+    patNo: patient.value.patNo,
+    times: patient.value.times,
+    ybDiags: ybDiags.value,
+  };
+  doSaveYbDiags(param).then(() => {
+    xcMessage.success("保存成功")
+  });
+};
+
+const onSearchSurgeryFocus = n => {
+  if (n > 0 && !patient.value.surgeryList[n - 1].code) {
+    xcMessage.warning("请按顺序填写")
+    return;
+  }
+  searchTarget.value = "surgery";
+  searchTargetCode.value = "surgeryCode" + n;
+  searchTargetName.value = "surgeryName" + n;
+  if (!patient.value.surgeryList[n].code) {
+    if (n === 0 && patient.value.disdiagList[0].code) {
+    }
+    showSearch.value = true;
+  } else {
+    mngSrgryVsb.value[n] = true;
+  }
+};
+
+function changeSurgeryOrder(currentIndex, newIndex) {
+  let temp = patient.value.surgeryList[currentIndex];
+  patient.value.surgeryList[currentIndex] = patient.value.surgeryList[newIndex];
+  patient.value.surgeryList[newIndex] = temp;
+}
+
+const deleteSurgery = index => {
+  mngSrgryVsb.value[index] = false;
+  while (index < defaultSurgerySize.value - 1) {
+    patient.value.surgeryList[index] = patient.value.surgeryList[index + 1];
+    index++;
+  }
+  patient.value.surgeryList[defaultSurgerySize.value - 1] = {};
+  patient.value.surgeryList.splice(defaultSurgerySize.value);
+  if (defaultSurgerySize.value > 7) {
+    defaultSurgerySize.value -= 1;
+  }
+};
+
+
+function deleteTcmDiag(index) {
+  mngSrgryVsb.value[index] = false;
+  while (index < 5) {
+    patient.value.disdiagList[index].tcmCode = patient.value.disdiagList[index + 1].tcmCode
+    patient.value.disdiagList[index].tcmName = patient.value.disdiagList[index + 1].tcmName
+    patient.value.disdiagList[index].tcmAdmStatus = patient.value.disdiagList[index + 1].tcmAdmStatus
+    index++;
+  }
+  patient.value.disdiagList[5].tcmCode = null
+  patient.value.disdiagList[5].tcmName = null
+  patient.value.disdiagList[5].tcmAdmStatus = null
+}
+
+function deleteWstDiag(index) {
+  mngSrgryVsb.value[index] = false;
+  while (index < 5) {
+    patient.value.disdiagList[index].wstCode = patient.value.disdiagList[index + 1].wstCode
+    patient.value.disdiagList[index].wstName = patient.value.disdiagList[index + 1].wstName
+    patient.value.disdiagList[index].wstAdmStatus = patient.value.disdiagList[index + 1].wstAdmStatus
+    patient.value.disdiagList[index].wstDisStatus = patient.value.disdiagList[index + 1].wstDisStatus
+    index++;
+  }
+  patient.value.disdiagList[5].wstCode = null
+  patient.value.disdiagList[5].wstName = null
+  patient.value.disdiagList[5].wstAdmStatus = null
+  patient.value.disdiagList[5].wstDisStatus = null
+}
+
+const deleteAssistant1 = index => {
+  patient.value.surgeryList[index].assistantCode1 = null;
+  patient.value.surgeryList[index].assistantName1 = null;
+};
+
+const deleteAssistant2 = index => {
+  patient.value.surgeryList[index].assistantCode2 = null;
+  patient.value.surgeryList[index].assistantName2 = null;
+};
+
+const deleteAnestor = index => {
+  patient.value.surgeryList[index].anestorCode = null;
+  patient.value.surgeryList[index].anestorName = null;
+};
+
+const nullPatient = () => {
+  if (!patient.value.patNo) {
+    xcMessage.warning("请先选择患者!")
+    return true;
+  }
+  return false;
+};
+
+const forceVerifies = ref([]);
+const adviceVerifies = ref([]);
+const currentMessageIndex = ref(null);
+const messageColor = id => {
+  return currentMessageIndex.value === id
+      ? {
+        background: "#ff2b2b",
+        color: "white",
+      }
+      : {
+        background: "#eea7a752",
+        color: "#ff2b2b",
+      };
+};
+const scrollWrapper = ref(null);
+const handleClickMessage = (id, index) => {
+  currentMessageIndex.value = index;
+  let ele = document.getElementById(id);
+  scrollWrapper.value.scrollTop = ele.offsetTop - 260;
+
+  let i = 0;
+  let timer = setInterval(() => {
+    ele.style.background = i % 2 === 0 ? "rgb(238, 98, 5)" : "transparent";
+    i++;
+    if (i > 7) {
+      clearInterval(timer);
+    }
+  }, 500);
+};
+
+const showMessageDrawer = ref(false);
+
+const execPrint = page => {
+  const LODOP = getLodop();
+  const prntStyle = `<style>*{font-size:10pt} table,th,td {border: 1px solid black;border-collapse: collapse;} td,th {height: 24px;padding-left: 4px;}</style>`;
+  const prntContent =
+      page === 1
+          ? document.getElementById("headpage").innerHTML
+          : document.getElementById("tailpage").innerHTML;
+  let pagePrint = prntStyle + "<body>" + prntContent + "</body>";
+  LODOP.PRINT_INIT("casefrontsheet");
+  LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", "");
+  LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
+  LODOP.ADD_PRINT_HTM("2mm", "5mm", "100%", "100%", pagePrint);
+  LODOP.SET_PRINT_STYLE("ItemType", 3);
+  LODOP.PREVIEW();
+};
+
+
+onMounted(() => {
+  scrollWrapper.value = document.getElementById("scrollWrapper");
+  initLodop();
+  getAllDictionary().then(res => {
+    res.getOperations = operations;
+    res.getYesOrNo = yesOrNo;
+    res.getHaveOrNot = haveOrNot;
+    res.getAutopsies = autopsies;
+    dics.value = res;
+  });
+  getUserWards().then(res => {
+    userWards.value = res;
+    if (res.length > 0) {
+      currentWard.value = res[0].code;
+      fetchOverview();
+    }
+  });
+});
+
+function initInOutOptions() {
+  return [
+    {code: 1, name: "在院"},
+    {code: 2, name: "出院"},
+  ];
+}
+
+function initCyzgs() {
+  return [
+    {code: 0, name: "好转/治愈"},
+    {code: 1, name: "未愈"},
+    {code: 2, name: "转院(医院要求)"},
+    {code: 3, name: "转院(病人要求)"},
+    {code: 4, name: "转科"},
+    {code: 5, name: "无效"},
+    {code: 6, name: "死亡"},
+    {code: 7, name: "双向转诊"},
+    {code: 9, name: "其他"},
+  ];
+}
+
+function initAdmissConds() {
+  return [
+    {code: 1, name: "有"},
+    {code: 2, name: "临床未确定"},
+    {code: 3, name: "情况不明"},
+    {code: 4, name: "无"},
+  ];
+}
+
+function initDiagTypes() {
+  return [
+    {code: 1, name: "西医诊断"},
+    {code: 2, name: "中医主病诊断"},
+    {code: 3, name: "中医主症诊断"},
+  ];
+}
+</script>
+
+<style scoped>
+:deep(.el-dialog__body) {
+  padding-top: 8px;
+}
+
+:deep(.el-drawer) {
+  border: 1px solid orange;
+}
+
+:deep(.el-drawer .el-icon) {
+  font-size: 20px;
+  color: orangered;
+}
+
+:deep(.el-drawer__header) {
+  margin-bottom: 8px;
+}
+
+:deep(.el-dialog__header) {
+  padding-bottom: 4px;
+}
+
+:deep(.el-checkbox__label) {
+  padding-left: 2px;
+}
+
+select,
+input:not([type="checkbox"]){
+  outline: none;
+  border: none;
+  border-radius: 0;
+  background: transparent;
+  border-bottom: 1px solid #333333;
+  -webkit-appearance: none;
+  -moz-appearance: none;
+  appearance: none;
+}
+
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+
+select ::-ms-expand {
+  display: none;
+}
+
+textarea {
+  outline: none;
+  border: none;
+  background-color: transparent;
+}
+
+table th {
+  border: 1px solid black;
+  text-align: center;
+}
+
+table td {
+  border: 1px solid black;
+}
+
+.page-inner {
+  padding: 0 20px 10px 26px;
+  border-radius: 12px;
+  text-align: justify;
+}
+
+.message-item {
+  padding: 6px;
+  margin-bottom: 6px;
+  border-radius: 4px;
+}
+
+.message-item:hover {
+  cursor: pointer;
+}
+
+.rightside-btn {
+  display: flex;
+  align-items: center;
+  text-align: center;
+  color: white;
+  border-radius: 4px;
+  width: 20px;
+  height: 185px;
+  position: fixed;
+  background: rgb(238, 98, 5);
+  top: 260px;
+  right: 10px;
+  cursor: pointer;
+}
+
+.no-verify-message {
+  width: 100%;
+  text-align: center;
+  margin-top: 50px;
+  font-size: 18px;
+  color: gray;
+}
+
+:deep(.m-drawer .el-overlay) {
+  right: 0;
+  left: calc(100vw - 260px);
+  background: transparent !important;
+}
+
+:deep(#livePlace .el-input__wrapper) {
+  background: transparent;
+  border: none;
+  box-shadow: none;
+  border-radius: 0;
+  border-bottom: 1px solid black;
+  color: black;
+}
+
+:deep(#livePlace .el-input__inner) {
+  color: black;
+}
+
+.order-arrow {
+  font-size: 16px;
+  cursor: pointer;
+}
+
+.order-arrow:hover {
+  color: #0a84fd;
+}
+</style>

+ 33 - 15
src/views/hospitalization/zfsf/CashierProcessInfo.vue

@@ -1,6 +1,14 @@
 <template>
   <div class="layout_container">
     <header>
+      <div style="height:25px;margin-bottom: 5px">
+        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+        <el-button :disabled="saveFlag"  icon="Check" type="primary" @click="saveCashData">保存</el-button>
+        <el-button :disabled="qxFlag"   icon="Minus" type="danger"  @click="cancelCash">取消出纳</el-button>
+        <el-button  type="primary"   icon="RefreshLeft"  @click="chongZhiData" >清空</el-button>
+        <el-button  type="warning"    icon="Money"  @click="openPos" >智能POS工具包</el-button>
+        <PrintSelect @getPrintCode="selectPrintCode"></PrintSelect>
+      </div>
       <PatientBaseList ref="patientBaseListRef" :inOutFlag="1" @selectPatientInfo="selectPatient"></PatientBaseList>
     </header>
     <div class="layout_main">
@@ -41,12 +49,6 @@
               </el-col>
             </el-row>
           </el-form>
-            <div style="height:25px">
-              <el-button :disabled="saveFlag" icon="Check" type="success" @click="saveCashData">保存</el-button>
-              <el-button :disabled="qxFlag"  icon="Minus" type="danger"  @click="cancelCash">取消出纳</el-button>
-              <el-button  type="primary" icon="RefreshLeft"  @click="chongZhiData" >清空</el-button>
-              <el-button  type="primary" icon="Money"  @click="openPos" >智能POS工具包</el-button>
-            </div>
           </div>
         </el-header>
         <el-container>
@@ -68,7 +70,12 @@
                           <el-button v-if="scope.row.settType ==='交纳' && (scope.row.depoType==='3' || scope.row.depoType==='O') "  type="primary" @click="shuaKa(scope.row,scope.$index)">刷卡/扫码</el-button>
                         </template>
                       </el-table-column>
-                      <el-table-column  property="settType" width="50" />
+                      <el-table-column  property="settType" width="50" >
+                        <template #default="scope">
+                          <span v-if="scope.row.settType ==='退款'" style="color: blue;font-size: 15px">{{scope.row.settType}}</span>
+                          <span v-if="scope.row.settType !=='退款'" style="color: red;font-size: 15px">{{scope.row.settType}}</span>
+                        </template>
+                      </el-table-column>
                       <el-table-column  property="depoType" label="类型" >
                         <template #default="scope">
                           <el-select v-model="scope.row.depoType" style="width: 100px">
@@ -96,10 +103,10 @@
                     <div v-if="jkInfoList.length > 0" style="width: 200px;margin-left: 100px" class="layout_overflow_auto">
                       <el-descriptions size="large" :column="1" border  >
                         <el-descriptions-item label="交纳:">
-                          <span class="f-size" style="color: blue" >{{jkHj.jnZj}} </span>
+                          <span class="f-size" style="color: red" >{{jkHj.jnZj}} </span>
                         </el-descriptions-item>
                         <el-descriptions-item label="退款:">
-                          <span class="f-size" style="color: red">{{jkHj.tkZj}}  </span>
+                          <span class="f-size" style="color: blue">{{jkHj.tkZj}}  </span>
                         </el-descriptions-item>
                         <el-descriptions-item label="总计:">
                           <span class="f-size">{{jkHj.zj}} </span>
@@ -125,16 +132,17 @@
                 </div>
                 <div class="border_solid layout_overflow_auto" style="float: right;width: 49%;height: 100%">
                   <el-table :data="zyFpInfoList" style="width: 100%"  height="180">
-                    <el-table-column   label="操作" width="200"  >
+                    <el-table-column   label="操作" width="240"  >
                       <template #default="scope">
                         <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='0'" icon="Printer" type="success" @click="selectPrintZyFp(scope.row)">打印</el-button>
                         <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Upload" title="上传电子发票" type="primary" @click="uploadZyFp(scope.row,3)"></el-button>
                         <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Download" title="下载电子发票" type="primary" @click="openDzfp(scope.row,3)"></el-button>
+                        &nbsp;&nbsp;
                         <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Delete" title="作废电子发票" type="danger" @click="uploadZyFp(scope.row,4)"></el-button>
                         <el-button v-if="scope.row.inpatientNo !=null && fpVersion==='1'" icon="Download" title="下载已作废电子发票" type="danger" @click="downDzFp(scope.row,4,'0')"></el-button>
                       </template>
                     </el-table-column>
-                    <el-table-column  property="ledgerSn" label="账页" />
+                    <el-table-column  property="ledgerSn" label="账页"  />
                     <el-table-column v-if="fpVersion === '0'"  property="receiptNo" label="发票号" />
                     <el-table-column  property="responceUnitName" label="类型" />
                     <el-table-column  property="totalCharge" label="发票金额" />
@@ -439,6 +447,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import {getDateDiffToDay, getFormatDatetime} from "@/utils/date";
 import router from "@/router";
 import {queryHospitalName} from "@/api/zy-gl/zy-daily.js";
+import PrintSelect from "@/components/zfsf/PrintSelect.vue";
 
 const hospitalName = ref('')
 const zyFpPrintVisible = ref(false)
@@ -453,6 +462,10 @@ const patientInfo = ref({
   wardName : ''
 }
 )
+const printCode = ref(null)
+const selectPrintCode = (val)=>{
+  printCode.value = val
+}
 const dzfpVisible = ref(false)
 const setShowFlag = ref(false)
 const patientBaseListRef = ref(null)
@@ -1034,17 +1047,17 @@ const downDzFp = (row,typeFlag,type)=>{
       let  bkimgWidth = "80mm"
       LODOP.PRINT_INITA(6, 0, bkimgWidth, height, "泰和住院电子发票二维码打印");
       //设置默认打印机
-      LODOP.SET_PRINTER_INDEX(-1);
+      LODOP.SET_PRINTER_INDEX(printCode.value);
       LODOP.SET_SHOW_MODE("BKIMG_WIDTH", bkimgWidth);
       LODOP.SET_PRINT_PAGESIZE(3,bkimgWidth, height, "CreateCustomPage");
       LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "住院电子发票二维码");//对新建的纸张重命名
       LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
-      LODOP.ADD_PRINT_TEXT("1mm", "6mm", "80mm", "3mm", hospitalName+"住院电子发票凭证");
+      LODOP.ADD_PRINT_TEXT("1mm", "6mm", "80mm", "3mm", hospitalName.value+"住院电子发票凭证");
       LODOP.ADD_PRINT_TEXT("7mm", "3mm", "35mm", "3mm", "姓名:"+printZyFpInfo.value.name);
       LODOP.ADD_PRINT_TEXT("7mm", "37mm", "40mm", "3mm", "住院号:"+printZyFpInfo.value.inpatientNo);
       LODOP.ADD_PRINT_TEXT("13mm", "3mm", "75mm", "3mm", "科别:"+printZyFpInfo.value.wardName);
       LODOP.ADD_PRINT_TEXT("19mm", "3mm", "75mm", "3mm", "住院总费用:"+printZyFpInfo.value.totalCharge);
-      LODOP.ADD_PRINT_TEXT("25mm", "3mm", "80mm", "3mm", hospitalName+"住院发票二维码");
+      LODOP.ADD_PRINT_TEXT("25mm", "3mm", "80mm", "3mm", hospitalName.value+"住院发票二维码");
       LODOP.ADD_PRINT_IMAGE("31mm", "3mm", "60mm", "60mm", "data:image/png;base64,"+res.qrcode);
       LODOP.PRINT();
     }
@@ -1119,5 +1132,10 @@ const getZySettType= (row)=>{
 #zyFpId p {
   line-height: 10px;
 }
-
+.red-color{
+  color: red !important;
+}
+.blue-color{
+  color: blue !important;
+}
 </style>

+ 0 - 91
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/OrderTemplateMaintain.vue

@@ -1,91 +0,0 @@
-<template>
-  <page-layer>
-    <template #header>
-      <xc-combo-grid
-          style="width: 240px"
-          ref="searchRef"
-          :table-header="tableHeader"
-          :query-data-func="searchOrders"
-          @rowClick="orderFunc.add">
-      </xc-combo-grid>
-      <el-select v-model="groupNo" style="width: 90px">
-        <el-option value="73" label="住院"/>
-        <el-option value="71" label="门诊"/>
-      </el-select>
-    </template>
-    <template #main>
-      <xc-table :local-data="orderData" :height="200">
-        <el-table-column label="操作" fixed='left'>
-          <template #default="{row,$index}">
-            <el-button @click="orderFunc.delete($index)" type="danger" icon="Delete"/>
-          </template>
-        </el-table-column>
-
-        <el-table-column label="编码" prop="orderCode">
-        </el-table-column>
-
-      </xc-table>
-    </template>
-  </page-layer>
-
-</template>
-
-<script setup name='OrderTemplateMaintain'>
-import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
-import {
-  tableHeader
-} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-import {huoQuXiangMu} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
-import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid.vue";
-import PageLayer from "@/layout/PageLayer.vue";
-
-const orderData = ref([])
-const groupNo = ref('73')
-
-const orderFunc = ref({
-  add: (val) => {
-    orderData.value.push(val)
-  },
-  delete: (index) => {
-    orderData.value.splice(index, 1)
-  }
-})
-
-const searchOrders = (val) => {
-  return huoQuXiangMu(val, groupNo.value)
-}
-
-const order = {
-  actOrderNo: null,
-  orderCode: '',
-  frequCode: '',
-  drugFlag: '',
-  supplyCode: '',
-  drugQuan: '',
-  instruction: '',
-  drugSpecification: '',
-  miniUnit: '',
-  drugWeight: '',
-  drugWeightUnit: '',
-  parentNo: '',
-  drugVolume: '',
-  drugVolUnit: '',
-  dose: 0,
-  doseUnit: '',
-  drugOcc: '',
-  excluActOrderNo: '',
-  orderName: '',
-  discription: '',
-  patternCode: '',
-  orderType: '',
-  serial: '',
-  groupNo: '',
-  selfBuy: '',
-  execUnit: ''
-}
-
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 5
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -113,11 +113,6 @@ const confirmOrdersClick = async () => {
     });
   }
 
-  if (isDev) {
-    await confirmOrder();
-    return;
-  }
-
   // 如果没有问题就可以直接确认医嘱了。
   let temp = await reasonableRef.value!.check(
     huanZheXinXi.value.inpatientNo,

+ 22 - 58
src/views/hospitalization/zy-gl/AdvancePaymentDeal.vue

@@ -5,6 +5,7 @@
       <el-button  type="primary" icon="Delete"  @click="clearData" >清空</el-button>
       <el-button  type="success" icon="Plus"  @click="openSjh" >设置收据号</el-button>
       <el-button  type="danger" icon="Money"  @click="openPos" >智能POS工具包</el-button>
+      <PrintSelect @getPrintCode="selectPrintCode"></PrintSelect>
     </header>
     <div class="layout_main">
       <div class="demo-collapse">
@@ -224,7 +225,7 @@
         <div style="text-align:center;font-weight: 700;padding-top: -8mm">{{hospitalName}}</div>
         <div style="text-align:center;font-weight: 700;margin-top: 5px;">预交金收据</div>
         <div>
-          <span>收据日期:</span><span style="margin-left: 7mm;" id="printDate">{{getFormatDatetime(new Date(),'YYYY-MM-DD')}}</span>
+          <span>收据日期:</span><span style="margin-left: 7mm;" id="printDate">{{getFormatDatetime(new Date,'YYYY年MM月DD日')}}</span>
           <span style="margin-left: 54mm;">收据号:</span><span style="margin-left: 4mm;">{{printData.receiptNo}}</span><span
             style="margin-left: 2mm;">{{printData.cdFlag}}</span>
         </div>
@@ -294,6 +295,7 @@ import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils.js";
 import {consume} from "@/api/zfsf/pos-transaction.js";
 import {getFormatDatetime} from "../../../utils/date.js";
 import {saveYjjSjh,queryYjjSjh} from '@/api/zfsf/sfbillno'
+import PrintSelect from "@/components/zfsf/PrintSelect.vue"
 const sjhVisible = ref(false)
 const currentNo = ref(null)
 const openSjh = ()=>{
@@ -331,6 +333,7 @@ onActivated(async ()=>{
   const params = router.currentRoute.value.query;
   if(params && params.patNo){
     await sleep(300);
+    formData.value.inpatientNo =params.patNo
     queryPatientList(params.patNo)
   }
 })
@@ -458,71 +461,32 @@ const printReal =(inpatientNo,receiptNo,flag)=>{
     printData.value.receiptNo = res.receiptNo
     printData.value.depoDate = getFormatDatetime(res.depoDate,'YYYY年MM月DD日')
     if(flag){
-      printData.value.cdFlag = '(重打)'
-    }else {
-      printData.value.cdFlag = ''
+      printData.value.cdFlag = '重打'
     }
     setTimeout(printSjNew,1000)
   })
 }
-
+const printCode = ref(null)
+const selectPrintCode = (val)=>{
+  printCode.value = val
+}
 function printSjNew(){
   let LODOP = getLodop();
   //设置默认打印机
-  LODOP.SET_PRINTER_INDEX(-1);
+  if(stringIsBlank(printCode.value)){
+    ElMessage.error('请选择打印机')
+    return
+  }
+  LODOP.SET_PRINTER_INDEX(printCode.value);
   LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
-  LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "80mm");
-  LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "108mm");
-  LODOP.SET_PRINT_PAGESIZE(1, "80mm", "108mm", "CreateCustomPage");
+  LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "192mm");
+  LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "97mm");
+  LODOP.SET_PRINT_PAGESIZE(1, "192mm", "97mm", "CreateCustomPage");
   LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "住院预交金");//对新建的纸张重命名
-  LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
-  LODOP.ADD_PRINT_TEXT("1mm", "6mm", "75mm", "3mm", hospitalName.value+"预交金缴费凭证"+printData.value.cdFlag);
-  LODOP.ADD_PRINT_TEXT("6mm", "2mm", "30mm", "3mm", "姓名:"+printData.value.name);
-  LODOP.ADD_PRINT_TEXT("6mm", "32mm", "40mm", "3mm", "住院号:"+printData.value.inpatientNo);
-  LODOP.ADD_PRINT_TEXT("11mm", "2mm", "75mm", "3mm", "住院科室:"+printData.value.admissDeptName);
-  LODOP.ADD_PRINT_TEXT("16mm", "2mm", "75mm", "3mm", "收据号:"+printData.value.receiptNo);
-  LODOP.ADD_PRINT_TEXT("21mm", "2mm", "75mm", "3mm", "支付方式:"+printData.value.depoTypeName);
-  LODOP.ADD_PRINT_TEXT("27mm", "2mm", "80mm", "3mm", "-------------------------------------");
-  LODOP.ADD_PRINT_TEXT("32mm", "2mm", "35mm", "3mm", "金额:"+printData.value.depoAmount);
-  LODOP.ADD_PRINT_TEXT("32mm", "37mm", "45mm", "3mm", "大写金额:"+printData.value.depoAmountDx);
-  LODOP.ADD_PRINT_TEXT("38mm", "2mm", "75mm", "3mm", "收费员:"+printData.value.opIdCodeName);
-  LODOP.ADD_PRINT_TEXT("44mm", "2mm", "80mm", "3mm", "收费日期:"+printData.value.depoDate);
-  LODOP.ADD_PRINT_TEXT("50mm", "2mm", "80mm", "3mm", "-------------------------------------");
-  LODOP.ADD_PRINT_TEXT("56mm", "2mm", "80mm", "3mm", "1、此系临时收据,请妥善保管。出院时凭此");
-  LODOP.ADD_PRINT_TEXT("62mm", "2mm", "80mm", "3mm", "收据按实用医疗费用换取住院发票。");
-  LODOP.ADD_PRINT_TEXT("68mm", "2mm", "80mm", "3mm", "2、此收据遗失,请及时携带病人身份证和挂");
-  LODOP.ADD_PRINT_TEXT("72mm", "2mm", "80mm", "3mm", "失人身份证到出院结算处办理挂失手续。");
-  LODOP.ADD_PRINT_TEXT("78mm", "2mm", "80mm", "3mm", "如存在第三方肇事者预缴医疗费用,挂失时");
-  LODOP.ADD_PRINT_TEXT("84mm", "2mm", "80mm", "3mm", "另需公安机关出示证明。");
-  LODOP.ADD_PRINT_TEXT("90mm", "2mm", "80mm", "3mm", "3、如果您的缴费方式为银行卡支付,请您妥");
-  LODOP.ADD_PRINT_TEXT("96mm", "2mm", "80mm", "3mm", "善保管好缴费的刷卡单,并于办理出院退费");
-  LODOP.ADD_PRINT_TEXT("102mm", "2mm", "80mm", "3mm", "时带上缴费时所用银行卡。");
-  if(printData.value.cdFlag ===''){
-    LODOP.NewPageA();
-    LODOP.ADD_PRINT_TEXT("1mm", "6mm", "75mm", "3mm", hospitalName.value+"预交金缴费凭证"+printData.value.cdFlag);
-    LODOP.ADD_PRINT_TEXT("6mm", "2mm", "30mm", "3mm", "姓名:"+printData.value.name);
-    LODOP.ADD_PRINT_TEXT("6mm", "32mm", "40mm", "3mm", "住院号:"+printData.value.inpatientNo);
-    LODOP.ADD_PRINT_TEXT("11mm", "2mm", "75mm", "3mm", "住院科室:"+printData.value.admissDeptName);
-    LODOP.ADD_PRINT_TEXT("16mm", "2mm", "75mm", "3mm", "收据号:"+printData.value.receiptNo);
-    LODOP.ADD_PRINT_TEXT("21mm", "2mm", "75mm", "3mm", "支付方式:"+printData.value.depoTypeName);
-    LODOP.ADD_PRINT_TEXT("27mm", "2mm", "80mm", "3mm", "-------------------------------------");
-    LODOP.ADD_PRINT_TEXT("32mm", "2mm", "35mm", "3mm", "金额:"+printData.value.depoAmount);
-    LODOP.ADD_PRINT_TEXT("32mm", "37mm", "45mm", "3mm", "大写金额:"+printData.value.depoAmountDx);
-    LODOP.ADD_PRINT_TEXT("38mm", "2mm", "75mm", "3mm", "收费员:"+printData.value.opIdCodeName);
-    LODOP.ADD_PRINT_TEXT("44mm", "2mm", "80mm", "3mm", "收费日期:"+printData.value.depoDate);
-    LODOP.ADD_PRINT_TEXT("50mm", "2mm", "80mm", "3mm", "-------------------------------------");
-    LODOP.ADD_PRINT_TEXT("56mm", "2mm", "80mm", "3mm", "1、此系临时收据,请妥善保管。出院时凭此");
-    LODOP.ADD_PRINT_TEXT("62mm", "2mm", "80mm", "3mm", "收据按实用医疗费用换取住院发票。");
-    LODOP.ADD_PRINT_TEXT("68mm", "2mm", "80mm", "3mm", "2、此收据遗失,请及时携带病人身份证和挂");
-    LODOP.ADD_PRINT_TEXT("72mm", "2mm", "80mm", "3mm", "失人身份证到出院结算处办理挂失手续。");
-    LODOP.ADD_PRINT_TEXT("78mm", "2mm", "80mm", "3mm", "如存在第三方肇事者预缴医疗费用,挂失时");
-    LODOP.ADD_PRINT_TEXT("84mm", "2mm", "80mm", "3mm", "另需公安机关出示证明。");
-    LODOP.ADD_PRINT_TEXT("90mm", "2mm", "80mm", "3mm", "3、如果您的缴费方式为银行卡支付,请您妥");
-    LODOP.ADD_PRINT_TEXT("96mm", "2mm", "80mm", "3mm", "善保管好缴费的刷卡单,并于办理出院退费");
-    LODOP.ADD_PRINT_TEXT("102mm", "2mm", "80mm", "3mm", "时带上缴费时所用银行卡。");
-  }
-  LODOP.PREVIEW();
-  // LODOP.PRINT();;
+  let strStyle = "<style>table{width: 170mm;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse;padding: 8px;}</style>"
+  LODOP.ADD_PRINT_HTM("0mm", "8mm", "120mm", "280mm", strStyle + document.getElementById("report_table_1").innerHTML);
+  LODOP.PRINT();
+  // LODOP.PREVIEW();
   clearPrintData()
 }
 
@@ -571,7 +535,7 @@ const openShouFee = ()=>{
     ElMessage.error('请先查询出要缴费的病人信息')
     return
   }
-  queryLastMzZyReq(formData.value.patientId).then(res=>{
+  queryLastMzZyReq({inpatientNo:formData.value.patientId}).then(res=>{
     if(res.deposit != null && res.deposit > 0){
       shouFeeForm.value.depoAmount = res.deposit
     }

+ 7 - 3
src/views/hospitalization/zy-gl/ZyDaily.vue

@@ -43,6 +43,7 @@
           <el-button type="danger" icon="Delete" @click="clearAllData">清空</el-button>
           <el-button type="success" icon="Printer" @click="printData(false)">打印</el-button>
           <el-button v-if="queryParam.type==='1'" type="success" icon="Check" @click="dcountCharge">结账处理</el-button>
+          <PrintSelect @getPrintCode="selectPrintCode"></PrintSelect>
         </el-col>
       </el-row>
     </header>
@@ -447,6 +448,7 @@ import {getLodop,initLodop} from "@/utils/c-lodop.js";
 import { getFormatDatetime } from "@/utils/date"
 import {shortcuts} from "@/data/shortcuts.js";
 import {ElMessage} from "element-plus";
+import PrintSelect from "@/components/zfsf/PrintSelect.vue";
 const printNum = ref(1)
 const hosName = ref('')
 const dateRange = ref([])
@@ -536,7 +538,7 @@ const printData = (clearFlag)=>{
     LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "住院收费收入日报表");
     LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
     //设置默认打印机
-    LODOP.SET_PRINTER_INDEX(-1);
+    LODOP.SET_PRINTER_INDEX(printCode.value);
     LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
     LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
     var strStyle = "<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>";
@@ -548,8 +550,10 @@ const printData = (clearFlag)=>{
     //LODOP.PRINT();
   }
 }
-
-
+const printCode = ref(null)
+const selectPrintCode = (val)=>{
+  printCode.value = val
+}
 const activeName = ref('one')
 const style = ref({
   width: '920px',

+ 58 - 2
src/views/yp-inventory/YpPlanDetails.vue

@@ -10,16 +10,23 @@
       <el-input v-model="content" class="w-50 m-2" style="width: 300px; margin-left: 5px">
         <template #prepend>审核意见 </template>
       </el-input>
+      <el-input v-model="supplyName" class="w-50 m-2" style="width: 300px; margin-left: 5px" clearable @change="queryYpPlanDetailsByGys">
+        <template #prepend>供应商 </template>
+      </el-input>
       <el-button type="primary" icon="Check" @click="saveYpPlanData" style="margin-left: 5px">审核</el-button>
     </div>
     <div class="layout_container">
       <div class="layout_main layout_el-table">
-        <el-table :data="showed_data" @sort-change="sort_charge" border stripe highlight-current-row>
+        <el-table :data="showed_data" @sort-change="sort_charge" border stripe highlight-current-row
+                  show-summary :summary-method="getSummaries">
           <el-table-column type="index" label="序号" width="60" fixed/>
           <el-table-column prop="remark" label="备注" width="100" fixed/>
           <el-table-column prop="supplyName" label="药品供应商" width="200" show-overflow-tooltip fixed/>
+          <el-table-column prop="chargeCode" label="药品编码" width="80" show-overflow-tooltip fixed/>
           <el-table-column prop="drugName" label="药品名称" width="200" show-overflow-tooltip fixed/>
           <el-table-column prop="specification" label="规格" width="150" show-overflow-tooltip/>
+          <el-table-column prop="drugKind" label="药品类别" width="100"/>
+          <el-table-column prop="isWinning" label="是否中标" width="100"/>
           <el-table-column prop="packRetprice1" label="零售价" width="100"/>
           <el-table-column prop="buyPrice1" label="购入价" width="100"/>
           <el-table-column prop="buyAmount" label="采购计划" width="100">
@@ -30,6 +37,8 @@
           <el-table-column prop="buyMoney" label="购入金额" width="100" sortable/>
           <el-table-column prop="unit" label="单位" width="60" />
           <el-table-column prop="amount" label="库存量" width="100" />
+          <el-table-column prop="planTotal" label="当月累计已审批计划量" width="100" />
+          <el-table-column prop="realTotal" label="当月累计实际入库量" width="100" />
           <el-table-column prop="manuName" label="制药厂" width="150" show-overflow-tooltip/>
           <el-table-column prop="amount3" label="3天用量" width="100" />
           <el-table-column prop="amount7" label="7天用量" width="100" />
@@ -52,7 +61,7 @@
 </template>
 <script setup name="YpPlanDetails">
 import { ref, onMounted, nextTick, watch } from 'vue'
-import {updateYpPlanAuditData, saveYpPlanDetail} from "@/api/yp-inventory/yp-plan-info.js";
+import {updateYpPlanAuditData, saveYpPlanDetail, selectYpPlanDetail} from "@/api/yp-inventory/yp-plan-info.js";
 import {ElMessage, ElMessageBox} from "element-plus";
 
 const props = defineProps({
@@ -73,6 +82,7 @@ const ypPlanDetailData = ref([])
 const totalFee = ref(0)
 const totalFeeUpdate = ref(0)
 const content = ref('')
+const supplyName = ref('')
 const form = ref({})
 const emit = defineEmits(['close', 'closeYpPlanDetails'])
 const showed_data = ref([])
@@ -196,4 +206,50 @@ const updateYpPlanAudit = () => {
         });
       })
 }
+
+const queryYpPlanDetailsByGys = () => {
+  const dataParam = ref({
+    fileId: props.ypPlanDetails[0].fileId,
+    supplyName: supplyName.value
+  })
+  selectYpPlanDetail(dataParam.value).then((res) => {
+    ypPlanDetailData.value = res
+    showed_data.value = ypPlanDetailData.value.slice((currentPageMx.value - 1) * pageSizeMx.value, currentPageMx.value * pageSizeMx.value)
+  })
+}
+
+const getSummaries = (param) => {
+  const { columns, data } = param
+  const sums = []
+
+  columns.forEach((column, index) => {
+    if (index === 0) {
+      sums[index] = h('div', { style: { textDecoration: 'underline' } }, [
+        '小计',
+      ])
+      return
+    }
+    if(column.property !== 'buyMoney'){
+      return;
+    }
+    const values = data.map((item) => Number(item[column.property]))
+    if (!values.every((value) => Number.isNaN(value))) {
+      sums[index] = values.reduce((prev, curr) => {
+        const value = Number(curr)
+        if (!Number.isNaN(value)) {
+          return prev + curr
+        } else {
+          return prev
+        }
+      }, 0)
+      sums[1] = sums[index].toFixed(2)
+      sums[index] = ''
+    } else {
+      sums[1] = 0
+      sums[index] = ''
+    }
+  })
+
+  return sums
+}
 </script>

+ 6 - 2
src/views/yp-inventory/YpPlanInfo.vue

@@ -169,8 +169,12 @@ const header = {
 const fileSizeOutLimit = () => {
   ElMessage.error("已经选取excel,如须更换请先移除已选取的excel!");
 };
-const uploadSuccess = () => {
-  ElMessage.success("上传成功!");
+const uploadSuccess = (response, file, fileList) => {
+  if(!response.success){
+    ElMessage.error(response.message)
+  } else {
+    ElMessage.success("上传成功!");
+  }
 };
 const uploadError = () => {
   ElMessage.error("上传失败!");