|
@@ -0,0 +1,764 @@
|
|
|
+<template>
|
|
|
+ <el-tabs
|
|
|
+ v-model="activeName"
|
|
|
+ type="card"
|
|
|
+ @tab-change="tabsChange"
|
|
|
+ >
|
|
|
+ <el-tab-pane label="身份维护" name="one">
|
|
|
+ <el-container>
|
|
|
+ <el-header>
|
|
|
+ <el-button type="primary" icon="RefreshRight" @click="queryVisitType">刷新</el-button>
|
|
|
+ <el-button type="success" icon="DocumentAdd" @click="addVisitType">新增</el-button>
|
|
|
+ </el-header>
|
|
|
+ <el-main>
|
|
|
+ <el-table :data="visitTypeTableData" :height="getWindowSize.h-80">
|
|
|
+ <el-table-column prop="name" label="名称" width="120" />
|
|
|
+ <el-table-column prop="startDate" label="有效开始时间" width="150" />
|
|
|
+ <el-table-column prop="endDate" label="有效结束时间" width="150" />
|
|
|
+ <el-table-column label="操作" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="editVisitType(scope.row)">修改</el-button>
|
|
|
+ <el-button v-if="scope.row.delFlag == 1" type="success" size="small" @click="useVisitType(0,scope.row.id)">启用</el-button>
|
|
|
+ <el-button v-else type="danger" size="small" @click="useVisitType(1,scope.row.id)">停用</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="身份关系维护" name="two">
|
|
|
+ <el-container>
|
|
|
+ <el-header>
|
|
|
+ <el-input v-model="visitUserParam.keyWard" placeholder="支持门诊号/姓名/身份证" style="width: 200px" />
|
|
|
+ 病人身份:<el-select v-model="visitUserParam.id" style="width: 120px">
|
|
|
+ <el-option v-for="item in visitUserParam.patientTypeParams" :key="item.id" :value="item.id" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button type="primary" icon="Search" @click="queryPatient">查询</el-button>
|
|
|
+ </el-header>
|
|
|
+ <el-main>
|
|
|
+ <el-table :data="visitUserData" stripe highlight-current-row :height="getWindowSize.h-100">
|
|
|
+ <el-table-column prop="patientId" label="门诊号" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="name" label="姓名" width="120"></el-table-column>
|
|
|
+ <el-table-column prop="sex" label="性别" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="socialNo" label="身份证号" width="150" ></el-table-column>
|
|
|
+ <el-table-column prop="visitName" label="身份类别" width="120" ></el-table-column>
|
|
|
+ <el-table-column label="操作" width="230">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="updatePatientVisitType(scope.row)">编辑身份</el-button>
|
|
|
+ <el-button v-if="scope.row.visitId" type="danger" size="small" @click="delPatientVisitType(scope.row)">删除身份</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="visitUserParam.currentPage"
|
|
|
+ :page-sizes="[30, 45, 70, 100]"
|
|
|
+ :page-size="visitUserParam.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="visitUserParam.total"
|
|
|
+ style="margin-top: 5px"
|
|
|
+ ></el-pagination>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="优惠明细维护" name="three">
|
|
|
+ <el-container>
|
|
|
+ <el-header>
|
|
|
+ 病人身份:<el-select v-model="discountDetailParam.visitType" style="width: 120px">
|
|
|
+ <el-option v-for="item in visitUserParam.patientTypeParams" :key="item.id" :value="item.id" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ 类别 <el-select v-model="discountDetailParam.discountClass" style="width: 150px">
|
|
|
+ <el-option v-for="item in discountClassQueryList" :key="item.code" :value="item.code" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button type="primary" icon="Search" @click="queryDiscountDetail">查询</el-button>
|
|
|
+ <el-button icon="DocumentAdd" type="success" @click="openDiscountDetailEdit(null)">新增</el-button>
|
|
|
+ </el-header>
|
|
|
+ <el-main>
|
|
|
+ <el-table :data="discountDetailData" stripe highlight-current-row :height="getWindowSize.h-100">
|
|
|
+ <el-table-column prop="visitName" label="身份名称" width="120"></el-table-column>
|
|
|
+ <el-table-column label="状态" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag v-if="scope.row.delFlag == 0" type="success">启用</el-tag>
|
|
|
+ <el-tag v-else type="danger">停用</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="优惠类型" width="120" show-overflow-tooltip >
|
|
|
+ <template #default="scope">
|
|
|
+ <span >{{getDiscountClassName(scope.row.discountClass)}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="chargeItem" label="项目编码" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="chargeName" label="项目名称" width="150" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="discountType" label="折扣方式" width="100" >
|
|
|
+ <template #default="scope">
|
|
|
+ <span >{{getDiscountTypeName(scope.row.discountType)}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="discount" label="折扣" width="100" ></el-table-column>
|
|
|
+ <el-table-column prop="startDate" label="有效开始时间" width="150" ></el-table-column>
|
|
|
+ <el-table-column prop="endDate" label="有效结束时间" width="150" ></el-table-column>
|
|
|
+ <el-table-column label="操作" width="230">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small" @click="openDiscountDetailEdit(scope.row)">修改</el-button>
|
|
|
+ <el-button v-if="scope.row.delFlag == 1" type="danger" size="small" @click="updateDiscountDelFlag(scope.row,0)">启用</el-button>
|
|
|
+ <el-button v-else type="danger" size="small" @click="updateDiscountDelFlag(scope.row,1)">停用</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleDiscountDetailSizeChange"
|
|
|
+ @current-change="handleDiscountDetailCurrentChange"
|
|
|
+ :current-page="discountDetailParam.currentPage"
|
|
|
+ :page-sizes="[30, 45, 70, 100]"
|
|
|
+ :page-size="discountDetailParam.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="discountDetailParam.total"
|
|
|
+ style="margin-top: 5px"
|
|
|
+ ></el-pagination>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-dialog v-model="visitTypeDialog" title="身份编辑" width="500">
|
|
|
+ <el-form ref="formVisitTypeRef" :model="formVisitType" label-width="120px">
|
|
|
+ <el-form-item label="身份名称">
|
|
|
+ <el-input v-model="formVisitType.name" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="有效时间">
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formVisitType.startDate"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="有效开始时间"
|
|
|
+ style="width: 150px"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ 至
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formVisitType.endDate"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="有效截止时间"
|
|
|
+ style="width: 150px"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="visitTypeDialog = false">关闭</el-button>
|
|
|
+ <el-button type="success" @click="saveVisitType">
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ v-model="patientTypeDialog"
|
|
|
+ title="病人身份编辑"
|
|
|
+ width="300"
|
|
|
+ >
|
|
|
+ <el-select v-model="patientTypeParam.code" style="width: 120px">
|
|
|
+ <el-option v-for="item in patientTypeParam.patientTypeList" :key="item.id" :value="item.id" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ <template #footer>
|
|
|
+ <span >
|
|
|
+ <el-button @click="patientTypeDialog = false">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="savePatientTypeData">
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="discountDialog" title="优惠明细编辑" width="600" @close="clearFormDiscountDataAndRefush" >
|
|
|
+ <el-form :model="formDiscount" label-width="120px">
|
|
|
+ <el-form-item label="身份名称">
|
|
|
+ <el-select v-model="formDiscount.visitType" style="width: 120px">
|
|
|
+ <el-option v-for="item in patientTypeParam.patientTypeList" :key="item.id" :value="item.id" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型">
|
|
|
+ <el-select v-model="formDiscount.discountClass" style="width: 200px" @change="discountTypeChange">
|
|
|
+ <el-option v-for="item in discountClassList" :key="item.code" :value="item.code" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="formDiscount.discountClass =='template_id'" label="项目编码">
|
|
|
+ <el-select v-model="formDiscount.chargeItem" style="width: 120px" @change="ChargeCodeChange(1)">
|
|
|
+ <el-option v-for="item in templateList" :key="item.code" :value="item.code" :label="item.code+' '+item.name" > </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-popover :visible="templateVisible" width="400" placement="right-end" trigger="click" >
|
|
|
+ <template #reference>
|
|
|
+ <el-button @click="queryTemplateDeatil">明细</el-button>
|
|
|
+ </template>
|
|
|
+ <div style="width: 380px;">
|
|
|
+ <div style="text-align: right">
|
|
|
+ <el-button title="关闭" icon="CloseBold" @click="templateVisible = false"></el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="templateDetailList" height="300">
|
|
|
+ <el-table-column property="code" label="收费项目编码" />
|
|
|
+ <el-table-column property="name" label="名称" width="150" show-overflow-tooltip />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-else-if=" formDiscount.discountClass =='gh' " label="项目编码">
|
|
|
+ <el-select v-model="formDiscount.chargeItem" style="width: 120px" @change="ChargeCodeChange(2)">
|
|
|
+ <el-option v-for="item in ghList" :key="item.code" :value="item.code" :label="item.code+' '+item.name" > </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-popover :visible="ghVisible" width="600" placement="right-end" trigger="click" >
|
|
|
+ <template #reference>
|
|
|
+ <el-button @click="queryGhDeatil">明细</el-button>
|
|
|
+ </template>
|
|
|
+ <div style="width: 580px;">
|
|
|
+ <div style="text-align: right">
|
|
|
+ <el-button title="关闭" icon="CloseBold" @click="ghVisible = false"></el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="ghTableList" height="300">
|
|
|
+ <el-table-column property="code" label="收费项目编码" />
|
|
|
+ <el-table-column property="name" label="名称" width="150" show-overflow-tooltip />
|
|
|
+ <el-table-column property="reqFee" label="挂号费" width="100" show-overflow-tooltip />
|
|
|
+ <el-table-column property="clinicFee" label="诊疗费" width="100" show-overflow-tooltip />
|
|
|
+ <el-table-column property="othFee" label="其他费" width="100" show-overflow-tooltip />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item v-else label="项目编码">
|
|
|
+ <el-popover :visible="visible" width="400" placement="right-end" trigger="click" @show="initChargeItemList">
|
|
|
+ <template #reference>
|
|
|
+ <el-input v-model="formDiscount.chargeItem" @click="visible = true" style="width: 250px" clearable />
|
|
|
+ </template>
|
|
|
+ <div style="width: 380px;">
|
|
|
+ <div style="text-align: right">
|
|
|
+ <el-button title="关闭" icon="CloseBold" @click="visible = false"></el-button>
|
|
|
+ </div>
|
|
|
+ <div style="height: 50px">
|
|
|
+ <el-input v-model="chargeItemKeyWard" placeholder="支持编码/名称" style="width: 150px" clearable />
|
|
|
+ <el-button type="primary" icon="Search" @click="queryChargeItemList">查询</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="chargeItemList" @row-click="fetchChargeCode" height="400">
|
|
|
+ <el-table-column property="code" label="收费项目编码" />
|
|
|
+ <el-table-column property="name" label="名称" width="150" show-overflow-tooltip />
|
|
|
+ <el-table-column property="chargeAmount" label="金额" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ <el-popover v-if="formDiscount.discountClass !='charge_code'" :visible="innerVisible" width="400" placement="right-end" trigger="click" >
|
|
|
+ <template #reference>
|
|
|
+ <el-button size="small" @click="queryItemDetailData">明细</el-button>
|
|
|
+ </template>
|
|
|
+ <div style="width: 380px;">
|
|
|
+ <div style="text-align: right">
|
|
|
+ <el-button title="关闭" icon="CloseBold" @click="innerVisible = false"></el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="itemDetailList" height="400">
|
|
|
+ <el-table-column property="code" label="收费项目编码" />
|
|
|
+ <el-table-column property="name" label="名称" width="150" show-overflow-tooltip />
|
|
|
+ <el-table-column property="chargeAmount" label="金额" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="项目名称">
|
|
|
+ <el-input disabled v-model="formDiscount.chargeName" ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="折扣方式">
|
|
|
+ <el-select v-model="formDiscount.discountType" >
|
|
|
+ <el-option v-for="item in discountTypeList" :key="item.code" :value="item.code" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="折扣">
|
|
|
+ <el-input v-model="formDiscount.discount" ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="有效时间">
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formDiscount.startDate"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="有效开始时间"
|
|
|
+ style="width: 150px"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ 至
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formDiscount.endDate"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="有效截止时间"
|
|
|
+ style="width: 150px"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态">
|
|
|
+ <el-select v-model="formDiscount.delFlag" >
|
|
|
+ <el-option v-for="item in delFlagList" :key="item.code" :value="item.code" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="formDiscount.discountClass =='jy_jc_code'" label="检验检查类型">
|
|
|
+ <el-select disabled v-model="formDiscount.jyjcType" >
|
|
|
+ <el-option v-for="item in jyjcTypeList" :key="item.code" :value="item.code" :label="item.name"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button @click="discountDialog = false">关闭</el-button>
|
|
|
+ <el-button type="success" @click="saveDiscountData">
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import router from '@/router'
|
|
|
+import {onMounted, ref} from "vue";
|
|
|
+import {ElMessageBox, ElTree,ElMessage} from 'element-plus'
|
|
|
+import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
|
|
|
+import {
|
|
|
+ queryDiscountClass,
|
|
|
+ queryZdDiscountDetail,
|
|
|
+ saveZdDiscountDetail,
|
|
|
+ updateZdDiscountDetailDelFlag,
|
|
|
+ queryItemList,
|
|
|
+ queryAllTemplate,
|
|
|
+ queryTemplateDetails,
|
|
|
+ queryZdVisitTypeNew,
|
|
|
+ delZdVisitTypeNew,
|
|
|
+ updateZdVisitTypeNew,
|
|
|
+ queryPatientInfo,
|
|
|
+ saveZdVisitTypeUser,
|
|
|
+ delZdVisitTypeUser,
|
|
|
+ queryMzChargeType,
|
|
|
+ queryItemDetail,
|
|
|
+ insertZdVisitTypeNew
|
|
|
+} from "@/api/mz-emr/shareholder-card";
|
|
|
+import {getWindowSize} from "@/utils/window-size";
|
|
|
+import type { FormInstance } from 'element-plus'
|
|
|
+const activeName = ref('one')
|
|
|
+
|
|
|
+const tabsChange = ()=>{
|
|
|
+ if(activeName.value ==='two'){
|
|
|
+ queryPatient()
|
|
|
+ }else if(activeName.value ==='three'){
|
|
|
+ queryDiscountDetail()
|
|
|
+ }else {
|
|
|
+ queryVisitType()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const visible = ref(false)
|
|
|
+
|
|
|
+// 优惠明细参数
|
|
|
+const discountDetailParam = ref({
|
|
|
+ discountClass : 'all',
|
|
|
+ pageSize : 30,
|
|
|
+ currentPage : 1,
|
|
|
+ total : 0,
|
|
|
+ visitType : 0
|
|
|
+})
|
|
|
+// 优惠类型
|
|
|
+export interface SelectType {
|
|
|
+ code:string,name:string
|
|
|
+}
|
|
|
+
|
|
|
+const discountClassList = ref<SelectType[]>()
|
|
|
+// 优惠类型 查询条件
|
|
|
+const discountClassQueryList = ref<any>([])
|
|
|
+const userIdCode = ref<string>('')
|
|
|
+onMounted(()=>{
|
|
|
+ let patInfo = JSON.parse(window.atob(router.currentRoute.value.params.patientInfo))
|
|
|
+ userIdCode.value = patInfo.userIdCode
|
|
|
+ queryVisitType()
|
|
|
+ refushZdVisitTypeNew()
|
|
|
+ queryDiscountClass().then((res:SelectType[])=>{
|
|
|
+ discountClassList.value =res
|
|
|
+ discountClassQueryList.value.push({code:'all',name:'全部'})
|
|
|
+ res.forEach(item=>{
|
|
|
+ discountClassQueryList.value.push(item)
|
|
|
+ })
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+const refushZdVisitTypeNew = ()=>{
|
|
|
+ queryZdVisitTypeNew({delFlag:0}).then((res:any)=>{
|
|
|
+ visitUserParam.value.patientTypeParams = []
|
|
|
+ patientTypeParam.value.patientTypeList = res
|
|
|
+ visitUserParam.value.patientTypeParams.push({id:0,name:'全部'})
|
|
|
+ if(res){
|
|
|
+ res.forEach(item=>{
|
|
|
+ visitUserParam.value.patientTypeParams.push(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 获取这个名称
|
|
|
+const getDiscountTypeName = (code)=>{
|
|
|
+ return discountTypeTable.find(item=>item.code == code).name
|
|
|
+}
|
|
|
+
|
|
|
+// 折扣率改变
|
|
|
+const discountTypeChange = ()=>{
|
|
|
+ formDiscount.value.chargeItem = ''
|
|
|
+ formDiscount.value.chargeName = ''
|
|
|
+ initDiscountType()
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const initDiscountType = ()=>{
|
|
|
+ if(formDiscount.value.discountClass ==='charge_code' || formDiscount.value.discountClass==='gh'){
|
|
|
+ discountTypeList.value = [ {code:'1',name:'折扣率'},
|
|
|
+ {code:'2',name:'直接收费'},]
|
|
|
+ }else {
|
|
|
+ discountTypeList.value = [
|
|
|
+ {code:'1',name:'折扣率'},
|
|
|
+ ]
|
|
|
+ formDiscount.value.discountType = '1'
|
|
|
+ }
|
|
|
+ if(formDiscount.value.discountClass ==='template_id'){
|
|
|
+ queryAllTemplate().then((res:any)=>{
|
|
|
+ templateList.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if(formDiscount.value.discountClass ==='gh'){
|
|
|
+ queryMzChargeType().then((res:any)=>{
|
|
|
+ ghList.value = res
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const chargeItemList = ref([])
|
|
|
+// 选择项目编码
|
|
|
+const fetchChargeCode = (row)=>{
|
|
|
+ formDiscount.value.chargeItem = row.code
|
|
|
+ formDiscount.value.chargeName = row.name
|
|
|
+ formDiscount.value.jyjcType = row.type
|
|
|
+ visible.value = false
|
|
|
+}
|
|
|
+// 查询 大类 套餐明细 tc
|
|
|
+const queryItemDetailData=()=>{
|
|
|
+ let param = {
|
|
|
+ discountClass : formDiscount.value.discountClass,
|
|
|
+ chargeItem : formDiscount.value.chargeItem,
|
|
|
+ jyjcType :formDiscount.value.jyjcType
|
|
|
+ }
|
|
|
+ queryItemDetail(param).then((res:any)=>{
|
|
|
+ itemDetailList.value = res
|
|
|
+ innerVisible.value = true
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const ChargeCodeChange = (flag)=>{
|
|
|
+ if(!stringIsBlank(formDiscount.value.chargeItem)){
|
|
|
+ if(flag === 1){
|
|
|
+ formDiscount.value.chargeName = templateList.value.find(item=>item.code == formDiscount.value.chargeItem).name
|
|
|
+ }else {
|
|
|
+ formDiscount.value.chargeName = ghList.value.find(item=>item.code == formDiscount.value.chargeItem).name
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const templateDetailList = ref([])
|
|
|
+const queryTemplateDeatil = ()=>{
|
|
|
+ if(stringIsBlank(formDiscount.value.chargeItem)){
|
|
|
+ return ElMessage.error('请选择组合套餐项目编码')
|
|
|
+ }
|
|
|
+ templateVisible.value = true
|
|
|
+ let param = {code:formDiscount.value.chargeItem}
|
|
|
+ queryTemplateDetails(param).then((res:any)=>{
|
|
|
+ templateDetailList.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+// 查询号别明细
|
|
|
+const queryGhDeatil = ()=>{
|
|
|
+ ghTableList.value = []
|
|
|
+ ghTableList.value.push(ghList.value.find(item=>item.code == formDiscount.value.chargeItem))
|
|
|
+ ghVisible.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const ghList = ref([])
|
|
|
+const ghTableList = ref([])
|
|
|
+
|
|
|
+const queryChargeItemList= ()=>{
|
|
|
+ let param = {
|
|
|
+ discountClass:formDiscount.value.discountClass,
|
|
|
+ keyWard:chargeItemKeyWard.value
|
|
|
+ }
|
|
|
+ queryItemList(param).then((res:any)=>{
|
|
|
+ chargeItemList.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const templateVisible = ref(false)
|
|
|
+const ghVisible = ref(false)
|
|
|
+const templateList = ref([])
|
|
|
+
|
|
|
+const chargeItemKeyWard = ref('')
|
|
|
+const initChargeItemList = ()=>{
|
|
|
+ if(stringIsBlank(formDiscount.value.discountClass)){
|
|
|
+ return ElMessage.error('请选择类别')
|
|
|
+ }
|
|
|
+ queryChargeItemList()
|
|
|
+}
|
|
|
+
|
|
|
+// 折扣率
|
|
|
+const discountTypeList = ref([
|
|
|
+ {code:'1',name:'折扣率'},
|
|
|
+])
|
|
|
+
|
|
|
+const discountTypeTable = [
|
|
|
+ {code:'1',name:'折扣率'},
|
|
|
+ {code:'2',name:'直接收费'},
|
|
|
+]
|
|
|
+
|
|
|
+// 状态
|
|
|
+const delFlagList = [
|
|
|
+ {code:0,name:'启用'},
|
|
|
+ {code:1,name:'停用'},
|
|
|
+]
|
|
|
+
|
|
|
+
|
|
|
+const jyjcTypeList = [
|
|
|
+ {code:'1',name:'检验'},
|
|
|
+ {code:'2',name:'检查'},
|
|
|
+]
|
|
|
+
|
|
|
+const getDiscountClassName = (code)=>{
|
|
|
+ return discountClassList.value.find(item=>item.code==code).name
|
|
|
+}
|
|
|
+
|
|
|
+const clearFormDiscountDataAndRefush = ()=>{
|
|
|
+ chargeItemKeyWard.value = ''
|
|
|
+ clearFormDiscountData()
|
|
|
+ queryDiscountDetail()
|
|
|
+}
|
|
|
+
|
|
|
+const clearFormDiscountData = ()=>{
|
|
|
+ formDiscount.value = {
|
|
|
+ id:null,
|
|
|
+ visitType:null,
|
|
|
+ discountClass:'',
|
|
|
+ chargeItem:'',
|
|
|
+ chargeName:'',
|
|
|
+ discountType:'',
|
|
|
+ discount:'',
|
|
|
+ startDate:'',
|
|
|
+ endDate:'',
|
|
|
+ delFlag:0,
|
|
|
+ visitName:'',
|
|
|
+ jyjcType: '',
|
|
|
+ opId:userIdCode.value,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 打开优惠明细编辑窗口
|
|
|
+const openDiscountDetailEdit = (row)=>{
|
|
|
+ if(row){
|
|
|
+ formDiscount.value = row
|
|
|
+ initDiscountType()
|
|
|
+ }
|
|
|
+ discountDialog.value = true
|
|
|
+}
|
|
|
+
|
|
|
+//保存优惠明细
|
|
|
+const saveDiscountData = ()=>{
|
|
|
+ if(formDiscount.value.visitType){
|
|
|
+ formDiscount.value.visitName = patientTypeParam.value.patientTypeList.find(item=>item.id==formDiscount.value.visitType).name
|
|
|
+ }
|
|
|
+ formDiscount.value.opId = userIdCode.value
|
|
|
+ saveZdDiscountDetail(formDiscount.value).then(res=>{
|
|
|
+ clearFormDiscountData()
|
|
|
+ discountDialog.value = false
|
|
|
+ queryDiscountDetail()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const discountDialog = ref(false)
|
|
|
+const innerVisible = ref(false)
|
|
|
+
|
|
|
+const itemDetailList = ref([])
|
|
|
+
|
|
|
+const formDiscount = ref({
|
|
|
+ id:null,
|
|
|
+ visitType:null,
|
|
|
+ discountClass:'',
|
|
|
+ chargeItem:'',
|
|
|
+ chargeName:'',
|
|
|
+ discountType:'',
|
|
|
+ discount:'',
|
|
|
+ startDate:'',
|
|
|
+ endDate:'',
|
|
|
+ delFlag:0,
|
|
|
+ visitName:'',
|
|
|
+ jyjcType:'',
|
|
|
+ opId:userIdCode.value,
|
|
|
+})
|
|
|
+
|
|
|
+const updateDiscountDelFlag = (row,delFlag)=>{
|
|
|
+ updateZdDiscountDetailDelFlag({id:row.id,delFlag:delFlag}).then(res=>{
|
|
|
+ queryDiscountDetail()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const discountDetailData = ref([])
|
|
|
+
|
|
|
+// 查询优惠明细
|
|
|
+const queryDiscountDetail = ()=>{
|
|
|
+ queryZdDiscountDetail(discountDetailParam.value).then((res:any)=>{
|
|
|
+ discountDetailData.value = res.records
|
|
|
+ discountDetailParam.value.total = res.total
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const queryVisitType = ()=>{
|
|
|
+ queryZdVisitTypeNew({}).then((res:any)=>{
|
|
|
+ visitTypeTableData.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const formVisitType = ref({
|
|
|
+ name:'',
|
|
|
+ id:null,
|
|
|
+ startDate:'',
|
|
|
+ endDate:'',
|
|
|
+ delFlag:null,
|
|
|
+})
|
|
|
+
|
|
|
+const visitTypeDialog = ref(false)
|
|
|
+
|
|
|
+const visitTypeTableData = ref([])
|
|
|
+//修改身份类型
|
|
|
+const editVisitType=(row)=>{
|
|
|
+ console.log('row',row)
|
|
|
+ formVisitType.value = row
|
|
|
+ visitTypeDialog.value = true
|
|
|
+}
|
|
|
+
|
|
|
+const visitUserParam = ref({
|
|
|
+ pageSize:30,
|
|
|
+ currentPage:1,
|
|
|
+ keyWard:'',
|
|
|
+ id:null,
|
|
|
+ total:0,
|
|
|
+ patientTypeParams:[]
|
|
|
+})
|
|
|
+
|
|
|
+// 修改病人身份
|
|
|
+const updatePatientVisitType = (row)=>{
|
|
|
+ patientTypeParam.value.code = row.visitId
|
|
|
+ patientTypeParam.value.patientId = row.patientId
|
|
|
+ patientTypeDialog.value = true
|
|
|
+}
|
|
|
+// 删除身份
|
|
|
+const delPatientVisitType =(row)=>{
|
|
|
+ delZdVisitTypeUser({patientId:row.patientId}).then(res=>{
|
|
|
+ queryPatient()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const visitUserData = ref([])
|
|
|
+const patientTypeDialog = ref(false)
|
|
|
+const patientTypeParam = ref({
|
|
|
+ code :null,
|
|
|
+ patientId:'',
|
|
|
+ patientTypeList:[]
|
|
|
+})
|
|
|
+
|
|
|
+// 保存病人身份信息
|
|
|
+const savePatientTypeData = ()=>{
|
|
|
+ saveZdVisitTypeUser({patientId:patientTypeParam.value.patientId,id:patientTypeParam.value.code,opId:userIdCode.value}).then(res=>{
|
|
|
+ queryPatient()
|
|
|
+ patientTypeDialog.value = false
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const handleDiscountDetailSizeChange = (val) => {
|
|
|
+ discountDetailParam.value.pageSize = val
|
|
|
+ queryDiscountDetail()
|
|
|
+}
|
|
|
+
|
|
|
+const handleDiscountDetailCurrentChange = (val) => {
|
|
|
+ discountDetailParam.value.currentPage = val
|
|
|
+ queryDiscountDetail()
|
|
|
+}
|
|
|
+
|
|
|
+const handleSizeChange = (val) => {
|
|
|
+ visitUserParam.value.pageSize = val
|
|
|
+ queryPatient()
|
|
|
+}
|
|
|
+const handleCurrentChange = (val) => {
|
|
|
+ visitUserParam.value.currentPage = val
|
|
|
+ queryPatient()
|
|
|
+}
|
|
|
+// 查询病人信息
|
|
|
+const queryPatient = ()=>{
|
|
|
+ queryPatientInfo(visitUserParam.value).then(res=>{
|
|
|
+ visitUserData.value = res.records
|
|
|
+ visitUserParam.value.total = res.total
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const clearVisitTypeData =()=>{
|
|
|
+ formVisitType.value.id= null
|
|
|
+ formVisitType.value.name= ''
|
|
|
+ formVisitType.value.startDate= ''
|
|
|
+ formVisitType.value.endDate= ''
|
|
|
+ formVisitType.value.delFlag= null
|
|
|
+}
|
|
|
+
|
|
|
+const formVisitTypeRef =ref<FormInstance>()
|
|
|
+const saveVisitType = ()=>{
|
|
|
+ if(formVisitType.value.id){
|
|
|
+ updateZdVisitTypeNew(formVisitType.value).then(res=>{
|
|
|
+ clearVisitTypeData()
|
|
|
+ visitTypeDialog.value = false
|
|
|
+ queryVisitType()
|
|
|
+ refushZdVisitTypeNew()
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ insertZdVisitTypeNew(formVisitType.value).then((res)=>{
|
|
|
+ clearVisitTypeData()
|
|
|
+ visitTypeDialog.value = false
|
|
|
+ queryVisitType()
|
|
|
+ refushZdVisitTypeNew()
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const useVisitType = (delFlag,id)=>{
|
|
|
+ let param = {delFlag:delFlag,id:id}
|
|
|
+ delZdVisitTypeNew(param).then(res=>{
|
|
|
+ queryVisitType()
|
|
|
+ refushZdVisitTypeNew()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 新增身份信息
|
|
|
+const addVisitType =() =>{
|
|
|
+ clearVisitTypeData()
|
|
|
+ visitTypeDialog.value = true
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+
|
|
|
+</style>
|