index.js 6.0 KB

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