|
@@ -10,10 +10,7 @@
|
|
|
:selectConfig="selectConfig"
|
|
|
highlight-current-row
|
|
|
:action-list="[
|
|
|
- {
|
|
|
- text: '默认汇率',
|
|
|
- action: () => openModal(),
|
|
|
- },
|
|
|
+
|
|
|
]"
|
|
|
@get-list="getList"
|
|
|
>
|
|
@@ -57,39 +54,108 @@
|
|
|
<el-table-column label="收入(CNY)">
|
|
|
<el-table-column label="合同到账" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.contractArrival, 2) }}</div>
|
|
|
+ <el-popover placement="top" :width="580" trigger="click">
|
|
|
+ <template #reference>
|
|
|
+ <span class="table-btn">{{ moneyFormat(row.contractArrival, 2) }}</span>
|
|
|
+ </template>
|
|
|
+ <el-table :data="row.claimList">
|
|
|
+ <el-table-column width="150" property="date" label="认领金额">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{row.currency}} {{ moneyFormat(row.money, 2) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" property="rate" label="汇率" />
|
|
|
+ <el-table-column width="160" property="userName" label="操作人" />
|
|
|
+ <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
+ </el-table>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="退税" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.taxReturnMoney, 2) }}</div>
|
|
|
+ <el-popover placement="top" :width="580" trigger="click">
|
|
|
+ <template #reference>
|
|
|
+ <span class="table-btn">{{moneyFormat(row.taxReturnMoney, 2) }}</span>
|
|
|
+ </template>
|
|
|
+ <el-table :data="row.taxReturnList">
|
|
|
+ <el-table-column width="150" property="date" label="交易金额">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" property="rate" label="汇率" />
|
|
|
+ <el-table-column width="160" property="userName" label="操作人" />
|
|
|
+ <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
+ </el-table>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="其他收入" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.otherIncome, 2) }}</div>
|
|
|
+ <el-popover placement="top" :width="580" trigger="click">
|
|
|
+ <template #reference>
|
|
|
+ <span class="table-btn">{{moneyFormat(row.otherIncome, 2) }}</span>
|
|
|
+ </template>
|
|
|
+ <el-table :data="row.accountRequestFundsDetailList">
|
|
|
+ <el-table-column width="150" property="date" label="交易金额">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" property="rate" label="汇率" />
|
|
|
+ <el-table-column width="160" property="userName" label="操作人" />
|
|
|
+ <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
+ </el-table>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="采购合同金额">
|
|
|
<el-table-column label="" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <div>
|
|
|
- <!-- {{ row.currency }} {{ moneyFormat(row.purchaseAmount, 2) }} -->
|
|
|
- CNY {{ moneyFormat(row.purchaseAmount, 2) }}
|
|
|
- </div>
|
|
|
+ <el-popover placement="top" :width="580" trigger="click">
|
|
|
+ <template #reference>
|
|
|
+ <span class="table-btn">CNY {{ moneyFormat(row.purchaseAmount, 2) }}</span>
|
|
|
+ </template>
|
|
|
+ <el-table :data="row.purchaseList">
|
|
|
+ <el-table-column width="150" property="date" label="交易金额">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" property="rate" label="汇率" />
|
|
|
+ <el-table-column width="160" property="purchaseName" label="业务员" />
|
|
|
+ <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
+ </el-table>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="支出(CNY)">
|
|
|
<el-table-column label="支付货款" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.payForGoods, 2) }}</div>
|
|
|
+ <el-popover placement="top" :width="580" trigger="click">
|
|
|
+ <template #reference>
|
|
|
+ <span class="table-btn">{{ moneyFormat(row.payForGoods, 2) }}</span>
|
|
|
+ </template>
|
|
|
+ <el-table :data="row.payList">
|
|
|
+ <el-table-column width="150" property="date" label="交易金额">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" property="rate" label="汇率" />
|
|
|
+ <el-table-column width="160" property="userName" label="操作人" />
|
|
|
+ <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
+ </el-table>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="其他支出" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.otherExpenses, 2) }}</div>
|
|
|
+
|
|
|
+ <div class="table-btn">{{ moneyFormat(row.otherExpenses, 2) }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
@@ -544,42 +610,39 @@ const changeExchangeRate = (row) => {
|
|
|
openChange.value = true;
|
|
|
if (row.currencyRateJson) {
|
|
|
let currencyRateJson = JSON.parse(row.currencyRateJson);
|
|
|
- formChangeData.data.list = formChangeData.data.list.map((item) => {
|
|
|
- for (let i = 0; i < currencyRateJson.length; i++) {
|
|
|
- if (item.type === currencyRateJson[i].type) {
|
|
|
- item.rate = currencyRateJson[i].rate;
|
|
|
+ //row.currencyList和currencyRateJson进行匹配
|
|
|
+ for (let i = 0; i < row.currencyList.length; i++) {
|
|
|
+ const element = row.currencyList[i];
|
|
|
+ for (let j = 0; j < currencyRateJson.length; j++) {
|
|
|
+ const jelement = currencyRateJson[j];
|
|
|
+ if(element.id == jelement.id){
|
|
|
+ element.rate = jelement.rate;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- };
|
|
|
- });
|
|
|
+ }
|
|
|
+
|
|
|
+ formChangeData.data.list = row.currencyList
|
|
|
+ // formChangeData.data.list = formChangeData.data.list.map((item) => {
|
|
|
+ // for (let i = 0; i < currencyRateJson.length; i++) {
|
|
|
+ // if (item.type === currencyRateJson[i].type) {
|
|
|
+ // item.rate = currencyRateJson[i].rate;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return {
|
|
|
+ // ...item,
|
|
|
+ // };
|
|
|
+ // });
|
|
|
+ console.log(row.currencyList)
|
|
|
loadingDialog.value = false;
|
|
|
} else {
|
|
|
- proxy.post("/currencyRate/list", {}).then(
|
|
|
- (res) => {
|
|
|
- if (res && res.length > 0 && formChangeData.data.list.length > 0) {
|
|
|
- formChangeData.data.list = formChangeData.data.list.map((item) => {
|
|
|
- for (let i = 0; i < res.length; i++) {
|
|
|
- if (item.type === res[i].type) {
|
|
|
- item.rate = res[i].rate;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- loadingDialog.value = false;
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- console.log(err);
|
|
|
- loadingDialog.value = false;
|
|
|
- }
|
|
|
- );
|
|
|
+ formChangeData.data = {
|
|
|
+ id: row.contractId,
|
|
|
+ list: row.currencyList,
|
|
|
+ };
|
|
|
}
|
|
|
+ loadingDialog.value = false
|
|
|
};
|
|
|
const submitChangeForm = () => {
|
|
|
change.value.handleSubmit(() => {
|
|
@@ -653,4 +716,8 @@ const openDetails = (row) => {
|
|
|
::v-deep(.el-input-number .el-input__inner) {
|
|
|
text-align: left;
|
|
|
}
|
|
|
+.table-btn{
|
|
|
+ cursor: pointer;
|
|
|
+ color: #409EFF;
|
|
|
+}
|
|
|
</style>
|