批量覆盖单元号
Showing
1 changed file
with
10 additions
and
24 deletions
... | @@ -644,44 +644,30 @@ export default { | ... | @@ -644,44 +644,30 @@ export default { |
644 | }, | 644 | }, |
645 | 645 | ||
646 | open(hasGenerateCount,unGenerateCount) { | 646 | open(hasGenerateCount,unGenerateCount) { |
647 | const h = this.$createElement; | 647 | |
648 | this.$msgbox({ | 648 | this.$confirm('未生成单元号有'+unGenerateCount+'户,已经生成单元号有'+hasGenerateCount+'户,是否覆盖全部重新生成?', '确认信息', { |
649 | title: '消息', | 649 | distinguishCancelAndClose: true, |
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: '覆盖全部生成', | 650 | confirmButtonText: '覆盖全部生成', |
657 | cancelButtonText: '跳过已生成单元号户', | 651 | cancelButtonText: '跳过已生成单元号户' |
658 | beforeClose: (action, instance, done) => { | 652 | }) |
659 | if (action === 'confirm') { | 653 | .then(() => { |
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( | 654 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,2).then( |
666 | (res) => { | 655 | (res) => { |
667 | if (res.code === 200) { | 656 | if (res.code === 200) { |
668 | this.$message.success("生成完成!"); | 657 | this.$message.success("生成完成!"); |
669 | } | 658 | } |
670 | }); | 659 | }); |
671 | instance.confirmButtonLoading = false; | 660 | }) |
672 | }, 300); | 661 | .catch(action => { |
673 | }, 3000); | 662 | if(action === 'cancel'){ |
674 | } else { | ||
675 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,1).then( | 663 | batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,1).then( |
676 | (res) => { | 664 | (res) => { |
677 | if (res.code === 200) { | 665 | if (res.code === 200) { |
678 | this.$message.success("生成完成!"); | 666 | this.$message.success("生成完成!"); |
679 | } | 667 | } |
680 | }); | 668 | }); |
681 | done(); | ||
682 | } | ||
683 | } | 669 | } |
684 | }) | 670 | }); |
685 | }, | 671 | }, |
686 | 672 | ||
687 | //获取各项单元状态统计数据 | 673 | //获取各项单元状态统计数据 | ... | ... |
-
Please register or sign in to post a comment