瀏覽代碼

修改预算中的审核意见

余思翰 11 月之前
父節點
當前提交
b59a19dcbe

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

@@ -28,8 +28,10 @@
28 28
         <result property="manager"    column="manager"    />
29 29
         <result property="auditor"    column="auditor"    />
30 30
         <result property="approver"    column="approver"    />
31
+        <result property="managerComment"    column="manager_comment"    />
31 32
         <result property="zjlComment"    column="zjl_comment"    />
32 33
         <result property="dszComment"    column="dsz_comment"    />
34
+        <result property="managerTime"    column="manager_time"    />
33 35
         <result property="zjlTime"    column="zjl_time"    />
34 36
         <result property="dszTime"    column="dsz_time"    />
35 37
         <result property="createTime"    column="create_time"    />
@@ -69,7 +71,7 @@
69 71
     <sql id="selectCmcBudgetVo">
70 72
         select b.budget_id, b.project_id, p.project_number, p.project_name, b.staff_cost, b.car_cost, b.device_cost, b.fix_cost, b.settle_expense, b.out_expense, b.business_expense, b.tax_expense,
71 73
                b.rent_expense, b.other_expense, b.out_remark, b.business_remark, b.tax_remark, b.rent_remark, b.other_remark, b.direct_expense, b.total_budget, b.compiler,
72
-               u.nick_name as compiler_nick_name, b.manager, u2.nick_name as manager_nick_name, b.auditor, u3.nick_name as zjl_nick_name, b.approver, u4.nick_name as dsz_nick_name, b.create_time, b.manager_time, b.zjl_time, b.dsz_time,
74
+               u.nick_name as compiler_nick_name, b.manager, u1.nick_name as manager_nick_name, b.auditor, u2.nick_name as zjl_nick_name, b.approver, u3.nick_name as dsz_nick_name, b.create_time, b.manager_time, b.zjl_time, b.dsz_time,
73 75
                b.manager_comment, b.zjl_comment, b.dsz_comment from cmc_budget as b
74 76
             left join sys_user as u on u.user_id = b.compiler
75 77
             left join sys_user as u1 on u1.user_id = b.manager

+ 0
- 9
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleMapper.xml 查看文件

@@ -17,9 +17,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
17 17
         <result property="jsUserId"    column="js_user_id"    />
18 18
         <result property="jsTime"    column="js_time"    />
19 19
         <result property="jsComment"    column="js_comment"    />
20
-        <result property="xmUserId"    column="xm_user_id"    />
21
-        <result property="xmTime"    column="xm_time"    />
22
-        <result property="xmComment"    column="xm_comment"    />
23 20
         <result property="jyUserId"    column="jy_user_id"    />
24 21
         <result property="jyTime"    column="jy_time"    />
25 22
         <result property="jyComment"    column="jy_comment"    />
@@ -38,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
38 35
         <association property="reporterUser"    javaType="SysUser"         resultMap="ReporterUserResult" />
39 36
         <association property="zhUser"    javaType="SysUser"         resultMap="ZhUserResult" />
40 37
         <association property="jsUser"    javaType="SysUser"         resultMap="JsUserResult" />
41
-        <association property="xmUser"    javaType="SysUser"         resultMap="XmUserResult" />
42 38
         <association property="jyUser"    javaType="SysUser"         resultMap="JyUserResult" />
43 39
         <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
44 40
         <association property="gmUser"    javaType="SysUser"         resultMap="GmUserResult" />
@@ -60,11 +56,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
60 56
         <result property="nickName"    column="js_nick_name"    />
61 57
     </resultMap>
62 58
 
63
-    <resultMap type="SysUser" id="XmUserResult">
64
-        <result property="userId"    column="user_id"    />
65
-        <result property="nickName"    column="xm_nick_name"    />
66
-    </resultMap>
67
-
68 59
     <resultMap type="SysUser" id="JyUserResult">
69 60
         <result property="userId"    column="user_id"    />
70 61
         <result property="nickName"    column="jy_nick_name"    />

+ 770
- 627
oa-back/sql/cmc_oa(小余测试数据).sql
文件差異過大導致無法顯示
查看文件


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

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-08 16:08:33
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-08 14:20:03
5
+ * @LastEditTime: 2024-07-10 18:25:25
6 6
 -->
7 7
 <template>
8 8
   <div>

+ 66
- 5
oa-ui/src/views/flowable/form/budget/budgetInfo.vue 查看文件

@@ -2,14 +2,14 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-03 16:28:09
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-08 14:27:10
5
+ * @LastEditTime: 2024-07-10 19:15:14
6 6
 -->
7 7
 <template>
8 8
   <div class="main">
9 9
     <div>
10 10
       <h2 class="text-center">项目直接生产成本预算表</h2>
11 11
       <p style="text-align: center;">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }} | 审核人:{{
12
-        budgetForm.auditorUser ? budgetForm.auditorUser.nickName : '' }}</p>
12
+        budgetForm.managerUser ? budgetForm.managerUser.nickName : '' }}</p>
13 13
       <el-descriptions :column="3" border class="descriptions">
14 14
         <el-descriptions-item label="项目编号">
15 15
           {{ projectForm.projectNumber }}
@@ -262,10 +262,44 @@
262 262
             (简写:{{ (profit / 10000).toFixed(4) + '万' }})
263 263
           </div>
264 264
         </el-descriptions-item>
265
+        <el-descriptions-item label="分管审核意见" :span="3">
266
+          <div>
267
+            <el-input :disabled="taskName != '分管审核'" type="textarea" placeholder="请输入审核意见"
268
+              v-model="budgetForm.managerComment" :autosize="{ minRows: 4 }"></el-input>
269
+            <div class="sign mt10">
270
+              <div class="mr20">签名:<span class="auditor">{{ getUserName(budgetForm.manager) }}</span>
271
+              </div>
272
+              <div class="ml20"><span>审核时间:{{ budgetForm.managerTime }}</span></div>
273
+            </div>
274
+          </div>
275
+        </el-descriptions-item>
276
+        <el-descriptions-item label="总经理审核意见" :span="3">
277
+          <div>
278
+            <el-input :disabled="taskName != '总经理审核'" type="textarea" placeholder="请输入审核意见"
279
+              v-model="budgetForm.zjlComment" :autosize="{ minRows: 4 }"></el-input>
280
+            <div class="sign mt10">
281
+              <div class="mr20">签名:<span class="auditor">{{ getUserName(budgetForm.auditor) }}</span>
282
+              </div>
283
+              <div class="ml20"><span>审核时间:{{ budgetForm.zjlTime }}</span></div>
284
+            </div>
285
+          </div>
286
+        </el-descriptions-item>
287
+        <el-descriptions-item label="董事长批准意见" :span="3">
288
+          <div>
289
+            <el-input :disabled="taskName != '预算批准'" type="textarea" placeholder="请输入审核意见"
290
+              v-model="budgetForm.dszComment" :autosize="{ minRows: 4 }"></el-input>
291
+            <div class="sign mt10">
292
+              <div class="mr20">签名:<span class="auditor">{{ getUserName(budgetForm.approver) }}</span>
293
+              </div>
294
+              <div class="ml20"><span>审核时间:{{ budgetForm.dszTime }}</span></div>
295
+            </div>
296
+          </div>
297
+        </el-descriptions-item>
265 298
       </el-descriptions>
266 299
     </div>
300
+
267 301
     <el-row v-if="taskName == '分管审核' || taskName == '总经理审核' || taskName == '预算批准'" class="text-center mt20 mb20">
268
-      <el-button type="success" @click="confirmSucess(taskName)">审批通过</el-button>
302
+      <el-button type="success" @click="confirmSucess(taskName)">提 交</el-button>
269 303
     </el-row>
270 304
   </div>
271 305
 </template>
@@ -330,6 +364,7 @@ export default {
330 364
     initBudgetForm() {
331 365
       listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(res => {
332 366
         this.budgetForm = res.rows[0];
367
+        this.setSignName();
333 368
         if (this.budgetForm) {
334 369
           listBudgetDevice({ budgetId: this.budgetForm.budgetId }).then(res => {
335 370
             this.chooseDevice = res.rows;
@@ -377,6 +412,20 @@ export default {
377 412
         }
378 413
       });
379 414
     },
415
+    setSignName() {
416
+      const signUser = this.$store.getters.userId
417
+      const times = this.parseTime(new Date(), '{y}-{m}-{d}')
418
+      if (this.taskName == '分管审核') {
419
+        this.budgetForm.manager = signUser
420
+        this.budgetForm.managerTime = times
421
+      } else if (this.taskName == '总经理审核') {
422
+        this.budgetForm.auditor = signUser
423
+        this.budgetForm.zjlTime = times
424
+      } else if (this.taskName == '预算批准') {
425
+        this.budgetForm.approver = signUser
426
+        this.budgetForm.dszTime = times
427
+      }
428
+    },
380 429
     // 查询项目列表
381 430
     getProjectList() {
382 431
       getProject(this.taskForm.formId).then(response => {
@@ -404,6 +453,7 @@ export default {
404 453
 
405 454
         })
406 455
       } else if (taskName == '总经理审核') {
456
+        this.updateBudgetForm();
407 457
         getNextFlowNode(params).then(res => {
408 458
           getUserByPost({ postName: "董事长" }).then(res => {
409 459
             const userId = res.data[0].userId;
@@ -415,6 +465,7 @@ export default {
415 465
           })
416 466
         })
417 467
       } else {
468
+        this.updateBudgetForm();
418 469
         getNextFlowNode(params).then(res => {
419 470
           complete(this.taskForm).then(response => {
420 471
             this.$modal.msgSuccess(response.msg);
@@ -556,6 +607,7 @@ export default {
556 607
 </script>
557 608
 
558 609
 <style lang="scss" scoped>
610
+@import "@/assets/styles/element-reset.scss";
559 611
 .main {
560 612
   width: 100%;
561 613
   margin: 0 auto;
@@ -584,12 +636,21 @@ table {
584 636
   font-weight: bold;
585 637
 }
586 638
 
639
+.sign {
640
+  display: flex;
641
+  justify-content: flex-end;
642
+  align-items: center;
643
+  padding-right: 80px;
644
+  line-height: 30px;
645
+  /* 如果需要垂直居中 */
646
+}
647
+
587 648
 ::v-deep .el-descriptions-item__label.is-bordered-label {
588 649
   color: #5a5757;
589 650
   background: rgba($color: #a9adb3, $alpha: 0.1);
590
-  width: 110px;
651
+  width: 120px;
591 652
   text-align: center;
592
-  min-width: 110px;
653
+  min-width: 120px;
593 654
 }
594 655
 
595 656
 ::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {

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

@@ -125,13 +125,14 @@
125 125
               <el-form-item label="申请金额" prop="applyAmount">
126 126
                 <el-input v-model="form.applyAmount" placeholder="请输入申请金额" :disabled="taskName != '借款申请'"
127 127
                   @blur="VerificationAmount" />
128
-                <span style="color:#E74C3C">超过预算额</span>
128
+                <span style="color:#E74C3C" v-if="exceed">超过预算:{{ getMoreAmount('0') }}</span>
129 129
               </el-form-item>
130 130
             </el-col>
131 131
             <el-col :span="8" :xs="24">
132 132
               <el-form-item label="核准金额" prop="managerAmount">
133 133
                 <el-input v-model="form.managerAmount" placeholder="请输入核准金额"
134 134
                   :disabled="taskName != '分管审核' && taskName != '党工团审核'" />
135
+                <span style="color:#E74C3C" v-if="form.managerAmount">超过预算金额:{{ getMoreAmount('1') }}</span>
135 136
               </el-form-item>
136 137
             </el-col>
137 138
           </el-row>
@@ -268,7 +269,7 @@
268 269
             </el-col>
269 270
             <el-col :span="6">
270 271
               <el-form-item label="支付日期:" prop="lendTime" v-if="showFormItem('财务处理')">
271
-                <el-date-picker style="width:1.75rem;" v-model="form.lendTime" value-format="yyyy-MM-dd" type="date"
272
+                <el-date-picker style="width:140px;" v-model="form.lendTime" value-format="yyyy-MM-dd" type="date"
272 273
                   placeholder="选择日期" :disabled="taskName != '财务处理'">
273 274
                 </el-date-picker>
274 275
               </el-form-item>
@@ -502,12 +503,20 @@ export default {
502 503
         else {
503 504
           this.formTotal = 1;
504 505
           this.form = res.data;
506
+          if (this.isProject) {
507
+            if ((this.totalBudget - this.form.applyAmount) < 0) {
508
+              this.exceed = true;
509
+            } else {
510
+              this.exceed = false;
511
+            }
512
+          }
505 513
           this.hanldeChangeType();
506 514
           this.handleSelectProject(res.data.projectId)
507 515
           this.getBudgetSettle()
508 516
         }
509 517
         this.loading = false;
510 518
       })
519
+
511 520
     },
512 521
     async getBudgetSettle() {
513 522
       let budgetData = await listBudget({ projectId: this.form.projectId })
@@ -587,15 +596,11 @@ export default {
587 596
     submitForm() {
588 597
       this.$refs["form"].validate(valid => {
589 598
         if (valid) {
599
+          if (this.form.borrowUsage == '0' && !this.form.projectId) {
600
+            this.$message.error('请选择项目!')
601
+            return
602
+          }
590 603
           if (this.formTotal != 0) {
591
-            if (this.isProject) {
592
-              if ((this.totalBudget - this.form.applyAmount) < 0) {
593
-                this.exceed = true;
594
-                this.$set(this.taskForm.variables, "exceed", true);
595
-              } else {
596
-                this.$set(this.taskForm.variables, "exceed", false);
597
-              }
598
-            }
599 604
             // 更新借款明细项
600 605
             delBorrowDetail(this.taskForm.formId).then(res => {
601 606
               this.detailList.forEach(detail => {
@@ -628,6 +633,7 @@ export default {
628 633
                 })
629 634
               }
630 635
               else if (this.taskName == '总经理审核') {
636
+                this.$set(this.taskForm.variables, "exceed", this.exceed);
631 637
                 if (!this.exceed) { //没有超预算
632 638
                   this.submitFD(); //提交到财务部审核
633 639
                 }
@@ -824,6 +830,16 @@ export default {
824 830
         }
825 831
       }
826 832
     },
833
+    // 计算超过预算的金额
834
+    getMoreAmount(type) {
835
+      let result;
836
+      if (type == '0') {
837
+        result = this.form.applyAmount - (this.totalBudget - this.hasBorrow);
838
+      } else {
839
+        result = this.form.managerAmount - (this.totalBudget - this.hasBorrow);
840
+      }
841
+      return result.toFixed(2)
842
+    }
827 843
   }
828 844
 };
829 845
 </script>

+ 4
- 4
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-09 21:30:44
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-07-10 17:51:06
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -50,7 +50,7 @@
50 50
           </el-form-item>
51 51
         </el-col>
52 52
       </el-row>
53
-      <el-row :gutter="20">
53
+      <!-- <el-row :gutter="20">
54 54
         <el-col :span="12" :xs="24">
55 55
           <el-form-item label="组织交底日期:" prop="organizeTime">
56 56
             <el-date-picker style="width: 100%;" v-model="form.organizeTime" value-format="yyyy-MM-dd" type="date"
@@ -74,7 +74,7 @@
74 74
             </FileUpload>
75 75
           </el-form-item>
76 76
         </el-col>
77
-      </el-row>
77
+      </el-row> -->
78 78
     </el-form>
79 79
     <!-- 人员选择对话框 -->
80 80
     <el-dialog width="320px" title="选择项目负责人" :visible.sync="peopleVisible" append-to-body>

Loading…
取消
儲存