This commit is contained in:
吴红兵
2026-03-06 18:34:55 +08:00
parent 9fe1acb177
commit 81c5665094
6 changed files with 873 additions and 6 deletions

View File

@@ -332,6 +332,9 @@
<!-- 更新材料弹窗 -->
<UpdateFilesDialog ref="updateFilesDialogRef" @refresh="getDataList" />
<!-- 合同弹窗 -->
<ContractDialog ref="contractDialogRef" @refresh="getDataList" />
<!-- 招标文件审核弹窗 -->
<!-- <DocAuditDialog ref="docAuditDialogRef" @refresh="getDataList" />-->
@@ -399,6 +402,7 @@ import { getTree } from '/@/api/purchase/purchasingcategory';
import { List, Document, DocumentCopy, Search, Money, CircleCheck, InfoFilled, Calendar, OfficeBuilding, Warning, DocumentChecked, Edit, Delete, Upload, FolderOpened, Download, User, RefreshRight, Shop, CopyDocument } from '@element-plus/icons-vue'
import other from '/@/utils/other'
import { Session } from '/@/utils/storage'
import { getByPurchaseId } from "/@/api/purchase/purchasingcontract";
// 角色常量
const PURCHASE_DEPT_AUDIT_ROLE_CODE = 'PURCHASE_DEPT_AUDIT'
@@ -413,6 +417,7 @@ const PurchasingAcceptModal = defineAsyncComponent(() => import('./accept/Purcha
const FlowCommentTimeline = defineAsyncComponent(() => import('/@/views/jsonflow/comment/timeline.vue'));
const FileArchiveDialog = defineAsyncComponent(() => import('./FileArchiveDialog.vue'));
const UpdateFilesDialog = defineAsyncComponent(() => import('./UpdateFilesDialog.vue'));
const ContractDialog = defineAsyncComponent(() => import('./contract/ContractDialog.vue'));
// const DocAuditDialog = defineAsyncComponent(() => import('./docAudit/DocAuditDialog.vue'));
// 字典数据和品目树数据
@@ -443,6 +448,7 @@ const currFlowCommentType = ref<'apply' | 'file'>('apply')
const implementFormRef = ref()
const fileArchiveDialogRef = ref()
const updateFilesDialogRef = ref()
const contractDialogRef = ref()
/** 采购代表弹窗 */
const representorDialogVisible = ref(false)
@@ -708,6 +714,12 @@ const getActionMenuItems = (row: any) => {
icon: RefreshRight,
visible: () => (isCompleted || isRunning) && hasAuth('purchase_purchasingapply_edit'),
},
{
command: 'contract',
label: '采购合同',
icon: DocumentChecked,
visible: () => isCompleted,
},
// {
// command: 'downloadFileApply',
// label: '下载文件审批表',
@@ -766,6 +778,9 @@ const handleMoreCommand = (command: string, row: any) => {
case 'updateFiles':
handleUpdateFiles(row);
break;
case 'contract':
handleContract(row);
break;
}
};
@@ -779,6 +794,21 @@ const handleUpdateFiles = (row: any) => {
updateFilesDialogRef.value?.open(id, row.purchaseNo);
};
/** 采购合同 */
const handleContract = async (row: any) => {
const id = row?.id ?? row?.purchaseId;
if (!id) {
useMessage().warning('无法获取采购申请ID');
return;
}
try {
const res = await getByPurchaseId(id);
contractDialogRef.value?.open(row, res?.data || null);
} catch (e) {
useMessage().error('获取合同信息失败');
}
};
/** 下载审批表 */
const handleDownloadApply = (row: any) => {
const id = row?.id ?? row?.purchaseId;