index.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. this.loading = true
  114. var params = {
  115. ...this.form,
  116. page: this.page,
  117. pageSize: this.size
  118. }
  119. if (this.yearType == '1') {
  120. params.startDate = this.chooseYear + '-01-01 00:00'
  121. params.endDate = this.chooseYear + '-12-31 23:59'
  122. } else {
  123. if (this.chooseTime) {
  124. params.startDate = this.chooseTime[0] + ' 00:00'
  125. params.endDate = this.chooseTime[1]+ ' 23:59'
  126. }
  127. }
  128. this.exportLoading = true
  129. var fileName = `患者情况${new Date().getTime()}.xls`
  130. httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
  131. vm.exportLoading = false
  132. })
  133. },
  134. eliminateClick() {
  135. this.form = {}
  136. this.yearType = '1'
  137. this.chooseYear = new Date().getFullYear()
  138. this.chooseTime = null
  139. },
  140. closeDialog() {
  141. this.dialogShow = false
  142. },
  143. previewRecord(row) {
  144. var vm = this
  145. this.dialogShow = true
  146. vm.dialogTable = []
  147. vm.settlementInfo = {}
  148. // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
  149. httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
  150. if (res.status == 200) {
  151. vm.dialogTable = res.data
  152. var pay = 0
  153. for(var item of res.data){
  154. pay += item.COST
  155. }
  156. vm.settlementInfo = {
  157. name: row.patientName,
  158. yibao: row.cardNo,
  159. pay: pay
  160. }
  161. }
  162. })
  163. },
  164. getDictData() {
  165. var vm = this
  166. statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
  167. vm.turnOverOptions = [{ value: '全部' }]
  168. vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
  169. })
  170. },
  171. handleCurrentChange(val) {
  172. this.page = val
  173. this.getList()
  174. },
  175. handleSizeChange(val) {
  176. this.size = val
  177. this.getList()
  178. }
  179. },
  180. mounted() {
  181. this.initTime()
  182. this.getDictData()
  183. this.getList()
  184. }
  185. })