瀏覽代碼

修改预算中的审核意见

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

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

28
         <result property="manager"    column="manager"    />
28
         <result property="manager"    column="manager"    />
29
         <result property="auditor"    column="auditor"    />
29
         <result property="auditor"    column="auditor"    />
30
         <result property="approver"    column="approver"    />
30
         <result property="approver"    column="approver"    />
31
+        <result property="managerComment"    column="manager_comment"    />
31
         <result property="zjlComment"    column="zjl_comment"    />
32
         <result property="zjlComment"    column="zjl_comment"    />
32
         <result property="dszComment"    column="dsz_comment"    />
33
         <result property="dszComment"    column="dsz_comment"    />
34
+        <result property="managerTime"    column="manager_time"    />
33
         <result property="zjlTime"    column="zjl_time"    />
35
         <result property="zjlTime"    column="zjl_time"    />
34
         <result property="dszTime"    column="dsz_time"    />
36
         <result property="dszTime"    column="dsz_time"    />
35
         <result property="createTime"    column="create_time"    />
37
         <result property="createTime"    column="create_time"    />
69
     <sql id="selectCmcBudgetVo">
71
     <sql id="selectCmcBudgetVo">
70
         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,
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
                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,
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
                b.manager_comment, b.zjl_comment, b.dsz_comment from cmc_budget as b
75
                b.manager_comment, b.zjl_comment, b.dsz_comment from cmc_budget as b
74
             left join sys_user as u on u.user_id = b.compiler
76
             left join sys_user as u on u.user_id = b.compiler
75
             left join sys_user as u1 on u1.user_id = b.manager
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
         <result property="jsUserId"    column="js_user_id"    />
17
         <result property="jsUserId"    column="js_user_id"    />
18
         <result property="jsTime"    column="js_time"    />
18
         <result property="jsTime"    column="js_time"    />
19
         <result property="jsComment"    column="js_comment"    />
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
         <result property="jyUserId"    column="jy_user_id"    />
20
         <result property="jyUserId"    column="jy_user_id"    />
24
         <result property="jyTime"    column="jy_time"    />
21
         <result property="jyTime"    column="jy_time"    />
25
         <result property="jyComment"    column="jy_comment"    />
22
         <result property="jyComment"    column="jy_comment"    />
38
         <association property="reporterUser"    javaType="SysUser"         resultMap="ReporterUserResult" />
35
         <association property="reporterUser"    javaType="SysUser"         resultMap="ReporterUserResult" />
39
         <association property="zhUser"    javaType="SysUser"         resultMap="ZhUserResult" />
36
         <association property="zhUser"    javaType="SysUser"         resultMap="ZhUserResult" />
40
         <association property="jsUser"    javaType="SysUser"         resultMap="JsUserResult" />
37
         <association property="jsUser"    javaType="SysUser"         resultMap="JsUserResult" />
41
-        <association property="xmUser"    javaType="SysUser"         resultMap="XmUserResult" />
42
         <association property="jyUser"    javaType="SysUser"         resultMap="JyUserResult" />
38
         <association property="jyUser"    javaType="SysUser"         resultMap="JyUserResult" />
43
         <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
39
         <association property="managerUser"    javaType="SysUser"         resultMap="ManagerUserResult" />
44
         <association property="gmUser"    javaType="SysUser"         resultMap="GmUserResult" />
40
         <association property="gmUser"    javaType="SysUser"         resultMap="GmUserResult" />
60
         <result property="nickName"    column="js_nick_name"    />
56
         <result property="nickName"    column="js_nick_name"    />
61
     </resultMap>
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
     <resultMap type="SysUser" id="JyUserResult">
59
     <resultMap type="SysUser" id="JyUserResult">
69
         <result property="userId"    column="user_id"    />
60
         <result property="userId"    column="user_id"    />
70
         <result property="nickName"    column="jy_nick_name"    />
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
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-08 16:08:33
3
  * @Date: 2024-04-08 16:08:33
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-08 14:20:03
5
+ * @LastEditTime: 2024-07-10 18:25:25
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>

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

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-03 16:28:09
3
  * @Date: 2024-04-03 16:28:09
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-08 14:27:10
5
+ * @LastEditTime: 2024-07-10 19:15:14
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="main">
8
   <div class="main">
9
     <div>
9
     <div>
10
       <h2 class="text-center">项目直接生产成本预算表</h2>
10
       <h2 class="text-center">项目直接生产成本预算表</h2>
11
       <p style="text-align: center;">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }} | 审核人:{{
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
       <el-descriptions :column="3" border class="descriptions">
13
       <el-descriptions :column="3" border class="descriptions">
14
         <el-descriptions-item label="项目编号">
14
         <el-descriptions-item label="项目编号">
15
           {{ projectForm.projectNumber }}
15
           {{ projectForm.projectNumber }}
262
             (简写:{{ (profit / 10000).toFixed(4) + '万' }})
262
             (简写:{{ (profit / 10000).toFixed(4) + '万' }})
263
           </div>
263
           </div>
264
         </el-descriptions-item>
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
       </el-descriptions>
298
       </el-descriptions>
266
     </div>
299
     </div>
300
+
267
     <el-row v-if="taskName == '分管审核' || taskName == '总经理审核' || taskName == '预算批准'" class="text-center mt20 mb20">
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
     </el-row>
303
     </el-row>
270
   </div>
304
   </div>
271
 </template>
305
 </template>
330
     initBudgetForm() {
364
     initBudgetForm() {
331
       listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(res => {
365
       listBudget({ pageNum: 1, pageSize: 20, projectId: this.taskForm.formId }).then(res => {
332
         this.budgetForm = res.rows[0];
366
         this.budgetForm = res.rows[0];
367
+        this.setSignName();
333
         if (this.budgetForm) {
368
         if (this.budgetForm) {
334
           listBudgetDevice({ budgetId: this.budgetForm.budgetId }).then(res => {
369
           listBudgetDevice({ budgetId: this.budgetForm.budgetId }).then(res => {
335
             this.chooseDevice = res.rows;
370
             this.chooseDevice = res.rows;
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
     getProjectList() {
430
     getProjectList() {
382
       getProject(this.taskForm.formId).then(response => {
431
       getProject(this.taskForm.formId).then(response => {
404
 
453
 
405
         })
454
         })
406
       } else if (taskName == '总经理审核') {
455
       } else if (taskName == '总经理审核') {
456
+        this.updateBudgetForm();
407
         getNextFlowNode(params).then(res => {
457
         getNextFlowNode(params).then(res => {
408
           getUserByPost({ postName: "董事长" }).then(res => {
458
           getUserByPost({ postName: "董事长" }).then(res => {
409
             const userId = res.data[0].userId;
459
             const userId = res.data[0].userId;
415
           })
465
           })
416
         })
466
         })
417
       } else {
467
       } else {
468
+        this.updateBudgetForm();
418
         getNextFlowNode(params).then(res => {
469
         getNextFlowNode(params).then(res => {
419
           complete(this.taskForm).then(response => {
470
           complete(this.taskForm).then(response => {
420
             this.$modal.msgSuccess(response.msg);
471
             this.$modal.msgSuccess(response.msg);
556
 </script>
607
 </script>
557
 
608
 
558
 <style lang="scss" scoped>
609
 <style lang="scss" scoped>
610
+@import "@/assets/styles/element-reset.scss";
559
 .main {
611
 .main {
560
   width: 100%;
612
   width: 100%;
561
   margin: 0 auto;
613
   margin: 0 auto;
584
   font-weight: bold;
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
 ::v-deep .el-descriptions-item__label.is-bordered-label {
648
 ::v-deep .el-descriptions-item__label.is-bordered-label {
588
   color: #5a5757;
649
   color: #5a5757;
589
   background: rgba($color: #a9adb3, $alpha: 0.1);
650
   background: rgba($color: #a9adb3, $alpha: 0.1);
590
-  width: 110px;
651
+  width: 120px;
591
   text-align: center;
652
   text-align: center;
592
-  min-width: 110px;
653
+  min-width: 120px;
593
 }
654
 }
594
 
655
 
595
 ::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
656
 ::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {

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

125
               <el-form-item label="申请金额" prop="applyAmount">
125
               <el-form-item label="申请金额" prop="applyAmount">
126
                 <el-input v-model="form.applyAmount" placeholder="请输入申请金额" :disabled="taskName != '借款申请'"
126
                 <el-input v-model="form.applyAmount" placeholder="请输入申请金额" :disabled="taskName != '借款申请'"
127
                   @blur="VerificationAmount" />
127
                   @blur="VerificationAmount" />
128
-                <span style="color:#E74C3C">超过预算额</span>
128
+                <span style="color:#E74C3C" v-if="exceed">超过预算:{{ getMoreAmount('0') }}</span>
129
               </el-form-item>
129
               </el-form-item>
130
             </el-col>
130
             </el-col>
131
             <el-col :span="8" :xs="24">
131
             <el-col :span="8" :xs="24">
132
               <el-form-item label="核准金额" prop="managerAmount">
132
               <el-form-item label="核准金额" prop="managerAmount">
133
                 <el-input v-model="form.managerAmount" placeholder="请输入核准金额"
133
                 <el-input v-model="form.managerAmount" placeholder="请输入核准金额"
134
                   :disabled="taskName != '分管审核' && taskName != '党工团审核'" />
134
                   :disabled="taskName != '分管审核' && taskName != '党工团审核'" />
135
+                <span style="color:#E74C3C" v-if="form.managerAmount">超过预算金额:{{ getMoreAmount('1') }}</span>
135
               </el-form-item>
136
               </el-form-item>
136
             </el-col>
137
             </el-col>
137
           </el-row>
138
           </el-row>
268
             </el-col>
269
             </el-col>
269
             <el-col :span="6">
270
             <el-col :span="6">
270
               <el-form-item label="支付日期:" prop="lendTime" v-if="showFormItem('财务处理')">
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
                   placeholder="选择日期" :disabled="taskName != '财务处理'">
273
                   placeholder="选择日期" :disabled="taskName != '财务处理'">
273
                 </el-date-picker>
274
                 </el-date-picker>
274
               </el-form-item>
275
               </el-form-item>
502
         else {
503
         else {
503
           this.formTotal = 1;
504
           this.formTotal = 1;
504
           this.form = res.data;
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
           this.hanldeChangeType();
513
           this.hanldeChangeType();
506
           this.handleSelectProject(res.data.projectId)
514
           this.handleSelectProject(res.data.projectId)
507
           this.getBudgetSettle()
515
           this.getBudgetSettle()
508
         }
516
         }
509
         this.loading = false;
517
         this.loading = false;
510
       })
518
       })
519
+
511
     },
520
     },
512
     async getBudgetSettle() {
521
     async getBudgetSettle() {
513
       let budgetData = await listBudget({ projectId: this.form.projectId })
522
       let budgetData = await listBudget({ projectId: this.form.projectId })
587
     submitForm() {
596
     submitForm() {
588
       this.$refs["form"].validate(valid => {
597
       this.$refs["form"].validate(valid => {
589
         if (valid) {
598
         if (valid) {
599
+          if (this.form.borrowUsage == '0' && !this.form.projectId) {
600
+            this.$message.error('请选择项目!')
601
+            return
602
+          }
590
           if (this.formTotal != 0) {
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
             delBorrowDetail(this.taskForm.formId).then(res => {
605
             delBorrowDetail(this.taskForm.formId).then(res => {
601
               this.detailList.forEach(detail => {
606
               this.detailList.forEach(detail => {
628
                 })
633
                 })
629
               }
634
               }
630
               else if (this.taskName == '总经理审核') {
635
               else if (this.taskName == '总经理审核') {
636
+                this.$set(this.taskForm.variables, "exceed", this.exceed);
631
                 if (!this.exceed) { //没有超预算
637
                 if (!this.exceed) { //没有超预算
632
                   this.submitFD(); //提交到财务部审核
638
                   this.submitFD(); //提交到财务部审核
633
                 }
639
                 }
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
 </script>
845
 </script>

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

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

Loading…
取消
儲存