zhengyiming
2025-06-24 da9859ae52f7c90165cfe76dbe8b824d1505ab0b
src/views/Home/Home.vue
@@ -47,11 +47,16 @@
          <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link
            >模板下载</el-button
          >
          <el-button @click="handleUpload()" type="primary" style="margin-right: 10px"
            >导入</el-button
            >导入投保人员</el-button
          >
          <!-- <el-button
            v-if="AppType === 'jx'"
            @click="handleUpload()"
            type="primary"
            style="margin-right: 10px"
            >大批量数据导入</el-button
          > -->
          <el-button @click="getInsurancePageExport()" type="primary" link>导出保单列表</el-button>
          <el-button @click="getInsuranceStaffPageExport()" type="primary" link
            >导出在保人员</el-button
@@ -103,6 +108,7 @@
  insuranceTypeText,
  InsurancePolicyStatusEnumText,
  InsurancePolicyStatusEnum,
  AppType,
} from '@/constants';
import dayjs from 'dayjs';
import _ from 'lodash';
@@ -157,6 +163,15 @@
    extraProps: {
      hide: (row: API.GetInsurancePageOutput) =>
        row.status === InsurancePolicyStatusEnum.WaitEffect,
    },
  },
  {
    data: {
      enCode: 'standarEndoBtn',
      name: '申请退保',
    },
    emits: {
      onClick: (role) => handleStandarEndo(role),
    },
  },
]).filter(Boolean);
@@ -403,11 +418,37 @@
  });
}
function handleBatch(row: API.GetInsurancePageOutput) {
  if (
    dayjs(row.effectEndTime).isBefore(dayjs()) ||
    dayjs(row.effectEndTime).isSame(dayjs(), 'day')
  ) {
    Message.errorMessage('保险今天到期,无法批改');
    return;
  }
  router.push({
    name: 'BatchChange',
    params: {
      id: row.id,
    },
    query: {
      insurerName: row.insurerName ?? '',
      insureBillNo: row.insureBillNo ?? '',
      effectEndTime: row.effectEndTime ?? '',
    },
  });
}
async function handleStandarEndo(row: API.GetInsurancePageOutput) {
  try {
    await Message.deleteMessage('是否申请退保?');
    let params = {
      id: row.id,
    };
    // let res = await userServices.deleteRole(params);
    // if (res) {
    //   Message.successMessage('操作成功');
    //   getList(paginationState.pageIndex);
    // }
  } catch (error) {}
}
</script>