浏览代码

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

余思翰 8 个月前
父节点
当前提交
6f868f6347

+ 3
- 3
oa-ui/src/views/flowable/form/performance/performanceForm.vue 查看文件

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

+ 172
- 0
oa-ui/src/views/flowable/form/projectContractInfo.vue 查看文件

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 查看文件

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-30 09:03:14
3
  * @Date: 2024-04-30 09:03:14
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-10-08 09:34:29
5
+ * @LastEditTime: 2024-10-10 16:15:50
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container" v-loading="loading">
8
   <div class="app-container" v-loading="loading">
25
               <el-descriptions-item label="项目名称" label-class-name="my-label">
25
               <el-descriptions-item label="项目名称" label-class-name="my-label">
26
                 {{ chooseProject.projectName }}
26
                 {{ chooseProject.projectName }}
27
               </el-descriptions-item>
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
               <el-descriptions-item label="项目负责人" label-class-name="my-label">
28
               <el-descriptions-item label="项目负责人" label-class-name="my-label">
35
                 {{ getUserName(chooseProject.projectLeader) }}
29
                 {{ getUserName(chooseProject.projectLeader) }}
36
               </el-descriptions-item>
30
               </el-descriptions-item>
119
               </el-link>
113
               </el-link>
120
             </div>
114
             </div>
121
           </el-form-item>
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
           <div class="headers">
122
           <div class="headers">
123
             预算内项目结算明细
123
             预算内项目结算明细
124
             <div class="line"></div>
124
             <div class="line"></div>
379
                 </el-form-item>
379
                 </el-form-item>
380
               </el-col>
380
               </el-col>
381
             </el-row>
381
             </el-row>
382
-            <el-form-item label="经营发展部(校核)">
382
+            <el-form-item label="经营发展部(校核)" prop="jyComment">
383
               <el-input v-model="form.jyComment" type="textarea" :disabled="taskName != '经营发展部校核'" clearable
383
               <el-input v-model="form.jyComment" type="textarea" :disabled="taskName != '经营发展部校核'" clearable
384
                 :autosize="{ minRows: 4, maxRows: 10 }">
384
                 :autosize="{ minRows: 4, maxRows: 10 }">
385
               </el-input>
385
               </el-input>
506
 import { getDept } from "@/api/system/dept";
506
 import { getDept } from "@/api/system/dept";
507
 import { getContract } from "@/api/oa/contract/contract";
507
 import { getContract } from "@/api/oa/contract/contract";
508
 import ChooseProject from "./components/chooseProject.vue";
508
 import ChooseProject from "./components/chooseProject.vue";
509
+import projectContractInfo from "./projectContractInfo.vue";
509
 export default {
510
 export default {
510
   components: {
511
   components: {
511
     flow,
512
     flow,
512
     ChoosePrice,
513
     ChoosePrice,
513
     SettlePrint,
514
     SettlePrint,
514
     ChooseProject,
515
     ChooseProject,
516
+    projectContractInfo
515
   },
517
   },
516
   props: {
518
   props: {
517
     taskName: {
519
     taskName: {
554
           { required: true, trigger: "change", message: "请选择项目编号" },
556
           { required: true, trigger: "change", message: "请选择项目编号" },
555
         ],
557
         ],
556
       },
558
       },
557
-      projectList: [],
558
       isSelect: false,
559
       isSelect: false,
559
       chooseProject: {},
560
       chooseProject: {},
560
       fileList: [],
561
       fileList: [],
605
       exceed: false, //是否超预算
606
       exceed: false, //是否超预算
606
       exceedAmount: 0,
607
       exceedAmount: 0,
607
       isModify: false, //是否可以修改结算工作量
608
       isModify: false, //是否可以修改结算工作量
609
+      projectId: '',
608
     };
610
     };
609
   },
611
   },
610
   created() {
612
   created() {
611
-    this.getProjectList(); //获取项目列表
612
-    this.getContractDataList(); //获取合同编码和编号
613
+    this.initRules();
613
     this.initForm();
614
     this.initForm();
614
     if (this.flowDisabled)
615
     if (this.flowDisabled)
615
       flowXmlAndNode({
616
       flowXmlAndNode({
633
     this.isModify = this.taskName != '结算发起' && this.taskName != '经营发展部校核' && this.taskName != '分管审核'
634
     this.isModify = this.taskName != '结算发起' && this.taskName != '经营发展部校核' && this.taskName != '分管审核'
634
   },
635
   },
635
   methods: {
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
     async initForm() {
649
     async initForm() {
638
       this.loading = true
650
       this.loading = true
655
 
667
 
656
         if (projectResponse) {
668
         if (projectResponse) {
657
           this.chooseProject = projectResponse.data;
669
           this.chooseProject = projectResponse.data;
670
+          this.projectId = projectResponse.data.projectId
658
           this.isSelect = true;
671
           this.isSelect = true;
659
         }
672
         }
660
         if (budgetResponse && budgetResponse.total === 1) {
673
         if (budgetResponse && budgetResponse.total === 1) {
864
         this.$emit('goBack');
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
     handleSelectProject(val) {
881
     handleSelectProject(val) {
878
       if (val != "" && val != undefined && val != null) {
882
       if (val != "" && val != undefined && val != null) {
902
       }
906
       }
903
       return true;
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
     addWorkList() {
909
     addWorkList() {
931
       this.settleWorkList.push({
910
       this.settleWorkList.push({
932
         content: "",
911
         content: "",
975
         work.remark = '不足600,按600算'
954
         work.remark = '不足600,按600算'
976
         sum = 600
955
         sum = 600
977
       }
956
       }
978
-      else {
979
-        work.remark = ''
980
-      }
981
       work.settle = Number(sum).toFixed(2);
957
       work.settle = Number(sum).toFixed(2);
982
       this.calculateSumSettle();
958
       this.calculateSumSettle();
983
       this.calculateActualSumSettle();
959
       this.calculateActualSumSettle();
1182
   font-family: "黑体";
1158
   font-family: "黑体";
1183
   font-weight: bold;
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
 </style>
1172
 </style>

正在加载...
取消
保存