WeiGuiFeiYongFenXi.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <el-container>
  3. <el-header height="30">
  4. <el-descriptions title="患者信息" border>
  5. <template #extra>
  6. <el-button type="primary" @click="chaoZuoZhiNan = true" size="small">操作指南</el-button>
  7. <el-button type="primary" @click="ziDongPiPeiTuiFei" size="small">自动匹配</el-button>
  8. </template>
  9. <el-descriptions-item label="姓名">{{ huanZheXinXi.name }}</el-descriptions-item>
  10. <el-descriptions-item label="住院号">{{ huanZheXinXi.inpatientNo }}</el-descriptions-item>
  11. <el-descriptions-item label="住院次数">{{ huanZheXinXi.admissTimes }}</el-descriptions-item>
  12. <el-descriptions-item label="未匹配">{{ weiPiPei.data.length }} 条</el-descriptions-item>
  13. <el-descriptions-item label="违规费用">{{ weiGuiFeiYong.data.length }} 条</el-descriptions-item>
  14. </el-descriptions>
  15. </el-header>
  16. <el-main>
  17. <el-tabs v-model="weiGuiTabs">
  18. <el-tab-pane label="未匹配" name="未匹配">
  19. <el-table
  20. :data="weiPiPei.data.slice((weiPiPei.currentPage - 1) * weiPiPei.pageSize, weiPiPei.pageSize * weiPiPei.currentPage)"
  21. :height="WinHeight / 1.39"
  22. highlight-current-row
  23. stripe
  24. >
  25. <el-table-column label="排序" type="index"></el-table-column>
  26. <el-table-column label="项目编码" prop="chargeCodeMx"></el-table-column>
  27. <el-table-column label="项目名称" prop="name"></el-table-column>
  28. </el-table>
  29. <el-pagination
  30. @current-change="weiPiPeiCurrentPage"
  31. :current-page="weiPiPei.currentPage"
  32. :page-size="weiPiPei.pageSize"
  33. :page-sizes="[40, 200, 300, 400]"
  34. layout=" prev, pager, next,total"
  35. :total="weiPiPei.data.length"
  36. style="margin-top: 5px"
  37. :pager-count="5"
  38. background
  39. ></el-pagination>
  40. </el-tab-pane>
  41. <el-tab-pane label="违规退费" name="违规退费">
  42. <el-table
  43. :data="weiGuiFeiYong.data.slice((weiGuiFeiYong.currentPage - 1) * weiGuiFeiYong.pageSize, weiGuiFeiYong.pageSize * weiGuiFeiYong.currentPage)"
  44. :height="WinHeight / 1.39"
  45. highlight-current-row
  46. stripe
  47. @cell-click="zhenShuFeiYong"
  48. >
  49. <el-table-column label="排序" type="index"></el-table-column>
  50. <el-table-column label="流水号" prop="detailSn"></el-table-column>
  51. <el-table-column label="项目编码" prop="chargeCodeMx"></el-table-column>
  52. <el-table-column label="收费时间" prop="chargeDate"></el-table-column>
  53. <el-table-column label="项目名称" prop="chargeCodeName"></el-table-column>
  54. <el-table-column label="金额" prop="chargeFee"></el-table-column>
  55. <el-table-column label="数量" prop="chargeAmount"></el-table-column>
  56. <el-table-column label="执行科室" prop="execUnitName"></el-table-column>
  57. <el-table-column label="录入人" prop="opIdCode"></el-table-column>
  58. <el-table-column label="费用类型" prop="chargeCode">
  59. <template #default="scope">
  60. <span>{{ scope.row.chargeCode === 'xm' ? '项目' : '药品' }}</span>
  61. </template>
  62. </el-table-column>
  63. </el-table>
  64. <el-pagination
  65. @current-change="weiGuiFeiYongCurrentPage"
  66. :current-page="weiGuiFeiYong.currentPage"
  67. :page-size="weiGuiFeiYong.pageSize"
  68. layout=" prev, pager, next,total"
  69. :total="weiGuiFeiYong.data.length"
  70. style="margin-top: 5px"
  71. background
  72. ></el-pagination>
  73. </el-tab-pane>
  74. </el-tabs>
  75. </el-main>
  76. <el-drawer title="费用修正" v-model="feiYongXiuZhenDrawer" size="50%" :before-close="shiFouBaoCun">
  77. <div style="margin: auto 20px auto 20px">
  78. <el-descriptions title="费用信息" border>
  79. <el-descriptions-item label="项目名称">{{ fuShuFeiYongXinXi.chargeCodeName }}</el-descriptions-item>
  80. <el-descriptions-item label="金额">{{ fuShuFeiYongXinXi.chargeFee }}</el-descriptions-item>
  81. <el-descriptions-item label="数量">{{ fuShuFeiYongXinXi.chargeAmount }}</el-descriptions-item>
  82. <el-descriptions-item label="执行科室">{{ fuShuFeiYongXinXi.execUnitName }}</el-descriptions-item>
  83. <el-descriptions-item label="录入人">{{ fuShuFeiYongXinXi.opIdCode }}</el-descriptions-item>
  84. <el-descriptions-item label="操作">
  85. <el-button size="small" type="success" @click="PiPeiClick">保存</el-button>
  86. </el-descriptions-item>
  87. </el-descriptions>
  88. <br />
  89. 录入日期:<el-date-picker
  90. type="daterange"
  91. v-model="dateRange"
  92. placeholder="选择日期"
  93. style="width: 280px"
  94. range-separator="至"
  95. start-placeholder="开始日期"
  96. end-placeholder="结束日期"
  97. :shortcuts="shortcuts"
  98. ></el-date-picker>
  99. <el-button
  100. @click="riQiPaiXu === 'DESC' ? (riQiPaiXu = 'ASC') : (riQiPaiXu = 'DESC')"
  101. type="success"
  102. :icon="riQiPaiXu === 'DESC' ? 'el-icon-caret-bottom' : 'el-icon-caret-top'"
  103. >{{ riQiPaiXu === 'DESC' ? '日期降序' : '日期升序' }}</el-button
  104. >
  105. <el-button @click="zhenShuFeiYong(fuShuFeiYongXinXi)">查询</el-button>
  106. <el-table
  107. highlight-current-row
  108. stripe
  109. :data="keYiPiPeiDeZhenShu.data.slice((keYiPiPeiDeZhenShu.currentPage - 1) * keYiPiPeiDeZhenShu.pageSize, keYiPiPeiDeZhenShu.pageSize * keYiPiPeiDeZhenShu.currentPage)"
  110. :height="WinHeight / 1.39"
  111. @selection-change="handleSelectionChange"
  112. class="eltable"
  113. >
  114. <el-table-column type="selection"></el-table-column>
  115. <el-table-column label="排序" type="index"></el-table-column>
  116. <el-table-column label="流水号" prop="detailSn" width="70"></el-table-column>
  117. <el-table-column label="时间" prop="chargeDate" width="70"></el-table-column>
  118. <el-table-column label="项目编码" prop="chargeCodeMx"></el-table-column>
  119. <el-table-column label="金额" prop="chargeFee"></el-table-column>
  120. <el-table-column label="数量" prop="chargeAmount"></el-table-column>
  121. </el-table>
  122. <el-pagination
  123. @current-change="keYiPiPeiDeZhenShuCurrentPage"
  124. @size-change="keYiPiPeiDeZhenShuSizeChange"
  125. :current-page="keYiPiPeiDeZhenShu.currentPage"
  126. :page-size="keYiPiPeiDeZhenShu.pageSize"
  127. layout=" prev, pager, next,total,sizes"
  128. :total="keYiPiPeiDeZhenShu.data.length"
  129. style="margin-top: 5px"
  130. background
  131. ></el-pagination>
  132. </div>
  133. </el-drawer>
  134. <el-dialog v-model="chaoZuoZhiNan" title="操作指南">
  135. 一、未匹配 <br />
  136. 1、点击未匹配,可以查询到这个患者没有匹配到医保的医保码<br />
  137. 二、违规退费<br />
  138. 1、点击违规退费:会显示这个患者无法上传到医保的费用。<br />
  139. 2、点击这个费用:会在右边弹出抽屉,上面会显示一些,费用的信息。<br />
  140. 3、匹配:这条负数的数据退的是那一天(或那几天)的费用,点击弹出来的抽屉中的多选框然后点击保存即可<br />
  141. 4、查询:查询这些正费用时,可以选择 日期,以及 排序。<br />
  142. </el-dialog>
  143. </el-container>
  144. </template>
  145. <script>
  146. import { onMounted, ref, watch } from 'vue'
  147. import store from '../../store'
  148. import { huoQuZhenShuKePiPei, caiFenPiPei, yiZhuTuiFeiPiPei, weiGuiFeiYongFenXi } from '@/api/yibao/xiang-mu-lu-ru'
  149. import { ElMessageBox } from 'element-plus'
  150. import { shortcuts } from '@/data/shortcuts'
  151. import { getDateRangeFormatDate } from '../../utils/date'
  152. export default {
  153. props: {
  154. init: {
  155. type: Number,
  156. default: -1,
  157. },
  158. patient: {
  159. type: Object,
  160. },
  161. },
  162. setup(props, ctx) {
  163. const windowSize = store.state.app.windowSize
  164. const WinHeight = windowSize.h
  165. const huanZheXinXi = props.patient
  166. const feiYongXiuZhenDrawer = ref(false)
  167. const weiGuiTabs = ref('未匹配')
  168. const dateRange = ref([])
  169. const riQiPaiXu = ref('DESC')
  170. const weiPiPei = ref({
  171. pageSize: 1,
  172. currentPage: 15,
  173. data: [],
  174. })
  175. const weiGuiFeiYong = ref({
  176. pageSize: 1,
  177. currentPage: 40,
  178. data: [],
  179. })
  180. const keYiPiPeiDeZhenShu = ref({
  181. currentPage: 1,
  182. pageSize: 40,
  183. data: [],
  184. })
  185. const fuShuFeiYongXinXi = ref({})
  186. const weiPiPeiCurrentPage = (val) => {
  187. weiPiPei.value.currentPage = val
  188. }
  189. const weiGuiFeiYongCurrentPage = (val) => {
  190. weiGuiFeiYong.value.currentPage = val
  191. }
  192. const keYiPiPeiDeZhenShuCurrentPage = (val) => {
  193. keYiPiPeiDeZhenShu.value.currentPage = val
  194. }
  195. const keYiPiPeiDeZhenShuSizeChange = (val) => {
  196. keYiPiPeiDeZhenShu.value.pageSize = val
  197. }
  198. const zhenShuFeiYong = (val) => {
  199. let dateS = getDateRangeFormatDate(dateRange.value)
  200. let startTime = dateS.startTime
  201. let endTime = dateS.endTime
  202. fuShuFeiYongXinXi.value = val
  203. huoQuZhenShuKePiPei(val.inpatientNo, val.admissTimes, val.ledgerSn, val.chargeCodeMx, val.execUnit, startTime, endTime, riQiPaiXu.value).then((res) => {
  204. if (res.length === 0) {
  205. ElMessageBox.alert(
  206. `没有查询到对应的正数信息<br>
  207. 1、全部的正数(费用)可能已经全部都被匹配过了(被退了)。<br>
  208. 2、根本就没有收对应的正数。`,
  209. '警告',
  210. {
  211. dangerouslyUseHTMLString: true,
  212. type: 'error',
  213. }
  214. )
  215. } else {
  216. keYiPiPeiDeZhenShu.value.data = res
  217. keYiPiPeiDeZhenShu.value.currentPage = 1
  218. keYiPiPeiDeZhenShu.value.pageSize = 40
  219. feiYongXiuZhenDrawer.value = true
  220. }
  221. })
  222. }
  223. const linShiDuoXuan = ref([])
  224. const handleSelectionChange = (val) => {
  225. linShiDuoXuan.value = val
  226. }
  227. const piPeiShiFouDianJi = ref(false)
  228. const PiPeiClick = () => {
  229. ElMessageBox.confirm('请仔细检查', '提示', {
  230. type: 'warning',
  231. })
  232. .then(() => {
  233. fuShuFeiYongXinXi.value.list = linShiDuoXuan.value
  234. fuShuFeiYongXinXi.value.deptCode = store.state.user.info.deptCode
  235. caiFenPiPei(fuShuFeiYongXinXi.value).then((res) => {
  236. piPeiShiFouDianJi.value = true
  237. let data = weiGuiFeiYong.value.data
  238. for (let i = 0; i < data.length; i++) {
  239. if (
  240. data[i].inpatientNo === fuShuFeiYongXinXi.value.inpatientNo &&
  241. data[i].admissTimes === fuShuFeiYongXinXi.value.admissTimes &&
  242. data[i].ledgerSn === fuShuFeiYongXinXi.value.ledgerSn &&
  243. data[i].detailSn === fuShuFeiYongXinXi.value.detailSn
  244. ) {
  245. weiGuiFeiYong.value.data.splice(i, 1)
  246. }
  247. }
  248. feiYongXiuZhenDrawer.value = false
  249. })
  250. })
  251. .catch(() => {})
  252. }
  253. const shiFouBaoCun = (done) => {
  254. if (linShiDuoXuan.value.length === 0 || piPeiShiFouDianJi.value) {
  255. done()
  256. } else {
  257. ElMessageBox.confirm('您还有未保存的数据', '提示', {
  258. type: 'warning',
  259. confirmButtonText: '保存',
  260. cancelButtonText: '放弃',
  261. })
  262. .then((res) => {
  263. PiPeiClick()
  264. })
  265. .catch(() => {
  266. done()
  267. })
  268. }
  269. }
  270. watch(
  271. () => props.init,
  272. () => {
  273. genXingShuJu()
  274. }
  275. )
  276. onMounted(() => {
  277. genXingShuJu()
  278. chaoZuoZhiNan.value = true
  279. })
  280. const genXingShuJu = () => {
  281. // 违规的费用
  282. weiGuiFeiYong.value.currentPage = 1
  283. weiGuiFeiYong.value.pageSize = 40
  284. weiGuiFeiYong.value.data = props.patient.weiXieDaiYuanLiuShui
  285. // 没有匹配
  286. weiPiPei.value.currentPage = 1
  287. weiPiPei.value.pageSize = 15
  288. weiPiPei.value.data = props.patient.weiPiPei
  289. if (props.patient.weiPiPei.length === 0 && props.patient.weiXieDaiYuanLiuShui.length > 0) {
  290. weiGuiTabs.value = '违规退费'
  291. } else {
  292. weiGuiTabs.value = '未匹配'
  293. }
  294. }
  295. const chaoZuoZhiNan = ref(false)
  296. const ziDongPiPeiTuiFei = () => {
  297. ElMessageBox.confirm('如果你想每天的报表都可以对得上,那么就人工匹配,系统自动匹配<span style="color:red"> 天知道 </span>,你这一条退的是哪一天的,<br>ヾ(゚∀゚ゞ)。', '提示', {
  298. type: 'warning',
  299. dangerouslyUseHTMLString: true,
  300. })
  301. .then(() => {
  302. yiZhuTuiFeiPiPei(props.patient.inpatientNo, props.patient.admissTimes).then((res) => {
  303. ctx.emit('shuaXin')
  304. })
  305. })
  306. .catch(() => {})
  307. }
  308. return {
  309. weiPiPei,
  310. weiGuiFeiYong,
  311. huanZheXinXi,
  312. WinHeight,
  313. weiPiPeiCurrentPage,
  314. weiGuiFeiYongCurrentPage,
  315. zhenShuFeiYong,
  316. feiYongXiuZhenDrawer,
  317. keYiPiPeiDeZhenShu,
  318. keYiPiPeiDeZhenShuCurrentPage,
  319. fuShuFeiYongXinXi,
  320. PiPeiClick,
  321. handleSelectionChange,
  322. shiFouBaoCun,
  323. dateRange,
  324. riQiPaiXu,
  325. shortcuts,
  326. weiGuiTabs,
  327. chaoZuoZhiNan,
  328. keYiPiPeiDeZhenShuSizeChange,
  329. ziDongPiPeiTuiFei,
  330. }
  331. },
  332. }
  333. </script>
  334. <style></style>