From 4923681d933b455972166552dfb7538cd18f5808 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期二, 01 四月 2025 18:49:21 +0800 Subject: [PATCH] fix: bug --- src/views/Home/BatchChange.vue | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/Home/BatchChange.vue b/src/views/Home/BatchChange.vue index f966bba..0fe1fc9 100644 --- a/src/views/Home/BatchChange.vue +++ b/src/views/Home/BatchChange.vue @@ -121,6 +121,7 @@ import { useQuery, useQueryClient } from '@tanstack/vue-query'; import { paginateList } from '@/utils'; import dayjs from 'dayjs'; +import _ from 'lodash'; defineOptions({ name: 'BatchChange', @@ -292,12 +293,16 @@ Message.errorMessage('璇峰厛涓婁紶浜哄憳鍚嶅崟'); return; } + let _addInsStaffList = _.uniqBy(state.staffList, 'idNumber'); let params: API.InsureBatchBillInput = { insurancePolicyId: id, effectTime: state.form.time, - addInsStaffList: state.staffList.filter((x) => x.changeFlag.includes('澧炲姞')), - updateInsStaffList: state.staffList.filter((x) => x.changeFlag.includes('鏇挎崲')), - delInsStaffList: state.staffList.filter((x) => x.changeFlag.includes('鍒犻櫎')), + addInsStaffList: _addInsStaffList.filter((x) => x.changeFlag.includes('澧炲姞')), + updateInsStaffList: _.uniqBy( + _addInsStaffList.filter((x) => x.changeFlag.includes('鏇挎崲')), + 'orginIdNumber' + ), + delInsStaffList: _addInsStaffList.filter((x) => x.changeFlag.includes('鍒犻櫎')), }; let res = await insureBatchBillServices.addOrUpdateInsureBatchBill(params); if (res) { -- Gitblit v1.9.1