Index.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <div class="component-box-wrapper__fullscreen layout_container" :style="{zIndex}">
  3. <div style="display: flex; margin-bottom: 20px">
  4. <div style="font-size: 18px !important;">
  5. 医保费用明细
  6. </div>
  7. </div>
  8. <div style="position: fixed; top: 12px; right: 20px; width: 120px; text-align: right">
  9. <el-button circle icon="Download" title="导出Excel" type="primary" @click="exportExcel"></el-button>
  10. <el-button circle icon="Close" title="关闭" type="danger" @click="close"></el-button>
  11. </div>
  12. <div class="layout_main layout_container layout-horizontal">
  13. <aside style="width: 360px">
  14. <div style="display: flex; height: 36px; align-items: center; font-weight: 600; padding: 0 12px">
  15. <div style="width: 20%">费用类别</div>
  16. <div style="width: 20%">总金额</div>
  17. <div style="width: 20%">甲类</div>
  18. <div style="width: 20%">乙类</div>
  19. <div style="width: 20%">丙类</div>
  20. </div>
  21. <div v-for="(val, key) in analyse" :key="key" :style="currentStyle(key)" class="fee-type"
  22. @click="handleClickChrgtype(key)">
  23. <div>
  24. <div style="width: 20%">{{ val[0] }}</div>
  25. <div style="width: 20%" class="fee-by-lv" @click.stop="handleClickChrgLv(key, '00')">{{ val[1] }}</div>
  26. <div style="width: 20%" class="fee-by-lv" @click.stop="handleClickChrgLv(key, '01')">{{ val[2] }}</div>
  27. <div style="width: 20%" class="fee-by-lv" @click.stop="handleClickChrgLv(key, '02')">{{ val[3] }}</div>
  28. <div style="width: 20%" class="fee-by-lv" @click.stop="handleClickChrgLv(key, '03')">{{ val[4] }}</div>
  29. </div>
  30. </div>
  31. </aside>
  32. <div class="layout_main layout_el-table">
  33. <div>
  34. <el-descriptions :column="4" border>
  35. <el-descriptions-item>
  36. <template #label> 姓名</template>
  37. {{ psninfo.psnName }}
  38. </el-descriptions-item>
  39. <el-descriptions-item>
  40. <template #label> 住院号</template>
  41. {{ psninfo.patNo }}
  42. </el-descriptions-item>
  43. <el-descriptions-item>
  44. <template #label> 住院次数</template>
  45. {{ psninfo.times }}
  46. </el-descriptions-item>
  47. <el-descriptions-item>
  48. <template #label> 账页号</template>
  49. {{ psninfo.ledgerSn }}
  50. </el-descriptions-item>
  51. </el-descriptions>
  52. </div>
  53. <el-table
  54. :data="cptFeedtle.slice(pageSize * (currentPage - 1), pageSize * currentPage)"
  55. stripe
  56. >
  57. <el-table-column label="流水号" prop="feedetlSn" width="60"></el-table-column>
  58. <el-table-column label="费用发生时间" prop="feeOcurTime"></el-table-column>
  59. <el-table-column label="院内码" prop="medinsListCodg"></el-table-column>
  60. <el-table-column label="收费名称" prop="medinsListName"></el-table-column>
  61. <el-table-column label="国家编码" prop="medListCodg"></el-table-column>
  62. <el-table-column label="国家名称" prop="medListName"></el-table-column>
  63. <el-table-column label="数量" prop="cnt" width="80"></el-table-column>
  64. <el-table-column label="单价" prop="pric" width="80"></el-table-column>
  65. <el-table-column label="金额" prop="detItemFeeSumamt" width="80"></el-table-column>
  66. <el-table-column label="全自费金额" prop="fulamtOwnpayAmt" sortable width="80"></el-table-column>
  67. <el-table-column label="超限价金额" prop="overlmtAmt" sortable width="80"></el-table-column>
  68. <el-table-column label="先行自付金额" prop="preselfpayAmt" sortable width="80"></el-table-column>
  69. <el-table-column label="符合政策范围金额" prop="inscpScpAmt" sortable width="80"></el-table-column>
  70. <el-table-column label="收费项目等级" prop="chrgitmLvName" width="80"></el-table-column>
  71. <el-table-column label="科室" prop="bilgDeptName"></el-table-column>
  72. <el-table-column label="医生" prop="bilgDrName"></el-table-column>
  73. </el-table>
  74. <el-pagination
  75. :current-page="currentPage"
  76. :page-size="pageSize"
  77. :page-sizes="[10, 30, 50, 100]"
  78. :total="cptFeedtle.length"
  79. layout="total, sizes, prev, pager, next, jumper"
  80. @size-change="handleSizeChange"
  81. @current-change="handleCurrentChange"
  82. ></el-pagination>
  83. </div>
  84. </div>
  85. </div>
  86. </template>
  87. <script setup>
  88. import {queryFeeDetails} from '@/api/medical-insurance/si-query'
  89. import {computed, onMounted, ref} from 'vue'
  90. import {useZIndex} from "element-plus";
  91. import {Export} from "@/utils/ExportExcel";
  92. const props = defineProps({
  93. setlStatus: {
  94. type: String,
  95. default: 'settled',
  96. },
  97. mdtrtId: {
  98. type: String,
  99. required: true,
  100. },
  101. setlType: {
  102. type: String,
  103. default: '21',
  104. },
  105. })
  106. const emits = defineEmits(['close'])
  107. const psninfo = ref({})
  108. const feedtle = ref([])
  109. const analyse = ref({})
  110. const currentChargeType = ref('zhj')
  111. const currentChargeLv = ref('00')
  112. const pageSize = ref(30)
  113. const currentPage = ref(1)
  114. const handleSizeChange = (val) => {
  115. pageSize.value = val
  116. }
  117. const handleCurrentChange = (val) => {
  118. currentPage.value = val
  119. }
  120. const cptFeedtle = computed(() => {
  121. return feedtle.value.filter((itm) => {
  122. if (currentChargeType.value === 'zhj') {
  123. return currentChargeLv.value === '00' ? true : itm.chrgitmLv === currentChargeLv.value
  124. }
  125. return currentChargeLv.value === '00' ? itm.medChrgitmType === currentChargeType.value :
  126. (itm.medChrgitmType === currentChargeType.value && itm.chrgitmLv === currentChargeLv.value)
  127. })
  128. })
  129. const currentStyle = (chrgtype) => {
  130. return {
  131. background: currentChargeType.value === chrgtype ? '#409EFF' : '',
  132. color: currentChargeType.value === chrgtype ? 'white' : '',
  133. }
  134. }
  135. const handleClickChrgtype = (key) => {
  136. currentChargeType.value = key
  137. currentChargeLv.value = '00'
  138. currentPage.value = 1
  139. }
  140. const handleClickChrgLv = (key, level) => {
  141. currentChargeType.value = key
  142. currentChargeLv.value = level
  143. }
  144. const fetchFeedtle = () => {
  145. const param = {
  146. mdtrtId: props.mdtrtId,
  147. setlStatus: props.setlStatus,
  148. setlType: props.setlType,
  149. }
  150. queryFeeDetails(param).then((res) => {
  151. psninfo.value = res.psninfo
  152. feedtle.value = res.feedtle
  153. analyse.value = res.analyse
  154. })
  155. }
  156. function exportExcel() {
  157. const field = {
  158. feedetlSn: '流水号',
  159. feeOcurTime: '费用发生时间',
  160. medinsListCodg: '院内码',
  161. medinsListName: '收费名称',
  162. medListCodg: '国家编码',
  163. medListName: '国家名称',
  164. cnt: '数量',
  165. pric: '单价',
  166. detItemFeeSumamt: '金额',
  167. fulamtOwnpayAmt: '全自费金额',
  168. overlmtAmt: '超限价金额',
  169. preselfpayAmt: '先行自付金额',
  170. inscpScpAmt: '符合政策范围金额',
  171. chrgitmLvName: '收费项目等级',
  172. bilgDeptName: '科室',
  173. bilgDrName: '医生',
  174. }
  175. const fileName = `医保费用明细(${psninfo.value.psnName}-${psninfo.value.patNo}_${psninfo.value.times}_${psninfo.value.ledgerSn})`
  176. Export(feedtle.value, field, fileName)
  177. }
  178. const close = () => {
  179. emits('close')
  180. }
  181. const zIndex = ref(0)
  182. onMounted(() => {
  183. zIndex.value = useZIndex().nextZIndex()
  184. if (props.mdtrtId) {
  185. fetchFeedtle()
  186. }
  187. })
  188. defineExpose({fetchFeedtle})
  189. </script>
  190. <style scoped>
  191. * {
  192. font-size: 12px !important;
  193. }
  194. .fee-type {
  195. width: 360px;
  196. display: flex;
  197. height: 36px;
  198. align-items: center;
  199. border-bottom: 1px solid rgb(230, 222, 222);
  200. }
  201. .fee-type :hover {
  202. cursor: pointer;
  203. background: #409eff;
  204. color: white;
  205. }
  206. .fee-type > div {
  207. width: 100%;
  208. padding: 0 12px;
  209. display: flex;
  210. height: 36px;
  211. align-items: center;
  212. }
  213. .fee-by-lv:hover {
  214. text-decoration: underline;
  215. color: darkred;
  216. }
  217. </style>