|
@@ -0,0 +1,172 @@
|
|
1
|
+<!--
|
|
2
|
+ * @Author: ysh
|
|
3
|
+ * @Date: 2024-10-10 10:03:14
|
|
4
|
+ * @LastEditors: Please set LastEditors
|
|
5
|
+ * @LastEditTime: 2024-10-10 14:37:00
|
|
6
|
+-->
|
|
7
|
+<template>
|
|
8
|
+ <div>
|
|
9
|
+ <el-form-item label="主合同信息" label-width="120px">
|
|
10
|
+ <div v-if="hasContract">
|
|
11
|
+ <el-descriptions border style="margin-top: 10px" :column="2" v-for="item in contractObjList">
|
|
12
|
+ <el-descriptions-item label="合同名称">
|
|
13
|
+ {{ item.contractName }}
|
|
14
|
+ </el-descriptions-item>
|
|
15
|
+ <el-descriptions-item label="合同编码">
|
|
16
|
+ {{ item.contractCode }}
|
|
17
|
+ </el-descriptions-item>
|
|
18
|
+ <el-descriptions-item label="合同编号">
|
|
19
|
+ {{ item.contractNumber }}
|
|
20
|
+ </el-descriptions-item>
|
|
21
|
+ <el-descriptions-item label="合同价款">
|
|
22
|
+ {{ item.amount }}
|
|
23
|
+ </el-descriptions-item>
|
|
24
|
+ <el-descriptions-item label="甲方单位">
|
|
25
|
+ {{ item.partyA ? item.partyA.partyAName : '' }}
|
|
26
|
+ </el-descriptions-item>
|
|
27
|
+ <el-descriptions-item label="合同文件">
|
|
28
|
+ <div v-if="item.contractDocument" class="upload-list">
|
|
29
|
+ <el-link type="primary"
|
|
30
|
+ @click="reviewWord(`${baseUrl}${'/profile/upload' + item.contractDocument}`)">
|
|
31
|
+ {{ getFileName(item.contractDocument) }}
|
|
32
|
+ </el-link>
|
|
33
|
+ <el-link class="ml20" type="warning"
|
|
34
|
+ :href="`${baseUrl}${'/profile/upload' + item.contractDocument}`" :underline="false"
|
|
35
|
+ target="_blank">
|
|
36
|
+ <span class="el-icon-download">下载文件</span>
|
|
37
|
+ </el-link>
|
|
38
|
+ </div>
|
|
39
|
+ <div v-else>
|
|
40
|
+ <el-tag type="info">暂无</el-tag>
|
|
41
|
+ </div>
|
|
42
|
+ </el-descriptions-item>
|
|
43
|
+ <el-descriptions-item label="合同备注">
|
|
44
|
+ {{ item.remark }}
|
|
45
|
+ </el-descriptions-item>
|
|
46
|
+ </el-descriptions>
|
|
47
|
+ </div>
|
|
48
|
+ <div v-else>
|
|
49
|
+ <el-tag type="danger">暂无关联主合同信息</el-tag>
|
|
50
|
+ </div>
|
|
51
|
+ </el-form-item>
|
|
52
|
+ <el-form-item label="分包合同信息" label-width="120px">
|
|
53
|
+ <div v-if="hasSubContract">
|
|
54
|
+ <el-descriptions border style="margin-top: 10px" :column="2" v-for="item in subContractObjList">
|
|
55
|
+ <el-descriptions-item label="分包合同名称">
|
|
56
|
+ {{ item.subContractName }}
|
|
57
|
+ </el-descriptions-item>
|
|
58
|
+ <el-descriptions-item label="分包合同价款">
|
|
59
|
+ {{ item.subAmount }}
|
|
60
|
+ </el-descriptions-item>
|
|
61
|
+ <el-descriptions-item label="合作单位">
|
|
62
|
+ {{ item.partner ? item.partner.partnerName : '' }}
|
|
63
|
+ </el-descriptions-item>
|
|
64
|
+ <el-descriptions-item label="分包合同文件">
|
|
65
|
+ <div v-if="item.contractDocument" class="upload-list">
|
|
66
|
+ <el-link type="primary"
|
|
67
|
+ @click="reviewWord(`${baseUrl}${'/profile/upload' + item.contractDocument}`)">
|
|
68
|
+ {{ getFileName(item.contractDocument) }}
|
|
69
|
+ </el-link>
|
|
70
|
+ <el-link class="ml20" type="warning"
|
|
71
|
+ :href="`${baseUrl}${'/profile/upload' + item.contractDocument}`" :underline="false"
|
|
72
|
+ target="_blank">
|
|
73
|
+ <span class="el-icon-download">下载文件</span>
|
|
74
|
+ </el-link>
|
|
75
|
+ </div>
|
|
76
|
+ <div v-else>
|
|
77
|
+ <el-tag type="info">暂无</el-tag>
|
|
78
|
+ </div>
|
|
79
|
+ </el-descriptions-item>
|
|
80
|
+ <el-descriptions-item label="分包合同备注">
|
|
81
|
+ {{ item.remark }}
|
|
82
|
+ </el-descriptions-item>
|
|
83
|
+ </el-descriptions>
|
|
84
|
+ </div>
|
|
85
|
+ <div v-else>
|
|
86
|
+ <el-tag type="danger">暂无关联分包合同信息</el-tag>
|
|
87
|
+ </div>
|
|
88
|
+ </el-form-item>
|
|
89
|
+
|
|
90
|
+ </div>
|
|
91
|
+</template>
|
|
92
|
+
|
|
93
|
+<script>
|
|
94
|
+import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
|
|
95
|
+import { listProjectSubcontract, addProjectSubcontract, delProjectSubcontract } from '@/api/oa/contract/projectSubcontract'
|
|
96
|
+import { getContract } from "@/api/oa/contract/contract";
|
|
97
|
+import { getSubContract } from "@/api/oa/contract/subContract";
|
|
98
|
+export default {
|
|
99
|
+ props: {
|
|
100
|
+ projectId: {
|
|
101
|
+ type: String,
|
|
102
|
+ default: ''
|
|
103
|
+ }
|
|
104
|
+ },
|
|
105
|
+ watch: {
|
|
106
|
+ projectId(newval) {
|
|
107
|
+ this.init();
|
|
108
|
+ }
|
|
109
|
+ },
|
|
110
|
+ mounted() {
|
|
111
|
+ },
|
|
112
|
+ data() {
|
|
113
|
+ return {
|
|
114
|
+ baseUrl: process.env.VUE_APP_BASE_API,
|
|
115
|
+ contractObjList: [],
|
|
116
|
+ subContractObjList: [],
|
|
117
|
+ hasContract: true,
|
|
118
|
+ hasSubContract: true
|
|
119
|
+ }
|
|
120
|
+ },
|
|
121
|
+ methods: {
|
|
122
|
+ init() {
|
|
123
|
+ const projectId = this.projectId;
|
|
124
|
+ Promise.all([listProjectContract({ projectId }), listProjectSubcontract({ projectId })]).then(response => {
|
|
125
|
+ let [contractData = null, subContractData = null] = response
|
|
126
|
+ // 主合同
|
|
127
|
+ if (contractData.total >= 1) {
|
|
128
|
+ let list = contractData.rows;
|
|
129
|
+ this.contractObjList = []
|
|
130
|
+ for (let l of list) {
|
|
131
|
+ getContract(l.contractId).then(res => {
|
|
132
|
+ if (res.data) {
|
|
133
|
+ this.contractObjList.push(res.data)
|
|
134
|
+ }
|
|
135
|
+ })
|
|
136
|
+ }
|
|
137
|
+ } else if (contractData.total == 0) {
|
|
138
|
+ this.hasContract = false;
|
|
139
|
+ }
|
|
140
|
+
|
|
141
|
+ //分包合同
|
|
142
|
+ if (subContractData.total >= 1) {
|
|
143
|
+ let list = subContractData.rows;
|
|
144
|
+ this.subContractObjList = []
|
|
145
|
+ for (let l of list) {
|
|
146
|
+ getSubContract(l.subContractId).then(res => {
|
|
147
|
+ if (res.data) {
|
|
148
|
+ this.subContractObjList.push(res.data)
|
|
149
|
+ }
|
|
150
|
+ })
|
|
151
|
+ }
|
|
152
|
+ } else if (subContractData.total == 0) {
|
|
153
|
+ this.hasSubContract = false;
|
|
154
|
+ }
|
|
155
|
+ })
|
|
156
|
+ }
|
|
157
|
+ },
|
|
158
|
+}
|
|
159
|
+</script>
|
|
160
|
+
|
|
161
|
+<style lang="scss" scoped>
|
|
162
|
+::v-deep .el-descriptions-item__label.is-bordered-label {
|
|
163
|
+ color: #5a5757;
|
|
164
|
+ background: rgba($color: #a9adb3, $alpha: 0.1);
|
|
165
|
+ width: 150px;
|
|
166
|
+ min-width: 150px;
|
|
167
|
+}
|
|
168
|
+
|
|
169
|
+::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
|
|
170
|
+ border: 1px solid #cdd0d3;
|
|
171
|
+}
|
|
172
|
+</style>
|