|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
- <div class="approvals-view">
|
|
|
+ <div class="page-fill approvals-view">
|
|
|
<PagePanel :title="pageTitle">
|
|
|
- <template #extra>
|
|
|
+ <template v-if="!isHistoryTab" #extra>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
:disabled="!selectedIds.length"
|
|
|
@@ -14,26 +14,35 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
|
|
|
- <p class="approvals-view__tip">
|
|
|
- <template v-if="isTownReview">
|
|
|
- 待审批为本镇当前月(批次 {{ currentBatchNo }})各村已提交名单。请先在「详情」中完成资格核验,再整批通过或驳回;人数以本批发放明细为准。
|
|
|
+ <p class="page-tip">
|
|
|
+ <template v-if="isHistoryTab && isTownReview">
|
|
|
+ 已办结的资格审批。通过为「新增」(等 1 号纳入月发),无资格为异常待处理,补材料退回「待提交资格」。
|
|
|
+ </template>
|
|
|
+ <template v-else-if="isHistoryTab && isLeaderReview">
|
|
|
+ 已办结的本镇月度清单与特殊业务审批。清单通过后社区事务可出盘;驳回后退回社区事务继续办理。
|
|
|
+ </template>
|
|
|
+ <template v-else-if="isHistoryTab">
|
|
|
+ 已办结审批,可按条件筛选查看,不可再次审批。
|
|
|
+ </template>
|
|
|
+ <template v-else-if="isTownReview">
|
|
|
+ 按人审批本镇退养资格(不看见批次)。待审只含村合作社已点「提交资格」的人员;未提交的请到「人员新增录入」办理。通过后为「新增」等 1 号纳入;已在正常发放的只补登记资格、不改发放状态。
|
|
|
</template>
|
|
|
<template v-else-if="isLeaderReview">
|
|
|
- 审批社区事务中心提交的月补贴清单与特殊业务。月补贴通过后可出盘;驳回退回居保匹配。特殊业务驳回退回业务补充。
|
|
|
+ 审本镇月度清单(镇统计)与特殊业务。通过后社区事务可出盘。提交到本节点前,本镇当月特殊业务须全部通过。
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- 镇经发初审通过后进入居保匹配;分管领导审月补贴/特殊业务。驳回分别退回村合作社或居保节点。
|
|
|
+ 管理员可按街镇协查:镇经发审退养资格;分管领导审本镇月度清单与特殊业务。日常审批由对应镇办理。
|
|
|
</template>
|
|
|
</p>
|
|
|
|
|
|
- <el-tabs v-model="activeTab" @tab-change="loadApprovals">
|
|
|
- <el-tab-pane :label="isTownReview ? '待审批(本月提交名单)' : '待审批'" name="pending" />
|
|
|
- <el-tab-pane label="全部" name="all" />
|
|
|
+ <el-tabs v-model="activeTab" @tab-change="onTabChange">
|
|
|
+ <el-tab-pane :label="isTownReview ? '待资格审批' : '待审批'" name="pending" />
|
|
|
+ <el-tab-pane :label="isTownReview ? '已审记录' : '历史记录'" name="history" />
|
|
|
</el-tabs>
|
|
|
|
|
|
- <div v-if="isAdmin" class="query-panel approvals-view__filter">
|
|
|
+ <div class="query-panel approvals-view__filter">
|
|
|
<el-form :inline="true" size="small">
|
|
|
- <el-form-item label="街镇">
|
|
|
+ <el-form-item v-if="isAdmin" label="街镇">
|
|
|
<el-select
|
|
|
v-model="filterTown"
|
|
|
placeholder="全部"
|
|
|
@@ -49,6 +58,21 @@
|
|
|
<el-option v-for="v in villageOptions" :key="v" :label="v" :value="v" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="!isTownReview" label="批次号">
|
|
|
+ <el-input
|
|
|
+ v-model="filterBatchNo"
|
|
|
+ placeholder="如 202608"
|
|
|
+ clearable
|
|
|
+ style="width: 130px"
|
|
|
+ @keyup.enter="applyFilter"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if="isHistoryTab" label="状态">
|
|
|
+ <el-select v-model="filterStatus" placeholder="全部" clearable style="width: 120px">
|
|
|
+ <el-option label="已通过" value="已通过" />
|
|
|
+ <el-option label="已驳回" value="已驳回" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="applyFilter">查询</el-button>
|
|
|
<el-button @click="resetFilter">重置</el-button>
|
|
|
@@ -56,18 +80,20 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="page-fill__table">
|
|
|
<el-table
|
|
|
v-loading="loading"
|
|
|
:data="pagedList"
|
|
|
border
|
|
|
stripe
|
|
|
size="small"
|
|
|
+ height="100%"
|
|
|
@selection-change="onSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="42" align="center" />
|
|
|
+ <el-table-column v-if="!isHistoryTab" type="selection" width="42" align="center" />
|
|
|
<el-table-column prop="bizType" label="业务类型" width="130" />
|
|
|
<el-table-column prop="title" label="标题" min-width="200" show-overflow-tooltip />
|
|
|
- <el-table-column prop="batchNo" label="批次号" width="88" align="center" />
|
|
|
+ <el-table-column v-if="!isTownReview" prop="batchNo" label="批次号" width="88" align="center" />
|
|
|
<el-table-column v-if="!isTownReview || isAdmin" prop="town" label="街镇" width="90" />
|
|
|
<el-table-column prop="village" label="村居" width="90" />
|
|
|
<el-table-column label="人数" width="64" align="center">
|
|
|
@@ -81,7 +107,7 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="总发放金额" width="120" align="right">
|
|
|
+ <el-table-column v-if="!isTownReview" label="总发放金额" width="120" align="right">
|
|
|
<template #default="{ row }">
|
|
|
{{
|
|
|
(row as Approval).totalAmount != null
|
|
|
@@ -137,6 +163,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ </div>
|
|
|
<TablePagination v-model:page="page" v-model:page-size="pageSize" :total="total" />
|
|
|
</PagePanel>
|
|
|
|
|
|
@@ -150,7 +177,7 @@
|
|
|
<el-dialog
|
|
|
v-model="detailVisible"
|
|
|
title="审批详情"
|
|
|
- :width="isTownReview ? '1100px' : '1040px'"
|
|
|
+ :width="isTownReview ? '1180px' : '1120px'"
|
|
|
destroy-on-close
|
|
|
@closed="onDetailClosed"
|
|
|
>
|
|
|
@@ -158,7 +185,8 @@
|
|
|
<el-descriptions-item label="业务类型">{{ currentRow.bizType }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="审批节点">{{ currentRow.node }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="标题" :span="2">{{ currentRow.title }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="批次号">{{ currentRow.batchNo }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item v-if="!isQualifyApproval(currentRow)" label="批次号">{{ currentRow.batchNo }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item v-else label="人员">{{ currentRow.personName || currentRow.title }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="状态">
|
|
|
<StatusTag :status="currentRow.status" />
|
|
|
</el-descriptions-item>
|
|
|
@@ -166,7 +194,7 @@
|
|
|
<el-descriptions-item label="村居">{{ currentRow.village || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="申请人">{{ currentRow.applicant }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="提交时间">{{ currentRow.createdAt }}</el-descriptions-item>
|
|
|
- <el-descriptions-item v-if="!isSpecialApproval(currentRow)" label="总发放金额" :span="2">
|
|
|
+ <el-descriptions-item v-if="!isSpecialApproval(currentRow) && !isQualifyApproval(currentRow)" label="总发放金额" :span="2">
|
|
|
<strong>{{ formatAmount(detailAmountSummary.payable) }}</strong>
|
|
|
<span class="muted" style="margin-left: 8px">
|
|
|
<template v-if="isAdjustDetailBatch">(调标差额批:应发=补发 {{ formatAmount(detailAmountSummary.supplement) }})</template>
|
|
|
@@ -184,7 +212,7 @@
|
|
|
<el-descriptions-item label="审批意见" :span="2">
|
|
|
{{ currentRow.opinion || '-' }}
|
|
|
</el-descriptions-item>
|
|
|
- <template v-if="isSpecialApproval(currentRow)">
|
|
|
+ <template v-if="isSpecialApproval(currentRow) || isQualifyApproval(currentRow)">
|
|
|
<el-descriptions-item v-if="currentRow.personName" label="人员">
|
|
|
{{ currentRow.personName }}
|
|
|
</el-descriptions-item>
|
|
|
@@ -200,15 +228,18 @@
|
|
|
</template>
|
|
|
</el-descriptions>
|
|
|
|
|
|
- <p v-if="isSpecialApproval(currentRow)" class="approvals-view__reject-tip" style="margin-top: 12px">
|
|
|
+ <p v-if="isQualifyApproval(currentRow)" class="approvals-view__reject-tip" style="margin-top: 12px">
|
|
|
+ 退养资格:通过后人员状态为「新增」,等待每月 1 号纳入全区月发;认定无资格进入异常待处理;驳回补材料退回村合作社。
|
|
|
+ </p>
|
|
|
+ <p v-else-if="isSpecialApproval(currentRow)" class="approvals-view__reject-tip" style="margin-top: 12px">
|
|
|
特殊业务:通过后系统按业务类型回写人员状态(死亡登记通过后改为「死亡丧葬」并停止续发);驳回后退回业务受理补充材料。
|
|
|
</p>
|
|
|
|
|
|
<!-- 特殊业务:涉及人员(通常 1 人) -->
|
|
|
- <div v-if="isSpecialApproval(currentRow)" class="approvals-view__people">
|
|
|
+ <div v-if="isSpecialApproval(currentRow) || isQualifyApproval(currentRow)" class="approvals-view__people">
|
|
|
<div class="approvals-view__people-toolbar">
|
|
|
<div class="approvals-view__people-title">
|
|
|
- 涉及人员
|
|
|
+ {{ isQualifyApproval(currentRow) ? '申请人员' : '涉及人员' }}
|
|
|
<em>共 {{ detailPeople.length || (currentRow?.peopleCount ?? 0) }} 人</em>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -234,6 +265,18 @@
|
|
|
<StatusTag :status="row.status" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="操作" width="72" align="center" fixed="right">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="openPersonDetail(row as Person)"
|
|
|
+ >
|
|
|
+ 详情
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<el-empty
|
|
|
v-if="!peopleLoading && !detailPeople.length"
|
|
|
@@ -245,7 +288,7 @@
|
|
|
<div v-else class="approvals-view__people">
|
|
|
<div class="approvals-view__people-toolbar">
|
|
|
<div class="approvals-view__people-title">
|
|
|
- {{ isTownReview ? '村合作社提交名单' : '本村人员列表' }}
|
|
|
+ {{ isTownReview ? '村合作社提交名单' : '本镇人员列表' }}
|
|
|
<span v-if="currentRow?.village">
|
|
|
({{ currentRow.town }}{{ currentRow.village }} · 批次 {{ currentRow.batchNo }})
|
|
|
</span>
|
|
|
@@ -255,7 +298,7 @@
|
|
|
</em>
|
|
|
<em v-if="detailStatusFilter">,当前 {{ filteredDetailPeople.length }} 人</em>
|
|
|
<em v-if="isTownReview && pendingQualifyCount > 0" class="approvals-view__people-warn">
|
|
|
- 待核验 {{ pendingQualifyCount }} 人
|
|
|
+ 待核验 {{ pendingQualifyCount }} 人,须核验后才能通过
|
|
|
</em>
|
|
|
</div>
|
|
|
<el-select
|
|
|
@@ -358,31 +401,44 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- v-if="isTownReview"
|
|
|
label="操作"
|
|
|
- width="110"
|
|
|
+ :width="isTownReview ? 168 : 72"
|
|
|
align="center"
|
|
|
fixed="right"
|
|
|
>
|
|
|
<template #default="{ row }">
|
|
|
<el-button
|
|
|
- v-if="canReviewQualify(row as Person)"
|
|
|
link
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- :loading="reviewingId === row.id"
|
|
|
- @click="openQualifyDialog(row as Person)"
|
|
|
+ @click="openPersonDetail(row as Person)"
|
|
|
>
|
|
|
- 核验资格
|
|
|
+ 详情
|
|
|
</el-button>
|
|
|
- <span
|
|
|
- v-else-if="row.retireQualifyType && row.retireQualifyType !== '无资格'"
|
|
|
- class="muted"
|
|
|
- >
|
|
|
- 已核验
|
|
|
- </span>
|
|
|
- <span v-else-if="isPastQualified(row as Person)" class="muted">往期已核验</span>
|
|
|
- <span v-else class="muted">—</span>
|
|
|
+ <template v-if="isTownReview">
|
|
|
+ <el-button
|
|
|
+ v-if="canReviewQualify(row as Person)"
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ :loading="reviewingId === row.id"
|
|
|
+ @click="openQualifyDialog(row as Person)"
|
|
|
+ >
|
|
|
+ 核验资格
|
|
|
+ </el-button>
|
|
|
+ <span
|
|
|
+ v-else-if="row.retireQualifyType === '无资格' || row.status === '无资格'"
|
|
|
+ class="muted"
|
|
|
+ >
|
|
|
+ 无资格
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ v-else-if="row.retireQualifyType"
|
|
|
+ class="muted"
|
|
|
+ >
|
|
|
+ 已核验
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -393,7 +449,7 @@
|
|
|
/>
|
|
|
<el-empty
|
|
|
v-if="!peopleLoading && !detailPeople.length"
|
|
|
- description="该村本批次暂无人员数据"
|
|
|
+ description="暂无待审批人员"
|
|
|
:image-size="64"
|
|
|
/>
|
|
|
<el-empty
|
|
|
@@ -411,8 +467,8 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
:loading="deciding"
|
|
|
- :disabled="hasIneligibleMembers"
|
|
|
- :title="hasIneligibleMembers ? '存在「无资格」人员,只能驳回由村处理' : undefined"
|
|
|
+ :disabled="townPassBlocked"
|
|
|
+ :title="townPassBlockedReason || undefined"
|
|
|
@click="onDecide(currentRow!, true)"
|
|
|
>
|
|
|
通过
|
|
|
@@ -429,12 +485,20 @@
|
|
|
title="确认通过"
|
|
|
width="520px"
|
|
|
destroy-on-close
|
|
|
+ :close-on-click-modal="!deciding"
|
|
|
+ :close-on-press-escape="!deciding"
|
|
|
@closed="onPassDialogClosed"
|
|
|
>
|
|
|
<p class="approvals-view__reject-tip" style="color: var(--el-text-color-secondary)">
|
|
|
{{ passTip }}
|
|
|
</p>
|
|
|
<el-form label-width="90px" size="small">
|
|
|
+ <el-form-item v-if="isQualifyPassTarget" label="资格认定" required>
|
|
|
+ <el-radio-group v-model="passQualifyType">
|
|
|
+ <el-radio value="有土地退养">有土地退养</el-radio>
|
|
|
+ <el-radio value="无土地有资格">无土地有资格</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="审批意见">
|
|
|
<el-input
|
|
|
v-model="passOpinion"
|
|
|
@@ -464,8 +528,8 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
- <el-button @click="passVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" :loading="deciding" @click="confirmPass">确认通过</el-button>
|
|
|
+ <el-button :disabled="deciding" @click="passVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" :loading="deciding" :disabled="deciding" @click="confirmPass">确认通过</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
@@ -475,25 +539,36 @@
|
|
|
title="填写驳回理由"
|
|
|
width="520px"
|
|
|
destroy-on-close
|
|
|
+ :close-on-click-modal="!deciding"
|
|
|
+ :close-on-press-escape="!deciding"
|
|
|
@closed="onRejectDialogClosed"
|
|
|
>
|
|
|
<p class="approvals-view__reject-tip">
|
|
|
- <template v-if="isTownReview && ineligibleMembers.length">
|
|
|
+ <template v-if="isQualifyRejectTarget">
|
|
|
+ 「无资格」将人员标为异常待处理;「补材料」退回村合作社「待提交资格」后可重提。
|
|
|
+ </template>
|
|
|
+ <template v-else-if="isTownReview && ineligibleMembers.length">
|
|
|
本批有 {{ ineligibleMembers.length }} 人已认定「无资格」({{
|
|
|
ineligibleMembers.map((p) => p.name).join('、')
|
|
|
}})。驳回后将退回村合作社:请取消该人员或流程备注说明后重新提交。
|
|
|
</template>
|
|
|
<template v-else-if="isTownReview">
|
|
|
- 驳回后批次将退回村合作社修改,请明确说明退回原因。
|
|
|
+ 驳回后资格申请退回村合作社补材料或认定无资格。
|
|
|
</template>
|
|
|
<template v-else-if="isLeaderReview">
|
|
|
- 月补贴清单驳回后退回居保匹配;特殊业务驳回后退回业务受理补充/修改。请明确说明退回原因。
|
|
|
+ 月度清单驳回后退回社区事务继续办理;特殊业务驳回后退回业务受理补充/修改。请写明原因。
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- 驳回后批次将退回修改,请明确说明退回原因。
|
|
|
+ 驳回后将退回修改,请明确说明退回原因。
|
|
|
</template>
|
|
|
</p>
|
|
|
<el-form label-width="90px" size="small">
|
|
|
+ <el-form-item v-if="isQualifyRejectTarget" label="驳回方式" required>
|
|
|
+ <el-radio-group v-model="rejectQualifyMode">
|
|
|
+ <el-radio value="supplement">驳回补材料</el-radio>
|
|
|
+ <el-radio value="ineligible">认定无资格</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="驳回理由" required>
|
|
|
<el-input
|
|
|
v-model="rejectOpinion"
|
|
|
@@ -523,15 +598,15 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
- <el-button @click="rejectVisible = false">取消</el-button>
|
|
|
- <el-button type="danger" :loading="deciding" @click="confirmReject">确认驳回</el-button>
|
|
|
+ <el-button :disabled="deciding" @click="rejectVisible = false">取消</el-button>
|
|
|
+ <el-button type="danger" :loading="deciding" :disabled="deciding" @click="confirmReject">确认驳回</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 镇经发:核验退养资格 -->
|
|
|
<el-dialog v-model="qualifyVisible" title="核验退养资格" width="520px" destroy-on-close>
|
|
|
<p class="approvals-view__qualify-tip">
|
|
|
- 请确认该新增人员是否具备土地退养资格。有资格将写入「退养资格」字段;认定「无资格」后本批只能驳回,由村取消该人员或流程备注说明。人员状态仍显示业务底数状态(如待镇初审/正常在库)。
|
|
|
+ 请确认该人员是否具备土地退养资格。选择「有土地退养」或「无土地有资格」后通过,人员变为「新增」,等每月 1 号纳入全区月发。认定「无资格」则进入异常待处理。
|
|
|
</p>
|
|
|
<el-descriptions v-if="qualifyTarget" :column="1" border size="small" class="approvals-view__qualify-info">
|
|
|
<el-descriptions-item label="姓名">{{ qualifyTarget.name }}</el-descriptions-item>
|
|
|
@@ -550,15 +625,31 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<p v-if="qualifyType === '无资格'" class="approvals-view__qualify-warn">
|
|
|
- 认定无资格后,本批次不可「通过」,只能「驳回」退回村合作社处理(取消该人员或补充说明后重提)。
|
|
|
+ 认定无资格后,人员进入异常待处理,不再纳入每月 1 号全区月发。
|
|
|
</p>
|
|
|
<template #footer>
|
|
|
- <el-button @click="qualifyVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" :loading="reviewingId !== null" @click="confirmQualify">
|
|
|
+ <el-button :disabled="reviewingId !== null" @click="qualifyVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" :loading="reviewingId !== null" :disabled="reviewingId !== null" @click="confirmQualify">
|
|
|
确认核验
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ v-model="personDetailVisible"
|
|
|
+ :title="personDetail ? `人员详情 · ${personDetail.name}` : '人员详情'"
|
|
|
+ width="920px"
|
|
|
+ append-to-body
|
|
|
+ destroy-on-close
|
|
|
+ @closed="onPersonDetailClosed"
|
|
|
+ >
|
|
|
+ <div v-loading="personDetailLoading">
|
|
|
+ <PersonnelDetailDescriptions v-if="personDetail" :person="personDetail" />
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="personDetailVisible = false">关闭</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -571,10 +662,12 @@ import StatusTag from '@/components/common/StatusTag.vue'
|
|
|
import TablePagination from '@/components/common/TablePagination.vue'
|
|
|
import BatchDetailDrawer from '@/components/biz/BatchDetailDrawer.vue'
|
|
|
import FlowAttachments from '@/components/biz/FlowAttachments.vue'
|
|
|
+import PersonnelDetailDescriptions from '@/components/biz/PersonnelDetailDescriptions.vue'
|
|
|
import {
|
|
|
decideApproval,
|
|
|
fetchApprovals,
|
|
|
fetchBatchMemberPeople,
|
|
|
+ fetchPersonDetail,
|
|
|
fetchSpecialBizPerson,
|
|
|
reviewPersonQualify,
|
|
|
uploadBizFile,
|
|
|
@@ -582,6 +675,7 @@ import {
|
|
|
import { parseApprovalId } from '@/api/sjnmtybt/mappers'
|
|
|
import { useClientPagination } from '@/composables/useClientPagination'
|
|
|
import { useTownVillageOptions } from '@/composables/useTownVillageOptions'
|
|
|
+import { guardBusy } from '@/composables/useSubmitLock'
|
|
|
import { useUserStore } from '@/stores/user'
|
|
|
import { sumBatchMemberAmounts } from '@/utils/batchAmounts'
|
|
|
import { isYearlyAdjustBatchLike } from '@/utils/batchAdjust'
|
|
|
@@ -597,10 +691,13 @@ const {
|
|
|
villageOptions,
|
|
|
onTownChange,
|
|
|
resetTownVillage,
|
|
|
- matchTownVillage,
|
|
|
+ loadVillages,
|
|
|
} = useTownVillageOptions()
|
|
|
|
|
|
const activeTab = ref('pending')
|
|
|
+const isHistoryTab = computed(() => activeTab.value === 'history')
|
|
|
+const filterBatchNo = ref('')
|
|
|
+const filterStatus = ref('')
|
|
|
const list = ref<Approval[]>([])
|
|
|
const loading = ref(false)
|
|
|
const deciding = ref(false)
|
|
|
@@ -649,6 +746,8 @@ const passTarget = ref<Approval | null>(null)
|
|
|
const passBatchMode = ref(false)
|
|
|
const passFileList = ref<UploadUserFile[]>([])
|
|
|
const passRawFiles = ref<File[]>([])
|
|
|
+const passQualifyType = ref<'有土地退养' | '无土地有资格'>('有土地退养')
|
|
|
+const rejectQualifyMode = ref<'supplement' | 'ineligible'>('supplement')
|
|
|
const batchDrawerVisible = ref(false)
|
|
|
const batchDrawerId = ref('')
|
|
|
|
|
|
@@ -664,6 +763,12 @@ function isSpecialApproval(row: Approval | null | undefined): boolean {
|
|
|
return parsed?.kind === 'special'
|
|
|
}
|
|
|
|
|
|
+function isQualifyApproval(row: Approval | null | undefined): boolean {
|
|
|
+ if (!row) return false
|
|
|
+ const parsed = parseApprovalId(String(row.id || ''))
|
|
|
+ return parsed?.kind === 'qualify' || row.bizType === '退养资格审批'
|
|
|
+}
|
|
|
+
|
|
|
function syncRejectFiles(_file: UploadFile, fileList: UploadFile[]) {
|
|
|
rejectFileList.value = fileList
|
|
|
rejectRawFiles.value = fileList.map((f) => f.raw).filter((f): f is File => !!f)
|
|
|
@@ -691,6 +796,17 @@ function onPassDialogClosed() {
|
|
|
passBatchMode.value = false
|
|
|
}
|
|
|
|
|
|
+const isQualifyPassTarget = computed(
|
|
|
+ () =>
|
|
|
+ isQualifyApproval(passTarget.value) ||
|
|
|
+ (passBatchMode.value && isTownReview.value),
|
|
|
+)
|
|
|
+const isQualifyRejectTarget = computed(
|
|
|
+ () =>
|
|
|
+ isQualifyApproval(rejectTarget.value) ||
|
|
|
+ (rejectBatchMode.value && isTownReview.value),
|
|
|
+)
|
|
|
+
|
|
|
async function uploadApproveFiles(files: File[]): Promise<string | undefined> {
|
|
|
if (!files.length) return undefined
|
|
|
const uploaded: string[] = []
|
|
|
@@ -715,6 +831,9 @@ const qualifyVisible = ref(false)
|
|
|
const qualifyTarget = ref<Person | null>(null)
|
|
|
const qualifyType = ref<'有土地退养' | '无土地有资格' | '无资格'>('有土地退养')
|
|
|
const reviewingId = ref<number | string | null>(null)
|
|
|
+const personDetailVisible = ref(false)
|
|
|
+const personDetailLoading = ref(false)
|
|
|
+const personDetail = ref<Person | null>(null)
|
|
|
|
|
|
function qualifyTagType(t?: string): 'success' | 'warning' | 'danger' | 'info' {
|
|
|
if (t === '无资格') return 'danger'
|
|
|
@@ -723,8 +842,13 @@ function qualifyTagType(t?: string): 'success' | 'warning' | 'danger' | 'info' {
|
|
|
}
|
|
|
|
|
|
const filteredList = computed(() => {
|
|
|
- if (!isAdmin.value) return list.value
|
|
|
- return list.value.filter((row) => matchTownVillage(row))
|
|
|
+ let rows = list.value
|
|
|
+ if (filterTown.value) rows = rows.filter((row) => row.town === filterTown.value)
|
|
|
+ if (filterVillage.value) rows = rows.filter((row) => row.village === filterVillage.value)
|
|
|
+ const batchNo = filterBatchNo.value.trim()
|
|
|
+ if (batchNo) rows = rows.filter((row) => row.batchNo.includes(batchNo))
|
|
|
+ if (filterStatus.value) rows = rows.filter((row) => row.status === filterStatus.value)
|
|
|
+ return rows
|
|
|
})
|
|
|
|
|
|
const { page, pageSize, total, pagedList, resetPage } = useClientPagination(filteredList)
|
|
|
@@ -734,9 +858,23 @@ function applyFilter() {
|
|
|
}
|
|
|
|
|
|
function resetFilter() {
|
|
|
- resetTownVillage()
|
|
|
+ filterBatchNo.value = ''
|
|
|
+ filterStatus.value = ''
|
|
|
+ if (isAdmin.value) {
|
|
|
+ resetTownVillage()
|
|
|
+ } else {
|
|
|
+ filterVillage.value = ''
|
|
|
+ }
|
|
|
resetPage()
|
|
|
}
|
|
|
+
|
|
|
+async function syncScopeTown() {
|
|
|
+ const town = userStore.roleInfo?.town
|
|
|
+ if (!isAdmin.value && town) {
|
|
|
+ filterTown.value = town
|
|
|
+ await loadVillages(town)
|
|
|
+ }
|
|
|
+}
|
|
|
const detailStatusFilter = ref('')
|
|
|
const detailStatusOptions = computed(() => {
|
|
|
const set = new Set<string>()
|
|
|
@@ -768,7 +906,7 @@ const isTownReview = computed(() => userStore.currentRole === 'town')
|
|
|
const isLeaderReview = computed(() => userStore.currentRole === 'leader')
|
|
|
|
|
|
const pageTitle = computed(() => {
|
|
|
- if (isTownReview.value) return '审批管理(土地退养资格初审)'
|
|
|
+ if (isTownReview.value) return '退养资格审批'
|
|
|
if (isLeaderReview.value) return '审批管理(分管领导线上审批)'
|
|
|
if (isAdmin.value) return '审批管理(全区 · 按镇+村)'
|
|
|
return '审批管理'
|
|
|
@@ -777,11 +915,23 @@ const pageTitle = computed(() => {
|
|
|
/** 当前发放周期对应批次号 */
|
|
|
const currentBatchNo = computed(() => userStore.currentMonth.replace('-', ''))
|
|
|
|
|
|
-/** 详情中仍需资格核验的新增人员数(不含往期已通过) */
|
|
|
+/** 详情中仍需资格核验的人数(退养资格字段为空) */
|
|
|
const pendingQualifyCount = computed(
|
|
|
() => detailPeople.value.filter((p) => needsQualifyReview(p)).length,
|
|
|
)
|
|
|
|
|
|
+const townPassBlockedReason = computed(() => {
|
|
|
+ if (isQualifyApproval(currentRow.value)) return ''
|
|
|
+ if (hasIneligibleMembers.value) {
|
|
|
+ return `存在「无资格」人员 ${ineligibleMembers.value.length} 人,只能驳回由村处理`
|
|
|
+ }
|
|
|
+ if (pendingQualifyCount.value > 0) {
|
|
|
+ return `有 ${pendingQualifyCount.value} 人退养资格尚未核验,请先点「核验资格」`
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+})
|
|
|
+const townPassBlocked = computed(() => Boolean(townPassBlockedReason.value))
|
|
|
+
|
|
|
/** 已认定「无资格」的人员:批次只能驳回 */
|
|
|
const ineligibleMembers = computed(() =>
|
|
|
detailPeople.value.filter((p) => p.retireQualifyType === '无资格' || p.status === '无资格'),
|
|
|
@@ -792,29 +942,19 @@ function onSelectionChange(rows: Approval[]) {
|
|
|
selectedIds.value = rows.map((r) => r.id)
|
|
|
}
|
|
|
|
|
|
-/** 本批次新增且尚未完成资格核验的状态 */
|
|
|
-const NEW_PENDING_STATUSES = ['草稿', '人员新增录入', '退回修改', '待人工确认', '待镇初审']
|
|
|
-
|
|
|
function hasQualifyResult(row: Person) {
|
|
|
return Boolean(row.retireQualifyType)
|
|
|
}
|
|
|
|
|
|
-/** 是否本批次新增、仍待资格核验(以退养资格字段为准,不伪造人员状态文案) */
|
|
|
+/** 退养资格未填即待核验(不再用「正常发放」推断为往期已核验) */
|
|
|
function needsQualifyReview(row: Person) {
|
|
|
+ if ((row as BatchMemberPerson).changeFlag === 'REMOVE') return false
|
|
|
if (hasQualifyResult(row)) return false
|
|
|
if (row.status === '无资格') return false
|
|
|
- return NEW_PENDING_STATUSES.includes(row.status) || row.status.includes('待审')
|
|
|
+ return true
|
|
|
}
|
|
|
|
|
|
-/** 往期已通过资格审核(历史在册等),无需再次核验 */
|
|
|
-function isPastQualified(row: Person) {
|
|
|
- if (row.status === '无资格' || row.retireQualifyType === '无资格') return false
|
|
|
- if (hasQualifyResult(row)) return false
|
|
|
- if (needsQualifyReview(row)) return false
|
|
|
- return row.status === '正常发放' || row.status === '正常在库' || /通过|在库|发放|暂停|停止/.test(row.status)
|
|
|
-}
|
|
|
-
|
|
|
-/** 待审批名单中的新增人员可做资格核验;往期已通过的不可再审 */
|
|
|
+/** 待审批名单中资格未填的人员可核验 */
|
|
|
function canReviewQualify(row: Person) {
|
|
|
if (!isTownReview.value) return false
|
|
|
if (currentRow.value?.status !== '待审批') return false
|
|
|
@@ -829,8 +969,30 @@ function openQualifyDialog(row: Person) {
|
|
|
qualifyVisible.value = true
|
|
|
}
|
|
|
|
|
|
+async function openPersonDetail(row: Person) {
|
|
|
+ const id = String(row.id || currentRow.value?.personnelId || '')
|
|
|
+ if (!id || id === 'undefined') {
|
|
|
+ ElMessage.warning('未关联到在册人员,无法查看详情')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ personDetail.value = row
|
|
|
+ personDetailVisible.value = true
|
|
|
+ personDetailLoading.value = true
|
|
|
+ try {
|
|
|
+ const full = await fetchPersonDetail(id)
|
|
|
+ if (full) personDetail.value = full
|
|
|
+ } finally {
|
|
|
+ personDetailLoading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function onPersonDetailClosed() {
|
|
|
+ personDetail.value = null
|
|
|
+}
|
|
|
+
|
|
|
async function confirmQualify() {
|
|
|
if (!qualifyTarget.value) return
|
|
|
+ if (guardBusy(reviewingId)) return
|
|
|
reviewingId.value = qualifyTarget.value.id
|
|
|
try {
|
|
|
await reviewPersonQualify({
|
|
|
@@ -876,9 +1038,10 @@ async function openDetail(row: Approval) {
|
|
|
detailStatusFilter.value = ''
|
|
|
peopleLoading.value = true
|
|
|
try {
|
|
|
- if (isSpecialApproval(row)) {
|
|
|
- let person = row.personnelId
|
|
|
- ? await fetchSpecialBizPerson(row.personnelId)
|
|
|
+ if (isQualifyApproval(row) || isSpecialApproval(row)) {
|
|
|
+ const pid = row.personnelId || (isQualifyApproval(row) ? parseApprovalId(String(row.id || ''))?.bizId : '')
|
|
|
+ let person = pid
|
|
|
+ ? (isQualifyApproval(row) ? await fetchPersonDetail(pid) : await fetchSpecialBizPerson(pid))
|
|
|
: null
|
|
|
if (!person && row.personName) {
|
|
|
// 兜底:列表已有姓名时先展示一行,避免详情空白
|
|
|
@@ -968,67 +1131,96 @@ async function doDecide(
|
|
|
opinion?: string,
|
|
|
fileUrls?: string,
|
|
|
) {
|
|
|
- deciding.value = true
|
|
|
- try {
|
|
|
- await decideApproval({ id: row.id, pass, opinion, fileUrls })
|
|
|
- const isTown = row.node.includes('镇经发')
|
|
|
- const isMonthly = row.bizType.includes('月') || row.bizType.includes('清单')
|
|
|
- if (pass) {
|
|
|
- const isDeath = row.bizType.includes('死亡')
|
|
|
- ElMessage.success(
|
|
|
- isTown
|
|
|
- ? '已通过,批次状态已更新为「居保状态匹配」'
|
|
|
- : isMonthly
|
|
|
- ? '已通过,批次进入「已审核」,可由业务部门出盘'
|
|
|
- : isDeath
|
|
|
- ? '已通过,人员状态已更新为「死亡丧葬」'
|
|
|
- : '已通过',
|
|
|
- )
|
|
|
- } else {
|
|
|
- ElMessage.success(
|
|
|
- isTown
|
|
|
+ const qualifyType = isQualifyApproval(row)
|
|
|
+ ? pass
|
|
|
+ ? passQualifyType.value
|
|
|
+ : rejectQualifyMode.value === 'ineligible'
|
|
|
+ ? '无资格'
|
|
|
+ : undefined
|
|
|
+ : undefined
|
|
|
+ await decideApproval({
|
|
|
+ id: row.id,
|
|
|
+ pass,
|
|
|
+ opinion,
|
|
|
+ fileUrls,
|
|
|
+ retireQualifyType: qualifyType,
|
|
|
+ })
|
|
|
+ const isTown = row.node.includes('镇经发') || isQualifyApproval(row)
|
|
|
+ const isMonthly = row.bizType.includes('月') || row.bizType.includes('清单')
|
|
|
+ if (pass) {
|
|
|
+ const isDeath = row.bizType.includes('死亡')
|
|
|
+ ElMessage.success(
|
|
|
+ isTown
|
|
|
+ ? '已通过,人员状态已更新为「新增」'
|
|
|
+ : isMonthly
|
|
|
+ ? '已通过,批次进入「已审核」,可由业务部门出盘'
|
|
|
+ : isDeath
|
|
|
+ ? '已通过,人员状态已更新为「死亡丧葬」'
|
|
|
+ : '已通过',
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ ElMessage.success(
|
|
|
+ isQualifyApproval(row)
|
|
|
+ ? rejectQualifyMode.value === 'ineligible'
|
|
|
+ ? '已认定无资格,已写入村告警,请村合作社处理'
|
|
|
+ : '已驳回补材料,已写入村告警,请村合作社补充后重新提交'
|
|
|
+ : isTown
|
|
|
? '已驳回(补充/修改),批次已退回村合作社'
|
|
|
: isMonthly
|
|
|
? '已驳回(补充/修改),批次已退回居保匹配环节'
|
|
|
: '已驳回(补充/修改),已退回业务受理',
|
|
|
- )
|
|
|
- }
|
|
|
- detailVisible.value = false
|
|
|
- await loadApprovals()
|
|
|
- } finally {
|
|
|
- deciding.value = false
|
|
|
+ )
|
|
|
}
|
|
|
+ detailVisible.value = false
|
|
|
+ await loadApprovals()
|
|
|
+}
|
|
|
+
|
|
|
+async function townPassBlockReason(row: Approval, people?: Person[]): Promise<string | null> {
|
|
|
+ if (isSpecialApproval(row) || isQualifyApproval(row)) return null
|
|
|
+ if (!(isTownReview.value || row.node.includes('镇经发'))) return null
|
|
|
+ let list = people
|
|
|
+ if (!list) {
|
|
|
+ const batchId = row.batchId || batchIdOfApproval(row)
|
|
|
+ if (!batchId) return null
|
|
|
+ list = await fetchBatchMemberPeople(batchId, {
|
|
|
+ batchNo: row.batchNo,
|
|
|
+ town: row.town,
|
|
|
+ village: row.village,
|
|
|
+ pruneDefaults: false,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const ineligible = list.filter((p) => p.retireQualifyType === '无资格' || p.status === '无资格')
|
|
|
+ if (ineligible.length) {
|
|
|
+ return `「${row.village || row.title}」有 ${ineligible.length} 人已认定「无资格」,不能通过;请驳回由村取消该人员或补充说明。`
|
|
|
+ }
|
|
|
+ const pending = list.filter((p) => needsQualifyReview(p))
|
|
|
+ if (pending.length) {
|
|
|
+ const names = pending
|
|
|
+ .slice(0, 8)
|
|
|
+ .map((p) => p.name || p.id)
|
|
|
+ .join('、')
|
|
|
+ const extra = pending.length > 8 ? ` 等 ${pending.length} 人` : ''
|
|
|
+ return `「${row.village || row.title}」有 ${pending.length} 人退养资格尚未核验(${names}${extra}),请先在详情中点「核验资格」后再通过。`
|
|
|
+ }
|
|
|
+ return null
|
|
|
}
|
|
|
|
|
|
async function onDecide(row: Approval, pass: boolean) {
|
|
|
if (pass) {
|
|
|
- if (
|
|
|
- (isTownReview.value || row.node.includes('镇经发')) &&
|
|
|
- detailVisible.value &&
|
|
|
- currentRow.value?.id === row.id &&
|
|
|
- hasIneligibleMembers.value
|
|
|
- ) {
|
|
|
- ElMessage.warning(
|
|
|
- `本批有 ${ineligibleMembers.value.length} 人已认定「无资格」,不能通过;请驳回由村取消该人员或补充说明。`,
|
|
|
- )
|
|
|
+ const people =
|
|
|
+ detailVisible.value && currentRow.value?.id === row.id ? detailPeople.value : undefined
|
|
|
+ const block = await townPassBlockReason(row, people)
|
|
|
+ if (block) {
|
|
|
+ ElMessage.warning(block)
|
|
|
return
|
|
|
}
|
|
|
- const unchecked =
|
|
|
- (isTownReview.value || row.node.includes('镇经发')) &&
|
|
|
- detailVisible.value &&
|
|
|
- currentRow.value?.id === row.id
|
|
|
- ? pendingQualifyCount.value
|
|
|
- : 0
|
|
|
passTarget.value = row
|
|
|
passBatchMode.value = false
|
|
|
passOpinion.value = '同意'
|
|
|
passFileList.value = []
|
|
|
passRawFiles.value = []
|
|
|
- if (isTownReview.value || row.node.includes('镇经发')) {
|
|
|
- passTip.value =
|
|
|
- unchecked > 0
|
|
|
- ? `仍有 ${unchecked} 人未完成资格核验。确认仍要通过「${row.title}」?通过后该村批次将进入「居保状态匹配」。`
|
|
|
- : `确认通过「${row.title}」?通过后该村批次将进入「居保状态匹配」。`
|
|
|
+ if (isQualifyApproval(row) || isTownReview.value || row.node.includes('镇经发')) {
|
|
|
+ passTip.value = `确认通过「${row.title}」?村新提交的人员通过后变为「新增」;已在正常发放的人员只补登记退养资格。`
|
|
|
} else if (isSpecialApproval(row)) {
|
|
|
passTip.value = `确认通过「${row.title}」?特殊业务通过后将按类型回写人员状态(死亡登记通过后变为「死亡丧葬」)。`
|
|
|
} else {
|
|
|
@@ -1048,15 +1240,22 @@ async function onDecide(row: Approval, pass: boolean) {
|
|
|
}
|
|
|
|
|
|
async function confirmPass() {
|
|
|
+ if (guardBusy(deciding)) return
|
|
|
const opinion = passOpinion.value.trim() || '同意'
|
|
|
deciding.value = true
|
|
|
try {
|
|
|
const fileUrls = await uploadApproveFiles(passRawFiles.value)
|
|
|
if (passBatchMode.value) {
|
|
|
for (const id of selectedIds.value) {
|
|
|
- await decideApproval({ id, pass: true, opinion, fileUrls })
|
|
|
+ await decideApproval({
|
|
|
+ id,
|
|
|
+ pass: true,
|
|
|
+ opinion,
|
|
|
+ fileUrls,
|
|
|
+ retireQualifyType: isTownReview.value ? passQualifyType.value : undefined,
|
|
|
+ })
|
|
|
}
|
|
|
- ElMessage.success('批量通过成功,批次状态已更新')
|
|
|
+ ElMessage.success(isTownReview.value ? '批量资格审批通过' : '批量通过成功')
|
|
|
selectedIds.value = []
|
|
|
passVisible.value = false
|
|
|
detailVisible.value = false
|
|
|
@@ -1064,16 +1263,13 @@ async function confirmPass() {
|
|
|
return
|
|
|
}
|
|
|
if (passTarget.value) {
|
|
|
- // 避免与 doDecide 重复切换 loading
|
|
|
- deciding.value = false
|
|
|
await doDecide(passTarget.value, true, opinion, fileUrls)
|
|
|
passVisible.value = false
|
|
|
}
|
|
|
} catch (e) {
|
|
|
ElMessage.error(e instanceof Error ? e.message : '上传或审批失败')
|
|
|
- deciding.value = false
|
|
|
} finally {
|
|
|
- if (passBatchMode.value) deciding.value = false
|
|
|
+ deciding.value = false
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1083,14 +1279,26 @@ async function confirmReject() {
|
|
|
ElMessage.warning('请填写驳回理由')
|
|
|
return
|
|
|
}
|
|
|
+ if (guardBusy(deciding)) return
|
|
|
deciding.value = true
|
|
|
try {
|
|
|
const fileUrls = await uploadApproveFiles(rejectRawFiles.value)
|
|
|
if (rejectBatchMode.value) {
|
|
|
for (const id of selectedIds.value) {
|
|
|
- await decideApproval({ id, pass: false, opinion: reason, fileUrls })
|
|
|
+ await decideApproval({
|
|
|
+ id,
|
|
|
+ pass: false,
|
|
|
+ opinion: reason,
|
|
|
+ fileUrls,
|
|
|
+ retireQualifyType:
|
|
|
+ isTownReview.value
|
|
|
+ ? rejectQualifyMode.value === 'ineligible'
|
|
|
+ ? '无资格'
|
|
|
+ : '有土地退养'
|
|
|
+ : undefined,
|
|
|
+ })
|
|
|
}
|
|
|
- ElMessage.success('批量驳回成功,相关批次已退回修改')
|
|
|
+ ElMessage.success('批量驳回成功')
|
|
|
selectedIds.value = []
|
|
|
rejectVisible.value = false
|
|
|
detailVisible.value = false
|
|
|
@@ -1098,15 +1306,13 @@ async function confirmReject() {
|
|
|
return
|
|
|
}
|
|
|
if (rejectTarget.value) {
|
|
|
- deciding.value = false
|
|
|
await doDecide(rejectTarget.value, false, reason, fileUrls)
|
|
|
rejectVisible.value = false
|
|
|
}
|
|
|
} catch (e) {
|
|
|
ElMessage.error(e instanceof Error ? e.message : '上传或驳回失败')
|
|
|
- deciding.value = false
|
|
|
} finally {
|
|
|
- if (rejectBatchMode.value) deciding.value = false
|
|
|
+ deciding.value = false
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1120,6 +1326,17 @@ async function onBatchDecide(pass: boolean) {
|
|
|
rejectVisible.value = true
|
|
|
return
|
|
|
}
|
|
|
+ if (isTownReview.value) {
|
|
|
+ for (const id of selectedIds.value) {
|
|
|
+ const row = list.value.find((r) => r.id === id)
|
|
|
+ if (!row) continue
|
|
|
+ const block = await townPassBlockReason(row)
|
|
|
+ if (block) {
|
|
|
+ ElMessage.warning(block)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
passBatchMode.value = true
|
|
|
passTarget.value = null
|
|
|
passOpinion.value = '同意'
|
|
|
@@ -1131,17 +1348,14 @@ async function onBatchDecide(pass: boolean) {
|
|
|
|
|
|
async function loadApprovals() {
|
|
|
loading.value = true
|
|
|
+ selectedIds.value = []
|
|
|
try {
|
|
|
const role = userStore.roleInfo
|
|
|
const isPending = activeTab.value === 'pending'
|
|
|
list.value = await fetchApprovals({
|
|
|
- tab: isPending ? 'pending' : undefined,
|
|
|
+ tab: isPending ? 'pending' : 'history',
|
|
|
node: approvalNode.value,
|
|
|
- // 镇经发 / 分管领导:均限定本镇
|
|
|
town: isTownReview.value || isLeaderReview.value ? role?.town : undefined,
|
|
|
- // 镇经发:本月村合作社提交的月度批次名单
|
|
|
- batchNo: isTownReview.value && isPending ? currentBatchNo.value : undefined,
|
|
|
- bizTypeIncludes: isTownReview.value && isPending ? '月度批次' : undefined,
|
|
|
})
|
|
|
resetPage()
|
|
|
} finally {
|
|
|
@@ -1149,13 +1363,27 @@ async function loadApprovals() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-onMounted(loadApprovals)
|
|
|
+function onTabChange() {
|
|
|
+ filterStatus.value = ''
|
|
|
+ loadApprovals()
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ await syncScopeTown()
|
|
|
+ await loadApprovals()
|
|
|
+})
|
|
|
|
|
|
watch(
|
|
|
() => [userStore.currentRole, userStore.currentMonth],
|
|
|
- () => {
|
|
|
- resetTownVillage()
|
|
|
- loadApprovals()
|
|
|
+ async () => {
|
|
|
+ filterBatchNo.value = ''
|
|
|
+ filterStatus.value = ''
|
|
|
+ if (isAdmin.value) resetTownVillage()
|
|
|
+ else {
|
|
|
+ filterVillage.value = ''
|
|
|
+ await syncScopeTown()
|
|
|
+ }
|
|
|
+ await loadApprovals()
|
|
|
},
|
|
|
)
|
|
|
</script>
|