| | |
| | | @change="getList()" |
| | | /> |
| | | </QueryFilterItem> |
| | | <QueryFilterItem v-if="isJYB"> |
| | | <QueryFilterItem> |
| | | <FieldRadio |
| | | v-model="extraParamState.insuranceType" |
| | | :value-enum="insuranceTypeText" |
| | |
| | | <SearchInput |
| | | v-model="extraParamState.keyword" |
| | | style="width: 260px" |
| | | :placeholder="keywordText" |
| | | placeholder="姓名/身份证/单位/保单号等" |
| | | @on-click-search="getList" |
| | | > |
| | | </SearchInput> |
| | |
| | | </BlFileUpload> |
| | | |
| | | <el-button |
| | | v-if="isJYB" |
| | | @click="handleEnterpriseBatchRefund()" |
| | | type="primary" |
| | | style="margin-right: 10px" |
| | |
| | | v-bind="proTableProps" |
| | | :columns="HomeColumns" |
| | | :operationBtns="operationBtns" |
| | | :show-column-check="isJYB" |
| | | :show-column-check="true" |
| | | :column-selectable="columnSelectable" |
| | | ref="proTable" |
| | | :table-props="{ |
| | |
| | | import { ModelValueType } from 'element-plus'; |
| | | import { useQueryClient } from '@tanstack/vue-query'; |
| | | import { |
| | | AppType, |
| | | InsuranceOrderTempPath, |
| | | JYBInsuranceOrderTempPath, |
| | | OnJobFlagEnumText, |
| | | insuranceTypeText, |
| | | isJYB, |
| | | } from '@/constants'; |
| | | import dayjs from 'dayjs'; |
| | | import _ from 'lodash'; |
| | |
| | | }); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | // { |
| | | // data: { |
| | | // enCode: 'checkBtn', |
| | | // name: '理赔', |
| | | // }, |
| | | // emits: { |
| | | // onClick: (role) => goDetail(role), |
| | | // }, |
| | | // }, |
| | | AppType === 'rz' && { |
| | | data: { |
| | | enCode: 'uploadBtn', |
| | | name: '上传材料', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | }, |
| | | isJYB && { |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '保单下载', |
| | |
| | | }, |
| | | }, |
| | | ]).filter(Boolean); |
| | | |
| | | const keywordText = computed(() => { |
| | | if (isJYB) { |
| | | return '姓名/身份证/单位/保单号等'; |
| | | } |
| | | return '姓名/身份证/合同单位等'; |
| | | }); |
| | | |
| | | const columnSelectable = (row: API.InsuranceOrderListOutput) => { |
| | | return row.onJobFlag === '增员'; |
| | |
| | | format: 'YYYY/MM/DD', |
| | | }, |
| | | }, |
| | | showSummary: AppType === 'rz' || isJYB, |
| | | showSummary: true, |
| | | summaryPropertys: [ |
| | | { |
| | | property: 'table-operation', |
| | |
| | | |
| | | async function handleUploadSuccess(response: UploadUserFile) { |
| | | try { |
| | | if (AppType === 'one') { |
| | | let res = await insuranceOrderServices.checkImportInsuranceOrderData(response.url); |
| | | if (res) { |
| | | let checkRes = await insuranceOrderServices.importInsuranceOrderData(response.url, { |
| | | getResponse: true, |
| | | responseType: 'blob', |
| | | }); |
| | | if (checkRes?.data?.size) { |
| | | Message.tipMessage('存在错误数据,是否导出?') |
| | | .then(() => { |
| | | downloadFile(checkRes.data, `错误人员名单`, 'xlsx'); |
| | | }) |
| | | .catch(() => { |
| | | getList(paginationState.pageIndex); |
| | | }); |
| | | } |
| | | } |
| | | } else { |
| | | let res = await insuranceOrderServices.importInsuranceOrderData(response.url, { |
| | | getResponse: true, |
| | | responseType: 'blob', |
| | |
| | | // erroMsg: '备注', |
| | | // }, |
| | | // }); |
| | | } |
| | | } |
| | | queryClient.invalidateQueries({ |
| | | queryKey: ['insuranceOrderServices/getInsuranceOrderListByOrderRelevance'], |
| | |
| | | } |
| | | |
| | | function handleDownload() { |
| | | if (isJYB) { |
| | | downloadFileByUrl(JYBInsuranceOrderTempPath, '保单导入模板'); |
| | | } else { |
| | | downloadFileByUrl(InsuranceOrderTempPath, '保单导入模板'); |
| | | } |
| | | } |
| | | |
| | | function handleRowStyle(data: { row: API.InsuranceOrderListOutput; rowIndex: number }) { |
| | | if ( |
| | | isJYB && |
| | | dayjs(dayjs(data.row?.insuranceEndTime).format('YYYY-MM-DD')).diff(dayjs(), 'day') >= 0 && |
| | | dayjs(dayjs(data.row?.insuranceEndTime).format('YYYY-MM-DD')).diff(dayjs(), 'day') < 6 |
| | | ) { |
| | |
| | | import { defineColumns } from '@bole-core/components'; |
| | | import { AppType, isJYB } from '@/constants'; |
| | | |
| | | export const HomeColumns = defineColumns([ |
| | | { |
| | | id: '1', |
| | | enCode: 'channel', |
| | | name: '渠道', |
| | | width: 160, |
| | | }, |
| | | AppType === 'rz' && { |
| | | id: '2', |
| | | enCode: 'salesmanName', |
| | | name: '业务员姓名', |
| | | width: 160, |
| | | }, |
| | | { |
| | |
| | | name: '实际工作单位', |
| | | width: 160, |
| | | }, |
| | | isJYB && { |
| | | { |
| | | id: '8', |
| | | enCode: 'workAddress', |
| | | name: '用工地点', |
| | |
| | | name: '投保方案', |
| | | width: 160, |
| | | }, |
| | | isJYB && { |
| | | { |
| | | id: '13', |
| | | enCode: 'insuranceType', |
| | | name: '投保方式', |
| | | width: 160, |
| | | }, |
| | | (AppType === 'rz' || isJYB) && { |
| | | { |
| | | id: '14', |
| | | enCode: 'orderNo', |
| | | name: '保单号', |
| | |
| | | id: '17', |
| | | enCode: 'age', |
| | | name: '年龄', |
| | | width: 160, |
| | | }, |
| | | AppType !== 'other' && { |
| | | id: '18', |
| | | enCode: 'idCardCheckResult', |
| | | name: '身份证校验', |
| | | width: 160, |
| | | }, |
| | | AppType !== 'other' && { |
| | | id: '19', |
| | | enCode: 'idCardRepeatResult', |
| | | name: '身份证是否重复', |
| | | width: 160, |
| | | }, |
| | | { |