| | |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择日期" |
| | | :disabled-date="disabledDate" |
| | | ></ProFormDatePicker> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | |
| | | import { FormInstance } from 'element-plus'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import { paginateList } from '@/utils'; |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | | |
| | | defineOptions({ |
| | | name: 'BatchChange', |
| | |
| | | const id = route.params.id as string; |
| | | const insurerName = route.query.insurerName as string; |
| | | const insureBillNo = route.query.insureBillNo as string; |
| | | const effectEndTime = route.query.effectEndTime as string; |
| | | const BaseState = { |
| | | loading: true, |
| | | form: { |
| | |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | |
| | | const disabledDate = computed(() => { |
| | | return (time: Date) => { |
| | | return dayjs(time).isBefore(dayjs(), 'day') || dayjs(time).isAfter(dayjs(effectEndTime), 'day'); |
| | | }; |
| | | }); |
| | | |
| | | const urlDisabled = computed(() => { |
| | | return state.form.addOrReduceUrl.length > 0 || state.form.replaceUrl.length > 0; |
| | |
| | | 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) { |