Merge branch 'feature-purchase' into developer
This commit is contained in:
@@ -302,7 +302,35 @@
|
||||
</el-tag>
|
||||
<el-tag v-else type="warning" class="status-tag-clickable" @click="handleShowDocAudit(scope.row)">未知</el-tag>
|
||||
</el-tooltip>
|
||||
<el-tag v-else type="info">未发起</el-tag>
|
||||
<el-tag v-else type="info">未发起</el-tag>
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 采购合同列 -->
|
||||
<el-table-column prop="contractFlowStatus" label="采购合同" width="100" align="center">
|
||||
<template #header>
|
||||
<el-icon>
|
||||
<Tickets />
|
||||
</el-icon>
|
||||
<span style="margin-left: 4px">采购合同</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.status === '1'">
|
||||
<el-tooltip v-if="scope.row.contractFlowStatus" content="点击查看合同详情" placement="top">
|
||||
<el-tag v-if="scope.row.contractFlowStatus === '0'" type="warning" class="status-tag-clickable" @click="handleShowContractDetail(scope.row)"
|
||||
>运行中
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.contractFlowStatus === '1'" type="success" class="status-tag-clickable" @click="handleShowContractDetail(scope.row)"
|
||||
>已完成
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.contractFlowStatus === '2'" type="info" class="status-tag-clickable" @click="handleShowContractDetail(scope.row)"
|
||||
>已作废
|
||||
</el-tag>
|
||||
<el-tag v-else type="info" class="status-tag-clickable" @click="handleShowContractDetail(scope.row)">{{ scope.row.contractFlowStatus }}</el-tag>
|
||||
</el-tooltip>
|
||||
<el-button v-else type="primary" link size="small" @click="handleAddContract(scope.row)">添加合同</el-button>
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
@@ -374,6 +402,18 @@
|
||||
<!-- 招标文件审批查看弹窗 -->
|
||||
<DocAuditViewDialog ref="docAuditViewDialogRef" @refresh="getDataList" />
|
||||
|
||||
<!-- 采购合同弹窗 -->
|
||||
<PurchaseContractDialog ref="purchaseContractDialogRef" @refresh="getDataList" />
|
||||
|
||||
<!-- 采购合同详情弹窗 -->
|
||||
<PurchaseContractDetailDialog ref="purchaseContractDetailDialogRef" />
|
||||
|
||||
<!-- 采购合同弹窗 -->
|
||||
<PurchaseContractDialog ref="purchaseContractDialogRef" @refresh="getDataList" />
|
||||
|
||||
<!-- 采购合同详情弹窗 -->
|
||||
<PurchaseContractDetailDialog ref="purchaseContractDetailDialogRef" />
|
||||
|
||||
<!-- 招标文件审核弹窗 -->
|
||||
<!-- <DocAuditDialog ref="docAuditDialogRef" @refresh="getDataList" />-->
|
||||
|
||||
@@ -459,6 +499,7 @@ import {
|
||||
OfficeBuilding,
|
||||
Warning,
|
||||
DocumentChecked,
|
||||
Tickets,
|
||||
Edit,
|
||||
Delete,
|
||||
Upload,
|
||||
@@ -492,6 +533,8 @@ const ContractDialog = defineAsyncComponent(() => import('./contract/ContractDia
|
||||
const SupplementFilesDialog = defineAsyncComponent(() => import('./SupplementFilesDialog.vue'));
|
||||
const SupplementViewDialog = defineAsyncComponent(() => import('./SupplementViewDialog.vue'));
|
||||
const DocAuditViewDialog = defineAsyncComponent(() => import('./DocAuditViewDialog.vue'));
|
||||
const PurchaseContractDialog = defineAsyncComponent(() => import('./PurchaseContractDialog.vue'));
|
||||
const PurchaseContractDetailDialog = defineAsyncComponent(() => import('./PurchaseContractDetailDialog.vue'));
|
||||
// const DocAuditDialog = defineAsyncComponent(() => import('./docAudit/DocAuditDialog.vue'));
|
||||
|
||||
// 字典数据和品目树数据
|
||||
@@ -526,6 +569,8 @@ const contractDialogRef = ref();
|
||||
const supplementFilesDialogRef = ref();
|
||||
const supplementViewDialogRef = ref();
|
||||
const docAuditViewDialogRef = ref();
|
||||
const purchaseContractDialogRef = ref();
|
||||
const purchaseContractDetailDialogRef = ref();
|
||||
|
||||
/** 采购代表弹窗 */
|
||||
const representorDialogVisible = ref(false);
|
||||
@@ -692,6 +737,26 @@ const handleShowSupplement = (row: any) => {
|
||||
supplementViewDialogRef.value?.open(String(id), row);
|
||||
};
|
||||
|
||||
/** 点击添加合同:打开采购合同弹窗 */
|
||||
const handleAddContract = (row: any) => {
|
||||
const id = row?.id ?? row?.purchaseId;
|
||||
if (!id) {
|
||||
useMessage().warning('无法获取采购申请ID');
|
||||
return;
|
||||
}
|
||||
purchaseContractDialogRef.value?.open(String(id), 'add');
|
||||
};
|
||||
|
||||
/** 点击采购合同状态:打开采购合同详情弹窗 */
|
||||
const handleShowContractDetail = (row: any) => {
|
||||
const id = row?.id ?? row?.purchaseId;
|
||||
if (!id) {
|
||||
useMessage().warning('无法获取采购申请ID');
|
||||
return;
|
||||
}
|
||||
purchaseContractDetailDialogRef.value?.open(String(id));
|
||||
};
|
||||
|
||||
/**
|
||||
* 打开查看对话框
|
||||
* @param row - 当前行数据
|
||||
|
||||
Reference in New Issue
Block a user