--no commit message
Showing
6 changed files
with
226 additions
and
231 deletions
... | @@ -4,82 +4,109 @@ | ... | @@ -4,82 +4,109 @@ |
4 | * @LastEditTime: 2023-05-17 10:42:01 | 4 | * @LastEditTime: 2023-05-17 10:42:01 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <dialogBox title="转出" @submitForm="submitForm" saveButton="确认转出" width="45%" height='30%' @closeDialog="closeDialog" | 7 | <div class="from-clues"> |
8 | v-model="value"> | 8 | <!-- 表单部分 --> |
9 | <div class="from-clues"> | 9 | <div class="from-clues-header"> |
10 | <!-- 表单部分 --> | 10 | <el-form ref="queryForm" label-width="180px" v-if="this.formData.obj"> |
11 | <div class="from-clues-header"> | 11 | <el-form-item label="下一环节名称:"> |
12 | <el-form :model="queryForm" ref="queryForm" label-width="120px"> | 12 | {{ this.formData.obj.taskName }} |
13 | <el-form-item label="下一环节名称:"> | 13 | </el-form-item> |
14 | {{this.tableData.taskName}} | 14 | <el-form-item label="下一环节办理人:"> |
15 | </el-form-item> | 15 | {{ this.formData.obj.usernames.join(",") }} |
16 | <el-form-item label="下一环节办理人:"> | 16 | </el-form-item> |
17 | {{this.usernames}} | 17 | </el-form> |
18 | </el-form-item> | 18 | <el-form ref="queryForm" label-width="180px" v-else> |
19 | 19 | <el-form-item label=""> | |
20 | </el-form> | 20 | 此环节为流程最后环节,转出后流程将结束 |
21 | </div> | 21 | </el-form-item> |
22 | </el-form> | ||
23 | <div class="invalid-reson">转出原因:</div> | ||
24 | <el-input | ||
25 | v-model="shyj" | ||
26 | placeholder="请输入转出原因" | ||
27 | type="textarea" | ||
28 | :rows="4" | ||
29 | ></el-input> | ||
30 | <el-button style="float: right" @click="cancelBack">取消转出</el-button> | ||
31 | <el-button type="primary" @click="submitForm" style="float: right" | ||
32 | >确定转出</el-button | ||
33 | > | ||
22 | </div> | 34 | </div> |
23 | </dialogBox> | 35 | </div> |
24 | </template> | 36 | </template> |
25 | 37 | ||
26 | <script> | 38 | <script> |
27 | import { completeTask, getNextLinkInfo } from "@/api/workFlow.js" | 39 | import { completeTask, getNextLinkInfo } from "@/api/workFlow.js"; |
28 | export default { | 40 | import { popupCacel } from "@/utils/popup.js"; |
29 | components: { | 41 | export default { |
42 | components: {}, | ||
43 | props: { | ||
44 | formData: { | ||
45 | type: Object, | ||
46 | default: {}, | ||
30 | }, | 47 | }, |
31 | props: { | 48 | }, |
32 | value: { type: Boolean, default: false }, | 49 | data() { |
33 | queryForm: { type: Object, default: false } | 50 | return { |
51 | queryForm: {}, | ||
52 | shyj: "", | ||
53 | }; | ||
54 | }, | ||
55 | mounted() { | ||
56 | // this.queryForm= this.queryForm.obj | ||
57 | console.log("formDataformDataformData", this.formData); | ||
58 | }, | ||
59 | methods: { | ||
60 | /** | ||
61 | * @description: submitForm | ||
62 | * @author: renchao | ||
63 | */ | ||
64 | submitForm() { | ||
65 | this.queryForm = { | ||
66 | bsmSlsq: this.formData.bsmSlsq, | ||
67 | shyj: this.shyj, | ||
68 | stepform: JSON.stringify(this.formData.tabList), | ||
69 | }; | ||
70 | console.log("this.queryForm", this.queryForm); | ||
71 | completeTask(this.queryForm).then((res) => { | ||
72 | if (res.code === 200) { | ||
73 | this.$message.success("转件成功"); | ||
74 | // setTimeout(() => { | ||
75 | // window.opener = null; | ||
76 | // window.open("about:blank", "_self"); | ||
77 | // window.close(); | ||
78 | // this.$emit("input", false); | ||
79 | // }, 1000); | ||
80 | popupCacel(); | ||
81 | setTimeout(() => { | ||
82 | // window.opener.location.reload(); //刷新父窗口 | ||
83 | if (window.opener && window.opener.getBpageList) { | ||
84 | window.opener.getBpageList(); | ||
85 | } else { | ||
86 | window.opener.frames[0].getBpageList(); | ||
87 | } | ||
88 | window.close(); | ||
89 | this.$emit("input", false); | ||
90 | }, 1000); | ||
91 | }else{ | ||
92 | this.$message.error(res.message); | ||
93 | } | ||
94 | }); | ||
34 | }, | 95 | }, |
35 | data () { | 96 | /** |
36 | return { | 97 | * @description: closeDialog |
37 | tableData: {}, | 98 | * @author: renchao |
38 | usernames: '', | 99 | */ |
39 | } | 100 | cancelBack() { |
101 | popupCacel(); | ||
40 | }, | 102 | }, |
41 | methods: { | 103 | }, |
42 | /** | 104 | }; |
43 | * @description: tablelistFn | ||
44 | * @author: renchao | ||
45 | */ | ||
46 | tablelistFn () { | ||
47 | getNextLinkInfo(this.queryForm).then(res => { | ||
48 | if (res.code === 200) { | ||
49 | this.tableData = res.result | ||
50 | if (res.result.usernames) { | ||
51 | this.usernames = String(res.result.usernames) | ||
52 | } | ||
53 | } | ||
54 | }) | ||
55 | }, | ||
56 | /** | ||
57 | * @description: submitForm | ||
58 | * @author: renchao | ||
59 | */ | ||
60 | submitForm () { | ||
61 | completeTask(this.queryForm).then(res => { | ||
62 | if (res.code === 200) { | ||
63 | this.$message.success('转件成功') | ||
64 | setTimeout(() => { | ||
65 | window.opener = null; | ||
66 | window.open("about:blank", "_self"); | ||
67 | window.close(); | ||
68 | this.$emit('input', false) | ||
69 | }, 1000); | ||
70 | } | ||
71 | }) | ||
72 | }, | ||
73 | /** | ||
74 | * @description: closeDialog | ||
75 | * @author: renchao | ||
76 | */ | ||
77 | closeDialog () { | ||
78 | this.$emit("input", false); | ||
79 | }, | ||
80 | } | ||
81 | } | ||
82 | </script> | 105 | </script> |
83 | <style scoped lang="scss"> | 106 | <style scoped lang="scss"> |
84 | @import "~@/styles/mixin.scss"; | 107 | @import "~@/styles/mixin.scss"; |
108 | .el-button { | ||
109 | margin-top: 20px; | ||
110 | margin-right: 10px; | ||
111 | } | ||
85 | </style> | 112 | </style> | ... | ... |
... | @@ -403,7 +403,7 @@ export default { | ... | @@ -403,7 +403,7 @@ export default { |
403 | djjgrules: [{ required: true, message: "登记机构", trigger: "blur" }], | 403 | djjgrules: [{ required: true, message: "登记机构", trigger: "blur" }], |
404 | dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }], | 404 | dbrrules: [{ required: true, message: "登簿人", trigger: "blur" }], |
405 | djsjrules: [{ required: true, message: "登记时间", trigger: "blur" }], | 405 | djsjrules: [{ required: true, message: "登记时间", trigger: "blur" }], |
406 | djlxrules: [{ required: true, message: "登记类型", trigger: "blur" }], | 406 | djlxrules: [{ required: true, message: "登记类型", trigger: "change" }], |
407 | }, | 407 | }, |
408 | }; | 408 | }; |
409 | }, | 409 | }, | ... | ... |
... | @@ -325,18 +325,25 @@ export default { | ... | @@ -325,18 +325,25 @@ export default { |
325 | * @author: renchao | 325 | * @author: renchao |
326 | */ | 326 | */ |
327 | sendToNext (obj) { | 327 | sendToNext (obj) { |
328 | this.$popupDialog("转出", "workflow/components/zc", { | 328 | this.$popupDialog("转出", "djbworkflow/components/zc", { |
329 | obj:obj, | ||
329 | bsmSlsq: this.bsmSlsq, | 330 | bsmSlsq: this.bsmSlsq, |
330 | bestepid: this.bestepid | 331 | tabList: this.tabList |
331 | }, '800px', true) | 332 | }, '800px', true) |
332 | }, | 333 | }, |
334 | //转出最后一个流程 | ||
333 | /** | 335 | /** |
334 | * @description: sendToEnd | 336 | * @description: 转出最后一个流程 |
335 | * @author: renchao | 337 | * @author: renchao |
336 | */ | 338 | */ |
337 | sendToEnd () { | 339 | sendToEnd () { |
338 | 340 | this.$popupDialog("转出", "djbworkflow/components/zc", { | |
341 | obj:"", | ||
342 | bsmSlsq: this.bsmSlsq, | ||
343 | tabList: this.tabList | ||
344 | }, '800px', true) | ||
339 | }, | 345 | }, |
346 | |||
340 | //批量操作 | 347 | //批量操作 |
341 | /** | 348 | /** |
342 | * @description: 批量操作 | 349 | * @description: 批量操作 | ... | ... |
... | @@ -4,70 +4,109 @@ | ... | @@ -4,70 +4,109 @@ |
4 | * @LastEditTime: 2023-05-17 10:42:01 | 4 | * @LastEditTime: 2023-05-17 10:42:01 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <dialogBox title="转出" @submitForm="submitForm" saveButton="确认转出" width="45%" height='30%' @closeDialog="closeDialog" | 7 | <div class="from-clues"> |
8 | v-model="value"> | 8 | <!-- 表单部分 --> |
9 | <div class="from-clues"> | 9 | <div class="from-clues-header"> |
10 | <!-- 表单部分 --> | 10 | <el-form ref="queryForm" label-width="180px" v-if="this.formData.obj"> |
11 | <div class="from-clues-header"> | 11 | <el-form-item label="下一环节名称:"> |
12 | <el-form :model="queryForm" ref="queryForm" label-width="120px"> | 12 | {{ this.formData.obj.taskName }} |
13 | <el-form-item label="下一环节名称:"> | 13 | </el-form-item> |
14 | {{this.tableData.taskName}} | 14 | <el-form-item label="下一环节办理人:"> |
15 | </el-form-item> | 15 | {{ this.formData.obj.usernames.join(",") }} |
16 | <el-form-item label="下一环节办理人:"> | 16 | </el-form-item> |
17 | {{this.usernames}} | 17 | </el-form> |
18 | </el-form-item> | 18 | <el-form ref="queryForm" label-width="180px" v-else> |
19 | 19 | <el-form-item label=""> | |
20 | </el-form> | 20 | 此环节为流程最后环节,转出后流程将结束 |
21 | </div> | 21 | </el-form-item> |
22 | </el-form> | ||
23 | <div class="invalid-reson">转出原因:</div> | ||
24 | <el-input | ||
25 | v-model="shyj" | ||
26 | placeholder="请输入转出原因" | ||
27 | type="textarea" | ||
28 | :rows="4" | ||
29 | ></el-input> | ||
30 | <el-button style="float: right" @click="cancelBack">取消转出</el-button> | ||
31 | <el-button type="primary" @click="submitForm" style="float: right" | ||
32 | >确定转出</el-button | ||
33 | > | ||
22 | </div> | 34 | </div> |
23 | </dialogBox> | 35 | </div> |
24 | </template> | 36 | </template> |
25 | 37 | ||
26 | <script> | 38 | <script> |
27 | import { completeTask, getNextLinkInfo } from "@/api/workFlow.js" | 39 | import { completeTask, getNextLinkInfo } from "@/api/workFlow.js"; |
28 | export default { | 40 | import { popupCacel } from "@/utils/popup.js"; |
29 | components: { | 41 | export default { |
42 | components: {}, | ||
43 | props: { | ||
44 | formData: { | ||
45 | type: Object, | ||
46 | default: {}, | ||
30 | }, | 47 | }, |
31 | props: { | 48 | }, |
32 | value: { type: Boolean, default: false }, | 49 | data() { |
33 | queryForm: { type: Object, default: false } | 50 | return { |
51 | queryForm: {}, | ||
52 | shyj: "", | ||
53 | }; | ||
54 | }, | ||
55 | mounted() { | ||
56 | // this.queryForm= this.queryForm.obj | ||
57 | console.log("formDataformDataformData", this.formData); | ||
58 | }, | ||
59 | methods: { | ||
60 | /** | ||
61 | * @description: submitForm | ||
62 | * @author: renchao | ||
63 | */ | ||
64 | submitForm() { | ||
65 | this.queryForm = { | ||
66 | bsmSlsq: this.formData.bsmSlsq, | ||
67 | shyj: this.shyj, | ||
68 | stepform: JSON.stringify(this.formData.tabList), | ||
69 | }; | ||
70 | console.log("this.queryForm", this.queryForm); | ||
71 | completeTask(this.queryForm).then((res) => { | ||
72 | if (res.code === 200) { | ||
73 | this.$message.success("转件成功"); | ||
74 | // setTimeout(() => { | ||
75 | // window.opener = null; | ||
76 | // window.open("about:blank", "_self"); | ||
77 | // window.close(); | ||
78 | // this.$emit("input", false); | ||
79 | // }, 1000); | ||
80 | popupCacel(); | ||
81 | setTimeout(() => { | ||
82 | // window.opener.location.reload(); //刷新父窗口 | ||
83 | if (window.opener && window.opener.getBpageList) { | ||
84 | window.opener.getBpageList(); | ||
85 | } else { | ||
86 | window.opener.frames[0].getBpageList(); | ||
87 | } | ||
88 | window.close(); | ||
89 | this.$emit("input", false); | ||
90 | }, 1000); | ||
91 | }else{ | ||
92 | this.$message.error(res.message); | ||
93 | } | ||
94 | }); | ||
34 | }, | 95 | }, |
35 | data () { | 96 | /** |
36 | return { | 97 | * @description: closeDialog |
37 | tableData: {}, | 98 | * @author: renchao |
38 | usernames: '', | 99 | */ |
39 | } | 100 | cancelBack() { |
101 | popupCacel(); | ||
40 | }, | 102 | }, |
41 | methods: { | 103 | }, |
42 | tablelistFn () { | 104 | }; |
43 | getNextLinkInfo(this.queryForm).then(res => { | ||
44 | if (res.code === 200) { | ||
45 | this.tableData = res.result | ||
46 | if (res.result.usernames) { | ||
47 | this.usernames = String(res.result.usernames) | ||
48 | } | ||
49 | } | ||
50 | }) | ||
51 | }, | ||
52 | submitForm () { | ||
53 | completeTask(this.queryForm).then(res => { | ||
54 | if (res.code === 200) { | ||
55 | this.$message.success('转件成功') | ||
56 | setTimeout(() => { | ||
57 | window.opener = null; | ||
58 | window.open("about:blank", "_self"); | ||
59 | window.close(); | ||
60 | this.$emit('input', false) | ||
61 | }, 1000); | ||
62 | } | ||
63 | }) | ||
64 | }, | ||
65 | closeDialog () { | ||
66 | this.$emit("input", false); | ||
67 | }, | ||
68 | } | ||
69 | } | ||
70 | </script> | 105 | </script> |
71 | <style scoped lang="scss"> | 106 | <style scoped lang="scss"> |
72 | @import "~@/styles/mixin.scss"; | 107 | @import "~@/styles/mixin.scss"; |
108 | .el-button { | ||
109 | margin-top: 20px; | ||
110 | margin-right: 10px; | ||
111 | } | ||
73 | </style> | 112 | </style> | ... | ... |
... | @@ -254,100 +254,30 @@ export default { | ... | @@ -254,100 +254,30 @@ export default { |
254 | }); | 254 | }); |
255 | }); | 255 | }); |
256 | }, | 256 | }, |
257 | //发送下一个环节 | 257 | //发送下一个环节 |
258 | sendToNext (obj) { | 258 | /** |
259 | const h = this.$createElement; | 259 | * @description: 发送下一个环节 |
260 | this.$msgbox({ | 260 | * @param {*} obj |
261 | title: "您确定转出吗?", | 261 | * @author: renchao |
262 | message: h("div", { style: "margin: auto" }, [ | 262 | */ |
263 | h("span", null, "下个环节名称:"), | 263 | sendToNext (obj) { |
264 | h("i", { style: "color: teal" }, obj.taskName), | 264 | this.$popupDialog("转出", "djbworkflow/components/zc", { |
265 | h("div", null, ""), | 265 | obj:obj, |
266 | h("span", null, "下个环节经办人: "), | 266 | bsmSlsq: this.bsmSlsq, |
267 | h("i", { style: "color: teal" }, obj.usernames.join(",")), | 267 | tabList: this.tabList |
268 | ]), | 268 | }, '800px', true) |
269 | showCancelButton: true, | ||
270 | beforeClose: (action, instance, done) => { | ||
271 | if (action === "confirm") { | ||
272 | instance.confirmButtonLoading = true; | ||
273 | instance.confirmButtonText = "执行中..."; | ||
274 | completeTask({ | ||
275 | bsmSlsq: this.bsmSlsq, | ||
276 | shyj: "this.bestepid", | ||
277 | stepform: JSON.stringify(this.tabList), | ||
278 | }).then((res) => { | ||
279 | if (res.code === 200) { | ||
280 | instance.confirmButtonLoading = false; | ||
281 | this.$message.success("转件成功"); | ||
282 | // window.opener.location.reload(); //刷新父窗口 | ||
283 | if (window.opener && window.opener.getBpageList) { | ||
284 | window.opener.getBpageList(); | ||
285 | } else { | ||
286 | window.opener.frames[0].getBpageList(); | ||
287 | } | ||
288 | window.close(); | ||
289 | this.$emit("input", false); | ||
290 | } else { | ||
291 | instance.confirmButtonLoading = false; | ||
292 | instance.confirmButtonText = "确定"; | ||
293 | this.$message.error(res.message); | ||
294 | } | ||
295 | }); | ||
296 | } else { | ||
297 | done(); | ||
298 | } | ||
299 | }, | ||
300 | }).then((action) => { | ||
301 | this.$message({ | ||
302 | type: "info", | ||
303 | message: "action: " + action, | ||
304 | }); | ||
305 | }); | ||
306 | }, | 269 | }, |
270 | //转出最后一个流程 | ||
271 | /** | ||
272 | * @description: 转出最后一个流程 | ||
273 | * @author: renchao | ||
274 | */ | ||
307 | sendToEnd () { | 275 | sendToEnd () { |
308 | let that = this | 276 | this.$popupDialog("转出", "djbworkflow/components/zc", { |
309 | const h = this.$createElement; | 277 | obj:"", |
310 | this.$msgbox({ | 278 | bsmSlsq: this.bsmSlsq, |
311 | title: "您确定转出吗?", | 279 | tabList: this.tabList |
312 | message: "此环节为流程最后环节,转出后流程将结束", | 280 | }, '800px', true) |
313 | showCancelButton: true, | ||
314 | beforeClose: (action, instance, done) => { | ||
315 | if (action === "confirm") { | ||
316 | instance.confirmButtonLoading = true; | ||
317 | instance.confirmButtonText = "执行中..."; | ||
318 | completeTask({ | ||
319 | bsmSlsq: this.bsmSlsq, | ||
320 | shyj: "this.bestepid", | ||
321 | stepform: JSON.stringify(this.tabList), | ||
322 | }).then((res) => { | ||
323 | if (res.code === 200) { | ||
324 | instance.confirmButtonLoading = false; | ||
325 | that.$message.success("转件成功"); | ||
326 | localStorage.setItem('transfer', true) | ||
327 | // window.opener.location.reload(); //刷新父窗口 | ||
328 | if (window.opener && window.opener.getBpageList) { | ||
329 | window.opener.getBpageList(); | ||
330 | } else { | ||
331 | window.opener.frames[0].getBpageList(); | ||
332 | } | ||
333 | window.close(); | ||
334 | that.$emit("input", false); | ||
335 | } else { | ||
336 | instance.confirmButtonLoading = false; | ||
337 | instance.confirmButtonText = "确定"; | ||
338 | this.$message.error(res.message); | ||
339 | } | ||
340 | }) | ||
341 | } else { | ||
342 | done(); | ||
343 | } | ||
344 | }, | ||
345 | }).then((action) => { | ||
346 | this.$message({ | ||
347 | type: "info", | ||
348 | message: "action: " + action | ||
349 | }) | ||
350 | }) | ||
351 | }, | 281 | }, |
352 | //批量操作 | 282 | //批量操作 |
353 | handleBatchDel () { | 283 | handleBatchDel () { | ... | ... |
-
Please register or sign in to post a comment