Parcourir la source

优化代码以及添加手术部位的维护

DESKTOP-MINPJAU\Administrator il y a 3 ans
Parent
commit
3d89b13da2

+ 98 - 88
src/api/yibao/xiang-mu-lu-ru.js

@@ -1,143 +1,153 @@
 import request from '../../utils/request'
 
 export function getHuanZheFeiYong(data) {
-  return request({
-    url: '/xmlr/getHuanZheFeiYong',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/xmlr/getHuanZheFeiYong',
+        method: 'post',
+        data,
+    })
 }
 
 export function getChargeCode(pyCode) {
-  return request({
-    url: '/xmlr/getChargeCode',
-    method: 'get',
-    params: { pyCode },
-  })
+    return request({
+        url: '/xmlr/getChargeCode',
+        method: 'get',
+        params: {pyCode},
+    })
 }
 
 export function xiangMuTuiFei(data) {
-  return request({
-    url: '/xmlr/xiangMuTuiFei',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/xmlr/xiangMuTuiFei',
+        method: 'post',
+        data,
+    })
 }
 
 export function getMuBan(deptCode, currentPage, pageSize, total) {
-  return request({
-    url: '/xmlr/getMuBan',
-    method: 'get',
-    params: { deptCode, currentPage, pageSize, total },
-  })
+    return request({
+        url: '/xmlr/getMuBan',
+        method: 'get',
+        params: {deptCode, currentPage, pageSize, total},
+    })
 }
 
 export function getMuBanXinXi(patternName, opIdCode) {
-  return request({
-    url: '/xmlr/getMuBanXinXi',
-    method: 'get',
-    params: { patternName, opIdCode },
-  })
+    return request({
+        url: '/xmlr/getMuBanXinXi',
+        method: 'get',
+        params: {patternName, opIdCode},
+    })
 }
 
 export function queryDanGeXiangMu(pyCode, xiangMuHuoYaoPinFlag) {
-  return request({
-    url: '/xmlr/queryXiangMu',
-    method: 'get',
-    params: { pyCode, xiangMuHuoYaoPinFlag },
-  })
+    return request({
+        url: '/xmlr/queryXiangMu',
+        method: 'get',
+        params: {pyCode, xiangMuHuoYaoPinFlag},
+    })
 }
 
 export function xiangMuFeiYongShangChuan(data) {
-  return request({
-    url: '/xmlr/xiangMuFeiYongShangChuan',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/xmlr/xiangMuFeiYongShangChuan',
+        method: 'post',
+        data,
+    })
 }
 
 export function shangChuanMuBan(data) {
-  return request({
-    url: '/xmlr/shangChuanMuBan',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/xmlr/shangChuanMuBan',
+        method: 'post',
+        data,
+    })
 }
 
 export function yiZhuTuiFeiPiPei(inpatientNo, admissTimes, deptCode) {
-  return request({
-    url: '/xmlr/yiZhuTuiFeiPiPei',
-    method: 'get',
-    params: { inpatientNo, admissTimes, deptCode },
-  })
+    return request({
+        url: '/xmlr/yiZhuTuiFeiPiPei',
+        method: 'get',
+        params: {inpatientNo, admissTimes, deptCode},
+    })
 }
 
 export function shanChuMuBan(patterName, opIdCode) {
-  return request({
-    url: '/xmlr/shanChuMuBan',
-    method: 'get',
-    params: { patterName, opIdCode },
-  })
+    return request({
+        url: '/xmlr/shanChuMuBan',
+        method: 'get',
+        params: {patterName, opIdCode},
+    })
 }
 
 export function getDept() {
-  return request({
-    url: '/xmlr/getDept',
-    method: 'get',
-  })
+    return request({
+        url: '/xmlr/getDept',
+        method: 'get',
+    })
 }
 
 export function getWard() {
-  return request({
-    url: '/xmlr/getWard',
-    method: 'get',
-  })
+    return request({
+        url: '/xmlr/getWard',
+        method: 'get',
+    })
 }
 
 export function getPyCode(inputStr) {
-  return request({
-    url: '/xmlr/getPyCode',
-    method: 'get',
-    params: { inputStr },
-  })
+    return request({
+        url: '/xmlr/getPyCode',
+        method: 'get',
+        params: {inputStr},
+    })
 }
 
 export function getBingQuDuiYingKeShi(ward) {
-  return request({
-    url: '/xmlr/getBingQuDuiYingKeShi',
-    method: 'get',
-    params: { ward },
-  })
+    return request({
+        url: '/xmlr/getBingQuDuiYingKeShi',
+        method: 'get',
+        params: {ward},
+    })
 }
 
 export function cheXiaoTuiFei(inpatientNo, admissTimes, ledger, detailSn) {
-  return request({
-    url: '/xmlr/cheXiaoTuiFei',
-    method: 'get',
-    params: { inpatientNo, admissTimes, ledger, detailSn },
-  })
+    return request({
+        url: '/xmlr/cheXiaoTuiFei',
+        method: 'get',
+        params: {inpatientNo, admissTimes, ledger, detailSn},
+    })
 }
 
 export function weiGuiFeiYongFenXi(inpatientNo, execUnit) {
-  return request({
-    url: '/xmlr/weiGuiFeiYongFenXi',
-    method: 'get',
-    params: { inpatientNo, execUnit },
-  })
+    return request({
+        url: '/xmlr/weiGuiFeiYongFenXi',
+        method: 'get',
+        params: {inpatientNo, execUnit},
+    })
 }
 
 export function huoQuZhenShuKePiPei(inpatientNo, admissTimes, ledgerSn, chargeCodeMx, execUnit, orderNo, startTime, endTime, riQiPaiXu) {
-  return request({
-    url: '/xmlr/huoQuZhenShuKePiPei',
-    method: 'get',
-    params: { inpatientNo, admissTimes, ledgerSn, chargeCodeMx, execUnit, orderNo, startTime, endTime, riQiPaiXu },
-  })
+    return request({
+        url: '/xmlr/huoQuZhenShuKePiPei',
+        method: 'get',
+        params: {inpatientNo, admissTimes, ledgerSn, chargeCodeMx, execUnit, orderNo, startTime, endTime, riQiPaiXu},
+    })
 }
 
 export function caiFenPiPei(data) {
-  return request({
-    url: '/xmlr/caiFenPiPei',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: '/xmlr/caiFenPiPei',
+        method: 'post',
+        data,
+    })
 }
+
+export function xiuGaiZiFeiBiaoZhi(data) {
+    return request({
+        url: '/xmlr/xiuGaiZiFeiBiaoZhi',
+        method: 'post',
+        data,
+    })
+}
+
+

+ 19 - 0
src/api/zhu-yuan-yi-sheng/shou-shu-shen-qing.js

@@ -65,6 +65,25 @@ export function shanChuShouShu(recordId) {
     })
 }
 
+export function addASurgicalSite(name) {
+    return request({
+        url: url + 'addASurgicalSite',
+        method: 'get',
+        params: {name}
+    })
+}
+
+export function removeSurgicalSite(code) {
+    return request({
+        url: url + 'removeSurgicalSite',
+        method: 'get',
+        params: {code}
+    })
+}
+
+
+
+
 
 
 

+ 4 - 0
src/components/index.ts

@@ -0,0 +1,4 @@
+export {default as XcSelect} from '../components/xc/select/XcSelect.vue'
+export {default as XcOption} from '../components/xc/select/XcOption.vue'
+export {default as XcCode} from '../components/xc/code/XcCode.vue'
+export {default as InputAndTable} from '../components/input-table-query/InputAndTable.vue'

+ 26 - 1
src/components/inpatient/XiangMuLuRu.vue

@@ -60,6 +60,8 @@
                 <span>{{ item.name }}</span>
               </el-option>
             </el-select>
+            医嘱号:
+            <el-input v-model="patient.actOrderNo" clearable placeholder="医嘱号" style="width: 120px"/>
             录入日期:
             <el-date-picker
                 v-model="dateRange"
@@ -100,6 +102,9 @@
             </el-select>
             <el-button icon="el-icon-search" type="primary" @click="queryFeiYong">查询</el-button>
             <el-button icon="el-icon-delete-solid" type="danger" @click="xiangMuTuiFeiClick">退费</el-button>
+            <el-button v-if="store.state.user.info.roles.findIndex(i => i === 1 || i === 8) > -1" type="warning"
+                       @click="sheZhiWeiYiVBao">设为医保
+            </el-button>
             <el-table :data="cptTableDataHuanZheFeiYong" :height="tableHeight" class="eltable"
                       highlight-current-row stripe @selection-change="handleSelectionChange">
               <el-table-column style="width: 100px" type="selection"></el-table-column>
@@ -350,6 +355,7 @@ import {
   shangChuanMuBan,
   xiangMuFeiYongShangChuan,
   xiangMuTuiFei,
+  xiuGaiZiFeiBiaoZhi,
 } from '@/api/yibao/xiang-mu-lu-ru'
 import {ElMessage, ElMessageBox} from 'element-plus'
 import {getDateRangeFormatDate, getDatetime} from '@/utils/date'
@@ -357,8 +363,9 @@ import {clone} from '@/utils/clone'
 import {getPatientInfo} from '@/api/yibao/patient'
 import {feiYongLeiXing, tuiFeiLeiXin, yiZhuTuiFeiLeiXing} from '@/data/index'
 import HuoQuMuBan from '@/components/med-tec-mod/HuoQuMuBan.vue'
-import {baseinfo} from '@/data/inpatient'
 import {getDept} from '@/api/public-api'
+import {baseinfo} from "@/data/inpatient";
+import {listIsBlank} from "@/utils/blank-utils";
 
 const props = defineProps({
   init: {
@@ -536,6 +543,7 @@ const cptTableDataHuanZheFeiYong = ref([])
 /**
  *  项目退费
  */
+
 const xiangMuTuiFeiClick = () => {
   if (typeof patient.value.list !== 'undefined') {
     let chargeFee = 0
@@ -828,6 +836,23 @@ const xieGaiZhiXingKeShi = () => {
     muBanNeiRongData.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(() => {
+
+  })
+}
+
 </script>
 
 <style></style>

+ 98 - 68
src/components/input-table-query/InputAndTable.vue

@@ -1,52 +1,68 @@
 <template>
-  <el-input ref="tempElInput" v-model="inputData" :clearable="props.clearable" :style="{ width: inputWidth + 'px' }" @clear="inputClear" @focus="initData" @input="inputChange" />
-  <transition name="el-zoom-in-top">
-    <div v-show="inputTable" :style="{ width: props.tableWidth + 'px' }" class="input_box">
-      <div class="input_header">
-        <span>
-          <el-button circle icon="el-icon-close" plain type="danger" @click="inputClose"></el-button>
-        </span>
-        <small>
-          <xc-code code="Alt + ↑ / ↓" description="获取行" />
-          <xc-code code="Alt + ← / →" description="翻页" />
-          <xc-code code="Enter" description="确定" />
-        </small>
-        <span class="title">
+  <div class="input_main">
+    <el-input ref="tempElInput"
+              v-model="inputData"
+              :clearable="props.clearable"
+              :style="{width: inputWidth + 'px'}"
+              @clear="inputClear"
+              @focus="initData"
+              @input="inputChange"/>
+    <transition name="el-zoom-in-top">
+      <div v-show="inputTable" :style="{width: props.tableWidth + 'px'}" class="input_box">
+        <div class="input_header">
+      <span>
+        <el-button circle icon="el-icon-close" plain type="danger" @click="inputClose"></el-button>
+      </span>
+          <small>
+            <xc-code code="Alt + ↑ / ↓" description="获取行"/>
+            <xc-code code="Alt + ← / →" description="翻页"/>
+            <xc-code code="Enter" description="确定"/>
+          </small>
+          <span class="title">
           <strong>
             {{ props.title }}
           </strong>
-        </span>
+      </span>
+        </div>
+        <div class="input_table">
+          <el-table :data="props.data.data"
+                    :height="410"
+                    :row-class-name="tableRowClassName"
+                    @row-click="rowClick">
+            <el-table-column :width="30" type="index"/>
+            <template v-for="item in props.tableHeader">
+              <el-table-column :label="item.label" :prop="item.prop"
+                               :width="item.width" show-overflow-tooltip/>
+            </template>
+          </el-table>
+          <el-pagination
+              :current-page="props.data.currentPage"
+              :page-size="10"
+              :total="props.data.total"
+              layout="total,prev, pager, next"
+              @current-change="currentChange"/>
+        </div>
       </div>
-      <div class="input_table">
-        <el-table :data="props.data.data" :height="410" :row-class-name="tableRowClassName" @row-click="rowClick">
-          <el-table-column :width="30" type="index" />
-          <template v-for="item in props.tableHeader">
-            <el-table-column :label="item.label" :prop="item.prop" :width="item.width" show-overflow-tooltip />
-          </template>
-        </el-table>
-        <el-pagination :current-page="props.data.currentPage" :page-size="10" :total="props.data.total" layout="total,  prev, pager, next" @current-change="currentChange" />
-      </div>
-    </div>
-  </transition>
+    </transition>
+  </div>
 </template>
 
 <script name="InputAndTable" setup>
-import { stringNotBlank } from '@/utils/blank-utils'
-import { debounce } from '@/utils/debounce'
-import XcCode from '@/components/xc/code/XcCode.vue'
+import {stringNotBlank} from "@/utils/blank-utils";
+import {debounce} from "@/utils/debounce";
 
 const props = defineProps({
   modelValue: {
     type: String,
-    default: '',
+    default: ''
   },
   inputWidth: {
     type: Number,
-    default: 120,
+    default: 120
   },
   tableWidth: {
     type: Number,
-    default: 600,
+    default: 600
   },
   data: {
     type: Object,
@@ -54,39 +70,50 @@ const props = defineProps({
       data: [],
       currentPage: 1,
       total: 0,
-    },
+    }
   },
   tableHeader: {
     type: Array,
   },
   title: {
     type: String,
-    default: '数据搜索',
+    default: '数据搜索'
   },
   valueId: {
     type: String,
+    default: 'code'
   },
   clearable: {
     type: Boolean,
-    default: false,
-  },
+    default: false
+  }
 })
 
 const emit = defineEmits(['currentChange', 'rowClick', 'fetchData', 'update:modelValue'])
 
 let inputData = $ref('')
+let elPage = $ref(null)
 let tempElInput = $ref(null)
+let popover = $ref(false)
 let inputTable = $ref(false)
 
+
+const data = ref({
+  total: 0,
+  currentPage: 1,
+  pageSize: 10,
+  data: []
+})
 // 临时下标用来使用键盘选中的
 let tempIndex = $ref(-1)
 
-const inputChange = debounce((value) => {
+const inputChange = debounce(value => {
   if (value.length > 1) {
     emit('fetchData', value)
   }
 }, 400)
 
+
 const initData = () => {
   if (stringNotBlank(props.modelValue) && props.data.total === 0) {
     inputChange(props.modelValue)
@@ -110,7 +137,7 @@ const currentChange = (val) => {
   emit('currentChange', inputData, val)
 }
 
-const tableRowClassName = ({ row, rowIndex }) => {
+const tableRowClassName = ({row, rowIndex}) => {
   row.index = rowIndex
   if (props.modelValue === row[props.valueId]) {
     return 'input_and_table_row'
@@ -134,6 +161,7 @@ const inputClose = () => {
   document.onkeydown = null
 }
 
+
 const enter = () => {
   if (tempIndex < 0 || tempIndex > props.data.data.length) return
   rowClick(props.data.data[tempIndex])
@@ -177,7 +205,7 @@ const keyboardEvent = () => {
         event.returnValue = false
         upOrLower('lower')
       } else if (event.keyCode === 13) {
-        enter()
+        enter();
       } else if (event.key === 'Escape') {
         event.returnValue = false
         inputClose()
@@ -186,17 +214,14 @@ const keyboardEvent = () => {
   }
 }
 
-onUpdated(() => {
-  if (!inputTable) {
-    inputData = props.modelValue
-  }
+watch(() => props.modelValue, () => {
+  inputData = props.modelValue
 })
 
 onMounted(() => {
-  if (inputData !== props.modelValue) {
-    inputData = props.modelValue
-  }
+  inputData = props.modelValue
 })
+
 </script>
 
 <style>
@@ -205,37 +230,42 @@ onMounted(() => {
 }
 
 .el-table .input_and_table_to_be_selected {
-  background: #f8cc48a1;
+  background: #F8CC48A1;
 }
 </style>
 
 <style lang="scss" scoped>
-.input_box {
-  box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
-  border-radius: 5px;
-  display: flex;
-  position: absolute;
-  flex-direction: column;
-  z-index: 1000;
-  top: 28px;
-  background-color: white;
-
-  .input_header {
-    height: 40px;
+
+.input_main {
+  position: relative;
+  display: inline-block;
+
+  .input_box {
+    box-shadow: 0 0 12px rgba(0, 0, 0, .12);
     border-radius: 5px;
-    line-height: 40px;
     display: flex;
-    justify-content: space-between;
-    padding: 5px;
-    background-color: #f8f8f8;
+    position: absolute;
+    flex-direction: column;
+    z-index: 1000;
+    top: 28px;
+    background-color: white;
 
-    .title {
-      font-size: 20px;
-      text-align: center;
+    .input_header {
+      height: 40px;
+      border-radius: 5px;
+      line-height: 40px;
+      display: flex;
+      justify-content: space-between;
+      padding: 5px;
+      background-color: #f8f8f8;
+
+      .title {
+        font-size: 20px;
+        text-align: center;
+      }
     }
-  }
 
-  .input_table {
   }
 }
-</style>
+
+</style>

+ 0 - 1
src/components/si-sheet-upload/jie-suan-dan-xiu-gai/JieSuanDanXiuGaiShouShu.vue

@@ -64,7 +64,6 @@
 <script name="JieSuanDanXiuGaiShouShu" setup>
 import SelectStaffCode from "@/components/SelectStaffCode.vue";
 import {maZuiFangShis, qks,} from '../jieSuanDanXiuGai'
-import InputAndTable from "@/components/input-table-query/InputAndTable.vue";
 import {shouShuBianMa} from "@/api/medical-insurance/si-setl-upload";
 import {current} from "@/data/input-table-header";
 

+ 3 - 1
src/components/zhu-yuan-yi-sheng/TianJiaJianChaJianYan.vue

@@ -316,10 +316,12 @@ export default {
               faSongBaoCunMuBan()
             }).catch((e) => {
             })
+          } else {
+            faSongBaoCunMuBan()
           }
         })
       } catch (e) {
-
+        console.log(e)
       }
     }
 

+ 7 - 3
src/icons/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2473230 */
-  src: url('iconfont.woff2?t=1646009076607') format('woff2'),
-       url('iconfont.woff?t=1646009076607') format('woff'),
-       url('iconfont.ttf?t=1646009076607') format('truetype');
+  src: url('iconfont.woff2?t=1652941134239') format('woff2'),
+       url('iconfont.woff?t=1652941134239') format('woff'),
+       url('iconfont.ttf?t=1652941134239') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-shoushubuwei:before {
+  content: "\e7ba";
+}
+
 .icon-caoyaoyizhu:before {
   content: "\e621";
 }

BIN
src/icons/iconfont.ttf


BIN
src/icons/iconfont.woff


BIN
src/icons/iconfont.woff2


+ 2 - 4
src/layout/Menu/index.vue

@@ -15,7 +15,7 @@
 </template>
 
 <script>
-import {computed, defineComponent, onMounted} from 'vue'
+import {computed, defineComponent} from 'vue'
 import {useRoute} from 'vue-router'
 import {useStore} from 'vuex'
 import MenuItem from './MenuItem.vue'
@@ -37,9 +37,7 @@ export default defineComponent({
       }
       return path
     })
-    onMounted(() => {
-      console.log(activeMenu.value);
-    })
+
     return {
       isCollapse,
       expandOneMenu,

+ 7 - 0
src/main.js

@@ -8,6 +8,7 @@ import App from './App.vue'
 import store from './store'
 import router, {addRoutes} from './router'
 import vDrag from '@/directive/drag/index'
+import * as Component from '@/components/index.ts'
 
 addRoutes()
 
@@ -17,3 +18,9 @@ app.use(store)
 app.use(router)
 app.directive('drag', vDrag)
 app.mount('#app')
+
+// 注册全局组件
+for (const name in Component) {
+    app.component(name, (Component)[name])
+}
+

+ 5 - 0
src/router/modules/dashboard.js

@@ -197,6 +197,11 @@ const route = [
                 component: createNameComponent(() => import('@/views/dictionary/HisWjwMatch.vue')),
                 meta: {title: '卫健委字典匹配', icon: 'iconfont icon-pipei'},
             },
+            {
+                path: 'shouShuBuWeiWeiHu',
+                component: createNameComponent(() => import('@/views/dictionary/ShouShuBuWeiWeiHu.vue')),
+                meta: {title: '手术部位维护', icon: 'iconfont icon-shoushubuwei'},
+            },
         ],
     },
     {

+ 33 - 33
src/store/plugins/persistent.js

@@ -1,38 +1,38 @@
-export default function Presistent({ key, modules, modulesKeys }) {
-  return (store) => {
-    const localOldState = JSON.parse(localStorage.getItem(key) || '{}')
-    const sessionOldState = JSON.parse(sessionStorage.getItem(key) || '{}')
-    let oldState = {}
-    Object.assign(oldState, localOldState, sessionOldState)
-    if (Object.keys(oldState).length > 0) {
-      for (const oldKey in oldState) {
-        modules[oldKey] = oldState[oldKey]
-      }
-      store.replaceState(modules)
+export default function Presistent({key, modules, modulesKeys}) {
+    return (store) => {
+        const localOldState = JSON.parse(localStorage.getItem(key) || '{}')
+        const sessionOldState = JSON.parse(sessionStorage.getItem(key) || '{}')
+        let oldState = {}
+        Object.assign(oldState, localOldState, sessionOldState)
+        if (Object.keys(oldState).length > 0) {
+            for (const oldKey in oldState) {
+                modules[oldKey] = oldState[oldKey]
+            }
+            store.replaceState(modules)
+        }
+        store.subscribe((mutation, state) => {
+            // 判断是否需要缓存数据至localStorage
+            if (modulesKeys.local.length > 0) {
+                const localData = setData(store.state, modulesKeys.local)
+                localStorage.setItem(key, JSON.stringify(localData))
+            } else {
+                localStorage.removeItem(key)
+            }
+            // 判断是否需要缓存数据至sessionStorage
+            if (modulesKeys.session.length > 0) {
+                const sessionData = setData(store.state, modulesKeys.session)
+                sessionStorage.setItem(key, JSON.stringify(sessionData))
+            } else {
+                sessionStorage.removeItem(key)
+            }
+        })
     }
-    store.subscribe((mutation, state) => {
-      // 判断是否需要缓存数据至localStorage
-      if (modulesKeys.local.length > 0) {
-        const localData = setData(store.state, modulesKeys.local)
-        localStorage.setItem(key, JSON.stringify(localData))
-      } else {
-        localStorage.removeItem(key)
-      }
-      // 判断是否需要缓存数据至sessionStorage
-      if (modulesKeys.session.length > 0) {
-        const sessionData = setData(store.state, modulesKeys.session)
-        sessionStorage.setItem(key, JSON.stringify(sessionData))
-      } else {
-        sessionStorage.removeItem(key)
-      }
-    })
-  }
 }
 
 function setData(state, module) {
-  let data = {}
-  for (const i of module) {
-    data[i] = state[i]
-  }
-  return data
+    let data = {}
+    for (const i of module) {
+        data[i] = state[i]
+    }
+    return data
 }

+ 1 - 5
src/utils/blank-utils.js

@@ -9,11 +9,7 @@ export function stringNotBlank(val) {
 }
 
 export function listIsBlank(val) {
-    if (val instanceof Array) {
-        return typeof val === 'undefined' || val.length === 0
-    }
-    ElMessage.error("入参不为数组无法判断")
-    return false
+    return typeof val === 'undefined' || val.length === 0
 }
 
 export function listNotBlank(val) {

+ 104 - 0
src/views/dictionary/ShouShuBuWeiWeiHu.vue

@@ -0,0 +1,104 @@
+<template>
+  <el-container>
+    <el-header>
+      部位名称:
+      <el-input v-model="shouShuBuWeiBianMa" clearable prefix-icon="el-icon-search" style="width: 120px"/>
+      <el-divider direction="vertical"></el-divider>
+      新增部位名称:
+      <el-input v-model="newPart" :maxlength="16" clearable prefix-icon="el-icon-plus" show-word-limit
+                style="width: 260px"></el-input>
+      <el-button icon="el-icon-plus" type="success" @click="clickToAddPart">新增</el-button>
+    </el-header>
+    <el-main>
+      <el-table :data="tempData.slice((shuJu.currentPage - 1) * 30, shuJu.currentPage * 30)"
+                :height="windowSize.h - 120">
+        <el-table-column label="编码" prop="code"></el-table-column>
+        <el-table-column label="名称" prop="name"></el-table-column>
+        <el-table-column label="操作">
+          <template #default="scope">
+            <el-popconfirm cancel-button-text="取消" confirm-button-text="确认" icon="el-icon-info" iconColor="#F56C6C"
+                           title="是否删除该手术" @confirm="delPart(scope.$index,scope.row.code)">
+              <template #reference>
+                <el-button icon="el-icon-delete" size="mini" type="danger">删除</el-button>
+              </template>
+            </el-popconfirm>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+          :current-page="shuJu.currentPage"
+          :page-size="30"
+          :total="shuJu.total"
+          background
+          layout=" prev, pager, next,total"
+          @current-change="fanYe"
+      ></el-pagination>
+    </el-main>
+  </el-container>
+</template>
+
+<script name="ShouShuBuWeiWeiHu" setup>
+
+import {addASurgicalSite, huoQuShouShuBuWei, removeSurgicalSite} from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
+import {computed} from "vue";
+import store from "@/store";
+import {stringIsBlank} from "@/utils/blank-utils";
+import {ElMessage} from "element-plus";
+
+let shouShuBuWeiBianMa = $ref('')
+let shuJu = $ref({
+  data: [],
+  currentPage: 1,
+  total: 0
+})
+
+let newPart = $ref('')
+
+const windowSize = computed(() => {
+  return store.state.app.windowSize
+})
+
+const tempData = computed(() => {
+  shuJu.total = shuJu.data.length
+  return shuJu.data.filter(item => {
+    return item.name.toString().indexOf(shouShuBuWeiBianMa) > -1
+  })
+})
+
+const fanYe = (val) => {
+  shuJu.currentPage = val
+}
+
+const clickToAddPart = () => {
+  if (stringIsBlank(newPart)) {
+    ElMessage.error('请先输入部位名称')
+    return
+  }
+  addASurgicalSite(newPart).then((res) => {
+    shuJu.data.push({
+      code: res,
+      name: newPart
+    })
+    newPart = ''
+  })
+}
+
+const delPart = (index, code) => {
+  removeSurgicalSite(code).then(() => {
+    shuJu.data.splice(index, 1)
+  })
+}
+
+
+onMounted(() => {
+  huoQuShouShuBuWei(shouShuBuWeiBianMa).then((res) => {
+    shuJu.data = res
+    shuJu.total = shuJu.data.length
+  })
+})
+
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/HuiZhenShenQing.vue

@@ -1,3 +1,4 @@
+
 <template>
   <el-container>
     <el-header>
@@ -139,7 +140,7 @@ export default {
       daYingHuiZhenRef,
       chaKanHuiZhenDan,
       dianJiDaYingHuiZhen,
-      daKaiHuiZhenShenQing
+      daKaiHuiZhenShenQing,
     }
   }
 }

+ 0 - 3
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -291,9 +291,6 @@ import router from '@/router'
 import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue'
 import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
 import YaoPingXiangQing from '@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue'
-import XcSelect from "@/components/xc/select/XcSelect.vue";
-import XcOption from "@/components/xc/select/XcOption.vue";
-
 
 const windowSize = computed(() => {
   return store.state.app.windowSize

+ 200 - 161
src/views/medical-insurance/inpatient/AdmRegistration.vue

@@ -1,40 +1,54 @@
 <template>
   <el-container>
     <el-header height="35px">
-      <el-button type="primary" icon="el-icon-location" @click="beforeFetchAssigninfo">定点信息</el-button>
-      <el-button type="primary" icon="el-icon-check" @click="submitPatientInfo"> 保存 </el-button>
-      <ReadCard :pat-no="patient.inpatientNo" biztype="01103" @success="afterReadCard" />
-      <el-button type="success" icon="el-icon-top" @click="checkRegisterDatetime">医保入院登记</el-button>
-      <el-button type="danger" icon="el-icon-bottom" @click="beforeCancelRegister">撤销入院登记</el-button>
-      <el-button type="success" icon="el-icon-s-claim" @click="xiangMuLuRuRouter">项目录入</el-button>
-      <el-button type="danger" icon="el-icon-warning" @click="yiZhuTuiFeiClick" v-if="greatestRole < 8">医嘱退费</el-button>
+      <el-button icon="el-icon-location" type="primary" @click="beforeFetchAssigninfo">定点信息</el-button>
+      <el-button icon="el-icon-check" type="primary" @click="submitPatientInfo"> 保存</el-button>
+      <ReadCard :pat-no="patient.inpatientNo" biztype="01103" @success="afterReadCard"/>
+      <el-button icon="el-icon-top" type="success" @click="checkRegisterDatetime">医保入院登记</el-button>
+      <el-button icon="el-icon-bottom" type="danger" @click="beforeCancelRegister">撤销入院登记</el-button>
+      <el-button icon="el-icon-s-claim" type="success" @click="xiangMuLuRuRouter">项目录入</el-button>
+      <el-button v-if="greatestRole < 8" icon="el-icon-warning" type="danger" @click="yiZhuTuiFeiClick">医嘱退费</el-button>
     </el-header>
     <el-main>
       <el-tag type="info">病人基本信息</el-tag>
       <div style="height: 4px"></div>
       <el-row>
         <el-col :span="2" style="text-align: right">住院号:</el-col>
-        <el-col :span="4"><el-input v-model="patient.inpatientNo" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.inpatientNo" disabled></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">住院次数:</el-col>
-        <el-col :span="4"><el-input v-model="patient.admissTimes" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.admissTimes" disabled></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">身份证号:</el-col>
-        <el-col :span="4"><el-input v-model="patient.socialNo"></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.socialNo"></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">出生日期:</el-col>
-        <el-col :span="4"><el-input v-model="patient.birthDate" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.birthDate" disabled></el-input>
+        </el-col>
       </el-row>
       <el-row>
         <el-col :span="2" style="text-align: right">姓名:</el-col>
-        <el-col :span="4"><el-input v-model="patient.name"></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.name"></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">性别:</el-col>
         <el-col :span="4">
           <el-select v-model="patient.sex" placeholder="请选择">
-            <el-option v-for="item in sexes" :key="item.code" :label="item.name" :value="item.code"> </el-option>
+            <el-option v-for="item in sexes" :key="item.code" :label="item.name" :value="item.code"></el-option>
           </el-select>
         </el-col>
         <el-col :span="2" style="text-align: right">联系电话:</el-col>
-        <el-col :span="4"><el-input v-model="patient.homeTel"></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.homeTel"></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">入院日期:</el-col>
-        <el-col :span="4"><el-input v-model="patient.admissDate" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.admissDate" disabled></el-input>
+        </el-col>
       </el-row>
       <el-row>
         <el-col :span="2" style="text-align: right">管床医生:</el-col>
@@ -42,29 +56,38 @@
           <el-input v-model="patient.referPhysicianName" readonly @click="searchPhysician"></el-input>
         </el-col>
         <el-col :span="2" style="text-align: right">病区:</el-col>
-        <el-col :span="4"><el-input v-model="patient.admissWardName" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.admissWardName" disabled></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">入院医生:</el-col>
-        <el-col :span="4"><el-input v-model="patient.admissPhysicianName" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.admissPhysicianName" disabled></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">入院诊断:</el-col>
-        <el-col :span="4"><el-input v-model="patient.admissDiagStr" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.admissDiagStr" disabled></el-input>
+        </el-col>
       </el-row>
       <el-row>
         <el-col :span="2" style="text-align: right">小科室:</el-col>
-        <el-col :span="4"><el-input v-model="patient.smallDeptName" disabled></el-input></el-col>
+        <el-col :span="4">
+          <el-input v-model="patient.smallDeptName" disabled></el-input>
+        </el-col>
         <el-col :span="2" style="text-align: right">登记日期:</el-col>
         <el-col :span="4">
-          <el-date-picker v-model="patient.ybRegisterDate" type="datetime" placeholder="选择日期时间" @change="formatYbRegisterDate" style="width: 172px"></el-date-picker>
+          <el-date-picker v-model="patient.ybRegisterDate" placeholder="选择日期时间" style="width: 172px"
+                          type="datetime" @change="formatYbRegisterDate"></el-date-picker>
         </el-col>
         <el-col :span="2" style="text-align: right">参保地区:</el-col>
         <el-col :span="4">
-          <el-select v-if="injuryMode" size="small" v-model="patient.injuryArea" placeholder="工伤参保地">
+          <el-select v-if="injuryMode" v-model="patient.injuryArea" placeholder="工伤参保地" size="small">
             <el-option v-for="item in injuryAreas" :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-else v-model="patient.admdvs" placeholder="请选择" filterable clearable>
+          <el-select v-else v-model="patient.admdvs" clearable filterable placeholder="请选择">
             <el-option v-for="item in admdvs" :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>
@@ -74,8 +97,9 @@
         </el-col>
         <el-col :span="2" style="text-align: right">医疗类别:</el-col>
         <el-col :span="4">
-          <el-select v-model="patient.medType" placeholder="请选择" @change="handleSelectMedType" clearable>
-            <el-option v-for="item in medTypes" :key="item.code" :label="item.name" :value="item.code" :disabled="item.disabled">
+          <el-select v-model="patient.medType" clearable placeholder="请选择" @change="handleSelectMedType">
+            <el-option v-for="item in medTypes" :key="item.code" :disabled="item.disabled" :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>
@@ -84,45 +108,47 @@
         </el-col>
       </el-row>
       <div style="margin-top: 16px">
-        <el-tag type="info"> 医保入院诊断(*自费患者无需填写*) </el-tag>
-        <el-button type="primary" icon="el-icon-plus" circle @click="openDiagDialog" title="添加入院诊断"></el-button>
-        <el-button type="success" icon="el-icon-check" circle :disabled="zyInYbDiags.length === 0" @click="saveYbDiags" title="保存入院诊断"></el-button>
+        <el-tag type="info"> 医保入院诊断(*自费患者无需填写*)</el-tag>
+        <el-button circle icon="el-icon-plus" title="添加入院诊断" type="primary" @click="openDiagDialog"></el-button>
+        <el-button :disabled="zyInYbDiags.length === 0" circle icon="el-icon-check" title="保存入院诊断" type="success"
+                   @click="saveYbDiags"></el-button>
       </div>
       <div style="margin-top: 8px">
         <el-table :data="zyInYbDiags" height="160" stripe>
-          <el-table-column prop="diagNo" label="诊断序号"></el-table-column>
-          <el-table-column prop="property" label="诊断属性"></el-table-column>
-          <el-table-column prop="icdCode" label="诊断编码"></el-table-column>
-          <el-table-column prop="icdText" label="诊断名称"></el-table-column>
+          <el-table-column label="诊断序号" prop="diagNo"></el-table-column>
+          <el-table-column label="诊断属性" prop="property"></el-table-column>
+          <el-table-column label="诊断编码" prop="icdCode"></el-table-column>
+          <el-table-column label="诊断名称" prop="icdText"></el-table-column>
           <el-table-column label="诊断类别">
             <template #default="scope">
               {{ getDiagTypeName(scope.row.diagType) }}
             </template>
           </el-table-column>
-          <el-table-column prop="opDate" label="诊断时间"></el-table-column>
+          <el-table-column label="诊断时间" prop="opDate"></el-table-column>
           <el-table-column label="操作">
             <template #default="scope">
-              <el-button type="danger" icon="el-icon-delete" circle @click="deleteYbDiag(scope.$index)"></el-button>
+              <el-button circle icon="el-icon-delete" type="danger" @click="deleteYbDiag(scope.$index)"></el-button>
             </template>
           </el-table-column>
         </el-table>
       </div>
-      <Assignmentinfo v-if="showAssigninfo" :social-no="patient.socialNo" :admdvs="patient.admdvs" @close="showAssigninfo = false" />
+      <Assignmentinfo v-if="showAssigninfo" :admdvs="patient.admdvs" :social-no="patient.socialNo"
+                      @close="showAssigninfo = false"/>
     </el-main>
-    <el-dialog v-model="openXmlr" title="项目录入" :fullscreen="true" @close="openXmlr = false" destroy-on-close>
-      <Xmlr @closeXmlr="openXmlr = false" />
+    <el-dialog v-model="openXmlr" :fullscreen="true" destroy-on-close title="项目录入" @close="openXmlr = false">
+      <Xmlr @closeXmlr="openXmlr = false"/>
     </el-dialog>
-    <el-dialog v-model="openYiZhuTuiFei" title="医嘱退费" :fullscreen="true">
-      <YiZhuTuiFei :initYiZhu="initYiZhu" @closeYiZhuTuiFei="openYiZhuTuiFei = false" />
+    <el-dialog v-model="openYiZhuTuiFei" :fullscreen="true" title="医嘱退费">
+      <YiZhuTuiFei :initYiZhu="initYiZhu" @closeYiZhuTuiFei="openYiZhuTuiFei = false"/>
     </el-dialog>
-    <el-dialog v-model="showSearchSpecialDiag" title="医保入院诊断录入" width="80%" :close-on-click-modal="false">
+    <el-dialog v-model="showSearchSpecialDiag" :close-on-click-modal="false" title="医保入院诊断录入" width="80%">
       <el-row :gutter="5">
         <el-col :span="18">
           <el-tag>可选诊断</el-tag>&nbsp;&nbsp;
-          <el-input placeholder="请输入诊断名称" v-model="specialDiagName" style="width: 260px" clearable></el-input>
+          <el-input v-model="specialDiagName" clearable placeholder="请输入诊断名称" style="width: 260px"></el-input>
           <span v-if="patient.medType === '52'">
             <el-select v-model="patient.matnType" placeholder="请选择生育类别" style="width: 120px">
-              <el-option v-for="item in matnTypes" :value="item.code" :label="item.name" :key="item.code"></el-option>
+              <el-option v-for="item in matnTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
             </el-select>
             &nbsp;&nbsp; 是否晚育:
             <el-radio-group v-model="patient.latechbFlag">
@@ -135,14 +161,16 @@
               <el-radio label="1">是</el-radio>
             </el-radio-group>
           </span>
-          <el-table :data="cptSpecialDiags.slice((currentPage - 1) * 10, currentPage * 10)" stripe highlight-current-row height="400">
-            <el-table-column prop="oldCode" label="老系统编码"></el-table-column>
-            <el-table-column prop="oldName" label="老系统名称"></el-table-column>
-            <el-table-column prop="newCode" label="新系统编码"></el-table-column>
-            <el-table-column prop="newName" label="新系统名称"></el-table-column>
-            <el-table-column prop="limitWay" label="限额方式"></el-table-column>
-            <el-table-column prop="limitAmountCalculateWay" label="限额额度计算方式"></el-table-column>
-            <el-table-column prop="limitAmount" label="疾病限额"></el-table-column>
+          <el-table :data="cptSpecialDiags.slice((currentPage - 1) * 10, currentPage * 10)" height="400"
+                    highlight-current-row
+                    stripe>
+            <el-table-column label="老系统编码" prop="oldCode"></el-table-column>
+            <el-table-column label="老系统名称" prop="oldName"></el-table-column>
+            <el-table-column label="新系统编码" prop="newCode"></el-table-column>
+            <el-table-column label="新系统名称" prop="newName"></el-table-column>
+            <el-table-column label="限额方式" prop="limitWay"></el-table-column>
+            <el-table-column label="限额额度计算方式" prop="limitAmountCalculateWay"></el-table-column>
+            <el-table-column label="疾病限额" prop="limitAmount"></el-table-column>
             <el-table-column>
               <template #default="scope">
                 <el-button type="primary" @click="addSpecialDiag(scope.row)">{{ addDiagButtonText }}</el-button>
@@ -150,44 +178,46 @@
             </el-table-column>
           </el-table>
           <el-pagination
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-size="10"
-            layout="total, prev, pager, next, jumper"
-            :total="cptSpecialDiags.length"
-            style="margin-top: 5px"
+              :current-page="currentPage"
+              :page-size="10"
+              :total="cptSpecialDiags.length"
+              layout="total, prev, pager, next, jumper"
+              style="margin-top: 5px"
+              @current-change="handleCurrentChange"
           ></el-pagination>
         </el-col>
         <el-col :span="6">
           <el-tag>已选诊断</el-tag>&nbsp;&nbsp;
-          <el-button type="success" icon="el-icon-check" :disabled="zyInYbDiags.length === 0" @click="saveYbDiags">保存入院诊断</el-button>
-          <el-table stripe :data="zyInYbDiags" height="400">
-            <el-table-column prop="icdCode" label="诊断编码"></el-table-column>
-            <el-table-column prop="icdText" label="诊断名称"></el-table-column>
+          <el-button :disabled="zyInYbDiags.length === 0" icon="el-icon-check" type="success" @click="saveYbDiags">
+            保存入院诊断
+          </el-button>
+          <el-table :data="zyInYbDiags" height="400" stripe>
+            <el-table-column label="诊断编码" prop="icdCode"></el-table-column>
+            <el-table-column label="诊断名称" prop="icdText"></el-table-column>
             <el-table-column>
               <template #default="scope">
-                <el-button type="danger" icon="el-icon-delete" @click="deleteYbDiag(scope.$index)">删除</el-button>
+                <el-button icon="el-icon-delete" type="danger" @click="deleteYbDiag(scope.$index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
         </el-col>
       </el-row>
     </el-dialog>
-    <el-dialog title="医保入院登记申请" v-model="showAdmissApplyForm" width="500px">
+    <el-dialog v-model="showAdmissApplyForm" title="医保入院登记申请" width="500px">
       <div style="margin-bottom: 20px">
         登记时间:
-        <el-date-picker v-model="admissApply.admissDatetime" type="datetime" placeholder="请选择医保登记开始时间"></el-date-picker>
+        <el-date-picker v-model="admissApply.admissDatetime" placeholder="请选择医保登记开始时间" type="datetime"></el-date-picker>
       </div>
-      <el-input type="textarea" v-model="admissApply.inputComment" placeholder="请输入申请理由"></el-input>
+      <el-input v-model="admissApply.inputComment" placeholder="请输入申请理由" type="textarea"></el-input>
       <div style="width: 450px; text-align: right; margin-top: 30px">
-        <el-button type="info" icon="el-icon-close" @click="cancelAdmissApply">取消</el-button>
-        <el-button type="success" icon="el-icon-check" @click="confirmAdmissApply">提交</el-button>
+        <el-button icon="el-icon-close" type="info" @click="cancelAdmissApply">取消</el-button>
+        <el-button icon="el-icon-check" type="success" @click="confirmAdmissApply">提交</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="人员信息" v-model="showPsnInsuinfo" width="65%">
+    <el-dialog v-model="showPsnInsuinfo" title="人员信息" width="65%">
       <el-tag>{{ injuryMode ? '工伤信息' : '参保信息' }}</el-tag>
       <div v-if="injuryMode">
-        <el-table :data="injuryinfo" @row-click="handleClickInjuryinfo" stripe height="180">
+        <el-table :data="injuryinfo" height="180" stripe @row-click="handleClickInjuryinfo">
           <el-table-column label="电脑号" prop="indiId"></el-table-column>
           <el-table-column label="工伤个人业务序号" prop="serialPers"></el-table-column>
           <el-table-column label="工伤认定号" prop="identifyCode"></el-table-column>
@@ -199,7 +229,7 @@
         </el-table>
       </div>
       <div v-else>
-        <el-table :data="psnBaseinfo.insuinfo" @row-click="handleClickInsuinfo" stripe height="180">
+        <el-table :data="psnBaseinfo.insuinfo" height="180" stripe @row-click="handleClickInsuinfo">
           <el-table-column label="余额" prop="balc"></el-table-column>
           <el-table-column label="险种类型" prop="insutypeName"></el-table-column>
           <el-table-column label="人员类别" prop="psnTypeName"></el-table-column>
@@ -213,7 +243,7 @@
         </el-table>
         <div style="height: 16px"></div>
         <el-tag>身份信息</el-tag>
-        <el-table :data="psnBaseinfo.idetinfo" stripe height="180">
+        <el-table :data="psnBaseinfo.idetinfo" height="180" stripe>
           <el-table-column label="人员身份类别" prop="psnIdetTypeName"></el-table-column>
           <el-table-column label="人员类别等级" prop="psnTypeLv"></el-table-column>
           <el-table-column label="备注" prop="memo"></el-table-column>
@@ -223,39 +253,40 @@
       </div>
     </el-dialog>
     <Search
-      v-if="searchParams.showSearch"
-      :title="searchParams.title"
-      :target="searchParams.target"
-      :med-type="patient.medType"
-      @close="searchParams.showSearch = false"
-      @click-item="handleClickSearchItem"
+        v-if="searchParams.showSearch"
+        :med-type="patient.medType"
+        :target="searchParams.target"
+        :title="searchParams.title"
+        @close="searchParams.showSearch = false"
+        @click-item="handleClickSearchItem"
     />
   </el-container>
 </template>
 
 <script>
 import store from '@/store'
-import { computed, onActivated, onDeactivated, onMounted, reactive, ref, watchEffect } from 'vue'
-import { submitSiPatientInfo, getZyInYbDiags, saveZyInYbDiags } from '@/api/yibao/patient'
-import { getAllSpecialDiags } from '@/api/yibao/dictionary'
-import { cptSex } from '@/utils/computed'
-import { sexes, admdvs, diagTypes } from '@/data/index'
-import { nullPatient } from '@/utils/validate'
-import { ElMessage, ElMessageBox } from 'element-plus'
-import { admissRegister, revokeAdmission } from '@/api/medical-insurance/si-inpatient'
-import { formatDatetime, getDatetime } from '@/utils/date'
-import { getGreatestRole } from '@/utils/permission'
-import { clone } from '@/utils/clone'
-import { getMedTypesByFlag, getMatnTypes } from '@/api/medical-insurance/si-dict'
-import { obtainBasicPersonInfo, checkRegisterDate } from '@/api/medical-insurance/si-query'
-import { cancelInjuryRegister, getPersonBaseinfo, admissRegistration } from '@/api/medical-insurance/si-injury'
-import { selectAdmissApply, submitAdmissApply } from '@/api/medical-insurance/si-admiss-apply'
-import { baseinfo } from '@/data/inpatient'
+import {computed, onActivated, onDeactivated, onMounted, reactive, ref, watchEffect} from 'vue'
+import {getZyInYbDiags, saveZyInYbDiags, submitSiPatientInfo} from '@/api/yibao/patient'
+import {getAllSpecialDiags} from '@/api/yibao/dictionary'
+import {cptSex} from '@/utils/computed'
+import {admdvs, diagTypes, sexes} from '@/data/index'
+import {nullPatient} from '@/utils/validate'
+import {ElMessage, ElMessageBox} from 'element-plus'
+import {admissRegister, revokeAdmission} from '@/api/medical-insurance/si-inpatient'
+import {formatDatetime, getDatetime} from '@/utils/date'
+import {getGreatestRole} from '@/utils/permission'
+import {clone} from '@/utils/clone'
+import {getMatnTypes, getMedTypesByFlag} from '@/api/medical-insurance/si-dict'
+import {checkRegisterDate, obtainBasicPersonInfo} from '@/api/medical-insurance/si-query'
+import {admissRegistration, cancelInjuryRegister, getPersonBaseinfo} from '@/api/medical-insurance/si-injury'
+import {selectAdmissApply, submitAdmissApply} from '@/api/medical-insurance/si-admiss-apply'
+import {baseinfo} from '@/data/inpatient'
 import Xmlr from '@/components/inpatient/XiangMuLuRu.vue'
 import YiZhuTuiFei from '@/components/inpatient/YiZhuTuiFei.vue'
 import Assignmentinfo from '@/components/medical-insurance/assigninfo/Index.vue'
 import Search from '@/components/search/Index.vue'
 import ReadCard from '@/components/medical-insurance/readcard/Index.vue'
+
 export default {
   components: {
     Search,
@@ -318,10 +349,10 @@ export default {
     const matnTypes = ref([])
 
     const injuryAreas = [
-      { code: 1, name: '长沙市' },
-      { code: 4, name: '长沙县' },
-      { code: 2, name: '望城县' },
-      { code: 3, name: '省直' },
+      {code: 1, name: '长沙市'},
+      {code: 4, name: '长沙县'},
+      {code: 2, name: '望城县'},
+      {code: 3, name: '省直'},
     ]
 
     const singleDiseaseTypeChanged = (val) => {
@@ -444,7 +475,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning',
       }).then(() => {
-        submitSiPatientInfo({ patient: patient.value, diags: zyInYbDiags.value }).then(() => {
+        submitSiPatientInfo({patient: patient.value, diags: zyInYbDiags.value}).then(() => {
           ElMessage({
             message: '保存患者信息成功。',
             type: 'success',
@@ -498,7 +529,7 @@ export default {
         return
       }
 
-      submitSiPatientInfo({ patient: patient.value, diags: zyInYbDiags.value }).then(() => {
+      submitSiPatientInfo({patient: patient.value, diags: zyInYbDiags.value}).then(() => {
         checkRegisterDate(patient.value.inpatientNo, patient.value.admissTimes).then(() => {
           selectAdmissApply(patient.value).then((res) => {
             if (null === res.status) {
@@ -572,18 +603,19 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          submitAdmissApply(admissApply.value).then((res) => {
-            ElMessage({
-              message: res,
-              type: 'success',
-              duration: 2500,
-              showClose: true,
+          .then(() => {
+            submitAdmissApply(admissApply.value).then((res) => {
+              ElMessage({
+                message: res,
+                type: 'success',
+                duration: 2500,
+                showClose: true,
+              })
+              showAdmissApplyForm.value = false
             })
-            showAdmissApplyForm.value = false
           })
-        })
-        .catch(() => {})
+          .catch(() => {
+          })
     }
 
     const psnBaseinfo = ref({})
@@ -631,22 +663,23 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          const param = {
-            baseinfo: patient.value,
-            injuryinfo: row,
-          }
-          admissRegistration(param).then((res) => {
-            ElMessage({
-              message: '审核已通过,医保入院登记成功。',
-              type: 'success',
-              duration: 2500,
-              showClose: true,
+          .then(() => {
+            const param = {
+              baseinfo: patient.value,
+              injuryinfo: row,
+            }
+            admissRegistration(param).then((res) => {
+              ElMessage({
+                message: '审核已通过,医保入院登记成功。',
+                type: 'success',
+                duration: 2500,
+                showClose: true,
+              })
+              showPsnInsuinfo.value = false
             })
-            showPsnInsuinfo.value = false
           })
-        })
-        .catch(() => {})
+          .catch(() => {
+          })
     }
 
     const handleClickInsuinfo = (row) => {
@@ -655,22 +688,23 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(() => {
-          patient.value.insutype = row.insutype
-          patient.value.psnType = row.psnType
-          patient.value.insuplcAdmdvs = row.insuplcAdmdvs
-          patient.value.empName = row.empName
-          admissRegister(patient.value).then(() => {
-            ElMessage({
-              message: '医保入院登记成功。',
-              type: 'success',
-              duration: 2500,
-              showClose: true,
+          .then(() => {
+            patient.value.insutype = row.insutype
+            patient.value.psnType = row.psnType
+            patient.value.insuplcAdmdvs = row.insuplcAdmdvs
+            patient.value.empName = row.empName
+            admissRegister(patient.value).then(() => {
+              ElMessage({
+                message: '医保入院登记成功。',
+                type: 'success',
+                duration: 2500,
+                showClose: true,
+              })
+              showPsnInsuinfo.value = false
             })
-            showPsnInsuinfo.value = false
           })
-        })
-        .catch(() => {})
+          .catch(() => {
+          })
     }
 
     const beforeCancelRegister = () => {
@@ -679,36 +713,37 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
       })
-        .then(({ value }) => {
-          if (!value) {
-            ElMessage({
-              message: '撤销入院登记的原因不能为空!',
+          .then(({value}) => {
+            if (!value) {
+              ElMessage({
+                message: '撤销入院登记的原因不能为空!',
+                type: 'warning',
+                duration: 2500,
+                showClose: true,
+              })
+              return
+            }
+            ElMessageBox.confirm('撤销医保入院登记的原因为【' + value + '】确定撤销?', '提示', {
               type: 'warning',
-              duration: 2500,
-              showClose: true,
-            })
-            return
-          }
-          ElMessageBox.confirm('撤销医保入院登记的原因为【' + value + '】确定撤销?', '提示', {
-            type: 'warning',
-          }).then(() => {
-            patient.value.revokeRemark = value
-            if (injuryMode.value) {
-              cancelInjuryRegister(patient.value).then(() => {
-                ElMessageBox.alert('撤销入院登记成功。', '提示', {
-                  type: 'success',
+            }).then(() => {
+              patient.value.revokeRemark = value
+              if (injuryMode.value) {
+                cancelInjuryRegister(patient.value).then(() => {
+                  ElMessageBox.alert('撤销入院登记成功。', '提示', {
+                    type: 'success',
+                  })
                 })
-              })
-            } else {
-              revokeAdmission(patient.value).then(() => {
-                ElMessageBox.alert('撤销入院登记成功。', '提示', {
-                  type: 'success',
+              } else {
+                revokeAdmission(patient.value).then(() => {
+                  ElMessageBox.alert('撤销入院登记成功。', '提示', {
+                    type: 'success',
+                  })
                 })
-              })
-            }
+              }
+            })
+          })
+          .catch(() => {
           })
-        })
-        .catch(() => {})
     }
 
     const showAssigninfo = ref(false)
@@ -826,17 +861,21 @@ export default {
 .el-date-editor.el-input__inner {
   width: 100%;
 }
+
 .el-collapse-item__content {
   padding-bottom: 0;
 }
+
 .el-collapse-item__header {
   height: 30px;
   line-height: 30px;
 }
+
 .el-collapse-item__header,
 .el-collapse-item__wrap {
   background-color: inherit;
 }
+
 .el-autocomplete-suggestion li {
   line-height: normal !important;
 }