Browse Source

项目变更

lamphua 1 year ago
parent
commit
9facbf5995

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcProjectChange.java View File

@@ -18,7 +18,7 @@ public class CmcProjectChange extends BaseEntity
18 18
     private static final long serialVersionUID = 1L;
19 19
 
20 20
     /** 变更id */
21
-    private Long changeId;
21
+    private String changeId;
22 22
 
23 23
     /** 项目id */
24 24
     @Excel(name = "项目id")
@@ -37,12 +37,12 @@ public class CmcProjectChange extends BaseEntity
37 37
     @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
38 38
     private Date registerTime;
39 39
 
40
-    public void setChangeId(Long changeId) 
40
+    public void setChangeId(String changeId)
41 41
     {
42 42
         this.changeId = changeId;
43 43
     }
44 44
 
45
-    public Long getChangeId() 
45
+    public String getChangeId()
46 46
     {
47 47
         return changeId;
48 48
     }

+ 2
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectChangeMapper.xml View File

@@ -34,12 +34,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
34 34
     <insert id="insertCmcProjectChange" parameterType="CmcProjectChange" useGeneratedKeys="true" keyProperty="changeId">
35 35
         insert into cmc_project_change
36 36
         <trim prefix="(" suffix=")" suffixOverrides=",">
37
+            <if test="changeId != null">change_id,</if>
37 38
             <if test="projectId != null">project_id,</if>
38 39
             <if test="content != null">content,</if>
39 40
             <if test="registrant != null">registrant,</if>
40 41
             <if test="registerTime != null">register_time,</if>
41 42
          </trim>
42 43
         <trim prefix="values (" suffix=")" suffixOverrides=",">
44
+            <if test="changeId != null">#{changeId},</if>
43 45
             <if test="projectId != null">#{projectId},</if>
44 46
             <if test="content != null">#{content},</if>
45 47
             <if test="registrant != null">#{registrant},</if>

+ 2
- 2
oa-back/sql/sql.sql
File diff suppressed because it is too large
View File


+ 14
- 0
oa-ui/src/router/index.js View File

@@ -310,6 +310,20 @@ export const constantRoutes = [
310 310
       }
311 311
     ]
312 312
   },
313
+  {
314
+    path: '/applyForm/change',
315
+    component: Layout,
316
+    hidden: true,
317
+    children: [
318
+      {
319
+        path: '',
320
+        component: () => import('@/views/flowable/task/todo/applyForm/changeIndex'),
321
+        name: 'change',
322
+        meta: { title: '项目变更', icon: '' }
323
+
324
+      }
325
+    ]
326
+  },
313 327
   {
314 328
     path: '/project/info',
315 329
     component: Layout,

+ 1
- 1
oa-ui/src/views/flowable/form/archiveForm.vue View File

@@ -191,7 +191,7 @@ export default {
191 191
       required: true
192 192
     },
193 193
     isFlow: {
194
-      type: Object,
194
+      type: Boolean,
195 195
       default: true
196 196
     }
197 197
   },

+ 353
- 0
oa-ui/src/views/flowable/form/changeForm.vue View File

@@ -0,0 +1,353 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-row :gutter="20">
4
+      <el-col :span="18" :xs="24">
5
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
6
+          <el-form-item label="项目信息" prop="projectId">
7
+            <el-button type="primary" size="mini" @click="openProject = true" v-if="taskName == '变更登记'">选择项目</el-button>
8
+            <el-descriptions border v-if="isSelect" style="margin-top: 10px;" :column="2" direction="vertical">
9
+              <el-descriptions-item label="项目名称" label-class-name="my-label">{{ chooseProject.projectName
10
+              }}</el-descriptions-item>
11
+              <el-descriptions-item label="项目编号" label-class-name="my-label">{{ chooseProject.projectNumber
12
+              }}</el-descriptions-item>
13
+              <el-descriptions-item label="甲方单位" label-class-name="my-label">{{ chooseProject.partyA
14
+              }}</el-descriptions-item>
15
+              <el-descriptions-item label="项目类型" label-class-name="my-label">{{ chooseProject.projectType
16
+              }}</el-descriptions-item>
17
+              <el-descriptions-item label="承担部门" label-class-name="my-label">{{
18
+                chooseProject.undertakingDeptName
19
+              }}</el-descriptions-item>
20
+              <el-descriptions-item label="项目负责人" label-class-name="my-label">{{ chooseProject.projectLeaderUser
21
+                ? chooseProject.projectLeaderUser.nickName : ''
22
+              }}</el-descriptions-item>=
23
+            </el-descriptions>
24
+          </el-form-item>
25
+          <el-form-item label="变更内容">
26
+            <el-input type="textarea" :rows="10" v-model="form.content" :disabled="taskName != '项目登记'" />
27
+          </el-form-item>
28
+          <el-row>
29
+            <el-col :span="6" :xs="24" :offset="12">
30
+              <el-form-item label="签名:" label-width="120px">
31
+                <span class="auditor"> {{ registrantName }}
32
+                </span>
33
+              </el-form-item>
34
+            </el-col>
35
+            <el-col :span="6">
36
+              <el-form-item label="登记时间" label-width="120px">
37
+                <span> {{ parseTime(form.registerTime, '{y}-{m}-{d}') }} </span>
38
+              </el-form-item>
39
+            </el-col>
40
+          </el-row>
41
+        </el-form>
42
+        <div style="text-align: center;">
43
+          <el-button type="primary" @click="submitForm">确 定</el-button>
44
+          <el-button @click="cancel">取 消</el-button>
45
+        </div>
46
+      </el-col>
47
+      <el-col :span="6" :xs="24" v-if="isFlow">
48
+        <el-card>
49
+          <h2 style="text-align: center;">流程进度</h2>
50
+          <div>
51
+            <flow :flowData="flowData" />
52
+          </div>
53
+        </el-card>
54
+      </el-col>
55
+    </el-row>
56
+    <el-dialog title="选择项目" :visible.sync="openProject" width="70%" append-to-body>
57
+      <project-choose @chooseProject="confirmProject"></project-choose>
58
+    </el-dialog>
59
+  </div>
60
+</template>
61
+
62
+<script>
63
+import { listProjectChange, getProjectChange, delProjectChange, addProjectChange, updateProjectChange } from "@/api/oa/project/projectChange";
64
+import { getProject } from "@/api/oa/project/project";
65
+import { getUsersManageLeaderByDept, getUsersDeptLeaderByDept } from '@/api/system/post'
66
+import flow from '@/views/flowable/task/todo/detail/flow';
67
+import { complete, getNextFlowNode } from "@/api/flowable/todo";
68
+import { flowXmlAndNode } from "@/api/flowable/definition";
69
+import projectChoose from '@/views/flowable/form/components/chooseProject.vue';
70
+import { getDept } from "@/api/system/dept";
71
+
72
+export default {
73
+  components: {
74
+    projectChoose,
75
+    flow
76
+  },
77
+  props: {
78
+    taskName: {
79
+      type: String,
80
+      required: true
81
+    },
82
+    taskForm: {
83
+      type: Object,
84
+      required: true
85
+    },
86
+    isFlow: {
87
+      type: Boolean,
88
+      default: true
89
+    },
90
+  },
91
+  data() {
92
+    return {
93
+      // 遮罩层
94
+      loading: true,
95
+      // 选中数组
96
+      ids: [],
97
+      // 非单个禁用
98
+      single: true,
99
+      // 非多个禁用
100
+      multiple: true,
101
+      // 显示搜索条件
102
+      showSearch: true,
103
+      // 总条数
104
+      total: 0,
105
+      // cmc项目变更表格数据
106
+      projectChangeList: [],
107
+      leaderList: [],
108
+      undertakingDeptNameList: [],
109
+      // 弹出层标题
110
+      title: "",
111
+      // 是否显示弹出层
112
+      open: false,
113
+      openProject: false,
114
+      chooseProject: {},
115
+      isSelect: false,
116
+      // 查询参数
117
+      queryParams: {
118
+        pageNum: 1,
119
+        pageSize: 10,
120
+        projectId: null,
121
+        content: null,
122
+        registrant: null,
123
+        registerTime: null
124
+      },
125
+      // 表单参数
126
+      form: {
127
+        registerTime: undefined,
128
+      },
129
+      flowData: {},
130
+      formTotal: 0,
131
+      registrantName: '',
132
+      // 表单校验
133
+      rules: {
134
+      }
135
+    };
136
+  },
137
+  created() {
138
+    this.initForm();
139
+    this.getList();
140
+    if (this.$route.query.projectId) {
141
+      getProject(this.$route.query.projectId).then(res => {
142
+        if (res.data) {
143
+          this.$set(this.form, 'projectId', res.data.projectId)
144
+          this.handleSelectProject(res.data.projectId)
145
+        }
146
+      })
147
+    }
148
+    if (this.isFlow) {
149
+      flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
150
+        this.flowData = res.data;
151
+      })
152
+    }
153
+  },
154
+  methods: {
155
+    // 初始化表单
156
+    initForm() {
157
+      getProjectChange(this.taskForm.formId).then(res => {
158
+        if (this.isEmptyObject(res.data)) {
159
+          this.formTotal = 0;
160
+          this.form.registrant = this.$store.getters.userId;
161
+          this.registrantName = this.$store.getters.name;
162
+          this.form.registerTime = new Date();
163
+        }
164
+        else {
165
+          this.formTotal = 1;
166
+          this.form = res.data;
167
+          if (res.data.projectId) {
168
+            getProject(res.data.projectId).then(response => {
169
+              this.chooseProject = response.data;
170
+              this.isSelect = true;
171
+              if (this.form.undertakingDept) {
172
+                let arr = this.chooseProject.undertakingDept.split(',')
173
+                this.getDeptName(arr);
174
+              }
175
+            })
176
+          }
177
+          this.loading = false
178
+        }
179
+      })
180
+    },
181
+    /** 查询cmc项目变更列表 */
182
+    getList() {
183
+      this.loading = true;
184
+      listProjectChange(this.queryParams).then(response => {
185
+        this.projectChangeList = response.rows;
186
+        this.total = response.total;
187
+        this.loading = false;
188
+      });
189
+    },
190
+    isEmptyObject(obj) {
191
+      for (var key in obj) {
192
+        if (obj.hasOwnProperty(key)) {
193
+          return false;
194
+        }
195
+      }
196
+      return true;
197
+    },
198
+    // 选择项目
199
+    handleSelectProject(val) {
200
+      if (val != "" && val != undefined && val != null) {
201
+        getProject(val).then(response => {
202
+          this.chooseProject = response.data;
203
+          this.isSelect = true;
204
+          if (this.chooseProject.undertakingDept) {
205
+            let arr = this.chooseProject.undertakingDept.split(',')
206
+            this.getLeader(arr);
207
+            this.getDeptName(arr);
208
+          }
209
+        })
210
+      } else {
211
+        this.isSelect = false
212
+      }
213
+    },
214
+    confirmProject(val) {
215
+      if (val.length > 1) {
216
+        this.$message.error('请选择一个项目');
217
+        return
218
+      } else if (val.length == 1) {
219
+        this.chooseProject = val[0]
220
+        this.isSelect = true
221
+        this.form.projectId = val[0].projectId
222
+        if (this.chooseProject.undertakingDept) {
223
+          let arr = this.chooseProject.undertakingDept.split(',')
224
+          this.getLeader(arr);
225
+          this.getDeptName(arr);
226
+        }
227
+      }
228
+      this.openProject = false;
229
+    },
230
+    getLeader(val) {
231
+      for (let v of val) {
232
+        getUsersDeptLeaderByDept({ deptId: Number(v) }).then(res => {
233
+          this.leaderList.push(res.data.userId);
234
+        })
235
+        getUsersManageLeaderByDept({ deptId: Number(v) }).then(res => {
236
+          this.leaderList.push(res.data.userId);
237
+        })
238
+      }
239
+    },
240
+    getDeptName(val) {
241
+      for (let v of val) {
242
+        getDept(Number(v)).then(res => {
243
+          this.undertakingDeptNameList.push(res.data.deptName);
244
+          this.chooseProject.undertakingDeptName = this.undertakingDeptNameList.join(',')
245
+        })
246
+      }
247
+    },
248
+    // 取消按钮
249
+    cancel() {
250
+      this.open = false;
251
+      this.reset();
252
+    },
253
+    // 表单重置
254
+    reset() {
255
+      this.form = {
256
+        changeId: null,
257
+        projectId: null,
258
+        content: null,
259
+        registrant: null,
260
+        registerTime: null
261
+      };
262
+      this.resetForm("form");
263
+    },
264
+    /** 搜索按钮操作 */
265
+    handleQuery() {
266
+      this.queryParams.pageNum = 1;
267
+      this.getList();
268
+    },
269
+    /** 重置按钮操作 */
270
+    resetQuery() {
271
+      this.resetForm("queryForm");
272
+      this.handleQuery();
273
+    },
274
+    // 多选框选中数据
275
+    handleSelectionChange(selection) {
276
+      this.ids = selection.map(item => item.changeId)
277
+      this.single = selection.length !== 1
278
+      this.multiple = !selection.length
279
+    },
280
+    /** 新增按钮操作 */
281
+    handleAdd() {
282
+      this.reset();
283
+      this.open = true;
284
+      this.title = "添加cmc项目变更";
285
+    },
286
+    /** 修改按钮操作 */
287
+    handleUpdate(row) {
288
+      this.reset();
289
+      const changeId = row.changeId || this.ids
290
+      getProjectChange(changeId).then(response => {
291
+        this.form = response.data;
292
+        this.open = true;
293
+        this.title = "修改cmc项目变更";
294
+      });
295
+    },
296
+    /** 提交按钮 */
297
+    submitForm() {
298
+      this.$refs["form"].validate(valid => {
299
+        if (valid) {
300
+          if (this.formTotal != 0) {
301
+            updateProjectChange(this.form).then(response => {
302
+              this.$modal.msgSuccess("修改成功");
303
+              this.open = false;
304
+              this.getList();
305
+            });
306
+            const params = { taskId: this.taskForm.taskId };
307
+            getNextFlowNode(params).then(res => {
308
+              if (this.taskName == '变更登记') {
309
+                this.$set(this.taskForm.variables, "approvalList", this.leaderList);
310
+              }
311
+              complete(this.taskForm).then(response => {
312
+                this.$modal.msgSuccess(response.msg);
313
+                this.$emit('goBack')
314
+              });
315
+            })
316
+          } else {
317
+            this.form.changeId = this.taskForm.formId;
318
+            addProjectChange(this.form).then(response => {
319
+              this.$modal.msgSuccess("新增成功");
320
+              this.open = false;
321
+              this.getList();
322
+            });
323
+            const params = { taskId: this.taskForm.taskId };
324
+            getNextFlowNode(params).then(res => {
325
+              this.$set(this.taskForm.variables, "approvalList", this.leaderList);
326
+              complete(this.taskForm).then(response => {
327
+                this.$modal.msgSuccess(response.msg);
328
+                this.$emit('goBack')
329
+              });
330
+            })
331
+          }
332
+        }
333
+      });
334
+    },
335
+    /** 删除按钮操作 */
336
+    handleDelete(row) {
337
+      const changeIds = row.changeId || this.ids;
338
+      this.$modal.confirm('是否确认删除cmc项目变更编号为"' + changeIds + '"的数据项?').then(function () {
339
+        return delProjectChange(changeIds);
340
+      }).then(() => {
341
+        this.getList();
342
+        this.$modal.msgSuccess("删除成功");
343
+      }).catch(() => { });
344
+    },
345
+    /** 导出按钮操作 */
346
+    handleExport() {
347
+      this.download('oa/projectChange/export', {
348
+        ...this.queryParams
349
+      }, `projectChange_${new Date().getTime()}.xlsx`)
350
+    }
351
+  }
352
+};
353
+</script>

+ 5
- 1
oa-ui/src/views/flowable/form/components/detailDisplay.vue View File

@@ -38,6 +38,8 @@
38 38
       @goBack="goBack"></archive-form>
39 39
     <settle-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目结算'"
40 40
       @goBack="goBack"></settle-form>
41
+    <change-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目变更'"
42
+      @goBack="goBack"></change-form>
41 43
   </div>
42 44
 </template>
43 45
 
@@ -63,6 +65,7 @@ import depositForm from '@/views/flowable/form/finance/depositForm.vue';
63 65
 import borrowForm from '@/views/flowable/form/finance/borrowForm.vue';
64 66
 import archiveForm from '@/views/flowable/form/archiveForm.vue';
65 67
 import settleForm from '@/views/flowable/form/settleForm.vue';
68
+import changeForm from '@/views/flowable/form/changeForm.vue';
66 69
 export default {
67 70
   components: {
68 71
     ScTable,
@@ -85,7 +88,8 @@ export default {
85 88
     brandForm,
86 89
     depositForm,
87 90
     archiveForm,
88
-    settleForm
91
+    settleForm,
92
+    changeForm
89 93
   },
90 94
   props: {
91 95
     taskForm: {

+ 157
- 0
oa-ui/src/views/flowable/form/inProgress/changeData.vue View File

@@ -0,0 +1,157 @@
1
+<template>
2
+  <div class="mt20" style="width:99%">
3
+    <div class="nav-btn" v-if="taskName != ''">
4
+      <div>
5
+        <el-button class="mb20" type="primary" plain size="mini" icon="el-icon-plus" @click="addChange">变更记录</el-button>
6
+      </div>
7
+      <div>
8
+        <el-button icon="el-icon-refresh" circle size="mini" @click="getList()"></el-button>
9
+      </div>
10
+    </div>
11
+    <el-table :data="projectChangeList">
12
+      <el-table-column type="index" width="55" align="center" label="序号" />
13
+      <el-table-column label="变更id" align="center" prop="changeId" />
14
+      <el-table-column label="项目id" align="center" prop="projectId" />
15
+      <el-table-column label="变更内容" align="center" prop="content" />
16
+      <el-table-column label="登记人" align="center" prop="registrant" />
17
+      <el-table-column label="登记时间" align="center" prop="registerTime" width="180">
18
+        <template slot-scope="scope">
19
+          <span>{{ parseTime(scope.row.registerTime, '{y}-{m}-{d}') }}</span>
20
+        </template>
21
+      </el-table-column>
22
+      <el-table-column label="操作" fixed="right" header-align="center">
23
+        <template slot-scope="scope">
24
+          <el-button icon="el-icon-view" type="text" size="mini" @click="handleLook(scope.row)">查看明细</el-button>
25
+        </template>
26
+      </el-table-column>
27
+    </el-table>
28
+    
29
+    <el-dialog title=" 变更记录" :visible.sync="open" append-to-body width="65%">
30
+      <change-form :taskForm="openObj" :taskName="''" :isFlow="false"></change-form>
31
+      </el-dialog>
32
+  </div>
33
+</template>
34
+
35
+<script>
36
+import { listProjectChange } from "@/api/oa/project/projectChange";
37
+import { listDefinition } from "@/api/flowable/definition";
38
+import { getNextFlowNodeByStart } from "@/api/flowable/todo";
39
+import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
40
+import { todoList } from "@/api/flowable/todo";
41
+import changeForm from '../changeForm.vue';
42
+import { getProject } from "@/api/oa/project/project";
43
+import { MessageBox } from 'element-ui'
44
+import { Snowflake } from '@/utils/snowFlake.js'
45
+
46
+export default {
47
+  components: { changeForm },
48
+  props: {
49
+    taskForm: {
50
+      type: Object,
51
+      required: true
52
+    },
53
+    taskName: {
54
+      type: String,
55
+      default: ''
56
+    }
57
+  },
58
+  data() {
59
+    return {
60
+      // 是否显示弹出层
61
+      open: false,
62
+      openObj:{},
63
+      // 表单参数
64
+      form: {},
65
+      definitionList: [],
66
+      projectChangeList: [],
67
+    };
68
+  },
69
+  mounted() {
70
+    this.getList();
71
+    this.listDefinition();
72
+  },
73
+  methods: {
74
+    /** 查询cmc项目变更列表 */
75
+    getList() {
76
+      listProjectChange(this.queryParams).then(response => {
77
+        this.projectChangeList = response.rows;
78
+      });
79
+    },
80
+    listDefinition() {
81
+      listDefinition({
82
+        pageNum: 1,
83
+        pageSize: 9999,
84
+        name: '项目变更'
85
+      }).then(response => {
86
+        this.definitionList = response.data.records;
87
+      });
88
+    },
89
+    handleLook(row) {
90
+      this.form= row
91
+      this.openObj.formId = row.changeId
92
+      getProject(row.projectId).then(res=>{
93
+        if(res.data)
94
+          this.$set(this.form,'projectName',res.data.projectNumber + '-' + res.data.projectName)
95
+        this.open = true
96
+      })
97
+    },
98
+    addChange() {
99
+      let row = this.definitionList[0];
100
+      let formId = new Snowflake(1n, 1n, 0n).nextId().toString();
101
+      getNextFlowNodeByStart({ deploymentId: row.deploymentId, variables: { formId: formId } }).then(res => {
102
+        let data = res.data
103
+        const variables = {};
104
+        const formData = {};
105
+        formData.formId = formId
106
+        if (row.id) {
107
+          MessageBox.confirm('是否发起项目变更?', '系统提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
108
+            variables.variables = formData;
109
+            // 启动流程并将表单数据加入流程变量
110
+            definitionStart(row.id, JSON.stringify(variables)).then(res => {
111
+              this.$modal.msgSuccess(res.msg);
112
+              let procInstanceId = res.data;
113
+              todoList({
114
+                pageNum: 1,
115
+                pageSize: 99999999,
116
+                processInsId: procInstanceId
117
+              }).then(toDoRes => {
118
+                let records = toDoRes.data.records;
119
+                if (records.length == 1) {
120
+                  records = records[0]
121
+                }
122
+                this.$router.push({
123
+                  path: '/applyForm/change',
124
+                  query: {
125
+                    procInsId: records.procInsId,
126
+                    executionId: records.executionId,
127
+                    deployId: records.deployId,
128
+                    taskId: records.taskId,
129
+                    taskName: records.taskName,
130
+                    startUser: records.startUserName + '--' + records.startDeptName,
131
+                    formId: formData.formId,
132
+                    procDefName: records.procDefName,
133
+                    projectId: this.taskForm.formId
134
+                  }
135
+                })
136
+              })
137
+            })
138
+          })
139
+        }
140
+      })
141
+    },
142
+  }
143
+};
144
+</script>
145
+<style lang="scss" scoped>
146
+.nav-btn {
147
+  display: flex;
148
+  justify-content: space-between;
149
+}
150
+
151
+.custom-table {
152
+  display: block;
153
+  /* 确保表格不会超出容器 */
154
+  overflow-x: auto;
155
+  /* 横向滚动条 */
156
+}
157
+</style>

+ 27
- 3
oa-ui/src/views/flowable/form/projectProcess/addproject.vue View File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-18 11:00:04
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-04 16:55:40
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-06-06 09:08:51
6 6
 -->
7 7
 <template>
8 8
   <div class="project-wrapper">
@@ -139,6 +139,11 @@
139 139
         </el-col>
140 140
       </el-row>
141 141
     </el-form>
142
+      <div class="headers">
143
+        项目变更
144
+        <div class="line"></div>
145
+        <change-data :taskForm="taskForm" :taskName="$route.query.taskName"></change-data>
146
+      </div>
142 147
     <div slot="footer" class="dialog-footer" style="text-align: center">
143 148
       <el-button type="primary" @click="confirmAddForm" :disabled="disabled">提 交</el-button>
144 149
       <!-- <el-button @click="cancel" :disabled="disabled">取 消</el-button> -->
@@ -160,8 +165,9 @@ import { listProjectWork, addProjectWork } from "@/api/oa/project/projectWork";
160 165
 import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
161 166
 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
162 167
 import chooseContract from '../components/chooseContract.vue';
168
+import changeData from '../inProgress/changeData.vue';
163 169
 export default {
164
-  components: { chooseContract },
170
+  components: { chooseContract, changeData },
165 171
   dicts: ['cmc_scale_grade', 'cmc_unit'],
166 172
   props: {
167 173
     disabled: {
@@ -424,4 +430,22 @@ table {
424 430
   border-color: var(--current-color);
425 431
 }
426 432
 
433
+.headers {
434
+  position: relative;
435
+  font-weight: bold;
436
+  font-size: 18px;
437
+  padding-left: 40px;
438
+  padding-bottom: 40px;
439
+
440
+  .line {
441
+    position: absolute;
442
+    left: 22px;
443
+    top: 5px;
444
+    width: 5px;
445
+    height: 14px;
446
+    border-radius: 10px;
447
+    background-color: #2893e5;
448
+  }
449
+}
450
+
427 451
 </style>

+ 105
- 0
oa-ui/src/views/flowable/task/todo/applyForm/changeIndex.vue View File

@@ -0,0 +1,105 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-05-31 17:02:16
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-06-06 09:17:48
6
+-->
7
+<template>
8
+  <div class="app-container">
9
+    <nav-header :taskForm="taskForm" :taskName="taskName" :startUser="startUser"
10
+      :flowRecordList="flowRecordList"></nav-header>
11
+    <change-form :taskForm="taskForm" :taskName="taskName" @goBack="goBack"></change-form>
12
+  </div>
13
+</template>
14
+
15
+<script>
16
+import { flowRecord } from "@/api/flowable/finished";
17
+import { getProcessVariables } from "@/api/flowable/definition";
18
+import { flowTaskForm } from "@/api/flowable/todo";
19
+import changeForm from '../../../form/changeForm.vue';
20
+import navHeader from './components/navHeader.vue'
21
+export default {
22
+  components: {
23
+    navHeader,
24
+    changeForm,
25
+  },
26
+  data() {
27
+    return {
28
+      taskForm: {
29
+        returnTaskShow: false, // 是否展示回退表单
30
+        delegateTaskShow: false, // 是否展示回退表单
31
+        defaultTaskShow: true, // 默认处理
32
+        comment: "", // 意见内容
33
+        procInsId: "", // 流程实例编号
34
+        instanceId: "", // 流程实例编号
35
+        deployId: "",  // 流程定义编号
36
+        taskId: "",// 流程任务编号
37
+        procDefId: "",  // 流程编号
38
+        targetKey: "",
39
+        variables: {
40
+          variables: {}
41
+        },
42
+      },
43
+      startUser: null, // 发起人信息,
44
+      taskName: null, // 任务节点
45
+      flowRecordList: []
46
+    }
47
+  },
48
+  created() {
49
+    if (this.$route.query) {
50
+      this.taskName = this.$route.query.taskName;
51
+      this.startUser = this.$route.query.startUser;
52
+      this.taskForm.deployId = this.$route.query.deployId;
53
+      this.taskForm.taskId = this.$route.query.taskId;
54
+      this.taskForm.procInsId = this.$route.query.procInsId;
55
+      this.taskForm.executionId = this.$route.query.executionId;
56
+      this.taskForm.instanceId = this.$route.query.procInsId;
57
+      this.taskForm.formId = this.$route.query.formId;
58
+      this.taskForm.procDefName = this.$route.query.procDefName;
59
+      // 流程任务获取变量信息
60
+      if (this.taskForm.taskId) {
61
+        this.processVariables(this.taskForm.taskId)
62
+        this.getFlowTaskForm(this.taskForm.taskId)
63
+      }
64
+      this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
65
+    }
66
+  },
67
+  methods: {
68
+    /** 获取流程变量内容 */
69
+    processVariables(taskId) {
70
+      if (taskId) {
71
+        // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
72
+        getProcessVariables(taskId).then(res => {
73
+        });
74
+      }
75
+    },
76
+    /** 流程节点表单 */
77
+    getFlowTaskForm(taskId) {
78
+      if (taskId) {
79
+        // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
80
+        flowTaskForm({ taskId: taskId }).then(res => {
81
+          this.taskForm.variables = res.data.formData;
82
+        });
83
+      }
84
+    },
85
+    /** 流程流转记录 */
86
+    getFlowRecordList(procInsId, deployId) {
87
+      const that = this
88
+      const params = { procInsId: procInsId, deployId: deployId }
89
+      flowRecord(params).then(res => {
90
+        that.flowRecordList = res.data.flowList;
91
+      }).catch(res => {
92
+        this.goBack();
93
+      })
94
+    },
95
+    goBack() {
96
+      // 关闭当前标签页并返回上个页面
97
+      const obj = this.$route;
98
+      this.$tab.closeOpenPage(obj);
99
+      this.$router.go(-1);
100
+    }
101
+  }
102
+}
103
+</script>
104
+
105
+<style lang="scss" scoped></style>

Loading…
Cancel
Save