单元号重新覆盖生成和跳过
Showing
2 changed files
with
49 additions
and
4 deletions
... | @@ -84,13 +84,14 @@ export function getLpbTj (data) { | ... | @@ -84,13 +84,14 @@ export function getLpbTj (data) { |
84 | * zrzbsm 自然幢标识码 , | 84 | * zrzbsm 自然幢标识码 , |
85 | * dpdm 自然幢号 , | 85 | * dpdm 自然幢号 , |
86 | */ | 86 | */ |
87 | export function batchGeneratorBdcdyh (dpdm,zrzbsm) { | 87 | export function batchGeneratorBdcdyh (dpdm,zrzbsm,override) { |
88 | return request({ | 88 | return request({ |
89 | url: 'system/generator/batchGeneratorBdcdyh', | 89 | url: 'system/generator/batchGeneratorBdcdyh', |
90 | method: 'get', | 90 | method: 'get', |
91 | params: { | 91 | params: { |
92 | zrzbsm:zrzbsm, | 92 | zrzbsm:zrzbsm, |
93 | dpdm:dpdm, | 93 | dpdm:dpdm, |
94 | override:override | ||
94 | }, | 95 | }, |
95 | }) | 96 | }) |
96 | } | 97 | } | ... | ... |
... | @@ -630,16 +630,60 @@ export default { | ... | @@ -630,16 +630,60 @@ export default { |
630 | //批量添加不动产单元号 | 630 | //批量添加不动产单元号 |
631 | addBdcdyh() { | 631 | addBdcdyh() { |
632 | // this.pd[0].bsm //自然幢标识码 | 632 | // this.pd[0].bsm //自然幢标识码 |
633 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm).then( | 633 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,0).then( |
634 | (res) => { | 634 | (res) => { |
635 | if (res.code === 200) { | 635 | if (res.code === 200) { |
636 | this.$message.success("生成完成!"); | 636 | this.$message.success("生成完成!"); |
637 | } else { | 637 | } else if(res.code === 206){ |
638 | this.$message.warning(res.message); | 638 | let hasGenerateCount = res.result.hasGenerateCount; |
639 | let unGenerateCount = res.result.unGenerateCount; | ||
640 | this.open(hasGenerateCount,unGenerateCount); | ||
639 | } | 641 | } |
640 | } | 642 | } |
641 | ); | 643 | ); |
642 | }, | 644 | }, |
645 | |||
646 | open(hasGenerateCount,unGenerateCount) { | ||
647 | const h = this.$createElement; | ||
648 | this.$msgbox({ | ||
649 | title: '消息', | ||
650 | message: h('p', null, [ | ||
651 | h('span', null, '未生成单元号有 '+unGenerateCount+'户,'), | ||
652 | h('span', null, '已经生成单元号有 '+hasGenerateCount+'户,'), | ||
653 | h('span', null, '是否覆盖全部重新生成?'), | ||
654 | ]), | ||
655 | showCancelButton: true, | ||
656 | confirmButtonText: '覆盖全部生成', | ||
657 | cancelButtonText: '跳过已生成单元号户', | ||
658 | beforeClose: (action, instance, done) => { | ||
659 | if (action === 'confirm') { | ||
660 | instance.confirmButtonLoading = true; | ||
661 | instance.confirmButtonText = '执行中...'; | ||
662 | setTimeout(() => { | ||
663 | done(); | ||
664 | setTimeout(() => { | ||
665 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,2).then( | ||
666 | (res) => { | ||
667 | if (res.code === 200) { | ||
668 | this.$message.success("生成完成!"); | ||
669 | } | ||
670 | }); | ||
671 | instance.confirmButtonLoading = false; | ||
672 | }, 300); | ||
673 | }, 3000); | ||
674 | } else { | ||
675 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,1).then( | ||
676 | (res) => { | ||
677 | if (res.code === 200) { | ||
678 | this.$message.success("生成完成!"); | ||
679 | } | ||
680 | }); | ||
681 | done(); | ||
682 | } | ||
683 | } | ||
684 | }) | ||
685 | }, | ||
686 | |||
643 | //获取各项单元状态统计数据 | 687 | //获取各项单元状态统计数据 |
644 | getDyztBsmList() { | 688 | getDyztBsmList() { |
645 | let data = { | 689 | let data = { | ... | ... |
-
Please register or sign in to post a comment