Bläddra i källkod

其他项目结算后台

lamphua 10 månader sedan
förälder
incheckning
fc1b1aa973

+ 4
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcSettleController.java Visa fil

@@ -72,6 +72,10 @@ public class CmcSettleController extends BaseController
72 72
     @PostMapping
73 73
     public AjaxResult add(@RequestBody CmcSettle cmcSettle)
74 74
     {
75
+        if (cmcSettle.getProjectId() != null && cmcSettle.getXmName() == null)
76
+            cmcSettle.setXmName(" ");
77
+        if (cmcSettle.getProjectId() == null && cmcSettle.getXmName() != null)
78
+            cmcSettle.setProjectId("0");
75 79
         return toAjax(cmcSettleService.insertCmcSettle(cmcSettle));
76 80
     }
77 81
 

+ 15
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcSettle.java Visa fil

@@ -28,6 +28,10 @@ public class CmcSettle extends BaseEntity
28 28
     @Excel(name = "项目名称")
29 29
     private String projectName;
30 30
 
31
+    /** 其他项目名称 */
32
+    @Excel(name = "其他项目名称")
33
+    private String xmName;
34
+
31 35
     /** 工作量上报说明 */
32 36
     @Excel(name = "工作量上报说明")
33 37
     private String workloadReport;
@@ -167,12 +171,21 @@ public class CmcSettle extends BaseEntity
167 171
     {
168 172
         return settleId;
169 173
     }
170
-    public void setProjectId(String projectId) 
174
+    public void setXmName(String xmName)
175
+    {
176
+        this.xmName = xmName;
177
+    }
178
+
179
+    public String getXmName()
180
+    {
181
+        return xmName;
182
+    }
183
+    public void setProjectId(String projectId)
171 184
     {
172 185
         this.projectId = projectId;
173 186
     }
174 187
 
175
-    public String getProjectId() 
188
+    public String getProjectId()
176 189
     {
177 190
         return projectId;
178 191
     }

+ 7
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleMapper.xml Visa fil

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
7 7
     <resultMap type="CmcSettle" id="CmcSettleResult">
8 8
         <result property="settleId"    column="settle_id"    />
9 9
         <result property="projectId"    column="project_id"    />
10
+        <result property="xmName"    column="xm_name"    />
10 11
         <result property="workloadReport"    column="workload_report"    />
11 12
         <result property="reporter"    column="reporter"    />
12 13
         <result property="reportTime"    column="report_time"    />
@@ -84,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
84 85
     </resultMap>
85 86
 
86 87
     <sql id="selectCmcSettleVo">
87
-        select s.settle_id, s.project_id, p.project_number, p.project_name, s.workload_report, s.reporter, u.nick_name as reporter_nick_name, s.report_time, s.settle_comment, s.zh_user_id, u1.nick_name as zh_nick_name,
88
+        select s.settle_id, s.project_id, p.project_number, p.project_name, s.xm_name, s.workload_report, s.reporter, u.nick_name as reporter_nick_name, s.report_time, s.settle_comment, s.zh_user_id, u1.nick_name as zh_nick_name,
88 89
                s.zh_time, s.zh_comment, s.js_user_id, u2.nick_name as js_nick_name, s.js_time, s.js_comment, s.jy_user_id, u3.nick_name as jy_nick_name, s.jy_time, s.jy_comment, 
89 90
                s.manager_user_id, u4.nick_name as manager_nick_name, s.manager_time, s.manager_comment, s.gm_user_id, u5.nick_name as gm_nick_name, s.gm_time, s.gm_comment,
90 91
                s.dsz_user_id, u6.nick_name as dsz_nick_name, s.dsz_time, s.dsz_comment, s.settle_document, s.modify_document, s.final_document from cmc_settle as s
@@ -102,7 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
102 103
         <include refid="selectCmcSettleVo"/>
103 104
         <where>
104 105
             <if test="settleId != null  and settleId != ''"> and s.settle_id = #{settleId}</if>
105
-            <if test="projectId != null  and projectId != ''"> and s.project_id = #{projectId}</if>
106
+            <if test="projectId != null"> and s.project_id = #{projectId}</if>
107
+            <if test="xmName != null"> and s.xm_name like concat('%', #{xmName}, '%')</if>
106 108
             <if test="workloadReport != null  and workloadReport != ''"> and s.workload_report = #{workloadReport}</if>
107 109
             <if test="reporter != null "> and s.reporter = #{reporter}</if>
108 110
             <if test="reportTime != null "> and s.report_time = #{reportTime}</if>
@@ -136,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
136 138
         <trim prefix="(" suffix=")" suffixOverrides=",">
137 139
             <if test="settleId != null">settle_id,</if>
138 140
             <if test="projectId != null">project_id,</if>
141
+            <if test="xmName != null">xm_name,</if>
139 142
             <if test="workloadReport != null">workload_report,</if>
140 143
             <if test="reporter != null">reporter,</if>
141 144
             <if test="reportTime != null">report_time,</if>
@@ -165,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
165 168
         <trim prefix="values (" suffix=")" suffixOverrides=",">
166 169
             <if test="settleId != null">#{settleId},</if>
167 170
             <if test="projectId != null">#{projectId},</if>
171
+            <if test="xmName != null">#{xmName},</if>
168 172
             <if test="workloadReport != null">#{workloadReport},</if>
169 173
             <if test="reporter != null">#{reporter},</if>
170 174
             <if test="reportTime != null">#{reportTime},</if>
@@ -197,6 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
197 201
         update cmc_settle
198 202
         <trim prefix="SET" suffixOverrides=",">
199 203
             <if test="projectId != null">project_id = #{projectId},</if>
204
+            <if test="xmName != null">xm_name = #{xmName},</if>
200 205
             <if test="workloadReport != null">workload_report = #{workloadReport},</if>
201 206
             <if test="reporter != null">reporter = #{reporter},</if>
202 207
             <if test="reportTime != null">report_time = #{reportTime},</if>

+ 46
- 99
oa-ui/src/views/flowable/form/settleOther.vue Visa fil

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-30 09:03:14
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-08-06 17:20:01
5
+ * @LastEditTime: 2024-08-07 13:30:38
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container" v-loading="loading">
@@ -15,6 +15,9 @@
15 15
           <div class="line"></div>
16 16
         </div>
17 17
         <el-form ref="settleForm" :model="form" :rules="rules" label-width="160px" :disabled="disabled">
18
+          <el-form-item label="其他项目名称" prop="xmName">
19
+            <el-input v-model="form.xmName" placeholder="请输入其他项目名称" :disabled="taskName != '结算发起'" />
20
+          </el-form-item>
18 21
           <el-form-item label="工作量上报说明" prop="workloadReport">
19 22
             <el-input v-model="form.workloadReport" type="textarea" :rows="4" :disabled="taskName != '结算发起'"
20 23
               placeholder="请输入工作量上报说明" />
@@ -155,6 +158,41 @@
155 158
             <div class="line"></div>
156 159
           </div>
157 160
           <el-form-item label-width="60px">
161
+            <h3>表1:扣除明细</h3>
162
+            <table border="1">
163
+              <tr>
164
+                <td style="width: 50px">序号</td>
165
+                <td style="width: 280px">扣除内容</td>
166
+                <td style="width: 200px">扣除金额(元)</td>
167
+                <td style="width: 280px">备注</td>
168
+                <td style="width: 100px">操作</td>
169
+              </tr>
170
+              <tr v-for="(  work, index  ) in   settleSumList  " :key="index">
171
+                <td>
172
+                  {{ index + 1 }}
173
+                </td>
174
+                <td>
175
+                  <el-input v-model="work.content" type="textarea" clearable :autosize="{ minRows: 2, maxRows: 10 }"
176
+                    :disabled="isModify">
177
+                  </el-input>
178
+                </td>
179
+                <td>
180
+                  <el-input-number :min="0" :precision="2" style="width: 200px" v-model="work.amount" clearable
181
+                    :disabled="isModify" :controls="false" @blur="calculateActualSumSettle()"></el-input-number>
182
+                  <!-- {{ work.amount }} -->
183
+                </td>
184
+                <td>
185
+                  <el-input v-model="work.remark" type="textarea" clearable :autosize="{ minRows: 2, maxRows: 10 }"
186
+                    :disabled="isModify">
187
+                  </el-input>
188
+                </td>
189
+                <td>
190
+                  <el-button type="text" size="mini" style="color: #f56c6c"
191
+                    @click="deletWorkItem(index, settleSumList)">删除行</el-button>
192
+                </td>
193
+              </tr>
194
+            </table>
195
+            <el-button icon="el-icon-plus" type="primary" plain size="mini" @click="addSumWorkList"></el-button>
158 196
             <h3>部门结算金额</h3>
159 197
             <table border="1">
160 198
               <tr>
@@ -269,8 +307,8 @@
269 307
     </el-row>
270 308
 
271 309
     <el-dialog title="结算表格预览" :visible.sync="printOpen" width="65%" append-to-body>
272
-      <settle-print :form="form" :workList="settleWorkList"
273
-        :settleList="oldSettleSumList" @cancel="printOpen = false"></settle-print>
310
+      <settle-print :form="form" :workList="settleWorkList" :settleList="oldSettleSumList"
311
+        @cancel="printOpen = false"></settle-print>
274 312
     </el-dialog>
275 313
     <el-drawer title="选择单价" :visible.sync="drawer" direction="rtl">
276 314
       <choose-price :row="clickWork" @getPrice="getPrice" @cancel="drawer = false"></choose-price>
@@ -283,12 +321,10 @@
283 321
 import flow from "@/views/flowable/task/todo/detail/flow";
284 322
 import { flowXmlAndNode } from "@/api/flowable/definition";
285 323
 import { parseTime } from "@/utils/ruoyi";
286
-import { listProject, getProject } from "@/api/oa/project/project";
287 324
 import { deepClone } from "@/utils";
288 325
 import { listSettle, getSettle, delSettle, addSettle, updateSettle } from "@/api/oa/settle/settle";
289 326
 import { listSettleSummary, getSettleSummary, addSettleSummary, delSettleSummary, updateSettleSummary } from "@/api/oa/settle/settleSummary";
290 327
 import { listSettleWork, getSettleWork, addSettleWork, updateSettleWork, delSettleWork } from "@/api/oa/settle/settleWork";
291
-import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
292 328
 import { getPrice, getPriceRemarkByWorkType } from "@/api/oa/price/price";
293 329
 import ChoosePrice from "./components/choosePrice.vue";
294 330
 import { getUser } from "@/api/system/user";
@@ -298,7 +334,6 @@ import { complete, getNextFlowNode } from "@/api/flowable/todo";
298 334
 import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersManageLeaderByDept, } from "@/api/system/post.js";
299 335
 import SettlePrint from "./components/settlePrint.vue";
300 336
 import { getDept } from "@/api/system/dept";
301
-import { getContract } from "@/api/oa/contract/contract";
302 337
 export default {
303 338
   components: {
304 339
     flow,
@@ -338,12 +373,7 @@ export default {
338 373
       flag: false,
339 374
       flowData: {},
340 375
       form: {},
341
-      rules: {
342
-        projectId: [
343
-          { required: true, trigger: "change", message: "请选择项目编号" },
344
-        ],
345
-      },
346
-      projectList: [],
376
+      rules: {},
347 377
       isSelect: false,
348 378
       fileList: [],
349 379
       settleWorkList: [
@@ -392,8 +422,6 @@ export default {
392 422
     };
393 423
   },
394 424
   created() {
395
-    this.getProjectList(); //获取项目列表
396
-    this.getContractDataList(); //获取合同编码和编号
397 425
     this.initForm();
398 426
     if (this.flowDisabled)
399 427
       flowXmlAndNode({
@@ -404,17 +432,7 @@ export default {
404 432
       });
405 433
   },
406 434
   mounted() {
407
-    if (this.$route.query.projectId) {
408
-      getProject(this.$route.query.projectId).then((res) => {
409
-        if (res.data) {
410
-          this.$set(this.form, "projectId", res.data.projectId);
411
-          this.handleSelectProject(res.data.projectId);
412
-        }
413
-      });
414
-    } else {
415
-      this.handleSelectProject(this.form.projectId);
416
-    }
417
-    this.isModify = this.taskName != '结算发起' && this.taskName != '经营发展部校核' && this.taskName != '分管审核'
435
+    this.isModify = this.taskName != '结算发起' && this.taskName != '分管审核'
418 436
   },
419 437
   methods: {
420 438
     // 初始化表单
@@ -429,7 +447,6 @@ export default {
429 447
           settleWorkResponse,
430 448
           settleSummaryResponse
431 449
         ] = await Promise.all([
432
-          getProject(res.rows[0].projectId),
433 450
           listSettleWork({ settleId: settleId, pageSize: 30 }),
434 451
           listSettleSummary({ settleId })
435 452
         ]);
@@ -488,19 +505,7 @@ export default {
488 505
 
489 506
     // 获取当前处理人
490 507
     getCurrentUser() {
491
-      if (this.taskName == "综合事务部处理") {
492
-        this.form.zhUserName = this.$store.state.user.name;
493
-        this.form.zhUserId = this.$store.state.user.id;
494
-        this.form.zhTime = parseTime(new Date(), "{y}-{m}-{d}");
495
-      } else if (this.taskName == "技术质量部审核") {
496
-        this.form.jsUserName = this.$store.state.user.name;
497
-        this.form.jsUserId = this.$store.state.user.id;
498
-        this.form.jsTime = parseTime(new Date(), "{y}-{m}-{d}");
499
-      } else if (this.taskName == "经营发展部校核") {
500
-        this.form.jyUserName = this.$store.state.user.name;
501
-        this.form.jyUserId = this.$store.state.user.id;
502
-        this.form.jyTime = parseTime(new Date(), "{y}-{m}-{d}");
503
-      } else if (this.taskName == "分管审核") {
508
+      if (this.taskName == "分管审核") {
504 509
         this.form.managerUserName = this.$store.state.user.name;
505 510
         this.form.managerUserId = this.$store.state.user.id;
506 511
         this.form.managerTime = parseTime(new Date(), "{y}-{m}-{d}");
@@ -513,17 +518,6 @@ export default {
513 518
     },
514 519
     // 获取审核人
515 520
     getReviewerName() {
516
-      if (this.form.zhUserId) {
517
-        this.form.zhUserName = this.getUserName(this.form.zhUserId)
518
-      }
519
-      if (this.form.jsUserId) {
520
-        this.form.jsUserName = this.getUserName(this.form.jsUserId)
521
-      }
522
-      if (this.form.jyUserId) {
523
-        getUser(this.form.jyUserId).then((res) => {
524
-          this.form.jyUserName = res.data.nickName;
525
-        });
526
-      }
527 521
       if (this.form.managerUserId) {
528 522
         getUser(this.form.managerUserId).then((res) => {
529 523
           this.form.managerUserName = res.data.nickName;
@@ -557,27 +551,14 @@ export default {
557 551
       this.$refs["settleForm"].validate((vaild) => {
558 552
         if (vaild) {
559 553
           this.preserve();
560
-          if (this.taskName == "结算发起") {
561
-            this.$confirm('结算合计总金额大于了预算内项目结算总金额,将走《超预算或预算外支付(报销)》流程', '提示', {
562
-              confirmButtonText: '确定',
563
-              type: 'warning'
564
-            }).then(() => {
565
-              getUserByRole({ roleId: 4 }).then((res) => {
566
-                this.getNextFlowNodeFn(res.data[0]);
567
-              });
568
-            })
569
-          } else if (this.taskName == "综合事务部处理") {
570
-            this.getNextFlowNodeFn(null, 109, false);
571
-          } else if (this.taskName == "技术质量部审核") {
572
-            this.getNextFlowNodeFn(null, 105, true);
573
-          } else if (this.taskName == "经营发展部校核") {
554
+          if (this.taskName == "结算发起") {            
574 555
             this.getNextFlowNodeFn(null, this.deptId, true);
575 556
           } else if (this.taskName == "分管审核") {
576 557
             getUserByPost({ postName: "总经理" }).then((res) => {
577 558
               this.getNextFlowNodeFn(res.data[0].userId);
578 559
             });
579 560
           } else if (this.taskName == "总经理审批") {
580
-              this.getNextFlowNodeFn();            
561
+            this.getNextFlowNodeFn();
581 562
           }
582 563
 
583 564
         } else {
@@ -619,15 +600,6 @@ export default {
619 600
         this.$emit('goBack');
620 601
       })
621 602
     },
622
-    // 查询项目列表
623
-    getProjectList() {
624
-      listProject({
625
-        pageNum: 1,
626
-        pageSize: 99999999,
627
-      }).then((response) => {
628
-        this.projectList = response.rows;
629
-      });
630
-    },
631 603
     isEmptyObject(obj) {
632 604
       for (var key in obj) {
633 605
         if (obj.hasOwnProperty(key)) {
@@ -636,31 +608,6 @@ export default {
636 608
       }
637 609
       return true;
638 610
     },
639
-    // 获取合同
640
-    getContractDataList() {
641
-      listProjectContract({ projectId: this.taskForm.formId }).then((res) => {
642
-        if (res.rows) {
643
-          for (let row of res.rows) {
644
-            getContract(row.contractId).then((res) => {
645
-              if (res.data) {
646
-                if (this.form.contractCode != "") {
647
-                  this.form.contractCode =
648
-                    this.form.contractCode + "、" + res.data.contractCode;
649
-                } else {
650
-                  this.form.contractCode = res.data.contractCode;
651
-                }
652
-                if (this.form.contractNumber != "") {
653
-                  this.form.contractNumber =
654
-                    this.form.contractNumber + "、" + res.data.contractNumber;
655
-                } else {
656
-                  this.form.contractNumber = res.data.contractNumber;
657
-                }
658
-              }
659
-            });
660
-          }
661
-        }
662
-      });
663
-    },
664 611
     addWorkList() {
665 612
       this.settleWorkList.push({
666 613
         content: "",

+ 2
- 0
oa-ui/src/views/oa/settle/index.vue Visa fil

@@ -117,6 +117,7 @@ export default {
117 117
         pageNum: 1,
118 118
         pageSize: 10,
119 119
         projectId: null,
120
+        xmName: ' ',
120 121
         workloadReport: null,
121 122
         reporter: null,
122 123
         reportTime: null,
@@ -186,6 +187,7 @@ export default {
186 187
       this.form = {
187 188
         settleId: null,
188 189
         projectId: null,
190
+        xmName: ' ',
189 191
         workloadReport: null,
190 192
         reporter: null,
191 193
         reportTime: null,

+ 11
- 15
oa-ui/src/views/oa/settle/other.vue Visa fil

@@ -1,13 +1,8 @@
1 1
 <template>
2 2
   <div class="app-container">
3
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
-      <el-form-item label="项目编号" prop="projectId">
5
-        <el-select v-model="queryParams.projectId" clearable filterable remote reserve-keyword placeholder="请输入项目编号"
6
-          :remote-method="remoteMethod" :loading="loading" style="width: 400px;">
7
-          <el-option v-for="project in projectList" :key="project.projectId"
8
-            :label="project.projectNumber + '-' + project.projectName" :value="project.projectId">
9
-          </el-option>
10
-        </el-select>
3
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
4
+      <el-form-item label="其他项目名称" prop="xmName">
5
+        <el-input v-model="queryParams.xmName" placeholder="请输入其他项目名称" clearable @keyup.enter.native="handleQuery" />
11 6
       </el-form-item>
12 7
       <el-form-item label="上报人" prop="reporter">
13 8
         <el-select v-model="queryParams.reporter" filterable clearable @change="handleQuery">
@@ -48,8 +43,7 @@
48 43
 
49 44
     <el-table v-loading="loading" :data="settleList" @selection-change="handleSelectionChange">
50 45
       <el-table-column type="index" label="序号" width="55" align="center" />
51
-      <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
52
-      <el-table-column label="项目名称" align="center" prop="project.projectName" />
46
+      <el-table-column label="其他项目名称" align="center" prop="xmName" />
53 47
       <el-table-column label="上报人" align="center" prop="reporter">
54 48
         <template slot-scope="scope">
55 49
           {{ getUserName(scope.row.reporter) }}
@@ -79,7 +73,7 @@
79 73
 
80 74
     <!-- 添加或修改cmc结算审批对话框 -->
81 75
     <el-dialog :title="title" :visible.sync="open" width="65%" append-to-body>
82
-      <settle-form :taskForm="taskForm" :taskName="''" :flowDisabled="false" :disabled="true"></settle-form>
76
+      <settle-other :taskForm="taskForm" :taskName="''" :flowDisabled="false" :disabled="true"></settle-other>
83 77
     </el-dialog>
84 78
   </div>
85 79
 </template>
@@ -87,10 +81,10 @@
87 81
 <script>
88 82
 import { listSettle, getSettle, delSettle, addSettle, updateSettle } from "@/api/oa/settle/settle";
89 83
 import { listProject } from '@/api/oa/project/project';
90
-import settleForm from '../../flowable/form/settleForm.vue';
84
+import settleOther from '../../flowable/form/settleOther.vue';
91 85
 
92 86
 export default {
93
-  components: { settleForm },
87
+  components: { settleOther },
94 88
   name: "Settle",
95 89
   data() {
96 90
     return {
@@ -116,7 +110,8 @@ export default {
116 110
       queryParams: {
117 111
         pageNum: 1,
118 112
         pageSize: 10,
119
-        projectId: null,
113
+        projectId: '0',
114
+        xmName: null,
120 115
         workloadReport: null,
121 116
         reporter: null,
122 117
         reportTime: null,
@@ -185,7 +180,8 @@ export default {
185 180
     reset() {
186 181
       this.form = {
187 182
         settleId: null,
188
-        projectId: null,
183
+        projectId: '0',
184
+        xmName: null,
189 185
         workloadReport: null,
190 186
         reporter: null,
191 187
         reportTime: null,

Loading…
Avbryt
Spara