08f5ecde by zhaoqian

批量覆盖单元号

1 parent 8a14a55c
...@@ -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) => {
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 }) 652 })
653 .then(() => {
654 batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,2).then(
655 (res) => {
656 if (res.code === 200) {
657 this.$message.success("生成完成!");
658 }
659 });
660 })
661 .catch(action => {
662 if(action === 'cancel'){
663 batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,1).then(
664 (res) => {
665 if (res.code === 200) {
666 this.$message.success("生成完成!");
667 }
668 });
669 }
670 });
685 }, 671 },
686 672
687 //获取各项单元状态统计数据 673 //获取各项单元状态统计数据
......