自然幢多幢工作流整合
Showing
3 changed files
with
138 additions
and
27 deletions
... | @@ -195,9 +195,13 @@ | ... | @@ -195,9 +195,13 @@ |
195 | </el-form> | 195 | </el-form> |
196 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> | 196 | <div class="header-button" :style="{width:mainBoxWidth+'px'}"> |
197 | <el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled">保存</el-button> | 197 | <el-button type="primary" class="saveBtn" @click="onSave" :disabled="disabled">保存</el-button> |
198 | <el-button type="primary" @click="onSubmit" :disabled="disabled">提交</el-button> | ||
199 | <el-button type="primary" @click="registerCall">登记调用</el-button> | 198 | <el-button type="primary" @click="registerCall">登记调用</el-button> |
200 | </div> | 199 | </div> |
200 | <div class="sh-btn"> | ||
201 | <el-button type="primary" @click="thdz">退回</el-button> | ||
202 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> | ||
203 | <el-button type="primary" @click="shdz" v-if="workFlowState">审核</el-button> | ||
204 | </div> | ||
201 | </div> | 205 | </div> |
202 | 206 | ||
203 | </template> | 207 | </template> |
... | @@ -206,7 +210,8 @@ | ... | @@ -206,7 +210,8 @@ |
206 | import Qlr from "@components/formMenu/qlr"; | 210 | import Qlr from "@components/formMenu/qlr"; |
207 | import Qlxz from "@components/formMenu/qlxz"; | 211 | import Qlxz from "@components/formMenu/qlxz"; |
208 | import {saveDzInfo,getBdcdyh,getDzDetailByBsm} from "@api/dz"; | 212 | import {saveDzInfo,getBdcdyh,getDzDetailByBsm} from "@api/dz"; |
209 | import {getQjZdjbxxDetailById} from "@api/zd" | 213 | import {getQjZdjbxxDetailById} from "@api/zd"; |
214 | import { getActivityDetail } from "@api/user"; | ||
210 | import {submit,registerCall} from "@api/common" | 215 | import {submit,registerCall} from "@api/common" |
211 | export default { | 216 | export default { |
212 | name:'zrz', | 217 | name:'zrz', |
... | @@ -289,6 +294,8 @@ | ... | @@ -289,6 +294,8 @@ |
289 | mainBoxWidth: 0, | 294 | mainBoxWidth: 0, |
290 | 295 | ||
291 | rules:[], | 296 | rules:[], |
297 | |||
298 | workFlowState:false, | ||
292 | } | 299 | } |
293 | }, | 300 | }, |
294 | created() { | 301 | created() { |
... | @@ -303,11 +310,49 @@ | ... | @@ -303,11 +310,49 @@ |
303 | } | 310 | } |
304 | }, | 311 | }, |
305 | mounted(){ | 312 | mounted(){ |
313 | this.getActivityDetail(); | ||
306 | this.$nextTick(() => { | 314 | this.$nextTick(() => { |
307 | this.mainBoxWidth = this.$refs.mainBox.clientWidth; | 315 | this.mainBoxWidth = this.$refs.mainBox.clientWidth; |
308 | }) | 316 | }) |
309 | }, | 317 | }, |
310 | methods: { | 318 | methods: { |
319 | |||
320 | |||
321 | getActivityDetail(){ | ||
322 | let params = { | ||
323 | "params": {}, | ||
324 | "workflowPeriod": "current", | ||
325 | "workitemInstanceId": this.$route.query.workitemInstanceId | ||
326 | } | ||
327 | getActivityDetail(params).then(res => { | ||
328 | this.workFlowState = res.workitemInstance.apps.some(function(item) { | ||
329 | return item == 'shenpibiao'; | ||
330 | }); | ||
331 | }) | ||
332 | }, | ||
333 | |||
334 | shdz(){ | ||
335 | let data = { | ||
336 | bdcdyh:this.form.bdcdyh, | ||
337 | zl:this.form.zl, | ||
338 | shyj:'', | ||
339 | shr:'admin', | ||
340 | shsj:'2021-01-22' | ||
341 | }; | ||
342 | vm.setShDialog(true,data) | ||
343 | }, | ||
344 | |||
345 | thdz(){ | ||
346 | let data = { | ||
347 | bdcdyh:this.form.bdcdyh, | ||
348 | zl:this.form.zl, | ||
349 | shyj:'', | ||
350 | shr:'admin', | ||
351 | shsj:'2021-01-22' | ||
352 | } | ||
353 | vm.rollback(data); | ||
354 | }, | ||
355 | |||
311 | registerCall(){ | 356 | registerCall(){ |
312 | let data={ | 357 | let data={ |
313 | type:'dz', | 358 | type:'dz', |
... | @@ -533,19 +578,20 @@ | ... | @@ -533,19 +578,20 @@ |
533 | }) | 578 | }) |
534 | }, | 579 | }, |
535 | onSubmit(){ | 580 | onSubmit(){ |
536 | console.log(this.form) | 581 | vm.setTjDialog(true); |
537 | let data={ | 582 | // console.log(this.form) |
538 | glbsm:this.bsm, | 583 | // let data={ |
539 | status:1, | 584 | // glbsm:this.bsm, |
540 | type:"dz" | 585 | // status:1, |
541 | } | 586 | // type:"dz" |
542 | submit(data).then((res)=>{ | 587 | // } |
543 | if(res.code===200){ | 588 | // submit(data).then((res)=>{ |
544 | this.$message.success("提交完成!"); | 589 | // if(res.code===200){ |
545 | this.getDzDetailByBsm(this.$route.query.bsm) | 590 | // this.$message.success("提交完成!"); |
546 | this.getTreeByBsm(this.$route.query.bsm,'dz','0,1,2') | 591 | // this.getDzDetailByBsm(this.$route.query.bsm) |
547 | } | 592 | // this.getTreeByBsm(this.$route.query.bsm,'dz','0,1,2') |
548 | }) | 593 | // } |
594 | // }) | ||
549 | }, | 595 | }, |
550 | getZddm(zdbsm){ | 596 | getZddm(zdbsm){ |
551 | getQjZdjbxxDetailById(zdbsm).then((res)=>{ | 597 | getQjZdjbxxDetailById(zdbsm).then((res)=>{ |
... | @@ -716,5 +762,15 @@ | ... | @@ -716,5 +762,15 @@ |
716 | border-color: rgba(0, 202, 205, .8); | 762 | border-color: rgba(0, 202, 205, .8); |
717 | } | 763 | } |
718 | } | 764 | } |
765 | |||
766 | .sh-btn{ | ||
767 | position: fixed; | ||
768 | top: 74px; | ||
769 | right: 20px; | ||
770 | z-index: 999; | ||
771 | .el-button{ | ||
772 | padding: 10px 30px; | ||
773 | } | ||
774 | } | ||
719 | } | 775 | } |
720 | </style> | 776 | </style> | ... | ... |
... | @@ -163,6 +163,7 @@ import { insertDzjbxx } from "@api/dz"; | ... | @@ -163,6 +163,7 @@ import { insertDzjbxx } from "@api/dz"; |
163 | import { insertGzwjbxx } from "@api/gzw"; | 163 | import { insertGzwjbxx } from "@api/gzw"; |
164 | import { createProcessInstance } from "@api/user"; | 164 | import { createProcessInstance } from "@api/user"; |
165 | import { getZrzDetailByBsm} from "@api/zrz" | 165 | import { getZrzDetailByBsm} from "@api/zrz" |
166 | import { getDzDetailByBsm} from "@api/dz"; | ||
166 | 167 | ||
167 | 168 | ||
168 | export default { | 169 | export default { |
... | @@ -410,7 +411,6 @@ export default { | ... | @@ -410,7 +411,6 @@ export default { |
410 | type: "success", | 411 | type: "success", |
411 | }); | 412 | }); |
412 | this.close(); | 413 | this.close(); |
413 | // 根据res.processInstance.businessId去查询zdbsm TODO | ||
414 | 414 | ||
415 | this.$store.state.zrzbsm = res.processInstance.title; | 415 | this.$store.state.zrzbsm = res.processInstance.title; |
416 | this.$nextTick(()=>{ | 416 | this.$nextTick(()=>{ |
... | @@ -449,6 +449,15 @@ export default { | ... | @@ -449,6 +449,15 @@ export default { |
449 | this.$store.state.newZdbsm = res.result.zdbsm; | 449 | this.$store.state.newZdbsm = res.result.zdbsm; |
450 | } | 450 | } |
451 | }) | 451 | }) |
452 | }else if(type === 'dz'){ | ||
453 | getDzDetailByBsm(bsm).then((res)=>{ | ||
454 | if(res.code === 200){ | ||
455 | this.$store.state.zdbsm=res.result.zdbsm; | ||
456 | this.$store.state.dzbsm=res.result.bsm; | ||
457 | this.$store.state.xmmc=res.result.xmmc; | ||
458 | this.$store.state.newZdbsm = res.result.zdbsm; | ||
459 | } | ||
460 | }) | ||
452 | } | 461 | } |
453 | 462 | ||
454 | }, | 463 | }, |
... | @@ -491,28 +500,62 @@ export default { | ... | @@ -491,28 +500,62 @@ export default { |
491 | this.$refs['ruleForm2'].validate((valid) => { | 500 | this.$refs['ruleForm2'].validate((valid) => { |
492 | if (valid) { | 501 | if (valid) { |
493 | this.ruleForm2.zdbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : ''; | 502 | this.ruleForm2.zdbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : ''; |
494 | insertDzjbxx(this.ruleForm2) | 503 | // insertDzjbxx(this.ruleForm2) |
504 | // .then((res) => { | ||
505 | // if (res.code == "200") { | ||
506 | // this.getTreeByBsm(res.result.bsm,'dz','0,1,2'); | ||
507 | // this.$message({ | ||
508 | // message: "创建成功!", | ||
509 | // type: "success", | ||
510 | // }); | ||
511 | // this.$store.state.zdbsm=res.result.zdbsm; | ||
512 | // this.$store.state.dzbsm=res.result.bsm; | ||
513 | // this.$store.state.xmmc=res.result.xmmc; | ||
514 | // this.$store.state.newZdbsm = res.result.zdbsm; | ||
515 | // this.close(); | ||
516 | // this.$router.push({ | ||
517 | // path: '/dz', query:{ | ||
518 | // source: 1, | ||
519 | // bsm:res.result.bsm, | ||
520 | // auth: '0,1,2' | ||
521 | // } | ||
522 | // }); | ||
523 | // } else { | ||
524 | // this.$message.error("创建失败!"); | ||
525 | // } | ||
526 | // }) | ||
527 | // .catch((error) => {}); | ||
528 | let data = { | ||
529 | params:this.ruleForm2, | ||
530 | workflowName:'新建多幢' | ||
531 | }; | ||
532 | createProcessInstance(data) | ||
495 | .then((res) => { | 533 | .then((res) => { |
496 | if (res.code == "200") { | 534 | console.log(res); |
497 | this.getTreeByBsm(res.result.bsm,'dz','0,1,2'); | 535 | if (res.needShow) { |
536 | this.getTreeByBsm(res.processInstance.title,"dz",'0,1,2'); | ||
498 | this.$message({ | 537 | this.$message({ |
499 | message: "创建成功!", | 538 | message: "创建成功!", |
500 | type: "success", | 539 | type: "success", |
501 | }); | 540 | }); |
502 | this.$store.state.zdbsm=res.result.zdbsm; | 541 | this.close(); |
503 | this.$store.state.dzbsm=res.result.bsm; | 542 | |
504 | this.$store.state.xmmc=res.result.xmmc; | 543 | this.$store.state.dzbsm = res.processInstance.title; |
505 | this.$store.state.newZdbsm = res.result.zdbsm; | 544 | this.$nextTick(()=>{ |
545 | this.loadCache(res.processInstance.title,'dz'); | ||
546 | }) | ||
547 | // todo 跳转到宗地基本信息内容表页面 (预留) | ||
506 | this.close(); | 548 | this.close(); |
507 | this.$router.push({ | 549 | this.$router.push({ |
508 | path: '/dz', query:{ | 550 | path: '/dz', query:{ |
509 | source: 1, | 551 | source: 1, |
510 | bsm:res.result.bsm, | 552 | bsm:res.processInstance.title, |
511 | auth: '0,1,2' | 553 | workitemInstanceId:res.workitemInstance.id, |
554 | auth: '0,1,2' | ||
512 | } | 555 | } |
513 | }); | 556 | }); |
514 | } else { | 557 | } else { |
515 | this.$message.error("创建失败!"); | 558 | this.$message.error("创建失败"); |
516 | } | 559 | } |
517 | }) | 560 | }) |
518 | .catch((error) => {}); | 561 | .catch((error) => {}); | ... | ... |
... | @@ -279,7 +279,7 @@ | ... | @@ -279,7 +279,7 @@ |
279 | </div> | 279 | </div> |
280 | </div> | 280 | </div> |
281 | <div class="sh-btn"> | 281 | <div class="sh-btn"> |
282 | <el-button type="primary" @click="thzd">退回</el-button> | 282 | <el-button type="primary" @click="thzrz">退回</el-button> |
283 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> | 283 | <el-button type="primary" @click="onSubmit" :disabled="disabled" v-if="!workFlowState">提交</el-button> |
284 | <el-button type="primary" @click="shzrz" v-if="workFlowState">审核</el-button> | 284 | <el-button type="primary" @click="shzrz" v-if="workFlowState">审核</el-button> |
285 | </div> | 285 | </div> |
... | @@ -661,6 +661,18 @@ | ... | @@ -661,6 +661,18 @@ |
661 | }; | 661 | }; |
662 | vm.setShDialog(true,data) | 662 | vm.setShDialog(true,data) |
663 | }, | 663 | }, |
664 | |||
665 | thzrz(){ | ||
666 | let data = { | ||
667 | bdcdyh:this.form.bdcdyh, | ||
668 | zl:this.form.zl, | ||
669 | shyj:'', | ||
670 | shr:'admin', | ||
671 | shsj:'2021-01-22' | ||
672 | } | ||
673 | vm.rollback(data); | ||
674 | }, | ||
675 | |||
664 | open() { | 676 | open() { |
665 | const self = this; | 677 | const self = this; |
666 | this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', { | 678 | this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', { | ... | ... |
-
Please register or sign in to post a comment