123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809 |
- <template>
- <div class="main-contain outpatientChargesManagement">
- <div class="position">
- <bread-crumb :crumbs='crumbs'></bread-crumb>
- </div>
- <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
- <div class="mainLeft">
-
- <el-date-picker
- v-model="record_date"
- prefix-icon="el-icon-date"
- @change="changeTimeTwo"
- :editable="false"
- style="width: 100%;"
- type="date"
- :picker-options="pickerOptions"
- placeholder="选择开始时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
-
- <div class="mainCell">
- <el-radio-group v-model="schedule_type" @change="changeScheduleType">
- <el-radio :label="1">上午</el-radio>
- <el-radio :label="2">下午</el-radio>
- <el-radio :label="3">晚上</el-radio>
- <el-radio :label="0">全部</el-radio>
- </el-radio-group>
- </div>
-
- <div class="mainCell">
- <el-radio-group v-model="radio" @change="changeRadio">
- <el-radio :label=1>未上传<span
- style="color: red;margin-bottom:10px;display: inline-block;">{{ un_upload_num }}</span>人
- </el-radio>
- <el-radio :label=2>已上传<span
- style="color: red;margin-bottom:10px;display: inline-block;">{{ upload_num }}</span>人
- </el-radio>
-
- </el-radio-group>
- </div>
- <div class="mainCell" style="margin-bottom:10px;">
- <el-input size="small" v-model.trim="search_input"
- class="filter-item"/>
- <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
- @click="searchAction">
- 搜索
- </el-button>
- </div>
- <div>
- <el-table :data="patientTableData" :height="tableHeight" border
- style="width: 100%;"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
- highlight-current-row ref="tab"
- @current-change="handleCurrentChange">
- <el-table-column align="center" prop="name" label="姓名" wdith='89'>
- <template slot-scope="scope">{{ scope.$index + 1 }}.{{ scope.row.name }}</template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="就诊号" width="110">
- <template slot-scope="scope">{{ scope.row ? scope.row.number : '' }}
- </template>
- </el-table-column>
- </el-table>
-
- </div>
- </div>
-
- <div class="mainRight">
-
- <div class="mainCell fixedCell" style="margin-bottom:10px;">
-
- <div v-if="activeName == 'first'">
-
- <el-button
- v-if="(this.radio == 1 && this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 )"
- size="small"
- @click="open(1)"
- type="primary">上传费用明细
- </el-button>
-
-
- <el-button
- v-if="(this.radio == 1 && this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 )"
- size="small"
- @click="open(1)"
- type="primary">上传费用明细
- </el-button>
-
-
- <el-button
- v-if="( this.radio == 2 &&this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
- size="small" @click="open(2)" type="primary"
- >撤销明细
- </el-button>
-
- </div>
- <div v-if="activeName == 'second'">
-
- <el-button
- v-if="( this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 )"
- size="small"
- @click="open(1)"
- type="primary">上传费用明细
- </el-button>
-
-
- <el-button
- v-if="( this.hisPatientInfo.balance_accounts_type != 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
-
- size="small" @click="open(2)" type="primary"
- >撤销明细
- </el-button>
-
- </div>
-
- </div>
-
- <div class="mainCenter" v-loading="loading">
- <el-tabs class="settlementTabs" v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="日结" name="first">
- <div style="display:flex;height:100%;">
- <div class="centerLeft">
- <div class="tabsBox">
- <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
- <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
- @tab-click="tabclickEvent">
- <el-tab-pane
- v-for="(item, index) in prescriptions"
- :key="index"
- :label="item.name"
- :name="item.name"
- >
- </el-tab-pane>
-
- <!--<div class="RP">-->
- <!--Rp-->
- <!--<el-date-picker-->
- <!--v-model="record_date"-->
- <!--type="date"-->
- <!--:clearable="false"-->
- <!--@change="changeDate"-->
- <!--format="yyyy-MM-dd"-->
- <!--value-format="yyyy-MM-dd"-->
- <!--placeholder="选择日期">-->
- <!--</el-date-picker>-->
- <!--</div>-->
- <!--<charge-prescription-table ref="prescription_tables"-->
- <!--:prescription="curPrescriptions"></charge-prescription-table>-->
- <!--<charge-prescription-table ref="prescription_tables" :prescription="curPrescriptions"></charge-prescription-table>-->
- <charge-prescription-table ref="prescription_tables"
- :manufacturers="manufacturers"
- :prescription="curPrescriptions"></charge-prescription-table>
-
- </el-tabs>
-
- </div>
- <div class="costBox">
- <span>当前处方总费用:<span style="color:red;">{{ total }}元</span></span>
- <span v-if="this.radio == 2">处方总价:<span style="color:red;">{{all_total+'元' + ' = 全自费总金额:'+fulamt_ownpay_amt + '元+' + '超限价总金额:' + overlmt_amt + '元+' + '先行自付金额:' + preselfpay_amt + '元+' + '符合正常范围总金额:' + inscp_scp_amt + '元' }}</span></span>
- <span v-if="this.radio == 1">处方总价:<span style="color:red;">{{all_total }}元</span></span>
-
- <!-- <span v-if="this.curPrescriptions.order_status == 1">待结算</span>-->
- <!-- <span v-if="this.curPrescriptions.order_status == 2">已结算</span>-->
- <!-- <span v-if="this.curPrescriptions.order_status == 3">已退费</span>-->
- </div>
- </div>
- <!-- <div class="centerRight">-->
- <!-- <p class="centerRightTitle">人员信息</p>-->
- <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
- <!-- <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>-->
- <!-- <span style="font-size:14px;">日期:{{ record_date }}</span>-->
- <!-- </div>-->
- <!-- <ul class="basicUl">-->
- <!-- <li style="width:50%;">姓名:{{ patientInfo.name }}</li>-->
- <!-- <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>-->
- <!-- <li style="width:50%;">年龄:{{ patientInfo.age }}</li>-->
- <!-- <li style="width:50%;">电话:{{ patientInfo.phone }}</li>-->
-
- <!-- <!–<span>过敏病史:</span>–>-->
- <!-- <!–<el-autocomplete–>-->
- <!-- <!–style="width:100%;"–>-->
- <!-- <!–class="inline-input"–>-->
- <!-- <!–v-model="sick_history"–>-->
- <!-- <!–:fetch-suggestions="querySearch2"–>-->
- <!-- <!–placeholder="请输入内容"–>-->
- <!-- <!–></el-autocomplete>–>-->
- <!-- <!–<li style="width:100%;">地址:{{patientInfo.home_address}}</li>–>-->
- <!-- <!–<li style="width:100%;">过敏史及其他病史:{{info.sick_history}}</li>–>-->
- <!-- </ul>-->
- <!-- <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>-->
- <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
- <!-- <span style="font-size:14px;">住院编号:{{ hisPatientInfo.number }}</span>-->
- <!-- </div>-->
- <!-- <ul class="basicUl">-->
- <!-- <li style="width:50%;">医生:{{ info.doctor }}</li>-->
- <!-- <li style="width:50%;">科室:{{ info.departments }}</li>-->
- <!-- <li style="width:100%;">总费用:{{ getTotal() }}</li>-->
-
- <!-- <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>-->
- <!-- <li style="width:100%;">是否有传染病:</li>-->
- <!-- <li style="width:100%;">血压:</li>-->
- <!-- </ul>-->
- <!-- </div>-->
- </div>
- </el-tab-pane>
- <el-tab-pane label="月结" name="second">
- <div style="display:flex;height:100%;">
- <div class="centerLeft">
- <div class="tabsBox">
- <!-- <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button> -->
- <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
- @tab-click="tabclickEventTwo">
-
- <el-tab-pane
- v-for="(item, index) in month_prescriptions"
- :key="index"
- :label="item.name"
- :name="item.name">
- </el-tab-pane>
-
- <div class="RP">
- Rp
- <el-date-picker
- v-model="other_start_time"
- prefix-icon="el-icon-date"
- @change="changeTime"
- :editable="false"
- style="width: 150px;"
- type="date"
- placeholder="选择开始时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <span class>-</span>
- <el-date-picker
- v-model="other_end_time"
- prefix-icon="el-icon-date"
- @change="changeEndTime"
- :editable="false"
- style="width: 150px;"
- type="date"
- placeholder="选择结束时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- <el-select v-model="month_is_upload" @change="changeMonthData"
- placeholder="请选择">
- <el-option
- v-for="item in upload_options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
-
- <!--<prescription-table :preTableData='preTableData'></prescription-table>-->
- <!--<month-prescription-table ref="prescription_tables"-->
- <!--:activeType="activeType" :prescription="curMonthPrescriptions"></month-prescription-table>-->
- <charge-month-prescription-table
- :prescription="curMonthPrescriptions"></charge-month-prescription-table>
-
- </el-tabs>
-
- </div>
- <div class="costBox">
- <span>当前处方总费用:<span style="color:red;">{{ month_total }}元</span></span>
- <span>处方总价:<span style="color:red;">{{ all_month_total }}元</span></span>
-
- <!--<span>{{ state }}</span>-->
- </div>
- </div>
- <!-- <div class="centerRight">-->
- <!-- <p class="centerRightTitle">人员信息</p>-->
- <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
- <!-- <span style="font-size:14px;">人员编码:{{ patientInfo.dialysis_no }}</span>-->
- <!-- <span style="font-size:14px;">日期:{{ record_date }}</span>-->
- <!-- </div>-->
-
- <!-- <ul class="basicUl">-->
- <!-- <li style="width:50%;">姓名:{{ patientInfo.name }}</li>-->
- <!-- <li style="width:50%;">性别:{{ patientInfo.gender == 1 ? '男' : '女' }}</li>-->
- <!-- <li style="width:50%;">年龄:{{ patientInfo.age }}</li>-->
- <!-- <li style="width:50%;">电话:{{ patientInfo.phone }}</li>-->
- <!-- <li style="width:100%;">过敏史及其他病史:{{ info.sick_history }}</li>-->
-
- <!-- </ul>-->
- <!-- <p class="centerRightTitle" style="padding-top: 10px;">诊断信息</p>-->
- <!-- <div style="display:flex;justify-content: space-between;line-height:30px;">-->
- <!-- <span style="font-size:14px;">门诊编号:{{ hisPatientInfo.number }}</span>-->
- <!-- </div>-->
- <!-- <ul class="basicUl">-->
- <!-- <li style="width:50%;">医生:{{ info.doctor }}</li>-->
- <!-- <li style="width:50%;">科室:{{ getDepartment(info.departments) }}</li>-->
- <!-- <li style="width:100%;" v-if="activeName == 'first'">总费用:{{ getTotal() }}</li>-->
- <!-- <li style="width:100%;" v-if="activeName == 'second'">总费用:{{ getTotalTwo() }}-->
- <!-- </li>-->
-
- <!-- <li style="width:100%;">判断结果:{{ info.diagnosis }}</li>-->
- <!-- <!–<li style="width:100%;">是否有传染病:</li>–>-->
- <!-- <!–<li style="width:100%;">血压:</li>–>-->
- <!-- </ul>-->
- <!-- </div>-->
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
- </div>
-
- </div>
-
- </template>
-
-
- <script>
- import axios from 'axios'
-
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import noCharge from './components/noCharge'
- import charged from './components/charged'
- import medicalInsuranceRefund from './components/medicalInsuranceRefund'
- import additionalCharges from './components/additionalCharges'
- import { getHisHospitalDetailInfo, getHisHospitalDetailList, getMonthHisHospitalDetailInfo } from '@/api/his/his'
- import { uParseTime } from '@/utils/tools'
-
- import RegisterDialog from './components/registerDialog'
- import treatPrint from './treatPrint'
- import statementPrint from './statementPrint'
- import ChargeDialog from './components/chargeDialog'
- import MonthPrescriptionTable from './components/monthPrescriptionTable'
- import ChargeMonthPrescriptionTable from './components/chargeMonthPrescriptionTable'
- import NewStatementPrintTwo from './newStatementPrintTwo'
- import RegisterDialog9504 from './components/registerDialog9504'
- import ChargePrescriptionTable from './components/ChargePrescriptionTable'
- import invoicePrint from './invoicePrint'
- import SettlePrescriptionTable from './components/settlePrescriptionTable'
-
- const moment = require('moment')
- export default {
- components: {
- SettlePrescriptionTable,
- ChargePrescriptionTable,
- RegisterDialog9504,
- NewStatementPrintTwo,
- ChargeMonthPrescriptionTable,
- MonthPrescriptionTable,
- ChargeDialog,
- RegisterDialog,
- BreadCrumb,
- noCharge,
- charged,
- medicalInsuranceRefund,
- additionalCharges,
- treatPrint,
- statementPrint,
- invoicePrint
-
- },
- data() {
- return {
- register: [
- { value: 11, label: '普通门诊' },
- // { value: 12, label: '门诊挂号' },
- // { value: 13, label: '急诊' },
- { value: 14, label: '门诊慢性病' }
- // { value: 15, label: '门诊统筹' },
- // { value: 16, label: '门诊慢性病' },
- // { value: 21, label: '普通住院' }
-
- ],
- upload_options: [
- { value: 0, label: '全部' },
- { value: 2, label: '已上传' },
- { value: 1, label: '未上传' }
-
- ],
- loading: false,
- dise_loading: false,
- month_is_upload: 0,
- sick_history: '',
- p_type: '',
- sick_type: '',
- diagnosis: '',
- isShowUpload: 1,
- isShowWithdrawUpload: 1,
- schedule_type: 0,
- month_p_type: '',
- month_sick_type: '',
- month_diagnosis: '',
- key: '',
- other_start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
- other_end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- curMonthPrescriptions: null,
- curSettlePrescriptions: null,
-
- month_total: 0,
- crumbs: [
- { path: false, name: '住院工作站' },
- { path: false, name: '住院收费管理' }
- ],
- current_index: 0,
- un_upload_num: '',
- upload_num: '',
- tableHeight: '',
- fullHeight: document.documentElement.clientHeight,
- activeName: 'first',
- info: {},
- curPrescriptions: {},
- prescriptions: [],
- month_prescriptions: [],
- settle_prescriptions: [],
-
- settle_total: 0,
- all_total:0,
- all_month_total:0,
- record_date: '',
- tableData: [],
- editableTabsValue: '处方1',
-
- editSettletableTabsValue: '处方1',
-
- loadingone: false,
- editableTabs: [{
- title: '处方1',
- name: '1'
- }],
- tabIndex: 1,
- hisPatientInfo: {},
- loadingtwo: false,
- patientTableData: [{
- name: '杨美英',
- mdtrt_id: '1709946'
- }],
- patientInfo: { id: 0 },
- doctor: {},
- total: 0,
- state: '未收费',
- radio: 1,
- radioStatus: 1,
- search_input: '',
- start_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
- patient_id: 0,
- prescription_id: 0,
- all_table_data: [],
- manufacturers: [],
- hisPatientDatas: [],
- order: {},
- addtions_charge: [],
- treatVisible: false,
- orderObj: {},
- paramsObj: {},
- newOrderObj: {},
- statementVisible: false,
- newStatementVisible: false,
- chargePatientTableData: [],
- sick: [],
- diagnoses: [],
-
- department: [],
- invoiceVisible: false,
- invoiceParams: {},
- fulamt_ownpay_amt:'',
- overlmt_amt:'',
- preselfpay_amt:'',
- inscp_scp_amt:'',
- }
- },
- created() {
- let tableHeight = document.body.clientHeight - 243
- this.tableHeight = tableHeight
- var nowDate = new Date()
- var nowYear = nowDate.getFullYear()
- var nowMonth = nowDate.getMonth() + 1
- var nowDay = nowDate.getDate()
- this.record_date =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
-
- // this.getInitData()
- //获取患者信息
- this.getPatientList()
- },
- methods: {
- changeScheduleType() {
-
- this.getPatientList()
-
- },
- getMonthData() {
- this.loading = true
-
- let params = {
- 'id': this.hisPatientInfo.id,
- 'patient_id': this.hisPatientInfo.patient_id,
- 'start_time': this.other_start_time,
- 'end_time': this.other_end_time,
- 'is_upload': this.month_is_upload
- }
- getMonthHisHospitalDetailInfo(params).then(response => {
- if (response.data.state == 0) {
- this.loading = false
- this.$message.error(response.data.msg)
- return false
- } else {
- this.month_prescriptions = []
- this.curMonthPrescriptions = {}
- this.loading = false
- this.hisPatientInfo = response.data.data.his_info
- this.setMonthPrescription(response.data.data.month_prescriptions)
- this.month_total = this.getMonthTotalOne()
- this.all_month_total = this.getTotalTwo()
- }
- })
-
- },
- changeMonthData() {
- this.getMonthData()
-
- },
- getTimes(time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
- changeTimeTwo() {
- this.getPatientList()
- },
-
- changeTime(val) {
- this.getPatientInformation(this.hisPatientInfo.id, this.hisPatientInfo.patient_id)
- }, changeEndTime(val) {
- this.getPatientInformation(this.hisPatientInfo.id, this.hisPatientInfo.patient_id)
-
- },
-
- handleClick() {
- // this.getPatientList()
- if (this.activeName == 'first') {
- // this.patientTableData = this.all_table_data
- this.getDayPatientList()
-
- } else if (this.activeName == 'second') {
- this.getMonthPatientList()
- // this.getPatientList()
-
- // if (this.patientTableData.length > 0) {
- // this.$refs.tab.setCurrentRow(this.patientTableData[0])
- // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order.number)
- // }
-
- } else {
-
- console.log(this.settle_prescriptions)
- }
-
- },
- searchAction() {
-
- if (this.search_input.length == 0) {
- switch (this.radio) {
- case 1:
- this.patientTableData = this.all_table_data
-
- break
- case 2:
-
- this.patientTableData = this.all_table_data
-
- break
- }
-
- } else {
- switch (this.radio) {
- case 1:
- let arr3 = []
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].name.indexOf(this.search_input) != -1) {
- arr3 = arr3.concat(this.all_table_data[i])
- }
- }
- this.patientTableData = arr3
- break
- case 2:
- let arr2 = []
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].name.indexOf(this.search_input) != -1 ){
- arr2 = arr2.concat(this.all_table_data[i])
- }
- }
- this.patientTableData = arr2
-
- break
-
- }
- }
-
- },
- tabclickEventTwo(val) {
- for (let i = 0; i < this.month_prescriptions.length; i++) {
- if (this.month_prescriptions[i].name == val.name) {
-
- this.curMonthPrescriptions = {}
- var temp = this.deepClone(this.month_prescriptions[i])
- this.curMonthPrescriptions = temp
- }
- }
- this.prescription_id = this.month_prescriptions.id
- this.month_total = 0
- this.month_total = this.getMonthTotalOne()
-
- },
- tabclickEventThree(val) {
- for (let i = 0; i < this.settle_prescriptions.length; i++) {
- if (this.settle_prescriptions[i].name == val.name) {
-
- this.curSettlePrescriptions = {}
- var temp = this.deepClone(this.settle_prescriptions[i])
- this.curSettlePrescriptions = temp
- }
- }
- this.prescription_id = this.settle_prescriptions.id
- this.settle_total = 0
- this.settle_total = this.getSettleTotalOne()
-
- },
- tabclickEvent(val) {
- console.log('val', val.name)
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].name == val.name) {
-
- this.curPrescriptions = {}
- var temp = this.deepClone(this.prescriptions[i])
- this.curPrescriptions = temp
- }
- }
- console.log('9999', this.curPrescriptions)
- this.prescription_id = this.curPrescriptions.id
- this.total = 0
- this.total = this.getTotalOne()
-
- },
- deepClone(source) {
- if (!source && typeof source !== 'object') {
- throw new Error('error arguments', 'shallowClone')
- }
- const targetObj = source.constructor === Array ? [] : {}
- Object.keys(source).forEach((keys) => {
- if (source[keys] && typeof source[keys] === 'object') {
- targetObj[keys] = this.deepClone(source[keys])
- } else {
- targetObj[keys] = source[keys]
- }
- })
- return targetObj
- },
- getTotalOne() {
- var total = 0
- if (this.curPrescriptions.type == 1) {
- if (this.curPrescriptions.advices != null) {
- for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.curPrescriptions.advices[a].retail_price * this.curPrescriptions.advices[a].prescribing_number)
-
- }
- }
- } else {
- if (this.curPrescriptions.project != null) {
- for (let b = 0; b < this.curPrescriptions.project.length; b++) {
- total = parseFloat(total) + parseFloat(this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total)
-
- }
- }
- }
- return total.toFixed(2)
- },
- getMonthTotalOne() {
- var total = 0
- if (this.curMonthPrescriptions.type == 1) {
- if (this.curMonthPrescriptions.advices != null) {
- for (let a = 0; a < this.curMonthPrescriptions.advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.advices[a].retail_price * this.curMonthPrescriptions.advices[a].prescribing_number)
-
- }
- }
- } else {
- if (this.curMonthPrescriptions.project != null) {
- for (let b = 0; b < this.curMonthPrescriptions.project.length; b++) {
- total = parseFloat(total) + parseFloat(this.curMonthPrescriptions.project[b].price * this.curMonthPrescriptions.project[b].total)
-
- }
- }
- }
-
- return total.toFixed(2)
-
- },
- getTotal() {
- var total = 0
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total)
- }
- }
-
- }
- return total.toFixed(2)
-
- },
- getTotalTwo() {
- var total = 0
- for (let i = 0; i < this.month_prescriptions.length; i++) {
- if (this.month_prescriptions[i].advices != null) {
- for (let a = 0; a < this.month_prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.month_prescriptions[i].advices[a].retail_price * this.month_prescriptions[i].advices[a].prescribing_number)
- }
- }
- if (this.month_prescriptions[i].project != null) {
- for (let a = 0; a < this.month_prescriptions[i].project.length; a++) {
-
- total = parseFloat(total) + parseFloat(this.month_prescriptions[i].project[a].price * this.month_prescriptions[i].project[a].total)
- }
- }
-
- }
- return total.toFixed(2)
-
- },
- moreState(tab, event) {
- if (tab == 'more') {
- return false
- }
- }, formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]))
- },
- open(index) {
- if (index == 2) {
- let settle_accounts_type = ''
- if (this.activeName == 'first') {
- settle_accounts_type = 1
- var that = this
- this.$confirm('是否撤销明细', '撤销明细', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
-
- let params = {
- 'settle_accounts_type': settle_accounts_type,
- 'patient_id': that.hisPatientInfo.patient_id,
- 'his_patient_id': that.hisPatientInfo.id,
- 'record_time': that.record_date,
- 'admin_user_id': that.$store.getters.xt_user.user.id
- }
- axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
- params: params
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- } else {
- that.$message.success('撤销明细成功')
- that.radio = 1
- that.getPatientList()
- }
-
- }
- })
- .catch(function(error) {
- })
-
- }).catch(() => {
- })
- } else {
- settle_accounts_type = 2
- var that = this
- this.$confirm('该操作会撤销此次入院后所有处方明细,是否继续操作?', '撤销明细', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
-
- let params = {
- 'settle_accounts_type': settle_accounts_type,
- 'patient_id': that.hisPatientInfo.patient_id,
- 'his_patient_id': that.hisPatientInfo.id,
- 'record_time': that.record_date,
- 'order_id': that.order.id,
- 'admin_user_id': that.$store.getters.xt_user.user.id
- }
- axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
- params: params
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- } else {
- that.$message.success('撤销明细成功')
- that.radio = 1
- that.getPatientList()
- }
-
- }
- })
- .catch(function(error) {
- })
-
- }).catch(() => {
- })
-
- }
-
- } else if (index == 1) {
- var that = this
- let params = {
- 'in_hospital_id': that.hisPatientInfo.id,
- 'id': that.hisPatientInfo.patient_id,
- 'admin_user_id': that.$store.getters.xt_user.user.id,
- 'record_time': that.record_date
-
- }
- if (this.activeName == 'first') {
- params['settle_accounts_type'] = 1
-
- } else {
- params['start_time'] = that.other_start_time
- params['end_time'] = that.other_end_time
- params['settle_accounts_type'] = 2
-
- }
- if (this.hisPatientInfo.balance_accounts_type != 2){
- axios.get('http://127.0.0.1:9532/zh/api/uploadinfo/get', {
- params: params
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- } else {
- that.$message.success('上传明细成功')
- that.radio = 2
- that.getPatientList()
- }
-
- }
- })
- .catch(function(error) {
- })
- }else if (this.hisPatientInfo.balance_accounts_type == 2){
-
-
- }
- }
- },
- changeRadio(id) {
- // this.hisPatientInfo = null
- this.getPatientList()
- },
- formatDecimal(num, decimal) {
- num = num.toString()
- let index = num.indexOf('.')
- if (index !== -1) {
- num = num.substring(0, decimal + index + 1)
- } else {
- num = num.substring(0)
- }
- return parseFloat(num).toFixed(decimal)
- },
- //患者列表
- getPatientList() {
- let params = {
- 'record_date': this.record_date,
- 'sch_type': this.schedule_type
- }
- getHisHospitalDetailList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.list == null) {
- response.data.data.list = []
- }
- if (response.data.data.list_two == null) {
- response.data.data.list_two = []
- }
- this.hisPatientInfo = {}
- this.curPrescriptions = {}
- this.curMonthPrescriptions = {}
- this.month_prescriptions = []
- this.prescriptions = []
-
- this.patientTableData = []
- this.upload_num = response.data.data.upload_num
- this.un_upload_num = response.data.data.un_upload_num
- switch (this.radio) {
- case 1:
- this.all_table_data = response.data.data.list
- this.patientTableData = response.data.data.list
- if (this.hisPatientInfo.id > 0){
- for (let i = 0; i < this.patientTableData.length; i++) {
- if (this.hisPatientInfo.patient_id == this.patientTableData[i].patient_id) {
- this.current_index = i
- this.$refs.tab.setCurrentRow(this.patientTableData[i])
- this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].id)
-
- }
- }
- }else{
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].patient_id, this.patientTableData[0].id)
- }
- break
- case 2:
- this.all_table_data = response.data.data.list_two
-
- this.patientTableData = response.data.data.list_two
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.chargePatientTableData[0].patient_id, this.patientTableData[0].id)
- break
-
- }
- }
- })
- },
- setMonthPrescription(month_prescriptions) {
- this.month_prescriptions = []
-
- let drug_month_prescriptions = {
- advices: []
- }
- let drug_ids = []
- let project_month_prescriptions = {
- project: []
-
- }
- let project_ids = []
-
- let addition_month_prescriptions = {
- addition: []
-
- }
- let additions_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_ids.push(month_prescriptions[i].advices[a].drug_id)
-
- 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_two(drug_ids)
- project_ids = this.unique_two(project_ids)
- additions_ids = this.unique_two(additions_ids)
-
- let drugs = []
- let projects = []
- let additions = []
-
- 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['drug_name'] = drug_month_prescriptions.advices[a].advice_name
- 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'] = obj['prescribing_number'] + drug_month_prescriptions.advices[a].prescribing_number
- obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
- obj['medical_insurance_number'] = drug_month_prescriptions.advices[a].drug.medical_insurance_number
- obj['id'] = drug_month_prescriptions.advices[a].drug_id
- // obj['retail_price'] = obj['retail_price'] + drug_month_prescriptions.advices[a].drug.retail_price
- obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price)
- count = count + drug_month_prescriptions.advices[a].prescribing_number
-
- }
- }
- obj['prescribing_number'] = count
- drugs.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['statistical_classification'] = ''
- obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
- obj['project_name'] = project_month_prescriptions.project[a].project.project_name
- obj['type'] = 2
-
- } else if (project_month_prescriptions.project[a].type == 3) {
- obj['statistical_classification'] = ''
- obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
- obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
- obj['type'] = 3
-
- }
-
- // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
- // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
- 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['number_days'] = project_month_prescriptions.project[a].day
- // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
- obj['unit'] = project_month_prescriptions.project[a].unit
- obj['project_id'] = project_month_prescriptions.project[a].project_id
- count = count + parseFloat(project_month_prescriptions.project[a].count)
- // price = price + project_month_prescriptions.project[a].price
- obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
-
- }
- }
- obj['total'] = count
- projects.push(obj)
- }
-
- let p1 = {
- name: '处方' + 1,
- advices: drugs,
- project: [],
- type: 1,
- addition: additions
- }
- let p2 = {
- name: '处方' + 2,
- type: 2,
- project: projects,
- advices: [],
- addition: []
- }
-
- this.month_prescriptions.push(p1)
- this.month_prescriptions.push(p2)
-
- this.curMonthPrescriptions = this.month_prescriptions[0]
-
- },
-
- unique_two(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
- },
-
- unique(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
- },
- handleCurrentChange(val) {
- this.getPatientInformation(val.id, val.patient_id)
- },
- //获取患者的基本信息
- getPatientInformation(id, patient_id) {
- let params = {
- 'id': id,
- 'record_date': this.record_date,
- 'patient_id': patient_id,
- 'start_time': this.other_start_time,
- 'end_time': this.other_end_time,
- 'is_upload': this.radio
- }
- this.loading = true
- getHisHospitalDetailInfo(params).then(response => {
- if (response.data.state == 0) {
- this.loading = false
- this.$message.error(response.data.msg)
- return false
- } else {
- this.prescriptions = []
- this.month_prescriptions = []
- this.curPrescriptions = {}
- this.curMonthPrescriptions = {}
- this.loading = false
- this.hisPatientInfo = response.data.data.his_info
- this.setMonthPrescription(response.data.data.month_prescriptions)
- for (let i = 0; i < response.data.data.prescription.length; i++) {
- var prescription = response.data.data.prescription[i]
- let tempAdvice = []
- let tempProject = []
- let tempAddition = []
- for (let b = 0; b < prescription.advices.length; b++) {
- let spec = prescription.advices[b].drug.dose + prescription.advices[b].drug.dose_unit + '*' + prescription.advices[b].drug.min_number + prescription.advices[b].drug.min_unit + '/' + prescription.advices[b].drug.max_unit
-
- let obj = {
- advice_id: prescription.advices[b].id,
- drug_name: prescription.advices[b].advice_name,
- single_dose: prescription.advices[b].single_dose,
- delivery_way: prescription.advices[b].delivery_way,
- execution_frequency: prescription.advices[b].execution_frequency,
- retail_price: prescription.advices[b].price.toString(),
- remark: prescription.advices[b].remark,
- day: prescription.advices[b].day,
- prescribing_number: prescription.advices[b].prescribing_number.toString(),
- single_dose_unit: prescription.advices[b].single_dose_unit,
- prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
- medical_insurance_number: prescription.advices[b].med_list_codg,
-
- spec: spec,
- code: prescription.advices[b].drug.medical_insurance_number,
- det_item_fee_sumamt: prescription.advices[b].order_info.det_item_fee_sumamt,
- name_id: prescription.advices[b].drug.manufacturer,
- fulamt_ownpay_amt: prescription.advices[b].order_info.fulamt_ownpay_amt,
- overlmt_amt: prescription.advices[b].order_info.overlmt_amt,
- preselfpay_amt: prescription.advices[b].order_info.preselfpay_amt,
- inscp_scp_amt: prescription.advices[b].order_info.inscp_scp_amt,
- execution_state: prescription.advices[b].execution_state,
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- let obj = {
- id: prescription.project[b].id,
- project_id: prescription.project[b].project.id,
- // project_name: prescription.project[b].project.project_name,
- // statistical_classification: prescription.project[b].project.statistical_classification,
- single_dose: prescription.project[b].single_dose,
- delivery_way: prescription.project[b].delivery_way,
- execution_frequency: prescription.project[b].execution_frequency,
- number_days: prescription.project[b].day,
- total: prescription.project[b].count.toString(),
- price: prescription.project[b].price,
- remark: prescription.project[b].remark,
- // medical_code: prescription.project[b].project.medical_code,
- unit: prescription.project[b].project.unit,
- type: prescription.project[b].type,
- det_item_fee_sumamt: prescription.project[b].order_info.det_item_fee_sumamt,
- fulamt_ownpay_amt: prescription.project[b].order_info.fulamt_ownpay_amt,
- overlmt_amt: prescription.project[b].order_info.overlmt_amt,
- preselfpay_amt: prescription.project[b].order_info.preselfpay_amt,
- inscp_scp_amt: prescription.project[b].order_info.inscp_scp_amt,
- execution_state: prescription.project[b].execution_state,
-
-
- }
-
- if (prescription.project[b].type == 2) {
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].project.medical_code
- obj['project_name'] = prescription.project[b].project.project_name
- obj['spec'] = ''
- obj['name_id'] = 0
-
- } else if (prescription.project[b].type == 3) {
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
- obj['project_name'] = prescription.project[b].good_info.good_name
- obj['spec'] = prescription.project[b].good_info.specification_name
- obj['name_id'] = prescription.project[b].good_info.manufacturer
-
- }
-
- tempProject.push(obj)
- }
-
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- addition: tempAddition,
- order_status: prescription.order_status,
- type: prescription.type
- }
- this.prescriptions.push(obj)
-
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].order_status != 4) {
- this.isShowUpload = 2
- }
-
- }
-
- }
- if (this.prescriptions.length > 0) {
- this.curPrescriptions = this.prescriptions[0]
- } else {
- this.curPrescriptions = {}
- }
- if (this.month_prescriptions.length > 0) {
- this.curMonthPrescriptions = this.month_prescriptions[0]
- } else {
- this.curMonthPrescriptions = {}
- }
- this.total = 0
- this.total = this.getTotalOne()
- this.month_total = this.getMonthTotalOne()
- this.all_total = this.getTotal()
- this.all_month_total = this.getTotalTwo()
- this.fulamt_ownpay_amt = this.getFulamtOwnpayAmtTotal()
- this.overlmt_amt = this.getOverlmtAmtTotal()
- this.preselfpay_amt = this.getPreselfpayAmtTotal()
- this.inscp_scp_amt = this.getInscpScpAmtTotal()
-
-
- }
- })
- },getFulamtOwnpayAmtTotal(){
- var total = 0
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].fulamt_ownpay_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].fulamt_ownpay_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- },getOverlmtAmtTotal(){
- var total = 0
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].overlmt_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].overlmt_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- },getPreselfpayAmtTotal(){
- var total = 0
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].preselfpay_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].preselfpay_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- },getInscpScpAmtTotal(){
- var total = 0
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].advices != null) {
- for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
- total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].inscp_scp_amt)
- }
- }
- if (this.prescriptions[i].project != null) {
- for (let b = 0; b < this.prescriptions[i].project.length; b++) {
-
- total = parseFloat(total) + parseFloat(this.prescriptions[i].project[b].inscp_scp_amt)
- }
- }
-
- }
- return total.toFixed(2)
-
- },
- sz_open(index) {
- switch (index) {
- case 1:
- this.$refs.register9504.show()
- break
- case 2:
- var that = this
- if (this.activeName == 'first') {
- this.settle_accounts_type = 1
-
- } else {
- this.settle_accounts_type = 2
- this.start_time = this.other_start_time
- this.end_time = this.other_end_time
- this.settle_accounts_type = 2
-
- }
- let params = {
- 'patient_id': this.patientInfo.id,
- 'record_time': this.record_date,
- 'settle_accounts_type': this.settle_accounts_type,
- 'admin_user_id': this.$store.getters.xt_user.user.id
- }
- axios.get('http://127.0.0.1:9532/sz/api/upload/get', {
- params: params,
- headers: {
- 'Permission': 5
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
-
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
- that.changeRadioAndPatient(1)
- that.$message({ message: '预结算成功', type: 'success' })
- }
-
- }
- })
- .catch(function(error) {
- })
- break
- case 3:
- if (this.activeName == 'first') {
- this.$refs.charge.show(this.getTotal())
- } else {
- this.$refs.charge.show(this.getTotalTwo())
- }
- break
- case 4:
- break
- case 5:
- var that = this
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- axios.get('http://127.0.0.1:9532/sz/api/refund/get', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
- that.changeRadioAndPatient(1)
- that.$message({ message: '退费成功', type: 'success' })
- }
- }
- })
- .catch(function(error) {
- })
- }).catch(() => {
- })
- break
- case 6:
- var that = this
- axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- // that.$message.error(response.data.msg);
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- } else {
- that.$message({ message: '查询成功', type: 'success' })
- }
- }
- })
- .catch(function(error) {
- })
- break
- case 7:
- var that = this
- axios.get('http://127.0.0.1:9532/sz/api/detail/cancel', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
-
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
-
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
-
- that.$message({ message: '明细撤销成功', type: 'success' })
-
- }
- }
- })
- .catch(function(error) {
- })
-
- break
- case 10:
- this.newStatementVisible = true
- let obj = {
- record_time: this.record_date,
- patient_id: this.patient_id,
- prescription_id: this.prescription_id,
- order_id: this.order.id,
- admin_user_id: this.$store.getters.xt_user.user.id
-
- }
- this.newOrderObj = obj
- // this.$refs.print.getInfo(this.order.id)
- break
- case 11:
- var that = this
- this.$confirm('是否退号', '退号', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
- params: {
- order_id: this.order.id,
- record_time: this.record_date,
- admin_user_id: this.$store.getters.xt_user.user.id,
- patient_id: this.patientInfo.id
- }
- })
- .then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- return false
- } else {
- if (response.data.data.failed_code == -10) {
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
-
- } else {
- that.changeRadioAndPatient(1)
- that.$message({ message: '退号成功', type: 'success' })
- }
- }
- })
- .catch(function(error) {
- })
- }).catch(() => {
- })
- break
-
- }
-
- }
- },
- mounted() {
- const that = this
- window.onresize = () => {
- return (() => {
- window.fullHeight = document.documentElement.clientHeight
- that.fullHeight = window.fullHeight
- })()
- }
- },
- watch: {
- fullHeight(val) {
- if (!this.timer) {
- this.fullHeight = val
- let tableHeight = val - 243
- this.tableHeight = tableHeight
- this.timer = true
- let that = this
- setTimeout(function() {
- that.timer = false
- }, 400)
- }
- }
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .app-container {
- height: 100%;
- }
-
- .outpatientChargesManagement {
- height: 100%;
- display: flex;
- flex-direction: column;
-
- .mainLeft {
- width: 200px;
- height: 100%;
- display: flex;
- flex-direction: column;
- padding-top: 20px;
-
- .el-radio {
- margin-right: 5px;
- }
-
- }
- .mainCell {
- height: 36px;
- display: flex;
- align-items: center;
- }
-
- .fixedCell {
- position: fixed;
- z-index: 99;
- right: 42px;
- background: #fff;
- display: flex;
- justify-content: space-between;
- }
-
- .mainRight {
- margin-left: 10px;
- flex: 1;
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow-y: auto;
-
- .cellSpan {
- min-width: 80px;
- display: inline-block;
- margin-right: 10px;
- }
-
- }
- .tabsBox {
- position: relative;
- height: 90%;
- overflow-y: auto;
- margin-bottom: 60px;
-
- .el-tabs__item {
- padding: 0 10px;
- }
-
- }
- .addTab {
- position: absolute;
- right: 6px;
- top: 3px;
- z-index: 20;
- }
-
- .mainCenter {
- display: flex;
- flex: 1;
- height: 100%;
- }
-
- .costBox {
- width: 100%;
- height: 60px;
- background: #fff;
- position: absolute;
- bottom: 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .centerLeft {
- flex: 1;
- display: flex;
- flex-direction: column;
- position: relative;
- }
-
- .preTabs {
- height: 100%;
- display: flex;
- flex-direction: column;
-
- .el-tab-pane {
- height: auto !important;
- }
-
- }
-
- .settlementTabs {
- flex: 1;
-
- .el-tab-pane {
- height: 100%;
- }
-
- .el-tabs__content {
- height: 100%;
- }
-
- }
- .centerRight {
- width: 300px;
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- overflow-y: auto;
- }
-
- .RP {
- color: #409EFF;
- font-size: 20px;
- margin-bottom: 5px;
- }
-
- .centerRightTitle {
- color: #409EFF;
- }
-
- .basicUl {
- border-top: 1px solid #e5e5e5;
- border-left: 1px solid #e5e5e5;
- display: flex;
- flex-wrap: wrap;
-
- li {
- border-bottom: 1px solid #e5e5e5;
- border-right: 1px solid #e5e5e5;
- width: 100%;
- min-height: 38px;
- /* line-height: 38px;
- text-indent: 5px; */
- font-size: 14px;
- display: flex;
- align-items: center;
- padding: 5px;
- box-sizing: border-box;
- }
-
- }
- }
- </style>
-
- <style lang="scss">
- #tab-more {
-
- .el-icon-close {
- display: none;
- }
-
- }
- .settlementTabs {
-
- .el-tabs__content {
- height: 90%;
- }
-
- }
- .preTabs {
-
- .el-tabs__content {
- flex: 1;
- overflow-y: auto;
- padding: 5px 0 5px 5px;
- }
-
- }
- .centerDialog {
-
- .el-dialog__body {
- max-height: calc(100vh - 100px) !important;
- padding: 0 20px;
- }
-
- }
- </style>
-
|