| | |
| | | <AppScrollContainer> |
| | | <ChunkCell title="1"> |
| | | <template #title> |
| | | <el-text>{{ `保单号:${'958585860689'}` }}</el-text> |
| | | <el-text>{{ `投保人:${'人力无忧'}` }}</el-text> |
| | | <div class="batch-change-title"> |
| | | <el-text style="margin-right: 20px">{{ `保单号:${'958585860689'}` }}</el-text> |
| | | <el-text>{{ `投保人:${'人力无忧'}` }}</el-text> |
| | | </div> |
| | | </template> |
| | | <ProForm :model="state.form" ref="formRef" label-width="120px"> |
| | | <ProFormCol> |
| | |
| | | :limitFileSize="10" |
| | | accept="xlsx,xls" |
| | | :showTip="false" |
| | | :on-success="handleUploadAddOrReduce" |
| | | > |
| | | <template #default> |
| | | <el-button type="primary">加减人</el-button> |
| | | <el-button link type="primary" @click.stop="handleTemplateDownload" |
| | | <el-button link type="primary" @click.stop="DownloadAddOrReducePersonTemplate" |
| | | >下载模板</el-button |
| | | > |
| | | </template> |
| | |
| | | :limitFileSize="10" |
| | | accept="xlsx,xls" |
| | | :showTip="false" |
| | | :on-success="handleUploadReplace" |
| | | > |
| | | <template #default> |
| | | <el-button type="primary">替换人</el-button> |
| | | <el-button link type="primary" @click.stop="handleTemplateDownload" |
| | | <el-button link type="primary" @click.stop="downloadReplacePersonTemplate" |
| | | >下载模板</el-button |
| | | > |
| | | </template> |
| | |
| | | > |
| | | </ProTableV2> |
| | | <div class="chuck-add-or-edit-actions"> |
| | | <el-button class="chuck-add-or-edit-actions" type="primary" @click="handleSubmit" |
| | | <el-button class="chuck-add-or-edit-actions btn" type="primary" @click="handleSubmit" |
| | | >提交</el-button |
| | | > |
| | | </div> |
| | |
| | | ProForm, |
| | | ProFormItemV2, |
| | | ChunkCell, |
| | | ProFormText, |
| | | ProTableQueryFilterBar, |
| | | QueryFilterItem, |
| | | SearchInput, |
| | | ProFormCol, |
| | | ProFormColItem, |
| | | ProFormDatePicker, |
| | | ProFormInputNumber, |
| | | useTable, |
| | | ProTableV2, |
| | | ProFormRadio, |
| | | FieldSelect, |
| | | defineOperationBtns, |
| | | useFormDialog, |
| | | ProFormUpload, |
| | | UploadUserFile, |
| | | } from '@bole-core/components'; |
| | | import * as insuranceOrderServices from '@/services/api/InsuranceOrder'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import * as insureBatchBillServices from '@/services/api/InsureBatchBill'; |
| | | import { downloadFileByUrl, Message, OrderInputType } from '@bole-core/core'; |
| | | import { InsuranceAddOrReduceTempPath, InsuranceChangeTempPath } from '@/constants'; |
| | | import { useRouteView } from '@/hooks'; |
| | | import { FormInstance } from 'element-plus'; |
| | | |
| | | defineOptions({ |
| | | name: 'BatchChange', |
| | |
| | | ]; |
| | | |
| | | const route = useRoute(); |
| | | const { closeViewPush } = useRouteView(); |
| | | const id = route.params.id as string; |
| | | const BaseState = { |
| | | loading: true, |
| | |
| | | } |
| | | ); |
| | | |
| | | async function handleUploadAddOrReduce(response: UploadUserFile) { |
| | | try { |
| | | let params: API.ImportBatchAddOrSubOrderInput = { |
| | | url: response.path, |
| | | insurePolicyId: id, |
| | | }; |
| | | let res = await insureBatchBillServices.importBatchAddOrSubOrderData(params); |
| | | } catch (error) {} |
| | | } |
| | | async function handleUploadReplace(response: UploadUserFile) { |
| | | try { |
| | | let params: API.ImportBatchAddOrSubOrderInput = { |
| | | url: response.path, |
| | | insurePolicyId: id, |
| | | }; |
| | | let res = await insureBatchBillServices.importBatchUpdateOrderData(params); |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleClear() {} |
| | | function handleSubmit() {} |
| | | function handleTemplateDownload() {} |
| | | |
| | | const formRef = ref<FormInstance>(); |
| | | function handleSubmit() { |
| | | if (!formRef.value) return; |
| | | formRef.value.validate((valid) => { |
| | | if (valid) { |
| | | addOrUpdateInsureBatchBill(); |
| | | } else { |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | async function addOrUpdateInsureBatchBill() { |
| | | try { |
| | | let params = {}; |
| | | let res = await insureBatchBillServices.addOrUpdateInsureBatchBill(params); |
| | | if (res) { |
| | | Message.successMessage('提交成功'); |
| | | handleBack(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function DownloadAddOrReducePersonTemplate() { |
| | | downloadFileByUrl(InsuranceAddOrReduceTempPath, '加减人模板'); |
| | | } |
| | | function downloadReplacePersonTemplate() { |
| | | downloadFileByUrl(InsuranceChangeTempPath, '替换人模板'); |
| | | } |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'Home', |
| | | }); |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | await getBatchRefundInfoDetail(); |
| | |
| | | @use '@/style/common.scss' as *; |
| | | |
| | | .chuck-add-or-edit-actions { |
| | | // margin-bottom: 20px; |
| | | &.btn { |
| | | margin-bottom: 20px; |
| | | } |
| | | } |
| | | </style> |