PatientInfoHead.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <div>
  3. <el-radio-group v-model="headParam.inOutFlag">
  4. <el-radio :value="0" size="large">在院病人</el-radio>
  5. <el-radio :value="1" size="large">出院病人</el-radio>
  6. </el-radio-group>
  7. <span style="display: inline-block;width: 100px" ></span>
  8. <el-tag v-if="cashFlag" size="default" effect="dark" type="danger" ><el-icon><Select /></el-icon>{{cashName}}</el-tag>
  9. </div>
  10. <el-descriptions :column="6" border style="width:100%;" >
  11. <el-descriptions-item label="住院号">
  12. <el-popover :visible="visible" :width="700" placement="right-end" trigger="click" @show="clearPatientTable">
  13. <template #reference>
  14. <el-input v-model="inpatientParam.inpatientNo" @click="visible = true" style="width: 100px" @keyup.enter="queryChange" />
  15. </template>
  16. <div style="width: 670px;">
  17. <el-input v-model="headParam.inpatientNo" placeholder="支持住院号/姓名/门诊号查询" clearable @keyup.enter="selectPatientPage" style="width: 170px"></el-input>
  18. &nbsp;&nbsp;
  19. <el-button icon="Search" type="primary" @click="selectPatientPage">查询</el-button>
  20. <span style="display: inline-block;width: 350px" ></span>
  21. <el-button title="关闭" icon="CloseBold" @click="visible = false"></el-button>
  22. </div>
  23. <div style="width: 670px;">
  24. <el-table :data="patientList" style="width: 100%" @row-click="fetchPatientData" height="400">
  25. <el-table-column property="inpatientNo" label="住院号" />
  26. <el-table-column property="name" label="姓名" />
  27. <el-table-column width="80" property="admissTimes" label="次数" />
  28. <el-table-column width="150" property="admissDate" label="入院日期" />
  29. <el-table-column width="80" property="bedNo" label="床号" />
  30. <el-table-column property="wardName" label="病房" />
  31. <el-table-column property="responceTypeName" label="身份" />
  32. <el-table-column property="balance" label="余额" />
  33. <el-table-column v-if="headParam.inOutFlag ===1 " width="150" property="disDate" label="出院日期" />
  34. </el-table>
  35. <el-pagination
  36. @size-change="handleSizeChange"
  37. @current-change="handleCurrentChange"
  38. :current-page="headParam.currentPage"
  39. small="small"
  40. :page-sizes="[15, 30, 45]"
  41. :page-size="headParam.pageSize"
  42. layout="total, sizes, prev, pager, next, jumper"
  43. :total="totalSize"
  44. style="margin-top: 5px;"
  45. ></el-pagination>
  46. </div>
  47. </el-popover>
  48. </el-descriptions-item>
  49. <el-descriptions-item label="姓名">
  50. {{ patientInfo.name }}
  51. </el-descriptions-item>
  52. <el-descriptions-item label="出生日期">
  53. {{ patientInfo.birthDate }} {{ companyFunc(patientInfo.age, '岁') }}
  54. </el-descriptions-item>
  55. <el-descriptions-item label="性别">
  56. {{ patientInfo.sexName }}
  57. </el-descriptions-item>
  58. <el-descriptions-item label="入院日期">
  59. {{ patientInfo.admissDate }}
  60. </el-descriptions-item>
  61. <el-descriptions-item label="住院天数">
  62. {{ companyFunc(patientInfo.actIptDays,'天') }}
  63. </el-descriptions-item>
  64. <el-descriptions-item label="管床医生">
  65. {{ patientInfo.referPhysicianName }}
  66. </el-descriptions-item>
  67. <el-descriptions-item label="病区">
  68. {{ patientInfo.admissWardName }}
  69. </el-descriptions-item>
  70. <el-descriptions-item label="小科室">
  71. {{ patientInfo.zkWardName }}
  72. </el-descriptions-item>
  73. <el-descriptions-item label="身份">
  74. <span style="color: red">{{ patientInfo.medTypeName }} </span>
  75. </el-descriptions-item>
  76. <el-descriptions-item label="总费用">
  77. {{ patientInfo.totalCharge }}
  78. &nbsp;&nbsp;&nbsp;
  79. <span v-if="patientInfo.balance && patientInfo.balance < 0 " style="color: red"> {{ patientInfo.balance }}</span>
  80. <span v-else > {{ patientInfo.balance }}</span>
  81. </el-descriptions-item>
  82. </el-descriptions>
  83. </template>
  84. <script setup >
  85. import {ref} from "vue";
  86. import {stringNotBlank} from "@/utils/blank-utils";
  87. import {queryCashFlag,queryPatientInfoPage} from '@/api/zfsf/cashier-process.js'
  88. import {getPatientBaseInfo} from "@/api/medical-advice/medical-advice-management";
  89. const emit = defineEmits(['selectPatientInfo']);
  90. const cashFlag = ref(false)
  91. const cashName = ref('已出纳')
  92. const patientInfo = ref({})
  93. const inpatientParam = ref({
  94. inpatientNo : "",
  95. admissTimes : null,
  96. inOutStatusFlag : ""
  97. })
  98. const clearAllData = ()=>{
  99. cashFlag.value = false
  100. patientInfo.value = {}
  101. inpatientParam.value.inpatientNo = ''
  102. inpatientParam.value.admissTimes = null
  103. inpatientParam.value.inOutStatusFlag = ''
  104. }
  105. const headParam = ref({
  106. inpatientNo : "",
  107. inOutFlag : 0,
  108. currentPage:1,
  109. pageSize:15
  110. })
  111. const totalSize = ref(0)
  112. const visible = ref(false)
  113. const clearPatientTable = ()=>{
  114. patientList.value = []
  115. headParam.value.inpatientNo = ""
  116. headParam.value.currentPage = 1
  117. headParam.value.pageSize = 15
  118. totalSize.value = 0
  119. }
  120. const selectPatientPage = ()=>{
  121. queryPatientInfoPage(headParam.value).then(res=>{
  122. patientList.value = res.data
  123. totalSize.value = res.total
  124. })
  125. }
  126. const queryChange = ()=>{
  127. headParam.value.inpatientNo = inpatientParam.value.inpatientNo
  128. selectPatientPage()
  129. }
  130. const fetchPatientData = (row)=>{
  131. inpatientParam.value.inpatientNo = row.inpatientNo
  132. inpatientParam.value.admissTimes = row.admissTimes
  133. if(row.inOutStatusFlag){
  134. headParam.value.inOutFlag = Number(row.inOutStatusFlag)
  135. inpatientParam.value.inOutStatusFlag = row.inOutStatusFlag
  136. }else {
  137. inpatientParam.value.inOutStatusFlag = headParam.value.inOutFlag === 0 ? "0" : "1"
  138. }
  139. visible.value = false
  140. getPatientBaseInfo(inpatientParam.value).then(res=>{
  141. patientInfo.value = res
  142. })
  143. queryCashFlag(inpatientParam.value).then(res=>{
  144. cashFlag.value = res.cashFlag === 1
  145. })
  146. emit('selectPatientInfo',inpatientParam.value)
  147. }
  148. const showCashName = (val)=>{
  149. cashFlag.value = true
  150. cashName.value = val
  151. }
  152. defineExpose({
  153. fetchPatientData,
  154. clearAllData,
  155. showCashName
  156. })
  157. const handleSizeChange = (val) => {
  158. headParam.value.pageSize = val
  159. selectPatientPage()
  160. }
  161. const handleCurrentChange = (val) => {
  162. headParam.value.currentPage = val
  163. selectPatientPage()
  164. }
  165. const companyFunc = (val, company) => {
  166. if (stringNotBlank(val)) {
  167. return val + company
  168. } else {
  169. return ''
  170. }
  171. }
  172. const patientList = ref([])
  173. </script>
  174. <style scoped >
  175. .el-checkbox__input.is-disabled + .el-checkbox__label {
  176. color: red !important;
  177. }
  178. </style>