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

gatherPrint.vue 42KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
  1. <template>
  2. <div>
  3. <div class="print_btn">
  4. <el-button type="primary" @click="printtpage">打印</el-button>
  5. </div>
  6. <div id="list-print" class="list-print">
  7. <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用汇总</div>
  8. <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 10px;">
  9. <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
  10. </div>
  11. <div class="listInfo">
  12. <div>科别:
  13. <span v-if="org_id!=10215"> {{getDepartment(his_patient.departments)}}</span>
  14. {{getDepartment(his_record_patient.departments)}}
  15. </div>
  16. <div>床号:<span v-if="schedule.length > 0">{{getBedName(schedule[0].bed_id)}}</span></div>
  17. <div>门诊号:
  18. <span v-if="org_id!=10215">{{his_patient.number}}</span>
  19. {{his_record_patient.ipt_otp_no}}
  20. </div>
  21. <div>姓名:{{patient.name}}</div>
  22. </div>
  23. <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 20px;">
  24. <div>预交款:</div>
  25. <div>总费用:{{getAllPice()}}</div>
  26. <div>门诊日期:{{this.$route.query.end_time}}</div>
  27. </div>
  28. <div class="listInfo">
  29. <div>西药:{{getWesternMedicineCostTotal()}}</div>
  30. <div>中成药:{{getChineseTraditionalMedicineCostTotal()}}</div>
  31. <div>中草药:{{getChineseTotal()}}</div>
  32. </div>
  33. <div class="listInfo">
  34. <div>检查费:{{getCheckCostTotal()}}</div>
  35. <div>输氧费:{{getOxygen()}}</div>
  36. <div>手术费:{{getOperation()}}</div>
  37. </div>
  38. <div class="listInfo">
  39. <div>化验费:{{getLaboratoryCostTotal()}}</div>
  40. <div>输血费:{{getBlood()}}</div>
  41. <div>诊断费:{{getZhenChaCostTotal()}}</div>
  42. </div>
  43. <div class="listInfo">
  44. <div>治疗费:{{getTreatement()}}</div>
  45. <div>护理费:{{getNursing()}}</div>
  46. <div>床位费:{{getBedCostTotal()}}</div>
  47. </div>
  48. <div class="listInfo" style="margin-bottom: 10px;">
  49. <div>麻醉费:{{getAnesthesia()}}</div>
  50. <div>材料费:{{getMaterialCostTotal()}}</div>
  51. <div>其他:{{getOtherCostTotal()}}</div>
  52. </div>
  53. <div class="listInfo" style="margin-bottom: 20px;">
  54. <div>记账支付:{{getFundPaySumamt()}}</div>
  55. <div>个人账号:{{getAcctPay()}}</div>
  56. <div>现金支付:{{getActPay()}}</div>
  57. </div>
  58. <table class="listTable" border="1">
  59. <tr>
  60. <td style="text-align:center" >序号</td>
  61. <td style="text-align:center" >费用分类</td>
  62. <td style="text-align:center">项目名称</td>
  63. <td style="text-align:center">规格</td>
  64. <td style="text-align:center">单价</td>
  65. <td style="text-align:center" >数量</td>
  66. <td style="text-align:center">金额</td>
  67. <td style="text-align:center" >医保类别</td>
  68. </tr>
  69. <tr v-for="(item, index) in tableList" :key="index">
  70. <td style="text-align:center" >
  71. <span v-if="item.is_total == 2">{{index+1}}</span>
  72. <span v-if="item.is_total == 1">合计</span>
  73. </td>
  74. <td style="text-align:center" >
  75. <span v-if="item.type == 1">
  76. {{item.cost_type}}
  77. </span>
  78. <span v-if="item.type == 2">
  79. {{item.cost_type}}
  80. </span>
  81. <span v-if="item.type == 3">
  82. 材料费
  83. </span>
  84. </td>
  85. <td style="text-align:center" >
  86. <span>{{item.name}}</span>
  87. </td>
  88. <td style="text-align:center" >
  89. {{ item.spec }}
  90. </td>
  91. <td style="text-align:center" >
  92. {{item.pric}}
  93. </td>
  94. <td style="text-align:center" >
  95. {{item.count_number }}{{item.unit }}
  96. </td>
  97. <td style="text-align:center" >
  98. <span v-if="item.is_total == 1">{{ item.total }}</span>
  99. <span v-if="item.is_total == 2">{{ (item.pric * item.count_number).toFixed(2) }}</span>
  100. </td>
  101. <td style="text-align:center" >
  102. {{getChrgitmLv(item.medical_insurance_level)}}
  103. </td>
  104. </tr>
  105. </table>
  106. </div>
  107. </div>
  108. </template>
  109. <script>
  110. import print from "print-js";
  111. import { uParseTime } from '@/utils/tools'
  112. import { getGatherDetailList } from '@/api/his/his_tools'
  113. export default {
  114. data(){
  115. return{
  116. patient:{},
  117. tableData:[],
  118. list:[],
  119. order:[],
  120. his_patient:{},
  121. hisDepatment:[],
  122. chineseTraditionalMedicineCostTotal:"",//中成药
  123. checkCostTotal:"",//检查费
  124. materialCostTotal:"",//材料费
  125. laboratoryCostTotal:"",//化验费
  126. bedCostTotal:"",//床位费,
  127. operationCostTotal:"",//材料费
  128. zhenChaCostTotal:"",//诊查费
  129. otherCostTotal:"",//其他费用
  130. tableList:[],
  131. order_info_list:[],
  132. balanceAccountsType:0,
  133. medicalInsuranceLevelList:[],
  134. schedule:[],
  135. bedNumber:[],
  136. order_info_list:[],
  137. balanceAccountsType:0,
  138. medicalInsuranceLevelList:[],
  139. drugTypeList:[],
  140. costClassifyList:[],
  141. id:0,
  142. start_time:"",
  143. end_time:"",
  144. his_record_patient:{},
  145. orderList:[],
  146. org_id:0,
  147. list:[],
  148. }
  149. },
  150. methods:{
  151. printtpage() {
  152. const style =
  153. '@media print {.list-print{width:960px;margin:0 auto} .listTitle {font-size: 24px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo {display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listInfo div{width:400px;} .listTable {width: 100%;text-align: center;border-collapse: collapse;line-height: 25px;font-size: 14px;border-color: #000;text-align: left;} .listTable tr td {padding: 0 5px;}.tableBottom {font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne {margin-right: 40px;}';
  154. printJS({
  155. printable: "list-print",
  156. type: "html",
  157. style: style,
  158. scanStyles: false,
  159. });
  160. },
  161. getNowTime: function () {
  162. let dateTime;
  163. let yy = new Date().getFullYear();
  164. let mm = new Date().getMonth() + 1;
  165. let dd = new Date().getDate();
  166. let hh = new Date().getHours();
  167. let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
  168. :
  169. new Date().getMinutes();
  170. let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
  171. :
  172. new Date().getSeconds();
  173. dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
  174. return dateTime
  175. },
  176. getTimes(time) {
  177. return uParseTime(time, '{y}-{m}-{d}')
  178. },
  179. getGatherDetailList() {
  180. let start_time = this.$route.query.start_time
  181. let end_time = this.$route.query.end_time
  182. let params = {
  183. patient_id:this.$route.query.patient_id,
  184. start_time: start_time,
  185. end_time: end_time,
  186. type: this.$route.query.type,
  187. keyword: this.$route.query.keyword
  188. }
  189. getGatherDetailList(params).then(response=>{
  190. if (response.data.state == 0) {
  191. this.$message.error(response.data.msg)
  192. return false
  193. } else {
  194. this.drugTypeList =response.data.data.drugTypeList
  195. this.costClassifyList = response.data.data.costClassifyList
  196. var list = response.data.data.list
  197. this.list = list
  198. this.orderList = response.data.data.orderList
  199. console.log("orderlist23323223",this.orderList)
  200. var new_arr = []
  201. for(let i=0;i<list.length;i++){
  202. for(let j=0;j<list[i].orders.length;j++){
  203. new_arr.push(list[i].orders[j])
  204. }
  205. }
  206. var order_info = []
  207. for(let i=0;i<new_arr.length;i++){
  208. for(let j=0;j<new_arr[i].order_info.length;j++){
  209. order_info.push(new_arr[i].order_info[j])
  210. }
  211. }
  212. for(let i=0;i<order_info.length;i++){
  213. if(order_info[i].advice_id > 0){
  214. order_info[i].item_id = order_info[i].advice.drug.id +"_" + order_info[i].pric
  215. }
  216. if(order_info[i].project_id > 0){
  217. if(order_info[i].project.type == 2){
  218. order_info[i].item_id = order_info[i].project.project.id + "_"+order_info[i].pric
  219. }
  220. if(order_info[i].project.type == 3){
  221. order_info[i].item_id = order_info[i].project.good_info.id + "_"+order_info[i].pric
  222. }
  223. }
  224. }
  225. //合并,相同的合并在一起
  226. let dataInfo = {}
  227. order_info.forEach((item, index) => {
  228. let { item_id } = item
  229. if (!dataInfo[item_id]) {
  230. dataInfo[item_id] = {
  231. item_id,
  232. child: [],
  233. count_number:0,
  234. record_date:"",
  235. cost_type:"",
  236. name:"",
  237. pric:item.pric,
  238. chrgitm_lv:"",
  239. advice_id:item.advice_id,
  240. project_id:item.project_id,
  241. type:0,
  242. spec:"",
  243. unit:"",
  244. medical_insurance_level:"",
  245. cost_type:"",
  246. is_total:2,
  247. }
  248. }
  249. dataInfo[item_id].child.push(item)
  250. })
  251. let arr = Object.values(dataInfo)
  252. for(let i=0;i<arr.length;i++){
  253. for(let j=0;j<arr[i].child.length;j++){
  254. if(arr[i].advice_id >0){
  255. arr[i].record_date = arr[i].child[0].advice.advice_date
  256. arr[i].type = 1
  257. arr[i].name = arr[i].child[0].advice.advice_name
  258. arr[i].spec = arr[i].child[0].advice.drug.dose + arr[i].child[0].advice.drug.dose_unit + "*"+arr[i].child[0].advice.drug.min_number + arr[i].child[0].advice.drug.min_unit+"/"+arr[i].child[0].advice.drug.max_unit
  259. arr[i].unit = arr[i].child[0].advice.prescribing_number_unit
  260. arr[i].cost_type = arr[i].child[0].advice.drug.drug_type
  261. arr[i].medical_insurance_level = arr[i].child[0].advice.drug.medical_insurance_level
  262. }
  263. if(arr[i].project_id > 0){
  264. arr[i].record_date = arr[i].child[0].project.record_date
  265. arr[i].type = arr[i].child[0].project.type
  266. if(arr[i].child[0].project.type == 2){
  267. arr[i].name = arr[i].child[0].project.project.project_name
  268. arr[i].spec = arr[i].child[0].project.project.project_name
  269. arr[i].unit = arr[i].child[0].project.project.unit
  270. arr[i].medical_insurance_level = arr[i].child[0].project.project.medical_coverage
  271. arr[i].cost_type = arr[i].child[0].project.project.cost_classify
  272. }
  273. if(arr[i].child[0].project.type == 3){
  274. arr[i].name = arr[i].child[0].project.good_info.good_name
  275. arr[i].spec = arr[i].child[0].project.good_info.specification_name
  276. arr[i].unit = arr[i].child[0].project.good_info.packing_unit
  277. arr[i].medical_insurance_level = arr[i].child[0].project.good_info.medical_insurance_level
  278. arr[i].cost_type = "材料费"
  279. }
  280. }
  281. arr[i].count_number +=arr[i].child[j].cnt
  282. }
  283. }
  284. var obj = {is_total:1,total:0}
  285. obj.total = this.getAllPiceTwo(arr)
  286. for(let i=0;i<arr.length;i++){
  287. if(arr[i].advice_id >0){
  288. arr[i].cost_type = this.getDrugType(arr[i].cost_type)
  289. }
  290. if(arr[i].type ==2){
  291. arr[i].cost_type = this.getCostType(arr[i].cost_type)
  292. }
  293. }
  294. arr.push(obj)
  295. this.tableList = arr
  296. this.patient = response.data.data.patient
  297. this.his_patient = response.data.data.his_patient
  298. this.hisDepatment = response.data.data.hisDepatment
  299. this.order = response.data.data.order
  300. this.his_record_patient = response.data.data.his_record_patient
  301. this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
  302. this.schedule = response.data.data.schedule
  303. this.bedNumber = response.data.data.bedNumber
  304. if(this.$route.query.keyword !=""){
  305. var new_arr = []
  306. for(let i=0;i<this.tableList.length;i++){
  307. if(this.tableList[i].is_total!=1){
  308. if(this.tableList[i].name.indexOf(this.$route.query.keyword) >-1){
  309. new_arr.push(this.tableList[i])
  310. }
  311. }
  312. }
  313. var obj ={index:"合计",is_total:1,total:0}
  314. obj.total = this.getAllPiceTwo(new_arr)
  315. new_arr.push(obj)
  316. this.tableList = []
  317. this.tableList = new_arr
  318. }
  319. if(this.$route.query.id == 1){
  320. var new_arr = []
  321. for(let i=0;i<this.tableList.length;i++){
  322. if(this.tableList[i].is_total!=1){
  323. if(this.tableList[i].type == 1){
  324. new_arr.push(this.tableList[i])
  325. }
  326. }
  327. }
  328. this.tableList = []
  329. this.tableList = new_arr
  330. }
  331. if(this.$route.query.id == 2){
  332. var new_arr = []
  333. for(let i=0;i<this.tableList.length;i++){
  334. if(this.tableList[i].is_total!=1){
  335. if(this.tableList[i].type == 2){
  336. new_arr.push(this.tableList[i])
  337. }
  338. }
  339. }
  340. this.tableList = []
  341. this.tableList = new_arr
  342. }
  343. if(this.$route.query.id == 3){
  344. var new_arr = []
  345. for(let i=0;i<this.tableList.length;i++){
  346. if(this.tableList[i].is_total!=1){
  347. if(this.tableList[i].type == 3){
  348. new_arr.push(this.tableList[i])
  349. }
  350. }
  351. }
  352. this.tableList = []
  353. this.tableList = new_arr
  354. }
  355. }
  356. })
  357. },
  358. getAdviceName(id){
  359. var drug_name = ""
  360. for(let i= 0;i<this.tableData.length;i++){
  361. if(id == this.tableData[i].advice_id){
  362. drug_name = this.tableData[i].advice.advice_name
  363. }
  364. }
  365. return drug_name
  366. },
  367. getProjectName(id){
  368. var project_name = ""
  369. for(let i=0;i<this.tableData.length;i++){
  370. if(id == this.tableData[i].project_id){
  371. project_name = this.tableData[i].project.project.project_name
  372. }
  373. }
  374. return project_name
  375. },
  376. setNewData(details) {
  377. let drug_ids = []
  378. let project_ids = []
  379. for (let i = 0; i < details.length; i++) {
  380. if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
  381. let obj = {
  382. id: details[i].advice.drug_id,
  383. price: details[i].advice.price,
  384. record_date:details[i].advice.advice_date
  385. }
  386. drug_ids.push(obj)
  387. } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
  388. let obj = {
  389. id: details[i].project.project_id,
  390. price: details[i].project.price,
  391. record_date:details[i].advice.record_date
  392. }
  393. project_ids.push(obj)
  394. }
  395. }
  396. let new_drug_ids = this.unique(drug_ids)
  397. let new_project_ids = this.unique(project_ids)
  398. let list = []
  399. if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
  400. for (let i = 0; i < new_drug_ids.length; i++) {
  401. let obj = {}
  402. let count = 0
  403. for (let a = 0; a < details.length; a++) {
  404. if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
  405. obj['name'] = details[a].advice.advice_name
  406. obj['spec'] = details[a].advice.drug.dose + details[a].advice.drug.dose_unit+"*" + details[a].advice.drug.min_number + details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
  407. obj['unit'] = details[a].advice.drug.min_unit
  408. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  409. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  410. obj['price'] = parseFloat(details[a].pric)
  411. obj['is_total'] = 2
  412. obj['record_date'] = details[a].advice.record_date
  413. obj['chrgitm_lv'] = details[a].chrgitm_lv
  414. count = count + details[a].cnt
  415. }
  416. }
  417. obj['count'] = count
  418. list.push(obj)
  419. }
  420. }
  421. if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
  422. for (let i = 0; i < new_project_ids.length; i++) {
  423. let obj = {}
  424. let count = 0
  425. for (let a = 0; a < details.length; a++) {
  426. if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
  427. if( details[a].project.type == 2){
  428. obj['name'] = details[a].project.project.project_name
  429. obj['spec'] = details[a].project.project.project_name
  430. obj['unit'] = details[a].project.project.unit
  431. obj['record_date'] = details[a].project.record_date
  432. }else if(details[a].project.type == 3){
  433. obj['name'] = details[a].project.good_info.good_name
  434. obj['spec'] = details[a].project.good_info.specification_name
  435. obj['unit'] = details[a].project.good_info.packing_unit
  436. obj['record_date'] = details[a].project.record_date
  437. }
  438. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  439. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  440. obj['price'] = parseFloat(details[a].pric)
  441. obj['is_total'] = 2
  442. obj['chrgitm_lv'] = details[a].chrgitm_lv
  443. count = count + details[a].cnt
  444. }
  445. }
  446. obj['count'] = count
  447. list.push(obj)
  448. }
  449. }
  450. if (new_drug_ids.length > 0 && new_project_ids.length > 0) {
  451. for (let i = 0; i < new_drug_ids.length; i++) {
  452. let obj = {}
  453. let count = 0
  454. for (let a = 0; a < details.length; a++) {
  455. if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
  456. obj['name'] = details[a].advice.advice_name
  457. obj['spec'] = details[a].advice.drug.dose + details[a].advice.drug.dose_unit+"*" + details[a].advice.drug.min_number + details[a].advice.drug.min_unit+"/"+ details[a].advice.drug.max_unit
  458. obj['unit'] = details[a].advice.drug.min_unit
  459. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  460. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  461. obj['price'] = parseFloat(details[a].pric)
  462. obj['is_total'] = 2
  463. obj['record_date'] = details[a].advice.record_date
  464. obj['chrgitm_lv'] = details[a].chrgitm_lv
  465. count = count + details[a].cnt
  466. }
  467. }
  468. obj['count'] = count
  469. list.push(obj)
  470. }
  471. for (let i = 0; i < new_project_ids.length; i++) {
  472. let obj = {}
  473. let count = 0
  474. for (let a = 0; a < details.length; a++) {
  475. if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
  476. if( details[a].project.type == 2){
  477. obj['name'] = details[a].project.project.project_name
  478. obj['spec'] = ''
  479. obj['unit'] = details[a].project.project.unit
  480. }else if(details[a].project.type == 3){
  481. obj['name'] = details[a].project.good_info.good_name
  482. obj['spec'] = ''
  483. obj['unit'] = details[a].project.good_info.packing_unit
  484. }
  485. obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
  486. obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
  487. obj['price'] = parseFloat(details[a].pric)
  488. obj['is_total'] = 2
  489. obj['record_date'] = details[a].project.record_date
  490. obj['chrgitm_lv'] = details[a].chrgitm_lv
  491. count = count + details[a].cnt
  492. }
  493. }
  494. obj['count'] = count
  495. list.push(obj)
  496. }
  497. }
  498. return list
  499. },
  500. getMedicineInsuranceType(type) {
  501. switch (type) {
  502. case "01":
  503. return '甲类'
  504. break
  505. case "02":
  506. return '乙类'
  507. break
  508. case "03":
  509. return '自费'
  510. break
  511. }
  512. },
  513. getType(med_chrgitm_type){
  514. switch (med_chrgitm_type) {
  515. case '01':
  516. return '床位费'
  517. break
  518. case '02':
  519. return '诊察费'
  520. break
  521. case '03':
  522. return '检查费'
  523. break
  524. case '04':
  525. return '化验费'
  526. break
  527. case '05':
  528. return '治疗费'
  529. break
  530. case '06':
  531. return '手术费'
  532. break
  533. case '07':
  534. return '护理费'
  535. break
  536. case '08':
  537. return '材料费'
  538. break
  539. case '09':
  540. return '西药费'
  541. break
  542. case '10':
  543. return '中药饮片费'
  544. break
  545. case '11':
  546. return '中成药费'
  547. break
  548. case '12':
  549. return '一般诊疗费'
  550. break
  551. case '13':
  552. return '挂号费'
  553. break
  554. case '14':
  555. return '其他费'
  556. break
  557. }
  558. },
  559. unique(array) {
  560. // res用来存储结果
  561. var res = []
  562. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  563. for (var j = 0, resLen = res.length; j < resLen; j++) {
  564. if (array[i].id === res[j].id && array[i].price === res[j].price) {
  565. break
  566. }
  567. }
  568. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  569. if (j === resLen) {
  570. res.push(array[i])
  571. }
  572. }
  573. return res
  574. },
  575. getTotal:function(items){
  576. let total = 0
  577. for(let i = 0; i < items.length; i++){
  578. total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
  579. }
  580. return total.toFixed(2)
  581. },
  582. getTimes(time) {
  583. if(time < 0){
  584. return ""
  585. }else{
  586. return uParseTime(time, '{y}-{m}-{d}')
  587. }
  588. },
  589. getDepartment(id){
  590. var name = ""
  591. for(let i=0;i<this.hisDepatment.length;i++){
  592. if(id == this.hisDepatment[i].id){
  593. name = this.hisDepatment[i].name
  594. }
  595. }
  596. return name
  597. },
  598. getAllPice(){
  599. var total_price = 0
  600. for(let i=0;i<this.tableList.length;i++){
  601. if(this.tableList[i].is_total ==2){
  602. total_price += (this.tableList[i].pric * parseInt(this.tableList[i].count_number))
  603. }
  604. }
  605. if(total_price > 0){
  606. return total_price.toFixed(2)
  607. }else{
  608. return "0.00"
  609. }
  610. },
  611. getAllPiceTwo(arr){
  612. var total_price = 0
  613. for(let i=0;i<arr.length;i++){
  614. if(arr[i].is_total ==2){
  615. total_price += (arr[i].pric * parseInt(arr[i].count_number))
  616. }
  617. }
  618. if(total_price > 0){
  619. return total_price.toFixed(2)
  620. }else{
  621. return total_price
  622. }
  623. },
  624. setMonthPrescription(month_prescriptions) {
  625. let drug_month_prescriptions = {
  626. advices: []
  627. }
  628. let drug_ids = []
  629. let project_month_prescriptions = {
  630. project: []
  631. }
  632. let project_ids = []
  633. for (let i = 0; i < month_prescriptions.length; i++) {
  634. if (month_prescriptions[i].type == 1) { //药品
  635. for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
  636. let obj = {
  637. id: month_prescriptions[i].advices[a].drug_id,
  638. price: month_prescriptions[i].advices[a].price
  639. }
  640. drug_ids.push(obj)
  641. drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
  642. }
  643. } else if (month_prescriptions[i].type == 2) { //项目
  644. for (let a = 0; a < month_prescriptions[i].project.length; a++) {
  645. let obj = {
  646. id: month_prescriptions[i].project[a].project_id,
  647. price: month_prescriptions[i].project[a].price
  648. }
  649. project_ids.push(obj)
  650. project_month_prescriptions.project.push(month_prescriptions[i].project[a])
  651. }
  652. }
  653. }
  654. drug_ids = this.unique(drug_ids)
  655. project_ids= this.unique(project_ids)
  656. for (let i = 0; i < drug_ids.length; i++) {
  657. let obj = {}
  658. let count = 0
  659. for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
  660. if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
  661. obj['advice_id'] = drug_month_prescriptions.advices[a].id
  662. obj['name'] = drug_month_prescriptions.advices[a].advice_name
  663. obj['statistical_classification'] = ''
  664. obj['type'] = 1
  665. obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
  666. obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
  667. obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
  668. obj['day'] = drug_month_prescriptions.advices[a].day
  669. obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
  670. obj['remark'] = drug_month_prescriptions.advices[a].remark
  671. obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
  672. obj['record_date'] = drug_month_prescriptions.advices[a].advice_date
  673. obj['spec'] = drug_month_prescriptions.advices[a].drug.dose + drug_month_prescriptions.advices[a].drug.dose_unit +"*" + drug_month_prescriptions.advices[a].drug.min_number + drug_month_prescriptions.advices[a].drug.min_unit + "/" + drug_month_prescriptions.advices[a].drug.max_unit
  674. obj['is_total'] = 2
  675. obj['chrgitm_lv'] = drug_month_prescriptions.advices[a].drug.medical_insurance_level
  676. obj['unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
  677. count = count + drug_month_prescriptions.advices[a].prescribing_number
  678. }
  679. }
  680. obj['count'] = count
  681. this.tableList.push(obj)
  682. }
  683. for (let i = 0; i < project_ids.length; i++) {
  684. let obj = {}
  685. let count = 0
  686. for (let a = 0; a < project_month_prescriptions.project.length; a++) {
  687. if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
  688. if(project_month_prescriptions.project[a].type == 2){
  689. obj['project_id'] = project_month_prescriptions.project[a].id
  690. obj['name'] = project_month_prescriptions.project[a].project.project_name
  691. obj['statistical_classification'] = ''
  692. obj['project_type'] = 2
  693. obj['spec'] = project_month_prescriptions.project[a].project.project_name
  694. obj['unit'] = project_month_prescriptions.project[a].unit
  695. obj['chrgitm_lv'] = project_month_prescriptions.project[a].project.medical_coverage
  696. }else if (project_month_prescriptions.project[a].type == 3){
  697. obj['project_id'] = project_month_prescriptions.project[a].id
  698. obj['name'] = project_month_prescriptions.project[a].good_info.good_name
  699. obj['statistical_classification'] = ''
  700. obj['project_type'] = 3
  701. obj['spec'] = project_month_prescriptions.project[a].good_info.specification_name
  702. obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
  703. obj['chrgitm_lv'] = project_month_prescriptions.project[a].good_info.medical_insurance_level
  704. }
  705. obj['single_dose'] = project_month_prescriptions.project[a].single_dose
  706. obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
  707. obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
  708. obj['day'] = project_month_prescriptions.project[a].day
  709. obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
  710. obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
  711. count = count + parseFloat(project_month_prescriptions.project[a].count)
  712. obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
  713. obj['remark'] = project_month_prescriptions.project[a].remark
  714. obj['type'] = 2
  715. obj['record_date'] = project_month_prescriptions.project[a].record_date
  716. obj['is_total'] = 2
  717. }
  718. }
  719. obj['count'] = count
  720. this.tableList.push(obj)
  721. }
  722. var objOne = {index:"合计",is_total:1,total:0}
  723. objOne.total = this.getTotalPrice(this.tableList)
  724. for(let i=0;i<this.tableList.length;i++){
  725. this.tableList[i].index = i + 1
  726. }
  727. this.tableList.push(objOne)
  728. },
  729. getTotalPrice(val){
  730. var total_price = 0
  731. for(let i=0;i<val.length;i++){
  732. total_price +=val[i].count * val[i].price
  733. }
  734. return total_price.toFixed(2)
  735. },
  736. getTotalPriceTwo(val){
  737. var total_price = 0
  738. for(let i=0;i<val.length;i++){
  739. if(val[i].is_total!=1){
  740. total_price +=val[i].count * val[i].price
  741. }
  742. }
  743. return total_price.toFixed(2)
  744. },
  745. getAdviceMedChrgintmType(name){
  746. var med_chrgitm_type = ""
  747. for(let i=0;i<this.order_info_list.length;i++){
  748. if(name == this.order_info_list[i].advice.advice_name){
  749. med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
  750. }
  751. }
  752. return med_chrgitm_type
  753. },
  754. getProjectMedChrgintmType(project_id){
  755. var med_chrgitm_type = ""
  756. for(let i=0;i<this.order_info_list.length;i++){
  757. if(project_id == this.order_info_list[i].project_id){
  758. med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
  759. }
  760. }
  761. return med_chrgitm_type
  762. },
  763. getChrgitmLv(value){
  764. var name = ""
  765. for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
  766. if(value == this.medicalInsuranceLevelList[i].value){
  767. name = this.medicalInsuranceLevelList[i].name
  768. }
  769. }
  770. return name
  771. },
  772. getAdviceMedChrgintmLv(advice_id){
  773. var chrgitm_lv = ""
  774. for(let i=0;i<this.order_info_list.length;i++){
  775. if(advice_id == this.order_info_list[i].advice_id){
  776. chrgitm_lv = this.order_info_list[i].chrgitm_lv
  777. }
  778. }
  779. return chrgitm_lv
  780. },
  781. getProjectMedChrgintmLv(advice_id){
  782. var chrgitm_lv = ""
  783. for(let i=0;i<this.order_info_list.length;i++){
  784. if(advice_id == this.order_info_list[i].advice_id){
  785. chrgitm_lv = this.order_info_list[i].chrgitm_lv
  786. }
  787. }
  788. return chrgitm_lv
  789. },
  790. getAdviceMedChrgintmType(name){
  791. var med_chrgitm_type = ""
  792. for(let i=0;i<this.order_info_list.length;i++){
  793. if(name == this.order_info_list[i].advice.advice_name){
  794. med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
  795. }
  796. }
  797. return med_chrgitm_type
  798. },
  799. getProjectMedChrgintmType(project_id){
  800. var med_chrgitm_type = ""
  801. for(let i=0;i<this.order_info_list.length;i++){
  802. if(project_id == this.order_info_list[i].project_id){
  803. med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
  804. }
  805. }
  806. return med_chrgitm_type
  807. },
  808. getChrgitmLv(value){
  809. var name = ""
  810. for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
  811. if(value == this.medicalInsuranceLevelList[i].value){
  812. name = this.medicalInsuranceLevelList[i].name
  813. }
  814. }
  815. return name
  816. },
  817. getAdviceMedChrgintmLv(advice_id){
  818. var chrgitm_lv = ""
  819. for(let i=0;i<this.order_info_list.length;i++){
  820. if(advice_id == this.order_info_list[i].advice_id){
  821. chrgitm_lv = this.order_info_list[i].chrgitm_lv
  822. }
  823. }
  824. return chrgitm_lv
  825. },
  826. getProjectMedChrgintmLv(advice_id){
  827. var chrgitm_lv = ""
  828. for(let i=0;i<this.order_info_list.length;i++){
  829. if(advice_id == this.order_info_list[i].advice_id){
  830. chrgitm_lv = this.order_info_list[i].chrgitm_lv
  831. }
  832. }
  833. return chrgitm_lv
  834. },
  835. getWesternMedicineCostTotal(){
  836. var total_price = 0
  837. for(let i=0;i<this.tableList.length;i++){
  838. if(this.tableList[i].cost_type == "西药"){
  839. total_price += this.tableList[i].count_number * this.tableList[i].pric
  840. }
  841. }
  842. return total_price.toFixed(2)
  843. },
  844. getChineseTraditionalMedicineCostTotal(){
  845. var total_price = 0
  846. for(let i=0;i<this.tableList.length;i++){
  847. if(this.tableList[i].cost_type == "中成药"){
  848. total_price += this.tableList[i].count_number * this.tableList[i].pric
  849. }
  850. }
  851. return total_price.toFixed(2)
  852. },
  853. getChineseTotal(){
  854. var total_price = 0
  855. for(let i=0;i<this.tableList.length;i++){
  856. if(this.tableList[i].cost_type == "中草药"){
  857. total_price += this.tableList[i].count_number * this.tableList[i].pric
  858. }
  859. }
  860. return total_price.toFixed(2)
  861. },
  862. getCheckCostTotal(){
  863. var total_price = 0
  864. for(let i=0;i<this.tableList.length;i++){
  865. if(this.tableList[i].cost_type == "检验费"){
  866. total_price += this.tableList[i].count_number * this.tableList[i].pric
  867. }
  868. }
  869. return total_price.toFixed(2)
  870. },
  871. getOxygen(){
  872. var total_price = 0
  873. for(let i=0;i<this.tableList.length;i++){
  874. if(this.tableList[i].cost_type == "输氧费"){
  875. total_price += this.tableList[i].count_number * this.tableList[i].pric
  876. }
  877. }
  878. return total_price.toFixed(2)
  879. },
  880. getOperation(){
  881. var total_price = 0
  882. for(let i=0;i<this.tableList.length;i++){
  883. if(this.tableList[i].cost_type == "手术费"){
  884. total_price += this.tableList[i].count_number * this.tableList[i].pric
  885. }
  886. }
  887. return total_price.toFixed(2)
  888. },
  889. getLaboratoryCostTotal(){
  890. var total_price = 0
  891. for(let i=0;i<this.tableList.length;i++){
  892. if(this.tableList[i].cost_type == "化验费"){
  893. total_price += this.tableList[i].count_number * this.tableList[i].pric
  894. }
  895. }
  896. return total_price.toFixed(2)
  897. },
  898. getBlood(){
  899. var total_price = 0
  900. for(let i=0;i<this.tableList.length;i++){
  901. if(this.tableList[i].cost_type == "输血费"){
  902. total_price += this.tableList[i].count_number * this.tableList[i].pric
  903. }
  904. }
  905. return total_price.toFixed(2)
  906. },
  907. getZhenChaCostTotal(){
  908. var total_price = 0
  909. for(let i=0;i<this.tableList.length;i++){
  910. if(this.tableList[i].cost_type == "诊断费"){
  911. total_price += this.tableList[i].count_number * this.tableList[i].pric
  912. }
  913. }
  914. return total_price.toFixed(2)
  915. },
  916. getTreatement(){
  917. var total_price = 0
  918. for(let i=0;i<this.tableList.length;i++){
  919. if(this.tableList[i].cost_type == "治疗费"){
  920. total_price += this.tableList[i].count_number * this.tableList[i].pric
  921. }
  922. }
  923. return total_price.toFixed(2)
  924. },
  925. getNursing(){
  926. var total_price = 0
  927. for(let i=0;i<this.tableList.length;i++){
  928. if(this.tableList[i].cost_type == "护理费"){
  929. total_price += this.tableList[i].count_number * this.tableList[i].pric
  930. }
  931. }
  932. return total_price.toFixed(2)
  933. },
  934. getBedCostTotal(){
  935. var total_price = 0
  936. for(let i=0;i<this.tableList.length;i++){
  937. if(this.tableList[i].cost_type == "床位费"){
  938. total_price += this.tableList[i].count_number * this.tableList[i].pric
  939. }
  940. }
  941. return total_price.toFixed(2)
  942. },
  943. getAnesthesia(){
  944. var total_price = 0
  945. for(let i=0;i<this.tableList.length;i++){
  946. if(this.tableList[i].cost_type == "麻醉费"){
  947. total_price += this.tableList[i].count_number * this.tableList[i].pric
  948. }
  949. }
  950. return total_price.toFixed(2)
  951. },
  952. getMaterialCostTotal(){
  953. var total_price = 0
  954. for(let i=0;i<this.tableList.length;i++){
  955. if(this.tableList[i].cost_type == "材料费"){
  956. total_price += this.tableList[i].count_number * this.tableList[i].pric
  957. }
  958. }
  959. return total_price.toFixed(2)
  960. },
  961. getOtherCostTotal(){
  962. var total_price = 0
  963. for(let i=0;i<this.tableList.length;i++){
  964. if(this.tableList[i].cost_type == "其他"){
  965. total_price += this.tableList[i].count_number * this.tableList[i].pric
  966. }
  967. }
  968. return total_price.toFixed(2)
  969. },
  970. getDrugType(id){
  971. var name = ""
  972. for(let i=0;i<this.drugTypeList.length;i++){
  973. if(id == this.drugTypeList[i].value){
  974. name = this.drugTypeList[i].name
  975. }
  976. }
  977. return name
  978. },
  979. getCostType(id){
  980. var name = ""
  981. for(let i=0;i<this.costClassifyList.length;i++){
  982. if(id == this.costClassifyList[i].value){
  983. name = this.costClassifyList[i].name
  984. }
  985. }
  986. return name
  987. },
  988. getBedName(id){
  989. var number = ""
  990. for(let i=0;i<this.bedNumber.length;i++){
  991. if(id == this.bedNumber[i].id){
  992. number = this.bedNumber[i].number
  993. }
  994. }
  995. return number
  996. },
  997. getTotalCountPrice(){
  998. var total_price = 0
  999. for(let i=0;i<this.tableList.length;i++){
  1000. if(this.tableList[i].is_total == 2){
  1001. total_price += this.tableList[i].pric * this.tableList[i].count_number
  1002. }
  1003. }
  1004. if(total_price > 0){
  1005. return total_price.toFixed(2)
  1006. }else{
  1007. return ""
  1008. }
  1009. },
  1010. getPsnCashPay(){
  1011. var psn_cash_pay = 0.00
  1012. for(let i=0;i<this.orderList.length;i++){
  1013. psn_cash_pay += this.orderList[i].psn_cash_pay
  1014. }
  1015. if(psn_cash_pay > 0){
  1016. return psn_cash_pay.toFixed(2)
  1017. }else{
  1018. return "0.00"
  1019. }
  1020. },
  1021. getAcctPay(){
  1022. var acct_pay = 0.00
  1023. for(let i=0;i<this.orderList.length;i++){
  1024. acct_pay +=this.orderList[i].acct_pay
  1025. }
  1026. if(acct_pay > 0){
  1027. return acct_pay.toFixed(2)
  1028. }else{
  1029. return "0.00"
  1030. }
  1031. },
  1032. getFundPaySumamt(){
  1033. var fund_pay_sumamt = 0.00
  1034. for(let i=0;i<this.orderList.length;i++){
  1035. fund_pay_sumamt +=this.orderList[i].fund_pay_sumamt
  1036. }
  1037. if(fund_pay_sumamt >0){
  1038. return fund_pay_sumamt.toFixed(2)
  1039. }else{
  1040. return "0.00"
  1041. }
  1042. },
  1043. getActPay() {
  1044. var arrNew = []
  1045. var act_pay = 0;
  1046. for (let i = 0; i < this.list.length; i++) {
  1047. for (let j = 0; j < this.list[i].orders.length; j++) {
  1048. //个人支付
  1049. console.log("is",this.list[i].orders[j])
  1050. if(this.list[i].orders[j].is_medicine_insurance == 0){
  1051. arrNew.push(this.list[i].orders[j])
  1052. }
  1053. }
  1054. }
  1055. if(arrNew.length > 0){
  1056. for(let i=0;i<arrNew.length;i++){
  1057. for(let j=0;j<arrNew[i].order_info.length;j++){
  1058. act_pay += arrNew[i].order_info[j].cnt * arrNew[i].order_info[j].pric
  1059. }
  1060. }
  1061. }
  1062. console.log("arrNew2332323223",arrNew)
  1063. return act_pay.toFixed(2);
  1064. },
  1065. },
  1066. created(){
  1067. this.org_id = this.$store.getters.xt_user.org.id;
  1068. this.getGatherDetailList()
  1069. }
  1070. }
  1071. </script>
  1072. <style lang="scss" scoped>
  1073. .list-print{
  1074. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  1075. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  1076. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  1077. margin-bottom: 20px;
  1078. padding:20px 10px;
  1079. }
  1080. .listTitle{
  1081. font-size: 24px;
  1082. text-align: center;
  1083. font-weight: bold;
  1084. margin-bottom: 10px;
  1085. }
  1086. .listInfo{
  1087. display: flex;
  1088. font-size: 16px;
  1089. justify-content: space-between;
  1090. margin: 10px 0;
  1091. div{
  1092. width: 400px;
  1093. }
  1094. }
  1095. .listTable{
  1096. width: 100%;
  1097. text-align: center;
  1098. border-collapse: collapse;
  1099. line-height: 40px;
  1100. font-size: 14px;
  1101. border-color: #000;
  1102. text-align: left;
  1103. }
  1104. .listTable tr td {
  1105. padding: 0 5px;
  1106. }
  1107. .tableBottom{
  1108. font-size: 16px;
  1109. display: flex;
  1110. margin-top: 20px;
  1111. }
  1112. .tableBottomOne{
  1113. margin-right: 40px;
  1114. }
  1115. .print_btn {
  1116. display: flex;
  1117. justify-content: flex-end;
  1118. }
  1119. </style>