<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>
                    <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
                    <!--@click="Action">-->
                    <!--导出-->
                    <!--</el-button>-->
                    <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
                              @keyup.enter.native='searchAction'
                              class="filter-item"/>
                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
                               @click="searchAction">
                        搜索
                    </el-button>
<!--                    <el-select size="small" v-model="admin_user_id" placeholder="请选择"-->
<!--                               style="width:150px;margin-left:10px;" @change="changeDoctor">-->
<!--                        <el-option-->
<!--                                label="全部"-->
<!--                                value="0">-->
<!--                        </el-option>-->
<!--                        <el-option-->
<!--                                v-for="(item,index) in doctors"-->
<!--                                :key="index"-->
<!--                                :label="item.user_name"-->
<!--                                :value="item.admin_user_id">-->
<!--                        </el-option>-->
<!--                    </el-select>-->

                  <el-select size="small" v-model="sort_type" placeholder="请选择"
                             style="width:150px;margin-left:10px;" @change="changeSortType">
                    <el-option
                        v-for="(item,index) in sort_types"
                        :key="index"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                  </el-select>
                    <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
                                    @change="handleStartTimeChange" :editable="false" :clearable="false"
                                    style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
                                    format="yyyy-MM-dd"
                                    value-format="yyyy-MM-dd"
                                    align="right"></el-date-picker>

                    <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
                                    @change="handleEndTimeChange" :editable="false" :clearable="false"
                                    style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
                                    format="yyyy-MM-dd"
                                    value-format="yyyy-MM-dd"
                                    align="right"></el-date-picker>
                    <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
                    <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
                </div>
                <div>
                    <!-- <el-popover
                      placement="bottom"
                      width="210"
                      trigger="click">
                      <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
                      <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
                      <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>

                    </el-popover> -->
                    <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
                </div>
            </div>
            <el-table :data="tableData" border 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="100" prop="name" label="就诊号">
                    <template slot-scope="scope">{{ scope.row.mdtrt_id }}</template>
                </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" prop="name" label="患者类型">-->
                <!--<template slot-scope="scope"></template>-->
                <!--</el-table-column>-->

                <el-table-column align="center" width="90" prop="name" label="应收金额">
                    <template slot-scope="scope">{{scope.row.medfee_sumamt.toFixed(2)}}</template>
                </el-table-column>
                <el-table-column align="center" width="90" prop="name" label="实收金额">
                    <template slot-scope="scope">{{scope.row.reality_price.toFixed(2)}}</template>
                </el-table-column>
                <el-table-column align="center" width="90" prop="name" label="科室">
                    <template slot-scope="scope">{{scope.row.department_name}}</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="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" width="80" prop="name" label="状态">
                    <template slot-scope="scope">
                        <div v-if="scope.row.order_status == 1">待结算</div>
                        <div v-if="scope.row.order_status == 2">已结算</div>
                        <div v-if="scope.row.order_status == 3">已退费</div>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="name" label="操作">
                    <template slot-scope="scope">
                        <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
                        <el-button size="mini" type="primary" @click="toPrint(scope.row)">
                            结算单
                        </el-button>
                        <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
                                   v-if="scope.row.order_status == 2&& scope.row.result.id == 0">
                            上传结算清单
                        </el-button>
                        <el-button size="mini" type="primary"
                                   v-if="scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106"
                                   @click="settlementPrint(scope.row)">结算单
                        </el-button>
                        <el-button size="mini" type="primary" @click="toRefund(scope.row)">
                            退费
                        </el-button>
                        <el-button size="mini" type="primary" @click="invoicePrint(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"
                    background
                    style="margin-top:20px;float: right"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="total"

            >
            </el-pagination>
        </div>

        <el-dialog
                class="centerDialog"
                width="1200px"
                title="打印"
                :visible.sync="statementVisible">
            <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
            <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
        </el-dialog>
        <el-dialog
                class="centerDialog"
                width="900px"
                title="打印"
                :visible.sync="listVisible">
            <listPrint></listPrint>
        </el-dialog>
        <el-dialog
                class="centerDialog"
                width="900px"
                title="打印"
                :visible.sync="allListVisible">
            <allListPrint :paramsObj='paramsObj'></allListPrint>
        </el-dialog>

        <!--<el-dialog-->
        <!--class="centerDialog"-->
        <!--width="1200px"-->
        <!--title="打印"-->
        <!--:visible.sync="statementVisible9504">-->
        <!--&lt;!&ndash;<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>&ndash;&gt;-->
        <!--&lt;!&ndash;<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>&ndash;&gt;-->
        <!--<new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>-->
        <!--</el-dialog>-->

        <el-dialog
                class="centerDialog"
                width="1200px"
                title="打印"
                :visible.sync="invoiceVisible">
            <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
        </el-dialog>
        <el-dialog
                class="centerDialog"
                width="1200px"
                title="打印"
                :visible.sync="settlementVisible">
            <settlement-print ref="print" :paramsObj='settlementObj'></settlement-print>
        </el-dialog>

    </div>
</template>


<script>
  import BreadCrumb from '@/xt_pages/components/bread-crumb'
  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund } from '@/api/his/his'
  import { uParseTime } from '@/utils/tools'
  // import NewStatementPrint from './newStatementPrint'
  import NewStatementPrint from './statementPrint.vue'
  import listPrint from './listPrint'
  import allListPrint from './allListPrint'
  import NewStatementPrintTwo from './newStatementPrintTwo'
  import { fetchAllAdminUsers } from '@/api/doctor'
  import axios from 'axios'
  import invoicePrint from './invoicePrint'
  import settlementPrint from './settlementPrint'

  export default {
    components: {
      NewStatementPrintTwo,
      NewStatementPrint,
      BreadCrumb,
      listPrint,
      allListPrint,
      invoicePrint,
      settlementPrint
    },
    data() {
      return {
        orderObj: {},
        statementVisible: false,
        statementVisible9504: false,
        orderObj9504: {},
        crumbs: [
          { path: false, name: '门诊收费' },
          { path: false, name: '项目消费明细汇总' }
        ],
        tableData: [],
        limit: 10,
        page: 1,
        keywords: '',
        start_time: '',
        end_time: '',
        total: '',
        doctors: [],
        sort_type:1,
        sort_types: [
          { value: 1, label: '处方时间' },
          { value: 2, label: '结算时间' }
        ],
        admin_user_id: '',
        listVisible: false,
        allListVisible: false,
        adminUserOptions: [],
        invoiceVisible: false,
        paramsObj: {},
        invoiceParams: {},
        settlementVisible: false,
        settlementObj: {}

      }
    },
    methods: {
      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
        }
      },
      uploadInfo(row) {
        var that = this
        axios.get('http://127.0.0.1:9532/api/settlelist/get', {
          params: {
            order_id: row.id,
            admin_user_id: this.$store.getters.xt_user.user.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.success('上传成功')
              row.result.id = response.data.data.result.id
            }

          }
        }).catch(function(error) {
        })
      },

      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
          }
        }

      }, toRefund(row) {
        if (row.his_patient.balance_accounts_type == 2) {
          this.$confirm('是否退费', '退费', {
            confirmButtonText: '确 定',
            cancelButtonText: '取 消',
            type: 'warning'
          }).then(() => {
            let params = {
              'order_id': row.id,
              'patient_id': row.patient_id,
              'record_time': this.getTimes(row.settle_accounts_date)
            }
            Refund(params).then(response => {
              if (response.data.state == 0) {
                this.$message.error(response.data.msg)
                return false
              } else {
                this.$message({ message: '退费成功', type: 'success' })
                this.getHisOrderList()
              }
            })
          }).catch(() => {
          })

        } else {

          var that = this
          this.$confirm('是否退费', '退费', {
            confirmButtonText: '确 定',
            cancelButtonText: '取 消',
            type: 'warning'
          }).then(() => {
            let params = {
              'order_id': row.id,
              'patient_id': row.patient_id,
              'record_time': that.getTimes(row.settle_accounts_date),
              'admin_user_id': that.$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)
                  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', duration: 5000 })
                    that.getHisOrderList()

                  }
                }
              })
              .catch(function(error) {
              })
          }).catch(() => {
          })
        }
      }, toPrint(row) {
        // if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
        //   if (row.mdtrt_id.indexOf('H') > -1) {
        //     this.statementVisible9504 = true
        //     let obj = {
        //       order_id: row.id,
        //       patient_id: row.patient_id,
        //       record_time: this.getTimes(row.settle_accounts_date),
        //       admin_user_id: this.$store.getters.xt_user.user.id
        //     }
        //     this.orderObj9504 = obj
        //   } else {
        //
        //     this.statementVisible9504 = true
        //     let obj = {
        //       order_id: row.id,
        //       patient_id: row.patient_id,
        //       record_time: this.getTimes(row.settle_accounts_date),
        //       admin_user_id: this.$store.getters.xt_user.user.id,
        //       balance_accounts_type: 2
        //     }
        //     this.orderObj9504 = obj
        //   }
        //
        // } else {
        this.statementVisible = true
        let obj = {
          order_id: row.id,
          settle_type: row.settle_type,
          start_time: row.settle_start_time,
          end_time: row.settle_end_time,
          balance_accounts_type: row.his_patient.balance_accounts_type
        }
        this.orderObj = obj

      },
      settlementPrint(row) {
        this.settlementVisible = true
        let obj = {
          order_id: row.id
        }
        this.settlementObj = obj
      },
      export_detail() {
        let params = {
          start_time: this.start_time,
          end_time: this.end_time,
          p_type: 2
        }
        getExportConsumeDetailList(params).then(response => {
          if (response.data.state == 0) {
            this.$message.error(response.data.msg)
            return false
          } else {

            let list = []
            for (let i = 0; i < response.data.data.order.length; i++) {
              let order = response.data.data.order[i]
              let number = ''
              let name = ''
              let department = ''
              let doctor_name = ''
              let balance_accounts = ''
              let order_status = ''
              let charge_name = ''

              let insutypeName = ''

              let time = ''
              if (order.his_patient != null && order.his_patient.number.length > 0) {
                number = order.his_patient.number

              }

              if (order.his_patient != null) {
                if (order.his_patient.balance_accounts_type == 2) {
                  balance_accounts = '自费'
                }

                if (order.his_patient.balance_accounts_type == 1) {
                  balance_accounts = '医保'
                }
              }

              if (order.patient != null && order.patient.name.length > 0) {
                name = order.patient.name

              }

              if (order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0) {
                department = order.p_info.department.name

              }

              if (order.p_info != null && order.p_info.doctor.length > 0) {
                doctor_name = order.p_info.doctor
              }

              if (order.creator != null) {
                charge_name = this.getName(order.creator)
              }
              if (order.insutype == '390') {

                insutypeName = '城乡居民基本医疗保险'
              } else if (order.insutype == '310') {
                insutypeName = '职工基本医疗保险'

              }

              if (order.order_status == 1) {
                order_status = '待结算'
              }

              if (order.order_status == 2) {
                order_status = '已结算'
              }

              if (order.order_status == 3) {
                order_status = '已退费'
              }

              if (order.settle_type == 2) {
                time = this.getTimes(order.settle_start_time)
              } else {
                time = this.getTimes(order.settle_accounts_date)
              }
              var hifmi_pay = 0.00
              if (order.setl_detail && order.setl_detail.length > 0) {
                var jsonObj = JSON.parse(order.setl_detail)
                console.log(jsonObj)
                if (jsonObj != null) {

                  for (let i = 0; i < jsonObj.length; i++) {
                    if (order.insutype == '310') {
                      if (jsonObj[i].fund_pay_type == '310300') {
                        hifmi_pay = jsonObj[i].fund_payamt
                      }
                    } else if (order.insutype == '390') {
                      if (order.fund_pay_type == '390200') {
                        hifmi_pay = jsonObj[i].fund_payamt
                      }
                    }
                  }
                }
              }
              var hifmi_pay = 0.00

              console.log(order.setl_detail)
              if (order.setl_detail && order.setl_detail.length > 0) {
                var jsonObj = JSON.parse(order.setl_detail)
                if (jsonObj != null) {
                  for (let i = 0; i < jsonObj.length; i++) {
                    if (order.insutype == '310') {
                      if (jsonObj[i].fund_pay_type == '310300') {
                        hifmi_pay = jsonObj[i].fund_payamt
                      }
                    }
                    if (order.insutype == '390') {
                      if (jsonObj[i].fund_pay_type == '390200') {
                        hifmi_pay = jsonObj[i].fund_payamt
                      }
                    }
                  }
                }
              }

              let obj = {
                '就诊号': order.mdtrt_id,
                '患者姓名': name,
                '开处时间': time,
                '险种类型': insutypeName,
                '应收金额': order.medfee_sumamt,
                '实收金额': order.medfee_sumamt,
                '医保统筹金额': order.hifp_pay,
                '大额基金金额': order.hifob_pay,
                '大病基金金额': hifmi_pay,
                '补充保险基金金额': order.hifes_pay,
                '医疗救助基金金额': order.maf_pay,
                '公务员基金': order.cvlserv_pay,
                '个人支付基金': order.psn_cash_pay,
                '个人账户支付金额': order.acct_pay,
                '科室': department,
                '医生姓名': doctor_name,
                '收费类别': balance_accounts,
                '收费者姓名': charge_name,
                '总金额': order.medfee_sumamt,
                '现金支付': '',
                '账户支付': '',
                '支付宝支付': '',
                '微信支付': '',
                '其他支付': '',
                '收费时间': order.setl_time,
                '收费状态': order_status,
                '退费日期': ''
              }

              list.push(obj)
            }
            import('@/vendor/Export2Excel').then(excel => {
              const tHeader = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期']
              const filterVal = ['就诊号', '患者姓名', '开处时间', '险种类型', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期']
              const data = this.formatJson(filterVal, list)
              excel.export_json_to_excel({
                header: tHeader,
                data,
                filename: '消费明细'
              })
            })

          }
        })

      }, formatJson(filterVal, jsonData) {
        return jsonData.map(v => filterVal.map(j => v[j]))
      },changeSortType(){
        this.page = 1
        this.keywords = ''
        this.getHisOrderList()
      },
      changeDoctor() {
        this.page = 1
        this.keywords = ''
        this.getHisOrderList()
      },
      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()
      }, Action() {
        getAllOrders().then(response => {
          if (response.data.state == 0) {
            this.$message.error(response.data.msg)
            return false
          } else {

            let list = []
            for (let i = 0; i < response.data.data.order.length; i++) {

              var hifmi_pay = 0.00
              for (let b = 0; b < order.order_info.length; b++) {
                let item_name = ''
                let item_code = ''
                let price = ''
                let unit = ''
                let spec = ''
                let time = ''
                let name = ''
                let selfpay_prop = ''
                if (order.order_info[b].advice.id == 0 && order.order_info[b].project.id > 0) {
                  item_name = order.order_info[b].project.project.project_name
                  item_code = order.order_info[b].project.project.medical_code
                  price = order.order_info[b].pric
                  unit = order.order_info[b].project.project.unit
                } else if (order.order_info[b].advice.id > 0 && order.order_info[b].project.id == 0) {
                  item_name = order.order_info[b].advice.advice_name
                  item_code = order.order_info[b].advice.drug.medical_insurance_number
                  price = order.order_info[b].pric
                  unit = order.order_info[b].advice.prescribing_number_unit

                }
                selfpay_prop = order.order_info[b].selfpay_prop

                let obj = {
                  '项目名称': item_name,
                  '项目编码': '',
                  '医保编码': item_code,
                  '零售价': price,
                  '单位': unit,
                  '规格': '',
                  '收费时间': time,
                  '报销比例': selfpay_prop,
                  '患者名称': name
                }

                list.push(obj)
              }
            }
            import('@/vendor/Export2Excel').then(excel => {
              const tHeader = ['项目名称', '项目编码', '医保编码', '零售价', '单位', '规格', '收费时间', '报销比例', '患者名称']
              const filterVal = ['项目名称', '项目编码', '医保编码', '零售价', '单位', '规格', '收费时间', '报销比例', '患者名称']
              const data = this.formatJson(filterVal, list)
              excel.export_json_to_excel({
                header: tHeader,
                data,
                filename: '消费明细'
              })
            })

          }
        })

      },
      searchAction() {
        this.page = 1
        this.getHisOrderList()

      },
      getTimes(time) {
        return uParseTime(time, '{y}-{m}-{d}')
      },
      toDetail(row) {
        this.$router.push('/outpatientCharges/summaryDetail?patient_id=' + row.patient.id + '&number=' + row.number + '&id=' + row.id)
      }, 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,
          type: this.admin_user_id,
          p_type: 2,
          sort_type: this.sort_type
        }
        getHisOrderList(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
        }
      },
      invoicePrint(obj) {
        console.log(obj)
        let paramsObj = {
          order_id: obj.id,
          patient_id: obj.patient_id,
          number: obj.mdtrt_id,
          name: obj.patient.name,
          age: obj.age,
          gend: obj.gend,
          setl_time: obj.setl_time,
          chargeName: this.getName(obj.creator)
        }
        this.invoiceParams = paramsObj
        this.invoiceVisible = true
      }
    }
    ,
    created() {

      this.fetchAllAdminUsers()
      this.getDoctorList()
      this.getHisOrderList()

    }
  }
</script>
