From ff06c40770a05775e480032f1454a659b9a13a60 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 31 七月 2025 15:54:01 +0800
Subject: [PATCH] release: v2.2.2
---
src/views/Home/Home.vue | 101 ++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 81 insertions(+), 20 deletions(-)
diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue
index eb93ebe..82ba3f4 100644
--- a/src/views/Home/Home.vue
+++ b/src/views/Home/Home.vue
@@ -18,7 +18,7 @@
<QueryFilterItem>
<FieldRadio
v-model="extraParamState.insurancePeriod"
- :value-enum="insuranceTypeText"
+ :value-enum="insuranceTypeTextForFilter"
buttonStyle
showAllBtn
@change="getList()"
@@ -160,11 +160,13 @@
InsurancePolicyListPayStatusEnum,
InsurancePolicyListPayStatusEnumText,
InsuranceOccupationTypeTempPath,
+ InsurancePeriodEnum,
+ insuranceTypeTextForFilter,
} from '@/constants';
import dayjs from 'dayjs';
import _ from 'lodash';
import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue';
-import { useUserInsureProductSetting } from '@/hooks';
+import { useInsureProductSchemeAllList, useUserInsureProductSetting } from '@/hooks';
// import { Recorder } from '@/utils/record';
defineOptions({
@@ -203,8 +205,16 @@
onClick: (role) => handleUploadStampFile(role),
},
extraProps: {
- hide: (row: API.GetInsurancePageOutput) =>
- row.status !== InsurancePolicyStatusEnum.WaitEffect,
+ hide: (row: API.GetInsurancePageOutput) => {
+ if (row.productOnline) {
+ return (
+ row.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAdd &&
+ row.auditStatus !== InsurancePolicyAuditStatusEnum.WaitAudit
+ );
+ } else {
+ return row.status !== InsurancePolicyStatusEnum.WaitEffect;
+ }
+ },
},
},
{
@@ -219,19 +229,19 @@
hide: (row: API.GetInsurancePageOutput) => row.productOnline || !row.insureBillUrl,
},
},
- {
- data: {
- enCode: 'payBtn',
- name: '鏀粯',
- },
- emits: {
- onClick: (role) => handlePay(role),
- },
- extraProps: {
- hide: (row: API.GetInsurancePageOutput) =>
- row.payStatus != InsurancePolicyListPayStatusEnum.WaitPay,
- },
- },
+ // {
+ // data: {
+ // enCode: 'payBtn',
+ // name: '鏀粯',
+ // },
+ // emits: {
+ // onClick: (role) => handlePay(role),
+ // },
+ // extraProps: {
+ // hide: (row: API.GetInsurancePageOutput) =>
+ // row.payStatus != InsurancePolicyListPayStatusEnum.WaitPay,
+ // },
+ // },
{
data: {
enCode: 'stampFilesBtn',
@@ -266,6 +276,19 @@
// onClick: (role) => handleStandarEndo(role),
// },
// },
+ {
+ data: {
+ enCode: 'submitAuditBtn',
+ name: '鎻愪氦瀹℃牳',
+ },
+ emits: {
+ onClick: (role) => handleSubmitAuditBtn(role),
+ },
+ extraProps: {
+ hide: (row: API.GetInsurancePageOutput) =>
+ row.auditStatus != InsurancePolicyAuditStatusEnum.WaitAdd,
+ },
+ },
]).filter(Boolean);
const BaseState = {
@@ -361,6 +384,7 @@
productIdNumber: '',
productSchemeIdNumber: '',
effectStartTime: dayjs().add(1, 'day').format('YYYY-MM-DD'),
+ effectEndTime: '',
},
closeAfterConfirm: false,
});
@@ -389,6 +413,12 @@
} catch (error) {}
}
+const { isSjbAccount, getInsureProductIdByIdNumber } = useUserInsureProductSetting();
+
+const { getInsureProductSchemeByIdNumber } = useInsureProductSchemeAllList({
+ insureProductId: computed(() => getInsureProductIdByIdNumber(editForm.productIdNumber)),
+});
+
async function importInsStaffToList() {
try {
let params: API.ImportInsStaffToListFrontInput = {
@@ -398,8 +428,23 @@
productSchemeIdNumber: editForm.productSchemeIdNumber,
effectStartTime: editForm.effectStartTime,
};
+ const currentInsureProductScheme = getInsureProductSchemeByIdNumber(
+ editForm.productSchemeIdNumber
+ );
+ if (currentInsureProductScheme?.period === InsurancePeriodEnum['1-29D']) {
+ params.effectEndTime = editForm.effectEndTime;
+ }
let res = await insuranceOrderServices.importInsStaffToList(params, {
timeout: 60 * 1000 * 10,
+ customErrorHandler(error) {
+ if (error?.response?.data?.error?.code === '10001') {
+ Message.tipMessage(error.response.data?.error?.message, {
+ showCancelButton: false,
+ });
+ return true;
+ }
+ return false;
+ },
});
if (res) {
// await Message.tipMessage('瀛樺湪閿欒鏁版嵁锛屾槸鍚﹀鍑猴紵');
@@ -444,8 +489,6 @@
onConfirm: handleUpload,
});
-const { isSjbAccount } = useUserInsureProductSetting();
-
function handleOpenInstructions() {
if (isSjbAccount.value) {
dialogInstructionsState.dialogVisible = true;
@@ -627,7 +670,12 @@
async function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) {
try {
- await insuranceOrderServices.getInvoiceId({ id: row.id });
+ await insuranceOrderServices.getInvoiceId(
+ { id: row.id },
+ {
+ timeout: 60 * 1000 * 30,
+ }
+ );
router.push({
name: 'InsureDownloadInvoice',
params: {
@@ -636,4 +684,17 @@
});
} catch (error) {}
}
+
+async function handleSubmitAuditBtn(row: API.GetInsurancePageOutput) {
+ try {
+ let params: API.InsurancePolicyAuditInput = {
+ insurancePolicyId: row.id,
+ };
+ let res = await insuranceOrderServices.insurancePolicyAddAudit(params);
+ if (res) {
+ Message.successMessage('涓婁紶鎴愬姛');
+ getList(paginationState.pageIndex);
+ }
+ } catch (error) {}
+}
</script>
--
Gitblit v1.10.0