Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

detailStatistics.vue 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <div>
  3. <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
  4. <div>
  5. <el-select size="small" v-model="item_type" placeholder="请选择"
  6. style="width:150px;margin-left:10px;" @change="changeItem">
  7. <el-option
  8. label="全部"
  9. value="0">
  10. </el-option>
  11. <el-option
  12. v-for="(item,index) in items"
  13. :key="index"
  14. :label="item.name"
  15. :value="item.id">
  16. </el-option>
  17. </el-select>
  18. <el-input
  19. size="small"
  20. style="width: 150px"
  21. v-model="keywords"
  22. class="filter-item"
  23. placeholder="请输入项目名称"
  24. />
  25. <el-button
  26. size="small"
  27. style="margin: 0 10px"
  28. class="filter-item"
  29. type="primary"
  30. @click="searchAction"
  31. >搜索
  32. </el-button>
  33. <el-date-picker
  34. v-model="chargeDate"
  35. type="daterange"
  36. value-format="yyyy-MM-dd"
  37. range-separator="至"
  38. start-placeholder="开始日期"
  39. @change="changeDate"
  40. end-placeholder="结束日期">
  41. </el-date-picker>
  42. <el-button type="primary" size="small" @click="toPrint">打印</el-button>
  43. </div>
  44. <div>
  45. </div>
  46. </div>
  47. <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  48. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  49. max-height="600"
  50. v-loading="detail_loading"
  51. highlight-current-row>
  52. <el-table-column type="index" label="序号" width="60px" align="center">
  53. <template slot-scope="scope">
  54. {{scope.row.index}}
  55. </template>
  56. </el-table-column>
  57. <el-table-column align="center" prop="name" label="处方日期">
  58. <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
  59. </el-table-column>
  60. <el-table-column align="center" prop="name" label="费用编码">
  61. <template slot-scope="scope">
  62. {{scope.row.number}}
  63. </template>
  64. </el-table-column>
  65. <el-table-column align="center" prop="name" label="项目名称">
  66. <template slot-scope="scope">
  67. <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
  68. <span v-if="scope.row.project_id > 0">
  69. <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
  70. <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.good_name}}</span>
  71. </span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column align="center" prop="name" label="规格">
  75. <template slot-scope="scope">
  76. <span v-if="scope.row.advice_id > 0">{{scope.row.advice.drug.dose}}{{scope.row.advice.drug.dose_unit}}*{{scope.row.advice.drug.min_number}}{{scope.row.advice.drug.min_unit}}/{{scope.row.advice.drug.max_unit}}</span>
  77. <span v-if="scope.row.project_id > 0">
  78. <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
  79. <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.specification_name}}</span>
  80. </span>
  81. </template>
  82. </el-table-column>
  83. <el-table-column align="center" prop="name" label="数量">
  84. <template slot-scope="scope">
  85. {{scope.row.cnt}}
  86. </template>
  87. </el-table-column>
  88. <el-table-column align="center" prop="name" label="单价">
  89. <template slot-scope="scope">
  90. {{scope.row.pric}}
  91. </template>
  92. </el-table-column>
  93. <el-table-column align="center" prop="name" label="金额">
  94. <template slot-scope="scope">
  95. <div>
  96. {{scope.row.total_price}}
  97. </div>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <div>总费用:{{getAllPice()}}</div>
  102. <div>个人支付:{{getActPay()}}</div>
  103. <div>基金支付记账:{{getFundPaySumamt()}}</div>
  104. <div>补充医疗支付记账:{{getHifesPay()}}</div>
  105. <div>救助支付金额:{{getMafPay()}}</div>
  106. </div>
  107. <!-- </div> -->
  108. </template>
  109. <script>
  110. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  111. import { getHisSummaryDetailList } from '@/api/his/his_tools'
  112. const moment = require('moment')
  113. import { uParseTime } from '@/utils/tools'
  114. export default {
  115. components: {
  116. BreadCrumb
  117. },
  118. props: {
  119. patient_id: {
  120. type: Number,
  121. default: 0
  122. }
  123. },
  124. data() {
  125. return {
  126. detail_loading: false,
  127. tempArr: [],
  128. pos: 0,
  129. search_input: '',
  130. sameRowArr: [],
  131. keywords: '',
  132. tableData: [],
  133. chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
  134. item_type: '0',
  135. items: [
  136. { id: 1, name: '药品' },
  137. { id: 3, name: '耗材' },
  138. { id: 2, name: '项目' }
  139. ],
  140. list:[],
  141. }
  142. },
  143. methods: {
  144. getTime(val) {
  145. if(val <= 0){
  146. return ""
  147. }
  148. if(val == ""){
  149. return ""
  150. }else {
  151. return uParseTime(val, '{y}-{m}-{d}')
  152. }
  153. },
  154. searchAction(){
  155. this.getHisSummaryDetailList()
  156. },
  157. changeDate() {
  158. this.getHisSummaryDetailList()
  159. },
  160. changeItem() {
  161. this.getHisSummaryDetailList()
  162. },
  163. getHisSummaryDetailList() {
  164. let start_time = this.chargeDate[0]
  165. let end_time = this.chargeDate[1]
  166. let params = {
  167. patient_id:this.patient_id,
  168. start_time: start_time,
  169. end_time: end_time,
  170. type: this.item_type,
  171. keyword: this.keywords
  172. }
  173. // console.log("patient_id 233232323232323",this.patient_id)
  174. getHisSummaryDetailList(params).then(response=>{
  175. if(response.data.state == 1){
  176. var list = response.data.data.list
  177. this.list = list
  178. this.tableData = []
  179. for(let i=0;i<list.length;i++){
  180. for(let j=0;j<list[i].orders.length;j++){
  181. for(let z=0;z<list[i].orders[j].order_info.length;z++){
  182. list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
  183. list[i].orders[j].order_info[z].number = list[i].orders[j].number
  184. this.tableData.push(list[i].orders[j].order_info[z])
  185. }
  186. }
  187. }
  188. var obj = {index:"合计",total_price:0,record_date:"0"}
  189. for(let i=0;i<this.tableData.length;i++){
  190. this.tableData[i].index = i+1
  191. this.tableData[i].total_price = 0
  192. this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
  193. obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)
  194. }
  195. obj.total_price = (obj.total_price).toFixed(2)
  196. // console.log("tabledate23232332233223",this.tableData)
  197. this.tableData.push(obj)
  198. var new_arr = []
  199. if(this.keywords!=""){
  200. for(let i=0;i<this.tableData.length;i++){
  201. if(this.tableData[i].index!="合计"){
  202. if(this.tableData[i].advice_id > 0){
  203. if(this.tableData[i].advice.advice_name.indexOf(this.keywords) > -1){
  204. new_arr.push(this.tableData[i])
  205. }
  206. }
  207. if(this.tableData[i].project_id >0){
  208. if(this.tableData[i].project.type == 2){
  209. if(this.tableData[i].project.project.project_name.indexOf(this.keywords) > -1){
  210. new_arr.push(this.tableData[i])
  211. }
  212. }
  213. if(this.tableData[i].project.type == 3){
  214. if(this.tableData[i].project.good_info.good_name.indexOf(this.keywords)> - 1){
  215. new_arr.push(this.tableData[i])
  216. }
  217. }
  218. }
  219. }
  220. }
  221. if(this.keywords!=""){
  222. this.tableData.push(obj)
  223. }
  224. this.tableData = new_arr
  225. }
  226. }
  227. })
  228. },
  229. getAllPice(){
  230. var total_price = 0
  231. for(let i=0;i<this.tableData.length;i++){
  232. if(this.tableData[i].index =="合计"){
  233. total_price = this.tableData[i].total_price
  234. }
  235. }
  236. return total_price
  237. },
  238. getActPay(){
  239. // console.log("hh23h323223323",this.list)
  240. var act_pay = 0
  241. for(let i=0;i<this.list.length;i++){
  242. for(let j=0;j<this.list[i].orders.length;j++){
  243. act_pay +=this.list[i].orders[j].acct_pay
  244. }
  245. }
  246. return act_pay
  247. },
  248. getFundPaySumamt(){
  249. var fund_pay_sumamt = 0
  250. for(let i=0;i<this.list.length;i++){
  251. for(let j=0;j<this.list[i].orders.length;j++){
  252. fund_pay_sumamt +=this.list[i].orders[j].fund_pay_sumamt
  253. }
  254. }
  255. return fund_pay_sumamt
  256. },
  257. getHifesPay(){
  258. var hifes_pay = 0
  259. for(let i=0;i<this.list.length;i++){
  260. for(let j=0;j<this.list[i].orders.length;j++){
  261. hifes_pay +=this.list[i].orders[j].hifes_pay
  262. }
  263. }
  264. return hifes_pay
  265. },
  266. getMafPay(){
  267. var maf_pay = 0
  268. for(let i=0;i<this.list.length;i++){
  269. for(let j=0;j<this.list[i].orders.length;j++){
  270. maf_pay +=this.list[i].orders[j].maf_pay
  271. }
  272. }
  273. return maf_pay
  274. },
  275. toPrint(){
  276. this.$router.push({path:"/hisTool/detailPrint?patient_id="+this.patient_id+"&start_time="+this.chargeDate[0]+"&end_time="+this.chargeDate[1]+"&type="+this.item_type +"&keyword="+this.keywords})
  277. }
  278. },
  279. created() {
  280. this.getHisSummaryDetailList()
  281. },
  282. watch:{
  283. "patient_id":function(){
  284. this.patient_id = this.patient_id
  285. this.getHisSummaryDetailList()
  286. }
  287. }
  288. }
  289. </script>