2017bf6c by tianhaohao@pashanhoo.com

修改转件及退回功能页面分类

1 parent cad8ca6b
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
155 }, '90%', true) 155 }, '90%', true)
156 break; 156 break;
157 case "back": //退回按钮 157 case "back": //退回按钮
158 this.$popupDialog("退回", "workflow/components/th", { 158 this.$popupDialog("退回", "workflow/top/back/index", {
159 bsmSlsq: this.bsmSlsq, 159 bsmSlsq: this.bsmSlsq,
160 bestepid: this.bestepid ? this.bestepid : '' 160 bestepid: this.bestepid ? this.bestepid : ''
161 }, '800px', true) 161 }, '800px', true)
......
1 <!--
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-08-02 14:24:20
5 -->
6 <template>
7 <div class="from-clues">
8 <!-- 表单部分 -->
9 <div class="from-clues-header">
10 <div class="title">请选择要退回到的环节:</div>
11 <el-form ref="queryForm" label-width="90px">
12 <ul style="margin-bottom: 15px">
13 <li
14 v-for="(item, index) in dataList"
15 class="listDetail"
16 :key="index"
17 @click="changeSelectItem(item)">
18 <p class="icon">
19 <el-radio
20 v-model="selectActivity"
21 :label="item.activityId"
22 @change="changeSelectItem(item)"></el-radio>
23 </p>
24 <p>{{ item.activityName }}</p>
25 <p v-for="(child, childIndex) in item.assignee" :key="childIndex">
26 {{ child.name }}
27 </p>
28 </li>
29 </ul>
30 <div class="title">退回意见:</div>
31 <el-form-item>
32 <el-input
33 class="textArea"
34 type="textarea"
35 v-model="outstepopinion"
36 placeholder="请输入退回意见"></el-input>
37 </el-form-item>
38 <el-form-item>
39 <el-button style="float:right" @click="cancelBack">取消</el-button>
40 <el-button type="primary" @click="onSubmit" style="float:right">退回</el-button>
41 </el-form-item>
42 </el-form>
43 </div>
44 </div>
45 </template>
46
47 <script>
48
49 import { getTaskBackNode, sendBackTask } from "@/api/workFlow.js"
50 import { popupCacel } from "@/utils/popup.js";
51
52 export default {
53 props: {
54 formData: {
55 type: Object,
56 default: {},
57 },
58 },
59 data () {
60 return {
61 selectActivity: "",
62 dataList: [],
63 outstepopinion: "",
64 selectItem: {},
65 };
66 },
67 created () {
68 this.getBackNode();
69 },
70 methods: {
71 /**
72 * @description: onSubmit
73 * @author: renchao
74 */
75 onSubmit () {
76 if (!this.outstepopinion) {
77 this.$message.error("请填写退回意见");
78 } else {
79 sendBackTask({
80 bsmSlsq: this.formData.bsmSlsq,
81 backNodeList: [this.selectItem],
82 message: this.outstepopinion
83 }).then((res) => {
84 if (res.code == 200) {
85 this.$message.success("退回成功");
86 setTimeout(() => {
87 if (window.opener && window.opener.getBpageList) {
88 window.opener.getBpageList();
89 } else {
90 window.opener.frames[0].getBpageList();
91 }
92 window.close();
93 this.$emit("input", false);
94 }, 1000);
95 } else {
96 this.$message.error(res.message);
97 }
98 });
99 }
100 },
101 /**
102 * @description: changeSelectItem
103 * @param {*} item
104 * @author: renchao
105 */
106 changeSelectItem (item) {
107 this.selectItem = item;
108 this.selectActivity = item.activityId;
109 },
110 //获取可回退环节信息
111 /**
112 * @description: 获取可回退环节信息
113 * @author: renchao
114 */
115 getBackNode () {
116 getTaskBackNode(this.formData).then((res) => {
117 if (res.code == 200) {
118 this.dataList = res.result;
119 console.log("this.dataList", this.dataList);
120 if (res.result) {
121 this.selectActivity = res.result[0].activityId;
122 this.selectItem = res.result[0];
123 }
124 }
125 });
126 },
127
128 /**
129 * @description: cancelBack
130 * @author: renchao
131 */
132 cancelBack () {
133 popupCacel();
134 }
135 }
136 }
137 </script>
138 <style scoped lang="scss">
139 @import "~@/styles/mixin.scss";
140
141 .listDetail {
142 display: flex;
143 align-items: center;
144 width: 100%;
145
146 p {
147 line-height: 30px;
148 height: 30px;
149 @include flex-center;
150 flex: 1;
151 width: 100%;
152 border: 1px solid rgb(233, 235, 237);
153 margin-top: -1px;
154 margin-left: -1px;
155 }
156
157 .icon {
158 flex: 0 0 60px;
159 }
160 }
161
162 .title {
163 margin-bottom: 10px;
164 }
165
166 .textArea {
167 /deep/.el-textarea__inner {
168 min-height: 90px !important;
169 }
170 }
171 /deep/.el-radio .el-radio__label {
172 display: none;
173 }
174 </style>
...@@ -175,7 +175,7 @@ export default { ...@@ -175,7 +175,7 @@ export default {
175 }) 175 })
176 break; 176 break;
177 case "back": //退回按钮 177 case "back": //退回按钮
178 this.$popupDialog("退回", "workflow/components/th", { 178 this.$popupDialog("退回", "workflow/top/back/index", {
179 bsmSlsq: this.bsmSlsq, 179 bsmSlsq: this.bsmSlsq,
180 bestepid: this.bestepid ? this.bestepid : '' 180 bestepid: this.bestepid ? this.bestepid : ''
181 }, '800px', true) 181 }, '800px', true)
...@@ -283,10 +283,11 @@ export default { ...@@ -283,10 +283,11 @@ export default {
283 * @author: renchao 283 * @author: renchao
284 */ 284 */
285 sendToNext (obj) { 285 sendToNext (obj) {
286 this.$popupDialog("转出", "djbworkflow/components/zc", { 286 this.$popupDialog("转出", "workflow/top/transfer/index", {
287 obj: obj, 287 obj: obj,
288 bsmSlsq: this.bsmSlsq, 288 bsmSlsq: this.bsmSlsq,
289 tabList: this.tabList 289 tabList: this.tabList,
290 tshowidea: this.showidea
290 }, '800px', true) 291 }, '800px', true)
291 }, 292 },
292 /** 293 /**
...@@ -295,10 +296,11 @@ export default { ...@@ -295,10 +296,11 @@ export default {
295 * @author: renchao 296 * @author: renchao
296 */ 297 */
297 sendToEnd (obj) { 298 sendToEnd (obj) {
298 this.$popupDialog("转出", "djbworkflow/components/zc", { 299 this.$popupDialog("转出", "workflow/top/transfer/index", {
299 obj: "", 300 obj: "",
300 bsmSlsq: this.bsmSlsq, 301 bsmSlsq: this.bsmSlsq,
301 tabList: this.tabList 302 tabList: this.tabList,
303 showidea: this.showidea
302 }, '800px', true) 304 }, '800px', true)
303 }, 305 },
304 /** 306 /**
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-01-19 16:43:43 4 * @LastEditTime: 2024-01-19 16:48:37
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues"> 7 <div class="from-clues">
8 <!-- 表单部分 -->
9 <div class="from-clues-header"> 8 <div class="from-clues-header">
10 <el-form ref="queryForm" label-width="180px" v-if="this.formData.obj"> 9 <el-form ref="queryForm" label-width="180px" v-if="this.formData.obj">
11 <el-form-item label="下一环节名称:"> 10 <el-form-item label="下一环节名称:">
...@@ -20,20 +19,19 @@ ...@@ -20,20 +19,19 @@
20 此环节为流程最后环节,转出后流程将结束 19 此环节为流程最后环节,转出后流程将结束
21 </el-form-item> 20 </el-form-item>
22 </el-form> 21 </el-form>
23 <div class="invalid-reson">审批意见:</div> 22 <div v-if="this.formData.showidea">
24 <el-input 23 <div class="invalid-reson">审批意见:</div>
25 class="opinion" 24 <el-input
26 v-model="shyj" 25 class="opinion"
27 placeholder="请输入审批意见" 26 v-model="shyj"
28 type="textarea" 27 placeholder="请输入审批意见"
29 :rows="4"></el-input> 28 type="textarea"
30 <!-- <el-button 29 :rows="4"></el-input>
31 class="opinion_btn" 30 </div>
32 @click="commonOpinion" 31 <div style="text-align:center">
33 >常用意见</el-button 32 <el-button @click="cancelBack">取消转出</el-button>
34 > --> 33 <el-button type="primary" @click="submitForm">确定转出</el-button>
35 <el-button style="float: right" @click="cancelBack">取消转出</el-button> 34 </div>
36 <el-button type="primary" @click="submitForm" :loading="loading" style="float: right">确定转出</el-button>
37 </div> 35 </div>
38 </div> 36 </div>
39 </template> 37 </template>
...@@ -41,69 +39,49 @@ ...@@ -41,69 +39,49 @@
41 <script> 39 <script>
42 import { completeTask, getNextLinkInfo } from "@/api/workFlow.js"; 40 import { completeTask, getNextLinkInfo } from "@/api/workFlow.js";
43 import { popupCacel } from "@/utils/popup.js"; 41 import { popupCacel } from "@/utils/popup.js";
44 import { mapGetters } from 'vuex' 42 import { mapGetters } from "vuex";
45 export default { 43 export default {
46 components: {},
47
48 props: { 44 props: {
49 formData: { 45 formData: {
50 type: Object, 46 type: Object,
51 default: {}, 47 default: {},
52 }, 48 },
53 }, 49 },
54 computed: { 50
55 ...mapGetters(['yjsqOptions'])
56 },
57 data () { 51 data () {
58 return { 52 return {
59 loading: false,
60 queryForm: {}, 53 queryForm: {},
61 shyj: "", 54 shyj: "",
62 }; 55 };
63 }, 56 },
64
65 watch: {
66 // yjsqOptions: {
67 // handler (val) {
68 // if(val){
69 // this.shyj = val
70 // }
71
72 // },
73 // },
74 },
75 mounted () {
76 // this.queryForm= this.queryForm.obj
77 },
78 methods: { 57 methods: {
79 /** 58 /**
80 * @description: submitForm 59 * @description: submitForm
81 * @author: renchao 60 * @author: renchao
82 */ 61 */
83 commonOpinion () { 62 commonOpinion () {
84 this.$popupDialog( 63 this.$popup('常用意见', "workflow/components/dialog/commonOpinion", {
85 "常用意见", 64 title: "常用意见",
86 "workflow/components/dialog/commonOpinion", 65 width: '75%', // 初始化75% 不需要改的话 可以直接不要
87 {}, 66 formData: {}, // 父组件传给子组件的参数
88 "70%", 67 cancel: function () { }, //取消事件的回调 没有按钮可以不需要
89 true 68 confirm: function () { } //确认事件的回调 没有按钮可以不需要
90 ); 69 })
91 }, 70 },
92 submitForm () { 71 submitForm () {
93 this.loading = true 72 let that = this
94 this.queryForm = { 73 this.queryForm = {
95 bsmSlsq: this.formData.bsmSlsq, 74 bsmSlsq: this.formData.bsmSlsq,
96 shyj: this.shyj, 75 shyj: this.shyj,
97 stepform: JSON.stringify(this.formData.tabList), 76 stepform: JSON.stringify(this.formData.tabList),
98 }; 77 };
99 completeTask(this.queryForm).then((res) => { 78 completeTask(this.queryForm).then((res) => {
100 this.loading = false
101 if (res.code === 200) { 79 if (res.code === 200) {
102 this.$message.success("转件成功");
103 popupCacel(); 80 popupCacel();
81 that.$message.success("转件成功");
104 setTimeout(() => { 82 setTimeout(() => {
105 window.close(); 83 window.close();
106 this.$emit("input", false); 84 that.$emit("input", false);
107 if (window.opener && window.opener.getBpageList) { 85 if (window.opener && window.opener.getBpageList) {
108 window.opener.getBpageList(); 86 window.opener.getBpageList();
109 } else { 87 } else {
...@@ -113,11 +91,11 @@ ...@@ -113,11 +91,11 @@
113 } else { 91 } else {
114 this.$message.error(res.message); 92 this.$message.error(res.message);
115 } 93 }
116 }).catch(() => { 94 }).catch((error) => {
117 this.loading = false 95 // 可以添加适当的错误处理
118 }) 96 this.$message.error("提交任务失败");
97 });
119 }, 98 },
120
121 /** 99 /**
122 * @description: closeDialog 100 * @description: closeDialog
123 * @author: renchao 101 * @author: renchao
......