Commit 27bf777b by chenwq

feat: 优化市场转账表单数据处理,添加格式化函数

1 parent eaa2dc26
......@@ -57,6 +57,7 @@ export function buildMarketTransferFormData() {
label: "转账金额",
name: "transferTotalAmount",
type: "showTxt",
formatter: row => row.transferTotalAmount,
},
{
label: "发票及其他说明",
......
......@@ -27,7 +27,7 @@
:form-ref="transferChildRef"
:form-rules="transferRules"
:is-block="isBlock">
<template #expenseCategoryHtml>
<template slot="expenseCategoryHtml">
<el-checkbox-group v-model="transferForm.expenseCategoryIds"
class="expense-category-group"
@change="handleExpenseChange">
......@@ -214,6 +214,7 @@ export default {
label: item.amountLabel,
name: `amount_${item.id}`,
type: "showTxt",
formatter: row => `${row[`amount_${item.id}`]}`,
}));
const formData = buildMarketTransferFormData().map(item => ({ ...item }));
const billMerchant = formData.find(item => item.name === "billMerchantName");
......@@ -237,8 +238,6 @@ export default {
fileUrlList: [],
};
this.getPlatformMerchantList();
this.getTransferDetail();
this.getBankAccountList();
},
methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]),
......@@ -300,6 +299,8 @@ export default {
return;
this.transferForm.platformMerchantId = this.platformForm.platformMerchantId;
this.transferForm.platformMerchantName = this.platformForm.platformMerchantName;
this.getTransferDetail();
this.getBankAccountList();
this.step = 2;
});
return;
......@@ -350,10 +351,6 @@ export default {
this.$refs.transferFormRef.$refs[this.transferChildRef].validate((valid) => {
if (!valid)
return;
if (!(Number(this.transferForm.transferTotalAmount) > 0)) {
this.$message.warning("转账金额必须大于0");
return;
}
const params = deepClone(this.transferForm);
params.fileUrlList = params.fileUrlList.map(item => item.fileUrl);
submitMarketTransferFee(params).then(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!