|
@@ -0,0 +1,397 @@
|
|
|
+<template>
|
|
|
+ <el-form style="width: 100%" ref="filterListFormRef" :model="formData" class="demo-form-inline" label-suffix=":"
|
|
|
+ label-width="90px">
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-radio-group v-model="formData.in_hospital" @input="onSubmit" style="margin-bottom:15px">
|
|
|
+ <el-radio-button label="全部"></el-radio-button>
|
|
|
+ <el-radio-button label="出院"></el-radio-button>
|
|
|
+ <el-radio-button label="在院"></el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="出院日期">
|
|
|
+ <div style="width: 100%;display: flex;gap: 5px;">
|
|
|
+ <el-form-item prop="AAC01_START">
|
|
|
+ <el-date-picker style="width: 100%" v-model="formData.AAC01_START" type="date" placeholder="开始日期"
|
|
|
+ :picker-options="AAC01PickerOptions" value-format="yyyyMMdd" format="yyyy年MM月dd日">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="AAC01_END">
|
|
|
+ <el-date-picker style="width: 100%" v-model="formData.AAC01_END" type="date" placeholder="结束日期"
|
|
|
+ value-format="yyyyMMdd" format="yyyy年MM月dd日">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="出院科室" prop="KS_CODE">
|
|
|
+ <el-cascader style="width: 100%;" placeholder="请选择" v-model="formData.KS_CODE"
|
|
|
+ :options="searchOptions.ksArray" filterable :props="searchOptions.cascaderProps" clearable collapse-tags
|
|
|
+ @change="ksChange">
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="出院病区" prop="BQ_CODE">
|
|
|
+ <el-cascader style="width: 100%;" placeholder="请选择" v-model="formData.BQ_CODE"
|
|
|
+ :options="searchOptions.bqArray" filterable :props="searchOptions.cascaderProps" clearable collapse-tags>
|
|
|
+ </el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="病案号" prop="AAA28">
|
|
|
+ <el-input style="width: 100%" v-model="formData.AAA28" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="入院日期">
|
|
|
+ <div style="width: 100%;display: flex;gap: 5px;">
|
|
|
+ <el-form-item prop="AAB01_START">
|
|
|
+ <el-date-picker style="width: 100%" v-model="formData.AAB01_START" type="date" placeholder="开始日期"
|
|
|
+ :picker-options="AAB01PickerOptions" value-format="yyyyMMdd" format="yyyy年MM月dd日">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="AAB01_END">
|
|
|
+ <el-date-picker style="width: 100%" v-model="formData.AAB01_END" type="date" placeholder="结束日期"
|
|
|
+ value-format="yyyyMMdd" format="yyyy年MM月dd日">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="医嘱名称" prop="yzmc">
|
|
|
+ <el-input v-model="formData.yzmc" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="费用名称" prop="fymc">
|
|
|
+ <el-input v-model="formData.fymc" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="住院天数" prop="">
|
|
|
+ <div style="width: 100%;display: flex;gap: 5px;">
|
|
|
+ <el-form-item prop="endDay1">
|
|
|
+ <el-input style="width: 100%;" v-model="formData.endDay1">
|
|
|
+ <template slot="append">天</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ -
|
|
|
+ <el-form-item prop="endDay2">
|
|
|
+ <el-input style="width: 100%;" v-model="formData.endDay2">
|
|
|
+ <template slot="append">天</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24" v-show="expand">
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="非计划手术" prop="unplannedSurgery">
|
|
|
+ <el-select style="width: 100%" v-model="formData.unplannedSurgery" placeholder="请选择">
|
|
|
+ <el-option v-for="item in searchOptions.unplannedSurgeryArray" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="手术安排" prop="surgicalPlanning">
|
|
|
+ <el-select style="width: 100%" v-model="formData.surgicalPlanning" placeholder="请选择">
|
|
|
+ <el-option v-for="item in searchOptions.surgicalPlanningArray" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="离院方式" prop="AEM01C">
|
|
|
+ <el-select v-model="formData.AEM01C" clearable filterable placeholder="请选择" style="width: 100%;">
|
|
|
+ <el-option v-for="(item, index) in searchOptions.lyTypeArray" :label="item.name" :value="item.id" :key="index"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="住院天数" prop="">
|
|
|
+ <div style="width: 100%;display: flex;gap: 5px;">
|
|
|
+ <el-form-item prop="const1">
|
|
|
+ <el-input style="width: 100%;" v-model="formData.const1">
|
|
|
+ <template slot="append">元</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ -
|
|
|
+ <el-form-item prop="const2">
|
|
|
+ <el-input style="width: 100%;" v-model="formData.const2">
|
|
|
+ <template slot="append">元</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-form-item label="" prop="">
|
|
|
+ <el-row type="flex" justify="start" style="margin-left: -90px">
|
|
|
+ <el-button type="text" :icon="`el-icon-arrow-${expand? 'up' : 'down'}`" @click="expand = !expand">{{
|
|
|
+ expand ? '收起' : '展开'}}</el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7" :offset="10">
|
|
|
+ <el-form-item label="" prop="">
|
|
|
+ <el-row type="flex" justify="end">
|
|
|
+ <el-button type="primary" @click="onSubmit">查询</el-button>
|
|
|
+ <el-button @click="onReset">重置</el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import moment from 'moment/moment';
|
|
|
+
|
|
|
+export default {
|
|
|
+ emits: ['search', 'reset'],
|
|
|
+ data() {
|
|
|
+ const that = this
|
|
|
+ return {
|
|
|
+ formData: {
|
|
|
+ in_hospital: '全部',
|
|
|
+ AAC01_START: '',
|
|
|
+ AAC01_END: '',
|
|
|
+ KS_CODE: [],
|
|
|
+ BQ_CODE: [],
|
|
|
+ AAA28: '',
|
|
|
+ AAB01_START: '',
|
|
|
+ AAB01_END: '',
|
|
|
+ yzmc: '',
|
|
|
+ fymc: '',
|
|
|
+ endDay1: '',
|
|
|
+ endDay2: '',
|
|
|
+ unplannedSurgery: '',
|
|
|
+ surgicalPlanning: '',
|
|
|
+ AEM01C: '',
|
|
|
+ const1: '',
|
|
|
+ const2: ''
|
|
|
+ },
|
|
|
+ searchOptions: {
|
|
|
+ ksArray: [],//科室options
|
|
|
+ bqArray: [],//病区options
|
|
|
+ lyTypeArray: [], //离院方式
|
|
|
+ unplannedSurgeryArray: [{
|
|
|
+ label: '全部', value: ''
|
|
|
+ },{
|
|
|
+ label: '是', value: 'Y'
|
|
|
+ },{
|
|
|
+ label: '否', value: 'N'
|
|
|
+ }],
|
|
|
+ surgicalPlanningArray: [{
|
|
|
+ label: '全部', value: ''
|
|
|
+ },{
|
|
|
+ label: '有', value: 'Y'
|
|
|
+ },{
|
|
|
+ label: '无', value: 'N'
|
|
|
+ }],
|
|
|
+ cascaderProps: {
|
|
|
+ multiple: true, // 开启多选模式
|
|
|
+ label: 'dep_name',
|
|
|
+ value: 'dep_id',
|
|
|
+ children: 'children',
|
|
|
+ checkStrictly: true, // 允许独立选择任意层级
|
|
|
+ emitPath: false, // 是否返回完整路径(true 返回路径数组,false 只返回末节点值)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ AAC01PickerOptions: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ if (that.formData.AAC01_END != "") {
|
|
|
+ return time.getTime() > Date.now();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ shortcuts: [{
|
|
|
+ text: '今天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '近7天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().subtract(7, 'days').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '近30天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().subtract(30, 'days').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '一季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().startOf('year').add(3, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '二季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').add(3, 'M').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().startOf('year').add(6, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '三季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').add(6, 'M').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().startOf('year').add(9, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '四季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').add(9, 'M').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().startOf('year').add(12, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: moment().add(-2, 'Y').format("YYYY"),
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().add(-2, 'Y').startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().add(-2, 'Y').endOf('year').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: moment().add(-1, 'Y').format("YYYY"),
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().add(-1, 'Y').startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().add(-1, 'Y').endOf('year').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: moment().format("YYYY"),
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAC01_END = moment().endOf('year').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ AAB01PickerOptions: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ if (that.formData.AAB01_END != "") {
|
|
|
+ return time.getTime() > Date.now();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ shortcuts: [{
|
|
|
+ text: '今天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '近7天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().subtract(7, 'days').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '近30天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().subtract(30, 'days').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '一季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().startOf('year').add(3, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '二季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').add(3, 'M').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().startOf('year').add(6, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '三季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').add(6, 'M').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().startOf('year').add(9, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '四季度',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').add(9, 'M').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().startOf('year').add(12, 'M').subtract(1, 'days').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: moment().add(-2, 'Y').format("YYYY"),
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().add(-2, 'Y').startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().add(-2, 'Y').endOf('year').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: moment().add(-1, 'Y').format("YYYY"),
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().add(-1, 'Y').startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().add(-1, 'Y').endOf('year').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: moment().format("YYYY"),
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', moment().startOf('year').format('YYYYMMDD'));
|
|
|
+ that.formData.AAB01_END = moment().endOf('year').format('YYYYMMDD')
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ expand: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getSearchOptions()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onSubmit() {
|
|
|
+ this.$emit('search')
|
|
|
+ },
|
|
|
+ onReset() {
|
|
|
+ this.$refs.filterListFormRef.resetFields();
|
|
|
+ this.$emit('reset')
|
|
|
+ },
|
|
|
+ getSearchOptions() {
|
|
|
+ this.$axios.post('CaseHistory/Terminal/getQxBlSearchOptions', {}).then(res => {
|
|
|
+ this.searchOptions.ksArray = this.cancelChildren(res.data.ksArray);//科室
|
|
|
+ this.searchOptions.bqArray = this.cancelChildren(res.data.bqArray);//病区
|
|
|
+ this.searchOptions.lyTypeArray = res.data.lyTypeArray
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //科室change事件
|
|
|
+ ksChange() {
|
|
|
+ this.formData.BQ_CODE = [];
|
|
|
+ this.$axios.post('CaseHistory/Terminal/getBqOptions', { 'KS_CODE': this.formData.KS_CODE }).then(res => {
|
|
|
+ this.searchOptions.bqArray = this.cancelChildren(res.data.bqArray);//病区
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 将下拉框为空的children属性设置为undefined
|
|
|
+ cancelChildren(arr) {
|
|
|
+ if (!arr) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ return arr.map(item => {
|
|
|
+ if (item.children.length == 0) {
|
|
|
+ item.children = undefined;
|
|
|
+ } else {
|
|
|
+ item.children.map(childreItem => {
|
|
|
+ if (childreItem.children.length == 0) {
|
|
|
+ childreItem.children = undefined;
|
|
|
+ }
|
|
|
+ return childreItem
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|