zhengyiming
2025-06-26 7134746b236dbdf638e3d8bbbf9e82cc03ea3b65
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';
@@ -159,6 +165,15 @@
        row.status === InsurancePolicyStatusEnum.WaitEffect,
    },
  },
  // {
  //   data: {
  //     enCode: 'standarEndoBtn',
  //     name: '申请退保',
  //   },
  //   emits: {
  //     onClick: (role) => handleStandarEndo(role),
  //   },
  // },
]).filter(Boolean);
const BaseState = {
@@ -237,6 +252,7 @@
  defaultFormParams: {
    serialNum: '',
    url: [] as UploadUserFile[],
    productIdNumber: '',
  },
  closeAfterConfirm: false,
});
@@ -266,6 +282,7 @@
    let params: API.APIimportInsStaffToListParams = {
      serialNum: editForm.serialNum,
      url: editForm.url?.[0]?.path,
      productIdNumber: editForm.productIdNumber,
    };
    let res = await insuranceOrderServices.importInsStaffToList(params);
    if (res.length > 0) {
@@ -403,6 +420,13 @@
  });
}
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: {
@@ -411,7 +435,22 @@
    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>