<template>
  <div style="display: flex">
    <div id="listPage" :style="pageStyle">
      <div style="width: 100%; text-align: center; font-size: 22px; font-weight: bold; margin-bottom: 4px">{{ listTitle }}</div>
      <div style="width: 100%; display: flex; font-size: 15px; margin-bottom: 8px">
        <div style="width: 50%; text-align: left">统筹区划：{{ setlinfo.insuplcAdmdvsName }}</div>
        <div style="width: 48%; text-align: right">打印日期：{{ nowdate }}</div>
      </div>
      <div v-if="outParam.type === 1" class="si-content">
        <div style="display: flex; text-align: left; margin-bottom: 4px">
          <div style="width: 35%">医疗机构名称：长沙泰和医院</div>
          <div style="width: 25%">医院等级：三级综合</div>
          <div style="width: 20%">就诊号：{{ setlinfo.mdtrtId }}</div>
          <div style="width: 20%">金额单位：元</div>
        </div>
        <table>
          <tr>
            <td>姓名</td>
            <td>{{ setlinfo.psnName }}</td>
            <td>性别</td>
            <td>{{ setlinfo.gendName }}</td>
            <td>年龄</td>
            <td>{{ setlinfo.age }}</td>
            <td>个人编号</td>
            <td colspan="2">{{ setlinfo.psnNo }}</td>
            <td style="width: 70px">补助类别</td>
            <td colspan="2">{{ setlinfo.psnIdetTypeName }}</td>
          </tr>
          <tr>
            <td>单位名称</td>
            <td colspan="3">{{ setlinfo.empName }}</td>
            <td>人员类别</td>
            <td>{{ setlinfo.psnTypeName }}</td>
            <td>联系电话</td>
            <td colspan="2">{{ setlinfo.tel }}</td>
            <td>公务员标志</td>
            <td colspan="2">{{ setlinfo.cvlservFlagName }}</td>
          </tr>
          <tr>
            <td style="width: 60px">住院号</td>
            <td>{{ setlinfo.patNo }}</td>
            <td style="width: 60px">科室</td>
            <td>{{ setlinfo.admDeptName }}</td>
            <td style="width: 60px">床位号</td>
            <td>{{ setlinfo.admBed }}</td>
            <td style="width: 60px">入院日期</td>
            <td>{{ setlinfo.begntime }}</td>
            <td style="width: 60px">出院日期</td>
            <td>{{ setlinfo.endtime }}</td>
            <td style="width: 60px">住院天数</td>
            <td>{{ setlinfo.inHospdays }}</td>
          </tr>
          <tr>
            <td>证件号码</td>
            <td colspan="3">{{ setlinfo.certno }}</td>
            <td>证件类型</td>
            <td>{{ setlinfo.mdtrtCertTypeName }}</td>
            <td colspan="2">出院诊断</td>
            <td colspan="4">{{ setlinfo.dscgMaindiagName }}</td>
          </tr>
          <tr>
            <td>医疗类别</td>
            <td colspan="3">{{ setlinfo.medTypeName }}</td>
            <td>结算时间</td>
            <td>{{ setlinfo.setlTime }}</td>
            <td>主管医师</td>
            <td colspan="2">{{ setlinfo.chfpdrName }}</td>
            <td colspan="2">个人账户余额</td>
            <td colspan="2">{{ setlinfo.balc }}</td>
          </tr>
        </table>
        <div style="height: 8px"></div>
        <table>
          <tr>
            <td rowspan="3">既往费用</td>
            <td rowspan="2" style="width: 40px">本年住院次数</td>
            <td rowspan="2" style="width: 80px">本年度分段计算费用累计</td>
            <td colspan="9">本年度已发生的住院医疗费用支出</td>
          </tr>
          <tr>
            <td>医疗费合计</td>
            <td>已付起付线</td>
            <td>统筹支付</td>
            <td>政策自费</td>
            <td>政策自付</td>
            <td>大额基金支付</td>
            <td>大病保险合规费用</td>
            <td>大病保险支付</td>
            <td>医疗救助支付</td>
          </tr>
          <tr>
            <td>{{ setlinfo.yrAdmtimes }}</td>
            <td></td>
            <td>{{ setlinfo.yrMedfeeSumamt }}</td>
            <td>{{ setlinfo.yrPayedBegnLine }}</td>
            <td>{{ setlinfo.yrFundPaySumamt }}</td>
            <td></td>
            <td></td>
            <td>{{ setlinfo.yrBigAmtFundPay }}</td>
            <td></td>
            <td>{{ setlinfo.yrBigDssInsPay }}</td>
            <td>{{ setlinfo.yrMafPay }}</td>
          </tr>
        </table>
        <div style="height: 8px"></div>
        <table>
          <tr>
            <td>收费项目类别</td>
            <td>总费用</td>
            <td>甲类费用</td>
            <td>乙类费用</td>
            <td>收费项目类别</td>
            <td>总费用</td>
            <td>甲类费用</td>
            <td>乙类费用</td>
          </tr>
          <tr>
            <td>西药费</td>
            <td>{{ setlinfo.westMedFeeSum }}</td>
            <td>{{ setlinfo.westMedFeeFrst }}</td>
            <td>{{ setlinfo.westMedFeeScnd }}</td>
            <td>中药饮片费</td>
            <td>{{ setlinfo.herbalSum }}</td>
            <td>{{ setlinfo.herbalFrst }}</td>
            <td>{{ setlinfo.herbalScnd }}</td>
          </tr>
          <tr>
            <td>中成药费</td>
            <td>{{ setlinfo.chnsPtntSum }}</td>
            <td>{{ setlinfo.chnsPtntFrst }}</td>
            <td>{{ setlinfo.chnsPtntScnd }}</td>
            <td>诊察费</td>
            <td>{{ setlinfo.clinicSum }}</td>
            <td>{{ setlinfo.clinicFrst }}</td>
            <td>{{ setlinfo.clinicScnd }}</td>
          </tr>
          <tr>
            <td>治疗费</td>
            <td>{{ setlinfo.treatSum }}</td>
            <td>{{ setlinfo.treatFrst }}</td>
            <td>{{ setlinfo.treatScnd }}</td>
            <td>手术费</td>
            <td>{{ setlinfo.surgerySum }}</td>
            <td>{{ setlinfo.surgeryFrst }}</td>
            <td>{{ setlinfo.surgeryScnd }}</td>
          </tr>
          <tr>
            <td>护理费</td>
            <td>{{ setlinfo.nursingSum }}</td>
            <td>{{ setlinfo.nursingFrst }}</td>
            <td>{{ setlinfo.nursingScnd }}</td>
            <td>卫生材料费</td>
            <td>{{ setlinfo.sntryMtrlsSum }}</td>
            <td>{{ setlinfo.sntryMtrlsFrst }}</td>
            <td>{{ setlinfo.sntryMtrlsScnd }}</td>
          </tr>
          <tr>
            <td>化验费</td>
            <td>{{ setlinfo.examSum }}</td>
            <td>{{ setlinfo.examFrst }}</td>
            <td>{{ setlinfo.examScnd }}</td>
            <td>一般诊疗费</td>
            <td>{{ setlinfo.nrmlTrtmtSum }}</td>
            <td>{{ setlinfo.nrmlTrtmtFrst }}</td>
            <td>{{ setlinfo.nrmlTrtmtScnd }}</td>
          </tr>
          <tr>
            <td>检查费</td>
            <td>{{ setlinfo.inspectSum }}</td>
            <td>{{ setlinfo.inspectFrst }}</td>
            <td>{{ setlinfo.inspectScnd }}</td>
            <td>挂号费</td>
            <td>{{ setlinfo.registerSum }}</td>
            <td>{{ setlinfo.registerFrst }}</td>
            <td>{{ setlinfo.registerScnd }}</td>
          </tr>
          <tr>
            <td>床位费</td>
            <td>{{ setlinfo.bedfeeSum }}</td>
            <td>{{ setlinfo.bedfeeFrst }}</td>
            <td>{{ setlinfo.bedfeeScnd }}</td>
            <td>其他费</td>
            <td>{{ setlinfo.othfeeSum }}</td>
            <td>{{ setlinfo.othfeeFrst }}</td>
            <td>{{ setlinfo.othfeeScnd }}</td>
          </tr>
          <tr>
            <td>合计</td>
            <td>{{ setlinfo.allfeeSum }}</td>
            <td>{{ setlinfo.allfeeFrst }}</td>
            <td>{{ setlinfo.allfeeScnd }}</td>
            <td colspan="4"></td>
          </tr>
          <tr>
            <td rowspan="2">政策项</td>
            <td colspan="2">个人负担</td>
            <td colspan="2">基金支付</td>
            <td rowspan="2" colspan="3">合计</td>
          </tr>
          <tr>
            <td>金额</td>
            <td>个人负担比例</td>
            <td>金额</td>
            <td>基金支付比例</td>
          </tr>
          <tr>
            <td>全自费</td>
            <td>{{ setlinfo.selfPayPsnAmt }}</td>
            <td>{{ setlinfo.selfPayPsnProp }}</td>
            <td>{{ setlinfo.selfPayFundAmt }}</td>
            <td>{{ setlinfo.selfPayFundProp }}</td>
            <td colspan="3">{{ setlinfo.selfPaySum }}</td>
          </tr>
          <tr>
            <td>乙类先自付</td>
            <td>{{ setlinfo.scndPrePayPsnAmt }}</td>
            <td>{{ setlinfo.scndPrePayPsnProp }}</td>
            <td>{{ setlinfo.scndPrePayFundAmt }}</td>
            <td>{{ setlinfo.scndPrePayFundProp }}</td>
            <td colspan="3">{{ setlinfo.scndPrePaySum }}</td>
          </tr>
          <tr>
            <td>超限额自付</td>
            <td>{{ setlinfo.ovrlmtSelfPayPsnAmt }}</td>
            <td>{{ setlinfo.ovrlmtSelfPayPsnProp }}</td>
            <td>{{ setlinfo.ovrlmtSelfPayFundAmt }}</td>
            <td>{{ setlinfo.ovrlmtSelfPayFundProp }}</td>
            <td colspan="3">{{ setlinfo.ovrlmtSelfPaySum }}</td>
          </tr>
          <tr>
            <td>本次应付起付标准</td>
            <td>{{ setlinfo.begnlinePsnAmt }}</td>
            <td>{{ setlinfo.begnlinePsnProp }}</td>
            <td>{{ setlinfo.begnlineFundAmt }}</td>
            <td>{{ setlinfo.begnlineFundProp }}</td>
            <td colspan="3">{{ setlinfo.begnlineSum }}</td>
          </tr>
          <tr>
            <td>统筹一段</td>
            <td>{{ setlinfo.fundFrstLvPsnAmt }}</td>
            <td>{{ setlinfo.fundFrstLvPsnProp }}</td>
            <td>{{ setlinfo.fundFrstLvFundAmt }}</td>
            <td>{{ setlinfo.fundFrstLvFundProp }}</td>
            <td colspan="3">{{ setlinfo.fundFrstLvSum }}</td>
          </tr>
          <tr>
            <td>统筹二段</td>
            <td>{{ setlinfo.fundScndLvPsnAmt }}</td>
            <td>{{ setlinfo.fundScndLvPsnProp }}</td>
            <td>{{ setlinfo.fundScndLvFundAmt }}</td>
            <td>{{ setlinfo.fundScndLvFundProp }}</td>
            <td colspan="3">{{ setlinfo.fundScndLvSum }}</td>
          </tr>
          <tr>
            <td>大额一段</td>
            <td>{{ setlinfo.bigAmtFrstLvPsnAmt }}</td>
            <td>{{ setlinfo.bigAmtFrstLvPsnProp }}</td>
            <td>{{ setlinfo.bigAmtFrstLvFundAmt }}</td>
            <td>{{ setlinfo.bigAmtFrstLvFundProp }}</td>
            <td colspan="3">{{ setlinfo.bigAmtFrstLvSum }}</td>
          </tr>
          <tr>
            <td>合计</td>
            <td colspan="2">{{ setlinfo.allPsnAmt }}</td>
            <td colspan="2">{{ setlinfo.allFundAmt }}</td>
            <td colspan="3">{{ setlinfo.allSum }}</td>
          </tr>
        </table>
        <div style="height: 8px"></div>
        <table>
          <tr>
            <td style="width: 25%">本次医疗费总额</td>
            <td style="width: 25%">{{ setlinfo.medfeeSumamt }}</td>
            <td style="width: 25%">个人账户支付金额</td>
            <td style="width: 25%">{{ setlinfo.acctPay }}</td>
          </tr>
          <tr>
            <td>统筹基金支付</td>
            <td>{{ setlinfo.hifpPay }}</td>
            <td>现金支付金额</td>
            <td>{{ setlinfo.psnCashPay }}</td>
          </tr>
          <tr>
            <td>公务员补助支付</td>
            <td>{{ setlinfo.cvlservPay }}</td>
            <td>职工大额基金支付</td>
            <td>{{ setlinfo.hifobPay }}</td>
          </tr>
          <tr>
            <td>居民大病基金支付</td>
            <td>{{ setlinfo.hifmiPay }}</td>
            <td>其他基金支付</td>
            <td>{{ setlinfo.othPay }}</td>
          </tr>
          <tr>
            <td>医疗救助支付</td>
            <td>{{ setlinfo.mafPay }}</td>
            <td>补充医疗保险基金支付</td>
            <td>{{ setlinfo.hifesPay }}</td>
          </tr>
        </table>
      </div>
      <div v-if="outParam.type === 2" class="si-content">
        <div style="display: flex; text-align: left; margin-bottom: 4px">
          <div style="width: 50%">医疗机构名称：长沙泰和医院</div>
          <div style="width: 50%">就诊号：{{ setlinfo.mdtrtId }}</div>
        </div>
        <table>
          <tr>
            <td style="width: 70px">姓名</td>
            <td style="width: 80px">{{ setlinfo.psnName }}</td>
            <td style="width: 70px">性别</td>
            <td style="width: 70px">{{ setlinfo.gendName }}</td>
            <td style="width: 70px">年龄</td>
            <td style="width: 120px">{{ setlinfo.age }}</td>
            <td style="width: 70px">公务员标志</td>
            <td>{{ setlinfo.cvlservFlagName }}</td>
            <td style="width: 70px">人员类别</td>
            <td style="width: 70px">{{ setlinfo.psnTypeName }}</td>
          </tr>
          <tr>
            <td>单位名称</td>
            <td colspan="5">{{ setlinfo.empName }}</td>
            <td>证件号码</td>
            <td colspan="3">{{ setlinfo.certno }}</td>
          </tr>
          <tr>
            <td>医疗类别</td>
            <td colspan="3">{{ setlinfo.medTypeName }}</td>
            <td>补助类别</td>
            <td>{{ setlinfo.psnIdetTypeName }}</td>
            <td>病种名称</td>
            <td colspan="3">{{ setlinfo.diseName }}</td>
          </tr>
        </table>
        <div style="height: 8px"></div>
        <table>
          <tr>
            <td rowspan="2">本年既往费用</td>
            <td>住院次数</td>
            <td>医疗费合计</td>
            <td>统筹基金支付</td>
            <td>大额基金支付</td>
            <td>公务员补助支付</td>
            <td>大病保险支付</td>
            <td>个人账户支付</td>
            <td>医疗救助支付</td>
          </tr>
          <tr>
            <td>{{ setlinfo.yrAdmtimes }}</td>
            <td>{{ setlinfo.yrMedfeeSumamt }}</td>
            <td>{{ setlinfo.yrFundPaySumamt }}</td>
            <td>{{ setlinfo.yrBigAmtFundPay }}</td>
            <td></td>
            <td></td>
            <td></td>
            <td>{{ setlinfo.yrMafPay }}</td>
          </tr>
        </table>
        <div style="height: 8px"></div>
        <table>
          <tr>
            <td>费用类别</td>
            <td>总费用</td>
            <td>丙类费用</td>
            <td>乙类费用</td>
            <td>费用类别</td>
            <td>总费用</td>
            <td>丙类费用</td>
            <td>乙类费用</td>
          </tr>
          <tr>
            <td>西药费</td>
            <td>{{ setlinfo.westMedFeeSum }}</td>
            <td>{{ setlinfo.westMedFeeThrd }}</td>
            <td>{{ setlinfo.westMedFeeScnd }}</td>
            <td>中成药费</td>
            <td>{{ setlinfo.chnsPtntSum }}</td>
            <td>{{ setlinfo.chnsPtntThrd }}</td>
            <td>{{ setlinfo.chnsPtntScnd }}</td>
          </tr>
          <tr>
            <td>医疗服务费</td>
            <td>{{ setlinfo.medsrvcSum }}</td>
            <td>{{ setlinfo.medsrvcThrd }}</td>
            <td>{{ setlinfo.medsrvcScnd }}</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td>合计</td>
            <td>{{ setlinfo.allfeeSum }}</td>
            <td>{{ setlinfo.allfeeThrd }}</td>
            <td>{{ setlinfo.allfeeScnd }}</td>
            <td colspan="4"></td>
          </tr>
        </table>
        <div style="height: 8px"></div>
        <table>
          <tr>
            <td style="width: 25%">本次医疗费总额</td>
            <td style="width: 25%">{{ setlinfo.medfeeSumamt }}</td>
            <td style="width: 25%">其中：起付线</td>
            <td style="width: 25%">{{ setlinfo.begnline }}</td>
          </tr>
          <tr>
            <td>统筹基金支付</td>
            <td>{{ setlinfo.hifpPay }}</td>
            <td>个人账户支付金额</td>
            <td>{{ setlinfo.acctPay }}</td>
          </tr>
          <tr>
            <td>公务员补助支付</td>
            <td>{{ setlinfo.cvlservPay }}</td>
            <td>现金支付金额</td>
            <td>{{ setlinfo.psnCashPay }}</td>
          </tr>
          <tr>
            <td>大额基金支付</td>
            <td>{{ setlinfo.hifmiPay }}</td>
            <td>医疗救助支付</td>
            <td>{{ setlinfo.mafPay }}</td>
          </tr>
          <tr>
            <td>大病保险支付</td>
            <td>{{ setlinfo.hifobPay }}</td>
            <td>其他基金支付</td>
            <td>{{ setlinfo.othPay }}</td>
          </tr>
        </table>
      </div>
      <div v-if="outParam.type !== 0" style="display: flex; margin-top: 16px; text-align: left">
        <div style="width: 25%">患者/家属签字：</div>
        <div style="width: 25%">联系电话：</div>
        <div style="width: 25%">经办人：{{ setlinfo.staffName }}</div>
        <div style="width: 25%">审核人：</div>
      </div>
    </div>
    <div v-if="showOperatePane" style="margin-left: 30px; padding: 20px 0">
      <div>
        <div style="display: inline-block; width: 70px">患者类别：</div>
        <el-select v-model="outParam.type" style="width: 130px" @change="setlinfo = {}">
          <el-option v-for="item in types" :key="item.code" :label="item.name" :value="item.code"></el-option>
        </el-select>
      </div>
      <div style="height: 8px"></div>
      <div>
        <div style="display: inline-block; width: 70px">{{ patNoType }}号：</div>
        <el-input v-model="outParam.patNo" style="width: 130px" clearable></el-input>
      </div>
      <div style="height: 8px"></div>
      <div>
        <div style="display: inline-block; width: 70px">{{ patNoType }}次数：</div>
        <!-- <el-input v-model="outParam.times" type="number" style="width: 130px" clearable></el-input> -->
        <el-select v-model="outParam.times" style="width: 130px" @focus="getTimesList">
          <el-option v-for="item in timesList" :key="item" :label="item" :value="item"></el-option>
        </el-select>
      </div>
      <div style="height: 8px"></div>
      <div style="width: 200px; text-align: right">
        <el-button icon="el-icon-printer" @click="siPrint">打印</el-button>
        <el-button type="primary" icon="el-icon-search" @click="beforeQrySetlinfo"> 查找 </el-button>
      </div>
      <div style="width: 200px; text-align: right; margin-top: 32px; text-decoration: underline">
        <a href="http://webhis.thyy.cn:8888/LODOP/Lodop.zip">下载打印控件</a>
      </div>
    </div>
    <div v-else style="position: fixed; top: 20px; left: 20px">
      <el-button type="danger" icon="el-icon-printer" @click="siPrint">打印</el-button>
    </div>
    <el-dialog v-model="showSetlindex" title="请点击要查询的结算条目" width="50%">
      <el-table :data="setlindex" stripe highlight-current-row max-height="300" @row-click="executeQrySetlinfo">
        <el-table-column prop="psnName" label="姓名" width="100"></el-table-column>
        <el-table-column prop="gendName" label="性别" width="60"></el-table-column>
        <el-table-column prop="patNo" label="住院号" width="100"></el-table-column>
        <el-table-column prop="times" label="住院次数" width="100"></el-table-column>
        <el-table-column prop="ledgerSn" label="账页号" width="60"></el-table-column>
        <el-table-column prop="setlTime" label="结算时间"></el-table-column>
        <el-table-column prop="medfeeSumamt" label="总费用"></el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>

<script>
import { initLodop, getLodop } from '@/utils/c-lodop'
import { computed, onMounted, reactive, ref } from 'vue'
import store from '@/store'
import { ElMessage } from 'element-plus'
import router from '@/router'
import { querySiSetlIndex, querySiSetlList, fetchSiTimesList } from '@/api/medical-insurance/si-query'
import { getDate } from '@/utils/date'
export default {
  setup() {
    const path = router.currentRoute.value.fullPath
    const showOperatePane = path === '/medins/qryManage/siSettleDetailList'
    const windowSize = store.state.app.windowSize
    const pageStyle = {
      height: windowSize.h - 50 + 'px',
      overflowY: 'scroll',
      width: '856px',
      textAlign: 'center',
      padding: '20px',
      background: 'white',
    }
    const types = [
      // { code: 0, name: '一站式住院' },
      { code: 1, name: '普通住院' },
      { code: 2, name: '门诊' },
    ]
    const outParam = reactive({
      type: 1,
      patNo: null,
      times: null,
    })
    const patNoType = computed(() => {
      return outParam.type === 2 ? '门诊' : '住院'
    })
    const timesList = ref([])
    const getTimesList = () => {
      if (!outParam.patNo) {
        return
      }
      fetchSiTimesList(outParam.patNo)
        .then((res) => {
          timesList.value = res
        })
        .catch(() => {
          timesList.value = []
          outParam.times = null
        })
    }

    const listTitle = computed(() => {
      if (outParam.type === 0) {
        return '湖南省长沙市城乡居民医疗费用“一站式”结算单'
      } else if (outParam.type === 1) {
        return '湖南省长沙市住院费用结算单'
      }
      return '湖南省长沙市(普通、特殊)门诊费用结算单'
    })
    const nowdate = getDate()
    const showSetlindex = ref(false)
    const setlindex = ref([])
    const setlinfo = ref({
      mdtrtId: '',
    })
    const beforeQrySetlinfo = () => {
      setlinfo.value = { mdtrtId: '' }
      if (outParam.type === 2) {
        executeQrySetlinfo(outParam)
      } else {
        querySiSetlIndex(outParam).then((res) => {
          if (res.length === 1) {
            executeQrySetlinfo(res[0])
          } else {
            setlindex.value = res
            showSetlindex.value = true
          }
        })
      }
    }
    const executeQrySetlinfo = (param) => {
      querySiSetlList(param).then((res) => {
        setlinfo.value = res
        showSetlindex.value = false
      })
    }

    const siPrint = () => {
      if (!setlinfo.value.mdtrtId) {
        ElMessage({
          message: '无法打印空白的结算清单！',
          type: 'warning',
          duration: 2000,
          showClose: true,
        })
        return
      }
      const prntStyle =
        '<style>table {width: 100%;border-collapse: collapse; font-size: 13px;} td {border: 1px solid black;height: 20px;text-align:center; font-size: 13px;}</style>'
      const strFormHtml = prntStyle + '<body>' + document.getElementById('listPage').innerHTML + '</body>'
      LODOP = getLodop()
      LODOP.PRINT_INIT('siSettleDetailList')
      LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
      LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
      LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strFormHtml)
      LODOP.SET_PRINT_STYLE('ItemType', 3)
      if (outParam.type === 0) {
        LODOP.ADD_PRINT_TEXT('280mm', '190mm', '20mm', '2mm', '第#页/共&页')
      }
      LODOP.PREVIEW()
    }

    onMounted(() => {
      initLodop()
      if (!showOperatePane) {
        const params = router.currentRoute.value.params
        outParam.type = 2
        outParam.patNo = params.patientId
        outParam.times = params.times
        executeQrySetlinfo(outParam)
      }
    })

    return {
      pageStyle,
      outParam,
      timesList,
      getTimesList,
      types,
      patNoType,
      nowdate,
      listTitle,
      setlinfo,
      showOperatePane,
      setlindex,
      showSetlindex,
      beforeQrySetlinfo,
      executeQrySetlinfo,
      siPrint,
    }
  },
}
</script>

<style scoped>
table {
  width: 100%;
  border-collapse: collapse;
}
td {
  border: 1px solid black;
  height: 20px;
}
</style>
