浏览代码

修改项目结算、借款审批的金额需在预算内

余思翰 11 个月前
父节点
当前提交
5118d52591

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBrandProjectProgressController.java 查看文件

@@ -89,9 +89,9 @@ public class CmcBrandProjectProgressController extends BaseController
89 89
      * 删除cmc品牌项目进度
90 90
      */
91 91
     @Log(title = "cmc品牌项目进度", businessType = BusinessType.DELETE)
92
-	@DeleteMapping("/{progressIds}")
93
-    public AjaxResult remove(@PathVariable Long[] progressIds)
92
+	@DeleteMapping("/{projectIds}")
93
+    public AjaxResult remove(@PathVariable String[] projectIds)
94 94
     {
95
-        return success(cmcBrandProjectProgressService.deleteCmcBrandProjectProgressByProgressIds(progressIds));
95
+        return success(cmcBrandProjectProgressService.deleteCmcBrandProjectProgressByProgressIds(projectIds));
96 96
     }
97 97
 }

+ 14
- 15
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcSettleWork.java 查看文件

@@ -33,11 +33,11 @@ public class CmcSettleWork extends BaseEntity
33 33
 
34 34
     /** 工作量 */
35 35
     @Excel(name = "工作量")
36
-    private Long workload;
36
+    private Double workload;
37 37
 
38 38
     /** 系数 */
39 39
     @Excel(name = "系数")
40
-    private Long coefficient;
40
+    private Double coefficient;
41 41
 
42 42
     /** 地类 */
43 43
     @Excel(name = "地类")
@@ -51,70 +51,69 @@ public class CmcSettleWork extends BaseEntity
51 51
     {
52 52
         this.workId = workId;
53 53
     }
54
-
55 54
     public Long getWorkId()
56 55
     {
57 56
         return workId;
58 57
     }
58
+
59 59
     public void setSettleId(String settleId) 
60 60
     {
61 61
         this.settleId = settleId;
62 62
     }
63
-
64 63
     public String getSettleId() 
65 64
     {
66 65
         return settleId;
67 66
     }
67
+
68 68
     public void setContent(String content) 
69 69
     {
70 70
         this.content = content;
71 71
     }
72
-
73 72
     public String getContent() 
74 73
     {
75 74
         return content;
76 75
     }
76
+
77 77
     public void setPriceId(Long priceId) 
78 78
     {
79 79
         this.priceId = priceId;
80 80
     }
81
-
82
-    public Long getPriceId() 
81
+    public Long getPriceId()
83 82
     {
84 83
         return priceId;
85 84
     }
86
-    public void setWorkload(Long workload) 
85
+
86
+    public void setWorkload(Double workload)
87 87
     {
88 88
         this.workload = workload;
89 89
     }
90
-
91
-    public Long getWorkload() 
90
+    public Double getWorkload()
92 91
     {
93 92
         return workload;
94 93
     }
95
-    public void setCoefficient(Long coefficient) 
94
+
95
+    public void setCoefficient(Double coefficient)
96 96
     {
97 97
         this.coefficient = coefficient;
98 98
     }
99
-
100
-    public Long getCoefficient() 
99
+    public Double getCoefficient()
101 100
     {
102 101
         return coefficient;
103 102
     }
103
+
104 104
     public void setGroundType(String groundType) 
105 105
     {
106 106
         this.groundType = groundType;
107 107
     }
108
-
109 108
     public String getGroundType() 
110 109
     {
111 110
         return groundType;
112 111
     }
112
+
113 113
     public void setSettle(BigDecimal settle) 
114 114
     {
115 115
         this.settle = settle;
116 116
     }
117
-
118 117
     public BigDecimal getSettle() 
119 118
     {
120 119
         return settle;

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcBrandProjectProgressMapper.java 查看文件

@@ -54,8 +54,8 @@ public interface CmcBrandProjectProgressMapper
54 54
     /**
55 55
      * 批量删除cmc品牌项目进度
56 56
      * 
57
-     * @param progressIds 需要删除的数据主键集合
57
+     * @param projectIds 需要删除的数据主键集合
58 58
      * @return 结果
59 59
      */
60
-    public int deleteCmcBrandProjectProgressByProgressIds(Long[] progressIds);
60
+    public int deleteCmcBrandProjectProgressByProgressIds(String[] projectIds);
61 61
 }

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcBrandProjectProgressService.java 查看文件

@@ -46,10 +46,10 @@ public interface ICmcBrandProjectProgressService
46 46
     /**
47 47
      * 批量删除cmc品牌项目进度
48 48
      * 
49
-     * @param progressIds 需要删除的cmc品牌项目进度主键集合
49
+     * @param projectIds 需要删除的cmc品牌项目进度主键集合
50 50
      * @return 结果
51 51
      */
52
-    public int deleteCmcBrandProjectProgressByProgressIds(Long[] progressIds);
52
+    public int deleteCmcBrandProjectProgressByProgressIds(String[] projectIds);
53 53
 
54 54
     /**
55 55
      * 删除cmc品牌项目进度信息

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcBrandProjectProgressServiceImpl.java 查看文件

@@ -70,13 +70,13 @@ public class CmcBrandProjectProgressServiceImpl implements ICmcBrandProjectProgr
70 70
     /**
71 71
      * 批量删除cmc品牌项目进度
72 72
      * 
73
-     * @param progressIds 需要删除的cmc品牌项目进度主键
73
+     * @param projectIds 需要删除的cmc品牌项目进度主键
74 74
      * @return 结果
75 75
      */
76 76
     @Override
77
-    public int deleteCmcBrandProjectProgressByProgressIds(Long[] progressIds)
77
+    public int deleteCmcBrandProjectProgressByProgressIds(String[] projectIds)
78 78
     {
79
-        return cmcBrandProjectProgressMapper.deleteCmcBrandProjectProgressByProgressIds(progressIds);
79
+        return cmcBrandProjectProgressMapper.deleteCmcBrandProjectProgressByProgressIds(projectIds);
80 80
     }
81 81
 
82 82
     /**

+ 3
- 3
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBrandProjectProgressMapper.xml 查看文件

@@ -64,9 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
64 64
     </delete>
65 65
 
66 66
     <delete id="deleteCmcBrandProjectProgressByProgressIds" parameterType="String">
67
-        delete from cmc_brand_project_progress where progress_id in 
68
-        <foreach item="progressId" collection="array" open="(" separator="," close=")">
69
-            #{progressId}
67
+        delete from cmc_brand_project_progress where project_id in
68
+        <foreach item="projectId" collection="array" open="(" separator="," close=")">
69
+            #{projectId}
70 70
         </foreach>
71 71
     </delete>
72 72
 </mapper>

+ 16
- 9
oa-ui/src/utils/deleteResource.js 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-13 17:07:59
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-02 17:43:54
5
+ * @LastEditTime: 2024-07-04 10:38:39
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -18,14 +18,6 @@ const apiEndpoints = [
18 18
       '/oa/projectContract/:id',
19 19
     ]
20 20
   },
21
-  {
22
-    procDefName: '项目结算',
23
-    apiUrl: [
24
-      '/oa/settle/:id',
25
-      '/oa/settleSummary/:id',
26
-      '/oa/settleWork/:id',
27
-    ]
28
-  },
29 21
   {
30 22
     procDefName: '分包合同评审',
31 23
     apiUrl: [
@@ -49,6 +41,21 @@ const apiEndpoints = [
49 41
       '/oa/project/:id',
50 42
       '/oa/projectWork/:id',
51 43
     ]
44
+  },
45
+  {
46
+    procDefName: '项目结算',
47
+    apiUrl: [
48
+      '/oa/settle/:id',
49
+      '/oa/settleSummary/:id',
50
+      '/oa/settleWork/:id',
51
+    ]
52
+  },
53
+  {
54
+    procDefName: '借款审批',
55
+    apiUrl: [
56
+      '/oa/borrow/:id',
57
+      '/oa/borrowDetail/:id',
58
+    ]
52 59
   }
53 60
 ]
54 61
 

+ 16
- 11
oa-ui/src/views/flowable/form/business/brandForm.vue 查看文件

@@ -8,17 +8,21 @@
8 8
           <el-form-item label="品牌项目" prop="projectId">
9 9
             <el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
10 10
               :disabled="taskName != '支付申请'" clearable style="width: 100%;">
11
-              <el-option v-for="item in projectList" :key="item.value" :label="item.projectName" :value="item.projectId">
11
+              <el-option v-for="item in projectList" :key="item.value"
12
+                :label="item.projectNumber + '-' + item.projectName" :value="item.projectId">
12 13
               </el-option>
13 14
             </el-select>
14 15
             <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="1">
15 16
               <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
16
-              }}</el-descriptions-item>
17
+                }}</el-descriptions-item>
17 18
               <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
18
-              }}</el-descriptions-item>
19
-              <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
20
-                chooseProject.projectLeaderUser.nickName : ''
21
-              }}</el-descriptions-item>
19
+                }}</el-descriptions-item>
20
+              <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseProject.partyA ?
21
+                chooseProject.partyA.partyAName : ''
22
+                }}</el-descriptions-item>
23
+              <el-descriptions-item label="合作单位" label-class-name="my-label">{{ chooseProject.partner ?
24
+                chooseProject.partner.partnerName : ''
25
+                }}</el-descriptions-item>
22 26
             </el-descriptions>
23 27
           </el-form-item>
24 28
           <el-form-item label="申请支付说明" prop="applyReason">
@@ -26,9 +30,8 @@
26 30
               :disabled="taskName != '支付申请'" />
27 31
           </el-form-item>
28 32
           <el-form-item label="审核文件" prop="approvalDocument">
29
-            <FileUpload v-if="formTotal == 0" :disabled="taskName != '支付申请'"
30
-              :limit="1" :filePathName="'品牌项目支付/审核文件'" :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf']"
31
-              @input="getBrandPath"></FileUpload>
33
+            <FileUpload v-if="formTotal == 0" :disabled="taskName != '支付申请'" :limit="1" :filePathName="'品牌项目支付/审核文件'"
34
+              :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf']" @input="getBrandPath"></FileUpload>
32 35
             <div v-if="formTotal == 1">
33 36
               <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + form.approvalDocument}`)">
34 37
                 {{ getFileName(form.approvalDocument) }}
@@ -65,7 +68,8 @@
65 68
                   {{ index + 1 }}
66 69
                 </td>
67 70
                 <td>
68
-                  <el-input type="textarea" v-model="payment.cwComment" placeholder="请输入到账情况" :disabled="taskName != '财务反馈'" />
71
+                  <el-input type="textarea" v-model="payment.cwComment" placeholder="请输入到账情况"
72
+                    :disabled="taskName != '财务反馈'" />
69 73
                 </td>
70 74
                 <td>
71 75
                   <el-date-picker clearable v-model="payment.paymentTime" type="date" value-format="yyyy-MM-dd"
@@ -73,7 +77,7 @@
73 77
                   </el-date-picker>
74 78
                 </td>
75 79
                 <td>
76
-                  <el-button type="text" style="color:#F56C6C;"  size="mini" @click="deletPaymentItem(index)"
80
+                  <el-button type="text" style="color:#F56C6C;" size="mini" @click="deletPaymentItem(index)"
77 81
                     :disabled="taskName != '财务反馈'">删除行</el-button>
78 82
                 </td>
79 83
               </tr>
@@ -402,6 +406,7 @@ export default {
402 406
 </script>
403 407
 <style lang="scss" scoped>
404 408
 @import "@/assets/styles/element-reset.scss";
409
+
405 410
 table {
406 411
   /*边框*/
407 412
   /* border: 1px solid black; */

+ 1
- 1
oa-ui/src/views/flowable/form/components/settlePrint.vue 查看文件

@@ -188,7 +188,7 @@ export default {
188 188
     }
189 189
   },
190 190
   mounted() {
191
-    
191
+    this.initTable()
192 192
   },
193 193
   methods: {
194 194
     initTable() {

+ 53
- 10
oa-ui/src/views/flowable/form/finance/borrowForm.vue 查看文件

@@ -68,7 +68,7 @@
68 68
                 <td>单价</td>
69 69
                 <td>数量</td>
70 70
                 <td>申请金额</td>
71
-                <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">项目管理部校核金额</td>
71
+                <!-- <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">项目管理部校核金额</td> -->
72 72
                 <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">分管领导审核金额</td>
73 73
                 <td>操作</td>
74 74
               </tr>
@@ -83,20 +83,20 @@
83 83
                   <el-input v-model="detail.unit" :disabled="taskName != '借款申请'"></el-input>
84 84
                 </td>
85 85
                 <td>
86
-                  <el-input v-model="detail.price" @change="calculateAmount(detail)"
87
-                    :disabled="taskName != '借款申请'"></el-input>
86
+                  <el-input-number :controls="false" style="width:100%" v-model="detail.price" @change="calculateAmount(detail)"
87
+                    :disabled="taskName != '借款申请'"></el-input-number>
88 88
                 </td>
89 89
                 <td>
90
-                  <el-input v-model="detail.quantity" @change="calculateAmount(detail)"
91
-                    :disabled="taskName != '借款申请'"></el-input>
90
+                  <el-input-number :controls="false" style="width:100%" v-model="detail.quantity" @change="calculateAmount(detail)"
91
+                    :disabled="taskName != '借款申请'"></el-input-number>
92 92
                 </td>
93 93
                 <td>
94 94
                   <el-input v-model="detail.applyAmount" :disabled="taskName != '借款申请'"></el-input>
95 95
                 </td>
96
-                <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">
96
+                <!-- <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">
97 97
                   <el-input v-model="detail.xmAmount" :disabled="taskName != '项目部审核'"
98 98
                     @change="calculateXmAmount(detail)"></el-input>
99
-                </td>
99
+                </td> -->
100 100
                 <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">
101 101
                   <el-input v-model="detail.managerAmount" :disabled="taskName != '分管审核'"
102 102
                     @change="calculateManagerAmount(detail)"></el-input>
@@ -110,6 +110,15 @@
110 110
             <el-button icon="el-icon-plus" size="mini" @click="addDetailList()" type="primary" plain
111 111
               :disabled="taskName != '借款申请'"></el-button>
112 112
           </el-form-item>
113
+          <el-form-item label="预算金额" v-if="isSelect">
114
+            <el-tag>{{ totalBudget.toFixed(2) }}</el-tag>
115
+          </el-form-item>
116
+          <el-form-item label="已申请借款" v-if="isSelect">
117
+            <el-tag type="warning">{{ hasBorrow.toFixed(2) }}</el-tag>
118
+          </el-form-item>
119
+          <el-form-item label="可用借款" v-if="isSelect">
120
+            <el-tag type="success">{{ (totalBudget - hasBorrow).toFixed(2) }}</el-tag>
121
+          </el-form-item>
113 122
           <el-row :gutter="20">
114 123
             <el-col :span="8" :xs="24">
115 124
               <el-form-item label="申请金额" prop="applyAmount">
@@ -160,7 +169,7 @@
160 169
                 </el-form-item>
161 170
               </el-col>
162 171
             </el-row>
163
-            <el-form-item label="项目部校核意见" prop="xmComment" v-if="form.borrowUsage == '0'">
172
+            <!-- <el-form-item label="项目部校核意见" prop="xmComment" v-if="form.borrowUsage == '0'">
164 173
               <el-input type="textarea" v-model="form.xmComment" placeholder="请输入项目部校核意见"
165 174
                 :disabled="taskName != '项目部审核'" :autosize="{ minRows: 4 }" />
166 175
             </el-form-item>
@@ -175,7 +184,7 @@
175 184
                   <span> {{ form.xmTime ? form.xmTime : xmTime }} </span>
176 185
                 </el-form-item>
177 186
               </el-col>
178
-            </el-row>
187
+            </el-row> -->
179 188
             <el-form-item label="分管领导审核意见" prop="managerComment">
180 189
               <el-input type="textarea" v-model="form.managerComment" placeholder="请输入分管领导审核意见"
181 190
                 :disabled="taskName != '分管审核'" :autosize="{ minRows: 4 }" />
@@ -293,6 +302,8 @@ import flow from '@/views/flowable/task/todo/detail/flow'
293 302
 import { flowXmlAndNode } from "@/api/flowable/definition";
294 303
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
295 304
 import projectChoose from '@/views/flowable/form/components/chooseProject.vue';
305
+import { listBudget } from "@/api/oa/budget/budget";
306
+import { listBudgetSettle } from "@/api/oa/budget/budgetSettle";
296 307
 import FileItem from '../business/fileItem.vue';
297 308
 
298 309
 export default {
@@ -371,7 +382,9 @@ export default {
371 382
       flowData: {},
372 383
       isProject: true,
373 384
       deptId: undefined,
374
-      dgtLabel: '工会审核意见'
385
+      dgtLabel: '工会审核意见',
386
+      totalBudget: 0,
387
+      hasBorrow: 0,
375 388
     };
376 389
   },
377 390
   created() {
@@ -479,10 +492,33 @@ export default {
479 492
           this.form = res.data;
480 493
           this.hanldeChangeType();
481 494
           this.handleSelectProject(res.data.projectId)
495
+          this.getBudgetSettle()
482 496
         }
483 497
         this.loading = false;
484 498
       })
485 499
     },
500
+    async getBudgetSettle() {
501
+      let budgetData = await listBudget({ projectId: this.form.projectId })
502
+      if (budgetData.total == 1) {
503
+        let budget = budgetData.rows[0];
504
+        this.totalBudget = budget.totalBudget
505
+      }
506
+      let borrow = await listBorrow({ projectId: this.form.projectId })
507
+      if (borrow.total != 0) {
508
+        let borrowList = borrow.rows;
509
+        let hasBorrow = 0;
510
+        borrowList = borrowList.filter(item => item.borrowId != this.taskForm.formId)
511
+        borrowList.forEach(element => {
512
+          if (element.managerAmount) {
513
+            hasBorrow = hasBorrow + element.managerAmount
514
+          }
515
+          if (!element.managerAmount && element.applyAmount) {
516
+            hasBorrow = hasBorrow + element.applyAmount
517
+          }
518
+        });
519
+        this.hasBorrow = hasBorrow
520
+      }
521
+    },
486 522
     // 查询项目列表
487 523
     getProjectList() {
488 524
       listProject({
@@ -537,6 +573,12 @@ export default {
537 573
     },
538 574
     /** 提交按钮 */
539 575
     submitForm() {
576
+      if (this.isSelect) {
577
+        if (this.form.applyAmount > (this.totalBudget - this.hasBorrow)) {
578
+          this.$message.error('申请金额不允许超过可用借款!请重新填写')
579
+          return
580
+        }
581
+      }
540 582
       this.$refs["form"].validate(valid => {
541 583
         if (valid) {
542 584
           if (this.formTotal != 0) {
@@ -694,6 +736,7 @@ export default {
694 736
         this.form.projectId = val[0].projectId
695 737
       }
696 738
       this.openProject = false
739
+      this.getBudgetSettle();
697 740
     },
698 741
     calculateAmount(detail) {
699 742
       let total = Number(detail.price) * Number(detail.quantity);

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

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-05-10 14:45:08
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-06-20 14:36:57
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-07-04 11:00:25
6 6
 -->
7 7
 <template>
8 8
   <div class="mt20">
@@ -69,7 +69,7 @@
69 69
         <el-table-column prop="price" label="单价" />
70 70
         <el-table-column prop="quantity" label="数量" />
71 71
         <el-table-column prop="applyAmount" label="金额" />
72
-        <el-table-column prop="xmAmount" label="项目部校核金额" />
72
+        <!-- <el-table-column prop="xmAmount" label="项目部校核金额" /> -->
73 73
         <el-table-column prop="managerAmount" label="分管校核金额" />
74 74
       </el-table>
75 75
       <el-form inline class="mt20">

+ 6
- 6
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue 查看文件

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-19 09:24:06
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-07-04 13:00:36
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-07-04 17:41:05
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -96,10 +96,10 @@
96 96
         </el-form-item>
97 97
       </el-form>
98 98
     </el-dialog>
99
-    <!-- <div slot="footer" class="dialog-footer" style="text-align: center;">
99
+    <div slot="footer" class="dialog-footer" style="text-align: center;">
100 100
       <el-button type="primary" @click="confirmPlanForm" :disabled="disabled">提 交</el-button>
101
-      <el-button @click="cancel" :disabled="disabled">取 消</el-button>
102
-    </div> -->
101
+      <!-- <el-button @click="cancel" :disabled="disabled">取 消</el-button> -->
102
+    </div>
103 103
   </div>
104 104
 </template>
105 105
 
@@ -234,7 +234,7 @@ export default {
234 234
       updateProject(this.form)
235 235
     },
236 236
     confirmPlanForm() {
237
-      this.$confirm('项目安排之后会自动发起预算编制、技术方案、安全交底、技术交底四个子流程,将无法进行撤回操作,是否继续提交?', '提示', {
237
+      this.$confirm('项目安排之后会自动发起预算编制、技术方案、技术交底、安全交底四个子流程,将无法进行撤回操作,是否继续提交?', '提示', {
238 238
         confirmButtonText: '确定',
239 239
         cancelButtonText: '取消',
240 240
         type: 'warning'

+ 16
- 13
oa-ui/src/views/flowable/form/projectProcess/index.vue 查看文件

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-27 14:49:15
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-07-04 13:02:34
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-07-03 09:08:28
6 6
 -->
7 7
 
8 8
 <template>
@@ -11,22 +11,24 @@
11 11
       <el-col :span="18" :xs="24">
12 12
         <el-tabs tabPosition="left" type="card" class="tabs-border" v-model="activeName">
13 13
           <el-tab-pane label="项目登记" name="项目登记">
14
-            <addproject :taskForm="taskForm" :taskName="taskName" :disabled="taskName != '项目登记'" @goBack="goBack"></addproject>
14
+            <addproject :taskForm="taskForm" :taskName="taskName" :disabled="taskName != '项目登记'" @goBack="goBack">
15
+            </addproject>
16
+          </el-tab-pane>
17
+          <el-tab-pane label="项目安排" name="项目安排">
18
+            <arrangeProject :taskForm="taskForm" :taskName="'项目安排'" :disabled="taskName != '项目安排'" @goBack="goBack">
19
+            </arrangeProject>
15 20
           </el-tab-pane>
16
-          <!-- <el-tab-pane label="项目安排" name="项目安排">
17
-            <arrangeProject :taskForm="taskForm" :disabled="taskName != '项目安排'" @goBack="goBack"></arrangeProject>
18
-          </el-tab-pane> -->
19 21
           <el-tab-pane label="项目预算" name="项目预算">
20
-            <budget-tab :taskForm="taskForm"  @goBack="goBack"></budget-tab>
22
+            <budget-tab :taskForm="taskForm" @goBack="goBack"></budget-tab>
21 23
           </el-tab-pane>
22 24
           <el-tab-pane label="安全交底" name="安全交底">
23
-            <safe-tab :taskForm="taskForm"  @goBack="goBack"></safe-tab>
25
+            <safe-tab :taskForm="taskForm" @goBack="goBack"></safe-tab>
24 26
           </el-tab-pane>
25 27
           <el-tab-pane label="技术交底" name="技术交底">
26
-            <technical-tab :taskForm="taskForm"  @goBack="goBack"></technical-tab>
28
+            <technical-tab :taskForm="taskForm" @goBack="goBack"></technical-tab>
27 29
           </el-tab-pane>
28 30
           <el-tab-pane label="技术方案" name="技术方案">
29
-            <plan-tab :taskForm="taskForm" :taskName="taskName"  @goBack="goBack"></plan-tab>
31
+            <plan-tab :taskForm="taskForm" :taskName="taskName" @goBack="goBack"></plan-tab>
30 32
           </el-tab-pane>
31 33
           <el-tab-pane label="经营审核" name="经营审核">
32 34
             <business-review :taskForm="taskForm" :taskName="taskName" :disabled="taskName != '经营审核'"
@@ -74,7 +76,7 @@ import InProgress from './inProgress.vue'
74 76
 import BudgetTab from './budgetTab.vue'
75 77
 import planTab from './planTab.vue'
76 78
 import SafeTab from './safeTab.vue'
77
-import TechnicalTab from './technicalTab.vue'
79
+import technicalTab from './technicalTab.vue'
78 80
 export default {
79 81
   props: {
80 82
     taskName: {
@@ -84,7 +86,7 @@ export default {
84 86
       type: Object,
85 87
     }
86 88
   },
87
-  components: { addproject, arrangeProject, businessReview, flow, ManageReview, ScConfirm, InProgress, BudgetTab, planTab, SafeTab, TechnicalTab },
89
+  components: { addproject, arrangeProject, businessReview, flow, ManageReview, ScConfirm, InProgress, BudgetTab, planTab, SafeTab, technicalTab },
88 90
   data() {
89 91
     return {
90 92
       activeName: '项目登记',
@@ -127,7 +129,7 @@ export default {
127 129
     }
128 130
   },
129 131
   created() {
130
-    if(this.taskName !='' && this.taskName != undefined &&this.taskName != null){
132
+    if (this.taskName != '' && this.taskName != undefined && this.taskName != null) {
131 133
       this.activeName = this.taskName;
132 134
     }
133 135
     this.getList();
@@ -252,6 +254,7 @@ export default {
252 254
 
253 255
 <style lang="scss" scoped>
254 256
 @import "@/assets/styles/element-reset.scss";
257
+
255 258
 .project-wrapper {
256 259
   padding: 25px;
257 260
 }

+ 108
- 59
oa-ui/src/views/flowable/form/settleForm.vue 查看文件

@@ -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-06-21 13:46:50
5
+ * @LastEditTime: 2024-07-03 14:39:03
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container" v-loading="loading">
@@ -125,6 +125,40 @@
125 125
               </el-link>
126 126
             </div>
127 127
           </el-form-item>
128
+          <div class="headers">
129
+            预算内项目结算明细
130
+            <div class="line"></div>
131
+          </div>
132
+          <el-form-item label-width="60px">
133
+            <el-table :data="budgetList">
134
+              <el-table-column prop="budgetSettleId" label="序号" />
135
+              <el-table-column prop="content" label="工作内容" />
136
+              <el-table-column label="具体内容" width="150px">
137
+                <template slot-scope="scope">
138
+                  {{ scope.row.cmcPrice.workType + '/' + scope.row.cmcPrice.workItem }}
139
+                </template>
140
+              </el-table-column>
141
+              <el-table-column prop="cmcPrice.scaleGrade" label="等级或比例尺" />
142
+              <el-table-column prop="cmcPrice.unit" label="单位" />
143
+              <el-table-column prop="groundType" label="地类">
144
+                <template slot-scope="scope">
145
+                  {{ scope.row.groundType == '0' ? '一般地类' : '复杂地类' }}
146
+                </template>
147
+              </el-table-column>
148
+              <el-table-column prop="cmcPrice" label="单价">
149
+                <template slot-scope="scope">
150
+                  {{ scope.row.groundType == '0' ? scope.row.cmcPrice.commonPrice : scope.row.cmcPrice.complexPrice }}
151
+                </template>
152
+              </el-table-column>
153
+              <el-table-column prop="coefficient" label="系数" />
154
+              <el-table-column prop="workload" label="工作量" />
155
+              <el-table-column prop="settle" label="金额" />
156
+              <el-table-column prop="remark" label="备注" />
157
+            </el-table>
158
+            <p style="text-align: right;font-size:18px;padding-right:13%">
159
+              <b>预算内项目结算总金额:{{ budgetSettle }}</b>
160
+            </p>
161
+          </el-form-item>
128 162
           <div class="headers">
129 163
             项目完成工作量及经费计算
130 164
             <div class="line"></div>
@@ -461,42 +495,19 @@ import { flowXmlAndNode } from "@/api/flowable/definition";
461 495
 import { parseTime } from "@/utils/ruoyi";
462 496
 import { listProject, getProject } from "@/api/oa/project/project";
463 497
 import { deepClone } from "@/utils";
464
-import {
465
-  listSettle,
466
-  getSettle,
467
-  delSettle,
468
-  addSettle,
469
-  updateSettle,
470
-} from "@/api/oa/settle/settle";
471
-import {
472
-  listSettleSummary,
473
-  getSettleSummary,
474
-  addSettleSummary,
475
-  delSettleSummary,
476
-  updateSettleSummary,
477
-} from "@/api/oa/settle/settleSummary";
478
-import {
479
-  listSettleWork,
480
-  getSettleWork,
481
-  addSettleWork,
482
-  updateSettleWork,
483
-  delSettleWork,
484
-} from "@/api/oa/settle/settleWork";
485
-import {
486
-  listProjectContract,
487
-  addProjectContract,
488
-} from "@/api/oa/contract/projectContract";
498
+import { listSettle, getSettle, delSettle, addSettle, updateSettle } from "@/api/oa/settle/settle";
499
+import { listSettleSummary, getSettleSummary, addSettleSummary, delSettleSummary, updateSettleSummary } from "@/api/oa/settle/settleSummary";
500
+import { listSettleWork, getSettleWork, addSettleWork, updateSettleWork, delSettleWork } from "@/api/oa/settle/settleWork";
501
+import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
489 502
 import { getPrice, getPriceRemarkByWorkType } from "@/api/oa/price/price";
490 503
 import ChoosePrice from "./components/choosePrice.vue";
491 504
 import { getUser } from "@/api/system/user";
492 505
 import { getUserByRole } from "@/api/system/role";
493 506
 import { getUserByPost } from "@/api/system/post";
494 507
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
495
-import {
496
-  getUsersDeptLeader,
497
-  getUsersDeptLeaderByDept,
498
-  getUsersManageLeaderByDept,
499
-} from "@/api/system/post.js";
508
+import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersManageLeaderByDept, } from "@/api/system/post.js";
509
+import { listBudget } from "@/api/oa/budget/budget";
510
+import { listBudgetSettle } from "@/api/oa/budget/budgetSettle";
500 511
 import SettlePrint from "./components/settlePrint.vue";
501 512
 import { getDept } from "@/api/system/dept";
502 513
 import { getContract } from "@/api/oa/contract/contract";
@@ -551,6 +562,8 @@ export default {
551 562
       isSelect: false,
552 563
       chooseProject: {},
553 564
       fileList: [],
565
+      budgetList: [],
566
+      budgetSettle: 0,
554 567
       settleWorkList: [
555 568
         {
556 569
           content: "",
@@ -592,7 +605,8 @@ export default {
592 605
       actualSumSettle: "",
593 606
       clickWork: {},
594 607
       deptId: undefined,
595
-      deptList: []
608
+      deptList: [],
609
+      isCorrect: true,
596 610
     };
597 611
   },
598 612
   created() {
@@ -617,6 +631,7 @@ export default {
617 631
       });
618 632
     } else {
619 633
       this.handleSelectProject(this.form.projectId);
634
+      this.getBudgetSettle();
620 635
     }
621 636
   },
622 637
   methods: {
@@ -650,6 +665,19 @@ export default {
650 665
         }, 500);
651 666
       });
652 667
     },
668
+    async getBudgetSettle() {
669
+      let budgetData = await listBudget({ projectId: this.form.projectId })
670
+      if (budgetData.total == 1) {
671
+        let budgetId = budgetData.rows[0].budgetId;
672
+        let datas = await listBudgetSettle({ budgetId })
673
+        if (datas.code == 200) {
674
+          this.budgetList = datas.rows;
675
+          this.budgetList.forEach(item => {
676
+            this.budgetSettle = this.budgetSettle + item.settle
677
+          })
678
+        }
679
+      }
680
+    },
653 681
     // 获取当前处理人
654 682
     getCurrentUser() {
655 683
       if (this.taskName == "综合事务部处理") {
@@ -725,15 +753,20 @@ export default {
725 753
     preserve() {
726 754
       this.$refs["settleForm"].validate((vaild) => {
727 755
         if (vaild) {
728
-          if (this.flag) {
729
-            this.updateSettleFn();
730
-            this.updateSettleSummaryFn();
731
-            this.updateSettleWorkFn();
732
-            this.$message.success("保存成功");
756
+          if (this.isCorrect) {
757
+            if (this.flag) {
758
+              this.updateSettleFn();
759
+              this.updateSettleSummaryFn();
760
+              this.updateSettleWorkFn();
761
+              this.$message.success("保存成功");
762
+            } else {
763
+              this.addSettleFn();
764
+              this.$message.success("保存成功");
765
+            }
733 766
           } else {
734
-            this.addSettleFn();
735
-            this.$message.success("保存成功");
767
+            this.$message.error('结算合计总金额不能大于预算内项目结算总金额!')
736 768
           }
769
+
737 770
         } else {
738 771
           this.$message.error('请完善表单必填项')
739 772
         }
@@ -743,26 +776,30 @@ export default {
743 776
       this.$refs["settleForm"].validate((vaild) => {
744 777
         if (vaild) {
745 778
           this.preserve();
746
-          if (this.taskName == "结算发起") {
747
-            getUserByRole({ roleId: 4 }).then((res) => {
748
-              this.getNextFlowNodeFn(res.data[0]);
749
-            });
750
-          } else if (this.taskName == "综合事务部处理") {
751
-            this.getNextFlowNodeFn(null, 110, false);
752
-          } else if (this.taskName == "技术质量部审核") {
753
-            this.getNextFlowNodeFn(null, 107, false);
754
-          } else if (this.taskName == "项目管理部结算") {
755
-            this.getNextFlowNodeFn();
756
-          } else if (this.taskName == "结算发起人确认") {
757
-            this.getNextFlowNodeFn(null, 105, false);
758
-          } else if (this.taskName == "经营发展部校核") {
759
-            this.getNextFlowNodeFn(null, this.deptId, true);
760
-          } else if (this.taskName == "分管审核") {
761
-            getUserByPost({ postName: "总经理" }).then((res) => {
762
-              this.getNextFlowNodeFn(res.data[0].userId);
763
-            });
764
-          } else if (this.taskName == "总经理审批") {
765
-            this.getNextFlowNodeFn();
779
+          if (this.isCorrect) {
780
+            if (this.taskName == "结算发起") {
781
+              getUserByRole({ roleId: 4 }).then((res) => {
782
+                this.getNextFlowNodeFn(res.data[0]);
783
+              });
784
+            } else if (this.taskName == "综合事务部处理") {
785
+              this.getNextFlowNodeFn(null, 110, false);
786
+            } else if (this.taskName == "技术质量部审核") {
787
+              this.getNextFlowNodeFn(null, 107, false);
788
+            } else if (this.taskName == "项目管理部结算") {
789
+              this.getNextFlowNodeFn();
790
+            } else if (this.taskName == "结算发起人确认") {
791
+              this.getNextFlowNodeFn(null, 105, false);
792
+            } else if (this.taskName == "经营发展部校核") {
793
+              this.getNextFlowNodeFn(null, this.deptId, true);
794
+            } else if (this.taskName == "分管审核") {
795
+              getUserByPost({ postName: "总经理" }).then((res) => {
796
+                this.getNextFlowNodeFn(res.data[0].userId);
797
+              });
798
+            } else if (this.taskName == "总经理审批") {
799
+              this.getNextFlowNodeFn();
800
+            }
801
+          }else{
802
+            this.$message.error('结算合计总金额不能大于预算内项目结算总金额!')
766 803
           }
767 804
         } else {
768 805
           this.$message.error('请完善表单必填项')
@@ -913,6 +950,11 @@ export default {
913 950
     },
914 951
     calculateSettle(work) {
915 952
       let sum = work.workload * work.coefficient * work.price;
953
+      if(sum < 600){
954
+        this.$message.warning('不足600,按600算')
955
+        work.remark = '不足600,按600算'
956
+        sum = 600
957
+      }
916 958
       work.settle = Number(sum).toFixed(2);
917 959
       this.calculateSumSettle();
918 960
       this.calculateActualSumSettle();
@@ -924,6 +966,13 @@ export default {
924 966
         sum = sum + Number(a.settle);
925 967
       }
926 968
       this.settleSumTr.amount = sum.toFixed(2);
969
+      if (sum > this.budgetSettle) {
970
+        this.$message.error('结算合计总金额不能大于预算内项目结算总金额!')
971
+        this.settleSumTr.amount = this.budgetSettle.toFixed(2);
972
+        this.isCorrect = false;
973
+      } else {
974
+        this.isCorrect = true;
975
+      }
927 976
     },
928 977
     calculateActualSumSettle() {
929 978
       let sum = 0;

+ 64
- 5
oa-ui/src/views/oa/brand/brandProject.vue 查看文件

@@ -56,6 +56,8 @@
56 56
       <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
57 57
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
58 58
         <template slot-scope="scope">
59
+          <el-button size="mini" type="text" icon="el-icon-view" @click="handleLook(scope.row)"
60
+            v-hasPermi="['oa:brandProject:query']">查看</el-button>
59 61
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
60 62
             v-hasPermi="['oa:brandProject:edit']">修改</el-button>
61 63
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
@@ -69,7 +71,7 @@
69 71
 
70 72
     <!-- 添加或修改cmc品牌项目对话框 -->
71 73
     <el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
72
-      <el-form ref="form" :model="form" :rules="rules">
74
+      <el-form ref="form" :model="form" :rules="rules" :disabled="isView">
73 75
         <el-descriptions class="margin-top" :column="2" border>
74 76
           <el-descriptions-item>
75 77
             <template slot="label">
@@ -210,6 +212,40 @@
210 212
           </table>
211 213
           <el-button icon="el-icon-plus" size="mini" @click="addProgressList()" type="primary" plain></el-button>
212 214
         </el-form-item>
215
+        <el-form-item label="审核文件:">
216
+          <div v-if="approvalDocument != ''">
217
+            <el-link type="primary" @click="reviewWord(`${baseUrl}${'/profile/upload' + approvalDocument}`)">
218
+              {{ getFileName(approvalDocument) }}
219
+            </el-link>
220
+            <el-link class="ml20" type="warning" :href="`${baseUrl}${'/profile/upload' + approvalDocument}`"
221
+              :underline="false" target="_blank">
222
+              <span class="el-icon-download">下载文件</span>
223
+            </el-link>
224
+          </div>
225
+          <div v-else>
226
+            暂无文件
227
+          </div>
228
+        </el-form-item>
229
+        <el-form-item label="财务反馈:">
230
+          <table border="1" style="width:100%;">
231
+            <tr>
232
+              <td>序号</td>
233
+              <td>到账情况</td>
234
+              <td>到账时间</td>
235
+            </tr>
236
+            <tr v-for="(payment, index) in paymentList" :key="index">
237
+              <td>
238
+                {{ index + 1 }}
239
+              </td>
240
+              <td>
241
+                {{ payment.cwComment }}
242
+              </td>
243
+              <td>
244
+                {{ payment.paymentTime }}
245
+              </td>
246
+            </tr>
247
+          </table>
248
+        </el-form-item>
213 249
       </el-form>
214 250
       <div slot="footer" class="dialog-footer">
215 251
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -223,12 +259,15 @@
223 259
 import { listBrandProject, getBrandProject, delBrandProject, addBrandProject, updateBrandProject } from "@/api/oa/brand/brandProject";
224 260
 import { listBrandProgress, getBrandProgress, addBrandProgress, delBrandProgress } from "@/api/oa/brand/brandProgress"
225 261
 import { listPartner, getPartner } from "@/api/oa/partner/partner";
262
+import { listBrandPayment, addBrandPayment, delBrandPayment } from "@/api/oa/brand/brandPayment";
263
+import { listBrand, getBrand } from '@/api/oa/brand/brand';
226 264
 import { listPartyA } from "@/api/oa/partyA/partyA";
227 265
 
228 266
 export default {
229 267
   name: "BrandProject",
230 268
   data() {
231 269
     return {
270
+      baseUrl: process.env.VUE_APP_BASE_API,
232 271
       // 遮罩层
233 272
       loading: true,
234 273
       // 选中数组
@@ -279,7 +318,10 @@ export default {
279 318
       rules: {
280 319
         projectNumber: [{ required: true, message: "项目编号不能为空", trigger: "blur" }],
281 320
         projectName: [{ required: true, message: "项目名称不能为空", trigger: "blur" }],
282
-      }
321
+      },
322
+      isView: false,
323
+      paymentList: [],
324
+      approvalDocument: ''
283 325
     };
284 326
   },
285 327
   created() {
@@ -408,14 +450,31 @@ export default {
408 450
         situation: "",
409 451
       }]
410 452
     },
453
+    handleLook(row) {
454
+      this.handleUpdate(row)
455
+      this.isView = true;
456
+      this.title = "品牌项目";
457
+    },
411 458
     /** 修改按钮操作 */
412
-    handleUpdate(row) {
459
+    async handleUpdate(row) {
413 460
       this.reset();
414
-      const projectId = row.projectId || this.ids
461
+      this.isView = false;
462
+      let brandFormData = await listBrand({ projectId })
463
+      let brandId;
464
+      if (brandFormData.total == 1) {
465
+        brandId = brandFormData.rows[0].brandId
466
+        this.approvalDocument = brandFormData.rows[0].approvalDocument
467
+        listBrandPayment({ brandId }).then(result => {
468
+          this.paymentList = result.rows
469
+        })
470
+      }else{
471
+        this.paymentList = []
472
+        this.approvalDocument = ''
473
+      }
415 474
       getBrandProject(projectId).then(response => {
416 475
         this.form = response.data;
417 476
         this.open = true;
418
-        this.title = "品牌项目修改";
477
+        this.title = "品牌项目";
419 478
       });
420 479
       listBrandProgress({
421 480
         pageNum: 1,

正在加载...
取消
保存