Bläddra i källkod

增加请假外出导出

unknown 2 månader sedan
förälder
incheckning
fbafc50113

+ 5 - 0
src/api/elderly/elder/outwardRegustration/index.ts

@@ -61,6 +61,11 @@ export const getTempOutList = (data) => {
   })
 }
 
+//
+export const exportAskLeave = async (params) => {
+  return await request.download({ url: `/elderly/askLeave/exportExcel`, params })
+}
+
 // 查询详情
 export const getOutboundRefundConfigList = (params) => {
   return request.get({

+ 10 - 1
src/views/elderly/elder/outward-registration/index.vue

@@ -56,6 +56,10 @@
         <Icon icon="ep:plus" class="mr-5px" />
         外出登记
       </el-button>
+      <el-button type="warning" plain @click="openImport()"  >
+        <Icon icon="ep:download" class="mr-5px" />
+        导出
+      </el-button>
       <el-text style="color: #aaaaaa; margin-left: 5px">(根据外出退费配置生成缴费单)</el-text>
     </div>
     <el-table v-loading="loading" :data="list" :header-cell-style="tableHeaderColor">
@@ -136,12 +140,13 @@
 import Form from '@/views/elderly/elder/outward-registration/Form.vue'
 import ReturnHospitalForm from '@/views/elderly/elder/outward-registration/ReturnHospitalForm.vue'
 import {
-  deleteASK,
+  deleteASK, exportAskLeave,
   getAskLeList,
   getOutboundRefundConfigList
 } from '@/api/elderly/elder/outwardRegustration'
 import { useUserStore } from '@/store/modules/user'
 import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
+import download from "@/utils/download";
 defineOptions({ name: 'OutwardRegistration' })
 const userStore = useUserStore()
 const message = useMessage() // 消息弹窗
@@ -198,6 +203,10 @@ const resetQuery = () => {
   handleQuery()
 }
 
+const openImport = async () => {
+   const data = await exportAskLeave(queryParams)
+  download.excel(data, '外出登记.xls')
+}
 
 const getOutboundRefundConfigListFun = () => {
   getOutboundRefundConfigList()