wupengfei
2025-03-24 ee36747f2db9ac3a641e1cbaeb01f726ce9faa98
src/views/Home/Home.vue
@@ -44,25 +44,16 @@
          </QueryFilterItem>
        </template>
        <template #btn>
          <el-button
            @click="handleDownload()"
            icon="Download"
            type="primary"
            style="margin-right: 10px"
            link
          <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link
            >模板下载</el-button
          >
          <el-button @click="handleUpload()" icon="Upload" type="primary" style="margin-right: 10px"
          <el-button @click="handleUpload()" type="primary" style="margin-right: 10px"
            >导入</el-button
          >
          <el-button @click="downloadInsureOrder()" type="primary" icon="Download" link
            >导出保单列表</el-button
          >
          <el-button @click="downloadInsurePerson()" icon="Download" type="primary" link
            >导出在保人员</el-button
          >
          <el-button @click="downloadInsureOrder()" type="primary" link>导出保单列表</el-button>
          <el-button @click="downloadInsurePerson()" type="primary" link>导出在保人员</el-button>
        </template>
      </ProTableQueryFilterBar>
      <ProTableV2
@@ -92,10 +83,8 @@
  useTable,
  useFormDialog,
  FieldDatePicker,
  BlFileUpload,
  defineOperationBtns,
  UploadUserFile,
  XLSXUtils,
  SearchInput,
  FieldRadio,
} from '@bole-core/components';
@@ -104,16 +93,9 @@
import { columns } from './constants';
import UploadInsurePersonDialog from './components/UploadInsurePersonDialog.vue';
import UploadStampFileDialog from './components/UploadStampFileDialog.vue';
import { toThousand, format, downloadFile, setOSSLink } from '@/utils';
import { omit } from 'lodash';
import { format, downloadFile, setOSSLink } from '@/utils';
import { ModelValueType } from 'element-plus';
import { useQueryClient } from '@tanstack/vue-query';
import {
  InsuranceOrderTempPath,
  JYBInsuranceOrderTempPath,
  OnJobFlagEnumText,
  insuranceTypeText,
} from '@/constants';
import { InsuranceOrderTempPath, OnJobFlagEnumText, insuranceTypeText } from '@/constants';
import dayjs from 'dayjs';
import _ from 'lodash';
@@ -139,9 +121,9 @@
    emits: {
      onClick: (role) => handleBatch(role),
    },
    extraProps: {
      hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile,
    },
    // extraProps: {
    //   hide: (row: API.InsuranceOrderListOutput) => !row.orderBillFile,
    // },
  },
  {
    data: {
@@ -286,10 +268,10 @@
}
function handleDownload() {
  downloadFileByUrl(JYBInsuranceOrderTempPath, '保单导入模板');
  downloadFileByUrl(InsuranceOrderTempPath, '保单导入模板');
}
function handleRowStyle(data: { row: API.InsuranceOrderListOutput; rowIndex: number }) {
function handleRowStyle(data: { row: API.InsuranceOrderListOutput }) {
  if (
    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