|
@@ -221,7 +221,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import * as kpglApi from '@/api/oa/kpgl'
|
|
|
import { openProcessFlow } from '@/utils/flow'
|
|
|
-import { DICT_TYPE, getIntDictOptions, getDictLabel } from '@/utils/dict'
|
|
|
+import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|
|
import { formatDate, dateFormatter2 } from '@/utils/formatTime'
|
|
|
import TableLayout from '../../oaViews/layout/TableLayout.vue'
|
|
|
import UserOrgTree from '@/views/OaSystem/components/UserOrgTree/index.vue'
|
|
@@ -284,21 +284,10 @@ const idList = ref<string[]>([])
|
|
|
const handleSelectionChange = (arrs) => {
|
|
|
idList.value = arrs.map((item) => item.id)
|
|
|
}
|
|
|
-/** 列表导出 */
|
|
|
-const getExportContractInvoiceListExcel = async () => {
|
|
|
- const sendData = {}
|
|
|
- if (idList.value.length > 0) {
|
|
|
- sendData['idList'] = idList.value
|
|
|
- }
|
|
|
- const data = await kpglApi.exportContractInvoiceListExcel(sendData)
|
|
|
- download.excel(data, '开票台账导出记录.xls')
|
|
|
-}
|
|
|
-const loading = ref(true) // 列表的加载中
|
|
|
-const total = ref(0) // 列表的总页数
|
|
|
-const list = ref([]) // 列表的数
|
|
|
-/** 查询列表 */
|
|
|
-const getList = async () => {
|
|
|
- loading.value = true
|
|
|
+/**
|
|
|
+ * 初始化查询时间类条件
|
|
|
+ */
|
|
|
+const initQueryParams = () => {
|
|
|
if (invoiceTime.value?.length > 0) {
|
|
|
queryParams.invoiceOn = formatDate(invoiceTime.value[0], 'YYYY-MM-DD')
|
|
|
queryParams.invoiceOff = formatDate(invoiceTime.value[1], 'YYYY-MM-DD')
|
|
@@ -313,6 +302,26 @@ const getList = async () => {
|
|
|
queryParams.returnOn = ''
|
|
|
queryParams.returnOff = ''
|
|
|
}
|
|
|
+}
|
|
|
+/** 列表导出 */
|
|
|
+const getExportContractInvoiceListExcel = async () => {
|
|
|
+ initQueryParams()
|
|
|
+ const sendData = {
|
|
|
+ ...queryParams
|
|
|
+ }
|
|
|
+ if (idList.value.length > 0) {
|
|
|
+ sendData['idList'] = idList.value
|
|
|
+ }
|
|
|
+ const data = await kpglApi.exportContractInvoiceListExcel(sendData)
|
|
|
+ download.excel(data, '开票台账导出记录.xls')
|
|
|
+}
|
|
|
+const loading = ref(true) // 列表的加载中
|
|
|
+const total = ref(0) // 列表的总页数
|
|
|
+const list = ref([]) // 列表的数
|
|
|
+/** 查询列表 */
|
|
|
+const getList = async () => {
|
|
|
+ loading.value = true
|
|
|
+ initQueryParams()
|
|
|
try {
|
|
|
const data = await kpglApi.queryContractInvoicePage(queryParams)
|
|
|
list.value = data.records
|
|
@@ -324,24 +333,11 @@ const getList = async () => {
|
|
|
//统计信息
|
|
|
const getStatics = async () => {
|
|
|
loading.value = true
|
|
|
- if (invoiceTime.value?.length > 0) {
|
|
|
- queryParams.invoiceOn = formatDate(invoiceTime.value[0], 'YYYY-MM-DD')
|
|
|
- queryParams.invoiceOff = formatDate(invoiceTime.value[1], 'YYYY-MM-DD')
|
|
|
- } else {
|
|
|
- queryParams.invoiceOn = ''
|
|
|
- queryParams.invoiceOff = ''
|
|
|
- }
|
|
|
- if (returnTime.value?.length > 0) {
|
|
|
- queryParams.returnOn = formatDate(returnTime.value[0], 'YYYY-MM-DD')
|
|
|
- queryParams.returnOff = formatDate(returnTime.value[1], 'YYYY-MM-DD')
|
|
|
- } else {
|
|
|
- queryParams.returnOn = ''
|
|
|
- queryParams.returnOff = ''
|
|
|
- }
|
|
|
+ initQueryParams()
|
|
|
const data = await kpglApi.getStatics(queryParams)
|
|
|
infoList.value[0].num = data?.ykp ?? 0
|
|
|
- infoList.value[1].num = data?.yhk ?? 0
|
|
|
- infoList.value[2].num = (data?.ykp ?? 0) - (data?.yhk ?? 0)
|
|
|
+ infoList.value[1].num = data?.periodReturnAmount ?? 0
|
|
|
+ infoList.value[2].num = (data?.ykp ?? 0) - (data?.periodReturnAmount ?? 0)
|
|
|
}
|
|
|
const handleCurrentChange = (pageNo: number) => {
|
|
|
queryParams.pageNo = pageNo
|