123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516 |
- <template>
- <div>
- <div class="print_btn">
- <el-button type="primary" @click="printtpage">打印</el-button>
- </div>
- <div id="list-print" class="list-print">
- <table class="listTable"
- border="0"
- cellspacing="0"
- style="font-size: 14px"
- align="center">
- <thead style="display: table-header-group; font-weight: bold;border-bottom: 1px solid;">
- <tr
- ><td colspan="4" align="center" style="font-size: 20px"
- >{{ $store.getters.xt_user.org.org_name }}费用清单</td
- ></tr
- >
- <tr>
- <td>患者姓名:{{ patient.name }}</td>
- <td>性别:{{ patient.gender == 1 ? "男" : "女" }}</td>
- <td>结算类别:
- <span v-if="his_patient!=null&&his_patient.balance_accounts_type >0"> {{ getType(his_patient.balance_accounts_type) }} </span>
- <span v-if="his_record_patient!=null&&his_record_patient.balance_accounts_type >0">{{getType(his_record_patient.balance_accounts_type)}}</span></td>
- <td>发票号码:{{order.fa_piao_number}}</td>
- </tr>
- <tr>
- <td>住院/门诊号:
- <span v-if="his_patient!=null && his_patient.number!=''">{{his_patient.number}}</span>
- <span v-if="his_record_patient!=null && his_record_patient.ipt_otp_no!=''">{{his_record_patient.ipt_otp_no}}</span></td>
- <td>科室:
- <span v-if="his_patient!=null && his_patient.departments >0"> {{ getDepartment(his_patient.departments) }}</span>
- <span v-if="his_record_patient!=null && his_record_patient.departments > 0">{{ getDepartment(his_record_patient.departments) }}</span></td>
- <td>就诊流水号:
- <span v-if="his_patient!=null && his_patient.number!=''"> {{ his_patient.number }}</span>
- <span v-if="his_record_patient!=null && his_record_patient.number!=''">{{his_record_patient.number}}</span></td>
- </tr>
- <tr>
- <td>总费用:{{ getAllPice() }}</td>
- <td>个人支付:
- {{getActPay()}}
- <!-- <span v-if="his_record_patient.balance_accounts_type == 2">{{ getAllPice() }}</span>
- <span v-if="his_record_patient.balance_accounts_type != 2">{{ getActPay() }}</span> -->
- </td>
- <td>基金支付记账:{{ getFundPaySumamt() }}</td>
- <td>补充医疗支付记账:{{ getHifesPay() }}</td>
- </tr>
- <tr>
- <td>
- 救助支付金额:{{ getMafPay() }}
- </td>
- </tr>
- </thead>
- </table>
-
- <!-- <div class="listTitle">
- {{ $store.getters.xt_user.org.org_name }}费用清单
- </div> -->
-
- <!-- <div class="listInfo">
- <div>患者姓名:{{ patient.name }}</div>
- <div>性别:{{ patient.gender == 1 ? "男" : "女" }}</div>
- <div>结算类别:
-
- {{getType(his_record_patient.balance_accounts_type)}}
- </div>
- <div style="min-width:300px;">发票号码:{{order.fa_piao_number}}</div>
- </div> -->
- <!-- <div class="listInfo">
- <div>住院/门诊号:
- {{his_record_patient.ipt_otp_no}}
- </div>
- <div>科室:
- {{ getDepartment(his_record_patient.departments) }}
- </div>
- <div style="min-width:350px;">就诊流水号:
-
- {{his_record_patient.number}}
- </div>
- </div> -->
- <!-- <div class="listInfo">
- <div>总费用:{{ getAllPice() }}</div>
- <div>个人支付:
- <span v-if="his_record_patient.balance_accounts_type == 2">{{ getAllPice() }}</span>
- <span v-if="his_record_patient.balance_accounts_type != 2">{{ getActPay() }}</span>
-
- </div>
- <div>基金支付记账:{{ getFundPaySumamt() }}</div>
- <div style="min-width:300px;">补充医疗支付记账:{{ getHifesPay() }}</div>
- </div> -->
- <!-- <div class="listInfo">
- <div>救助支付金额:{{ getMafPay() }}</div>
- </div> -->
- <table class="listTable" border="1">
- <tr style="height:45px">
- <td width="100" style="text-align: center">序号</td>
- <td width="200" style="text-align: center">处方日期</td>
- <td width="300" style="text-align: center">费用编码</td>
- <td width="300" style="text-align: center">项目名称</td>
- <td width="180" style="text-align: center">规格</td>
- <td width="100" style="text-align: center">数量</td>
- <td width="100" style="text-align: center">单位</td>
- <td width="100" style="text-align: center">单价(元)</td>
- <td width="150" style="text-align: center">金额</td>
- </tr>
- <tr v-for="(item, index) in tableData" :key="index">
- <td style="text-align: center">
- <span v-if="item.is_total == 1">{{ index + 1 }}</span>
- <span v-if="item.is_total == 2">合计</span>
- </td>
- <td style="text-align: center">
- <span v-if="item.is_total == 1">{{getTimes(item.record_date)}}</span>
- </td>
- <td width="80" style="text-align: center">{{ item.number }}</td>
- <td style="text-align: center">
- <span v-if="item.advice_id > 0">{{ item.advice.advice_name }}</span>
- <span v-if="item.project_id > 0">
- <span v-if="item.project.type == 2">{{
- item.project.project.project_name
- }}</span>
- <span v-if="item.project.type == 3"
- >{{item.project.good_info.good_name}}</span
- >
- </span>
- </td>
- <td style="text-align: center">
- <span v-if="item.advice_id > 0"
- >{{ item.advice.drug.dose }}{{ item.advice.drug.dose_unit }}*{{
- item.advice.drug.min_number
- }}{{ item.advice.drug.min_unit }}/{{
- item.advice.drug.max_unit
- }}</span
- >
- <span v-if="item.project_id > 0">
- <span v-if="item.project.type == 2">{{
- item.project.project.project_name
- }}</span>
- <span v-if="item.project.type == 3">{{
- item.project.good_info.specification_name
- }}</span>
- </span>
- </td>
- <td style="text-align: center">
- {{ item.cnt }}
- </td>
- <td style="text-align: center">
- <span v-if="item.advice_id > 0">{{item.advice.prescribing_number_unit}}</span>
- <span v-if="item.project_id > 0">
- <span v-if="item.project.type == 2">{{item.project.project.unit}}</span>
- <span v-if="item.project.type == 3">{{item.project.good_info.packing_unit}}</span>
- </span>
- </td>
- <td style="text-align: center">
- {{ item.pric }}
- </td>
- <td style="text-align: center">
- {{ item.total_price }}
- </td>
- </tr>
-
- </table>
- </div>
- </div>
- </template>
-
- <script>
- import print from "print-js";
- import { uParseTime } from "@/utils/tools";
- import { getHisSummaryDetailList } from "@/api/his/his_tools";
- export default {
- data() {
- return {
- patient: {},
- tableData: [],
- list: [],
- his_patient: {},
- hisDepatment: [],
- settlement: [
- { value: 1, label: "医保" },
- { value: 2, label: "自费" },
- { value: 3, label: "公费" },
- { value: 4, label: "农保" },
- { value: 5, label: "会员" },
- { value: 6, label: "职工" },
- { value: 7, label: "合同" },
- { value: 8, label: "医保自费" },
- ],
- order:{},
- his_record_patient:{},
- orderList:[],
- };
- },
- 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;}.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}");
- },
- getHisSummaryDetailList() {
- 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,
- };
- getHisSummaryDetailList(params).then((response) => {
- if (response.data.state == 1) {
- var list = response.data.data.list;
-
- this.list = list;
- this.patient = response.data.data.patient;
-
- this.his_patient = response.data.data.his_patient;
-
- this.his_record_patient = response.data.data.his_record_patient
-
- this.hisDepatment = response.data.data.hisDepatment;
-
- this.orderList = response.data.data.orderList
- this.order = response.data.data.order
- this.tableData = [];
- for (let i = 0; i < list.length; i++) {
- for (let j = 0; j < list[i].orders.length; j++) {
- for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
- list[i].orders[j].order_info[z].record_date =
- list[i].orders[j].settle_accounts_date;
- list[i].orders[j].order_info[z].number =
- list[i].orders[j].number;
- this.tableData.push(list[i].orders[j].order_info[z]);
- }
- }
- }
- var obj = { index: "合计", total_price: 0, record_date: "0",is_total:2 };
- for (let i = 0; i < this.tableData.length; i++) {
- this.tableData[i].index = i + 1;
- this.tableData[i].total_price = 0;
- this.tableData[i].is_total = 1
- this.tableData[i].total_price = (
- this.tableData[i].cnt * this.tableData[i].pric).toFixed(2);
- obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
- }
- obj.total_price = obj.total_price.toFixed(2);
- this.tableData.push(obj);
-
-
-
- if (this.$route.query.keyword != "") {
- var new_arr = []
- for (let i = 0; i < this.tableData.length; i++) {
- if (this.tableData[i].index != "合计") {
- if (this.tableData[i].advice_id > 0) {
- if (
- this.tableData[i].advice.advice_name.indexOf(
- this.$route.query.keyword
- ) > -1
- ) {
- new_arr.push(this.tableData[i]);
- }
- }
- if (this.tableData[i].project_id > 0) {
- if (this.tableData[i].project.type == 2) {
- if (
- this.tableData[i].project.project.project_name.indexOf(
- this.$route.query.keyword
- ) > -1
- ) {
- new_arr.push(this.tableData[i]);
- }
- }
- if (this.tableData[i].project.type == 3) {
- if (
- this.tableData[i].project.good_info.good_name.indexOf(
- this.$route.query.keyword
- ) > -1
- ) {
- new_arr.push(this.tableData[i]);
- }
- }
- }
- }
- }
- var objs = {index:"合计",total_price:0,record_date:"0",is_total:2}
- for(let i=0;i<new_arr.length;i++){
- new_arr[i].is_total = 1
- }
- objs.total_price = this.getPrice(new_arr)
- new_arr.push(objs)
- this.tableData = new_arr;
-
- }
-
- if(this.$route.query.id == 1){
- var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
- var new_arr = []
- for(let i=0;i<this.tableData.length;i++){
- if(this.tableData[i].index!="合计"){
- if(this.tableData[i].advice_id > 0){
- new_arr.push(this.tableData[i])
- }
- }
- }
- this.tableData = []
- obj.total_price = this.getPrice(new_arr)
- for(let i=0;i<new_arr.length;i++){
- new_arr[i].is_total = 1
- }
- new_arr.push(obj)
- this.tableData = new_arr
- }
- if(this.$route.query.id == 2){
- var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
- var new_arr = []
- for(let i=0;i<this.tableData.length;i++){
- if(this.tableData[i].index!="合计"){
- if(this.tableData[i].project_id > 0){
- if(this.tableData[i].project.type ==2){
- new_arr.push(this.tableData[i])
- }
- }
- }
- }
-
- this.tableData = []
- obj.total_price = this.getPrice(new_arr)
-
- for(let i=0;i<new_arr.length;i++){
- new_arr[i].is_total = 1
- }
- new_arr.push(obj)
- this.tableData = new_arr
- }
-
- if(this.$route.query.id == 3){
- var new_arr = []
- var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
- for(let i=0;i<this.tableData.length;i++){
- if(this.tableData[i].index!="合计"){
- if(this.tableData[i].project_id > 0){
- if(this.tableData[i].project.type == 3){
- new_arr.push(this.tableData[i])
- }
- }
- }
- }
- this.tableData = []
- obj.total_price = this.getPrice(new_arr)
- for(let i=0;i<new_arr.length;i++){
- new_arr[i].is_total = 1
- }
- new_arr.push(obj)
-
- this.tableData = new_arr
- }
-
- }
- });
- },
- getAllPice() {
- var total_price = 0;
- for (let i = 0; i < this.tableData.length; i++) {
- if (this.tableData[i].index == "合计") {
- total_price = this.tableData[i].total_price;
- }
- }
- return total_price;
- },
- 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);
- },
- getFundPaySumamt() {
- var fund_pay_sumamt = 0;
- for (let i = 0; i < this.list.length; i++) {
- for (let j = 0; j < this.list[i].orders.length; j++) {
- fund_pay_sumamt += this.list[i].orders[j].fund_pay_sumamt;
- }
- }
- return fund_pay_sumamt;
- },
- getHifesPay() {
- var hifes_pay = 0;
- for (let i = 0; i < this.list.length; i++) {
- for (let j = 0; j < this.list[i].orders.length; j++) {
- hifes_pay += this.list[i].orders[j].hifes_pay;
- }
- }
- return hifes_pay;
- },
- getMafPay() {
- var maf_pay = 0;
- for (let i = 0; i < this.list.length; i++) {
- for (let j = 0; j < this.list[i].orders.length; j++) {
- maf_pay += this.list[i].orders[j].maf_pay;
- }
- }
- return maf_pay;
- },
- 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;
- },
- getType(id) {
- var name = "";
- for (let i = 0; i < this.settlement.length; i++) {
- if (id == this.settlement[i].value) {
- name = this.settlement[i].label;
- }
- }
- return name;
- },
- getPrice(val){
- var total_price = 0
- for(let i=0;i<val.length;i++){
- total_price += val[i].cnt * val[i].pric
- }
- return total_price.toFixed(2)
- }
- },
- created() {
- this.getHisSummaryDetailList();
- },
- };
- </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;
- }
- .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;
- }
- .print_btn {
- display: flex;
- justify-content: flex-end;
- }
- </style>
|