1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195 |
- <template>
- <div>
- <div class="print_btn">
- <el-button type="primary" @click="printtpage">打印</el-button>
- </div>
- <div id="list-print" class="list-print">
- <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用汇总</div>
- <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 10px;">
- <div>医疗机构名称:{{$store.getters.xt_user.org.org_name}}</div>
- </div>
- <div class="listInfo">
- <div>科别:
- <span v-if="org_id!=10215"> {{getDepartment(his_patient.departments)}}</span>
- {{getDepartment(his_record_patient.departments)}}
- </div>
- <div>床号:<span v-if="schedule.length > 0">{{getBedName(schedule[0].bed_id)}}</span></div>
- <div>门诊号:
- <span v-if="org_id!=10215">{{his_patient.number}}</span>
- {{his_record_patient.ipt_otp_no}}
- </div>
- <div>姓名:{{patient.name}}</div>
- </div>
- <div class="listInfo" style="border-bottom: 2px solid;margin-bottom: 20px;padding-bottom: 20px;">
- <div>预交款:</div>
- <div>总费用:{{getAllPice()}}</div>
- <div>门诊日期:{{this.$route.query.end_time}}</div>
- </div>
- <div class="listInfo">
- <div>西药:{{getWesternMedicineCostTotal()}}</div>
- <div>中成药:{{getChineseTraditionalMedicineCostTotal()}}</div>
- <div>中草药:{{getChineseTotal()}}</div>
- </div>
- <div class="listInfo">
- <div>检查费:{{getCheckCostTotal()}}</div>
- <div>输氧费:{{getOxygen()}}</div>
- <div>手术费:{{getOperation()}}</div>
- </div>
- <div class="listInfo">
- <div>化验费:{{getLaboratoryCostTotal()}}</div>
- <div>输血费:{{getBlood()}}</div>
- <div>诊断费:{{getZhenChaCostTotal()}}</div>
- </div>
- <div class="listInfo">
- <div>治疗费:{{getTreatement()}}</div>
- <div>护理费:{{getNursing()}}</div>
- <div>床位费:{{getBedCostTotal()}}</div>
- </div>
- <div class="listInfo" style="margin-bottom: 10px;">
- <div>麻醉费:{{getAnesthesia()}}</div>
- <div>材料费:{{getMaterialCostTotal()}}</div>
- <div>其他:{{getOtherCostTotal()}}</div>
- </div>
- <div class="listInfo" style="margin-bottom: 20px;">
- <div>记账支付:{{getFundPaySumamt()}}</div>
- <div>个人账号:{{getAcctPay()}}</div>
- <div>现金支付:{{getActPay()}}</div>
- </div>
- <table class="listTable" border="1">
- <tr>
- <td style="text-align:center" >序号</td>
- <td style="text-align:center" >费用分类</td>
- <td style="text-align:center">项目名称</td>
- <td style="text-align:center">规格</td>
- <td style="text-align:center">单价</td>
- <td style="text-align:center" >数量</td>
- <td style="text-align:center">金额</td>
- <td style="text-align:center" >医保类别</td>
- </tr>
- <tr v-for="(item, index) in tableList" :key="index">
- <td style="text-align:center" >
- <span v-if="item.is_total == 2">{{index+1}}</span>
- <span v-if="item.is_total == 1">合计</span>
- </td>
- <td style="text-align:center" >
- <span v-if="item.type == 1">
- {{item.cost_type}}
- </span>
- <span v-if="item.type == 2">
- {{item.cost_type}}
- </span>
- <span v-if="item.type == 3">
- 材料费
- </span>
- </td>
- <td style="text-align:center" >
- <span>{{item.name}}</span>
- </td>
- <td style="text-align:center" >
- {{ item.spec }}
- </td>
- <td style="text-align:center" >
- {{item.pric}}
- </td>
- <td style="text-align:center" >
- {{item.count_number }}{{item.unit }}
- </td>
- <td style="text-align:center" >
- <span v-if="item.is_total == 1">{{ item.total }}</span>
- <span v-if="item.is_total == 2">{{ (item.pric * item.count_number).toFixed(2) }}</span>
- </td>
- <td style="text-align:center" >
- {{getChrgitmLv(item.medical_insurance_level)}}
- </td>
- </tr>
- </table>
- </div>
- </div>
- </template>
-
- <script>
- import print from "print-js";
- import { uParseTime } from '@/utils/tools'
- import { getGatherDetailList } from '@/api/his/his_tools'
- export default {
- data(){
- return{
- patient:{},
- tableData:[],
- list:[],
- order:[],
- his_patient:{},
- hisDepatment:[],
- chineseTraditionalMedicineCostTotal:"",//中成药
- checkCostTotal:"",//检查费
- materialCostTotal:"",//材料费
- laboratoryCostTotal:"",//化验费
- bedCostTotal:"",//床位费,
- operationCostTotal:"",//材料费
- zhenChaCostTotal:"",//诊查费
- otherCostTotal:"",//其他费用
- tableList:[],
- order_info_list:[],
- balanceAccountsType:0,
- medicalInsuranceLevelList:[],
- schedule:[],
- bedNumber:[],
- order_info_list:[],
- balanceAccountsType:0,
- medicalInsuranceLevelList:[],
- drugTypeList:[],
- costClassifyList:[],
- id:0,
- start_time:"",
- end_time:"",
- his_record_patient:{},
- orderList:[],
- org_id:0,
- list:[],
- }
- },
- methods:{
- printtpage() {
- const style =
- '@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;}';
- printJS({
- printable: "list-print",
- type: "html",
- style: style,
- scanStyles: false,
- });
- },
-
- getNowTime: function () {
- let dateTime;
- let yy = new Date().getFullYear();
- let mm = new Date().getMonth() + 1;
- let dd = new Date().getDate();
- let hh = new Date().getHours();
- let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
- :
- new Date().getMinutes();
- let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
- :
- new Date().getSeconds();
- dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
- return dateTime
- },
- getTimes(time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
- getGatherDetailList() {
- let start_time = this.$route.query.start_time
- let end_time = this.$route.query.end_time
- let params = {
- patient_id:this.$route.query.patient_id,
- start_time: start_time,
- end_time: end_time,
- type: this.$route.query.type,
- keyword: this.$route.query.keyword
- }
- getGatherDetailList(params).then(response=>{
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.drugTypeList =response.data.data.drugTypeList
- this.costClassifyList = response.data.data.costClassifyList
- var list = response.data.data.list
- this.list = list
- this.orderList = response.data.data.orderList
- console.log("orderlist23323223",this.orderList)
- var new_arr = []
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].orders.length;j++){
- new_arr.push(list[i].orders[j])
- }
- }
-
-
- var order_info = []
- for(let i=0;i<new_arr.length;i++){
- for(let j=0;j<new_arr[i].order_info.length;j++){
- order_info.push(new_arr[i].order_info[j])
- }
- }
-
- for(let i=0;i<order_info.length;i++){
- if(order_info[i].advice_id > 0){
- order_info[i].item_id = order_info[i].advice.drug.id +"_" + order_info[i].pric
- }
- if(order_info[i].project_id > 0){
- if(order_info[i].project.type == 2){
- order_info[i].item_id = order_info[i].project.project.id + "_"+order_info[i].pric
- }
- if(order_info[i].project.type == 3){
- order_info[i].item_id = order_info[i].project.good_info.id + "_"+order_info[i].pric
- }
- }
- }
-
-
- //合并,相同的合并在一起
-
- let dataInfo = {}
- order_info.forEach((item, index) => {
- let { item_id } = item
- if (!dataInfo[item_id]) {
- dataInfo[item_id] = {
- item_id,
- child: [],
- count_number:0,
- record_date:"",
- cost_type:"",
- name:"",
- pric:item.pric,
- chrgitm_lv:"",
- advice_id:item.advice_id,
- project_id:item.project_id,
- type:0,
- spec:"",
- unit:"",
- medical_insurance_level:"",
- cost_type:"",
- is_total:2,
- }
- }
- dataInfo[item_id].child.push(item)
- })
- let arr = Object.values(dataInfo)
-
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<arr[i].child.length;j++){
- if(arr[i].advice_id >0){
- arr[i].record_date = arr[i].child[0].advice.advice_date
- arr[i].type = 1
- arr[i].name = arr[i].child[0].advice.advice_name
- 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
- arr[i].unit = arr[i].child[0].advice.prescribing_number_unit
- arr[i].cost_type = arr[i].child[0].advice.drug.drug_type
- arr[i].medical_insurance_level = arr[i].child[0].advice.drug.medical_insurance_level
-
-
- }
- if(arr[i].project_id > 0){
- arr[i].record_date = arr[i].child[0].project.record_date
- arr[i].type = arr[i].child[0].project.type
- if(arr[i].child[0].project.type == 2){
- arr[i].name = arr[i].child[0].project.project.project_name
- arr[i].spec = arr[i].child[0].project.project.project_name
- arr[i].unit = arr[i].child[0].project.project.unit
- arr[i].medical_insurance_level = arr[i].child[0].project.project.medical_coverage
- arr[i].cost_type = arr[i].child[0].project.project.cost_classify
- }
- if(arr[i].child[0].project.type == 3){
- arr[i].name = arr[i].child[0].project.good_info.good_name
- arr[i].spec = arr[i].child[0].project.good_info.specification_name
- arr[i].unit = arr[i].child[0].project.good_info.packing_unit
- arr[i].medical_insurance_level = arr[i].child[0].project.good_info.medical_insurance_level
- arr[i].cost_type = "材料费"
- }
- }
- arr[i].count_number +=arr[i].child[j].cnt
- }
- }
-
- var obj = {is_total:1,total:0}
- obj.total = this.getAllPiceTwo(arr)
- for(let i=0;i<arr.length;i++){
- if(arr[i].advice_id >0){
- arr[i].cost_type = this.getDrugType(arr[i].cost_type)
- }
- if(arr[i].type ==2){
- arr[i].cost_type = this.getCostType(arr[i].cost_type)
- }
- }
- arr.push(obj)
-
- this.tableList = arr
-
- this.patient = response.data.data.patient
-
- this.his_patient = response.data.data.his_patient
- this.hisDepatment = response.data.data.hisDepatment
- this.order = response.data.data.order
- this.his_record_patient = response.data.data.his_record_patient
- this.medicalInsuranceLevelList = response.data.data.medicalInsuranceLevelList
- this.schedule = response.data.data.schedule
- this.bedNumber = response.data.data.bedNumber
- if(this.$route.query.keyword !=""){
-
- var new_arr = []
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].is_total!=1){
- if(this.tableList[i].name.indexOf(this.$route.query.keyword) >-1){
- new_arr.push(this.tableList[i])
- }
- }
-
- }
- var obj ={index:"合计",is_total:1,total:0}
- obj.total = this.getAllPiceTwo(new_arr)
- new_arr.push(obj)
- this.tableList = []
- this.tableList = new_arr
- }
-
- if(this.$route.query.id == 1){
- var new_arr = []
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].is_total!=1){
- if(this.tableList[i].type == 1){
- new_arr.push(this.tableList[i])
- }
- }
-
- }
- this.tableList = []
- this.tableList = new_arr
- }
- if(this.$route.query.id == 2){
- var new_arr = []
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].is_total!=1){
- if(this.tableList[i].type == 2){
-
- new_arr.push(this.tableList[i])
- }
- }
- }
- this.tableList = []
- this.tableList = new_arr
- }
- if(this.$route.query.id == 3){
- var new_arr = []
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].is_total!=1){
- if(this.tableList[i].type == 3){
- new_arr.push(this.tableList[i])
- }
- }
- }
- this.tableList = []
- this.tableList = new_arr
- }
- }
- })
- },
- getAdviceName(id){
- var drug_name = ""
- for(let i= 0;i<this.tableData.length;i++){
- if(id == this.tableData[i].advice_id){
- drug_name = this.tableData[i].advice.advice_name
- }
- }
- return drug_name
- },
- getProjectName(id){
- var project_name = ""
- for(let i=0;i<this.tableData.length;i++){
- if(id == this.tableData[i].project_id){
- project_name = this.tableData[i].project.project.project_name
- }
- }
- return project_name
- },
- setNewData(details) {
- let drug_ids = []
- let project_ids = []
-
- for (let i = 0; i < details.length; i++) {
- if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
- let obj = {
- id: details[i].advice.drug_id,
- price: details[i].advice.price,
- record_date:details[i].advice.advice_date
-
- }
- drug_ids.push(obj)
- } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
- let obj = {
- id: details[i].project.project_id,
- price: details[i].project.price,
- record_date:details[i].advice.record_date
- }
- project_ids.push(obj)
-
- }
-
- }
-
- let new_drug_ids = this.unique(drug_ids)
- let new_project_ids = this.unique(project_ids)
-
- let list = []
- if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
- for (let i = 0; i < new_drug_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < details.length; a++) {
- if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
- obj['name'] = details[a].advice.advice_name
- 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
- obj['unit'] = details[a].advice.drug.min_unit
- obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
- obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
- obj['price'] = parseFloat(details[a].pric)
- obj['is_total'] = 2
- obj['record_date'] = details[a].advice.record_date
- obj['chrgitm_lv'] = details[a].chrgitm_lv
- count = count + details[a].cnt
- }
- }
- obj['count'] = count
- list.push(obj)
-
- }
- }
- if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
- for (let i = 0; i < new_project_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < details.length; a++) {
- if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
- if( details[a].project.type == 2){
- obj['name'] = details[a].project.project.project_name
- obj['spec'] = details[a].project.project.project_name
- obj['unit'] = details[a].project.project.unit
- obj['record_date'] = details[a].project.record_date
-
- }else if(details[a].project.type == 3){
- obj['name'] = details[a].project.good_info.good_name
- obj['spec'] = details[a].project.good_info.specification_name
- obj['unit'] = details[a].project.good_info.packing_unit
- obj['record_date'] = details[a].project.record_date
-
- }
- obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
- obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
- obj['price'] = parseFloat(details[a].pric)
- obj['is_total'] = 2
- obj['chrgitm_lv'] = details[a].chrgitm_lv
-
- count = count + details[a].cnt
- }
- }
- obj['count'] = count
- list.push(obj)
-
- }
- }
-
- if (new_drug_ids.length > 0 && new_project_ids.length > 0) {
- for (let i = 0; i < new_drug_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < details.length; a++) {
- if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
- obj['name'] = details[a].advice.advice_name
- 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
- obj['unit'] = details[a].advice.drug.min_unit
- obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
- obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
- obj['price'] = parseFloat(details[a].pric)
- obj['is_total'] = 2
- obj['record_date'] = details[a].advice.record_date
- obj['chrgitm_lv'] = details[a].chrgitm_lv
- count = count + details[a].cnt
- }
- }
- obj['count'] = count
- list.push(obj)
-
- }
-
- for (let i = 0; i < new_project_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < details.length; a++) {
- if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
- if( details[a].project.type == 2){
- obj['name'] = details[a].project.project.project_name
- obj['spec'] = ''
- obj['unit'] = details[a].project.project.unit
-
- }else if(details[a].project.type == 3){
- obj['name'] = details[a].project.good_info.good_name
- obj['spec'] = ''
- obj['unit'] = details[a].project.good_info.packing_unit
- }
- obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
- obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
- obj['price'] = parseFloat(details[a].pric)
- obj['is_total'] = 2
- obj['record_date'] = details[a].project.record_date
- obj['chrgitm_lv'] = details[a].chrgitm_lv
- count = count + details[a].cnt
- }
- }
- obj['count'] = count
- list.push(obj)
-
- }
- }
-
- return list
- },
-
- getMedicineInsuranceType(type) {
- switch (type) {
- case "01":
- return '甲类'
- break
- case "02":
- return '乙类'
-
- break
- case "03":
- return '自费'
- break
-
- }
-
- },
- getType(med_chrgitm_type){
- switch (med_chrgitm_type) {
- case '01':
- return '床位费'
- break
- case '02':
- return '诊察费'
-
- break
- case '03':
- return '检查费'
-
- break
- case '04':
- return '化验费'
- break
- case '05':
- return '治疗费'
-
- break
- case '06':
- return '手术费'
-
- break
- case '07':
- return '护理费'
-
- break
- case '08':
- return '材料费'
-
- break
- case '09':
- return '西药费'
-
- break
- case '10':
- return '中药饮片费'
-
- break
- case '11':
- return '中成药费'
-
- break
- case '12':
- return '一般诊疗费'
-
- break
- case '13':
- return '挂号费'
-
- break
- case '14':
- return '其他费'
-
- break
-
- }
- },
- unique(array) {
- // res用来存储结果
- var res = []
- for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
- for (var j = 0, resLen = res.length; j < resLen; j++) {
- if (array[i].id === res[j].id && array[i].price === res[j].price) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- },
- getTotal:function(items){
- let total = 0
- for(let i = 0; i < items.length; i++){
- total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
- }
- return total.toFixed(2)
- },
- getTimes(time) {
- if(time < 0){
- return ""
- }else{
- return uParseTime(time, '{y}-{m}-{d}')
- }
- },
- getDepartment(id){
- var name = ""
- for(let i=0;i<this.hisDepatment.length;i++){
- if(id == this.hisDepatment[i].id){
- name = this.hisDepatment[i].name
- }
- }
- return name
- },
- getAllPice(){
-
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].is_total ==2){
- total_price += (this.tableList[i].pric * parseInt(this.tableList[i].count_number))
- }
- }
- if(total_price > 0){
- return total_price.toFixed(2)
- }else{
- return "0.00"
- }
-
- },
- getAllPiceTwo(arr){
-
- var total_price = 0
- for(let i=0;i<arr.length;i++){
- if(arr[i].is_total ==2){
- total_price += (arr[i].pric * parseInt(arr[i].count_number))
- }
- }
- if(total_price > 0){
- return total_price.toFixed(2)
- }else{
- return total_price
- }
-
- },
- setMonthPrescription(month_prescriptions) {
- let drug_month_prescriptions = {
- advices: []
- }
- let drug_ids = []
- let project_month_prescriptions = {
- project: []
-
- }
- let project_ids = []
-
- for (let i = 0; i < month_prescriptions.length; i++) {
- if (month_prescriptions[i].type == 1) { //药品
- for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
- let obj = {
- id: month_prescriptions[i].advices[a].drug_id,
- price: month_prescriptions[i].advices[a].price
-
- }
- drug_ids.push(obj)
- drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
- }
-
- } else if (month_prescriptions[i].type == 2) { //项目
- for (let a = 0; a < month_prescriptions[i].project.length; a++) {
- let obj = {
- id: month_prescriptions[i].project[a].project_id,
- price: month_prescriptions[i].project[a].price
-
- }
- project_ids.push(obj)
- project_month_prescriptions.project.push(month_prescriptions[i].project[a])
- }
- }
- }
-
- drug_ids = this.unique(drug_ids)
- project_ids= this.unique(project_ids)
-
- for (let i = 0; i < drug_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
- if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
- obj['advice_id'] = drug_month_prescriptions.advices[a].id
- obj['name'] = drug_month_prescriptions.advices[a].advice_name
- obj['statistical_classification'] = ''
- obj['type'] = 1
- obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
- obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
- obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
- obj['day'] = drug_month_prescriptions.advices[a].day
- obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
- obj['remark'] = drug_month_prescriptions.advices[a].remark
- obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
- obj['record_date'] = drug_month_prescriptions.advices[a].advice_date
- 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
- obj['is_total'] = 2
- obj['chrgitm_lv'] = drug_month_prescriptions.advices[a].drug.medical_insurance_level
- obj['unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
- count = count + drug_month_prescriptions.advices[a].prescribing_number
-
- }
- }
- obj['count'] = count
- this.tableList.push(obj)
- }
-
- for (let i = 0; i < project_ids.length; i++) {
- let obj = {}
- let count = 0
- for (let a = 0; a < project_month_prescriptions.project.length; a++) {
- if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
-
- if(project_month_prescriptions.project[a].type == 2){
- obj['project_id'] = project_month_prescriptions.project[a].id
- obj['name'] = project_month_prescriptions.project[a].project.project_name
- obj['statistical_classification'] = ''
- obj['project_type'] = 2
- obj['spec'] = project_month_prescriptions.project[a].project.project_name
- obj['unit'] = project_month_prescriptions.project[a].unit
- obj['chrgitm_lv'] = project_month_prescriptions.project[a].project.medical_coverage
- }else if (project_month_prescriptions.project[a].type == 3){
- obj['project_id'] = project_month_prescriptions.project[a].id
- obj['name'] = project_month_prescriptions.project[a].good_info.good_name
- obj['statistical_classification'] = ''
- obj['project_type'] = 3
- obj['spec'] = project_month_prescriptions.project[a].good_info.specification_name
- obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
- obj['chrgitm_lv'] = project_month_prescriptions.project[a].good_info.medical_insurance_level
- }
- obj['single_dose'] = project_month_prescriptions.project[a].single_dose
- obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
- obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
- obj['day'] = project_month_prescriptions.project[a].day
- obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
- obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
-
- count = count + parseFloat(project_month_prescriptions.project[a].count)
- obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
- obj['remark'] = project_month_prescriptions.project[a].remark
- obj['type'] = 2
- obj['record_date'] = project_month_prescriptions.project[a].record_date
- obj['is_total'] = 2
- }
- }
- obj['count'] = count
- this.tableList.push(obj)
-
- }
- var objOne = {index:"合计",is_total:1,total:0}
- objOne.total = this.getTotalPrice(this.tableList)
- for(let i=0;i<this.tableList.length;i++){
- this.tableList[i].index = i + 1
- }
- this.tableList.push(objOne)
- },
-
- getTotalPrice(val){
- var total_price = 0
- for(let i=0;i<val.length;i++){
- total_price +=val[i].count * val[i].price
- }
- return total_price.toFixed(2)
- },
- getTotalPriceTwo(val){
- var total_price = 0
- for(let i=0;i<val.length;i++){
- if(val[i].is_total!=1){
- total_price +=val[i].count * val[i].price
- }
- }
- return total_price.toFixed(2)
- },
- getAdviceMedChrgintmType(name){
- var med_chrgitm_type = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(name == this.order_info_list[i].advice.advice_name){
- med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
- }
- }
- return med_chrgitm_type
- },
- getProjectMedChrgintmType(project_id){
- var med_chrgitm_type = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(project_id == this.order_info_list[i].project_id){
- med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
- }
- }
- return med_chrgitm_type
- },
- getChrgitmLv(value){
- var name = ""
- for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
- if(value == this.medicalInsuranceLevelList[i].value){
- name = this.medicalInsuranceLevelList[i].name
- }
- }
- return name
- },
- getAdviceMedChrgintmLv(advice_id){
- var chrgitm_lv = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(advice_id == this.order_info_list[i].advice_id){
- chrgitm_lv = this.order_info_list[i].chrgitm_lv
- }
- }
- return chrgitm_lv
- },
- getProjectMedChrgintmLv(advice_id){
- var chrgitm_lv = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(advice_id == this.order_info_list[i].advice_id){
- chrgitm_lv = this.order_info_list[i].chrgitm_lv
- }
- }
- return chrgitm_lv
- },
- getAdviceMedChrgintmType(name){
- var med_chrgitm_type = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(name == this.order_info_list[i].advice.advice_name){
- med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
- }
- }
- return med_chrgitm_type
- },
- getProjectMedChrgintmType(project_id){
- var med_chrgitm_type = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(project_id == this.order_info_list[i].project_id){
- med_chrgitm_type = this.order_info_list[i].med_chrgitm_type
- }
- }
- return med_chrgitm_type
- },
- getChrgitmLv(value){
- var name = ""
- for(let i=0;i<this.medicalInsuranceLevelList.length;i++){
- if(value == this.medicalInsuranceLevelList[i].value){
- name = this.medicalInsuranceLevelList[i].name
- }
- }
- return name
- },
- getAdviceMedChrgintmLv(advice_id){
- var chrgitm_lv = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(advice_id == this.order_info_list[i].advice_id){
- chrgitm_lv = this.order_info_list[i].chrgitm_lv
- }
- }
- return chrgitm_lv
- },
- getProjectMedChrgintmLv(advice_id){
- var chrgitm_lv = ""
- for(let i=0;i<this.order_info_list.length;i++){
- if(advice_id == this.order_info_list[i].advice_id){
- chrgitm_lv = this.order_info_list[i].chrgitm_lv
- }
- }
- return chrgitm_lv
- },
- getWesternMedicineCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "西药"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
-
- return total_price.toFixed(2)
- },
- getChineseTraditionalMedicineCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "中成药"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getChineseTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "中草药"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getCheckCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "检验费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getOxygen(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "输氧费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getOperation(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "手术费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getLaboratoryCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "化验费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getBlood(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "输血费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getZhenChaCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "诊断费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getTreatement(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "治疗费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getNursing(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "护理费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getBedCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "床位费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getAnesthesia(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "麻醉费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getMaterialCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "材料费"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getOtherCostTotal(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].cost_type == "其他"){
- total_price += this.tableList[i].count_number * this.tableList[i].pric
- }
- }
- return total_price.toFixed(2)
- },
- getDrugType(id){
-
- var name = ""
- for(let i=0;i<this.drugTypeList.length;i++){
- if(id == this.drugTypeList[i].value){
- name = this.drugTypeList[i].name
- }
- }
- return name
- },
- getCostType(id){
- var name = ""
- for(let i=0;i<this.costClassifyList.length;i++){
- if(id == this.costClassifyList[i].value){
- name = this.costClassifyList[i].name
- }
- }
- return name
- },
- getBedName(id){
- var number = ""
- for(let i=0;i<this.bedNumber.length;i++){
- if(id == this.bedNumber[i].id){
- number = this.bedNumber[i].number
- }
- }
- return number
- },
- getTotalCountPrice(){
- var total_price = 0
- for(let i=0;i<this.tableList.length;i++){
- if(this.tableList[i].is_total == 2){
- total_price += this.tableList[i].pric * this.tableList[i].count_number
- }
- }
- if(total_price > 0){
- return total_price.toFixed(2)
- }else{
- return ""
- }
- },
- getPsnCashPay(){
- var psn_cash_pay = 0.00
- for(let i=0;i<this.orderList.length;i++){
- psn_cash_pay += this.orderList[i].psn_cash_pay
- }
- if(psn_cash_pay > 0){
- return psn_cash_pay.toFixed(2)
- }else{
- return "0.00"
- }
- },
- getAcctPay(){
- var acct_pay = 0.00
- for(let i=0;i<this.orderList.length;i++){
- acct_pay +=this.orderList[i].acct_pay
- }
- if(acct_pay > 0){
- return acct_pay.toFixed(2)
- }else{
- return "0.00"
- }
- },
- getFundPaySumamt(){
- var fund_pay_sumamt = 0.00
- for(let i=0;i<this.orderList.length;i++){
- fund_pay_sumamt +=this.orderList[i].fund_pay_sumamt
- }
-
- if(fund_pay_sumamt >0){
- return fund_pay_sumamt.toFixed(2)
- }else{
-
- return "0.00"
- }
- },
- getActPay() {
- var act_pay = 0;
- for (let i = 0; i < this.list.length; i++) {
- for (let j = 0; j < this.list[i].orders.length; j++) {
- if(this.list[i].orders[j].is_medicine_insurance == 1){
- act_pay = act_pay + this.list[i].orders[j].psn_cash_pay
- }else{
- act_pay= act_pay + this.list[i].orders[j].medfee_sumamt
- }
-
- }
- }
-
- return act_pay.toFixed(2);
- },
-
- },
- created(){
- this.org_id = this.$store.getters.xt_user.org.id;
-
- this.getGatherDetailList()
- }
-
- }
-
-
- </script>
-
- <style lang="scss" scoped>
- .list-print{
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
- margin-bottom: 20px;
- padding:20px 10px;
- }
- .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;
- div{
- width: 400px;
- }
- }
- .listTable{
- width: 100%;
- text-align: center;
- border-collapse: collapse;
- line-height: 40px;
- 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;
- }
- .print_btn {
- display: flex;
- justify-content: flex-end;
- }
- </style>
|