✨ 组织编码/平台公司、合同计费客商角色与基础模块查看按钮
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -761,6 +761,96 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<template v-if="showProjectContractSection">
|
||||
<div class="dialog-section-title project-apply-form__table-title">项目合同</div>
|
||||
<el-table
|
||||
v-loading="projectContractLoading"
|
||||
:data="projectContractRows"
|
||||
border
|
||||
class="project-apply-form__table"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||
<el-table-column
|
||||
prop="contractCategory"
|
||||
label="合同类型"
|
||||
min-width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="contractNo"
|
||||
label="合同编号"
|
||||
min-width="140"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-link
|
||||
v-if="row.id && row.contractNo"
|
||||
type="primary"
|
||||
@click.stop="openProjectContractDetail(row)"
|
||||
>
|
||||
{{ row.contractNo }}
|
||||
</el-link>
|
||||
<span v-else>{{ row.contractNo || '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contractName"
|
||||
label="合同名称"
|
||||
min-width="160"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="partyA"
|
||||
label="甲方"
|
||||
min-width="140"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="partyB"
|
||||
label="乙方"
|
||||
min-width="140"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="partyC"
|
||||
label="丙方"
|
||||
min-width="140"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="startDate"
|
||||
label="开始日期"
|
||||
min-width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="endDate"
|
||||
label="结束日期"
|
||||
min-width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="contractAmount"
|
||||
label="合同金额"
|
||||
min-width="120"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ formatAmount(row.contractAmount) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<div
|
||||
v-if="!isChangeDialog && !isNewProjectDialog"
|
||||
class="dialog-section-title project-apply-form__table-title"
|
||||
@@ -990,6 +1080,7 @@
|
||||
import { exportBlob } from '@/api/common';
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
import * as api from '@/api/business/project-apply';
|
||||
import { getList as getContractManageList } from '@/api/business/contract-manage';
|
||||
import {
|
||||
loadHcsImmediateEnabled,
|
||||
repush as hcsRepush,
|
||||
@@ -1387,6 +1478,8 @@ export default {
|
||||
'zip',
|
||||
],
|
||||
changeRows: [],
|
||||
projectContractRows: [],
|
||||
projectContractLoading: false,
|
||||
changeRecordDetailVisible: false,
|
||||
changeRecordDetail: null,
|
||||
changeRecordDetailRows: [],
|
||||
@@ -1463,6 +1556,9 @@ export default {
|
||||
isNewProjectDialog() {
|
||||
return ['add', 'majorSupplement'].includes(this.dialogType);
|
||||
},
|
||||
showProjectContractSection() {
|
||||
return this.dialogReadonly && !this.isChangeDialog && !this.isNewProjectDialog && !this.isPublicViewPage;
|
||||
},
|
||||
isProjectFormPage() {
|
||||
return this.isFormPageInstance;
|
||||
},
|
||||
@@ -2111,6 +2207,8 @@ export default {
|
||||
this.attachmentRows = [];
|
||||
this.selectedAttachmentRows = [];
|
||||
this.changeRows = [];
|
||||
this.projectContractRows = [];
|
||||
this.projectContractLoading = false;
|
||||
this.selectedCustomerId = [];
|
||||
this.selectedCarrierIds = [];
|
||||
},
|
||||
@@ -2159,6 +2257,40 @@ export default {
|
||||
this.syncSelectedCustomerOptions();
|
||||
this.ensureCurrentPlatformOption();
|
||||
this.ensureCurrentBusinessDeptOption();
|
||||
this.loadProjectContracts(row?.id);
|
||||
},
|
||||
loadProjectContracts(projectId) {
|
||||
if (!this.showProjectContractSection || !projectId) {
|
||||
this.projectContractRows = [];
|
||||
this.projectContractLoading = false;
|
||||
return;
|
||||
}
|
||||
this.projectContractLoading = true;
|
||||
getContractManageList(1, 1000, { projectId })
|
||||
.then(res => {
|
||||
const data = res.data?.data;
|
||||
const records = Array.isArray(data) ? data : data?.records || [];
|
||||
this.projectContractRows = records.filter(
|
||||
item => String(item.projectId) === String(projectId)
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
this.projectContractRows = [];
|
||||
this.$message.error('项目合同加载失败');
|
||||
})
|
||||
.finally(() => {
|
||||
this.projectContractLoading = false;
|
||||
});
|
||||
},
|
||||
openProjectContractDetail(row) {
|
||||
if (!row?.id) {
|
||||
this.$message.warning('合同信息不完整,无法跳转');
|
||||
return;
|
||||
}
|
||||
this.$router.push({
|
||||
path: '/business/contract-manage/detail',
|
||||
query: { id: row.id, name: '合同详情' },
|
||||
});
|
||||
},
|
||||
fillDefaultUsers() {
|
||||
const userId = this.userInfo?.userId || this.userInfo?.id || '';
|
||||
|
||||
Reference in New Issue
Block a user