hd 1 Minggu lalu
induk
melakukan
d8e6712f67

+ 2 - 80
app/statistics/html/comprehensive-query.html

@ -146,7 +146,7 @@
                    </el-select>
                  </template>
                  <el-radio v-model="radio" label="2">
                    {{handleNodeId == '44' ? '下转时间:' : expertFamilyIdType == 'zhuanke1' || handleNodeId == 45 ? '邀请时间:' : '创建时间:'}}
                    {{expertFamilyIdType == 'zhuanke1' || handleNodeId == 45 ? '邀请时间:' : '创建时间:'}}
                  </el-radio>
                  <el-date-picker
                    v-model="start"
@ -433,46 +433,6 @@
                    </el-form>
                  </div>
                </div>
                <div v-if="handleNodeId==44" class="searchDiv">
                  <div class="mt5">
                    <el-form :model="form11" class="flex handleNodeId-44">
                      <el-form-item label="患者姓名:" class="flex">
                        <el-input v-model="form11.patientName" placeholder="请输入患者姓名查询"></el-input>
                      </el-form-item>
                      <el-form-item label="下转状态:" class="flex formLeft">
                        <el-select v-model="form11.status" class="" placeholder="请选择" filterable>
                          <el-option v-for="(item,index) in deorsumvergence" :key="item.value" :value="item.value" :label="item.label"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="下转医院:" class="flex formLeft">
                        <el-select v-model="form11.hospitalCode" class="" placeholder="请选择" filterable>
                          <el-option v-for="(item,index) in rehabilitationHospital" :key="item.value" :value="item.value" :label="item.label"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="下转医生:" class="flex formLeft">
                        <el-input v-model="form11.hospitalDoctor" placeholder="请输入医生姓名查询"></el-input>
                      </el-form-item>
                      <el-form-item label="接收社区医院:" class="flex formLeft">
                        <el-select v-model="form11.orgCode" class="" placeholder="请选择" filterable>
                          <el-option v-for="(item,index) in communityHospitals" :key="item.value" :value="item.value" :label="item.label"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="接收医生:" class="flex formLeft">
                        <el-input v-model="form11.doctor" placeholder="请输入接收医生姓名查询"></el-input>
                      </el-form-item>
                      <el-form-item label="档案状态:" class="flex formLeft">
                        <el-select v-model="form11.archiveStatus" class="" placeholder="请选择" filterable>
                          <el-option v-for="(item,index) in archiveList" :key="item.value" :value="item.value" :label="item.label"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-form-item label="患者类型:" class="flex formLeft">
                        <el-select v-model="form11.patientType" class="" placeholder="请选择" filterable>
                          <el-option v-for="(item,index) in inviteStatus1" :key="item.value" :value="item.value" :label="item.label"></el-option>
                        </el-select>
                      </el-form-item>
                    </el-form>
                  </div>
                </div>
                <div v-if="handleNodeId==45" class="searchDiv">
                  <div class="mt5">
                    <el-form :model="form12" class="flex handleNodeId-44">
@ -529,7 +489,7 @@
              <div class="searchDiv mt10" v-if="tabsId!=5">
                <template
                v-if="['44'].concat(componentId).indexOf(handleNodeId)==-1">
                v-if="componentId.indexOf(handleNodeId)==-1">
                  <label class="c-333 c-f14" for="">数据范围:</label>
                  <el-select v-model="rangeCode" style="width: 100px" class="pr10">
                    <el-option v-for="(item , index) in rangeList" :key="index" :label="item.name" :value="item.code"></el-option>
@ -814,34 +774,6 @@
                      </el-table-column>
                    </template>
                  </el-table>
                  <el-table v-if="handleNodeId==44" border :key="tableKey" :data="recoveryList" style="width: 100%" v-loading="loadingTwo" class="mt20">
                    <template>
                      <el-table-column type="index" label="序号" align="center"></el-table-column>
                      <el-table-column prop="name" label="患者姓名" align="center"></el-table-column>
                      <el-table-column prop="age" label="年龄" align="center"></el-table-column>
                      <el-table-column prop="sex" label="性别" align="center"></el-table-column>
                      <el-table-column prop="mobile" label="患者手机号" align="center"></el-table-column>
                      <el-table-column prop="hospitalName" label="下转医院" align="center"></el-table-column>
                      <el-table-column prop="hospitalDoctor" label="下转医生" align="center"></el-table-column>
                      <el-table-column prop="createTime" label="下转时间" align="center"></el-table-column>
                      <el-table-column prop="patientType" label="患者类型" align="center"></el-table-column>
                      <el-table-column prop="statusName" label="下转状态" align="center"></el-table-column>
                      <el-table-column prop="orgName" label="接收社区医院" align="center"></el-table-column>
                      <el-table-column prop="doctorName" label="接收签约医生" align="center"></el-table-column>
                      <el-table-column prop="receiveTime" label="接收时间" align="center"></el-table-column>
                      <el-table-column prop="archiveStatusName" label="档案状态" align="center"></el-table-column>
                      <el-table-column prop="img" label="操作" align="center" width="100">
                        <template slot-scope="scope">
                          <div class="operate">
                            <div v-if="scope.row.status==0" @click="operation(1,scope.row)">分配</div>
                            <div @click="operation(2,scope.row)">查看签约</div>
                            <div v-if="scope.row.status==5" @click="operation(3,scope.row)">同步居民</div>
                            <div v-if="scope.row.status==3" @click="operation(4,scope.row)">同步病历</div>
                          </div>
                        </template>
                      </el-table-column>
                    </template>
                  </el-table>
                  <el-table v-if="handleNodeId==45" border :key="tableKey" :data="invitationList" style="width: 100%" v-loading="loadingTwo" class="mt20">
                    <template>
                      <el-table-column type="index" width="50" label="序号" align="center"></el-table-column>
@ -965,16 +897,6 @@
      </div>
      <!--模态框组件-->
      <vuedals></vuedals>
      <el-dialog title="查看签约信息" :visible.sync="dialogVisible" width="70%">
        <el-table border :data="signatoryList" style="width: 100%" height="500" class="mt20">
          <template>
            <el-table-column prop="hospitalName" label="签约社区医院" align="center"></el-table-column>
            <el-table-column prop="doctorName" label="签约医生" align="center"></el-table-column>
            <el-table-column prop="applyDate" label="签约时间" align="center"></el-table-column>
            <el-table-column prop="signYear" label="签约年度" align="center"></el-table-column>
          </template>
        </el-table>
      </el-dialog>
    </div>
    <script src="../../../js/FileSaver/FileSaver.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>

+ 1 - 1
app/statistics/js/comprehensive-query.js

@ -68,7 +68,7 @@ new Vue({
          { label: '微信绑定明细', id: '41' },
          { label: '居民积分明细', id: '42' },
          { label: '入户访视明细', id: '43' },
          { label: '康复下转明细', id: '44' },
          // { label: '康复下转明细', id: '44' },
          { label: '邀请专科回复明细', id: '45' }
        ]
      }

+ 42 - 7
component/statistics/FollowDetail/index.html

@ -4,7 +4,7 @@
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按筛查年份:</el-radio>
        <el-radio v-model="yearType" label="1">按下转年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
@ -12,7 +12,7 @@
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义筛查时间:</el-radio>
        <el-radio v-model="yearType" label="2">下转时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"
@ -22,19 +22,46 @@
          value-format="yyyy-MM-dd"></el-date-picker>
      </label>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">签约状:</label>
      <el-radio v-model="form.isSign" label="1">是</el-radio>
      <el-radio v-model="form.isSign" label="0">否</el-radio>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">居民姓名:</label>
      <el-input v-model="form.name" placeholder="请输入居民姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">就诊类型:</label>
      <el-select v-model="form.eventType" clearable>
        <el-option label="门诊" value="1"></el-option>
        <el-option label="住院" value="2"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">数据范围:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.range" placeholder="请选择" @change="resetArea">
        <el-option v-for="(option, index) in rangeOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">地区:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.area" placeholder="请选择" @change="getHospital">
        <el-option v-for="(option, index) in areaOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'hospital'||form.range == 'team'">
      <label class="c-333 c-f14">社区:</label>
      <el-select class="formWidth" v-model="form.hospital" placeholder="请选择" @change="getTeam">
        <el-option v-for="(option, index) in hospitalOptions" :label="option.name" :value="option.code" :key="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'team'">
      <label class="c-333 c-f14">团队:</label>
      <el-select class="formWidth" v-model="form.team" placeholder="请选择">
        <el-option v-for="(option, index) in teamOptions" :label="option.name" :value="option.id" :key="option.id"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20">
      <el-button type="primary" size="mini" @click="queryDate">查询</el-button>
      <el-button type="ff9526" size="mini" @click="exportTable" :disabled="exportLoading">导出</el-button>
@ -46,6 +73,11 @@
    <el-table-column :label="item.label" v-for="item in tableHeader" :min-width="item.width" :key="item.prop">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
    </el-table-column>
    <el-table-column label="操作" align="center" width="130px">
      <template slot-scope="scope">
        <el-button type="text" @click="openDialog(scope)">查看筛查表单</el-button>
      </template>
    </el-table-column>
  </el-table>
  <el-pagination
    @current-change="handleCurrentChange"
@ -56,4 +88,7 @@
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
    class="pagination"></el-pagination>
    <el-dialog :visible="visible" title="查看随访结果" @close="closeDialog">
      
    </el-dialog>
</div>

+ 129 - 83
component/statistics/FollowDetail/index.js

@ -20,57 +20,91 @@ Vue.component('follow-detail', {
      yearType: '1',
      chooseYear: null,
      chooseTime: null,
      turnOverOptions: [],
      form: {},
      rangeOptions: [
        { label: '区', value: 'town' },
        { label: '医院', value: 'hospital' },
        { label: '团队', value: 'team' }
      ],
      areaOptions: [
        { label: '思明区', value: '350203' },
        { label: '海沧区', value: '350205' },
        { label: '湖里区', value: '350206' },
        { label: '集美区', value: '350211' },
        { label: '同安区', value: '350212' },
        { label: '翔安区', value: '350213' }
      ],
      hospitalOptions: [],
      teamOptions: [],
      form: {
        range: 'town'
      },
      loading: false,
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '住院号', prop: 'visitNo', width: '110' },
        { label: '病人姓名', prop: 'patientName', width: '90' },
        { label: '性别', prop: 'sex', width: '80' },
        { label: '手机号', prop: 'mobile', width: '130' },
        { label: '身份证号', prop: 'idcard', width: '170' },
        { label: '费别', prop: 'rateTypeName', width: '90' },
        { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
        { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
        { label: '病情', prop: 'sickStateName', width: '110' },
        { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
        { label: '建床日期', prop: 'buildingTime', width: '170' },
        { label: '建床天数', prop: 'budildDays', width: '90' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
        { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
        { label: '转归情况', prop: 'turnOver', width: '110' }
      ],
      dialogShow: false,
      settlementInfo: {
        name: '黄小蕾',
        yibao: 'dk',
        pay: '1049'
      },
      dialogTable: [],
      dialogHeader: [
        { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
        { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
        { label: '金额', prop: 'COST', width: '80' },
        { label: '自付', prop: 'CHARGE', width: '80' },
        { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
        { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
        { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
        { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
        { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
        { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
        { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
        { label: '结算号', prop: 'SETTLE_NO', width: '80' },
        { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
        { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
        { label: '患者姓名', prop: 'name', width: '100' },
        { label: '年龄', prop: 'age', width: '90' },
        { label: '性别', prop: 'sex', width: '90' },
        { label: '社区医院', prop: 'hospitalName', width: '140' },
        { label: '签约医生', prop: 'doctorName', width: '90' },
        { label: '预约医院', prop: 'orgName', width: '140' },
        { label: '医院医生', prop: 'doctor_name', width: '90' },
        { label: '预约科室', prop: 'deptName', width: '140' },
        { label: '预约时间', prop: 'startTime', width: '140' },
        { label: 'ascvd评估', prop: 'ascvd', width: '90' },
        { label: '出院时间', prop: 'createTime', width: '160' },
        { label: '随访情况', prop: 'followupInfo', width: '80' },
        { label: '血压-收缩压', prop: 'bloodPressure', width: '100' },
        { label: '血压-舒张压', prop: 'bloodPressureDown', width: '100' },
        { label: 'LDL-C', prop: 'ldlc', width: '100' },
        { label: '糖化血红蛋白', prop: 'thxhdb', width: '110' },
      ],
      page: 1,
      size: 10,
      total: 0
      total: 0,
      level: 0,
      visible: false
    }
  },
  methods: {
    init() {
      var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
      if (selectedRole.code.indexOf('350200') > -1) {
        this.level = 1 //  市卫健委
        this.areaOptions = [
          { label: '思明区', value: '350203' },
          { label: '海沧区', value: '350205' },
          { label: '湖里区', value: '350206' },
          { label: '集美区', value: '350211' },
          { label: '同安区', value: '350212' },
          { label: '翔安区', value: '350213' }
        ]
      } else if (selectedRole.code.length == 6) {
        this.level = 2 // 区管理
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.form = {
          range: 'town',
          area: selectedRole.code
        }
        this.getHospital(selectedRole.code)
      } else {
        this.level = 3 // 社区管理
        this.rangeOptions = [
          { label: '医院', value: 'hospital' },
          { label: '团队', value: 'team' }
        ]
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.hospital = [{ label: selectedRole.name, value: selectedRole.code }]
        this.form = {
          range: 'hospital',
          area: selectedRole.code.substring(0, 6),
          hospital: selectedRole.code
        }
        this.getTeam(selectedRole.code)
      }
      this.initTime()
      this.getList()
    },
    initTime() {
      var vm = this
      var now = new Date()
@ -81,6 +115,18 @@ Vue.component('follow-detail', {
        vm.years.push(i)
      }
    },
    resetArea() {
      if (this.level == 1) {
        delete this.form.area
        delete this.form.hospital
        delete this.form.team
      } else if (this.level == 2) {
        delete this.form.hospital
        delete this.form.team
      } else {
        delete this.form.team
      }
    },
    getList() {
      var vm = this
      this.loading = true
@ -90,16 +136,16 @@ Vue.component('follow-detail', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/gxbRehabilitationFollowup', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -113,63 +159,58 @@ Vue.component('follow-detail', {
    },
    exportTable() {
      var vm = this
      this.loading = true
      var params = {
        ...this.form,
        page: this.page,
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `患者情况${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
      var fileName = `康复随访详情${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbRehabilitationFollowup', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
    eliminateClick() {
      this.form = {}
      this.resetArea()
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      delete this.form.isSign
      delete this.form.name
      delete this.form.eventType
      this.$forceUpdate()
    },
    closeDialog() {
      this.dialogShow = false
    },
    previewRecord(row) {
    getHospital(code) {
      var vm = this
      this.dialogShow = true
      vm.dialogTable = []
      vm.settlementInfo = {}
      // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
      httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
        if (res.status == 200) {
          vm.dialogTable = res.data
          var pay = 0
          
          for(var item of res.data){
            pay += item.COST
          }
          vm.settlementInfo = {
            name: row.patientName,
            yibao: row.cardNo,
            pay: pay
          }
        }
      delete this.form.hospital
      delete this.form.team
      var params = {
        type: 5,
        code: code
      }
      httpRequest.post('common/district', { data: params }).then(function (res) {
        vm.hospitalOptions = res.list
      })
    },
    getDictData() {
    getTeam(code) {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
        vm.turnOverOptions = [{ value: '全部' }]
        vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
      delete this.form.team
      var params = {
        hospital: code
      }
      httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
        vm.teamOptions = res.data
      })
    },
    handleCurrentChange(val) {
@ -179,11 +220,16 @@ Vue.component('follow-detail', {
    handleSizeChange(val) {
      this.size = val
      this.getList()
    },
    openDialog(scope) {
      this.visible = true
    },
    closeDialog() {
      this.visible = false
    }
  },
  mounted() {
    this.initTime()
    this.getDictData()
    this.getList()
    this.init()
  }
})

+ 42 - 7
component/statistics/FollowRecord/index.html

@ -4,7 +4,7 @@
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按筛查年份:</el-radio>
        <el-radio v-model="yearType" label="1">按下转年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
@ -12,7 +12,7 @@
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义筛查时间:</el-radio>
        <el-radio v-model="yearType" label="2">下转时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"
@ -22,19 +22,46 @@
          value-format="yyyy-MM-dd"></el-date-picker>
      </label>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">签约状:</label>
      <el-radio v-model="form.isSign" label="1">是</el-radio>
      <el-radio v-model="form.isSign" label="0">否</el-radio>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">居民姓名:</label>
      <el-input v-model="form.name" placeholder="请输入居民姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">就诊类型:</label>
      <el-select v-model="form.eventType" clearable>
        <el-option label="门诊" value="1"></el-option>
        <el-option label="住院" value="2"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">数据范围:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.range" placeholder="请选择" @change="resetArea">
        <el-option v-for="(option, index) in rangeOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">地区:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.area" placeholder="请选择" @change="getHospital">
        <el-option v-for="(option, index) in areaOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'hospital'||form.range == 'team'">
      <label class="c-333 c-f14">社区:</label>
      <el-select class="formWidth" v-model="form.hospital" placeholder="请选择" @change="getTeam">
        <el-option v-for="(option, index) in hospitalOptions" :label="option.name" :value="option.code" :key="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'team'">
      <label class="c-333 c-f14">团队:</label>
      <el-select class="formWidth" v-model="form.team" placeholder="请选择">
        <el-option v-for="(option, index) in teamOptions" :label="option.name" :value="option.id" :key="option.id"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20">
      <el-button type="primary" size="mini" @click="queryDate">查询</el-button>
      <el-button type="ff9526" size="mini" @click="exportTable" :disabled="exportLoading">导出</el-button>
@ -46,6 +73,11 @@
    <el-table-column :label="item.label" v-for="item in tableHeader" :min-width="item.width" :key="item.prop">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
    </el-table-column>
    <el-table-column label="操作" align="center" width="130px">
      <template slot-scope="scope">
        <el-button type="text" @click="openDialog(scope)">查看筛查表单</el-button>
      </template>
    </el-table-column>
  </el-table>
  <el-pagination
    @current-change="handleCurrentChange"
@ -56,4 +88,7 @@
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
    class="pagination"></el-pagination>
    <el-dialog :visible="visible" title="查看随访结果" @close="closeDialog">
      
    </el-dialog>
</div>

+ 125 - 84
component/statistics/FollowRecord/index.js

@ -1,5 +1,5 @@
var template = ''
$.ajax('../../../component/statistics/JzSituation/index.html', {
$.ajax('../../../component/statistics/FollowRecord/index.html', {
  data: {},
  dataType: 'html',
  cache: false,
@ -20,57 +20,86 @@ Vue.component('follow-record', {
      yearType: '1',
      chooseYear: null,
      chooseTime: null,
      turnOverOptions: [],
      form: {},
      rangeOptions: [
        { label: '区', value: 'town' },
        { label: '医院', value: 'hospital' },
        { label: '团队', value: 'team' }
      ],
      areaOptions: [
        { label: '思明区', value: '350203' },
        { label: '海沧区', value: '350205' },
        { label: '湖里区', value: '350206' },
        { label: '集美区', value: '350211' },
        { label: '同安区', value: '350212' },
        { label: '翔安区', value: '350213' }
      ],
      hospitalOptions: [],
      teamOptions: [],
      form: {
        range: 'town'
      },
      loading: false,
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '住院号', prop: 'visitNo', width: '110' },
        { label: '病人姓名', prop: 'patientName', width: '90' },
        { label: '性别', prop: 'sex', width: '80' },
        { label: '手机号', prop: 'mobile', width: '130' },
        { label: '身份证号', prop: 'idcard', width: '170' },
        { label: '费别', prop: 'rateTypeName', width: '90' },
        { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
        { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
        { label: '病情', prop: 'sickStateName', width: '110' },
        { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
        { label: '建床日期', prop: 'buildingTime', width: '170' },
        { label: '建床天数', prop: 'budildDays', width: '90' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
        { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
        { label: '转归情况', prop: 'turnOver', width: '110' }
      ],
      dialogShow: false,
      settlementInfo: {
        name: '黄小蕾',
        yibao: 'dk',
        pay: '1049'
      },
      dialogTable: [],
      dialogHeader: [
        { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
        { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
        { label: '金额', prop: 'COST', width: '80' },
        { label: '自付', prop: 'CHARGE', width: '80' },
        { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
        { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
        { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
        { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
        { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
        { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
        { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
        { label: '结算号', prop: 'SETTLE_NO', width: '80' },
        { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
        { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
        { label: '居民', prop: 'name', width: '100' },
        { label: '年龄', prop: 'age', width: '90' },
        { label: '性别', prop: 'sex', width: '90' },
        { label: '手机号', prop: 'mobile', width: '110' },
        { label: '下转医院', prop: 'turnHospitalName', width: '130' },
        { label: '下转医生', prop: 'turnDoctorName', width: '90' },
        { label: '下转时间', prop: 'createTime', width: '140' },
        { label: '所属机构', prop: 'hospitalName', width: '130' },
        { label: '随访医生', prop: 'doctorName', width: '90' },
        { label: '计划随访时间', prop: 'followupPlanDate', width: '140' },
        { label: '实际随访时间', prop: 'followupDate', width: '140' },
      ],
      page: 1,
      size: 10,
      total: 0
      total: 0,
      level: 0,
      visible: false
    }
  },
  methods: {
    init() {
      var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
      if (selectedRole.code.indexOf('350200') > -1) {
        this.level = 1 //  市卫健委
        this.areaOptions = [
          { label: '思明区', value: '350203' },
          { label: '海沧区', value: '350205' },
          { label: '湖里区', value: '350206' },
          { label: '集美区', value: '350211' },
          { label: '同安区', value: '350212' },
          { label: '翔安区', value: '350213' }
        ]
      } else if (selectedRole.code.length == 6) {
        this.level = 2 // 区管理
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.form = {
          range: 'town',
          area: selectedRole.code
        }
        this.getHospital(selectedRole.code)
      } else {
        this.level = 3 // 社区管理
        this.rangeOptions = [
          { label: '医院', value: 'hospital' },
          { label: '团队', value: 'team' }
        ]
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.hospital = [{ label: selectedRole.name, value: selectedRole.code }]
        this.form = {
          range: 'hospital',
          area: selectedRole.code.substring(0, 6),
          hospital: selectedRole.code
        }
        this.getTeam(selectedRole.code)
      }
      this.initTime()
      this.getList()
    },
    initTime() {
      var vm = this
      var now = new Date()
@ -81,6 +110,18 @@ Vue.component('follow-record', {
        vm.years.push(i)
      }
    },
    resetArea() {
      if (this.level == 1) {
        delete this.form.area
        delete this.form.hospital
        delete this.form.team
      } else if (this.level == 2) {
        delete this.form.hospital
        delete this.form.team
      } else {
        delete this.form.team
      }
    },
    getList() {
      var vm = this
      this.loading = true
@ -90,16 +131,16 @@ Vue.component('follow-record', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/gxbRehabilitationFollowupRecord', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -113,63 +154,58 @@ Vue.component('follow-record', {
    },
    exportTable() {
      var vm = this
      this.loading = true
      var params = {
        ...this.form,
        page: this.page,
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `患者情况${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
      var fileName = `康复随访记录${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbRehabilitationFollowupRecord', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
    eliminateClick() {
      this.form = {}
      this.resetArea()
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      delete this.form.isSign
      delete this.form.name
      delete this.form.eventType
      this.$forceUpdate()
    },
    closeDialog() {
      this.dialogShow = false
    },
    previewRecord(row) {
    getHospital(code) {
      var vm = this
      this.dialogShow = true
      vm.dialogTable = []
      vm.settlementInfo = {}
      // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
      httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
        if (res.status == 200) {
          vm.dialogTable = res.data
          var pay = 0
          
          for(var item of res.data){
            pay += item.COST
          }
          vm.settlementInfo = {
            name: row.patientName,
            yibao: row.cardNo,
            pay: pay
          }
        }
      delete this.form.hospital
      delete this.form.team
      var params = {
        type: 5,
        code: code
      }
      httpRequest.post('common/district', { data: params }).then(function (res) {
        vm.hospitalOptions = res.list
      })
    },
    getDictData() {
    getTeam(code) {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
        vm.turnOverOptions = [{ value: '全部' }]
        vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
      delete this.form.team
      var params = {
        hospital: code
      }
      httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
        vm.teamOptions = res.data
      })
    },
    handleCurrentChange(val) {
@ -179,11 +215,16 @@ Vue.component('follow-record', {
    handleSizeChange(val) {
      this.size = val
      this.getList()
    },
    openDialog(scope) {
      this.visible = true
    },
    closeDialog() {
      this.visible = false
    }
  },
  mounted() {
    this.initTime()
    this.getDictData()
    this.getList()
    this.init()
  }
})

+ 7 - 2
component/statistics/GxbCy/index.html

@ -52,11 +52,16 @@
      <span class="eliminate" @click="eliminateClick">清除筛选条件</span>
    </div>
  </div>
  <el-table :data="tableData" style="width: 100%" v-loading="loading">
  <el-table :data="tableData" style="width: 100%">
    <el-table-column type="index" min-width="60" label="序号"></el-table-column>
    <el-table-column :label="item.label" v-for="item in tableHeader" :min-width="item.width" :key="item.prop">
    <el-table-column :label="item.label" v-for="(item,index) in tableHeader" :min-width="item.width" :key="item.prop">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
    </el-table-column>
    <el-table-column :label="item.label" v-for="(item,index) in tableHeaderChildren" :key="index" align="center"> 
      <el-table-column :label="el.label" :min-width="el.width" v-for="el in item.children" :key="el.prop">
        <template slot-scope="scope">{{scope.row[el.prop]}}</template>
      </el-table-column>
    </el-table-column>
  </el-table>
  <el-pagination
    @current-change="handleCurrentChange"

+ 83 - 19
component/statistics/GxbCy/index.js

@ -1,5 +1,5 @@
var template = ''
$.ajax('../../../component/statistics/GxbMz/index.html', {
$.ajax('../../../component/statistics/GxbCy/index.html', {
  data: {},
  dataType: 'html',
  cache: false,
@ -11,7 +11,7 @@ $.ajax('../../../component/statistics/GxbMz/index.html', {
  }
})
Vue.component('gxb-mz', {
Vue.component('gxb-cy', {
  template: template,
  props: [],
  data: function () {
@ -42,13 +42,75 @@ Vue.component('gxb-mz', {
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '名称', prop: 'name', width: '110' },
        { label: '已下转次数', prop: 'totalTimes', width: '90' },
        { label: '门诊下转次数', prop: 'mzTimes', width: '90' },
        { label: '已下转人数', prop: 'totalNum ', width: '110' },
        { label: '门诊下转人数', prop: 'mzNum', width: '110' },
        { label: '门诊下转已评估', prop: 'screenNum', width: '110' },
        { label: '门诊下转未评估', prop: 'unScreenNum', width: '110' },
        { label: '名称', prop: 'name', width: '100' },
        { label: '已下转次数', prop: 'totalTimes', width: '100' },
        { label: '出院下转次数', prop: 'zyTimes', width: '110' },
        { label: '已下转人数', prop: 'totalNum', width: '100' },
        { label: '出院下转人数', prop: 'zyNum', width: '110' },
        { label: '出院下转已评估', prop: 'screenNum', width: '120' },
        { label: '出院下转未评估', prop: 'unScreenNum', width: '120' }
      ],
      tableHeaderChildren: [
        {
          label: '随访1',
          children: [
            {
              label: '已登记人数',
              prop: 'v1Num',
              width: '100'
            },
            {
              label: '已达标人数',
              prop: 'vd1Num',
              width: '100'
            },
            {
              label: '达标率',
              prop: 'v1Rate',
              width: '100'
            }
          ]
        },
        {
          label: '随访2',
          children: [
            {
              label: '已登记人数',
              prop: 'v2Num',
              width: '100'
            },
            {
              label: '已达标人数',
              prop: 'vd2Num',
              width: '100'
            },
            {
              label: '达标率',
              prop: 'v2Rate',
              width: '100'
            }
          ]
        },
        {
          label: '随访3',
          children: [
            {
              label: '已登记人数',
              prop: 'v3Num',
              width: '100'
            },
            {
              label: '已达标人数',
              prop: 'vd3Num',
              width: '100'
            },
            {
              label: '达标率',
              prop: 'v3Rate',
              width: '100'
            }
          ]
        }
      ],
      page: 1,
      size: 10,
@ -126,16 +188,16 @@ Vue.component('gxb-mz', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/collaborate/gxbMzTurnDownInfo', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/gxbZyTurnDownInfo', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -155,16 +217,16 @@ Vue.component('gxb-mz', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `冠心病门诊下转统计表${new Date().getTime()}.xls`
      var fileName = `冠心病出院下转统计表${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbMzTurnDownInfo', fileName, params).then(function () {
        vm.exportLoading = false
      })
@ -174,6 +236,8 @@ Vue.component('gxb-mz', {
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
      
    },
    getHospital(code) {
      var vm = this

+ 14 - 10
component/statistics/GxbEvaluation/index.js

@ -44,7 +44,7 @@ Vue.component('gxb-evaluation', {
      tableHeader: [
        { label: '名称', prop: 'name', width: '110' },
        { label: '评估人数', prop: 'totalNum', width: '90' },
        { label: '日常评估人数', prop: 'dailyNum ', width: '110' },
        { label: '日常评估人数', prop: 'dailyNum', width: '110' },
        { label: '住院补筛人数', prop: 'inScreenNum', width: '110' },
        { label: '低危人数', prop: 'lRiskNum', width: '110' },
        { label: '中危人数', prop: 'mRiskNum', width: '110' },
@ -136,18 +136,20 @@ Vue.component('gxb-evaluation', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/collaborate/gxbScreenInfoStatistics', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          console.log(vm.tableData,"tableData");
          
          vm.total = res.totalCount
        }
        vm.loading = false
@ -165,16 +167,16 @@ Vue.component('gxb-evaluation', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `冠心病筛查情况统计表${new Date().getTime()}.xls`
      var fileName = `冠心病评估情况统计表${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbScreenInfoStatistics', fileName, params).then(function () {
        vm.exportLoading = false
      })
@ -184,6 +186,8 @@ Vue.component('gxb-evaluation', {
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
      
    },
    getHospital(code) {
      var vm = this

+ 7 - 6
component/statistics/GxbManage/index.js

@ -42,10 +42,10 @@ Vue.component('gxb-manage', {
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '名称', prop: 'name', width: '110' },
        { label: '名称', prop: 'name', width: '100' },
        { label: '已评估人数', prop: 'totalNum', width: '90' },
        { label: '已上转人数', prop: 'turnUpNum', width: '90' },
        { label: '上转转门诊', prop: 'mzNum ', width: '110' },
        { label: '上转转门诊', prop: 'mzNum', width: '110' },
        { label: '门诊转住院', prop: 'zyNum', width: '110' },
        { label: '下转管理人数', prop: 'turnDownNum', width: '110' },
        { label: '评估已登记随访', prop: 'followUpNum', width: '110' },
@ -156,12 +156,12 @@ Vue.component('gxb-manage', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
@ -175,6 +175,7 @@ Vue.component('gxb-manage', {
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
    },
    getHospital(code) {
      var vm = this

+ 11 - 9
component/statistics/GxbMz/index.js

@ -45,7 +45,7 @@ Vue.component('gxb-mz', {
        { label: '名称', prop: 'name', width: '110' },
        { label: '已下转次数', prop: 'totalTimes', width: '90' },
        { label: '门诊下转次数', prop: 'mzTimes', width: '90' },
        { label: '已下转人数', prop: 'totalNum ', width: '110' },
        { label: '已下转人数', prop: 'totalNum', width: '110' },
        { label: '门诊下转人数', prop: 'mzNum', width: '110' },
        { label: '门诊下转已评估', prop: 'screenNum', width: '110' },
        { label: '门诊下转未评估', prop: 'unScreenNum', width: '110' },
@ -126,12 +126,12 @@ Vue.component('gxb-mz', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
@ -155,12 +155,12 @@ Vue.component('gxb-mz', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
@ -174,6 +174,8 @@ Vue.component('gxb-mz', {
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
      
    },
    getHospital(code) {
      var vm = this

+ 10 - 1
component/statistics/GxbTurnup/index.html

@ -55,7 +55,16 @@
  <el-table :data="tableData" style="width: 100%" v-loading="loading">
    <el-table-column type="index" min-width="60" label="序号"></el-table-column>
    <el-table-column :label="item.label" v-for="item in tableHeader" :min-width="item.width" :key="item.prop">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
      <template slot-scope="scope">
        <span>{{scope.row[item.prop]}}</span>
      </template>
      <template slot="header" slot-scope="scope">
        <!-- {{scope.column}} -->
         123465
        <el-tooltip effect="dark" :content="item.tooltip" placement="top">
          <i class="el-icon-question" v-if="item.tooltip"></i>
        </el-tooltip>
      </template>
    </el-table-column>
  </el-table>
  <el-pagination

+ 12 - 10
component/statistics/GxbTurnup/index.js

@ -44,9 +44,9 @@ Vue.component('gxb-turnup', {
      tableHeader: [
        { label: '名称', prop: 'name', width: '110' },
        { label: '已上转人次', prop: 'turnUpTimes', width: '110' },
        { label: '上转转门诊', prop: 'mzTimes ', width: '110' },
        { label: '上转转门诊', prop: 'mzTimes', width: '110', tooltip: '统计已上转的人次中,前往医院进行就诊的人次' },
        { label: '上转转门诊转化率', prop: 'mzRate', width: '130' },
        { label: '门诊转住院', prop: 'zyTimes', width: '110' },
        { label: '门诊转住院', prop: 'zyTimes', width: '110', tooltip: '统计已就诊的人次中,在医院办理住院的人次' },
        { label: '门诊转住院转化率', prop: 'zyRate', width: '130' },
      ],
      page: 1,
@ -125,12 +125,12 @@ Vue.component('gxb-turnup', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
@ -154,12 +154,12 @@ Vue.component('gxb-turnup', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
@ -173,6 +173,8 @@ Vue.component('gxb-turnup', {
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
      
    },
    getHospital(code) {
      var vm = this

+ 18 - 7
component/statistics/JzSituation/index.html

@ -4,7 +4,7 @@
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按筛查年份:</el-radio>
        <el-radio v-model="yearType" label="1">按签约年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
@ -12,7 +12,7 @@
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义筛查时间:</el-radio>
        <el-radio v-model="yearType" label="2">创建时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"
@ -24,17 +24,28 @@
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">数据范围:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.range" placeholder="请选择" @change="resetArea">
        <el-option v-for="(option, index) in rangeOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">地区:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.area" placeholder="请选择" @change="getHospital">
        <el-option v-for="(option, index) in areaOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'hospital'||form.range == 'team'">
      <label class="c-333 c-f14">社区:</label>
      <el-select class="formWidth" v-model="form.hospital" placeholder="请选择" @change="getTeam">
        <el-option v-for="(option, index) in hospitalOptions" :label="option.name" :value="option.code" :key="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'team'">
      <label class="c-333 c-f14">团队:</label>
      <el-select class="formWidth" v-model="form.team" placeholder="请选择">
        <el-option v-for="(option, index) in teamOptions" :label="option.name" :value="option.id" :key="option.id"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20">
      <el-button type="primary" size="mini" @click="queryDate">查询</el-button>
      <el-button type="ff9526" size="mini" @click="exportTable" :disabled="exportLoading">导出</el-button>

+ 112 - 81
component/statistics/JzSituation/index.js

@ -11,7 +11,7 @@ $.ajax('../../../component/statistics/JzSituation/index.html', {
  }
})
Vue.component('jz-situation', {
Vue.component('zj-situation', {
  template: template,
  props: [],
  data: function () {
@ -20,57 +20,87 @@ Vue.component('jz-situation', {
      yearType: '1',
      chooseYear: null,
      chooseTime: null,
      turnOverOptions: [],
      form: {},
      rangeOptions: [
        { label: '区', value: 'town' },
        { label: '医院', value: 'hospital' },
        { label: '团队', value: 'team' }
      ],
      areaOptions: [
        { label: '思明区', value: '350203' },
        { label: '海沧区', value: '350205' },
        { label: '湖里区', value: '350206' },
        { label: '集美区', value: '350211' },
        { label: '同安区', value: '350212' },
        { label: '翔安区', value: '350213' }
      ],
      hospitalOptions: [],
      teamOptions: [],
      form: {
        range: 'town'
      },
      loading: false,
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '住院号', prop: 'visitNo', width: '110' },
        { label: '病人姓名', prop: 'patientName', width: '90' },
        { label: '性别', prop: 'sex', width: '80' },
        { label: '手机号', prop: 'mobile', width: '130' },
        { label: '身份证号', prop: 'idcard', width: '170' },
        { label: '费别', prop: 'rateTypeName', width: '90' },
        { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
        { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
        { label: '病情', prop: 'sickStateName', width: '110' },
        { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
        { label: '建床日期', prop: 'buildingTime', width: '170' },
        { label: '建床天数', prop: 'budildDays', width: '90' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
        { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
        { label: '转归情况', prop: 'turnOver', width: '110' }
      ],
      dialogShow: false,
      settlementInfo: {
        name: '黄小蕾',
        yibao: 'dk',
        pay: '1049'
      },
      dialogTable: [],
      dialogHeader: [
        { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
        { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
        { label: '金额', prop: 'COST', width: '80' },
        { label: '自付', prop: 'CHARGE', width: '80' },
        { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
        { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
        { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
        { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
        { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
        { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
        { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
        { label: '结算号', prop: 'SETTLE_NO', width: '80' },
        { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
        { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
        { label: '居民', prop: 'name', width: '110' },
        { label: '就诊卡', prop: 'totalTimes', width: '90' },
        { label: '身份证', prop: '1', width: '90' },
        { label: '手机号', prop: '2 ', width: '110' },
        { label: '地址', prop: '3', width: '110' },
        { label: '是否签约', prop: '4', width: '110' },
        { label: '社区名称', prop: '5', width: '110' },
        { label: '就诊医院', prop: '6', width: '110' },
        { label: '就诊时间', prop: '6', width: '110' },
        { label: '就诊科室', prop: '6', width: '110' },
        { label: '诊断结果', prop: '6', width: '110' },
        { label: '诊断类型', prop: '6', width: '110' },
        { label: '费用总和', prop: '6', width: '110' },
      ],
      page: 1,
      size: 10,
      total: 0
      total: 0,
      level: 0
    }
  },
  methods: {
    init() {
      var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
      if (selectedRole.code.indexOf('350200') > -1) {
        this.level = 1 //  市卫健委
        this.areaOptions = [
          { label: '思明区', value: '350203' },
          { label: '海沧区', value: '350205' },
          { label: '湖里区', value: '350206' },
          { label: '集美区', value: '350211' },
          { label: '同安区', value: '350212' },
          { label: '翔安区', value: '350213' }
        ]
      } else if (selectedRole.code.length == 6) {
        this.level = 2 // 区管理
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.form = {
          range: 'town',
          area: selectedRole.code
        }
        this.getHospital(selectedRole.code)
      } else {
        this.level = 3 // 社区管理
        this.rangeOptions = [
          { label: '医院', value: 'hospital' },
          { label: '团队', value: 'team' }
        ]
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.hospital = [{ label: selectedRole.name, value: selectedRole.code }]
        this.form = {
          range: 'hospital',
          area: selectedRole.code.substring(0, 6),
          hospital: selectedRole.code
        }
        this.getTeam(selectedRole.code)
      }
      this.initTime()
      this.getList()
    },
    initTime() {
      var vm = this
      var now = new Date()
@ -81,6 +111,18 @@ Vue.component('jz-situation', {
        vm.years.push(i)
      }
    },
    resetArea() {
      if (this.level == 1) {
        delete this.form.area
        delete this.form.hospital
        delete this.form.team
      } else if (this.level == 2) {
        delete this.form.hospital
        delete this.form.team
      } else {
        delete this.form.team
      }
    },
    getList() {
      var vm = this
      this.loading = true
@ -90,16 +132,16 @@ Vue.component('jz-situation', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/signInfoStatistics', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -113,7 +155,6 @@ Vue.component('jz-situation', {
    },
    exportTable() {
      var vm = this
      this.loading = true
      var params = {
        ...this.form,
        page: this.page,
@ -125,51 +166,43 @@ Vue.component('jz-situation', {
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.endDate = this.chooseTime[1] + ' 23:59'
        }
      }
      this.exportLoading = true
      var fileName = `患者情况${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
      var fileName = `冠心病门诊下转统计表${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportSignInfoStatistics', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
    eliminateClick() {
      this.form = {}
      this.resetArea()
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
    },
    closeDialog() {
      this.dialogShow = false
    },
    previewRecord(row) {
    getHospital(code) {
      var vm = this
      this.dialogShow = true
      vm.dialogTable = []
      vm.settlementInfo = {}
      // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
      httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
        if (res.status == 200) {
          vm.dialogTable = res.data
          var pay = 0
          
          for(var item of res.data){
            pay += item.COST
          }
          vm.settlementInfo = {
            name: row.patientName,
            yibao: row.cardNo,
            pay: pay
          }
        }
      delete this.form.hospital
      delete this.form.team
      var params = {
        type: 5,
        code: code
      }
      httpRequest.post('common/district', { data: params }).then(function (res) {
        vm.hospitalOptions = res.list
      })
    },
    getDictData() {
    getTeam(code) {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
        vm.turnOverOptions = [{ value: '全部' }]
        vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
      delete this.form.team
      var params = {
        hospital: code
      }
      httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
        vm.teamOptions = res.data
      })
    },
    handleCurrentChange(val) {
@ -182,8 +215,6 @@ Vue.component('jz-situation', {
    }
  },
  mounted() {
    this.initTime()
    this.getDictData()
    this.getList()
    this.init()
  }
})

+ 2 - 2
component/statistics/SignSituation/index.html

@ -4,7 +4,7 @@
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按下转年份:</el-radio>
        <el-radio v-model="yearType" label="1">按签约年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
@ -12,7 +12,7 @@
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义下转时间:</el-radio>
        <el-radio v-model="yearType" label="2">创建时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"

+ 19 - 17
component/statistics/SignSituation/index.js

@ -43,12 +43,13 @@ Vue.component('sign-situation', {
      tableData: [],
      tableHeader: [
        { label: '名称', prop: 'name', width: '110' },
        { label: '已下转次数', prop: 'totalTimes', width: '90' },
        { label: '门诊下转次数', prop: 'mzTimes', width: '90' },
        { label: '已下转人数', prop: 'totalNum ', width: '110' },
        { label: '门诊下转人数', prop: 'mzNum', width: '110' },
        { label: '门诊下转已评估', prop: 'screenNum', width: '110' },
        { label: '门诊下转未评估', prop: 'unScreenNum', width: '110' },
        { label: '签约数', prop: 'total', width: '90' },
        { label: '0~6岁人群', prop: '1', width: '90' },
        { label: '7~18岁人群', prop: '2', width: '110' },
        { label: '19~30岁人数', prop: '3', width: '110' },
        { label: '31~50岁人群', prop: '4', width: '110' },
        { label: '51~64岁人群', prop: '5', width: '110' },
        { label: '65岁以上', prop: '6', width: '110' },
      ],
      page: 1,
      size: 10,
@ -126,16 +127,16 @@ Vue.component('sign-situation', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/collaborate/gxbMzTurnDownInfo', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/signInfoStatistics', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -155,17 +156,17 @@ Vue.component('sign-situation', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1] + ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `冠心病门诊下转统计表${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbMzTurnDownInfo', fileName, params).then(function () {
      var fileName = `签约情况统计${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportSignInfoStatistics', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
@ -174,6 +175,7 @@ Vue.component('sign-situation', {
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      this.$forceUpdate()
    },
    getHospital(code) {
      var vm = this

+ 42 - 7
component/statistics/TurndownAnalysis/index.html

@ -4,7 +4,7 @@
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按筛查年份:</el-radio>
        <el-radio v-model="yearType" label="1">按下转年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
@ -12,7 +12,7 @@
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义筛查时间:</el-radio>
        <el-radio v-model="yearType" label="2">下转时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"
@ -22,19 +22,46 @@
          value-format="yyyy-MM-dd"></el-date-picker>
      </label>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">签约状:</label>
      <el-radio v-model="form.isSign" label="1">是</el-radio>
      <el-radio v-model="form.isSign" label="0">否</el-radio>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">居民姓名:</label>
      <el-input v-model="form.name" placeholder="请输入居民姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">就诊类型:</label>
      <el-select v-model="form.eventType" clearable>
        <el-option label="门诊" value="1"></el-option>
        <el-option label="住院" value="2"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">数据范围:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.range" placeholder="请选择" @change="resetArea">
        <el-option v-for="(option, index) in rangeOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">地区:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.area" placeholder="请选择" @change="getHospital">
        <el-option v-for="(option, index) in areaOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'hospital'||form.range == 'team'">
      <label class="c-333 c-f14">社区:</label>
      <el-select class="formWidth" v-model="form.hospital" placeholder="请选择" @change="getTeam">
        <el-option v-for="(option, index) in hospitalOptions" :label="option.name" :value="option.code" :key="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'team'">
      <label class="c-333 c-f14">团队:</label>
      <el-select class="formWidth" v-model="form.team" placeholder="请选择">
        <el-option v-for="(option, index) in teamOptions" :label="option.name" :value="option.id" :key="option.id"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20">
      <el-button type="primary" size="mini" @click="queryDate">查询</el-button>
      <el-button type="ff9526" size="mini" @click="exportTable" :disabled="exportLoading">导出</el-button>
@ -46,6 +73,11 @@
    <el-table-column :label="item.label" v-for="item in tableHeader" :min-width="item.width" :key="item.prop">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
    </el-table-column>
    <el-table-column label="操作" align="center" width="130px">
      <template slot-scope="scope">
        <el-button type="text" @click="openDialog(scope)">查看筛查表单</el-button>
      </template>
    </el-table-column>
  </el-table>
  <el-pagination
    @current-change="handleCurrentChange"
@ -56,4 +88,7 @@
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
    class="pagination"></el-pagination>
    <el-dialog :visible="visible" title="查看筛选结果" @close="closeDialog">
      
    </el-dialog>
</div>

+ 125 - 83
component/statistics/TurndownAnalysis/index.js

@ -20,57 +20,87 @@ Vue.component('turndown-analysis', {
      yearType: '1',
      chooseYear: null,
      chooseTime: null,
      turnOverOptions: [],
      form: {},
      rangeOptions: [
        { label: '区', value: 'town' },
        { label: '医院', value: 'hospital' },
        { label: '团队', value: 'team' }
      ],
      areaOptions: [
        { label: '思明区', value: '350203' },
        { label: '海沧区', value: '350205' },
        { label: '湖里区', value: '350206' },
        { label: '集美区', value: '350211' },
        { label: '同安区', value: '350212' },
        { label: '翔安区', value: '350213' }
      ],
      hospitalOptions: [],
      teamOptions: [],
      form: {
        range: 'town'
      },
      loading: false,
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '住院号', prop: 'visitNo', width: '110' },
        { label: '病人姓名', prop: 'patientName', width: '90' },
        { label: '性别', prop: 'sex', width: '80' },
        { label: '手机号', prop: 'mobile', width: '130' },
        { label: '身份证号', prop: 'idcard', width: '170' },
        { label: '费别', prop: 'rateTypeName', width: '90' },
        { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
        { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
        { label: '病情', prop: 'sickStateName', width: '110' },
        { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
        { label: '建床日期', prop: 'buildingTime', width: '170' },
        { label: '建床天数', prop: 'budildDays', width: '90' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
        { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
        { label: '转归情况', prop: 'turnOver', width: '110' }
      ],
      dialogShow: false,
      settlementInfo: {
        name: '黄小蕾',
        yibao: 'dk',
        pay: '1049'
      },
      dialogTable: [],
      dialogHeader: [
        { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
        { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
        { label: '金额', prop: 'COST', width: '80' },
        { label: '自付', prop: 'CHARGE', width: '80' },
        { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
        { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
        { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
        { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
        { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
        { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
        { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
        { label: '结算号', prop: 'SETTLE_NO', width: '80' },
        { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
        { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
        { label: '居民', prop: 'name', width: '100' },
        { label: '年龄', prop: 'age', width: '90' },
        { label: '性别', prop: 'sex', width: '90' },
        { label: '手机号', prop: 'mobile', width: '110' },
        { label: '是否签约', prop: 'isSign', width: '110' },
        { label: '社区名称', prop: 'hospitalName', width: '130' },
        { label: '下转次数', prop: 'num', width: '100' },
        { label: '最近一次下转诊断', prop: 'diagnosisName', width: '130' },
        { label: '最近一次下转时间', prop: 'turnDownTime', width: '130' },
        { label: '最近一次下转类型', prop: 'eventType', width: '130' },
        { label: '风险评估次数', prop: 'screenNum', width: '110' },
        { label: '最近一次评估结果', prop: 'screenResult', width: '130' }
      ],
      page: 1,
      size: 10,
      total: 0
      total: 0,
      level: 0,
      visible: false
    }
  },
  methods: {
    init() {
      var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
      if (selectedRole.code.indexOf('350200') > -1) {
        this.level = 1 //  市卫健委
        this.areaOptions = [
          { label: '思明区', value: '350203' },
          { label: '海沧区', value: '350205' },
          { label: '湖里区', value: '350206' },
          { label: '集美区', value: '350211' },
          { label: '同安区', value: '350212' },
          { label: '翔安区', value: '350213' }
        ]
      } else if (selectedRole.code.length == 6) {
        this.level = 2 // 区管理
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.form = {
          range: 'town',
          area: selectedRole.code
        }
        this.getHospital(selectedRole.code)
      } else {
        this.level = 3 // 社区管理
        this.rangeOptions = [
          { label: '医院', value: 'hospital' },
          { label: '团队', value: 'team' }
        ]
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.hospital = [{ label: selectedRole.name, value: selectedRole.code }]
        this.form = {
          range: 'hospital',
          area: selectedRole.code.substring(0, 6),
          hospital: selectedRole.code
        }
        this.getTeam(selectedRole.code)
      }
      this.initTime()
      this.getList()
    },
    initTime() {
      var vm = this
      var now = new Date()
@ -81,6 +111,18 @@ Vue.component('turndown-analysis', {
        vm.years.push(i)
      }
    },
    resetArea() {
      if (this.level == 1) {
        delete this.form.area
        delete this.form.hospital
        delete this.form.team
      } else if (this.level == 2) {
        delete this.form.hospital
        delete this.form.team
      } else {
        delete this.form.team
      }
    },
    getList() {
      var vm = this
      this.loading = true
@ -90,16 +132,16 @@ Vue.component('turndown-analysis', {
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/turnDownAnalysis', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -113,63 +155,58 @@ Vue.component('turndown-analysis', {
    },
    exportTable() {
      var vm = this
      this.loading = true
      var params = {
        ...this.form,
        page: this.page,
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `患者情况${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
      var fileName = `下转动态分析${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportTurnDownAnalysis', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
    eliminateClick() {
      this.form = {}
      this.resetArea()
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
      delete this.form.isSign
      delete this.form.name
      delete this.form.eventType
      this.$forceUpdate()
    },
    closeDialog() {
      this.dialogShow = false
    },
    previewRecord(row) {
    getHospital(code) {
      var vm = this
      this.dialogShow = true
      vm.dialogTable = []
      vm.settlementInfo = {}
      // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
      httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
        if (res.status == 200) {
          vm.dialogTable = res.data
          var pay = 0
          
          for(var item of res.data){
            pay += item.COST
          }
          vm.settlementInfo = {
            name: row.patientName,
            yibao: row.cardNo,
            pay: pay
          }
        }
      delete this.form.hospital
      delete this.form.team
      var params = {
        type: 5,
        code: code
      }
      httpRequest.post('common/district', { data: params }).then(function (res) {
        vm.hospitalOptions = res.list
      })
    },
    getDictData() {
    getTeam(code) {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
        vm.turnOverOptions = [{ value: '全部' }]
        vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
      delete this.form.team
      var params = {
        hospital: code
      }
      httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
        vm.teamOptions = res.data
      })
    },
    handleCurrentChange(val) {
@ -179,11 +216,16 @@ Vue.component('turndown-analysis', {
    handleSizeChange(val) {
      this.size = val
      this.getList()
    },
    openDialog(scope) {
      this.visible = true
    },
    closeDialog() {
      this.visible = false
    }
  },
  mounted() {
    this.initTime()
    this.getDictData()
    this.getList()
    this.init()
  }
})

+ 129 - 28
component/statistics/TurndownDetail/index.html

@ -3,50 +3,141 @@
<div id="app" class="jtbc">
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按筛查年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
      </label>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义筛查时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          value-format="yyyy-MM-dd"></el-date-picker>
      </label>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">数据范围:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <label class="c-333 c-f14">下转时间:</label>
      <el-date-picker v-model="chooseTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"></el-date-picker>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">患者姓名:</label>
      <el-input v-model="form.patientName" placeholder="请输入患者姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">下转状态:</label>
      <el-select class="formWidth" v-model="form.status" placeholder="请选择" filterable>
        <el-option v-for="(option, index) in statusOptions" :label="option.value" :value="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">地区:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <label class="c-333 c-f14">下转医院:</label>
      <el-select class="formWidth" v-model="form.hospitalCode" placeholder="请选择" filterable>
        <el-option v-for="(option, index) in rehabilitationHospital" :label="option.value" :value="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">下转医生:</label>
      <el-input v-model="form.hospitalDoctor" placeholder="请输入医生姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">接收社区医院:</label>
      <el-select v-model="form.orgCode" placeholder="请选择" filterable>
        <el-option v-for="(item,index) in communityHospitals" :key="item.value" :value="item.value" :label="item.label"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">接收医生:</label>
      <el-input v-model="form.doctor" placeholder="请输入医生姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">档案状态:</label>
      <el-select v-model="form.archiveStatus" class="" placeholder="请选择" filterable>
        <el-option v-for="(item,index) in archiveList" :key="item.value" :value="item.code" :label="item.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">患者类型:</label>
      <el-select v-model="form.patientType" placeholder="请选择" filterable>
        <el-option v-for="(item,index) in inviteStatus" :key="item.value" :value="item.value" :label="item.label"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20">
      <el-button type="primary" size="mini" @click="queryDate">查询</el-button>
      <el-button type="ff9526" size="mini" @click="exportTable" :disabled="exportLoading">导出</el-button>
      <span class="eliminate" @click="eliminateClick">清除筛选条件</span>
    </div>
  </div>
  <!-- <div v-if="handleNodeId==44" class="searchDiv">
    <div class="mt5">
      <el-form :model="form11" class="flex handleNodeId-44">
        <el-form-item label="患者姓名:" class="flex">
          <el-input v-model="form11.patientName" placeholder="请输入患者姓名查询"></el-input>
        </el-form-item>
        <el-form-item label="下转状态:" class="flex formLeft">
          <el-select v-model="form11.status" class="" placeholder="请选择" filterable>
            <el-option v-for="(item,index) in deorsumvergence" :key="item.value" :value="item.value" :label="item.label"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="下转医院:" class="flex formLeft">
          <el-select v-model="form11.hospitalCode" class="" placeholder="请选择" filterable>
            <el-option v-for="(item,index) in rehabilitationHospital" :key="item.value" :value="item.value" :label="item.label"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="下转医生:" class="flex formLeft">
          <el-input v-model="form11.hospitalDoctor" placeholder="请输入医生姓名查询"></el-input>
        </el-form-item>
        <el-form-item label="接收社区医院:" class="flex formLeft">
          <el-select v-model="form11.orgCode" class="" placeholder="请选择" filterable>
            <el-option v-for="(item,index) in communityHospitals" :key="item.value" :value="item.value" :label="item.label"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="接收医生:" class="flex formLeft">
          <el-input v-model="form11.doctor" placeholder="请输入接收医生姓名查询"></el-input>
        </el-form-item>
        <el-form-item label="档案状态:" class="flex formLeft">
          <el-select v-model="form11.archiveStatus" class="" placeholder="请选择" filterable>
            <el-option v-for="(item,index) in archiveList" :key="item.value" :value="item.value" :label="item.label"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="患者类型:" class="flex formLeft">
          <el-select v-model="form11.patientType" class="" placeholder="请选择" filterable>
            <el-option v-for="(item,index) in inviteStatus1" :key="item.value" :value="item.value" :label="item.label"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  </div> -->
  <el-table :data="tableData" style="width: 100%" v-loading="loading">
    <el-table-column type="index" min-width="60" label="序号"></el-table-column>
    <el-table-column :label="item.label" v-for="item in tableHeader" :min-width="item.width" :key="item.prop">
    <el-table-column :label="item.label" v-for="item in tableHeader" :key="item.prop" align="center">
      <template slot-scope="scope">{{scope.row[item.prop]}}</template>
    </el-table-column>
    <el-table-column label="操作" align="center" width="100">
      <template slot-scope="scope">
        <div class="operate">
          <div v-if="scope.row.status==0" @click="operation(1,scope.row)">分配</div>
          <div @click="operation(2,scope.row)">查看签约</div>
          <div v-if="scope.row.status==5" @click="operation(3,scope.row)">同步居民</div>
          <div v-if="scope.row.status==3" @click="operation(4,scope.row)">同步病历</div>
        </div>
      </template>
    </el-table-column>
  </el-table>
  <!-- <el-table v-if="handleNodeId==44" border :key="tableKey" :data="recoveryList" style="width: 100%" v-loading="loadingTwo" class="mt20">
    <template>
      <el-table-column type="index" label="序号" align="center"></el-table-column>
      <el-table-column prop="name" label="患者姓名" align="center"></el-table-column>
      <el-table-column prop="age" label="年龄" align="center"></el-table-column>
      <el-table-column prop="sex" label="性别" align="center"></el-table-column>
      <el-table-column prop="mobile" label="患者手机号" align="center"></el-table-column>
      <el-table-column prop="hospitalName" label="下转医院" align="center"></el-table-column>
      <el-table-column prop="hospitalDoctor" label="下转医生" align="center"></el-table-column>
      <el-table-column prop="createTime" label="下转时间" align="center"></el-table-column>
      <el-table-column prop="patientType" label="患者类型" align="center"></el-table-column>
      <el-table-column prop="statusName" label="下转状态" align="center"></el-table-column>
      <el-table-column prop="orgName" label="接收社区医院" align="center"></el-table-column>
      <el-table-column prop="doctorName" label="接收签约医生" align="center"></el-table-column>
      <el-table-column prop="receiveTime" label="接收时间" align="center"></el-table-column>
      <el-table-column prop="archiveStatusName" label="档案状态" align="center"></el-table-column>
      <el-table-column prop="img" label="操作" align="center" width="100">
        <template slot-scope="scope">
          <div class="operate">
            <div v-if="scope.row.status==0" @click="operation(1,scope.row)">分配</div>
            <div @click="operation(2,scope.row)">查看签约</div>
            <div v-if="scope.row.status==5" @click="operation(3,scope.row)">同步居民</div>
            <div v-if="scope.row.status==3" @click="operation(4,scope.row)">同步病历</div>
          </div>
        </template>
      </el-table-column>
    </template>
  </el-table> -->
  <el-pagination
    @current-change="handleCurrentChange"
    @size-change="handleSizeChange"
@ -56,4 +147,14 @@
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
    class="pagination"></el-pagination>
  <el-dialog title="查看签约信息" :visible.sync="dialogVisible" width="70%">
    <el-table border :data="signatoryList" style="width: 100%" height="500" class="mt20">
      <template>
        <el-table-column prop="hospitalName" label="签约社区医院" align="center"></el-table-column>
        <el-table-column prop="doctorName" label="签约医生" align="center"></el-table-column>
        <el-table-column prop="applyDate" label="签约时间" align="center"></el-table-column>
        <el-table-column prop="signYear" label="签约年度" align="center"></el-table-column>
      </template>
    </el-table>
  </el-dialog>
</div>

+ 121 - 100
component/statistics/TurndownDetail/index.js

@ -16,70 +16,55 @@ Vue.component('turndown-detail', {
  props: [],
  data: function () {
    return {
      years: [],
      yearType: '1',
      chooseYear: null,
      chooseTime: null,
      turnOverOptions: [],
      form: {},
      statusOptions: [],
      form: {
        status: '',
        hospitalCode: '',
        orgCode: '',
        archiveStatus: '',
        patientType: ''
      },
      loading: false,
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '住院号', prop: 'visitNo', width: '110' },
        { label: '病人姓名', prop: 'patientName', width: '90' },
        { label: '性别', prop: 'sex', width: '80' },
        { label: '手机号', prop: 'mobile', width: '130' },
        { label: '身份证号', prop: 'idcard', width: '170' },
        { label: '费别', prop: 'rateTypeName', width: '90' },
        { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
        { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
        { label: '病情', prop: 'sickStateName', width: '110' },
        { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
        { label: '建床日期', prop: 'buildingTime', width: '170' },
        { label: '建床天数', prop: 'budildDays', width: '90' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
        { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
        { label: '转归情况', prop: 'turnOver', width: '110' }
        { label: '患者姓名', prop: 'name', width: '90' },
        { label: '年龄', prop: 'age', width: '90' },
        { label: '性别', prop: 'sex', width: '90' },
        { label: '患者手机号', prop: 'mobile', width: '130' },
        { label: '下转医院', prop: 'hospitalName', width: '170' },
        { label: '下转医生', prop: 'hospitalDoctor', width: '90' },
        { label: '下转时间', prop: 'createTime', width: '90' },
        { label: '患者类型', prop: 'patientType', width: '90' },
        { label: '下转状态', prop: 'statusName', width: '110' },
        { label: '接收社区医院', prop: 'orgName', width: '110' },
        { label: '接收签约医生', prop: 'doctorName', width: '170' },
        { label: '接收时间', prop: 'receiveTime', width: '90' },
        { label: '档案状态', prop: 'archiveStatusName', width: '130' }
      ],
      dialogShow: false,
      settlementInfo: {
        name: '黄小蕾',
        yibao: 'dk',
        pay: '1049'
      },
      dialogTable: [],
      dialogHeader: [
        { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
        { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
        { label: '金额', prop: 'COST', width: '80' },
        { label: '自付', prop: 'CHARGE', width: '80' },
        { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
        { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
        { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
        { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
        { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
        { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
        { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
        { label: '结算号', prop: 'SETTLE_NO', width: '80' },
        { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
        { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
      communityHospitals: [],
      archiveList: [],
      rehabilitationHospital: [],
      inviteStatus: [
        { value: '', label: '全部' },
        { value: '1', label: '门诊患者' },
        { value: '2', label: '出院患者' }
      ],
      signatoryList: [],
      page: 1,
      size: 10,
      total: 0
      total: 0,
      dialogVisible: false
    }
  },
  methods: {
    initTime() {
      var vm = this
      var now = new Date()
      vm.nowyear = vm.chooseYear = now.getFullYear()
      vm.years = []
      for (i = vm.nowyear; i >= 2013; i--) {
        vm.years.push(i)
      }
      var date = new Date()
      var maxTime = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
      var date1 = new Date(date.getTime() - 2592000000)
      var minTime = `${date1.getFullYear()}-${date1.getMonth() + 1}-${date1.getDate()}`
      this.chooseTime = [minTime, maxTime]
    },
    getList() {
      var vm = this
@ -87,19 +72,14 @@ Vue.component('turndown-detail', {
      var params = {
        ...this.form,
        page: this.page,
        pageSize: this.size
        size: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
        }
      if (this.chooseTime) {
        params.startTime = this.chooseTime[0]
        params.endTime = this.chooseTime[1]
      }
      httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
      httpRequest.get('doctor/specialist/rehabilitation/rehabilitationPatientInfo', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -119,58 +99,65 @@ Vue.component('turndown-detail', {
        page: this.page,
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
        }
      if (this.chooseTime) {
        params.startDate = this.chooseTime[0]
        params.endDate = this.chooseTime[1]
      }
      this.exportLoading = true
      var fileName = `患者情况${new Date().getTime()}.xls`
      var fileName = `康复下转明细${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
    eliminateClick() {
      this.form = {}
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.form = {
        status: '',
        hospitalCode: '',
        orgCode: '',
        archiveStatus: '',
        patientType: ''
      }
      this.chooseTime = null
    },
    closeDialog() {
      this.dialogShow = false
    },
    previewRecord(row) {
    getDictData() {
      var vm = this
      this.dialogShow = true
      vm.dialogTable = []
      vm.settlementInfo = {}
      // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
      httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
        if (res.status == 200) {
          vm.dialogTable = res.data
          var pay = 0
          
          for(var item of res.data){
            pay += item.COST
          }
          vm.settlementInfo = {
            name: row.patientName,
            yibao: row.cardNo,
            pay: pay
          }
        }
      statisticAPI.getDictByDictName({ name: 'rehabilitation_status' }).then(function (res) {
        vm.statusOptions = [{ value: '全部', code: '' }]
        vm.statusOptions = vm.statusOptions.concat(res.list)
      })
      statisticAPI.getDictByDictName({ name: 'rehabilitation_hospital' }).then(function (res) {
        vm.rehabilitationHospital = [{ value: '全部', code: '' }]
        vm.rehabilitationHospital = vm.rehabilitationHospital.concat(res.list)
      })
      statisticAPI.getDictByDictName({ name: 'archive_status' }).then(function (res) {
        vm.archiveList = [{ value: '全部', code: '' }]
        vm.archiveList = vm.archiveList.concat(res.list)
      })
    },
    getDictData() {
    // 获取社区医院
    hospitalsByType: function () {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
        vm.turnOverOptions = [{ value: '全部' }]
        vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
      })
      statisticAPI
        .hospitalsByType({
          type: 1,
          code: '350200'
        })
        .then(function (res) {
          if (res.status == 200) {
            vm.communityHospitals = [{ label: '全部', value: '' }]
            res.list.forEach(function (v) {
              vm.communityHospitals.push({
                value: v.code,
                label: v.name
              })
            })
          }
        })
        .catch(function (err) {
          console.log(err, 'Errr')
        })
    },
    handleCurrentChange(val) {
      this.page = val
@ -179,11 +166,45 @@ Vue.component('turndown-detail', {
    handleSizeChange(val) {
      this.size = val
      this.getList()
    },
    // 康复下转操作
    operation(num, item) {
      var vm = this
      if (num != 2) {
        statisticAPI
          .synchronizePationSingle({ id: item.id })
          .then(function (res) {
            if (res.status == 200) {
              vm.$message.success('操作成功')
            } else {
              vm.$message.error(res.msg)
            }
          })
          .catch(function (err) {
            console.log(err, 'Errr')
          })
      } else {
        vm.signatoryList = []
        statisticAPI
          .kangfuGetSignInfo({ idcard: item.idcard })
          .then(function (res) {
            if (res.status == 200) {
              if (res.data != null) {
                vm.signatoryList.push(res.data)
              }
            }
          })
          .catch(function (err) {
            console.log(err, 'Errr')
          })
        this.dialogVisible = true
      }
    }
  },
  mounted() {
    this.initTime()
    this.getDictData()
    this.hospitalsByType()
    this.getList()
  }
})

+ 32 - 21
component/statistics/reservationSituation/index.html

@ -3,38 +3,48 @@
<div id="app" class="jtbc">
  <div class="copd-filter-group ui-col-1 bgc-fff" style="min-width: 900px">
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">
        <el-radio v-model="yearType" label="1">按筛查年份:</el-radio>
        <el-select v-model="chooseYear" class="formWidth wd160">
          <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
        </el-select>
      </label>
      <label class="c-333 c-f14">居民姓名:</label>
      <el-input v-model="form.name" placeholder="请输入居民姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14" style="display: flex; align-items: center">
        <el-radio v-model="yearType" label="2">自定义筛查时间:</el-radio>
        <el-date-picker
          v-model="chooseTime"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          value-format="yyyy-MM-dd"></el-date-picker>
      </label>
      <label class="c-333 c-f14">签约医生:</label>
      <el-input v-model="form.doctorName" placeholder="请输入签约医生姓名查询"></el-input>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">年龄阶段:</label>
      <el-checkbox-group v-model="age">
        <el-checkbox label="1">0~6岁</el-checkbox>
        <el-checkbox label="2">7~18岁</el-checkbox>
        <el-checkbox label="3">19~30岁</el-checkbox>
        <el-checkbox label="4">31~50岁</el-checkbox>
        <el-checkbox label="5">51~64岁</el-checkbox>
        <el-checkbox label="6">65岁以上</el-checkbox>
      </el-checkbox-group>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">数据范围:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.range" placeholder="请选择" @change="resetArea">
        <el-option v-for="(option, index) in rangeOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20">
      <label class="c-333 c-f14">地区:</label>
      <el-select class="formWidth" v-model="form.turnOver" placeholder="请选择">
        <el-option v-for="(option, index) in turnOverOptions" :label="option.value" :value="option.code"></el-option>
      <el-select class="formWidth" v-model="form.area" placeholder="请选择" @change="getHospital">
        <el-option v-for="(option, index) in areaOptions" :label="option.label" :value="option.value" :key="option.value"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'hospital'||form.range == 'team'">
      <label class="c-333 c-f14">社区:</label>
      <el-select class="formWidth" v-model="form.hospital" placeholder="请选择" @change="getTeam">
        <el-option v-for="(option, index) in hospitalOptions" :label="option.name" :value="option.code" :key="option.code"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20 pr20" v-if="form.range == 'team'">
      <label class="c-333 c-f14">团队:</label>
      <el-select class="formWidth" v-model="form.team" placeholder="请选择">
        <el-option v-for="(option, index) in teamOptions" :label="option.name" :value="option.id" :key="option.id"></el-option>
      </el-select>
    </div>
    <div class="searchDiv pb20">
      <el-button type="primary" size="mini" @click="queryDate">查询</el-button>
      <el-button type="ff9526" size="mini" @click="exportTable" :disabled="exportLoading">导出</el-button>
@ -56,4 +66,5 @@
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
    class="pagination"></el-pagination>
  <el-dialog :visible="visible" title="查看随访结果" @close="closeDialog"></el-dialog>
</div>

+ 126 - 90
component/statistics/reservationSituation/index.js

@ -16,61 +16,86 @@ Vue.component('reservation-situation', {
  props: [],
  data: function () {
    return {
      years: [],
      yearType: '1',
      chooseYear: null,
      chooseTime: null,
      turnOverOptions: [],
      form: {},
      rangeOptions: [
        { label: '区', value: 'town' },
        { label: '医院', value: 'hospital' },
        { label: '团队', value: 'team' }
      ],
      age: [],
      areaOptions: [
        { label: '思明区', value: '350203' },
        { label: '海沧区', value: '350205' },
        { label: '湖里区', value: '350206' },
        { label: '集美区', value: '350211' },
        { label: '同安区', value: '350212' },
        { label: '翔安区', value: '350213' }
      ],
      hospitalOptions: [],
      teamOptions: [],
      form: {
        range: 'town'
      },
      loading: false,
      exportLoading: false,
      tableData: [],
      tableHeader: [
        { label: '住院号', prop: 'visitNo', width: '110' },
        { label: '病人姓名', prop: 'patientName', width: '90' },
        { label: '性别', prop: 'sex', width: '80' },
        { label: '手机号', prop: 'mobile', width: '130' },
        { label: '身份证号', prop: 'idcard', width: '170' },
        { label: '费别', prop: 'rateTypeName', width: '90' },
        { label: '建床科室', prop: 'sickVisitDeptName', width: '90' },
        { label: '护理等级', prop: 'sickTendLevelName', width: '90' },
        { label: '病情', prop: 'sickStateName', width: '110' },
        { label: '建床诊断', prop: 'sickDiagnoseCodeName', width: '110' },
        { label: '建床日期', prop: 'buildingTime', width: '170' },
        { label: '建床天数', prop: 'budildDays', width: '90' },
        { label: '撤床日期', prop: 'withdrawalTime', width: '130' },
        { label: '撤床诊断', prop: 'bedWithdrawDiagnoseName', width: '130' },
        { label: '转归情况', prop: 'turnOver', width: '110' }
      ],
      dialogShow: false,
      settlementInfo: {
        name: '黄小蕾',
        yibao: 'dk',
        pay: '1049'
      },
      dialogTable: [],
      dialogHeader: [
        { label: '结算时间', prop: 'SETTLE_TIME', width: '160' },
        { label: '结算状态', prop: 'SETTLE_STATUS_NAME', width: '80' },
        { label: '金额', prop: 'COST', width: '80' },
        { label: '自付', prop: 'CHARGE', width: '80' },
        { label: '优惠金额', prop: 'PREFER_PAYMENT', width: '80' },
        { label: '减免金额', prop: 'DERATE_PAYMENT', width: '80' },
        { label: '单位支付', prop: 'COMPANY_PAYMENT', width: '80' },
        { label: '医保支付', prop: 'INSUR_PAYMENT', width: '80' },
        { label: '结算总预交金', prop: 'SETTLE_SUM_PREPAY', width: '120' },
        { label: '结算时收退款', prop: 'SETTLE_SICK_PREPAY', width: '120' },
        { label: '结算后余额', prop: 'SETTLE_SICK_BALANCE', width: '120' },
        { label: '结算号', prop: 'SETTLE_NO', width: '80' },
        { label: '就诊科室', prop: 'VISIT_DEPT_NAME', width: '100' },
        { label: '收费科室', prop: 'SETTLE_DEPT_NAME', width: '100' }
        { label: '居民', prop: 'name', width: '100' },
        { label: '年龄', prop: 'age', width: '90' },
        { label: '性别', prop: 'sex', width: '90' },
        { label: '手机号', prop: 'hospitalName', width: '130' },
        { label: '地址', prop: 'doctorName', width: '140' },
        { label: '是否签约', prop: 'orgName', width: '90' },
        { label: '社区医院', prop: 'doctor_name', width: '140' },
        { label: '签约医生', prop: 'deptName', width: '90' },
        { label: '自助预约次数', prop: 'startTime', width: '100' },
        { label: '医生代预约次数', prop: 'ascvd', width: '100' },
      ],
      page: 1,
      size: 10,
      total: 0
      total: 0,
      level: 0,
      visible: false
    }
  },
  methods: {
    init() {
      var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
      if (selectedRole.code.indexOf('350200') > -1) {
        this.level = 1 //  市卫健委
        this.areaOptions = [
          { label: '思明区', value: '350203' },
          { label: '海沧区', value: '350205' },
          { label: '湖里区', value: '350206' },
          { label: '集美区', value: '350211' },
          { label: '同安区', value: '350212' },
          { label: '翔安区', value: '350213' }
        ]
      } else if (selectedRole.code.length == 6) {
        this.level = 2 // 区管理
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.form = {
          range: 'town',
          area: selectedRole.code
        }
        this.getHospital(selectedRole.code)
      } else {
        this.level = 3 // 社区管理
        this.rangeOptions = [
          { label: '医院', value: 'hospital' },
          { label: '团队', value: 'team' }
        ]
        this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
        this.hospital = [{ label: selectedRole.name, value: selectedRole.code }]
        this.form = {
          range: 'hospital',
          area: selectedRole.code.substring(0, 6),
          hospital: selectedRole.code
        }
        this.getTeam(selectedRole.code)
      }
      this.initTime()
      this.getList()
    },
    initTime() {
      var vm = this
      var now = new Date()
@ -81,25 +106,38 @@ Vue.component('reservation-situation', {
        vm.years.push(i)
      }
    },
    resetArea() {
      if (this.level == 1) {
        delete this.form.area
        delete this.form.hospital
        delete this.form.team
      } else if (this.level == 2) {
        delete this.form.hospital
        delete this.form.team
      } else {
        delete this.form.team
      }
    },
    getList() {
      var vm = this
      this.loading = true
      var params = {
        ...this.form,
        age: this.age,
        page: this.page,
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      httpRequest.get('statistics/bed/getFamilyBedRecord', { data: params }).then(function (res) {
      httpRequest.get('statistics/collaborate/gxbReservationDetail', { data: params }).then(function (res) {
        if (res.status == 200) {
          vm.tableData = res.detailModelList
          vm.total = res.totalCount
@ -113,63 +151,56 @@ Vue.component('reservation-situation', {
    },
    exportTable() {
      var vm = this
      this.loading = true
      var params = {
        ...this.form,
        age: this.age,
        page: this.page,
        pageSize: this.size
      }
      if (this.yearType == '1') {
        params.startDate = this.chooseYear + '-01-01 00:00'
        params.endDate = this.chooseYear + '-12-31 23:59'
        params.startDate = this.chooseYear + '-01-01'
        params.endDate = this.chooseYear + '-12-31'
      } else {
        if (this.chooseTime) {
          params.startDate = this.chooseTime[0] + ' 00:00'
          params.endDate = this.chooseTime[1]+ ' 23:59'
          params.startDate = this.chooseTime[0]
          params.endDate = this.chooseTime[1]
        }
      }
      this.exportLoading = true
      var fileName = `患者情况${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/bed/exportGatientFamilyBedRecordStatistics', fileName, params).then(function () {
      var fileName = `居民预约情况明细${new Date().getTime()}.xls`
      httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbReservationDetail', fileName, params).then(function () {
        vm.exportLoading = false
      })
    },
    eliminateClick() {
      this.form = {}
      this.yearType = '1'
      this.chooseYear = new Date().getFullYear()
      this.chooseTime = null
    },
    closeDialog() {
      this.dialogShow = false
      this.resetArea()
      delete this.form.isSign
      delete this.form.name
      delete this.form.eventType
      this.$forceUpdate()
    },
    previewRecord(row) {
    getHospital(code) {
      var vm = this
      this.dialogShow = true
      vm.dialogTable = []
      vm.settlementInfo = {}
      // doctor/familyBed/getFamilyBedSettleRecord?bedRecordCode=008d17ac9111439fab54f27c4e7f8376
      httpRequest.get('doctor/familyBed/getFamilyBedSettleRecord', { data: { bedRecordCode: row.code } }).then(function (res) {
        if (res.status == 200) {
          vm.dialogTable = res.data
          var pay = 0
          
          for(var item of res.data){
            pay += item.COST
          }
          vm.settlementInfo = {
            name: row.patientName,
            yibao: row.cardNo,
            pay: pay
          }
        }
      delete this.form.hospital
      delete this.form.team
      var params = {
        type: 5,
        code: code
      }
      httpRequest.post('common/district', { data: params }).then(function (res) {
        vm.hospitalOptions = res.list
      })
    },
    getDictData() {
    getTeam(code) {
      var vm = this
      statisticAPI.getDictByDictName({ name: 'jkcopd_disease_conversion' }).then(function (res) {
        vm.turnOverOptions = [{ value: '全部' }]
        vm.turnOverOptions = vm.turnOverOptions.concat(res.list)
      delete this.form.team
      var params = {
        hospital: code
      }
      httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
        vm.teamOptions = res.data
      })
    },
    handleCurrentChange(val) {
@ -179,11 +210,16 @@ Vue.component('reservation-situation', {
    handleSizeChange(val) {
      this.size = val
      this.getList()
    },
    openDialog(scope) {
      this.visible = true
    },
    closeDialog() {
      this.visible = false
    }
  },
  mounted() {
    this.initTime()
    this.getDictData()
    this.getList()
    this.init()
  }
})