浏览代码

用车审批合并工会、经营层

lamphua 1年前
父节点
当前提交
8de7bbd872

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

@@ -37,6 +37,10 @@ public class CmcBudgetSettle extends BaseEntity
37 37
     @Excel(name = "系数")
38 38
     private Long coefficient;
39 39
 
40
+    /** 地类 */
41
+    @Excel(name = "地类")
42
+    private String groundType;
43
+
40 44
     /** 结算金额 */
41 45
     @Excel(name = "结算金额")
42 46
     private BigDecimal settle;
@@ -95,6 +99,15 @@ public class CmcBudgetSettle extends BaseEntity
95 99
     {
96 100
         return coefficient;
97 101
     }
102
+    public void setGroundType(String groundType)
103
+    {
104
+        this.groundType = groundType;
105
+    }
106
+
107
+    public String getGroundType()
108
+    {
109
+        return groundType;
110
+    }
98 111
     public void setSettle(BigDecimal settle) 
99 112
     {
100 113
         this.settle = settle;
@@ -113,6 +126,7 @@ public class CmcBudgetSettle extends BaseEntity
113 126
             .append("priceId", getPriceId())
114 127
             .append("workload", getWorkload())
115 128
             .append("coefficient", getCoefficient())
129
+            .append("groundType", getGroundType())
116 130
             .append("settle", getSettle())
117 131
             .toString();
118 132
     }

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

@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
10 10
         <result property="priceId"    column="price_id"    />
11 11
         <result property="workload"    column="workload"    />
12 12
         <result property="coefficient"    column="coefficient"    />
13
+        <result property="groundType"    column="ground_type"    />
13 14
         <result property="settle"    column="settle"    />
14 15
         <association property="cmcPrice"    javaType="CmcPrice"         resultMap="CmcPriceResult" />
15 16
     </resultMap>
@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
26 27
     </resultMap>
27 28
 
28 29
     <sql id="selectCmcBudgetSettleVo">
29
-        select bs.budget_settle_id, bs.budget_id, bs.price_id, p.work_type, p.work_item, p.sub_item, p.scale_grade, p.unit, p.common_price, p.complex_price, bs.workload, bs.coefficient, bs.settle from cmc_budget_settle as bs
30
+        select bs.budget_settle_id, bs.budget_id, bs.price_id, p.work_type, p.work_item, p.sub_item, p.scale_grade, p.unit, p.common_price, p.complex_price, bs.workload, bs.coefficient, bs.ground_type, bs.settle from cmc_budget_settle as bs
30 31
         left join cmc_price as p on p.id = bs.price_id
31 32
     </sql>
32 33
 
@@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
37 38
             <if test="priceId != null "> and bs.price_id = #{priceId}</if>
38 39
             <if test="workload != null "> and bs.workload = #{workload}</if>
39 40
             <if test="coefficient != null "> and bs.coefficient = #{coefficient}</if>
41
+            <if test="groundType != null and groundType != ''"> and bs.ground_type = #{groundType}</if>
40 42
             <if test="settle != null "> and bs.settle = #{settle}</if>
41 43
         </where>
42 44
     </select>
@@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
54 56
             <if test="priceId != null">price_id,</if>
55 57
             <if test="workload != null">workload,</if>
56 58
             <if test="coefficient != null">coefficient,</if>
59
+            <if test="groundType != null">ground_type,</if>
57 60
             <if test="settle != null">settle,</if>
58 61
          </trim>
59 62
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
62 65
             <if test="priceId != null">#{priceId},</if>
63 66
             <if test="workload != null">#{workload},</if>
64 67
             <if test="coefficient != null">#{coefficient},</if>
68
+            <if test="groundType != null">#{groundType},</if>
65 69
             <if test="settle != null">#{settle},</if>
66 70
          </trim>
67 71
     </insert>
@@ -73,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
73 77
             <if test="priceId != null">price_id = #{priceId},</if>
74 78
             <if test="workload != null">workload = #{workload},</if>
75 79
             <if test="coefficient != null">coefficient = #{coefficient},</if>
80
+            <if test="groundType != null">ground_type = #{groundType},</if>
76 81
             <if test="settle != null">settle = #{settle},</if>
77 82
         </trim>
78 83
         where budget_settle_id = #{budgetSettleId}

+ 30
- 15
oa-ui/src/views/flowable/form/carForm.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-03-27 16:47:27
5
+ * @LastEditTime: 2024-04-09 14:17:41
6 6
 -->
7 7
 
8 8
 <template>
@@ -35,7 +35,11 @@
35 35
                   </el-form-item>
36 36
                 </el-col>
37 37
               </el-row>
38
-              <el-form-item label="项目编号:" prop="projectId" v-if="taskForm.procDefName == '用车审批'">
38
+              <el-radio-group v-model="isUnion" v-if="taskName == '用车申请'">
39
+                <el-radio-button label="工会用车"></el-radio-button>
40
+                <el-radio-button label="非工会用车"></el-radio-button>
41
+              </el-radio-group>
42
+              <el-form-item label="项目编号:" prop="projectId">
39 43
                 <el-select v-model="form.projectId" filterable placeholder="请选择" @change="handleSelectProject"
40 44
                   :disabled="taskName != '用车申请'" clearable>
41 45
                   <el-option v-for="item in projectList" :key="item.value" :label="item.projectNumber"
@@ -47,7 +51,8 @@
47 51
                   }}</el-descriptions-item>
48 52
                   <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
49 53
                   }}</el-descriptions-item>
50
-                  <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ? chooseProject.projectLeaderUser.nickName : ''
54
+                  <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser ?
55
+                    chooseProject.projectLeaderUser.nickName : ''
51 56
                   }}</el-descriptions-item>
52 57
                   <el-descriptions-item label="承担部门" label-class-name="my-label">
53 58
                     <el-tag size="small">{{ chooseProject.undertakingDeptName }}</el-tag>
@@ -87,28 +92,31 @@
87 92
               </el-row>
88 93
               <el-divider></el-divider>
89 94
               <!-- 部门审核意见 -->
90
-              <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px" v-if="taskForm.procDefName == '用车审批'">
95
+              <el-form-item label="部门审核意见:" prop="deptComment" label-width="120px" v-if="form.dept.deptId > 102">
91 96
                 <el-input type="textarea" :rows="2" placeholder="请输入部门审核意见" v-model="form.deptComment"
92 97
                   :disabled="taskName != '部门审核'">
93 98
                 </el-input>
94 99
               </el-form-item>
95 100
               <!-- 分管审核意见 -->
96
-              <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px"
97
-                v-if="taskForm.procDefName == '用车审批'">
101
+              <el-form-item label="分管审核意见:" prop="managerComment" label-width="120px" v-if="form.dept.deptId > 102">
98 102
                 <el-input type="textarea" :rows="2" placeholder="请输入分管审核意见" v-model="form.managerComment"
99 103
                   :disabled="taskName != '分管审核'">
100 104
                 </el-input>
101 105
               </el-form-item>
102 106
               <!-- 工会审核意见 -->
103
-              <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px"
104
-                v-if="taskForm.procDefName == '用车审批(工会)'">
107
+              <el-form-item label="工会审核意见:" prop="unionComment" label-width="120px" v-if="form.dept.deptId == 0">
105 108
                 <el-input type="textarea" :rows="2" placeholder="请输入工会审核意见" v-model="form.unionComment"
106 109
                   :disabled="taskName != '工会审核'">
107 110
                 </el-input>
108 111
               </el-form-item>
112
+              <!-- 总经理审核意见 -->
113
+              <el-form-item label="总经理审核意见" prop="gmComment" label-width="120px" v-if="form.dept.deptId == 102">
114
+                <el-input type="textarea" :rows="2" placeholder="请输入总经理审核意见" v-model="form.gmComment"
115
+                  :disabled="taskName != '总经理审核'">
116
+                </el-input>
117
+              </el-form-item>
109 118
               <!-- 安排用车意见 -->
110
-              <el-form-item label="安排用车意见:" prop="dispatchComment" label-width="120px"
111
-                v-if="taskForm.procDefName == '用车审批'">
119
+              <el-form-item label="安排用车意见:" prop="dispatchComment" label-width="120px">
112 120
                 <el-input type="textarea" :rows="2" placeholder="请输入安排用车意见" v-model="form.dispatchComment"
113 121
                   :disabled="taskName != '安排用车'">
114 122
                 </el-input>
@@ -179,6 +187,8 @@ export default {
179 187
   },
180 188
   created() {
181 189
     this.form.user.nickName = this.$store.getters.name;
190
+    this.form.dept.deptId = this.$store.getters.deptId;
191
+    console.log(this.form.dept.deptId)
182 192
     this.form.dept.deptName = this.$store.getters.deptName;
183 193
     this.getProjectList();
184 194
     this.getCarList();
@@ -196,6 +206,7 @@ export default {
196 206
           nickName: '',
197 207
         },
198 208
         dept: {
209
+          deptId: '',
199 210
           deptName: '',
200 211
         },
201 212
         applyDate: undefined,
@@ -224,6 +235,7 @@ export default {
224 235
       driverList: [],
225 236
       chooseProject: {},
226 237
       isSelect: false,
238
+      isUnion: '非工会用车',
227 239
       formTotal: 0,
228 240
       flowData: {}
229 241
     }
@@ -235,11 +247,11 @@ export default {
235 247
     // 初始化表单
236 248
     initForm() {
237 249
       getCarApproval(this.taskForm.formId).then(res => {
238
-        console.log(res.data)
239 250
         if (this.isEmptyObject(res.data)) {
240 251
           this.formTotal = 0;
241 252
           this.form.user.nickName = this.$store.getters.name;
242 253
           this.form.applier = this.$store.getters.userId;
254
+          this.form.dept.deptId = this.$store.getters.deptId;
243 255
           this.form.dept.deptName = this.$store.getters.deptName;
244 256
           this.form.applyDate = new Date();
245 257
         }
@@ -316,9 +328,11 @@ export default {
316 328
       if (this.taskName == '用车申请') {
317 329
         getUsersDeptLeader({ userId: this.$store.getters.userId }).then(res => {
318 330
           let userId = res.data.userId;
319
-          if (this.taskForm.procDefName == '用车审批') {
320
-            this.$set(this.taskForm.variables, "approval", userId);
321
-          }
331
+          if (this.isUnion == '非工会用车')
332
+            this.$set(this.taskForm.variables, "dept", this.form.dept.deptId);
333
+          else
334
+            this.$set(this.taskForm.variables, "dept", 0);
335
+          this.$set(this.taskForm.variables, "approval", userId);
322 336
           complete(this.taskForm).then(response => {
323 337
             this.$modal.msgSuccess(response.msg);
324 338
             this.$emit('goBack')
@@ -430,4 +444,5 @@ export default {
430 444
 
431 445
 ::v-deep .el-textarea.is-disabled .el-textarea__inner {
432 446
   color: #121212 !important;
433
-}</style>
447
+}
448
+</style>

正在加载...
取消
保存