From 42cb53916a430a19843913f2601b5d16779c7010 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 23 十月 2025 22:19:29 +0800
Subject: [PATCH] feat: 接口
---
src/views/Home/Home.vue | 72 ++++++++++++++++++++++++++++++++++--
1 files changed, 68 insertions(+), 4 deletions(-)
diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue
index b9b7bf6..748ed15 100644
--- a/src/views/Home/Home.vue
+++ b/src/views/Home/Home.vue
@@ -114,6 +114,7 @@
<UploadStampFileDialog v-bind="dialogStampFileProps" />
<InsureInstructionsDialog v-bind="dialogInstructionsProps" />
<InsureLineModeSelectDialog v-bind="dialogLineModeSelectProps" />
+ <DisbursementDialog v-bind="dialogDisbursementProps" />
</LoadingLayout>
</template>
@@ -135,6 +136,7 @@
useDialog,
} from '@bole-core/components';
import * as insuranceOrderServices from '@/services/api/InsuranceOrder';
+import * as parkBountyApplyServices from '@/services/api/ParkBountyApply';
import { Message, OrderInputType, downloadFileByUrl } from '@bole-core/core';
import { columns, InsureLineMode } from './constants';
import UploadInsurePersonDialog from './components/UploadInsurePersonDialog.vue';
@@ -168,6 +170,7 @@
import _ from 'lodash';
import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue';
import InsureLineModeSelectDialog from './components/InsureLineModeSelectDialog.vue';
+import DisbursementDialog from './components/DisbursementDialog.vue';
import { useInsureProductSchemeAllList, useUserInsureProductSetting } from '@/hooks';
// import { Recorder } from '@/utils/record';
@@ -194,8 +197,7 @@
onClick: (role) => handleBatch(role),
},
extraProps: {
- hide: (row: API.GetInsurancePageOutput) =>
- row.productOnline || row.status !== InsurancePolicyStatusEnum.Effecting,
+ hide: (row: API.GetInsurancePageOutput) => row.status !== InsurancePolicyStatusEnum.Effecting,
},
},
{
@@ -289,6 +291,18 @@
extraProps: {
hide: (row: API.GetInsurancePageOutput) =>
row.auditStatus != InsurancePolicyAuditStatusEnum.WaitAdd,
+ },
+ },
+ {
+ data: {
+ enCode: 'applyTradeBySelfBtn',
+ name: '鍑鸿处鐢宠',
+ },
+ emits: {
+ onClick: (role) => handleParkBountyApplyTradeBySelf(role),
+ },
+ extraProps: {
+ hide: (row: API.GetInsurancePageOutput) => row.productOnline,
},
},
]).filter(Boolean);
@@ -387,6 +401,7 @@
productSchemeIdNumber: '',
effectStartTime: dayjs().add(1, 'day').format('YYYY-MM-DD'),
effectEndTime: '',
+ isOnLineInsurance: false,
},
closeAfterConfirm: false,
});
@@ -501,7 +516,9 @@
}
const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog({
- onConfirm: handleUpload,
+ onConfirm: () => {
+ return handleUpload(true);
+ },
});
function handleOpenInstructions() {
@@ -513,10 +530,11 @@
}
}
-async function handleUpload() {
+async function handleUpload(isOnLineInsurance = false) {
handleAdd({
serialNum: `${dayjs().format('YYYYMMDD')}${_.random(0, 9999).toString().padStart(4, '0')}`,
url: [] as UploadUserFile[],
+ isOnLineInsurance,
});
}
@@ -713,4 +731,50 @@
}
} catch (error) {}
}
+
+function handleParkBountyApplyTradeBySelf(row: API.GetInsurancePageOutput) {
+ handleDisbursementAdd({
+ remianAmount: row.remianAmount,
+ });
+}
+
+const {
+ dialogProps: dialogDisbursementProps,
+ handleAdd: handleDisbursementAdd,
+ editForm: editDisbursementForm,
+} = useFormDialog({
+ onConfirm: parkBountyApplyTradeBySelf,
+ defaultFormParams: {
+ payRemark: '',
+ tradeAmount: 0,
+ remianAmount: 0,
+ payFileUrl: [] as UploadUserFile[],
+
+ incomeCompanyName: '',
+ insureBillNo: '',
+ incomeBankAccount: '',
+ incomeBankCardNumber: '',
+ incomeBankName: '',
+ },
+});
+
+async function parkBountyApplyTradeBySelf() {
+ try {
+ let params: API.CreateParkBountyTradeInput = {
+ tradeAmount: editDisbursementForm.tradeAmount,
+ payFileUrl: editDisbursementForm.payFileUrl.map((item) => item.url).join('|'),
+ payRemark: editDisbursementForm.payRemark,
+ incomeCompanyName: editDisbursementForm.incomeCompanyName,
+ insureBillNo: editDisbursementForm.insureBillNo,
+ incomeBankAccount: editDisbursementForm.incomeBankAccount,
+ incomeBankCardNumber: editDisbursementForm.incomeBankCardNumber,
+ incomeBankName: editDisbursementForm.incomeBankName,
+ };
+ let res = await parkBountyApplyServices.parkBountyApplyTradeBySelf(params);
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getList(paginationState.pageIndex);
+ }
+ } catch (error) {}
+}
</script>
--
Gitblit v1.9.1