zhengyiming
4 天以前 5664a1a616df498cba58b9a8e63a91ac0ba96bab
src/views/Home/components/InsureOrderInfoView.vue
@@ -1,12 +1,21 @@
<template>
  <LoadingLayout :loading="state.loading">
    <AppScrollContainer>
    <AppContainer>
      <ChunkCell title="">
        <ProForm :model="detail" ref="formRef" label-width="120px" :is-read="true">
          <ProFormCol>
            <ProFormColItem :span="8">
              <ProFormItemV2 label="保单号:" prop="insureBillNo">
                <ProFormText v-model.trim="detail.insureBillNo" />
                <div class="pro-from-item-read-content-wrapper" v-if="!!detail.insureBillNo">
                  {{ detail.insureBillNo }}
                  <el-button
                    type="primary"
                    link
                    @click="handleGoStampFiles"
                    v-if="detail.productOnline && detail.anyPayComplete"
                    >详情</el-button
                  >
                </div>
              </ProFormItemV2>
            </ProFormColItem>
            <ProFormColItem :span="8">
@@ -65,7 +74,7 @@
          </ProFormCol>
        </ProForm>
      </ChunkCell>
      <ChunkCell title="人员信息">
      <ChunkCell title="人员信息" class="full-table-chunk">
        <template #titleRight v-if="detail.status !== InsurancePolicyStatusEnum.WaitEffect">
          <el-button type="primary" @click="handleBatchChange">批改申请</el-button>
        </template>
@@ -85,6 +94,7 @@
            <template v-if="detail.status === InsurancePolicyStatusEnum.WaitEffect">
              <el-button @click="handleTemplateDownload()" link type="primary">模板下载</el-button>
              <BlFileUpload
                v-if="detail.auditStatus !== InsurancePolicyAuditStatusEnum.Pass"
                :limitFileSize="10"
                accept="xls,xlsx"
                :showTip="false"
@@ -100,25 +110,28 @@
            </template>
            <template v-else>
              <el-button @click="handleDownloadPerson()" type="primary">下载人员清单</el-button>
              <el-button @click="handleDownloadOrder()" type="primary">下载保单</el-button>
              <template v-if="detail.productOnline">
                <el-button v-if="detail.anyPayComplete" @click="handleGoStampFiles()" type="primary"
                  >下载保单</el-button
                >
              </template>
              <el-button v-else @click="handleDownloadOrder()" type="primary">下载保单</el-button>
            </template>
          </template>
        </ProTableQueryFilterBar>
        <ProTableV2
          v-bind="proTableProps"
          :columns="column"
          :operationBtns="operationBtns"
          :auto-height="false"
          ref="proTable"
          :tableProps="{
            maxHeight: '400px',
          }"
        >
        </ProTableV2>
        <div class="full-table-chunk-table">
          <ProTableV2
            v-bind="proTableProps"
            :columns="column"
            :operationBtns="operationBtns"
            ref="proTable"
          >
          </ProTableV2>
        </div>
      </ChunkCell>
      <ChangePersonInfoDialog v-bind="dialogProps"></ChangePersonInfoDialog>
      <InsureClaimDetailDialog v-bind="dialogInsureClaimProps"></InsureClaimDetailDialog>
    </AppScrollContainer>
    </AppContainer>
  </LoadingLayout>
</template>
@@ -151,6 +164,7 @@
  insuranceTypeText,
  InsurancePolicyStatusEnum,
  InsurancePolicyStatusEnumText,
  InsurancePolicyAuditStatusEnum,
} from '@/constants';
import ChangePersonInfoDialog from './ChangePersonInfoDialog.vue';
import InsureClaimDetailDialog from './InsureClaimDetailDialog.vue';
@@ -159,6 +173,7 @@
import { useQuery, useQueryClient } from '@tanstack/vue-query';
import { downloadFile, downloadFileByUrl, Message, OrderInputType } from '@bole-core/core';
import { setOSSLink } from '@/utils';
import dayjs from 'dayjs';
defineOptions({
  name: 'InsureOrderInfoView',
@@ -192,6 +207,16 @@
    id: '5',
    enCode: 'jobName',
    name: '雇员工种',
  },
  {
    id: '51',
    enCode: 'occupationType',
    name: '职业类型',
  },
  {
    id: '52',
    enCode: 'occupationCode',
    name: '职业码值',
  },
  {
    id: '6',
@@ -240,7 +265,8 @@
    },
    extraProps: {
      hide: (row: API.GetInsuranceStaffPageTemplate) =>
        detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect,
        detail.value?.status !== InsurancePolicyStatusEnum.WaitEffect ||
        detail.value?.auditStatus === InsurancePolicyAuditStatusEnum.Pass,
    },
  },
  {
@@ -395,7 +421,23 @@
  downloadFileByUrl(setOSSLink(detail.value?.insureBillUrl));
}
function handleGoStampFiles() {
  router.push({
    name: 'InsurancePolicyStampFiles',
    params: {
      id: id,
    },
  });
}
function handleBatchChange() {
  if (
    dayjs(detail.value?.effectEndTime).isBefore(dayjs()) ||
    dayjs(detail.value?.effectEndTime).isSame(dayjs(), 'day')
  ) {
    Message.errorMessage('保险今天到期,无法批改');
    return;
  }
  router.push({
    name: 'BatchChange',
    params: {
@@ -475,4 +517,27 @@
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
.full-table-chunk {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  :deep() {
    .chunk-cell-content {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
    }
  }
  .full-table-chunk-table {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
}
</style>