fix
This commit is contained in:
@@ -55,8 +55,8 @@
|
||||
采购申请管理
|
||||
</span>
|
||||
<div class="header-actions">
|
||||
<el-button icon="Files" link type="primary"> 采购申请汇总 </el-button>
|
||||
<el-button icon="FolderAdd" type="primary" @click="handleAdd"> 新增 </el-button>
|
||||
<el-button icon="Files" link type="primary"> 采购申请汇总</el-button>
|
||||
<el-button icon="FolderAdd" type="primary" @click="handleAdd"> 新增</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" @queryTable="getDataList" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,12 +74,16 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="70" align="center">
|
||||
<template #header>
|
||||
<el-icon><List /></el-icon>
|
||||
<el-icon>
|
||||
<List />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="purchaseNo" label="申请单编号" min-width="180">
|
||||
<template #header>
|
||||
<el-icon><DocumentCopy /></el-icon>
|
||||
<el-icon>
|
||||
<DocumentCopy />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">申请单编号</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -95,32 +99,42 @@
|
||||
class="copy-btn"
|
||||
@click.stop="copyToClipboard(scope.row.purchaseNo)"
|
||||
>
|
||||
<el-icon><CopyDocument /></el-icon>
|
||||
<el-icon>
|
||||
<CopyDocument />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectName" label="采购项目名称" min-width="200" show-overflow-tooltip>
|
||||
<template #header>
|
||||
<el-icon><Document /></el-icon>
|
||||
<el-icon>
|
||||
<Document />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">采购项目名称</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="applyDate" label="填报日期" width="120" align="center" show-overflow-tooltip>
|
||||
<template #header>
|
||||
<el-icon><Calendar /></el-icon>
|
||||
<el-icon>
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">填报日期</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deptName" label="需求部门" min-width="150" show-overflow-tooltip>
|
||||
<template #header>
|
||||
<el-icon><OfficeBuilding /></el-icon>
|
||||
<el-icon>
|
||||
<OfficeBuilding />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">需求部门</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectType" label="项目类别" min-width="200" align="left" show-overflow-tooltip>
|
||||
<template #header>
|
||||
<el-icon><Collection /></el-icon>
|
||||
<el-icon>
|
||||
<Collection />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">项目类别</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -139,7 +153,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="budget" label="项目预算(元)" width="130" align="right">
|
||||
<template #header>
|
||||
<el-icon><Money /></el-icon>
|
||||
<el-icon>
|
||||
<Money />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">项目预算</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -148,7 +164,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="isSpecial" label="是否特殊" width="100" align="center">
|
||||
<template #header>
|
||||
<el-icon><Warning /></el-icon>
|
||||
<el-icon>
|
||||
<Warning />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">是否特殊</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -161,7 +179,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="isCentralized" label="是否集采" width="100" align="center">
|
||||
<template #header>
|
||||
<el-icon><CircleCheck /></el-icon>
|
||||
<el-icon>
|
||||
<CircleCheck />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">是否集采</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -170,9 +190,11 @@
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="purchaseMode" label="采购形式" width="140" align="center">
|
||||
<el-table-column prop="purchaseMode" label="采购形式" width="160" align="center">
|
||||
<template #header>
|
||||
<el-icon><Shop /></el-icon>
|
||||
<el-icon>
|
||||
<Shop />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">采购形式</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -181,14 +203,25 @@
|
||||
<el-tag v-else-if="scope.row.purchaseMode === '2'" type="primary">学校统一采购</el-tag>
|
||||
<span v-else>-</span>
|
||||
<el-tag v-if="scope.row.purchaseMode === '1' && scope.row.purchaseChannel === '2'" type="warning" size="small" class="entrust-tag"
|
||||
>委</el-tag
|
||||
>委
|
||||
</el-tag>
|
||||
<el-tooltip
|
||||
v-if="scope.row.purchaseMode === '1' && scope.row.purchaseChannel === '1'"
|
||||
:content="getSupplementTooltip(scope.row)"
|
||||
placement="top"
|
||||
>
|
||||
<el-icon :class="['supplement-icon', getSupplementIconClass(scope.row)]" @click.stop="handleShowSupplement(scope.row)">
|
||||
<component :is="getSupplementIcon(scope.row)" />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="purchaseType" label="采购方式" width="120" align="center">
|
||||
<template #header>
|
||||
<el-icon><Shop /></el-icon>
|
||||
<el-icon>
|
||||
<Shop />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">采购方式</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
@@ -198,29 +231,31 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="审核状态" width="100" align="center">
|
||||
<template #header>
|
||||
<el-icon><InfoFilled /></el-icon>
|
||||
<el-icon>
|
||||
<InfoFilled />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">审核状态</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-tooltip v-if="scope.row.flowInstId" content="点击查看审批过程" placement="top">
|
||||
<el-tag v-if="scope.row.status === '-2'" type="info" class="status-tag-clickable" @click="handleShowFlowComment(scope.row)"
|
||||
>撤回</el-tag
|
||||
>
|
||||
>撤回
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === '-1'" type="warning" class="status-tag-clickable" @click="handleShowFlowComment(scope.row)"
|
||||
>暂存</el-tag
|
||||
>
|
||||
>暂存
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === '0'" type="primary" class="status-tag-clickable" @click="handleShowFlowComment(scope.row)"
|
||||
>运行中</el-tag
|
||||
>
|
||||
>运行中
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === '1'" type="success" class="status-tag-clickable" @click="handleShowFlowComment(scope.row)"
|
||||
>完成</el-tag
|
||||
>
|
||||
>完成
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === '2'" type="danger" class="status-tag-clickable" @click="handleShowFlowComment(scope.row)"
|
||||
>作废</el-tag
|
||||
>
|
||||
>作废
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.status === '3'" type="info" class="status-tag-clickable" @click="handleShowFlowComment(scope.row)"
|
||||
>终止</el-tag
|
||||
>
|
||||
>终止
|
||||
</el-tag>
|
||||
<span v-else>-</span>
|
||||
</el-tooltip>
|
||||
<template v-else>
|
||||
@@ -238,7 +273,7 @@
|
||||
<el-table-column label="操作" align="center" fixed="right" width="150">
|
||||
<template #default="scope">
|
||||
<div class="op-cell">
|
||||
<el-button type="primary" link icon="View" @click="handleView(scope.row)"> 查看 </el-button>
|
||||
<el-button type="primary" link icon="View" @click="handleView(scope.row)"> 查看</el-button>
|
||||
<ActionDropdown :items="getActionMenuItems(scope.row)" @command="(command) => handleMoreCommand(command, scope.row)" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -295,6 +330,9 @@
|
||||
<!-- 补充材料弹窗 -->
|
||||
<SupplementFilesDialog ref="supplementFilesDialogRef" @refresh="getDataList" />
|
||||
|
||||
<!-- 补充材料查看弹窗 -->
|
||||
<SupplementViewDialog ref="supplementViewDialogRef" @refresh="getDataList" />
|
||||
|
||||
<!-- 招标文件审核弹窗 -->
|
||||
<!-- <DocAuditDialog ref="docAuditDialogRef" @refresh="getDataList" />-->
|
||||
|
||||
@@ -389,6 +427,8 @@ import {
|
||||
RefreshRight,
|
||||
Shop,
|
||||
CopyDocument,
|
||||
Select,
|
||||
CloseBold,
|
||||
} from '@element-plus/icons-vue';
|
||||
import other from '/@/utils/other';
|
||||
import { Session } from '/@/utils/storage';
|
||||
@@ -409,6 +449,7 @@ const FileArchiveDialog = defineAsyncComponent(() => import('./FileArchiveDialog
|
||||
const UpdateFilesDialog = defineAsyncComponent(() => import('./UpdateFilesDialog.vue'));
|
||||
const ContractDialog = defineAsyncComponent(() => import('./contract/ContractDialog.vue'));
|
||||
const SupplementFilesDialog = defineAsyncComponent(() => import('./SupplementFilesDialog.vue'));
|
||||
const SupplementViewDialog = defineAsyncComponent(() => import('./SupplementViewDialog.vue'));
|
||||
// const DocAuditDialog = defineAsyncComponent(() => import('./docAudit/DocAuditDialog.vue'));
|
||||
|
||||
// 字典数据和品目树数据
|
||||
@@ -441,6 +482,7 @@ const fileArchiveDialogRef = ref();
|
||||
const updateFilesDialogRef = ref();
|
||||
const contractDialogRef = ref();
|
||||
const supplementFilesDialogRef = ref();
|
||||
const supplementViewDialogRef = ref();
|
||||
|
||||
/** 采购代表弹窗 */
|
||||
const representorDialogVisible = ref(false);
|
||||
@@ -534,7 +576,7 @@ const handleAdd = () => {
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
/**
|
||||
* 点击审核状态:若有流程实例则打开「查看审批过程」弹窗(参考 hi-job.vue)
|
||||
* @param row - 当前行数据(需含 flowInstId)
|
||||
*/
|
||||
@@ -561,6 +603,42 @@ const handleShowFileFlowComment = (row: any) => {
|
||||
showFlowComment.value = true;
|
||||
};
|
||||
|
||||
const SUPPLEMENT_STATUS_MAP: Record<string, { icon: any; class: string; tooltip: string }> = {
|
||||
'1': { icon: Select, class: 'supplement-done', tooltip: '补充材料已完成,点击查看' },
|
||||
'0': { icon: CloseBold, class: 'supplement-running', tooltip: '补充材料审批中,点击查看' },
|
||||
'-1': { icon: CloseBold, class: 'supplement-pending', tooltip: '补充材料已暂存,点击查看' },
|
||||
};
|
||||
|
||||
const getSupplementIcon = (row: any) => {
|
||||
const status = row?.supplementFlowStatus;
|
||||
if (status === '1') return Select;
|
||||
return CloseBold;
|
||||
};
|
||||
|
||||
const getSupplementIconClass = (row: any) => {
|
||||
const status = row?.supplementFlowStatus;
|
||||
if (status === '1') return 'supplement-done';
|
||||
if (status === '0') return 'supplement-running';
|
||||
return 'supplement-pending';
|
||||
};
|
||||
|
||||
const getSupplementTooltip = (row: any) => {
|
||||
const status = row?.supplementFlowStatus;
|
||||
if (status === '1') return '补充材料已完成,点击查看';
|
||||
if (status === '0') return '补充材料审批中,点击查看';
|
||||
if (status === '-1') return '补充材料已暂存,点击查看';
|
||||
return '未补充材料,点击查看';
|
||||
};
|
||||
|
||||
const handleShowSupplement = (row: any) => {
|
||||
const id = row?.id ?? row?.purchaseId;
|
||||
if (!id) {
|
||||
useMessage().warning('无法获取采购申请ID');
|
||||
return;
|
||||
}
|
||||
supplementViewDialogRef.value?.open(String(id), row);
|
||||
};
|
||||
|
||||
/**
|
||||
* 打开查看对话框
|
||||
* @param row - 当前行数据
|
||||
@@ -699,41 +777,36 @@ const getActionMenuItems = (row: any) => {
|
||||
icon: Download,
|
||||
visible: () => isCompleted,
|
||||
},
|
||||
// {
|
||||
// command: 'representor',
|
||||
// label: '采购代表',
|
||||
// icon: User,
|
||||
// visible: () => isCompleted && isDeptAuditRole.value,
|
||||
// },
|
||||
// {
|
||||
// command: 'updateFiles',
|
||||
// label: '更新材料',
|
||||
// icon: RefreshRight,
|
||||
// visible: () => (isCompleted || isRunning) && hasAuth('purchase_purchasingapply_edit'),
|
||||
// },
|
||||
// {
|
||||
// command: 'contract',
|
||||
// label: '采购合同',
|
||||
// icon: DocumentChecked,
|
||||
// visible: () => isCompleted,
|
||||
// },
|
||||
{
|
||||
command: 'representor',
|
||||
label: '采购代表',
|
||||
icon: User,
|
||||
visible: () => isCompleted && isDeptAuditRole.value,
|
||||
},
|
||||
{
|
||||
command: 'updateFiles',
|
||||
label: '更新材料',
|
||||
icon: RefreshRight,
|
||||
visible: () => (isCompleted || isRunning) && hasAuth('purchase_purchasingapply_edit'),
|
||||
},
|
||||
{
|
||||
command: 'contract',
|
||||
label: '采购合同',
|
||||
icon: DocumentChecked,
|
||||
visible: () => isCompleted,
|
||||
},
|
||||
{
|
||||
command: 'supplementFiles',
|
||||
label: '补充材料',
|
||||
icon: Upload,
|
||||
visible: () => isCompleted && row?.purchaseMode === '1' && row?.purchaseChannel === '1' && hasAuth('purchase_supplement'),
|
||||
},
|
||||
{
|
||||
command: 'submitSupplementFiles',
|
||||
label: '提交补充材料',
|
||||
icon: Upload,
|
||||
visible: () => isCompleted && row?.purchaseMode === '1' && row?.purchaseChannel === '1' && row?.supplementFlowStatus === '-1' && hasAuth('purchase_supplement'),
|
||||
visible: () =>
|
||||
isCompleted && row?.purchaseMode === '1' && row?.purchaseChannel === '1' && !row?.supplementFlowStatus && hasAuth('purchase_supplement'),
|
||||
},
|
||||
// {
|
||||
// command: 'downloadFileApply',
|
||||
// label: '下载文件审批表',
|
||||
// icon: Download,
|
||||
// visible: () => true,
|
||||
// visible: () => isCompleted,
|
||||
// },
|
||||
// {
|
||||
// command: 'docAudit',
|
||||
@@ -1093,5 +1166,28 @@ onMounted(() => {
|
||||
height: 18px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.supplement-icon {
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
margin-left: 4px;
|
||||
transition: transform 0.2s;
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
}
|
||||
|
||||
.supplement-done {
|
||||
color: #67c23a;
|
||||
}
|
||||
|
||||
.supplement-running {
|
||||
color: #e6a23c;
|
||||
}
|
||||
|
||||
.supplement-pending {
|
||||
color: #f56c6c;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user