|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
<a-modal width="1500px" @cancel="openFlag = false" :visible="openFlag" title="添加付费结算明细" :footer="null">
|
|
|
|
|
<div style="padding-bottom: 25px;">
|
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-click="onRowClick">
|
|
|
|
|
<BasicTable @selection-change="onSelectChange" class="ds-table" @register="registerTable" @row-click="onRowClick">
|
|
|
|
|
<template #tableTitle>
|
|
|
|
|
<div class="flex" style="align-items: center;">
|
|
|
|
|
<div style="font-size: 12px;font-weight: bold;margin-right: 5px">结算明细</div>
|
|
|
|
@ -137,15 +137,12 @@ import {
|
|
|
|
|
} from './api'
|
|
|
|
|
import { invoiceTableColums, invoiceSearchFormSchema, invoiceTableDetailColums, freeTableColums, freeSearchFormSchema, freeTableDetailColums } from './columns'
|
|
|
|
|
import { GetFeeCurrencySelectList } from '/@/api/common'
|
|
|
|
|
import feeTable from '/@/components/CostEntry/components/feeTable.vue'
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form'
|
|
|
|
|
import ExchangeRate from './exchangeRate.vue'
|
|
|
|
|
// 引入提示信息
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import { Divider } from 'ant-design-vue'
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
const emits = defineEmits(['updateList', 'refresh', 'updateListFree', 'updateListFreeLeft'])
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
import { numberThousandFormat } from '/@/utils/commonUtil'
|
|
|
|
|
import { get } from 'lodash'
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
@ -160,6 +157,14 @@ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable
|
|
|
|
|
res = await PaymentFreeSettlementGetBizList(p)
|
|
|
|
|
res.data.forEach((item, index) => {
|
|
|
|
|
item.freeIndex = String(index)
|
|
|
|
|
item.unpaidOther = numberThousandFormat(item.unpaidOther, 2, false)
|
|
|
|
|
item.unpaidUSD = numberThousandFormat(item.unpaidUSD, 2, false)
|
|
|
|
|
item.unpaidRMB = numberThousandFormat(item.unpaidRMB, 2, false)
|
|
|
|
|
item.unpaidInvoiceUSD = numberThousandFormat(item.unpaidInvoiceUSD, 2, false)
|
|
|
|
|
item.unpaidInvoiceRMB = numberThousandFormat(item.unpaidInvoiceRMB, 2, false)
|
|
|
|
|
item.unchargedOther = numberThousandFormat(item.unchargedOther, 2, false)
|
|
|
|
|
item.unchargedUSD = numberThousandFormat(item.unchargedUSD, 2, false)
|
|
|
|
|
item.unchargedRMB = numberThousandFormat(item.unchargedRMB, 2, false)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (route.query.type == 'invoice') {
|
|
|
|
@ -191,7 +196,7 @@ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable
|
|
|
|
|
bordered: true,
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
|
canResize: false,
|
|
|
|
|
showTableSetting: false,
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
id: getTableId(),
|
|
|
|
|
immediate: false
|
|
|
|
|
})
|
|
|
|
@ -201,16 +206,12 @@ const [registerTable1, { getSelectRows: getSelectRowsDetail, setTableData }] = u
|
|
|
|
|
showIndexColumn: false,
|
|
|
|
|
pagination: false,
|
|
|
|
|
striped: false,
|
|
|
|
|
rowSelection: {
|
|
|
|
|
onChange: onSelectChangeDetail,
|
|
|
|
|
fixed: true,
|
|
|
|
|
},
|
|
|
|
|
maxHeight: '900',
|
|
|
|
|
bordered: true,
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
showTableSetting: false,
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
id: getTableDetailId(),
|
|
|
|
|
canResize: false,
|
|
|
|
|
immediate: false,
|
|
|
|
@ -270,11 +271,12 @@ const exchangarr = ref([]) as any
|
|
|
|
|
const currenciesData = ref([]) as any
|
|
|
|
|
const exchangeFlag = ref(false)
|
|
|
|
|
// 行点击事件
|
|
|
|
|
const onRowClick = (record, index) => {
|
|
|
|
|
onSelectChange()
|
|
|
|
|
const onRowClick = (record, index, type) => {
|
|
|
|
|
loading.value = true
|
|
|
|
|
if (route.query.type == 'invoice') {
|
|
|
|
|
if (type != 'select') {
|
|
|
|
|
setSelectedRowKeys([record.id])
|
|
|
|
|
}
|
|
|
|
|
const data = {
|
|
|
|
|
ids: [record.id],
|
|
|
|
|
businessType: record.businessType,
|
|
|
|
@ -287,8 +289,11 @@ const onRowClick = (record, index) => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
|
if (type != 'select') {
|
|
|
|
|
setSelectedRowKeys([String(index)])
|
|
|
|
|
}
|
|
|
|
|
const queryDataStr = JSON.parse(queryData.value.queryCondition)
|
|
|
|
|
const arrQuery = [] as any
|
|
|
|
|
queryDataStr.forEach(item => {
|
|
|
|
@ -317,6 +322,9 @@ const onRowClick = (record, index) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
res.data.items.forEach(item => {
|
|
|
|
|
item.maxRestAmount = item.restAmount
|
|
|
|
|
item.totalAmount = numberThousandFormat(item.totalAmount, 2, false)
|
|
|
|
|
item.maxRestAmount = numberThousandFormat(item.maxRestAmount, 2, false)
|
|
|
|
|
item.invoiceAmount = numberThousandFormat(item.invoiceAmount, 2, false)
|
|
|
|
|
})
|
|
|
|
|
setTableData(res.data.items)
|
|
|
|
|
}
|
|
|
|
@ -407,6 +415,22 @@ function addInfos() {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (route.query.type == 'free') {
|
|
|
|
|
const queryDataStr1 = JSON.parse(queryData.value.queryCondition)
|
|
|
|
|
const queryDataStrarr = [] as any
|
|
|
|
|
queryDataStr1.forEach(item => {
|
|
|
|
|
if (item.FieldName == 'feeType') {
|
|
|
|
|
queryDataStrarr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'currency') {
|
|
|
|
|
queryDataStrarr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'feeName') {
|
|
|
|
|
queryDataStrarr.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.FieldName == 'FeeRange') {
|
|
|
|
|
queryDataStrarr.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const data = [] as any
|
|
|
|
|
arr.forEach(item => {
|
|
|
|
|
data.push({
|
|
|
|
@ -418,7 +442,11 @@ function addInfos() {
|
|
|
|
|
})
|
|
|
|
|
currenciesData.value = []
|
|
|
|
|
exchangarr.value = []
|
|
|
|
|
PaymentFreeSettlementGetExchangesAsync(data).then(res => {
|
|
|
|
|
const obj = {
|
|
|
|
|
items: data,
|
|
|
|
|
queryCondition: JSON.stringify(queryDataStrarr)
|
|
|
|
|
}
|
|
|
|
|
PaymentFreeSettlementGetExchangesAsync(obj).then(res => {
|
|
|
|
|
const cuArr = [] as any
|
|
|
|
|
currenciesData.value = res.data
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
@ -611,7 +639,7 @@ const susd = ref(0)
|
|
|
|
|
const fusd = ref(0)
|
|
|
|
|
const sqt = ref(0)
|
|
|
|
|
const ftq = ref(0)
|
|
|
|
|
function onSelectChange(selectedRowKeys) {
|
|
|
|
|
function onSelectChange({ keys, rows }) {
|
|
|
|
|
const list = getSelectRows()
|
|
|
|
|
rrmb.value = 0
|
|
|
|
|
srmb.value = 0
|
|
|
|
@ -629,12 +657,21 @@ function onSelectChange(selectedRowKeys) {
|
|
|
|
|
sqt.value += Number(item.unchargedOther)
|
|
|
|
|
ftq.value += Number(item.unpaidOther)
|
|
|
|
|
})
|
|
|
|
|
rrmb.value = numberThousandFormat(rrmb.value, 2, false)
|
|
|
|
|
srmb.value = numberThousandFormat(srmb.value, 2, false)
|
|
|
|
|
frmb.value = numberThousandFormat(frmb.value, 2, false)
|
|
|
|
|
susd.value = numberThousandFormat(susd.value, 2, false)
|
|
|
|
|
fusd.value = numberThousandFormat(fusd.value, 2, false)
|
|
|
|
|
sqt.value = numberThousandFormat(sqt.value, 2, false)
|
|
|
|
|
ftq.value = numberThousandFormat(ftq.value, 2, false)
|
|
|
|
|
}
|
|
|
|
|
if (route.query.type == 'invoice') {
|
|
|
|
|
list.forEach(item => {
|
|
|
|
|
rrmb.value += Number(item.applyAmount)
|
|
|
|
|
})
|
|
|
|
|
rrmb.value = numberThousandFormat(rrmb.value, 2, false)
|
|
|
|
|
}
|
|
|
|
|
onRowClick(rows[rows.length - 1], rows.length, 'select')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const openFlag = ref(false)
|
|
|
|
|