123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464 |
- <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">
-
- <!-- <div class="mainCell" style="justify-content: space-between;font-size:14px;">
- <p >未收费:<span style="color: red">{{cal_one}}</span>人</p>
- <p>已收费:<span style="color: red">{{cal_two}}</span>人</p>
- <p>已退费:<span style="color: red">{{cal_three}}</span>人</p>
- </div> -->
- <div class="mainCell">
- <el-radio-group v-model="radio" @change="changeRadio">
- <!-- <el-radio :label=1>未收费</el-radio>
- <el-radio :label=2>已收费</el-radio>
- <el-radio :label=3>已退费</el-radio>
- <el-radio :label=4>全部</el-radio> -->
- <el-radio :label=1>未收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_one}}</span>人
- </el-radio>
- <el-radio :label=2>已收费<span style="color: red;margin-bottom:10px;display: inline-block;">{{cal_two}}</span>人
- </el-radio>
- <el-radio :label=3>已退费<span
- style="color: red;margin-bottom:10px;display: inline-block;">{{cal_three}}</span>人
- </el-radio>
- <el-radio :label=4>全部</el-radio>
-
- </el-radio-group>
- </div>
- <div class="mainCell" style="margin-bottom:10px;">
- <!--<el-input size="small" v-model="key" class="filter-item"/>-->
- <el-input size="small" @keyup.enter.native='searchAction' 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.row.patients?scope.row.patients.name:''}}</template>
- </el-table-column>
- <el-table-column align="center" prop="name" label="就诊号" width="110">
- <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="mainRight">
-
- <div class="mainCell fixedCell" style="margin-bottom:10px;">
- <!-- <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
- <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button> -->
- <el-button size="small" @click="open(3)" type="primary">打印</el-button>
- <el-button v-loading="loadingone" size="small"
- @click="open(6)"
- v-if="this.hisPatientInfo && this.hisPatientInfo.id == 0"
- type="primary">挂号
- </el-button>
- <el-button v-loading="loadingtwo" v-if="this.info.prescription_status == 1" size="small"
- @click="open(4)"
- type="primary">收费
- </el-button>
- <el-button size="small" @click="open(5)" type="primary"
- v-if="this.info && this.info.prescription_status == 3">退费
- </el-button>
-
-
- <!--<el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(7)" type="primary"-->
- <!-->对账-->
- <!--</el-button>-->
-
-
- <!--<el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(8)" type="primary"-->
- <!-->明细对账-->
- <!--</el-button>-->
- <el-button v-if="this.info.prescription_status >= 2" size="small" @click="open(9)" type="primary"
- >结算单
- </el-button>
-
- <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919" size="small" @click="open(10)" type="primary"-->
- <!-->退号-->
- <!--</el-button>-->
-
- <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"-->
- <!--size="small" @click="open(11)" type="primary"-->
- <!-->撤销明细-->
- <!--</el-button>-->
-
-
- <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919" size="small" @click="open(12)" type="primary"-->
- <!-->查编码-->
- <!--</el-button>-->
-
- <!--<el-button v-if="$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919"-->
- <!--size="small" @click="open(13)" type="primary"-->
- <!-->查待遇-->
- <!--</el-button>-->
-
-
- </div>
-
- <div class="mainCenter">
- <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>
- <prescription-table ref="prescription_tables"
- :prescription="curPrescriptions"></prescription-table>
-
- </el-tabs>
-
- </div>
- <div class="costBox">
- <span>当前处方总费用:<span style="color:red;">{{ 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.height?patientInfo.height:''}}</li>
- <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
- <li style="width:50%;">电话:{{patientInfo.phone}}</li>
- <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" closable>
-
- <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"
- :picker-options="pickerOptions"
- 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>
- </div>
- <prescription-table :preTableData='preTableData'></prescription-table>
- </el-tabs>
-
- </div>
- <div class="costBox">
- <span>当前处方总费用:<span style="color:red;">{{ 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.height?patientInfo.height:''}}</li>
- <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
- <li style="width:50%;">电话:{{patientInfo.phone}}</li>
- <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-tabs>
-
-
- </div>
- </div>
- </div>
- <additionalCharges ref='additionalCharges' @click="addCharges"
- :addtions_charge="addtions_charge"></additionalCharges>
-
- <register-dialog ref='register' v-on:confirm="confirm" v-on:cancel="cancel"></register-dialog>
- <charge-dialog ref='charge' v-on:confirm="chargeConfirm" v-on:cancel="chargeCancel"></charge-dialog>
- <el-dialog
- class="centerDialog"
- width="900px"
- title="打印"
- :visible.sync="treatVisible">
- <treatPrint :paramsObj='paramsObj'></treatPrint>
- </el-dialog>
- <el-dialog
- class="centerDialog"
- width="1200px"
- title="打印"
- :visible.sync="statementVisible">
- <statementPrint ref="print" :paramsObj='orderObj'></statementPrint>
- </el-dialog>
- </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 prescriptionTable from './components/prescriptionTable'
- import additionalCharges from './components/additionalCharges'
- import {getPatientInformation, getPatientList} from '@/api/project/project'
- import {getPatientInfo, getSchedulePatientList, Refund, register, upload} from '@/api/his/his'
- import RegisterDialog from "./components/registerDialog";
- import treatPrint from './treatPrint'
- import statementPrint from './statementPrint'
- import ChargeDialog from "./components/chargeDialog";
-
- const moment = require('moment')
- export default {
- components: {
- ChargeDialog,
- RegisterDialog,
- BreadCrumb,
- noCharge,
- charged,
- medicalInsuranceRefund,
- prescriptionTable,
- additionalCharges,
- treatPrint,
- statementPrint
-
- },
- data() {
- return {
- key: "",
- other_start_time: "",
- other_end_time: "",
- crumbs: [
- {path: false, name: '门诊收费'},
- {path: false, name: '门诊收费管理'}
- ],
- current_index: 0,
- cal_one: '',
- cal_two: '',
- cal_three: '',
- tableHeight: '',
- fullHeight: document.documentElement.clientHeight,
- activeName: 'first',
- info: {},
- curPrescriptions: {},
- prescriptions: [],
- month_prescriptions: [],
-
- record_date: '',
- tableData: [],
- editableTabsValue: '处方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: [],
- order: {},
- addtions_charge: [],
- treatVisible: false,
- orderObj: {},
- paramsObj: {},
- statementVisible: false
- }
- },
- 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.getPatientList()
- },
- methods: {
- changeTime(val) {
- this.other_start_time = val
-
-
- }, changeEndTime(val) {
- this.other_end_time = val
-
-
- }, chargeConfirm(form) {
-
- form['id'] = this.patientInfo.id
- form['record_time'] = this.record_date
- form['admin_user_id'] = this.$store.getters.xt_user.user.id
-
- if (this.activeName == 'first') {
- form['settle_accounts_type'] = 1
- } else {
- form['start_time'] = this.other_start_time
- form['end_time'] = this.other_end_time
- form['settle_accounts_type'] = 2
-
- }
-
- this.loadingtwo = true
- if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
- var that = this
- axios.get('http://127.0.0.1:9532/api/upload/get', {
- params: form
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- that.$refs.charge.hide()
- return false
- } else {
- that.changeRadio(2)
- that.$refs.charge.hide()
- that.loadingtwo = false
- that.state = '已收费'
- that.$message({message: '收费成功', type: 'success'})
- that.loadingtwo = false
- that.cal_one = this.cal_one - 1
- that.cal_two = this.cal_two + 1
- that.patientTableData.splice(this.current_index, 1)
- }
- })
- .catch(function (error) {
-
- });
- } else {
- upload(form).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- this.loadingtwo = false
- this.$refs.charge.hide()
- return false
- } else {
- this.$refs.charge.hide()
-
- this.loadingtwo = false
- this.state = '已收费'
- this.$message({message: '收费成功', type: 'success'})
- this.$refs.charge.hide()
- this.loadingtwo = false
- this.cal_one = this.cal_one - 1
- this.cal_two = this.cal_two + 1
- this.patientTableData.splice(this.current_index, 1)
- }
- })
- }
- }, chargeCancel() {
- this.$refs.charge.hide()
- },
- confirm(forms) {
- forms['id'] = this.patientInfo.id,
- forms['record_time'] = this.record_date,
- forms['admin_user_id'] = this.$store.getters.xt_user.user.id
- this.loadingone = true
-
- if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
- var that = this
-
- axios.get('http://127.0.0.1:9532/api/register/get', {
- params: forms
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingone = false
- that.$refs.register.hide()
- return false
- } else {
- that.$refs.register.hide()
- that.getPatientList()
- that.$message({message: '挂号成功', type: 'success'})
- that.loadingone = false
- var his_info = response.data.data.his_info
- that.hisPatientInfo = his_info
- }
- })
- .catch(function (error) {
-
- });
- } else {
- register(forms).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- this.loadingone = false
- this.$refs.register.hide()
- return false
- } else {
- this.getPatientList()
- this.$message({message: '挂号成功', type: 'success'})
- this.$refs.register.hide()
- this.loadingone = false
- var his_info = response.data.data.his_info
- this.hisPatientInfo = his_info
- }
- })
- }
-
- }, cancel() {
- this.$refs.register.hide()
- },
- addCharges() {
- this.$refs.additionalCharges.show()
- },
- changeDate(val) {
- if (this.patientInfo.id == 0) {
- this.$message.error('请先选择患者')
- return
- }
- this.prescriptions = []
- this.curPrescriptions = []
-
- let params = {
- 'record_date': val,
- 'patient_id': this.patientInfo.id
- }
- getPatientInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientInfo = response.data.data.xt_info
- this.hisPatientInfo = response.data.data.his_info
- this.info = response.data.data.info
- this.addtions_charge = response.data.data.addtions_charge
-
- this.prescriptions = []
- for (let i = 0; i < response.data.data.prescription.length; i++) {
- var prescription = response.data.data.prescription[i]
-
- let tempAdvice = []
- let tempProject = []
-
- for (let b = 0; b < prescription.advices.length; b++) {
- 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,
- 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
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- console.log(prescription.project[b].project.project_name)
- 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].unit,
- }
-
- tempProject.push(obj)
- }
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- type: response.data.data.prescription[i].type,
- order_status: response.data.data.prescription[i].order_status
- }
- this.prescriptions.push(obj)
- this.curPrescriptions = this.prescriptions[0]
- this.total = 0
- this.total = this.getTotalOne()
- }
- }
- })
- },
- handleClick() {
-
- },
- searchAction() {
-
- },
- 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 = total + (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 = total + (this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total)
-
- }
- }
- }
-
- if (this.curPrescriptions.addition != null) {
- for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
- total = total + (this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count)
- }
- }
- return (total * 100) / 100
-
- },
- 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 = total + (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 = total + (this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total)
- }
- }
- if (this.prescriptions[i].addition != null) {
- for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
- total = total + (this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count)
- }
- }
- }
- return (total * 100) / 100
-
- },
- moreState(tab, event) {
- if (tab == 'more') {
- return false
- }
- },
- open(index) {
-
- if (index == 1) {
-
-
- } else if (index == 2) {
-
- this.$router.push('/outpatientDoctorStation/printtwo?record=' + this.record_date)
-
- } else if (index == 3) {
- let obj = {
- record_date: this.record_date,
- patient_id: this.patient_id,
- prescription_id: this.prescription_id
- }
- this.paramsObj = obj
- this.treatVisible = true
- // this.$router.push('/outpatientCharges/treatPrint?record_date=' + this.record_date + '&patient_id=' + this.patient_id + '&prescription_id=' + this.prescription_id)
- } else if (index == 4) {
-
- // if (this.hisPatientInfo.id == 0) {
- // this.$message({message: '该患者尚未挂号,请先挂号', type: 'error'})
- // return
- // }
-
- this.$refs.charge.show(this.getTotal())
-
-
- } else if (index == 5) {
- if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
-
- var that = this
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- let params = {
- 'order_id': this.order.id,
- 'number': this.order.number,
- 'patient_id': this.patientInfo.id,
- 'record_time': this.record_date,
- 'admin_user_id':this.$store.getters.xt_user.user.id
-
- }
- axios.get('http://127.0.0.1:9532/api/refund/post', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- that.changeRadio(1)
- that.$message({message: '退费成功', type: 'success'})
- that.loadingtwo = false
-
- }
- })
- .catch(function (error) {
-
- });
-
- }).catch(() => {
-
- })
-
- } else {
-
- this.$confirm('是否退费', '退费', {
- confirmButtonText: '确 定',
- cancelButtonText: '取 消',
- type: 'warning'
- }).then(() => {
- let params = {
- 'order_id': this.order.id,
- 'number': this.order.number,
- 'patient_id': this.patientInfo.id,
- 'record_time': this.record_date,
-
- }
- Refund(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- this.loadingtwo = false
- return false
- } else {
- this.$message({message: '退费成功', type: 'success'})
- this.loadingtwo = false
-
- }
- })
-
- }).catch(() => {
-
- })
-
-
- }
-
-
- } else if (index == 6) {
-
- if (this.patientInfo.id == 0) {
- this.$message.error('请先选择要挂号的病人')
- return
- }
-
- this.$refs.register.show(this.patientInfo)
-
-
- } else if (index == 7) {
- let params = {
- start_time: "2020-12-28",
- end_time: "2020-12-30",
- insutype: "390",
- clr_type: "11",
- }
-
- var that = this
-
- if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
- axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
-
-
- }
- })
- .catch(function (error) {
-
- });
-
-
- }
-
- } else if (index == 8) {
- let params = {
- start_time: "2020-12-28",
- end_time: "2020-12-30",
- }
- var that = this
- axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
-
- }
- })
- .catch(function (error) {
-
- });
-
-
- } else if (index == 9) {
- this.statementVisible = true
- let obj = {
- order_id: this.order.id
- }
- this.orderObj = obj
- // this.$refs.print.getInfo(this.order.id)
-
-
- } else if (index == 10) {
- let params = {
-
- 'patient_id': this.patientInfo.id,
- 'record_time': this.record_date,
- }
- axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- that.$message({message: '退号成功', type: 'success'})
- that.loadingtwo = false
- }
- })
- .catch(function (error) {
- });
- } else if (index == 11) {
- let params = {
- 'order_id': this.order.id,
- 'number': this.order.number,
- 'patient_id': this.patientInfo.id,
- 'record_time': this.record_date,
- }
- axios.get('http://127.0.0.1:9532/api/refunddetail/post', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- that.$message({message: '退号成功', type: 'success'})
- that.loadingtwo = false
- }
- })
- .catch(function (error) {
- });
-
- } else if (index == 12) {
- let params = {
- 'name': "琥珀酸亚铁片",
- 'codg': "XB03AAH026A001010104942"
- }
- axios.get('http://127.0.0.1:9532/api/code/get', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
-
- that.loadingtwo = false
- }
- })
- .catch(function (error) {
- });
-
- } else if (index == 13) {
- let params = {
- 'id': this.patientInfo.id,
- 'record_time': this.record_date,
- }
- axios.get('http://127.0.0.1:9532/api/record/put', {
- params: params
- })
- .then(function (response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.msg)
- that.loadingtwo = false
- return false
- } else {
- that.loadingtwo = false
- }
- })
- .catch(function (error) {
- });
- }
- },
-
- choosePatient() {
- console.log(id)
- this.radioStatus = id
- this.getPatientList()
- },
- changeRadio(id) {
- // console.log(id)
- // this.radioStatus = id
- // this.getPatientList()
- let temp_id = id
-
- let params = {
- 'record_date': this.record_date
- }
- getSchedulePatientList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientTableData = []
- this.all_table_data = []
- let one_count = 0
- let two_count = 0
- let three_count = 0
- for (let i = 0; i < response.data.data.list.length; i++) {
-
- if (response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 || response.data.data.list[i].info.prescription_status == 2) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- one_count = one_count + 1
- this.patientTableData.push(response.data.data.list[i])
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 3) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
-
- two_count = two_count + 1
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 4) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- three_count = three_count + 1
- }
- }
-
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- this.all_table_data.push(response.data.data.list[i])
- }
- }
-
- this.cal_one = one_count
- this.cal_two = two_count
- this.cal_three = three_count
-
- switch (temp_id) {
-
- case 1:
- this.patientTableData = []
-
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2) {
- this.patientTableData.push(this.all_table_data[i])
- }
-
- }
- break
- case 2:
- this.patientTableData = []
- for (let i = 0; i < this.all_table_data.length; i++) {
- if (this.all_table_data[i].info.prescription_status == 3) {
- this.patientTableData.push(this.all_table_data[i])
- }
-
-
- }
- break
- case 3:
- this.patientTableData = []
-
- for (let i = 0; i < this.all_table_data.length; i++) {
-
- if (this.all_table_data[i].info.prescription_status == 4) {
- this.patientTableData.push(this.all_table_data[i])
- }
-
- }
- break
- case 4:
- this.patientTableData = []
- this.patientTableData = this.all_table_data
- break
-
- }
-
- this.current_index = 0
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].patients.id, "")
-
-
- }
- })
-
-
- },
-
- //患者列表
- getPatientList() {
- let params = {
- 'record_date': this.record_date
- }
- getSchedulePatientList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientTableData = []
- this.all_table_data = []
- let one_count = 0
- let two_count = 0
- let three_count = 0
- for (let i = 0; i < response.data.data.list.length; i++) {
- // console.log('99999999', response.data.data.list)
-
- if (response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 || response.data.data.list[i].info.prescription_status == 2) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- one_count = one_count + 1
- this.patientTableData.push(response.data.data.list[i])
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 3) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
-
- two_count = two_count + 1
- }
- }
-
- if (response.data.data.list[i].info.prescription_status == 4) {
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- three_count = three_count + 1
- }
- }
-
- if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- this.all_table_data.push(response.data.data.list[i])
- }
- }
-
- this.cal_one = one_count
- this.cal_two = two_count
- this.cal_three = three_count
-
- this.current_index = 0
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
- this.getPatientInformation(this.patientTableData[0].patients.id, "")
-
- }
- })
- },
-
- 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) {
- console.log('val', val)
- this.getPatientInformation(val.patients.id, val.info.batch_number)
- this.patient_id = val.patients.id
-
- for (let i = 0; i < this.patientTableData.length; i++) {
- if (this.patientTableData[i].patients.id == val.patients.id) {
- this.current_index = i
- }
-
- }
-
- },
-
- //获取患者的基本信息
- getPatientInformation(id, batch_number) {
- let params = {
- 'record_date': this.record_date,
- 'patient_id': id,
- 'number': batch_number,
- }
- getPatientInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientInfo = response.data.data.xt_info
- this.hisPatientInfo = response.data.data.his_info
- this.info = response.data.data.info
- this.order = response.data.data.order
- this.addtions_charge = response.data.data.addtions_charge
-
- this.prescriptions = []
- console.log("9991323242r5253535", response.data.data.prescription)
- if (response.data.data.prescription[0].advices.length > 0) {
- this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
- } else {
- this.prescription_id = 0
- }
- 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 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
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- console.log(prescription.project[b].project.project_name)
- 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
- }
- tempProject.push(obj)
- }
-
- for (let b = 0; b < prescription.addition.length; b++) {
- let obj = {
- id: prescription.addition[b].id,
- item_name: prescription.addition[b].item_name,
- price: prescription.addition[b].price,
- count: prescription.addition[b].count,
- item_id: prescription.addition[b].item_id,
- }
- tempAddition.push(obj)
- }
-
-
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- addition: tempAddition,
- order_status: response.data.data.prescription[i].order_status,
- type: response.data.data.prescription[i].type
- }
- this.prescriptions.push(obj)
- this.curPrescriptions = this.prescriptions[0]
- this.total = 0
- this.total = this.getTotalOne()
- console.log(this.total)
-
- }
- }
- })
- }
- },
- mounted() {
- console.log(this.$store.getters.xt_user.org_id)
- 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>
-
|