12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055 |
- <template>
- <div class="main-contain outpatientChargesManagement">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div class="app-container">
- <div
- style="
- display: flex;
- justify-content: space-between;
- margin-bottom: 10px;
- ">
-
- </div>
- <div style="margin-bottom: 10px;">
- <el-date-picker
- size="small"
- v-model="start_time"
- prefix-icon="el-icon-date"
- @change="handleStartTimeChange"
- :editable="false"
- :clearable="false"
- style="width: 196px; "
- type="date"
- placeholder="选择开始日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker>
- <span style="text-align: center;">-</span>
- <el-date-picker
- size="small"
- v-model="end_time"
- prefix-icon="el-icon-date"
- @change="handleEndTimeChange"
- :editable="false"
- :clearable="false"
- style="width: 196px; "
- type="date"
- placeholder="选择结束日期"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- align="right"
- ></el-date-picker>
- <el-button size="small" type="primary"
- @click="query">查询
- </el-button>
- <el-button size="small" type="primary"
- @click="login">短信登录税局
- </el-button>
- <el-button size="small" type="primary"
- @click="auth">认证
- </el-button>
- </div>
-
- <el-table
- :data="tableData"
- border
- style="width: 100%"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- highlight-current-row
- >
- <el-table-column
- prop="date"
- label="序号"
- width="60"
- align="center"
- type="index"
- >
- </el-table-column>
-
- <el-table-column align="center" width="90" prop="name" label="患者名字">
- <template slot-scope="scope">{{ scope.row.patient.name }}</template>
- </el-table-column>
-
- <el-table-column align="center" width="90" prop="name" label="患者性别">
- <template slot-scope="scope">{{ scope.row.patient.gender == 1 ? '男':'女' }}</template>
- </el-table-column>
-
-
- <el-table-column align="center" width="90" prop="name" label="处方类型">
- <template slot-scope="scope">
- <div>{{ getMedType(scope.row.med_type) }}</div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="90" prop="name" label="结算类型">
- <template slot-scope="scope">
- <div v-if="scope.row.his_patient.balance_accounts_type != 2">
- 医保
- </div>
- <div v-if="scope.row.his_patient.balance_accounts_type == 2">
- 自费
- </div>
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="90" prop="name" label="就诊凭证类型">
- <template slot-scope="scope">
- <div v-if="scope.row.his_patient.id_card_type == 1">
- 社会保障卡
- </div>
- <div v-if="scope.row.his_patient.id_card_type == 2">
- 居民身份证
- </div>
- <div v-if="scope.row.his_patient.id_card_type == 4">
- 医保电子凭证
- </div>
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- width="100"
- prop="name"
- label="处方日期"
- >
- <template slot-scope="scope">
- {{getTimes(scope.row.settle_accounts_date) }}
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- width="100"
- prop="name"
- label="收费时间"
- >
- <template slot-scope="scope">
- {{
- scope.row.setl_time
- ? scope.row.setl_time
- : getTimes(scope.row.settle_accounts_date)
- }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="90" prop="name" label="收费员">
- <template slot-scope="scope">
- {{getName(scope.row.creator)}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" prop="name" label="操作">
- <template slot-scope="scope">
- <el-button v-if="scope.row.result.id == 0" size="mini" type="primary"
- @click="blue(scope.row)">
- 开票
- </el-button>
- <el-button v-if="scope.row.result.id > 0 && scope.row.result.fapiao_status == 1" disabled="true" size="mini" type="primary"
- @click="blue(scope.row)">
- 开票审核中
- </el-button>
- <el-button v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2" size="mini" type="primary"
- @click="hongchong(scope.row)">
- 红冲
- </el-button>
- <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2"
- @click="yulan(scope.row)">
- 下载
- </el-button>
-
- <el-button size="mini" type="primary" v-if="scope.row.result.id > 0 && scope.row.result.is_red_washed == 0 && scope.row.result.fapiao_status == 2 && scope.row.fapiao_number == ''"
- @click="chaxun(scope.row)">
- 查询并同步发票号码
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- :current-page.sync="page"
- background
- style="margin-top: 20px; float: right"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
- <el-dialog
- title="登录"
- :visible.sync="login_dialogVisible"
- width="40%"
- >
- <div>
- <el-form :rules="rules" :label-position="labelPosition" label-width="100px" :model="formLabelAlign">
- <!-- <el-form-item label="税局账号">-->
- <!-- <el-input v-model="formLabelAlign.name"></el-input>-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="税局密码">-->
- <!-- <el-input v-model="formLabelAlign.region"></el-input>-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="手机号码">-->
- <!-- <el-input v-model="formLabelAlign.type"></el-input>-->
- <!-- </el-form-item>-->
- <el-form-item label="短信验证码" prop="verify">
- <div style="display: inline-block;width: 50%;">
- <el-input v-model="formLabelAlign.verify"></el-input>
- </div>
- <div style="display: inline-block;">
- <el-button :disabled="countdown > 0" @click="verify_click">{{countdown > 0?countdown:'获取短信验证码'}}</el-button>
- </div>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="login_dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="loginSJ()">确 定</el-button>
- </span>
- </el-dialog>
-
- <!-- 二维码 -->
- <el-dialog
- title="提示"
- :visible.sync="qr_dialogVisible"
- width="30%"
- center
- >
- <div style="margin: auto;width: 120px;">
- <div class="qrcode" ref="qrCodeUrl"></div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="qr_dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="qr_dialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- :visible.sync="settlementVisible">
- <div>
- <new-print-one :paramsObj="paramsObj"></new-print-one>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="settlementVisible = false">取 消</el-button>
- <el-button type="primary" @click="blueRequest">开票</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- class="centerDialog"
- width="1200px"
- :visible.sync="settlementVisibletwo">
- <div>
- <pdf :src="pdfSrc"></pdf>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="settlementVisibletwo = false">取 消</el-button>
- <el-button type="primary" @click="settlementVisibletwo = false">确定</el-button>
- </span>
- </el-dialog>
-
-
-
- </div>
- </template>
-
-
- <script>
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
- import { ModifyFapiaoCode } from '@/api/his/his_tools'
-
- import pdf from 'vue-pdf'
- // import NewStatementPrint from './newStatementPrint'
- import { adminMainView} from "@/api/role/admin";
- import { fetchAllAdminUsers } from '@/api/doctor'
- import axios from 'axios'
- import { jsGetAge, uParseTime } from '@/utils/tools'
- import {
- getOrderFapiaoList,
- } from '../../api/fapiao'
-
- import { getDialysisRecordInitData } from '@/api/dialysis_record'
- import QRCode from 'qrcodejs2'
- import NewInvoicePrint from './newInvoicePrint.vue'
- import NewPrintOne from './newPrintOne.vue'
- const moment = require('moment')
- export default {
- name: 'OutpatientChargesSummary',
- components: {
- NewPrintOne,
- NewInvoicePrint,
- BreadCrumb,
- },
- data() {
- return {
- pdfSrc:"",
- staff:"",
- admins:[],
- orderObj: {},
- batchOrderObj: {},
- fapiao_number:"",
- invoiceVisible: false,
- settlementVisibletwo:false,
- med_options: [
- { id: 0, text: '全部' },
- { id: 11, text: '普通门诊' },
- { id: 14, text: '门诊特殊病' }
- ],
- zone_options: [
- { id: 0, text: '全部分区' }
- ],
- statementListVisible: false,
- statementVisible: false,
- batchStatementVisible: false,
- statementVisible9504: false,
- orderObj9504: {},
- crumbs: [
- { path: false, name: '门诊收费' },
- { path: false, name: '项目消费明细汇总' }
- ],
- tableData: [],
- tableData2:[],
- selecting_schs: [],
- dialogfapiaoVisible:false,
- targeOrderId:0,
- targeObj:{},
- limit: 10,
- page: 1,
- keywords: '',
- sch_type: '0',//班次
- zoneVal: 0,//分区
- medTypeVal: 0,
- start_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
- pay_time:"",
- total: '',
- doctors: [],
- sort_type: 1,
- sort_types: [
- { value: 1, label: '处方时间' },
- { value: 2, label: '结算时间' }
- ],
- admin_user_id: '',
- listVisible: false,
- allListVisible: false,
- adminUserOptions: [],
- paramsObj: {},
- invoiceParams: {},
- settlementVisible: false,
- settlementObj: {},
- accounts_click_vi:false,
- cur_ids:0,
- patient_id:0,
- login_dialogVisible:false,
- qr_dialogVisible:false,
- formLabelAlign: {
- name: '',
- region: '',
- type: '',
- verify:'',
- },
- rules:{
- verify:[{ required: true, message: '请输入活动名称', trigger: 'blur' },]
- },
- time:null,
- countdown: 0,
-
- }
- },
-
- created() {
- this.getInitData()
- this.fetchAllAdminUsers()
- // this.getDoctorList()
- this.getHisOrderList()
- // this.getAllstaff()
- },
-
- methods: {
- chaxun(row){
- let params = {
- "id": row.result.id,
- "admin_user_id":this.$store.getters.xt_user.user.id,
- }
- var that = this;
- axios.get('http://127.0.0.1:9532/api/fapiao/query',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- that.settlementVisible = false
- that.$confirm(response.data.data.msg, '错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- that.$confirm(response.data.data.msg, '信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }
- }
- }).catch(function(error) {
- })
- },
- loginSJ(){
- // let params = {
- // "code":this.formLabelAlign.verify,
- // }
- // SMSLogin(params).then((response) => {
- // if (response.data.state == 0) {
- // this.login_dialogVisible = false
- // this.$message.error(response.data.msg)
- // return false
- // } else {
- // this.login_dialogVisible = false
- // // this.$message.success(response.data.msg)
- // // this.$message.success(response.data.data.msg)
- // this
- // .$confirm(response.data.data.msg, '信息', {
- // confirmButtonText: '确 定',
- // type: 'warning'
- // })
- // .then(() => {
- // })
- // .catch(() => {
- // })
- //
- // }
- // })
-
- var that = this;
- let params = {
- "code":this.formLabelAlign.verify,
- }
- axios.get('http://127.0.0.1:9532/api/fapiao/sms/login',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- that.$confirm(response.data.data.msg, '错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- that.login_dialogVisible = false
- // this.$message.success(response.data.msg)
- // this.$message.success(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- }
-
- }
- }).catch(function(error) {
- })
-
- },
- login(){
- this.login_dialogVisible = true
- },
- verify_click(){
- var that = this;
- let params = {
- "admin_user_id":this.$store.getters.xt_user.user.id,
- }
- axios.get('http://127.0.0.1:9532/api/fapiao/sms/code',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- that.$confirm(response.data.data.msg, '错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- that.$message.success(response.data.data.msg)
- }
-
- }
- }).catch(function(error) {
- })
- this.countdown = 60
- this.time = setInterval(() => {
- if (this.countdown > 0) {
- this.countdown--
- } else {
- clearInterval(this.time)
- }
- }, 1000)
- },
- auth(){
-
- // let params = {
- // }
- // GetQRCode(params).then((response) => {
- // if (response.data.state == 0) {
- // this.$message.error(response.data.msg)
- // return false
- // } else {
- // if(response.data.data.cus_status == 1){
- // this.$nextTick(() =>{
- // var qrcode = new QRCode(this.$refs.qrCodeUrl, {
- // text: response.data.data.qr_code, // 需要转换为二维码的内容
- // width: 120,
- // height: 120,
- // colorDark: '#000000',
- // colorLight: '#ffffff',
- // correctLevel: QRCode.CorrectLevel.H
- // })
- // })
- // this.qr_dialogVisible =true
- // }else if(response.data.data.cus_status == -1){
- // // this.$message.error(response.data.msg)/* */
- // this
- // .$confirm(response.data.data.msg, '信息', {
- // confirmButtonText: '确 定',
- // type: 'warning'
- // })
- // .then(() => {
- // })
- // .catch(() => {
- // })
- // }else if(response.data.data.cus_status == 2){
- // // this.$message.error(response.data.data.msg)
- // this
- // .$confirm(response.data.data.msg, '信息', {
- // confirmButtonText: '确 定',
- // type: 'warning'
- // })
- // .then(() => {
- // })
- // .catch(() => {
- // })
- //
- // }else if(response.data.data.cus_status == -3){
- // // this.$message.error(response.data.data.msg)
- // this
- // .$confirm(response.data.data.msg, '信息', {
- // confirmButtonText: '确 定',
- // type: 'warning'
- // })
- // .then(() => {
- // })
- // .catch(() => {
- // })
- //
- // }else if(response.data.data.cus_status == -4){
- // // this.$message.error(response.data.data.msg)
- // this
- // .$confirm(response.data.data.msg, '信息', {
- // confirmButtonText: '确 定',
- // type: 'warning'
- // })
- // .then(() => {
- // })
- // .catch(() => {
- // })
- //
- // }
- // // this.$message.success(response.data.msg)
- // }
- // })
-
-
- var that = this;
- let params = {
- "admin_user_id":this.$store.getters.xt_user.user.id,
- }
- axios.get('http://127.0.0.1:9532/api/fapiao/qrcode/get',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- that.$confirm(response.data.data.msg, '错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- if(response.data.data.cus_status == 1){
- Vue.nextTick(() => {
- // 确保二维码数据存在
- if (response.data.data.qr_code) {
- // 生成新的二维码
- var qrcode = new QRCode(that.$refs.qrCodeUrl, {
- text: response.data.data.qr_code,
- width: 120,
- height: 120,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.H
- });
- that.qr_dialogVisible = true;
- } else {
- that.$message.error('二维码数据为空。');
- }
- });
- }else if(response.data.data.cus_status == -1){
- // this.$message.error(response.data.msg)/* */
- that
- .$confirm(response.data.data.msg, '信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- }else if(response.data.data.cus_status == 2){
- // this.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
-
- }else if(response.data.data.cus_status == -3){
- // this.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
-
- }else if(response.data.data.cus_status == -4){
- // this.$message.error(response.data.data.msg)
- that
- .$confirm(response.data.data.msg, '信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- })
- .then(() => {
- })
- .catch(() => {
- })
- }
-
- }
-
- }
- }).catch(function(error) {
- })
-
- },
- query(){
- this.getHisOrderList()
- },download(){
-
-
- },blueRequest(){
- let params = {
- "order_ids": this.cur_ids,
- "admin_user_id":this.$store.getters.xt_user.user.id,
- }
- var that = this;
- axios.get('http://127.0.0.1:9532/api/fapiao/blue',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- that.settlementVisible = false
-
- that.$confirm(response.data.data.msg, '错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- that.settlementVisible = false
- that.$message.success(response.data.data.msg)
- that.getHisOrderList()
- }
-
- }
- }).catch(function(error) {
- })
- },
- blue(row){
- var ids = row.id
- this.cur_ids =ids
- this.patient_id = row.patient_id
- console.log(row)
- let paramsObj = {
- order_ids: ids,
- patient_id: row.patient_id,
- }
- this.settlementVisible = true
- this.paramsObj = paramsObj
- console.log(this.paramsObj)
-
- // this.invoiceVisible = true
-
- // OpenBlueFapiao(params).then((response) => {
- // if (response.data.state == 0) {
- // this.$message.error(response.data.msg)
- // return false
- // } else {
- // this.$message.success(response.data.msg)
- // this.getHisOrderList()
- // }
- // })
-
-
- }, yulan(row){
- window.open( row.result.pdf_url, "_blank");
- // this.settlementVisibletwo = true
- // this.pdfSrc = row.result.pdf_url
- // console.log(this.pdfSrc)
-
- },hongchong(row){
- var id = row.result.id
-
- let params = {
- "id":id,
- "admin_user_id":this.$store.getters.xt_user.user.id,
- }
-
- var that = this;
- axios.get('http://127.0.0.1:9532/api/fapiao/red',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- that.$confirm(response.data.data.msg, '错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- that.$message.success(response.data.data.msg)
- that.getHisOrderList()
- }
-
- }
- }).catch(function(error) {
- })
-
- },
- getAllstaff(){
- adminMainView()
- .then(rs => {
-
- var resp = rs.data;
- if (resp.state === 1) {
- var adminData = resp.data.admins
- this.admins.push(...adminData);
- } else {
- this.$message.error(resp.msg);
- }
- })
- .catch(err => {
- this.$message.error(err);
- });
-
-
- },
-
- handleSelectionChange(val) {
- this.selecting_schs = val
- },
- handleSchType(val) {
- this.sch_type = val
- this.getHisOrderList()
- }, handleMedChange() {
- this.getHisOrderList()
- },
- handleZoneChange(val) {
- this.zoneVal = val
- this.getHisOrderList()
-
- },
- getInitData: function() {
- getDialysisRecordInitData().then((rs) => {
- var resp = rs.data
- if (resp.state == 1) {
- var zones = resp.data.zones
- var zone_options = [{ id: 0, text: '全部' }]
- for (let z_i = 0; z_i < zones.length; z_i++) {
- const zone = zones[z_i]
- zone_options.push({ id: zone.id, text: zone.name })
- }
- this.zone_options = zone_options
-
- } else {
- this.$message.error(resp.msg)
- }
- })
- },
-
-
-
- getMedType(med_type) {
- var med_type = parseInt(med_type)
- switch (med_type) {
- case 11:
- return '普通门诊'
- break
- case 12:
- return '门诊挂号'
- break
- case 13:
- return '急诊'
- break
- case 14:
- return '门诊特殊病'
- break
- case 15:
- return '门诊统筹'
- break
- case 16:
- return '门诊慢性病'
- break
- case 21:
- return '普通住院'
- break
- case 140104:
- return '城乡门诊特殊病(140104)'
- break
- case 992102:
- return '单病种(992102)'
- break
- }
- },
-
-
- fetchAllAdminUsers() {
- fetchAllAdminUsers().then((response) => {
- if (response.data.state == 1) {
- this.adminUserOptions = response.data.data.users
- }
- })
- },
- getName(admin_user_id) {
- for (let i = 0; i < this.adminUserOptions.length; i++) {
- if (this.adminUserOptions[i].id == admin_user_id) {
- return this.adminUserOptions[i].name
- }
- }
- },
-
-
-
- handleSizeChange(limit) {
- this.limit = limit
- this.getHisOrderList()
- },
- handleCurrentChange(page) {
- this.page = page
- this.getHisOrderList()
- },
- handleStartTimeChange() {
- this.page = 1
- this.keywords = ''
- this.getHisOrderList()
- },
- handleEndTimeChange() {
- this.page = 1
- this.keywords = ''
- this.getHisOrderList()
- },
-
- getTimes(time) {
- return uParseTime(time, '{y}-{m}-{d}')
- },
-
- getTime(value, temp) {
- if (value != undefined) {
- return uParseTime(value, temp)
- }
- return ''
- },
- getHisOrderList() {
- let params = {
- page: this.page,
- limit: this.limit,
- keywords: this.keywords,
- start_time: this.start_time,
- end_time: this.end_time,
- sort_type: this.sort_type,
- }
- getOrderFapiaoList(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.tableData = response.data.data.order
- this.total = response.data.data.total
- }
- })
- },
- getDoctorList() {
- getDoctorList().then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.doctors = response.data.data.doctors
- }
- })
- },
- open(index) {
- if (index == 1) {
- this.listVisible = true
- } else if (index == 2) {
- this.allListVisible = true
- }
- }, unique(array) {
- // res用来存储结果
- var res = []
- for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
- for (var j = 0, resLen = res.length; j < resLen; j++) {
- if (array[i].id === res[j].id && array[i].price === res[j].price) {
- break
- }
- }
- // 如果array[i]是唯一的,那么执行完循环,j等于resLen
- if (j === resLen) {
- res.push(array[i])
- }
- }
- return res
- },camcleModifyFaPiaoCode(){
- this.dialogfapiaoVisible = false
- this.invoiceVisible = true
- var obj = this.targeObj
- let paramsObj = {
- order_ids: obj.id,
- patient_id: obj.patient_id,
- number: obj.mdtrt_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.patient.gender,
- setl_time: obj.setl_time,
- chargeName: this.getName(obj.creator)
- }
- this.dialogfapiaoVisible = false
- this.invoiceParams = paramsObj
- this.invoiceVisible = true
- },modifyFaPiaoCode(){
- let params = {
- id:this.targeOrderId,
- fapiao_number: this.fapiao_number
- }
- modifyFapiaoCodetwo(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- var obj = this.targeObj
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- number: obj.mdtrt_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.patient.gender,
- setl_time: obj.setl_time,
- chargeName: this.getName(obj.creator)
- }
- this.dialogfapiaoVisible = false
- this.invoiceParams = paramsObj
- this.invoiceVisible = true
- this.getHisOrderList()
- }
- })
-
- },
-
- invoicePrint(obj) {
- if(this.$store.getters.xt_user.org_id == 10480 || this.$store.getters.xt_user.org_id == 0){
- this.fapiao_number = obj.fa_piao_number
- this.dialogfapiaoVisible = true
- this.targeOrderId = obj.id
- this.targeObj = obj
- }else{
- let paramsObj = {
- order_id: obj.id,
- patient_id: obj.patient_id,
- number: obj.mdtrt_id,
- name: obj.patient.name,
- age: obj.age,
- gend: obj.patient.gender,
- setl_time: obj.setl_time,
- chargeName: this.getName(obj.creator)
- }
- this.dialogfapiaoVisible = false
- this.invoiceParams = paramsObj
- this.invoiceVisible = true
-
-
- }
-
-
- }
- },
- watch:{
- countdown(news,old){
- if(this.countdown ==0){
- clearInterval(this.time)
- }
-
- }
-
- }
- }
- </script>
- <style lang="scss">
- .table{
- tr td{
- padding:5px 0;
- }
- }
- </style>
|