Browse Source

前端bug修复

chenjun 5 months ago
parent
commit
30f829e7d7

+ 10 - 0
client/src/api/oa/commonCost/index.ts

@@ -10,6 +10,11 @@ export const getCommonCostDeptPage = (params) => {
   return request.get({ url: '/CommonCost/page-dept', params }, '/business')
 }
 
+// 获得个人普通报销列表
+export const getCommonCostSelfPage = (params) => {
+  return request.get({ url: '/CommonCost/page-self', params }, '/business')
+}
+
 // 获得普通报销概况
 export const getCommonCostOverview = (params) => {
   return request.get({ url: '/CommonCost/overview', params }, '/business')
@@ -19,3 +24,8 @@ export const getCommonCostOverview = (params) => {
 export const getCommonCostDeptOverview = (params) => {
   return request.get({ url: '/CommonCost/overview-dept', params }, '/business')
 }
+
+// 获得个人普通报销概况
+export const getCommonCostSelfOverview = (params) => {
+  return request.get({ url: '/CommonCost/overview-self', params }, '/business')
+}

+ 2 - 2
client/src/views/OaSystem/mineCenter/rightChild/ptbx.vue

@@ -131,7 +131,7 @@ const list = ref([]) // 列表的数
 const getList = async () => {
   loading.value = true
   try {
-    const data = await CommonCostApi.getCommonCostPage(queryParams)
+    const data = await CommonCostApi.getCommonCostSelfPage(queryParams)
     list.value = data.list
     total.value = data.total
   } finally {
@@ -141,7 +141,7 @@ const getList = async () => {
 
 /** 查询概况 */
 const getOverview = async () => {
-  const data = await CommonCostApi.getCommonCostOverview(queryParams)
+  const data = await CommonCostApi.getCommonCostSelfOverview(queryParams)
   infoList.value[0].num = data.totalAmount
   infoList.value[1].num = data.totalUseAmount
   infoList.value[2].num = data.totalApplyAmount

+ 30 - 2
client/src/views/OaSystem/officeCenter/gdzccgsqPage/index.vue

@@ -108,7 +108,12 @@
             <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
             查询</el-button
           >
-          <el-button type="primary">
+          <el-button
+            type="primary"
+            style="background: #3485ff"
+            @click="handleExport"
+            :loading="exportLoading"
+          >
             <img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
             导出</el-button
           >
@@ -307,6 +312,7 @@ import * as DeptApi from '@/api/system/dept'
 import { defaultProps, handleTree } from '@/utils/tree'
 import { arrFlatten } from '../../attendanceCenter/attendAuth'
 import { openFlow } from '@/utils/flow'
+import download from '@/utils/download'
 import UserForm from './UserForm.vue'
 import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
 
@@ -330,6 +336,7 @@ const qrs: any = ref({
   custodian: '',
   assetModel: ''
 })
+const message = useMessage() // 消息弹窗
 const deptList = ref<Tree[]>([]) // 树形结构
 const deptSort: any = ref([])
 const initTreeDeps = async () => {
@@ -439,6 +446,28 @@ const keydonwHandle = (evt) => {
     console.log(evt)
   }
 }
+
+/** 导出按钮操作 */
+const exportLoading = ref(false)
+const handleExport = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const urlApi = `/assetProcure/list/excel`
+    const sendData = {
+      ...qrs,
+      pageSize: 10
+    }
+    const data = await request.download({ url: urlApi, params: sendData._rawValue }, '/business')
+    download.excel(data, '固定资产.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
 /**
  * 固定资产投资新增、编辑
  */
@@ -482,7 +511,6 @@ const queryAssetProcure = async () => {
   openFlow(router, result, '固定资产录入')
 }
 
-const message = useMessage() // 消息弹窗
 const onSaveHandle = async () => {
   try {
     const urlApi = `/AssetProcure/updateDetail`

+ 29 - 1
client/src/views/OaSystem/officeCenter/gdzccgsqPage/indexDept.vue

@@ -52,7 +52,12 @@
             <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
             查询</el-button
           >
-          <el-button type="primary">
+          <el-button
+            type="primary"
+            style="background: #3485ff"
+            @click="handleExport"
+            :loading="exportLoading"
+          >
             <img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
             导出</el-button
           >
@@ -133,6 +138,7 @@ import * as DeptApi from '@/api/system/dept'
 import * as AssetApi from '@/api/system/asset'
 import { defaultProps, handleTree } from '@/utils/tree'
 import { arrFlatten } from '../../attendanceCenter/attendAuth'
+import download from '@/utils/download'
 import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 import TableLayout from '../../oaViews/layout/TableLayout.vue'
 import * as UserApi from '@/api/system/user'
@@ -163,6 +169,7 @@ const qrs: any = ref({
 const deptList = ref<Tree[]>([]) // 树形结构
 const deptSort: any = ref([])
 const loading = ref(true) // 列表的加载中
+const message = useMessage() // 消息弹窗
 
 const initTreeDeps = async () => {
   DeptApi.getSimpleDeptList().then((res) => {
@@ -255,6 +262,27 @@ const initTreeUsers = async () => {
 }
 queryProjectListAjax()
 
+/** 导出按钮操作 */
+const exportLoading = ref(false)
+const handleExport = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const urlApi = `/assetProcure/list/excel`
+    const sendData = {
+      ...qrs,
+      pageSize: 10
+    }
+    const data = await request.download({ url: urlApi, params: sendData._rawValue }, '/business')
+    download.excel(data, '固定资产.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
 /**
  * 获取行政区tree结构数据
  */

+ 4 - 3
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.vue

@@ -1023,10 +1023,11 @@ const handleStartOutsourcing = () => startOutsourcingMutate(projectDetail.value.
  */
 const computedAttachAmountHandle = () => {
   mContractDetail.value.attachAmount =
-    (100 - parseFloatNumber(mContractDetail.value.attachRatio)) *
-    parseFloatNumber(mContractDetail.value.taxHsjeTotal)
+    ((100 - parseFloatNumber(mContractDetail.value.attachRatio)) *
+      parseFloatNumber(mContractDetail.value.taxHsjeTotal)) /
+    100
 }
 </script>
 <style lang="scss" scoped>
-@import './index.scss';
+@import url('./index.scss');
 </style>