Przeglądaj źródła

新增项目结算中的合同信息

余思翰 6 miesięcy temu
rodzic
commit
6f868f6347

+ 3
- 3
oa-ui/src/views/flowable/form/performance/performanceForm.vue Wyświetl plik

@@ -142,8 +142,6 @@ export default {
142 142
   created() {
143 143
     this.initFlow();
144 144
     this.initForm();
145
-    if (this.taskName == '绩效上报')
146
-      this.saves();
147 145
   },
148 146
   methods: {
149 147
     initFlow() {
@@ -166,6 +164,8 @@ export default {
166 164
           this.formTotal = 1
167 165
           this.form = res.data;
168 166
         }
167
+        if (this.taskName == '绩效上报')
168
+          this.saves();
169 169
       })
170 170
     },
171 171
     setAmount(val) {
@@ -185,7 +185,7 @@ export default {
185 185
       } else {
186 186
         this.form.performanceId = this.taskForm.formId;
187 187
         await addPerformance(this.form)
188
-        this.formTotal = 1
188
+        this.initForm();
189 189
       }
190 190
       this.savesWages()
191 191
       this.$message.success('保存成功')

+ 172
- 0
oa-ui/src/views/flowable/form/projectContractInfo.vue Wyświetl plik

@@ -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>

+ 35
- 48
oa-ui/src/views/flowable/form/settleForm.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-30 09:03:14
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-10-08 09:34:29
5
+ * @LastEditTime: 2024-10-10 16:15:50
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container" v-loading="loading">
@@ -25,12 +25,6 @@
25 25
               <el-descriptions-item label="项目名称" label-class-name="my-label">
26 26
                 {{ chooseProject.projectName }}
27 27
               </el-descriptions-item>
28
-              <el-descriptions-item label="合同编码" label-class-name="my-label">
29
-                {{ chooseProject.contractCode }}
30
-              </el-descriptions-item>
31
-              <el-descriptions-item label="合同编号" label-class-name="my-label">
32
-                {{ chooseProject.contractNumber }}
33
-              </el-descriptions-item>
34 28
               <el-descriptions-item label="项目负责人" label-class-name="my-label">
35 29
                 {{ getUserName(chooseProject.projectLeader) }}
36 30
               </el-descriptions-item>
@@ -119,6 +113,12 @@
119 113
               </el-link>
120 114
             </div>
121 115
           </el-form-item>
116
+
117
+          <div class="headers" v-hasRole="['leader', 'business']">
118
+            合同信息
119
+            <div class="line"></div>
120
+          </div>
121
+          <project-contract-info :projectId="projectId" v-hasRole="['leader', 'business']"></project-contract-info>
122 122
           <div class="headers">
123 123
             预算内项目结算明细
124 124
             <div class="line"></div>
@@ -379,7 +379,7 @@
379 379
                 </el-form-item>
380 380
               </el-col>
381 381
             </el-row>
382
-            <el-form-item label="经营发展部(校核)">
382
+            <el-form-item label="经营发展部(校核)" prop="jyComment">
383 383
               <el-input v-model="form.jyComment" type="textarea" :disabled="taskName != '经营发展部校核'" clearable
384 384
                 :autosize="{ minRows: 4, maxRows: 10 }">
385 385
               </el-input>
@@ -506,12 +506,14 @@ import SettlePrint from "./components/print/settlePrint.vue";
506 506
 import { getDept } from "@/api/system/dept";
507 507
 import { getContract } from "@/api/oa/contract/contract";
508 508
 import ChooseProject from "./components/chooseProject.vue";
509
+import projectContractInfo from "./projectContractInfo.vue";
509 510
 export default {
510 511
   components: {
511 512
     flow,
512 513
     ChoosePrice,
513 514
     SettlePrint,
514 515
     ChooseProject,
516
+    projectContractInfo
515 517
   },
516 518
   props: {
517 519
     taskName: {
@@ -554,7 +556,6 @@ export default {
554 556
           { required: true, trigger: "change", message: "请选择项目编号" },
555 557
         ],
556 558
       },
557
-      projectList: [],
558 559
       isSelect: false,
559 560
       chooseProject: {},
560 561
       fileList: [],
@@ -605,11 +606,11 @@ export default {
605 606
       exceed: false, //是否超预算
606 607
       exceedAmount: 0,
607 608
       isModify: false, //是否可以修改结算工作量
609
+      projectId: '',
608 610
     };
609 611
   },
610 612
   created() {
611
-    this.getProjectList(); //获取项目列表
612
-    this.getContractDataList(); //获取合同编码和编号
613
+    this.initRules();
613 614
     this.initForm();
614 615
     if (this.flowDisabled)
615 616
       flowXmlAndNode({
@@ -633,6 +634,17 @@ export default {
633 634
     this.isModify = this.taskName != '结算发起' && this.taskName != '经营发展部校核' && this.taskName != '分管审核'
634 635
   },
635 636
   methods: {
637
+    initRules() {
638
+      if (this.taskName == '经营发展部校核') {
639
+
640
+      } else if (this.taskName == '经营发展部校核') {
641
+        this.rules = {
642
+          jyComment: [
643
+            { required: true, message: '请输入意见', trigger: 'blur' }
644
+          ]
645
+        }
646
+      }
647
+    },
636 648
     // 初始化表单
637 649
     async initForm() {
638 650
       this.loading = true
@@ -655,6 +667,7 @@ export default {
655 667
 
656 668
         if (projectResponse) {
657 669
           this.chooseProject = projectResponse.data;
670
+          this.projectId = projectResponse.data.projectId
658 671
           this.isSelect = true;
659 672
         }
660 673
         if (budgetResponse && budgetResponse.total === 1) {
@@ -864,15 +877,6 @@ export default {
864 877
         this.$emit('goBack');
865 878
       })
866 879
     },
867
-    // 查询项目列表
868
-    getProjectList() {
869
-      listProject({
870
-        pageNum: 1,
871
-        pageSize: 99999999,
872
-      }).then((response) => {
873
-        this.projectList = response.rows;
874
-      });
875
-    },
876 880
     // 选择项目
877 881
     handleSelectProject(val) {
878 882
       if (val != "" && val != undefined && val != null) {
@@ -902,31 +906,6 @@ export default {
902 906
       }
903 907
       return true;
904 908
     },
905
-    // 获取合同
906
-    getContractDataList() {
907
-      listProjectContract({ projectId: this.taskForm.formId }).then((res) => {
908
-        if (res.rows) {
909
-          for (let row of res.rows) {
910
-            getContract(row.contractId).then((res) => {
911
-              if (res.data) {
912
-                if (this.form.contractCode != "") {
913
-                  this.form.contractCode =
914
-                    this.form.contractCode + "、" + res.data.contractCode;
915
-                } else {
916
-                  this.form.contractCode = res.data.contractCode;
917
-                }
918
-                if (this.form.contractNumber != "") {
919
-                  this.form.contractNumber =
920
-                    this.form.contractNumber + "、" + res.data.contractNumber;
921
-                } else {
922
-                  this.form.contractNumber = res.data.contractNumber;
923
-                }
924
-              }
925
-            });
926
-          }
927
-        }
928
-      });
929
-    },
930 909
     addWorkList() {
931 910
       this.settleWorkList.push({
932 911
         content: "",
@@ -975,9 +954,6 @@ export default {
975 954
         work.remark = '不足600,按600算'
976 955
         sum = 600
977 956
       }
978
-      else {
979
-        work.remark = ''
980
-      }
981 957
       work.settle = Number(sum).toFixed(2);
982 958
       this.calculateSumSettle();
983 959
       this.calculateActualSumSettle();
@@ -1182,4 +1158,15 @@ h3 {
1182 1158
   font-family: "黑体";
1183 1159
   font-weight: bold;
1184 1160
 }
1161
+
1162
+::v-deep .el-descriptions-item__label.is-bordered-label {
1163
+  color: #5a5757;
1164
+  background: rgba($color: #a9adb3, $alpha: 0.1);
1165
+  width: 150px;
1166
+  min-width: 150px;
1167
+}
1168
+
1169
+::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
1170
+  border: 1px solid #cdd0d3;
1171
+}
1185 1172
 </style>

Ładowanie…
Anuluj
Zapisz