|
|
|
@ -23,8 +23,8 @@
|
|
|
|
|
<template #overlay>
|
|
|
|
|
<a-menu>
|
|
|
|
|
<a-menu-item @click="addInfos">全部申请金额</a-menu-item>
|
|
|
|
|
<a-menu-item @click="addInfos('rmb')">仅RMB申请金额</a-menu-item>
|
|
|
|
|
<a-menu-item @click="addInfos('usd')">仅USD申请金额</a-menu-item>
|
|
|
|
|
<a-menu-item @click="addInfos('RMB')">仅RMB申请金额</a-menu-item>
|
|
|
|
|
<a-menu-item @click="addInfos('USD')">仅USD申请金额</a-menu-item>
|
|
|
|
|
</a-menu>
|
|
|
|
|
</template>
|
|
|
|
|
<a-button class="ml15" type="link">
|
|
|
|
@ -94,12 +94,14 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
// 子表使用的币别
|
|
|
|
|
const childCurrency = ref('')
|
|
|
|
|
const [registerTable, { reload, getForm, getSelectRowKeys, getPaginationRef, getSelectRows, setSelectedRows, getDataSource }] = useTable({
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res = await GetApplicationList(p)
|
|
|
|
|
if (res?.data?.length) {
|
|
|
|
|
state.historyRowKeys = [res.data[0].id]
|
|
|
|
|
feeTabel.value.init(res.data[0].id)
|
|
|
|
|
feeTabel.value.init(res.data[0].id, childCurrency.value)
|
|
|
|
|
}
|
|
|
|
|
setSelectedRows([res.data[0]])
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
@ -107,6 +109,11 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
if (p.currency) {
|
|
|
|
|
childCurrency.value = p.currency
|
|
|
|
|
p.currency = null
|
|
|
|
|
}
|
|
|
|
|
console.log(p)
|
|
|
|
|
return formatParams(p)
|
|
|
|
|
},
|
|
|
|
|
columns: businessColumns,
|
|
|
|
@ -164,7 +171,7 @@
|
|
|
|
|
state.historyRowKeys = [record?.id]
|
|
|
|
|
setSelectedRows([record])
|
|
|
|
|
// 初始化费用表格数据
|
|
|
|
|
feeTabel.value.init(record.id)
|
|
|
|
|
feeTabel.value.init(record.id, childCurrency.value)
|
|
|
|
|
}
|
|
|
|
|
const feeData = () => {
|
|
|
|
|
return feeTabel.value.selectfeeData
|
|
|
|
@ -303,24 +310,26 @@
|
|
|
|
|
item.businessType = 1
|
|
|
|
|
item.customerName = row.customerName
|
|
|
|
|
}
|
|
|
|
|
if (type == 'rmb') {
|
|
|
|
|
if (type == 'RMB') {
|
|
|
|
|
item.settlementUSD = 0
|
|
|
|
|
item.settlementOther = 0
|
|
|
|
|
}
|
|
|
|
|
if (type == 'usd') {
|
|
|
|
|
if (type == 'USD') {
|
|
|
|
|
item.settlementRMB = 0
|
|
|
|
|
item.settlementOther = 0
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 过滤出所有跟业务币别不一致的币别
|
|
|
|
|
currencyList = Array.from(new Set(currencyList.map(item => item.currency))).map(currency => {
|
|
|
|
|
return currencyList.find(item => item.currency === currency)
|
|
|
|
|
})
|
|
|
|
|
postData.documents = items
|
|
|
|
|
console.log(postData)
|
|
|
|
|
console.log(currencyList)
|
|
|
|
|
bPostData.value = postData
|
|
|
|
|
exchangeRate.value.init(currency, currencyList)
|
|
|
|
|
exchangeRate.value.init(currency, currencyList, type)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|