Sfoglia il codice sorgente

成本子模块功能开发和回款统计BUG修复

songxy 1 anno fa
parent
commit
e35c9216d8

+ 6 - 1
client/src/views/OaSystem/financialManagement/bzjglPage/index.vue

@@ -148,7 +148,12 @@
               <div class="operateBtn" @click="operateClick(scope.row)">
                 <span>查看</span>
               </div>
-              <div class="operateBtn" @click="openForm(scope.row)" v-if="scope.row.iwriteOff == 0">
+              <div
+                v-hasPermi="['bzj-cancel']"
+                class="operateBtn"
+                @click="openForm(scope.row)"
+                v-if="scope.row.iwriteOff == 0"
+              >
                 <span>核销</span>
               </div>
             </div>

+ 6 - 1
client/src/views/OaSystem/financialManagement/loan/loan.vue

@@ -113,7 +113,12 @@
               <div class="operateBtn" @click="operateClick(scope.row)">
                 <span>查看</span>
               </div>
-              <div class="operateBtn" @click="openForm(scope.row)" v-if="scope.row.isVerify == 0">
+              <div
+                v-hasPermi="['loan-cancel']"
+                class="operateBtn"
+                @click="openForm(scope.row)"
+                v-if="scope.row.isVerify == 0"
+              >
                 <span>核销</span>
               </div>
             </div>

+ 1 - 1
client/src/views/OaSystem/marketCenter/returnMessage/MessageTop.vue

@@ -67,7 +67,7 @@ const getMoneyCount = async (year) => {
     {
       url: '/contract-message/count-amount',
       data: {
-        year: dayjs(year).format('YYYY'),
+        year: year instanceof Date ? dayjs(year).format('YYYY') : year,
         managerId,
         deptId
       }

+ 1 - 1
client/src/views/OaSystem/projectCenter/projectBook/projectBook.vue

@@ -89,7 +89,7 @@
             <template #default="scope">{{ scope.row.contractBalance ?? 0 }}</template>
           </el-table-column>
           <el-table-column prop="projectCost" align="center" label="项目总成本" width="120">
-            <template #default="scope">{{ scope.projectCost ?? 0 }}</template>
+            <template #default="scope">{{ scope.row.projectCost ?? 0 }}</template>
           </el-table-column>
           <el-table-column prop="xmzt" label="项目状态" width="120">
             <template #default="scope">

+ 38 - 17
client/src/views/OaSystem/projectCenter/projectDetail/components/xmcb/index.vue

@@ -79,29 +79,40 @@
               }}
             </template>
           </el-table-column>
-          <el-table-column prop="paymentCost" label="用款成本(元)" />
+          <el-table-column prop="paymentCost" label="用款成本(元)">
+            <template #default="scope">
+              <span class="btn_text" @click="clickHandler(0, scope.row['countDate'])">{{
+                scope.row['reimbursementCost']
+              }}</span>
+            </template>
+          </el-table-column>
           <el-table-column prop="reimbursementCost" label="普通报销成本(元)">
             <template #default="scope">
-              <span class="btn_text" @click="clickHandler(0)">{{
+              <span class="btn_text" @click="clickHandler(1, scope.row['countDate'])">{{
                 scope.row['reimbursementCost']
               }}</span>
             </template>
           </el-table-column>
           <el-table-column prop="travelCost" label="出差成本(元)">
             <template #default="scope">
-              <span class="btn_text" @click="clickHandler(1)">{{ scope.row['travelCost'] }}</span>
+              <span class="btn_text" @click="clickHandler(2, scope.row['countDate'])">{{
+                scope.row['travelCost']
+              }}</span>
             </template>
           </el-table-column>
         </el-table>
       </div>
     </div>
 
-    <el-dialog v-model="costVisible" :title="costTitle" width="75%" append-to-body>
+    <el-dialog v-model="costVisible" top="8vh" :title="costTitle" width="75%">
       <template v-if="costIndex === 0">
-        <normal-cost />
+        <usemoney-cost ref="usemoneyRef" />
       </template>
       <template v-else-if="costIndex === 1">
-        <travel-cost />
+        <normal-cost ref="normalRef" />
+      </template>
+      <template v-else-if="costIndex === 2">
+        <travel-cost ref="travelRef" />
       </template>
     </el-dialog>
   </div>
@@ -110,6 +121,7 @@
 import { useRoute } from 'vue-router'
 import request from '@/config/axios'
 import { getProjectWithChildrenById } from '@/service/project'
+import UsemoneyCost from './usemoneyCost.vue'
 import NormalCost from './normalCost.vue'
 import TravelCost from './travelCost.vue'
 
@@ -208,19 +220,28 @@ const queryProjectCostByPage = async (): Promise<void> => {
 const costVisible = ref<boolean>(false)
 const costIndex = ref<number>(0)
 const costTitle = ref<string>('项目普通报销成本查看')
-const clickHandler = (index: number) => {
-  // const router = useRouter()
-  // if (index === 0) {
-  //   router.push({
-  //     path: 'oaSystem/financialManagement/ptbxPage',
-  //     query: {
-  //       projectId: projectId.value,
-  //     }
-  //   })
-  // }
+const usemoneyRef = ref<HTMLElement | null>(null)
+const normalRef = ref(null)
+const travelRef = ref(null)
+const clickHandler = (index: number, countDate: string) => {
   costVisible.value = true
   costIndex.value = index
-  costTitle.value = index === 0 ? '项目普通报销成本查看' : '项目出差成本查看'
+  if (index === 0) {
+    costTitle.value = '用款成本查看'
+    nextTick(() => {
+      usemoneyRef?.value?.initDetailCoast(projectIds.value, countDate)
+    })
+  } else if (index === 1) {
+    costTitle.value = '项目普通报销成本查看'
+    nextTick(() => {
+      normalRef?.value?.initDetailCoast(projectIds.value, countDate)
+    })
+  } else if (index === 2) {
+    costTitle.value = '项目出差成本查看'
+    nextTick(() => {
+      travelRef?.value?.initDetailCoast(projectIds.value, countDate)
+    })
+  }
 }
 </script>
 <style lang="scss" scoped>

+ 100 - 144
client/src/views/OaSystem/projectCenter/projectDetail/components/xmcb/normalCost.vue

@@ -3,32 +3,19 @@
     <div class="searchBox">
       <div class="form">
         <span class="formSpan">报销单号:</span>
-        <el-input v-model="queryParams.xmmc" placeholder="请输入报销单号" style="width: 210px" />
-      </div>
-      <div class="form">
-        <span class="formSpan">申请时间:</span>
-        <el-date-picker
-          v-model="queryParams.xmbh"
-          type="daterange"
-          range-separator="To"
-          start-placeholder="开始时间"
-          end-placeholder="结束时间"
-        />
-      </div>
-      <div class="form form-time-range">
-        <span class="formSpan">立项时间:</span>
-        <el-date-picker
-          v-model="lxsjObj"
-          type="daterange"
-          unlink-panels
-          range-separator="To"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+        <el-input
+          v-model="queryParams.commonCostNo"
+          placeholder="请输入报销单号"
+          style="width: 210px"
         />
       </div>
       <div class="form">
         <span class="formSpan">报销总金额:</span>
-        <el-input v-model="queryParams.xmbh" placeholder="请输入报销总金额" style="width: 160px" />
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入用款总金额"
+          style="width: 160px"
+        />
       </div>
       <div class="from">
         <div class="btnBox">
@@ -43,8 +30,8 @@
       <ul>
         <li v-for="(item, index) in infoList" :key="index" class="mr-40px">
           <img class="mr-8px" :src="getAssetURL(item.icon)" alt="" />
-          <p>{{ item.name }}:</p>
-          <h4 class="font-size-18px">{{ item.num }}</h4>
+          <p>{{ item.name }}({{ totalAmount > 100000 ? '万元' : '元' }}):</p>
+          <h4 class="font-size-18px">{{ item.num / (totalAmount > 100000 ? 10000 : 1) }}</h4>
         </li>
       </ul>
     </div>
@@ -52,29 +39,42 @@
       <div class="table" ref="tableRef">
         <el-table
           stripe
+          max-height="480"
           :data="tableData"
-          style="width: 100%; height: 100%"
-          :style="{ height: tableHeight + 'px' }"
           :header-cell-style="{
             background: '#E5F0FB',
             color: '#233755',
             height: '50px'
           }"
         >
-          <el-table-column label="序号" width="60">
+          <el-table-column label="序号" width="80">
             <template #default="scope">{{ scope.$index + 1 }}</template>
           </el-table-column>
-          <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="报销单号" />
-          <el-table-column prop="xmbh" label="报销人" width="180" />
-          <el-table-column prop="projectTypeName" label="报销人部门" width="120" />
-          <el-table-column prop="zrbm" label="申请时间(元)" width="200" />
-          <el-table-column prop="lxsj" label="项目名称" width="120" />
-          <el-table-column prop="yssj" label="项目部门" width="120" />
-          <el-table-column prop="xmzt" label="状态" width="120" />
-          <el-table-column label="操作" fixed="right" width="80">
+          <el-table-column
+            :show-overflow-tooltip="true"
+            prop="commonCostNo"
+            label="报销单号"
+            width="180"
+          />
+          <el-table-column prop="userNickname" label="报销人" width="120" />
+          <el-table-column prop="deptName" label="报销部门" />
+          <el-table-column
+            prop="applyTime"
+            :formatter="dateFormatter2"
+            label="申请时间"
+            width="120"
+          />
+          <el-table-column prop="totalAmount" label="报销总金额" width="120" />
+          <el-table-column label="是否代办" align="center" prop="isAgent">
+            <template #default="scope">
+              <dict-tag :type="DICT_TYPE.COMMON_STATE" :value="scope.row.isAgent" />
+            </template>
+          </el-table-column>
+          <el-table-column prop="status" label="状态" align="center" width="120" />
+          <el-table-column label="操作" fixed="right" align="center" width="120">
             <template #default="scope">
               <div class="operateBtn" @click="operateClick(scope.row)">
-                <span>查看流程</span>
+                <span style="color: #2e77e6">查看流程</span>
               </div>
             </template>
           </el-table-column>
@@ -95,42 +95,29 @@
 </template>
 <script setup lang="ts">
 import moment from 'moment'
-import request from '@/config/axios'
+import { DICT_TYPE } from '@/utils/dict'
+import { dateFormatter2 } from '@/utils/formatTime'
+import * as CommonCostApi from '@/api/oa/commonCost'
 import { getAssetURL } from '@/utils/auth'
-import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 
-defineOptions({ name: 'ProjectBook' })
-const { wsCache } = useCache()
-const user = wsCache.get(CACHE_KEY.USER)
-const deptId = user.user.deptId ? user.user.deptId : ''
+defineOptions({ name: 'NormalCost' })
+
 const tableRef: any = ref(null)
 const tableHeight: any = ref(0)
 const queryParams = reactive<{
-  xmbh: string
-  xmmc: string
-  xmlbId: string
-  lxsjOn: string
-  lxsjOff: string
+  commonCostNo: string
+  totalAmount: string
+  flowFinishtime: string[]
+  projectIds: string[]
   pageNo: number
-  xzqdm: number | string
   pageSize: number
-  isSign: any
-  xmzt: any
-  hyId: any
-  deptId: string
 }>({
-  xmbh: '',
-  xmmc: '',
-  xmlbId: '15',
-  lxsjOn: '',
-  lxsjOff: '',
+  commonCostNo: '',
+  totalAmount: '',
+  flowFinishtime: [],
+  projectIds: [],
   pageNo: 1,
-  xzqdm: '',
-  pageSize: 15,
-  isSign: '',
-  xmzt: '',
-  hyId: 0,
-  deptId: deptId
+  pageSize: 10
 })
 const infoList: any = ref([
   {
@@ -149,42 +136,62 @@ const infoList: any = ref([
     num: '0'
   }
 ])
-
 const handleCurrentChange = (pageNo: number) => {
   queryParams.pageNo = pageNo
-  queryProjectListAjax()
+  getListAjax()
 }
-const operateClick = (row: any) => {}
 const tableData = ref<Array<any>>([])
 const total = ref<number>()
 const searchHandle: () => void = () => {
-  queryProjectListAjax()
+  getListAjax()
 }
-const queryProjectListAjax = async (): Promise<void> => {
-  const urlApi = `/project/page`
-  if (lxsjObj.value && lxsjObj.value.length > 0) {
-    queryParams.lxsjOn = moment(lxsjObj.value[0]).format('YYYY-MM-DD')
-    queryParams.lxsjOff = moment(lxsjObj.value[1]).format('YYYY-MM-DD')
-  } else {
-    queryParams.lxsjOn = ''
-    queryParams.lxsjOff = ''
-  }
-  const sendData = {
-    ...queryParams,
-    pageSize: 15
-  }
-  if (sendData['hyId'] == 0) {
-    sendData['hyId'] = null
+
+const loading = ref(true) // 列表的加载中
+const totalAmount = ref<number>(0)
+const initDetailCoast = (projectIds: string[], countDate: string) => {
+  queryParams.projectIds = projectIds
+  queryParams.flowFinishtime = [
+    moment(countDate).startOf('months').format('YYYY-MM-DD'),
+    moment(countDate).endOf('months').format('YYYY-MM-DD')
+  ]
+  getOverview()
+  getListAjax()
+}
+/** 查询概况 */
+const getOverview = async () => {
+  const data = await CommonCostApi.getCommonCostOverview(queryParams)
+  infoList.value[0].num = data.totalAmount
+  infoList.value[1].num = data.totalUseAmount
+  infoList.value[2].num = data.totalApplyAmount
+}
+const getListAjax = async (): Promise<void> => {
+  loading.value = true
+  try {
+    const data = await CommonCostApi.getCommonCostPage(queryParams)
+    tableData.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
   }
-  const result = await request.get({ url: urlApi, params: sendData }, '/business')
-  tableData.value = result['records']
-  total.value = result['total']
 }
-queryProjectListAjax()
-
+const router = useRouter()
+const operateClick = (row: any) => {
+  router.push({
+    path: '/processLook',
+    query: {
+      url:
+        `${
+          import.meta.env.VITE_PROCESS_DETAIL_URI
+        }/IFlowInstance/redirectFlowPage?flowInstanceId=` + row.instanceId
+    }
+  })
+}
 onMounted(() => {
   tableHeight.value = tableRef.value.clientHeight
 })
+defineExpose({
+  initDetailCoast
+})
 </script>
 
 <style lang="scss" scoped>
@@ -249,70 +256,19 @@ onMounted(() => {
     }
   }
 
-  .oa-sys-list-content,
   .tableBox {
     position: relative;
     width: 100%;
-    // height: calc(100% - 100px);
+    height: calc(100% - 100px);
     margin-top: 20px;
     flex: 1;
-
-    ._table,
-    .table {
+    > .table {
       width: 100%;
-      height: calc(100% - 40px);
-      display: block;
-      overflow: hidden;
-
-      :deep(.el-table) {
-        .el-table__inner-wrapper::before {
-          display: none;
-        }
-
-        .el-table__header-wrapper {
-          border-radius: 4px;
-        }
-
-        tr.el-table__row--striped td.el-table__cell {
-          background: #f7f7f7;
-        }
-      }
-
-      .operateBtnGroup {
-        > span {
-          color: #2e77e6;
-          white-space: nowrap;
-          margin: 0px 10px;
-          cursor: pointer;
-        }
-      }
-
-      .flex-btns {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-      }
-
-      .operateBtn {
-        display: flex;
-        width: 54px;
-        height: 24px;
-        cursor: pointer;
-        align-items: center;
-        justify-content: center;
-
-        span {
-          color: #2e77e6;
-          white-space: nowrap;
-        }
-      }
     }
-
-    .pageBox {
-      position: absolute;
-      right: 20px;
-      bottom: 0px;
-      text-align: right;
+    > .pageBox {
+      margin-top: 20px;
+      display: flex;
+      justify-content: flex-end;
     }
   }
 

+ 101 - 144
client/src/views/OaSystem/projectCenter/projectDetail/components/xmcb/travelCost.vue

@@ -3,32 +3,19 @@
     <div class="searchBox">
       <div class="form">
         <span class="formSpan">报销单号:</span>
-        <el-input v-model="queryParams.xmmc" placeholder="请输入报销单号" style="width: 210px" />
-      </div>
-      <div class="form">
-        <span class="formSpan">申请时间:</span>
-        <el-date-picker
-          v-model="queryParams.xmbh"
-          type="daterange"
-          range-separator="To"
-          start-placeholder="开始时间"
-          end-placeholder="结束时间"
-        />
-      </div>
-      <div class="form form-time-range">
-        <span class="formSpan">立项时间:</span>
-        <el-date-picker
-          v-model="lxsjObj"
-          type="daterange"
-          unlink-panels
-          range-separator="To"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
+        <el-input
+          v-model="queryParams.travelCostNo"
+          placeholder="请输入报销单号"
+          style="width: 210px"
         />
       </div>
       <div class="form">
         <span class="formSpan">报销总金额:</span>
-        <el-input v-model="queryParams.xmbh" placeholder="请输入报销总金额" style="width: 160px" />
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入用款总金额"
+          style="width: 160px"
+        />
       </div>
       <div class="from">
         <div class="btnBox">
@@ -43,8 +30,8 @@
       <ul>
         <li v-for="(item, index) in infoList" :key="index" class="mr-40px">
           <img class="mr-8px" :src="getAssetURL(item.icon)" alt="" />
-          <p>{{ item.name }}:</p>
-          <h4 class="font-size-18px">{{ item.num }}</h4>
+          <p>{{ item.name }}({{ totalAmount > 100000 ? '万元' : '元' }}):</p>
+          <h4 class="font-size-18px">{{ item.num / (totalAmount > 100000 ? 10000 : 1) }}</h4>
         </li>
       </ul>
     </div>
@@ -52,29 +39,43 @@
       <div class="table" ref="tableRef">
         <el-table
           stripe
+          max-height="480"
           :data="tableData"
-          style="width: 100%; height: 100%"
-          :style="{ height: tableHeight + 'px' }"
           :header-cell-style="{
             background: '#E5F0FB',
             color: '#233755',
             height: '50px'
           }"
         >
-          <el-table-column label="序号" width="60">
+          <el-table-column label="序号" width="80">
             <template #default="scope">{{ scope.$index + 1 }}</template>
           </el-table-column>
-          <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="报销单号" />
-          <el-table-column prop="xmbh" label="报销人" width="180" />
-          <el-table-column prop="projectTypeName" label="报销人部门" width="120" />
-          <el-table-column prop="zrbm" label="申请时间(元)" width="200" />
-          <el-table-column prop="lxsj" label="项目名称" width="120" />
-          <el-table-column prop="yssj" label="项目部门" width="120" />
-          <el-table-column prop="xmzt" label="状态" width="120" />
-          <el-table-column label="操作" fixed="right" width="80">
+          <el-table-column
+            :show-overflow-tooltip="true"
+            prop="travelCostNo"
+            label="报销单号"
+            width="180"
+          />
+          <el-table-column prop="userNickname" label="报销人" width="120" />
+          <el-table-column prop="deptName" label="报销部门" />
+          <el-table-column prop="totalAmount" label="报销总金额" width="120" />
+          <el-table-column align="center" label="差旅起止时间" width="240">
+            <template #default="scope">
+              <span>{{ dateFormatter2(null, null, scope.row.startTime) }}</span>
+              -
+              <span>{{ dateFormatter2(null, null, scope.row.endTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="是否代办" align="center" prop="isAgent">
+            <template #default="scope">
+              <dict-tag :type="DICT_TYPE.COMMON_STATE" :value="scope.row.isAgent" />
+            </template>
+          </el-table-column>
+          <el-table-column prop="status" label="状态" align="center" width="120" />
+          <el-table-column label="操作" fixed="right" align="center" width="120">
             <template #default="scope">
               <div class="operateBtn" @click="operateClick(scope.row)">
-                <span>查看流程</span>
+                <span style="color: #2e77e6">查看流程</span>
               </div>
             </template>
           </el-table-column>
@@ -95,42 +96,29 @@
 </template>
 <script setup lang="ts">
 import moment from 'moment'
-import request from '@/config/axios'
+import { DICT_TYPE } from '@/utils/dict'
+import { dateFormatter2 } from '@/utils/formatTime'
+import * as TravelCostApi from '@/api/oa/travelCost'
 import { getAssetURL } from '@/utils/auth'
-import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
 
-defineOptions({ name: 'ProjectBook' })
-const { wsCache } = useCache()
-const user = wsCache.get(CACHE_KEY.USER)
-const deptId = user.user.deptId ? user.user.deptId : ''
+defineOptions({ name: 'NormalCost' })
+
 const tableRef: any = ref(null)
 const tableHeight: any = ref(0)
 const queryParams = reactive<{
-  xmbh: string
-  xmmc: string
-  xmlbId: string
-  lxsjOn: string
-  lxsjOff: string
+  travelCostNo: string
+  totalAmount: string
+  flowFinishtime: string[]
+  projectIds: string[]
   pageNo: number
-  xzqdm: number | string
   pageSize: number
-  isSign: any
-  xmzt: any
-  hyId: any
-  deptId: string
 }>({
-  xmbh: '',
-  xmmc: '',
-  xmlbId: '15',
-  lxsjOn: '',
-  lxsjOff: '',
+  travelCostNo: '',
+  totalAmount: '',
+  flowFinishtime: [],
+  projectIds: [],
   pageNo: 1,
-  xzqdm: '',
-  pageSize: 15,
-  isSign: '',
-  xmzt: '',
-  hyId: 0,
-  deptId: deptId
+  pageSize: 10
 })
 const infoList: any = ref([
   {
@@ -149,42 +137,62 @@ const infoList: any = ref([
     num: '0'
   }
 ])
-
 const handleCurrentChange = (pageNo: number) => {
   queryParams.pageNo = pageNo
-  queryProjectListAjax()
+  getListAjax()
 }
-const operateClick = (row: any) => {}
 const tableData = ref<Array<any>>([])
 const total = ref<number>()
 const searchHandle: () => void = () => {
-  queryProjectListAjax()
+  getListAjax()
 }
-const queryProjectListAjax = async (): Promise<void> => {
-  const urlApi = `/project/page`
-  if (lxsjObj.value && lxsjObj.value.length > 0) {
-    queryParams.lxsjOn = moment(lxsjObj.value[0]).format('YYYY-MM-DD')
-    queryParams.lxsjOff = moment(lxsjObj.value[1]).format('YYYY-MM-DD')
-  } else {
-    queryParams.lxsjOn = ''
-    queryParams.lxsjOff = ''
-  }
-  const sendData = {
-    ...queryParams,
-    pageSize: 15
-  }
-  if (sendData['hyId'] == 0) {
-    sendData['hyId'] = null
+
+const loading = ref(true) // 列表的加载中
+const totalAmount = ref<number>(0)
+const initDetailCoast = (projectIds: string[], countDate: string) => {
+  queryParams.projectIds = projectIds
+  queryParams.flowFinishtime = [
+    moment(countDate).startOf('months').format('YYYY-MM-DD'),
+    moment(countDate).endOf('months').format('YYYY-MM-DD')
+  ]
+  getOverview()
+  getListAjax()
+}
+/** 查询概况 */
+const getOverview = async () => {
+  const data = await TravelCostApi.getTravelCostOverview(queryParams)
+  infoList.value[0].num = data.totalAmount
+  infoList.value[1].num = data.totalUseAmount
+  infoList.value[2].num = data.totalApplyAmount
+}
+const getListAjax = async (): Promise<void> => {
+  loading.value = true
+  try {
+    const data = await TravelCostApi.getTravelCostPage(queryParams)
+    tableData.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
   }
-  const result = await request.get({ url: urlApi, params: sendData }, '/business')
-  tableData.value = result['records']
-  total.value = result['total']
 }
-queryProjectListAjax()
-
+const router = useRouter()
+const operateClick = (row: any) => {
+  router.push({
+    path: '/processLook',
+    query: {
+      url:
+        `${
+          import.meta.env.VITE_PROCESS_DETAIL_URI
+        }/IFlowInstance/redirectFlowPage?flowInstanceId=` + row.instanceId
+    }
+  })
+}
 onMounted(() => {
   tableHeight.value = tableRef.value.clientHeight
 })
+defineExpose({
+  initDetailCoast
+})
 </script>
 
 <style lang="scss" scoped>
@@ -249,70 +257,19 @@ onMounted(() => {
     }
   }
 
-  .oa-sys-list-content,
   .tableBox {
     position: relative;
     width: 100%;
-    // height: calc(100% - 100px);
+    height: calc(100% - 100px);
     margin-top: 20px;
     flex: 1;
-
-    ._table,
-    .table {
+    > .table {
       width: 100%;
-      height: calc(100% - 40px);
-      display: block;
-      overflow: hidden;
-
-      :deep(.el-table) {
-        .el-table__inner-wrapper::before {
-          display: none;
-        }
-
-        .el-table__header-wrapper {
-          border-radius: 4px;
-        }
-
-        tr.el-table__row--striped td.el-table__cell {
-          background: #f7f7f7;
-        }
-      }
-
-      .operateBtnGroup {
-        > span {
-          color: #2e77e6;
-          white-space: nowrap;
-          margin: 0px 10px;
-          cursor: pointer;
-        }
-      }
-
-      .flex-btns {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-      }
-
-      .operateBtn {
-        display: flex;
-        width: 54px;
-        height: 24px;
-        cursor: pointer;
-        align-items: center;
-        justify-content: center;
-
-        span {
-          color: #2e77e6;
-          white-space: nowrap;
-        }
-      }
     }
-
-    .pageBox {
-      position: absolute;
-      right: 20px;
-      bottom: 0px;
-      text-align: right;
+    > .pageBox {
+      margin-top: 20px;
+      display: flex;
+      justify-content: flex-end;
     }
   }
 

+ 298 - 0
client/src/views/OaSystem/projectCenter/projectDetail/components/xmcb/usemoneyCost.vue

@@ -0,0 +1,298 @@
+<template>
+  <div class="cost_box">
+    <div class="searchBox">
+      <div class="form">
+        <span class="formSpan">用款单号:</span>
+        <el-input
+          v-model="queryParams.useMoneyNo"
+          placeholder="请输入用款单号"
+          style="width: 210px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">报销总金额:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入用款总金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="from">
+        <div class="btnBox">
+          <el-button type="primary" style="background: #3485ff" @click="searchHandle">
+            <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
+            查询</el-button
+          >
+        </div>
+      </div>
+    </div>
+    <div class="infoBox">
+      <ul>
+        <li v-for="(item, index) in infoList" :key="index" class="mr-40px">
+          <img class="mr-8px" :src="getAssetURL(item.icon)" alt="" />
+          <p>{{ item.name }}({{ totalAmount > 100000 ? '万元' : '元' }}):</p>
+          <h4 class="font-size-18px">{{ item.num / (totalAmount > 100000 ? 10000 : 1) }}</h4>
+        </li>
+      </ul>
+    </div>
+    <div class="tableBox">
+      <div class="table" ref="tableRef">
+        <el-table
+          stripe
+          max-height="480"
+          :data="tableData"
+          :header-cell-style="{
+            background: '#E5F0FB',
+            color: '#233755',
+            height: '50px'
+          }"
+        >
+          <el-table-column label="序号" width="80">
+            <template #default="scope">{{ scope.$index + 1 }}</template>
+          </el-table-column>
+          <el-table-column
+            :show-overflow-tooltip="true"
+            prop="useMoneyNo"
+            label="用款单号"
+            width="180"
+          />
+          <el-table-column prop="userNickname" label="申请人" width="120" />
+          <el-table-column prop="deptName" label="申请部门" />
+          <el-table-column
+            prop="applyTime"
+            :formatter="dateFormatter2"
+            label="申请时间"
+            width="120"
+          />
+          <el-table-column prop="totalAmount" label="用款总金额" width="120" />
+          <el-table-column
+            prop="agreedPayTime"
+            :formatter="dateFormatter2"
+            label="约定付款期限"
+            width="120"
+          />
+          <el-table-column prop="status" label="状态" align="center" width="120" />
+          <el-table-column label="操作" fixed="right" align="center" width="120">
+            <template #default="scope">
+              <div class="operateBtn" @click="operateClick(scope.row)">
+                <span style="color: #2e77e6">查看流程</span>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="pageBox">
+        <el-pagination
+          v-model:current-page="queryParams.pageNo"
+          :page-size="10"
+          background
+          layout="total, prev, pager, next, jumper"
+          :total="total"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+<script setup lang="ts">
+import moment from 'moment'
+import { dateFormatter2 } from '@/utils/formatTime'
+import * as UseMoneyApi from '@/api/oa/useMoney'
+import { getAssetURL } from '@/utils/auth'
+
+defineOptions({ name: 'UseMoneyCost' })
+
+const tableRef: any = ref(null)
+const tableHeight: any = ref(0)
+const queryParams = reactive<{
+  useMoneyNo: string
+  totalAmount: string
+  finishOn: string
+  finishOff: string
+  project: string[]
+  pageNo: number
+  pageSize: number
+}>({
+  useMoneyNo: '',
+  totalAmount: '',
+  finishOn: '',
+  finishOff: '',
+  project: [],
+  pageNo: 1,
+  pageSize: 10
+})
+const infoList: any = ref([
+  {
+    icon: 'xmzx/xmzcz',
+    name: '用款总金额',
+    num: '0'
+  },
+  {
+    icon: 'xmzx/xmzcb',
+    name: '已用款总金额',
+    num: '0'
+  },
+  {
+    icon: 'xmzx/xmzlr',
+    name: '申请用款总金额',
+    num: '0'
+  }
+])
+const handleCurrentChange = (pageNo: number) => {
+  queryParams.pageNo = pageNo
+  getListAjax()
+}
+const tableData = ref<Array<any>>([])
+const total = ref<number>()
+const searchHandle: () => void = () => {
+  getListAjax()
+}
+
+const loading = ref(true) // 列表的加载中
+const totalAmount = ref<number>(0)
+const initDetailCoast = (projectIds: string[], countDate: string) => {
+  queryParams.project = projectIds
+  queryParams.finishOn = moment(countDate).startOf('months').format('YYYY-MM-DD')
+  queryParams.finishOff = moment(countDate).endOf('months').format('YYYY-MM-DD')
+  getOverview()
+  getListAjax()
+}
+/** 查询概况 */
+const getOverview = async () => {
+  const data = await UseMoneyApi.getUseMoneyOverview(queryParams)
+  infoList.value[0].num = data.totalAmount
+  infoList.value[1].num = data.totalUseAmount
+  infoList.value[2].num = data.totalApplyAmount
+  infoList.value[0].name = '用款总金额'
+  infoList.value[1].name = '已用款总金额'
+  infoList.value[2].name = '申请用款总金额'
+  totalAmount.value = data.totalAmount
+}
+const getListAjax = async (): Promise<void> => {
+  loading.value = true
+  try {
+    const data = await UseMoneyApi.getUseMoneyPage(queryParams)
+    tableData.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
+  }
+}
+const router = useRouter()
+const operateClick = (row: any) => {
+  router.push({
+    path: '/processLook',
+    query: {
+      url:
+        `${
+          import.meta.env.VITE_PROCESS_DETAIL_URI
+        }/IFlowInstance/redirectFlowPage?flowInstanceId=` + row.instanceId
+    }
+  })
+}
+onMounted(() => {
+  tableHeight.value = tableRef.value.clientHeight
+})
+defineExpose({
+  initDetailCoast
+})
+</script>
+
+<style lang="scss" scoped>
+.cost_box {
+  height: 100%;
+  background: #fff;
+  border-radius: 20px;
+  display: flex;
+  flex-direction: column;
+  .oa-sys-top-search,
+  .searchBox {
+    display: flex;
+    width: 100%;
+    padding: 10px 30px;
+    background: #eaf5fd;
+    border-radius: 4px;
+    box-sizing: border-box;
+    align-items: center;
+    flex-wrap: wrap;
+
+    .form {
+      display: flex;
+      width: 240px;
+      margin: 5px 0;
+      margin-right: 16px;
+      align-items: center;
+      flex-shrink: 0;
+
+      &.form-time-range {
+        width: 380px;
+      }
+
+      :deep(.el-input) {
+        width: 160px;
+      }
+
+      :deep(.el-table--default) {
+        .el-table thead th {
+          .cell {
+            white-space: nowrap;
+          }
+        }
+
+        .el-table__cell {
+          padding: 14px 0;
+        }
+      }
+
+      .formSpan {
+        width: 80px;
+        font-size: 16px;
+        color: #505a69;
+        white-space: nowrap;
+        flex-shrink: 0;
+        margin-right: 10px;
+      }
+
+      .btnBox {
+        display: flex;
+        align-items: center;
+      }
+    }
+  }
+
+  .tableBox {
+    position: relative;
+    width: 100%;
+    height: calc(100% - 100px);
+    margin-top: 20px;
+    flex: 1;
+    > .table {
+      width: 100%;
+    }
+    > .pageBox {
+      margin-top: 20px;
+      display: flex;
+      justify-content: flex-end;
+    }
+  }
+
+  .infoBox {
+    width: 100%;
+    margin-top: 20px;
+
+    ul {
+      display: flex;
+      width: 100%;
+      height: 100%;
+      padding: 0 20px;
+      align-items: center;
+
+      li {
+        display: flex;
+        list-style: none;
+        align-items: center;
+      }
+    }
+  }
+}
+</style>

+ 0 - 2
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.vue

@@ -220,8 +220,6 @@ const addSubProject: () => void = () => {
  */
 const projectTerminateHandler = async () => {
   const id = projectDetail.value.id
-  console.log(id)
-  return
   if (!id) {
     console.error('项目ID不存在!')
     return

+ 2 - 2
client/src/views/OaSystem/projectCenter/purchaseContract/deptContract.vue

@@ -157,8 +157,8 @@
           <el-table-column prop="contractAmount" label="合同金额" width="100" align="center">
             <template #default="scope">{{ scope.row.contractAmount ?? 0 }}</template>
           </el-table-column>
-          <el-table-column prop="receivedAmount" label="已回款金额" width="200" align="center">
-            <template #default="scope">{{ scope.row.receivedAmount ?? 0 }}</template>
+          <el-table-column prop="returnAmount" label="已回款金额" width="200" align="center">
+            <template #default="scope">{{ scope.row.returnAmount ?? 0 }}</template>
           </el-table-column>
           <el-table-column prop="receivableAmount" label="应收账款" width="100" align="center">
             <template #default="scope">{{ scope.row.receivableAmount ?? 0 }}</template>

+ 2 - 2
client/src/views/OaSystem/projectCenter/purchaseContract/myContract.vue

@@ -145,8 +145,8 @@
           <el-table-column prop="contractAmount" label="合同金额" width="100" align="center">
             <template #default="scope">{{ scope.row.contractAmount ?? 0 }}</template>
           </el-table-column>
-          <el-table-column prop="receivedAmount" label="已回款金额" width="200" align="center">
-            <template #default="scope">{{ scope.row.receivedAmount ?? 0 }}</template>
+          <el-table-column prop="returnAmount" label="已回款金额" width="200" align="center">
+            <template #default="scope">{{ scope.row.returnAmount ?? 0 }}</template>
           </el-table-column>
           <el-table-column prop="receivableAmount" label="应收账款" width="100" align="center">
             <template #default="scope">{{ scope.row.receivableAmount ?? 0 }}</template>

+ 2 - 2
client/src/views/OaSystem/projectCenter/purchaseContract/purchaseContract.vue

@@ -138,8 +138,8 @@
           <el-table-column prop="contractAmount" label="合同金额" width="100" align="center">
             <template #default="scope">{{ scope.row.contractAmount ?? 0 }}</template>
           </el-table-column>
-          <el-table-column prop="receivedAmount" label="已回款金额" width="200" align="center">
-            <template #default="scope">{{ scope.row.receivedAmount ?? 0 }}</template>
+          <el-table-column prop="returnAmount" label="已回款金额" width="200" align="center">
+            <template #default="scope">{{ scope.row.returnAmount ?? 0 }}</template>
           </el-table-column>
           <el-table-column prop="receivableAmount" label="应收账款" width="100" align="center">
             <template #default="scope">{{ scope.row.receivableAmount ?? 0 }}</template>