Bladeren bron

修改委外主键id

lamphua 6 maanden geleden
bovenliggende
commit
e3b5864e96

+ 6
- 6
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcOutsourceController.java Bestand weergeven

@@ -69,10 +69,10 @@ public class CmcOutsourceController extends BaseController
69 69
     /**
70 70
      * 获取项目委外详细信息
71 71
      */
72
-    @GetMapping(value = "/{outsoureId}")
73
-    public AjaxResult getInfo(@PathVariable("outsoureId") String outsoureId)
72
+    @GetMapping(value = "/{outsourceId}")
73
+    public AjaxResult getInfo(@PathVariable("outsourceId") String outsourceId)
74 74
     {
75
-        return success(cmcOutsourceService.selectCmcOutsourceByOutsoureId(outsoureId));
75
+        return success(cmcOutsourceService.selectCmcOutsourceByOutsourceId(outsourceId));
76 76
     }
77 77
 
78 78
     /**
@@ -99,10 +99,10 @@ public class CmcOutsourceController extends BaseController
99 99
      * 删除项目委外
100 100
      */
101 101
     @Log(title = "项目委外", businessType = BusinessType.DELETE)
102
-	@DeleteMapping("/{outsoureIds}")
103
-    public AjaxResult remove(@PathVariable String[] outsoureIds)
102
+	@DeleteMapping("/{outsourceIds}")
103
+    public AjaxResult remove(@PathVariable String[] outsourceIds)
104 104
     {
105
-        return toAjax(cmcOutsourceService.deleteCmcOutsourceByOutsoureIds(outsoureIds));
105
+        return toAjax(cmcOutsourceService.deleteCmcOutsourceByOutsourceIds(outsourceIds));
106 106
     }
107 107
 
108 108
     public void partnerIdToName(CmcOutsource cmcOutsource) {

+ 1
- 1
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java Bestand weergeven

@@ -1637,7 +1637,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
1637 1637
             projectId = cmcDeposit != null ? cmcDeposit.getTenderId().toString() : "";
1638 1638
         }
1639 1639
         if (flowTaskDto.getProcDefName().equals("项目委外")) {
1640
-            CmcOutsource cmcOutsource = cmcOutsourceService.selectCmcOutsourceByOutsoureId(formId);
1640
+            CmcOutsource cmcOutsource = cmcOutsourceService.selectCmcOutsourceByOutsourceId(formId);
1641 1641
             projectId = cmcOutsource != null ? cmcOutsource.getProjectId() : "";
1642 1642
             if (projectId == null)
1643 1643
                 flowTaskDto.setTitle(cmcOutsource.getApplyReason());

+ 6
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcOutsource.java Bestand weergeven

@@ -20,7 +20,7 @@ public class CmcOutsource extends BaseEntity
20 20
     private static final long serialVersionUID = 1L;
21 21
 
22 22
     /** 委外id */
23
-    private String outsoureId;
23
+    private String outsourceId;
24 24
 
25 25
     /** 项目id */
26 26
     @Excel(name = "项目id")
@@ -92,14 +92,14 @@ public class CmcOutsource extends BaseEntity
92 92
 
93 93
     private SysDept dept;
94 94
 
95
-    public void setOutsoureId(String outsoureId) 
95
+    public void setOutsourceId(String outsourceId) 
96 96
     {
97
-        this.outsoureId = outsoureId;
97
+        this.outsourceId = outsourceId;
98 98
     }
99 99
 
100
-    public String getOutsoureId() 
100
+    public String getOutsourceId() 
101 101
     {
102
-        return outsoureId;
102
+        return outsourceId;
103 103
     }
104 104
     public void setApplyReason(String applyReason) 
105 105
     {
@@ -273,7 +273,7 @@ public class CmcOutsource extends BaseEntity
273 273
     @Override
274 274
     public String toString() {
275 275
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
276
-            .append("outsoureId", getOutsoureId())
276
+            .append("outsourceId", getOutsourceId())
277 277
             .append("applyReason", getApplyReason())
278 278
             .append("projectId", getProjectId())
279 279
             .append("partnerId", getPartnerId())

+ 6
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcOutsourceMapper.java Bestand weergeven

@@ -14,10 +14,10 @@ public interface CmcOutsourceMapper
14 14
     /**
15 15
      * 查询项目委外
16 16
      * 
17
-     * @param outsoureId 项目委外主键
17
+     * @param outsourceId 项目委外主键
18 18
      * @return 项目委外
19 19
      */
20
-    public CmcOutsource selectCmcOutsourceByOutsoureId(String outsoureId);
20
+    public CmcOutsource selectCmcOutsourceByOutsourceId(String outsourceId);
21 21
 
22 22
     /**
23 23
      * 查询项目委外列表
@@ -46,16 +46,16 @@ public interface CmcOutsourceMapper
46 46
     /**
47 47
      * 删除项目委外
48 48
      * 
49
-     * @param outsoureId 项目委外主键
49
+     * @param outsourceId 项目委外主键
50 50
      * @return 结果
51 51
      */
52
-    public int deleteCmcOutsourceByOutsoureId(String outsoureId);
52
+    public int deleteCmcOutsourceByOutsourceId(String outsourceId);
53 53
 
54 54
     /**
55 55
      * 批量删除项目委外
56 56
      * 
57
-     * @param outsoureIds 需要删除的数据主键集合
57
+     * @param outsourceIds 需要删除的数据主键集合
58 58
      * @return 结果
59 59
      */
60
-    public int deleteCmcOutsourceByOutsoureIds(String[] outsoureIds);
60
+    public int deleteCmcOutsourceByOutsourceIds(String[] outsourceIds);
61 61
 }

+ 6
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcOutsourceService.java Bestand weergeven

@@ -14,10 +14,10 @@ public interface ICmcOutsourceService
14 14
     /**
15 15
      * 查询项目委外
16 16
      * 
17
-     * @param outsoureId 项目委外主键
17
+     * @param outsourceId 项目委外主键
18 18
      * @return 项目委外
19 19
      */
20
-    public CmcOutsource selectCmcOutsourceByOutsoureId(String outsoureId);
20
+    public CmcOutsource selectCmcOutsourceByOutsourceId(String outsourceId);
21 21
 
22 22
     /**
23 23
      * 查询项目委外列表
@@ -46,16 +46,16 @@ public interface ICmcOutsourceService
46 46
     /**
47 47
      * 批量删除项目委外
48 48
      * 
49
-     * @param outsoureIds 需要删除的项目委外主键集合
49
+     * @param outsourceIds 需要删除的项目委外主键集合
50 50
      * @return 结果
51 51
      */
52
-    public int deleteCmcOutsourceByOutsoureIds(String[] outsoureIds);
52
+    public int deleteCmcOutsourceByOutsourceIds(String[] outsourceIds);
53 53
 
54 54
     /**
55 55
      * 删除项目委外信息
56 56
      * 
57
-     * @param outsoureId 项目委外主键
57
+     * @param outsourceId 项目委外主键
58 58
      * @return 结果
59 59
      */
60
-    public int deleteCmcOutsourceByOutsoureId(String outsoureId);
60
+    public int deleteCmcOutsourceByOutsourceId(String outsourceId);
61 61
 }

+ 9
- 9
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcOutsourceServiceImpl.java Bestand weergeven

@@ -22,13 +22,13 @@ public class CmcOutsourceServiceImpl implements ICmcOutsourceService
22 22
     /**
23 23
      * 查询项目委外
24 24
      * 
25
-     * @param outsoureId 项目委外主键
25
+     * @param outsourceId 项目委外主键
26 26
      * @return 项目委外
27 27
      */
28 28
     @Override
29
-    public CmcOutsource selectCmcOutsourceByOutsoureId(String outsoureId)
29
+    public CmcOutsource selectCmcOutsourceByOutsourceId(String outsourceId)
30 30
     {
31
-        return cmcOutsourceMapper.selectCmcOutsourceByOutsoureId(outsoureId);
31
+        return cmcOutsourceMapper.selectCmcOutsourceByOutsourceId(outsourceId);
32 32
     }
33 33
 
34 34
     /**
@@ -70,24 +70,24 @@ public class CmcOutsourceServiceImpl implements ICmcOutsourceService
70 70
     /**
71 71
      * 批量删除项目委外
72 72
      * 
73
-     * @param outsoureIds 需要删除的项目委外主键
73
+     * @param outsourceIds 需要删除的项目委外主键
74 74
      * @return 结果
75 75
      */
76 76
     @Override
77
-    public int deleteCmcOutsourceByOutsoureIds(String[] outsoureIds)
77
+    public int deleteCmcOutsourceByOutsourceIds(String[] outsourceIds)
78 78
     {
79
-        return cmcOutsourceMapper.deleteCmcOutsourceByOutsoureIds(outsoureIds);
79
+        return cmcOutsourceMapper.deleteCmcOutsourceByOutsourceIds(outsourceIds);
80 80
     }
81 81
 
82 82
     /**
83 83
      * 删除项目委外信息
84 84
      * 
85
-     * @param outsoureId 项目委外主键
85
+     * @param outsourceId 项目委外主键
86 86
      * @return 结果
87 87
      */
88 88
     @Override
89
-    public int deleteCmcOutsourceByOutsoureId(String outsoureId)
89
+    public int deleteCmcOutsourceByOutsourceId(String outsourceId)
90 90
     {
91
-        return cmcOutsourceMapper.deleteCmcOutsourceByOutsoureId(outsoureId);
91
+        return cmcOutsourceMapper.deleteCmcOutsourceByOutsourceId(outsourceId);
92 92
     }
93 93
 }

+ 13
- 13
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcOutsourceMapper.xml Bestand weergeven

@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
5 5
 <mapper namespace="com.ruoyi.oa.mapper.CmcOutsourceMapper">
6 6
     
7 7
     <resultMap type="CmcOutsource" id="CmcOutsourceResult">
8
-        <result property="outsoureId"    column="outsoure_id"    />
8
+        <result property="outsourceId"    column="outsource_id"    />
9 9
         <result property="applyReason"    column="apply_reason"    />
10 10
         <result property="projectId"    column="project_id"    />
11 11
         <result property="partnerId"    column="partner_id"    />
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
52 52
     </resultMap>
53 53
 
54 54
     <sql id="selectCmcOutsourceVo">
55
-        select o.outsoure_id, o.apply_reason, o.project_id, p.project_number, p.project_name, o.partner_id, o.applier, u.nick_name as applier_nick_name,
55
+        select o.outsource_id, o.apply_reason, o.project_id, p.project_number, p.project_name, o.partner_id, o.applier, u.nick_name as applier_nick_name,
56 56
                o.apply_dept, d.dept_name, o.apply_time, o.manager_user_id, u1.nick_name as manager_nick_name, o.manager_comment, o.manager_time,
57 57
                o.zjl_user_id, u2.nick_name as zjl_nick_name, o.zjl_comment, o.zjl_time from cmc_outsource as o
58 58
         left join cmc_project as p on o.project_id = p.project_id
@@ -80,15 +80,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
80 80
         </where>
81 81
     </select>
82 82
     
83
-    <select id="selectCmcOutsourceByOutsoureId" parameterType="String" resultMap="CmcOutsourceResult">
83
+    <select id="selectCmcOutsourceByOutsourceId" parameterType="String" resultMap="CmcOutsourceResult">
84 84
         <include refid="selectCmcOutsourceVo"/>
85
-        where o.outsoure_id = #{outsoureId}
85
+        where o.outsource_id = #{outsourceId}
86 86
     </select>
87 87
         
88 88
     <insert id="insertCmcOutsource" parameterType="CmcOutsource">
89 89
         insert into cmc_outsource
90 90
         <trim prefix="(" suffix=")" suffixOverrides=",">
91
-            <if test="outsoureId != null">outsoure_id,</if>
91
+            <if test="outsourceId != null">outsource_id,</if>
92 92
             <if test="applyReason != null">apply_reason,</if>
93 93
             <if test="projectId != null">project_id,</if>
94 94
             <if test="partnerId != null">partner_id,</if>
@@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
103 103
             <if test="zjlTime != null">zjl_time,</if>
104 104
          </trim>
105 105
         <trim prefix="values (" suffix=")" suffixOverrides=",">
106
-            <if test="outsoureId != null">#{outsoureId},</if>
106
+            <if test="outsourceId != null">#{outsourceId},</if>
107 107
             <if test="applyReason != null">#{applyReason},</if>
108 108
             <if test="projectId != null">#{projectId},</if>
109 109
             <if test="partnerId != null">#{partnerId},</if>
@@ -135,17 +135,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
135 135
             <if test="zjlComment != null">zjl_comment = #{zjlComment},</if>
136 136
             <if test="zjlTime != null">zjl_time = #{zjlTime},</if>
137 137
         </trim>
138
-        where outsoure_id = #{outsoureId}
138
+        where outsource_id = #{outsourceId}
139 139
     </update>
140 140
 
141
-    <delete id="deleteCmcOutsourceByOutsoureId" parameterType="String">
142
-        delete from cmc_outsource where outsoure_id = #{outsoureId}
141
+    <delete id="deleteCmcOutsourceByOutsourceId" parameterType="String">
142
+        delete from cmc_outsource where outsource_id = #{outsourceId}
143 143
     </delete>
144 144
 
145
-    <delete id="deleteCmcOutsourceByOutsoureIds" parameterType="String">
146
-        delete from cmc_outsource where outsoure_id in 
147
-        <foreach item="outsoureId" collection="array" open="(" separator="," close=")">
148
-            #{outsoureId}
145
+    <delete id="deleteCmcOutsourceByOutsourceIds" parameterType="String">
146
+        delete from cmc_outsource where outsource_id in 
147
+        <foreach item="outsourceId" collection="array" open="(" separator="," close=")">
148
+            #{outsourceId}
149 149
         </foreach>
150 150
     </delete>
151 151
 </mapper>

+ 4
- 4
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcPerformanceMapper.xml Bestand weergeven

@@ -49,10 +49,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
49 49
         select p.performance_id, p.reporter, u.nick_name as report_nick_name, p.document, p.remark, p.report_time, p.report_dept, d.dept_name,
50 50
                p.manager_user_id, u1.nick_name as manager_nick_name,p.manager_comment, p.manager_time, p.zjl_user_id, u2.nick_name as zjl_nick_name,
51 51
                p.zjl_comment, p.zjl_time, p.zh_user_id, p.zh_time from cmc_performance as p
52
-        left join sys_user as u on u.user_id = o.reporter
53
-        left join sys_user as u1 on u1.user_id = o.manager_user_id
54
-        left join sys_user as u2 on u2.user_id = o.zjl_user_id
55
-        left join sys_dept as d on d.dept_id = o.apply_dept
52
+        left join sys_user as u on u.user_id = p.reporter
53
+        left join sys_user as u1 on u1.user_id = p.manager_user_id
54
+        left join sys_user as u2 on u2.user_id = p.zjl_user_id
55
+        left join sys_dept as d on d.dept_id = p.report_dept
56 56
     </sql>
57 57
 
58 58
     <select id="selectCmcPerformanceList" parameterType="CmcPerformance" resultMap="CmcPerformanceResult">

+ 4
- 4
oa-ui/src/api/oa/outsource/outsource.js Bestand weergeven

@@ -10,9 +10,9 @@ export function listOutsource(query) {
10 10
 }
11 11
 
12 12
 // 查询项目委外详细
13
-export function getOutsource(outsoureId) {
13
+export function getOutsource(outsourceId) {
14 14
   return request({
15
-    url: '/oa/outsource/' + outsoureId,
15
+    url: '/oa/outsource/' + outsourceId,
16 16
     method: 'get'
17 17
   })
18 18
 }
@@ -36,9 +36,9 @@ export function updateOutsource(data) {
36 36
 }
37 37
 
38 38
 // 删除项目委外
39
-export function delOutsource(outsoureId) {
39
+export function delOutsource(outsourceId) {
40 40
   return request({
41
-    url: '/oa/outsource/' + outsoureId,
41
+    url: '/oa/outsource/' + outsourceId,
42 42
     method: 'delete'
43 43
   })
44 44
 }

+ 6
- 6
oa-ui/src/views/flowable/form/outsource/outsourceForm.vue Bestand weergeven

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-09-20 16:09:07
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-24 10:38:33
5
+ * @LastEditTime: 2024-09-24 14:56:45
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -61,7 +61,7 @@
61 61
           </el-form-item>
62 62
           <el-form-item label="委外工作计划:">
63 63
             <outsource-plan ref="planRef" :taskForm="taskForm" :taskName="taskName"
64
-              :outsoureId="outsoureId"></outsource-plan>
64
+              :outsourceId="outsourceId"></outsource-plan>
65 65
           </el-form-item>
66 66
           <el-form-item label="分管审核意见:" prop="managerComment" label-width="130px">
67 67
             <el-input type="textarea" v-model="form.managerComment" :autosize="{ minRows: 4 }"
@@ -153,7 +153,7 @@ export default {
153 153
       prOpen: false,
154 154
       partOpen: false,
155 155
       formTotal: 0,
156
-      outsoureId: ''
156
+      outsourceId: ''
157 157
     }
158 158
   },
159 159
   created() {
@@ -170,7 +170,7 @@ export default {
170 170
     },
171 171
     initForm() {
172 172
       const formId = this.taskForm.formId;
173
-      this.outsoureId = formId;
173
+      this.outsourceId = formId;
174 174
       getOutsource(formId).then(res => {
175 175
         if (res.data) {
176 176
           this.formTotal = 1
@@ -212,7 +212,7 @@ export default {
212 212
         }
213 213
         await updateOutsource(this.form)
214 214
       } else {
215
-        this.form.outsoureId = this.taskForm.formId;
215
+        this.form.outsourceId = this.taskForm.formId;
216 216
         await addOutsource(this.form)
217 217
       }
218 218
       this.savePlan()
@@ -222,7 +222,7 @@ export default {
222 222
       const planList = this.$refs.planRef.workList;
223 223
       const isAdd = this.$refs.planRef.formTotal;
224 224
       const outsourceId = this.taskForm.formId;
225
-      if (isAdd)
225
+      if (isAdd != 0)
226 226
         await delOutsourceWork(outsourceId)
227 227
       for (let plan of planList) {
228 228
         plan.outsourceId = outsourceId

+ 3
- 3
oa-ui/src/views/flowable/form/outsource/outsourcePlan.vue Bestand weergeven

@@ -109,7 +109,7 @@ export default {
109 109
       type: String,
110 110
       required: true
111 111
     },
112
-    outsoureId: {
112
+    outsourceId: {
113 113
       type: String,
114 114
       default: ''
115 115
     }
@@ -134,8 +134,8 @@ export default {
134 134
   },
135 135
   methods: {
136 136
     initTable() {
137
-      if (!this.outsoureId) return
138
-      listOutsourceWork({ pageNum: 1, pageSize: 100, outsourceId: this.outsoureId }).then(res => {
137
+      if (!this.outsourceId) return
138
+      listOutsourceWork({ pageNum: 1, pageSize: 100, outsourceId: this.outsourceId }).then(res => {
139 139
         if (res.rows.length > 0) {
140 140
           this.formTotal = 1;
141 141
           this.workList = res.rows;

+ 2
- 1
oa-ui/src/views/flowable/form/procure/procureForm.vue Bestand weergeven

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-09-19 13:45:43
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-24 11:44:34
5
+ * @LastEditTime: 2024-09-24 15:16:51
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -178,6 +178,7 @@ export default {
178 178
     },
179 179
     // 保存表单
180 180
     async saves() {
181
+      console.log(this.formTotal);
181 182
       if (this.formTotal != 0) {
182 183
         if (this.taskName == '编制计划') {
183 184
           this.form.planUserId = this.$refs.zhRef.localSignatureUserId;

+ 10
- 10
oa-ui/src/views/oa/outsource/index.vue Bestand weergeven

@@ -45,7 +45,7 @@
45 45
 
46 46
     <el-table v-loading="loading" :data="outsourceList" @selection-change="handleSelectionChange">
47 47
       <el-table-column type="selection" width="55" align="center" />
48
-      <!-- <el-table-column label="委外id" align="center" prop="outsoureId" /> -->
48
+      <!-- <el-table-column label="委外id" align="center" prop="outsourceId" /> -->
49 49
       <el-table-column label="委外说明" align="center" prop="applyReason" />      
50 50
       <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
51 51
       <el-table-column label="项目名称" align="center" prop="project.projectName" width="200px" />
@@ -182,7 +182,7 @@ export default {
182 182
     // 表单重置
183 183
     reset() {
184 184
       this.form = {
185
-        outsoureId: null,
185
+        outsourceId: null,
186 186
         applyReason: null,
187 187
         projectId: null,
188 188
         partnerId: null,
@@ -210,7 +210,7 @@ export default {
210 210
     },
211 211
     // 多选框选中数据
212 212
     handleSelectionChange(selection) {
213
-      this.ids = selection.map(item => item.outsoureId)
213
+      this.ids = selection.map(item => item.outsourceId)
214 214
       this.single = selection.length!==1
215 215
       this.multiple = !selection.length
216 216
     },
@@ -223,8 +223,8 @@ export default {
223 223
     /** 修改按钮操作 */
224 224
     handleUpdate(row) {
225 225
       this.reset();
226
-      const outsoureId = row.outsoureId || this.ids
227
-      getOutsource(outsoureId).then(response => {
226
+      const outsourceId = row.outsourceId || this.ids
227
+      getOutsource(outsourceId).then(response => {
228 228
         this.form = response.data;
229 229
         this.open = true;
230 230
         this.title = "修改项目委外";
@@ -232,13 +232,13 @@ export default {
232 232
     },
233 233
     handleView(row) {
234 234
       this.open = true;
235
-      this.taskForm.formId = row.outsoureId;
235
+      this.taskForm.formId = row.outsourceId;
236 236
     },
237 237
     /** 提交按钮 */
238 238
     submitForm() {
239 239
       this.$refs["form"].validate(valid => {
240 240
         if (valid) {
241
-          if (this.form.outsoureId != null) {
241
+          if (this.form.outsourceId != null) {
242 242
             updateOutsource(this.form).then(response => {
243 243
               this.$modal.msgSuccess("修改成功");
244 244
               this.open = false;
@@ -256,9 +256,9 @@ export default {
256 256
     },
257 257
     /** 删除按钮操作 */
258 258
     handleDelete(row) {
259
-      const outsoureIds = row.outsoureId || this.ids;
260
-      this.$modal.confirm('是否确认删除项目委外编号为"' + outsoureIds + '"的数据项?').then(function() {
261
-        return delOutsource(outsoureIds);
259
+      const outsourceIds = row.outsourceId || this.ids;
260
+      this.$modal.confirm('是否确认删除项目委外编号为"' + outsourceIds + '"的数据项?').then(function() {
261
+        return delOutsource(outsourceIds);
262 262
       }).then(() => {
263 263
         this.getList();
264 264
         this.$modal.msgSuccess("删除成功");

+ 42
- 197
oa-ui/src/views/oa/performance/index.vue Bestand weergeven

@@ -2,85 +2,19 @@
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4 4
       <el-form-item label="上报人" prop="reporter">
5
-        <el-input
6
-          v-model="queryParams.reporter"
7
-          placeholder="请输入上报人"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="附件" prop="document">
13
-        <el-input
14
-          v-model="queryParams.document"
15
-          placeholder="请输入附件"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
19
-      </el-form-item>
20
-      <el-form-item label="上报日期" prop="reportTime">
21
-        <el-date-picker clearable
22
-          v-model="queryParams.reportTime"
23
-          type="date"
24
-          value-format="yyyy-MM-dd"
25
-          placeholder="请选择上报日期">
26
-        </el-date-picker>
27
-      </el-form-item>
28
-      <el-form-item label="分管审核人" prop="managerUserId">
29
-        <el-input
30
-          v-model="queryParams.managerUserId"
31
-          placeholder="请输入分管审核人"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
35
-      </el-form-item>
36
-      <el-form-item label="分管审核意见" prop="managerComment">
37
-        <el-input
38
-          v-model="queryParams.managerComment"
39
-          placeholder="请输入分管审核意见"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
43
-      </el-form-item>
44
-      <el-form-item label="分管审核时间" prop="managerTime">
45
-        <el-date-picker clearable
46
-          v-model="queryParams.managerTime"
47
-          type="date"
48
-          value-format="yyyy-MM-dd"
49
-          placeholder="请选择分管审核时间">
50
-        </el-date-picker>
51
-      </el-form-item>
52
-      <el-form-item label="总经理审批人" prop="zjlUserId">
53
-        <el-input
54
-          v-model="queryParams.zjlUserId"
55
-          placeholder="请输入总经理审批人"
56
-          clearable
57
-          @keyup.enter.native="handleQuery"
58
-        />
59
-      </el-form-item>
60
-      <el-form-item label="总经理审批意见" prop="zjlComment">
61
-        <el-input
62
-          v-model="queryParams.zjlComment"
63
-          placeholder="请输入总经理审批意见"
64
-          clearable
65
-          @keyup.enter.native="handleQuery"
66
-        />
67
-      </el-form-item>
68
-      <el-form-item label="总经理审批时间" prop="zjlTime">
69
-        <el-date-picker clearable
70
-          v-model="queryParams.zjlTime"
71
-          type="date"
72
-          value-format="yyyy-MM-dd"
73
-          placeholder="请选择总经理审批时间">
74
-        </el-date-picker>
75
-      </el-form-item>
76
-      <el-form-item label="人事管理员" prop="zhUserId">
77
-        <el-input
78
-          v-model="queryParams.zhUserId"
79
-          placeholder="请输入人事管理员"
80
-          clearable
81
-          @keyup.enter.native="handleQuery"
82
-        />
83
-      </el-form-item>
5
+        <el-select v-model="queryParams.reporter" filterable clearable @change="handleQuery">
6
+          <el-option v-for="item in $store.state.user.userList" :key="item.userId" :label="item.nickName"
7
+            :value="item.userId">
8
+          </el-option>
9
+        </el-select>
10
+      </el-form-item>    
11
+      <el-form-item label="上报部门" prop="reportDept">
12
+        <el-select v-model="queryParams.reportDept" filterable clearable @change="handleQuery">
13
+          <el-option v-for="item in $store.state.user.deptList" :key="item.deptId" :label="item.deptName"
14
+            :value="item.deptId">
15
+          </el-option>
16
+        </el-select>
17
+      </el-form-item>  
84 18
       <el-form-item label="制单日期" prop="zhTime">
85 19
         <el-date-picker clearable
86 20
           v-model="queryParams.zhTime"
@@ -96,38 +30,6 @@
96 30
     </el-form>
97 31
 
98 32
     <el-row :gutter="10" class="mb8">
99
-      <el-col :span="1.5">
100
-        <el-button
101
-          type="primary"
102
-          plain
103
-          icon="el-icon-plus"
104
-          size="mini"
105
-          @click="handleAdd"
106
-          v-hasPermi="['oa:performance:add']"
107
-        >新增</el-button>
108
-      </el-col>
109
-      <el-col :span="1.5">
110
-        <el-button
111
-          type="success"
112
-          plain
113
-          icon="el-icon-edit"
114
-          size="mini"
115
-          :disabled="single"
116
-          @click="handleUpdate"
117
-          v-hasPermi="['oa:performance:edit']"
118
-        >修改</el-button>
119
-      </el-col>
120
-      <el-col :span="1.5">
121
-        <el-button
122
-          type="danger"
123
-          plain
124
-          icon="el-icon-delete"
125
-          size="mini"
126
-          :disabled="multiple"
127
-          @click="handleDelete"
128
-          v-hasPermi="['oa:performance:remove']"
129
-        >删除</el-button>
130
-      </el-col>
131 33
       <el-col :span="1.5">
132 34
         <el-button
133 35
           type="warning"
@@ -143,29 +45,33 @@
143 45
 
144 46
     <el-table v-loading="loading" :data="performanceList" @selection-change="handleSelectionChange">
145 47
       <el-table-column type="selection" width="55" align="center" />
146
-      <el-table-column label="绩效审批id" align="center" prop="performanceId" />
147
-      <el-table-column label="上报人" align="center" prop="reporter" />
148
-      <el-table-column label="附件" align="center" prop="document" />
48
+      <!-- <el-table-column label="绩效审批id" align="center" prop="performanceId" /> -->
49
+      <el-table-column label="上报人" align="center" prop="reporter">
50
+        <template slot-scope="scope">
51
+          {{ getUserName(scope.row.reporter) }}
52
+        </template>
53
+      </el-table-column>
54
+      <!-- <el-table-column label="附件" align="center" prop="document" /> -->
149 55
       <el-table-column label="备注" align="center" prop="remark" />
150 56
       <el-table-column label="上报日期" align="center" prop="reportTime" width="180">
151 57
         <template slot-scope="scope">
152 58
           <span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d}') }}</span>
153 59
         </template>
154 60
       </el-table-column>
155
-      <el-table-column label="分管审核人" align="center" prop="managerUserId" />
61
+      <!-- <el-table-column label="分管审核人" align="center" prop="managerUserId" /> -->
156 62
       <el-table-column label="分管审核意见" align="center" prop="managerComment" />
157
-      <el-table-column label="分管审核时间" align="center" prop="managerTime" width="180">
63
+      <!-- <el-table-column label="分管审核时间" align="center" prop="managerTime" width="180">
158 64
         <template slot-scope="scope">
159 65
           <span>{{ parseTime(scope.row.managerTime, '{y}-{m}-{d}') }}</span>
160 66
         </template>
161 67
       </el-table-column>
162
-      <el-table-column label="总经理审批人" align="center" prop="zjlUserId" />
68
+      <el-table-column label="总经理审批人" align="center" prop="zjlUserId" /> -->
163 69
       <el-table-column label="总经理审批意见" align="center" prop="zjlComment" />
164
-      <el-table-column label="总经理审批时间" align="center" prop="zjlTime" width="180">
70
+      <!-- <el-table-column label="总经理审批时间" align="center" prop="zjlTime" width="180">
165 71
         <template slot-scope="scope">
166 72
           <span>{{ parseTime(scope.row.zjlTime, '{y}-{m}-{d}') }}</span>
167 73
         </template>
168
-      </el-table-column>
74
+      </el-table-column> -->
169 75
       <el-table-column label="人事管理员" align="center" prop="zhUserId" />
170 76
       <el-table-column label="制单日期" align="center" prop="zhTime" width="180">
171 77
         <template slot-scope="scope">
@@ -177,17 +83,10 @@
177 83
           <el-button
178 84
             size="mini"
179 85
             type="text"
180
-            icon="el-icon-edit"
181
-            @click="handleUpdate(scope.row)"
182
-            v-hasPermi="['oa:performance:edit']"
183
-          >修改</el-button>
184
-          <el-button
185
-            size="mini"
186
-            type="text"
187
-            icon="el-icon-delete"
188
-            @click="handleDelete(scope.row)"
189
-            v-hasPermi="['oa:performance:remove']"
190
-          >删除</el-button>
86
+            icon="el-icon-view"
87
+            @click="handleView(scope.row)"
88
+            v-hasPermi="['oa:performance:query']"
89
+          >查看</el-button>
191 90
         </template>
192 91
       </el-table-column>
193 92
     </el-table>
@@ -199,79 +98,18 @@
199 98
       :limit.sync="queryParams.pageSize"
200 99
       @pagination="getList"
201 100
     />
202
-
203
-    <!-- 添加或修改绩效审批对话框 -->
204
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
205
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
206
-        <el-form-item label="上报人" prop="reporter">
207
-          <el-input v-model="form.reporter" placeholder="请输入上报人" />
208
-        </el-form-item>
209
-        <el-form-item label="附件" prop="document">
210
-          <el-input v-model="form.document" placeholder="请输入附件" />
211
-        </el-form-item>
212
-        <el-form-item label="备注" prop="remark">
213
-          <el-input v-model="form.remark" placeholder="请输入备注" />
214
-        </el-form-item>
215
-        <el-form-item label="上报日期" prop="reportTime">
216
-          <el-date-picker clearable
217
-            v-model="form.reportTime"
218
-            type="date"
219
-            value-format="yyyy-MM-dd"
220
-            placeholder="请选择上报日期">
221
-          </el-date-picker>
222
-        </el-form-item>
223
-        <el-form-item label="分管审核人" prop="managerUserId">
224
-          <el-input v-model="form.managerUserId" placeholder="请输入分管审核人" />
225
-        </el-form-item>
226
-        <el-form-item label="分管审核意见" prop="managerComment">
227
-          <el-input v-model="form.managerComment" placeholder="请输入分管审核意见" />
228
-        </el-form-item>
229
-        <el-form-item label="分管审核时间" prop="managerTime">
230
-          <el-date-picker clearable
231
-            v-model="form.managerTime"
232
-            type="date"
233
-            value-format="yyyy-MM-dd"
234
-            placeholder="请选择分管审核时间">
235
-          </el-date-picker>
236
-        </el-form-item>
237
-        <el-form-item label="总经理审批人" prop="zjlUserId">
238
-          <el-input v-model="form.zjlUserId" placeholder="请输入总经理审批人" />
239
-        </el-form-item>
240
-        <el-form-item label="总经理审批意见" prop="zjlComment">
241
-          <el-input v-model="form.zjlComment" placeholder="请输入总经理审批意见" />
242
-        </el-form-item>
243
-        <el-form-item label="总经理审批时间" prop="zjlTime">
244
-          <el-date-picker clearable
245
-            v-model="form.zjlTime"
246
-            type="date"
247
-            value-format="yyyy-MM-dd"
248
-            placeholder="请选择总经理审批时间">
249
-          </el-date-picker>
250
-        </el-form-item>
251
-        <el-form-item label="人事管理员" prop="zhUserId">
252
-          <el-input v-model="form.zhUserId" placeholder="请输入人事管理员" />
253
-        </el-form-item>
254
-        <el-form-item label="制单日期" prop="zhTime">
255
-          <el-date-picker clearable
256
-            v-model="form.zhTime"
257
-            type="date"
258
-            value-format="yyyy-MM-dd"
259
-            placeholder="请选择制单日期">
260
-          </el-date-picker>
261
-        </el-form-item>
262
-      </el-form>
263
-      <div slot="footer" class="dialog-footer">
264
-        <el-button type="primary" @click="submitForm">确 定</el-button>
265
-        <el-button @click="cancel">取 消</el-button>
266
-      </div>
101
+    <el-dialog :title="title" :visible.sync="open" width="65%" append-to-body>
102
+      <performance-form :taskForm="taskForm" :taskName="''" :isFlow="false"></performance-form>
267 103
     </el-dialog>
268 104
   </div>
269 105
 </template>
270 106
 
271 107
 <script>
272 108
 import { listPerformance, getPerformance, delPerformance, addPerformance, updatePerformance } from "@/api/oa/performance/performance";
109
+import performanceForm from '../../flowable/form/performance/performanceForm.vue';
273 110
 
274
-export default {
111
+export default {  
112
+  components: { performanceForm },
275 113
   name: "Performance",
276 114
   data() {
277 115
     return {
@@ -313,7 +151,10 @@ export default {
313 151
       form: {},
314 152
       // 表单校验
315 153
       rules: {
316
-      }
154
+      },
155
+      taskForm: {
156
+        formId: ''
157
+      },
317 158
     };
318 159
   },
319 160
   created() {
@@ -385,6 +226,10 @@ export default {
385 226
         this.title = "修改绩效审批";
386 227
       });
387 228
     },
229
+    handleView(row) {
230
+      this.open = true;
231
+      this.taskForm.formId = row.performanceId;
232
+    },
388 233
     /** 提交按钮 */
389 234
     submitForm() {
390 235
       this.$refs["form"].validate(valid => {

Laden…
Annuleren
Opslaan