浏览代码

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

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

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

37
     @Excel(name = "系数")
37
     @Excel(name = "系数")
38
     private Long coefficient;
38
     private Long coefficient;
39
 
39
 
40
+    /** 地类 */
41
+    @Excel(name = "地类")
42
+    private String groundType;
43
+
40
     /** 结算金额 */
44
     /** 结算金额 */
41
     @Excel(name = "结算金额")
45
     @Excel(name = "结算金额")
42
     private BigDecimal settle;
46
     private BigDecimal settle;
95
     {
99
     {
96
         return coefficient;
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
     public void setSettle(BigDecimal settle) 
111
     public void setSettle(BigDecimal settle) 
99
     {
112
     {
100
         this.settle = settle;
113
         this.settle = settle;
113
             .append("priceId", getPriceId())
126
             .append("priceId", getPriceId())
114
             .append("workload", getWorkload())
127
             .append("workload", getWorkload())
115
             .append("coefficient", getCoefficient())
128
             .append("coefficient", getCoefficient())
129
+            .append("groundType", getGroundType())
116
             .append("settle", getSettle())
130
             .append("settle", getSettle())
117
             .toString();
131
             .toString();
118
     }
132
     }

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

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

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

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

正在加载...
取消
保存