123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717 |
- <template>
- <div>
- <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
- <div>
- <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
- <!--@click="Action">-->
- <!--导出-->
- <!--</el-button>-->
- <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
- @keyup.enter.native='searchAction'
- placeholder="请输入患者姓名"
-
- class="filter-item"/>
- <el-select size="small" v-model="item_type" placeholder="请选择"
- style="width:150px;margin-left:10px;" @change="changeItem">
- <el-option
- label="全部"
- value="0">
- </el-option>
- <el-option
- v-for="item,index in items"
- :key="index"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <el-date-picker
- v-model="chargeDate"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- @change="changeDate"
- end-placeholder="结束日期">
- </el-date-picker>
- <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
- <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
- </div>
- <div>
- <!-- <el-popover
- placement="bottom"
- width="210"
- trigger="click">
- <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
- <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
- <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
-
- </el-popover> -->
- <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
- </div>
- </div>
- <el-table :data="tableData" border :row-style="{ color: '#303133' }"
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
- show-summary
- v-loading="settle_loading"
- max-height="600"
- :span-method="merge"
- :summary-method="getTotal"
- highlight-current-row>
-
- <el-table-column align="center" prop="name" label="患者名字">
- <template slot-scope="scope">{{ scope.row.other_name }}</template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="身份证">
- <template slot-scope="scope">
- {{scope.row.id_card_no}}
- </template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="就诊号">
- <template slot-scope="scope">
- {{scope.row.mdtrt_id}}
- </template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="治疗日期">
- <template slot-scope="scope">
- {{getTimes(scope.row.settle_accounts_date)}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="item_name" label="结算日期">
- <template slot-scope="scope">
- {{scope.row.setl_time?scope.row.setl_time.split(" ")[0]:getTimes(scope.row.settle_accounts_date)}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="item_name" label="结算类型">
- <template slot-scope="scope">
- <div v-if="scope.row.is_medicine_insurance == 0">自费</div>
- <div v-if="scope.row.is_medicine_insurance == 1">医保</div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="处方类型">
- <template slot-scope="scope">
- <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
- <div v-if="scope.row.med_type == '11'">普通门诊</div>
- <div v-if="scope.row.med_type == '1112'">普通门诊</div>
-
- </template>
- </el-table-column>
- <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
- <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
- <template slot-scope="scope">{{scope.row.fund_pay_sumamt.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
- <template slot-scope="scope">{{scope.row.acct_pay.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
- <template slot-scope="scope">{{scope.row.psn_cash_pay.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
- <template slot-scope="scope">{{scope.row.hifp_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
- <template slot-scope="scope">{{scope.row.hifob_pay.toFixed(2)}}</template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
- <template slot-scope="scope">{{scope.row.maf_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
- <template slot-scope="scope">{{scope.row.hifes_pay.toFixed(2)}}</template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
- <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="oth_pay" label="其他支付">
- <template slot-scope="scope">{{scope.row.oth_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
- <template slot-scope="scope">{{scope.row.cvlserv_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="wechat_pay" label="发票号码">
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.fa_piao_number" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.fa_piao_number,'fa_piao_number')">修改</el-button>
- </template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="wechat_pay" label="发票编号">
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.fa_piao_code" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.fa_piao_code,'fa_piao_code')">修改</el-button>
- </template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="wechat_pay" label="微信支付">
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.wechat_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.wechat_pay,'wechat_pay')">修改</el-button>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="ali_pay" label="支付宝支付">
- <!-- <template slot-scope="scope">{{scope.row.ali_pay}}</template>-->
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.ali_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.ali_pay,'ali_pay')">修改</el-button>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="band_card_pay" label="银行卡支付">
- <!-- <template slot-scope="scope">{{scope.row.band_card_pay}}</template>-->
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.band_card_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.band_card_pay,'band_card_pay')">修改</el-button>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="jifen_pay" label="积分支付">
- <!-- <template slot-scope="scope">{{scope.row.jifen_pay}}</template>-->
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.jifen_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.jifen_pay,'jifen_pay')">修改</el-button>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="cash_pay" label="现金支付">
- <!-- <template slot-scope="scope">{{scope.row.cash_pay}}</template>-->
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.cash_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.cash_pay,'cash_pay')">修改</el-button>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="item_name" label="其他说明">
- <!-- <template slot-scope="scope">{{scope.row.oth_desc}}</template>-->
- <template slot-scope="scope" style="width: 100px">
- <el-input v-model="scope.row.oth_desc"></el-input>
- <el-button size="small" @click="change(scope.row.id,scope.row.oth_desc,'oth_desc')">修改</el-button>
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="total" label="费用总额">
- <template slot-scope="scope">
- <div>{{scope.row.total.toFixed(2)}}</div>
- </template>
- </el-table-column>
-
- </el-table>
-
- <el-table ref="report-table" :data="tableData" v-show="false" border :row-style="{ color: '#303133' }"
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
- show-summary
- v-loading="settle_loading"
- max-height="600"
- :span-method="merge"
- :summary-method="getTotal"
- highlight-current-row>
-
- <el-table-column align="center" prop="name" label="患者名字">
- <template slot-scope="scope">{{ scope.row.other_name }}</template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="身份证">
- <template slot-scope="scope">
- {{scope.row.id_card_no}}
- </template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="就诊号">
- <template slot-scope="scope">
- {{scope.row.mdtrt_id}}
- </template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="治疗日期">
- <template slot-scope="scope">
- {{getTimes(scope.row.settle_accounts_date)}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="item_name" label="结算日期">
- <template slot-scope="scope">
- {{scope.row.setl_time?scope.row.setl_time.split(" ")[0]:getTimes(scope.row.settle_accounts_date)}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="item_name" label="结算类型">
- <template slot-scope="scope">
- <div v-if="scope.row.is_medicine_insurance == 0">自费</div>
- <div v-if="scope.row.is_medicine_insurance == 1">医保</div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="item_name" label="处方类型">
- <template slot-scope="scope">
- <div v-if="scope.row.med_type == '14'">门诊特殊病</div>
- <div v-if="scope.row.med_type == '11'">普通门诊</div>
- <div v-if="scope.row.med_type == '1112'">普通门诊</div>
-
- </template>
- </el-table-column>
- <el-table-column align="center" prop="medfee_sumamt" label="医疗费总额">
- <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="fund_pay_sumamt" label="基金支付金额">
- <template slot-scope="scope">{{scope.row.fund_pay_sumamt.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="acct_pay" label="个人账户支付金额">
- <template slot-scope="scope">{{scope.row.acct_pay.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="psn_cash_pay" label="个人支付金额">
- <template slot-scope="scope">{{scope.row.psn_cash_pay.toFixed(2)}}</template>
- </el-table-column>
- <el-table-column align="center" prop="hifp_pay" label="基金统筹金额">
- <template slot-scope="scope">{{scope.row.hifp_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="hifob_pay" label="大额基金支付">
- <template slot-scope="scope">{{scope.row.hifob_pay.toFixed(2)}}</template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="maf_pay" label="医疗救助基金">
- <template slot-scope="scope">{{scope.row.maf_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="hifes_pay" label="企业补充医疗保险基金支出">
- <template slot-scope="scope">{{scope.row.hifes_pay.toFixed(2)}}</template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="hifmi_pay" label="居民大病保险资金支出">
- <template slot-scope="scope">{{scope.row.hifmi_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="oth_pay" label="其他支付">
- <template slot-scope="scope">{{scope.row.oth_pay.toFixed(2)}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="cvlserv_pay" label="公务员医疗补助资金支出">
- <template slot-scope="scope">{{scope.row.cvlserv_pay.toFixed(2)}}</template>
- </el-table-column>
-
-
-
- <el-table-column align="center" prop="wechat_pay" label="发票号码">
- <template slot-scope="scope">{{scope.row.fa_piao_number}}</template>
- </el-table-column>
-
- <el-table-column align="center" prop="wechat_pay" label="发票编号">
- <template slot-scope="scope">{{scope.row.fa_piao_code}}</template>
- </el-table-column>
-
-
- <el-table-column align="center" prop="wechat_pay" label="微信支付">
- <template slot-scope="scope">{{scope.row.wechat_pay}}</template>
-
- <!-- <template slot-scope="scope" style="width: 100px">-->
- <!-- <el-input v-model="scope.row.wechat_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
- <!-- </template>-->
- </el-table-column>
-
- <el-table-column align="center" prop="ali_pay" label="支付宝支付">
- <template slot-scope="scope">{{scope.row.ali_pay}}</template>
- <!-- <template slot-scope="scope" style="width: 100px">-->
- <!-- <el-input v-model="scope.row.ali_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
- <!-- </template>-->
- </el-table-column>
-
- <el-table-column align="center" prop="band_card_pay" label="银行卡支付">
- <template slot-scope="scope">{{scope.row.band_card_pay}}</template>
- <!-- <template slot-scope="scope" style="width: 100px">-->
- <!-- <el-input v-model="scope.row.band_card_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
- <!-- </template>-->
- </el-table-column>
-
- <el-table-column align="center" prop="jifen_pay" label="积分支付">
- <template slot-scope="scope">{{scope.row.jifen_pay}}</template>
- <!-- <template slot-scope="scope" style="width: 100px">-->
- <!-- <el-input v-model="scope.row.jifen_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
- <!-- </template>-->
- </el-table-column>
-
- <el-table-column align="center" prop="cash_pay" label="现金支付">
- <template slot-scope="scope">{{scope.row.cash_pay}}</template>
- <!-- <template slot-scope="scope" style="width: 100px">-->
- <!-- <el-input v-model="scope.row.cash_pay" oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>-->
- <!-- </template>-->
- </el-table-column>
-
- <el-table-column align="center" prop="item_name" label="其他说明">
- <template slot-scope="scope">{{scope.row.oth_desc}}</template>
- <!-- <template slot-scope="scope" style="width: 100px">-->
- <!-- <el-input v-model="scope.row.oth_desc"></el-input>-->
- <!-- </template>-->
- </el-table-column>
-
- <el-table-column align="center" prop="total" label="费用总额">
- <template slot-scope="scope">
- <div>{{scope.row.total.toFixed(2)}}</div>
- </template>
- </el-table-column>
-
- </el-table>
-
- </div>
- </template>
-
-
- <script>
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import { GetSummarySettle,changeOrderDesc } from '@/api/his/his'
- import { uParseTime } from '@/utils/tools'
- // import NewStatementPrint from './newStatementPrint'
- const moment = require('moment')
- export default {
- components: {
- BreadCrumb
-
- },
- data() {
- return {
- settle_loading:false,
- crumbs: [],
- tempArr: [],
- sameRowArr: [],
- tableData: [],
- chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
- item_type: '0',
- items: [
- { id: 1, name: '医保' },
- { id: 2, name: '自费' },
- { id: 3, name: '门诊特殊病' },
- { id: 4, name: '普通门诊' },
- { id: 5, name: '城乡居民基本医疗保险' },
- { id: 6, name: '职工基本医疗保险' }
-
-
- ]
-
- }
- },
- methods: {
- change(id,desc,type){
- let params = {
- id: id,
- desc: desc,
- change_type: type
- }
- changeOrderDesc(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- } else {
- this.$message.success(response.data.data.msg)
- }
- })
- },
- getTimes(time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 0) {
- if (rowIndex % 2 === 0) {
- return {
- rowspan: 2,
- colspan: 1
- }
- } else {
- return {
- rowspan: 0,
- colspan: 0
- }
- }
- }
- },
- unique(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
- },
- changeDate() {
- // console.log(this.chargeDate)
- this.getSummarySettleList()
- },
- changeItem() {
- this.getSummarySettleList()
-
- },
- searchAction() {
- this.item_type = '0'
- this.getSummarySettleList()
-
- },
- getSummarySettleList() {
- let start_time = this.chargeDate[0]
- let end_time = this.chargeDate[1]
- let params = {
- start_time: start_time,
- end_time: end_time,
- type: this.item_type,
- keyword: this.keywords
- }
- this.settle_loading = true
- GetSummarySettle(params).then(response => {
- if (response.data.state == 0) {
- this.settle_loading = false
-
- this.$message.error(response.data.msg)
- return false
- } else {
- this.settle_loading = false
- this.tableData = []
- let data = response.data.data.patients
-
- for (let i = 0; i < data.length; i++) {
- let total = 0
- for (let b = 0; b < data[i].orders.length; b++) {
- let order = data[i].orders[b]
- order['other_name'] = data[i].name
- order['id'] = order.id
- order['id_card_no'] = data[i].id_card_no
- order['mdtrt_id'] =order.mdtrt_id
-
- total = parseFloat((parseFloat(total.toString()) + parseFloat(data[i].orders[b].medfee_sumamt.toString())).toFixed(2).toString())
- }
-
- data[i]['total'] = total
- }
- console.log(data)
-
- for (let i = 0; i < data.length; i++) {
- for (let b = 0; b < data[i].orders.length; b++) {
- let order = data[i].orders[b]
-
- if(b == 0){
- order['total'] = data[i].total
-
- }else{
- order['total'] = 0
-
- }
-
- this.tableData.push(order)
-
- }
- }
- console.log(this.tableData)
-
- this.handleSpanTempArr()
- }
- })
- }, uniqueProjectAndAdvice(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].item_id === res[j].item_id && array[i].price === res[j].price) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- }, sort(arr) {
- for (var i = 0; i < arr.length - 1; i++) {
- for (var j = 0; j < arr.length - i - 1; j++) {
- if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
- var hand = arr[j]
- arr[j] = arr[j + 1]
- arr[j + 1] = hand
-
- }
- }
- }
- return arr
- }, handleSpanTempArr() {
- this.tempArr = []
-
- for (let i = 0; i < this.tableData.length; i++) {
- if (i === 0) {
- this.tempArr.push(1)
- this.pos = 0
- } else {
- // 判断当前元素与上一个元素是否相同
- if (this.tableData[i].patient_id === this.tableData[i - 1].patient_id) {
- this.tempArr[this.pos] += 1
- this.tempArr.push(0)
- } else {
- this.tempArr.push(1)
- this.pos = i
- }
- }
- }
-
- let sameRowArr = [], sIdx = 0
- this.tableData.forEach((item, index) => {
- item.index = index
- if (index === 0) {
- sameRowArr.push([index])
- } else {
- if (item.patient_id === this.tableData[index - 1].patient_id) {
- sameRowArr[sIdx].push(index)
- } else {
- sIdx = sIdx + 1
- sameRowArr.push([index])
- }
- }
- })
- this.sameRowArr = sameRowArr
- }, merge({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 0 || columnIndex === 1) {
- const _row = this.tempArr[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- }
- },
- getTotal(param) {
- const { columns, data } = param
- const sums = []
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = '合计'
- return
- }
- console.log(data)
- const values = data.map(item => Number(item[column.property]))
- if (column.property === 'total' || column.property === 'medfee_sumamt' || column.property === 'fund_pay_sumamt' || column.property === 'acct_pay' || column.property === 'maf_pay' || column.property === 'psn_cash_pay' || column.property === 'hifp_pay' || column.property === 'hifob_pay' || column.property === 'hifes_pay' || column.property === 'hifmi_pay' || column.property === 'oth_pay' || column.property === 'cvlserv_pay' || column.property === 'wechat_pay' || column.property === 'ali_pay' || column.property === 'band_card_pay' || column.property === 'jifen_pay' || column.property === 'cash_pay') {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr)
- if (!isNaN(value)) {
- return prev + curr
- } else {
- return prev
- }
- }, 0)
- sums[index] = sums[index].toFixed(2)
- } else {
- sums[index] = ''
- }
- })
-
- return sums
- },
- export_detail() {
- console.log("~~~~~~~")
-
- let list = []
- // for (let i = 0; i < this.tableData.length; i++) {
- // let order = this.tableData[i]
- // let name = order.other_name
- // let id_card_no = order.id_card_no
- //
- // let time = ''
- // let balance_accounts = ""
- // let med_type = ""
- // let medfee_sumamt = ""
- // let fund_pay_sumamt = ""
- // let acct_pay = ""
- // let psn_cash_pay = ""
- // let hifes_pay = ""
- // let hifmi_pay = ""
- // let hifp_pay = ""
- // let hifob_pay = ""
- // let maf_pay = ""
- // let time2 = ""
- // time2 = this.getTimes(order.settle_accounts_date)
- //
- // let total = ""
- //
- // if(order.setl_time.length == 0){
- //
- // time = this.getTimes(order.settle_accounts_date)
- //
- // }else {
- //
- // time = order.setl_time.split(" ")[0]
- //
- // }
- //
- // if (order.is_medicine_insurance == 0) {
- // balance_accounts = '自费'
- // }
- //
- // if (order.is_medicine_insurance == 1) {
- // balance_accounts = '医保'
- // }
- //
- // if (order.med_type == '14') {
- // med_type = '门诊特殊病'
- // }
- //
- // if (order.med_type == '11') {
- // med_type = '普通门诊'
- // }
- //
- // medfee_sumamt = order.medfee_sumamt
- // fund_pay_sumamt = order.fund_pay_sumamt
- //
- // acct_pay = order.acct_pay
- //
- // psn_cash_pay = order.psn_cash_pay
- // hifes_pay = order.hifes_pay
- // hifmi_pay = order.hifmi_pay
- // hifp_pay = order.hifp_pay
- // hifob_pay = order.hifob_pay
- // maf_pay = order.maf_pay
- // total = order.total
- //
- //
- // let obj = {
- // '患者姓名': name,
- // '身份证': id_card_no,
- // '治疗日期': time2,
- // '结算日期': time,
- // '结算类型': balance_accounts,
- // '处方类型': med_type,
- // '医疗费总额': medfee_sumamt,
- // '基金支付金额': fund_pay_sumamt,
- // '基金统筹金额': hifp_pay,
- // '大额基金支付':hifob_pay,
- // '医疗救助基金':maf_pay,
- // '个人账户支付金额': acct_pay,
- // '个人支付基金': psn_cash_pay,
- // '企业补充医疗保险基金支出': hifes_pay,
- // '居民大病保险资金支出': hifmi_pay,
- // '费用总额':total,
- //
- // }
- // list.push(obj)
- // }
- import('@/vendor/Export2Excel').then(excel => {
- const tHeader = [ '患者姓名','身份证', '治疗日期','结算日期', '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付基金','企业补充医疗保险基金支出','居民大病保险资金支出', '费用总额']
- const filterVal = [ '患者姓名','身份证', '治疗日期','结算日期', '结算类型', '处方类型', '医疗费总额', '基金支付金额', '个人账户支付金额', '个人支付基金','企业补充医疗保险基金支出','居民大病保险资金支出', '费用总额']
- const data = this.formatJson(filterVal, list)
- excel.export_json_to_excel1({
- header: tHeader,
- data,
- filename: '结算明细',
- ref:this.$refs['report-table'].$el
- })
- })
-
- }, formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]))
- }
- },
- created() {
- this.getSummarySettleList()
-
- }
- }
- </script>
|