From 81c56650949899e500a05c74b73568378bdee5ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E7=BA=A2=E5=85=B5?= <374362909@qq.com>
Date: Fri, 6 Mar 2026 18:34:55 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/purchase/purchasingcontract.ts | 76 +++++
.../purchase/purchasingcontract/form.vue | 231 ++++++++++++++
.../purchase/purchasingcontract/index.vue | 301 ++++++++++++++++++
.../purchase/purchasingrequisition/add.vue | 12 +-
.../contract/ContractDialog.vue | 229 +++++++++++++
.../purchase/purchasingrequisition/index.vue | 30 ++
6 files changed, 873 insertions(+), 6 deletions(-)
create mode 100644 src/api/purchase/purchasingcontract.ts
create mode 100644 src/views/purchase/purchasingcontract/form.vue
create mode 100644 src/views/purchase/purchasingcontract/index.vue
create mode 100644 src/views/purchase/purchasingrequisition/contract/ContractDialog.vue
diff --git a/src/api/purchase/purchasingcontract.ts b/src/api/purchase/purchasingcontract.ts
new file mode 100644
index 0000000..07fec2b
--- /dev/null
+++ b/src/api/purchase/purchasingcontract.ts
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018-2025, cyweb All rights reserved.
+ *
+ */
+
+import request from '/@/utils/request';
+
+/**
+ * 分页查询
+ * @param params 查询参数
+ */
+export function getPage(params?: any) {
+ return request({
+ url: '/purchase/purchasingcontract/page',
+ method: 'get',
+ params
+ });
+}
+
+/**
+ * 通过id查询
+ * @param id ID
+ */
+export function getObj(id: string | number) {
+ return request({
+ url: '/purchase/purchasingcontract/' + id,
+ method: 'get'
+ });
+}
+
+/**
+ * 新增采购合同
+ * @param obj 对象数据
+ */
+export function addObj(obj: any) {
+ return request({
+ url: '/purchase/purchasingcontract',
+ method: 'post',
+ data: obj
+ });
+}
+
+/**
+ * 修改采购合同
+ * @param obj 对象数据
+ */
+export function editObj(obj: any) {
+ return request({
+ url: '/purchase/purchasingcontract/edit',
+ method: 'post',
+ data: obj
+ });
+}
+
+/**
+ * 删除采购合同
+ * @param id ID
+ */
+export function delObj(id: number) {
+ return request({
+ url: '/purchase/purchasingcontract/delete',
+ method: 'post',
+ data: id
+ });
+}
+
+/**
+ * 根据采购申请ID查询合同
+ * @param purchaseId 采购申请ID
+ */
+export function getByPurchaseId(purchaseId: string | number) {
+ return request({
+ url: '/purchase/purchasingcontract/by-purchase/' + purchaseId,
+ method: 'get'
+ });
+}
\ No newline at end of file
diff --git a/src/views/purchase/purchasingcontract/form.vue b/src/views/purchase/purchasingcontract/form.vue
new file mode 100644
index 0000000..0397b73
--- /dev/null
+++ b/src/views/purchase/purchasingcontract/form.vue
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 否
+ 是
+
+
+
+
+ 否
+ 是
+
+
+
+
+
+
+
+ 否
+ 是
+
+
+
+
+ 否
+ 是
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 关闭
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/purchase/purchasingcontract/index.vue b/src/views/purchase/purchasingcontract/index.vue
new file mode 100644
index 0000000..aacfe2e
--- /dev/null
+++ b/src/views/purchase/purchasingcontract/index.vue
@@ -0,0 +1,301 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合同编号
+
+
+
+
+
+ 合同名称
+
+
+
+
+
+ 合同金额(元)
+
+
+ {{ formatMoney(scope.row.money) }}
+
+
+
+
+
+ 是否需要招标
+
+
+
+ {{ scope.row.isBidding === '1' ? '是' : '否' }}
+
+
+
+
+
+
+ 是否需要法律顾问
+
+
+
+ {{ scope.row.isLegalAdviser === '1' ? '是' : '否' }}
+
+
+
+
+
+
+ {{ scope.row.isDepts === '1' ? '是' : '否' }}
+
+
+
+
+
+
+ {{ scope.row.isSchool === '1' ? '是' : '否' }}
+
+
+
+
+
+
+ 创建时间
+
+
+
+
+
+ 编辑
+
+
+ 详情
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/purchase/purchasingrequisition/add.vue b/src/views/purchase/purchasingrequisition/add.vue
index df5d399..167cbf5 100644
--- a/src/views/purchase/purchasingrequisition/add.vue
+++ b/src/views/purchase/purchasingrequisition/add.vue
@@ -182,7 +182,7 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 否
+ 是
+
+
+
+
+ 否
+ 是
+
+
+
+
+
+
+
+ 否
+ 是
+
+
+
+
+ 否
+ 是
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
+ 关闭
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/purchase/purchasingrequisition/index.vue b/src/views/purchase/purchasingrequisition/index.vue
index ae1e1e7..1ef2c92 100644
--- a/src/views/purchase/purchasingrequisition/index.vue
+++ b/src/views/purchase/purchasingrequisition/index.vue
@@ -332,6 +332,9 @@
+
+
+
@@ -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;