index.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. var template = ''
  2. $.ajax('../../../component/statistics/PatientSituation/index.html', {
  3. data: {},
  4. dataType: 'html',
  5. cache: false,
  6. timeout: 60000,
  7. async: false,
  8. error: function (res) {},
  9. success: function (res) {
  10. template = res
  11. }
  12. })
  13. Vue.component('patient-situation', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. years: [],
  19. yearType: '1',
  20. chooseYear: null,
  21. chooseTime: null,
  22. turnOverOptions: [],
  23. form: {},
  24. loading: false,
  25. exportLoading: false,
  26. tableData: [],
  27. tableHeader: [
  28. { label: '住院号', prop: 'visitNo', width: '110' },
  29. { label: '病人姓名', prop: 'patientName', width: '90' },
  30. { label: '性别', prop: 'sex', width: '80' },
  31. { label: '手机号', prop: 'mobile', width: '130' },
  32. { label: '身份证号', prop: 'idcard', width: '170' },
  33. { label: '费别', prop: 'rateTypeName', width: '90' },
  34. { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
  35. { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
  36. { label: '病情', prop: 'sickStateName', width: '110' },
  37. { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
  38. { label: '建床日期', prop: 'buildingTime', width: '170' },
  39. { label: '建床天数', prop: 'budildDays', width: '90' },
  40. { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
  41. { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
  42. { label: '转归情况', prop: 'turnOver', width: '110' }
  43. ],
  44. dialogShow: false,
  45. settlementInfo: {
  46. name: '黄小蕾',
  47. yibao: 'dk',
  48. pay: '1049'
  49. },
  50. dialogTable: [],
  51. dialogHeader: [
  52. { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
  53. { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
  54. { label: '金额', prop: 'COST', width: '80' },
  55. { label: '自付', prop: 'CHARGE', width: '80' },
  56. { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
  57. { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
  58. { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
  59. { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
  60. { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
  61. { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
  62. { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
  63. { label: '结算号', prop: 'SETTLE_NO', width: '80' },
  64. { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
  65. { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
  66. ],
  67. page: 1,
  68. size: 10,
  69. total: 0
  70. }
  71. },
  72. methods: {
  73. initTime() {
  74. var vm = this
  75. var now = new Date()
  76. vm.nowyear = vm.chooseYear = now.getFullYear()
  77. vm.years = []
  78. for (i = vm.nowyear; i >= 2013; i--) {
  79. vm.years.push(i)
  80. }
  81. },
  82. getList() {
  83. var vm = this
  84. this.loading = true
  85. var params = {
  86. ...this.form,
  87. page: this.page,
  88. pageSize: this.size
  89. }
  90. if (this.yearType == '1') {
  91. params.startDate = this.chooseYear + '-01-01 00:00'
  92. params.endDate = this.chooseYear + '-12-31 23:59'
  93. } else {
  94. if (this.chooseTime) {
  95. params.startDate = this.chooseTime[0] + ' 00:00'
  96. params.endDate = this.chooseTime[1]+ ' 23:59'
  97. }
  98. }
  99. httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
  100. if (res.status == 200) {
  101. vm.tableData = res.detailModelList
  102. vm.total = res.totalCount
  103. }
  104. vm.loading = false
  105. })
  106. },
  107. queryDate() {
  108. this.page = 1
  109. this.getList()
  110. },
  111. exportTable() {
  112. var vm = this
  113. var params = {
  114. ...this.form,
  115. page: this.page,
  116. pageSize: this.size
  117. }
  118. if (this.yearType == '1') {
  119. params.startDate = this.chooseYear + '-01-01 00:00'
  120. params.endDate = this.chooseYear + '-12-31 23:59'
  121. } else {
  122. if (this.chooseTime) {
  123. params.startDate = this.chooseTime[0] + ' 00:00'
  124. params.endDate = this.chooseTime[1]+ ' 23:59'
  125. }
  126. }
  127. this.exportLoading = true
  128. var fileName = `患者情况${new Date().getTime()}.xls`
  129. httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
  130. vm.exportLoading = false
  131. })
  132. },
  133. eliminateClick() {
  134. this.form = {}
  135. this.yearType = '1'
  136. this.chooseYear = new Date().getFullYear()
  137. this.chooseTime = null
  138. },
  139. closeDialog() {
  140. this.dialogShow = false
  141. },
  142. previewRecord(row) {
  143. var vm = this
  144. this.dialogShow = true
  145. vm.dialogTable = []
  146. vm.settlementInfo = {}
  147. // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
  148. httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
  149. if (res.status == 200) {
  150. vm.dialogTable = res.data
  151. var pay = 0
  152. for(var item of res.data){
  153. pay += item.COST
  154. }
  155. vm.settlementInfo = {
  156. name: row.patientName,
  157. yibao: row.cardNo,
  158. pay: pay
  159. }
  160. }
  161. })
  162. },
  163. getDictData() {
  164. var vm = this
  165. statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
  166. vm.turnOverOptions = [{ value: '全部' }]
  167. vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
  168. })
  169. },
  170. handleCurrentChange(val) {
  171. this.page = val
  172. this.getList()
  173. },
  174. handleSizeChange(val) {
  175. this.size = val
  176. this.getList()
  177. }
  178. },
  179. mounted() {
  180. this.initTime()
  181. this.getDictData()
  182. this.getList()
  183. }
  184. })