Ver código fonte

开票管理功能添加

ljy121 1 ano atrás
pai
commit
96688b7cf1

+ 320 - 0
client/src/views/OaSystem/financialManagement/kpglPage/deptIndex.vue

@@ -0,0 +1,320 @@
+<template>
+  <div class="_ptbxBook">
+    <div class="searchBox">
+      <div class="form">
+        <span class="formSpan">发票号码:</span>
+        <el-input
+          v-model="queryParams.commonCostNo"
+          placeholder="请输入发票号码"
+          style="width: 210px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票日期:</span>
+        <el-date-picker
+          v-model="queryParams.applyTime"
+          type="daterange"
+          unlink-panels
+          range-separator="到"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">合同编号:</span>
+        <el-input
+          v-model="queryParams.commonCostNo"
+          placeholder="请输入合同编号"
+          style="width: 210px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">合同名称:</span>
+        <el-input
+          v-model="queryParams.projectDeptId"
+          placeholder="请输入合同名称"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">项目编号:</span>
+        <el-input
+          v-model="queryParams.costType"
+          placeholder="请输入项目编号"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">项目名称:</span>
+        <el-input v-model="queryParams.status" style="width: 160px" />
+      </div>
+      <div class="form">
+        <span class="formSpan">付款单位:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入报销总金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">回款日期:</span>
+        <el-date-picker
+          v-model="queryParams.applyTime"
+          type="daterange"
+          unlink-panels
+          range-separator="到"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">未回款金额:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入报销总金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票状态:</span>
+        <el-input v-model="queryParams.status" style="width: 160px" />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票金额:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入开票金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票单位:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入开票金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form" style="margin-right: 80px">
+        <el-radio-group v-model="queryParams.isSign">
+          <el-radio label="1">未回款</el-radio>
+        </el-radio-group>
+      </div>
+      <div class="from">
+        <div class="btnBox">
+          <el-button type="primary" style="background: #3485ff" @click="handleQuery">
+            <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
+            查询</el-button
+          >
+          <el-button type="primary">
+            <img src="@/assets/imgs/OA/open.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">
+          <p>{{ item.name }}:</p>
+          <h4 class="font-size-18px">{{ item.num }}</h4>
+        </li>
+      </ul>
+    </div>
+    <div class="tableBox">
+      <div class="table" ref="tableRef">
+        <el-table
+          v-loading="loading"
+          :data="list"
+          style="width: 100%; height: 100%"
+          :style="{ height: tableHeight + 'px' }"
+          :header-cell-style="{
+            background: '#F7F8FA',
+            color: '#121518',
+            height: '50px'
+          }"
+          table-layout="fixed"
+        >
+          <el-table-column type="index" />
+          <el-table-column
+            align="center"
+            prop="invoiceNo"
+            show-overflow-tooltip="true"
+            label="发票号码"
+          />
+          <el-table-column
+            align="center"
+            prop="invoiceDate"
+            show-overflow-tooltip="true"
+            :formatter="dateFormatter"
+            label="开票日期"
+          />
+          <el-table-column
+            show-overflow-tooltip="true"
+            align="center"
+            prop="contractNumber"
+            label="合同编号"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="name"
+            label="合同名称"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="xmbh"
+            label="项目编号"
+          />
+          <el-table-column
+            show-overflow-tooltip="true"
+            align="center"
+            prop="xmmc"
+            label="项目名称"
+          />
+          <el-table-column
+            show-overflow-tooltip="true"
+            align="center"
+            prop="payCompany"
+            label="付款单位"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="invoiceContent"
+            label="开票内容"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="invoiceAmount"
+            label="开票金额(元)"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="invoiceAmount"
+            label="未回款金额(元)"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="returnDate"
+            label="回款日期"
+          />
+          <el-table-column prop="state" label="开票状态" width="100">
+            <template #default="scope">
+              {{ xmztMap[scope.row.flowStatus] }}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="操作" width="80">
+            <template #default="scope">
+              <div class="operateBtn" @click="operateClick(scope.row)">
+                <span>查看</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 * as kpglApi from '@/api/oa/kpgl'
+import { dateFormatter } from '@/utils/formatTime'
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
+
+defineOptions({ name: 'CommonCost' })
+const { wsCache } = useCache()
+const user = wsCache.get(CACHE_KEY.USER)
+const deptId = user.user.deptId ? user.user.deptId : ''
+const xmztMap: any = {
+  0: '开票中',
+  1: '回款完成',
+  2: '已开票',
+  3: '票已送达',
+  4: '部分回款',
+  20: '开票申请完成'
+}
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  commonCostNo: undefined,
+  userId: undefined,
+  deptId: deptId,
+  applyTime: [],
+  projectDeptId: undefined,
+  costType: undefined,
+  status: undefined,
+  totalAmount: undefined
+})
+const infoList: any = ref([
+  {
+    name: '已开票总金额(万元)',
+    num: 0
+  },
+  {
+    name: '已回款总金额(万元)',
+    num: 0
+  },
+  {
+    name: '未回款总金额(万元)',
+    num: 0
+  }
+])
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 列表的数
+
+/** 查询列表 */
+const getList = async () => {
+  loading.value = true
+  try {
+    const data = await kpglApi.getCommonCostPage(queryParams)
+    list.value = data.records
+    total.value = data.total
+  } finally {
+    loading.value = false
+  }
+}
+//统计信息
+const getStatics = async () => {
+  loading.value = true
+  const data = await kpglApi.getStatics(queryParams)
+  infoList.value[0].num = data.ykp
+  infoList.value[1].num = data.yhk
+  infoList.value[2].num = (data.ykp - data.yhk).toFixed(6)
+}
+const handleCurrentChange = (pageNo: number) => {
+  queryParams.pageNo = pageNo
+  getList()
+}
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.pageNo = 1
+  getList()
+  getStatics()
+}
+
+/** 初始化 */
+onMounted(() => {
+  getList()
+  getStatics()
+})
+</script>
+
+<style lang="scss" scoped>
+@import url(./ptbxBook.scss);
+</style>

+ 320 - 0
client/src/views/OaSystem/financialManagement/kpglPage/myIndex.vue

@@ -0,0 +1,320 @@
+<template>
+  <div class="_ptbxBook">
+    <div class="searchBox">
+      <div class="form">
+        <span class="formSpan">发票号码:</span>
+        <el-input
+          v-model="queryParams.commonCostNo"
+          placeholder="请输入发票号码"
+          style="width: 210px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票日期:</span>
+        <el-date-picker
+          v-model="queryParams.applyTime"
+          type="daterange"
+          unlink-panels
+          range-separator="到"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">合同编号:</span>
+        <el-input
+          v-model="queryParams.commonCostNo"
+          placeholder="请输入合同编号"
+          style="width: 210px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">合同名称:</span>
+        <el-input
+          v-model="queryParams.projectDeptId"
+          placeholder="请输入合同名称"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">项目编号:</span>
+        <el-input
+          v-model="queryParams.costType"
+          placeholder="请输入项目编号"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">项目名称:</span>
+        <el-input v-model="queryParams.status" style="width: 160px" />
+      </div>
+      <div class="form">
+        <span class="formSpan">付款单位:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入报销总金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">回款日期:</span>
+        <el-date-picker
+          v-model="queryParams.applyTime"
+          type="daterange"
+          unlink-panels
+          range-separator="到"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">未回款金额:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入报销总金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票状态:</span>
+        <el-input v-model="queryParams.status" style="width: 160px" />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票金额:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入开票金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form">
+        <span class="formSpan">开票单位:</span>
+        <el-input
+          v-model="queryParams.totalAmount"
+          placeholder="请输入开票金额"
+          style="width: 160px"
+        />
+      </div>
+      <div class="form" style="margin-right: 80px">
+        <el-radio-group v-model="queryParams.isSign">
+          <el-radio label="1">未回款</el-radio>
+        </el-radio-group>
+      </div>
+      <div class="from">
+        <div class="btnBox">
+          <el-button type="primary" style="background: #3485ff" @click="handleQuery">
+            <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
+            查询</el-button
+          >
+          <el-button type="primary">
+            <img src="@/assets/imgs/OA/open.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">
+          <p>{{ item.name }}:</p>
+          <h4 class="font-size-18px">{{ item.num }}</h4>
+        </li>
+      </ul>
+    </div>
+    <div class="tableBox">
+      <div class="table" ref="tableRef">
+        <el-table
+          v-loading="loading"
+          :data="list"
+          style="width: 100%; height: 100%"
+          :style="{ height: tableHeight + 'px' }"
+          :header-cell-style="{
+            background: '#F7F8FA',
+            color: '#121518',
+            height: '50px'
+          }"
+          table-layout="fixed"
+        >
+          <el-table-column type="index" />
+          <el-table-column
+            align="center"
+            prop="invoiceNo"
+            show-overflow-tooltip="true"
+            label="发票号码"
+          />
+          <el-table-column
+            align="center"
+            prop="invoiceDate"
+            show-overflow-tooltip="true"
+            :formatter="dateFormatter"
+            label="开票日期"
+          />
+          <el-table-column
+            show-overflow-tooltip="true"
+            align="center"
+            prop="contractNumber"
+            label="合同编号"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="name"
+            label="合同名称"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="xmbh"
+            label="项目编号"
+          />
+          <el-table-column
+            show-overflow-tooltip="true"
+            align="center"
+            prop="xmmc"
+            label="项目名称"
+          />
+          <el-table-column
+            show-overflow-tooltip="true"
+            align="center"
+            prop="payCompany"
+            label="付款单位"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="invoiceContent"
+            label="开票内容"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="invoiceAmount"
+            label="开票金额(元)"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="invoiceAmount"
+            label="未回款金额(元)"
+          />
+          <el-table-column
+            align="center"
+            show-overflow-tooltip="true"
+            prop="returnDate"
+            label="回款日期"
+          />
+          <el-table-column prop="state" label="开票状态" width="100">
+            <template #default="scope">
+              {{ xmztMap[scope.row.flowStatus] }}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="操作" width="80">
+            <template #default="scope">
+              <div class="operateBtn" @click="operateClick(scope.row)">
+                <span>查看</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 * as kpglApi from '@/api/oa/kpgl'
+import { dateFormatter } from '@/utils/formatTime'
+import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
+import { UserFilled } from 'node_modules/_@element-plus_icons-vue@2.3.1@@element-plus/icons-vue/dist/types'
+
+defineOptions({ name: 'CommonCost' })
+const { wsCache } = useCache()
+const user = wsCache.get(CACHE_KEY.USER)
+const userId = user.user.id ? user.user.id : ''
+const xmztMap: any = {
+  0: '开票中',
+  1: '回款完成',
+  2: '已开票',
+  3: '票已送达',
+  4: '部分回款',
+  20: '开票申请完成'
+}
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  commonCostNo: undefined,
+  managerId: userId,
+  applyTime: [],
+  projectDeptId: undefined,
+  costType: undefined,
+  status: undefined,
+  totalAmount: undefined
+})
+const infoList: any = ref([
+  {
+    name: '已开票总金额(万元)',
+    num: 0
+  },
+  {
+    name: '已回款总金额(万元)',
+    num: 0
+  },
+  {
+    name: '未回款总金额(万元)',
+    num: 0
+  }
+])
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 列表的数
+
+/** 查询列表 */
+const getList = async () => {
+  loading.value = true
+  try {
+    const data = await kpglApi.getCommonCostPage(queryParams)
+    list.value = data.records
+    total.value = data.total
+  } finally {
+    loading.value = false
+  }
+}
+//统计信息
+const getStatics = async () => {
+  loading.value = true
+  const data = await kpglApi.getStatics(queryParams)
+  infoList.value[0].num = data.ykp
+  infoList.value[1].num = data.yhk
+  infoList.value[2].num = (data.ykp - data.yhk).toFixed(6)
+}
+const handleCurrentChange = (pageNo: number) => {
+  queryParams.pageNo = pageNo
+  getList()
+}
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.pageNo = 1
+  getList()
+  getStatics()
+}
+
+/** 初始化 */
+onMounted(() => {
+  getList()
+  getStatics()
+})
+</script>
+
+<style lang="scss" scoped>
+@import url(./ptbxBook.scss);
+</style>

+ 4 - 4
zjugis-business/src/main/java/com/zjugis/business/bean/dto/ContractInvoiceDto.java

@@ -1,12 +1,8 @@
 package com.zjugis.business.bean.dto;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.zjugis.business.mybatis.entity.BaseEntity;
 import com.zjugis.framework.common.pojo.PageParam;
 import lombok.Data;
 
-import java.math.BigDecimal;
 import java.time.LocalDate;
 
 
@@ -43,6 +39,10 @@ public class ContractInvoiceDto extends PageParam {
      */
     private LocalDate bxdh;
 
+    private String deptId;
+
+    private String managerId;
+
 
 }
 

+ 9 - 0
zjugis-business/src/main/resources/mapper/oracle/ContractInvoiceMapper.xml

@@ -7,8 +7,17 @@
         LEFT JOIN CONTRACT T1 ON T1.ID=T.CONTRACT_ID
         LEFT JOIN PROJECT T2 ON T2.ID=T.PROJECT_ID
         LEFT JOIN CONTRACT_RETURN_MONEY T3 ON T3.CONTRACT_INVOICE_ID=T.ID
+        <if test="params != null and params.managerId != null and params.managerId != ''">
+            INNER JOIN CONTRACT_AREA_MANAGER am ON am.CONTRACT_ID = cm.CONTRACT_ID
+        </if>
         <where>
             T.ISVALID = 1
+            <if test="params != null and params.deptId != null and params.deptId != ''">
+                AND T2.ZRBM_ID = #{params.deptId}
+            </if>
+            <if test="params != null and params.managerId != null and params.managerId != ''">
+                AND am.AREA_MANAGER_ID = #{params.managerId}
+            </if>
         </where>
         ORDER BY
         APPLY_DATE