瀏覽代碼

填报成功后返回消息按照Dialog方式提示

seyason 1 年之前
父節點
當前提交
92ae00403b

+ 9 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -2271,11 +2271,18 @@ import timetoolVue from '../timetool/timetool.vue';
                         if(res.code == "ok") {
                             this.$toast.clear();
                             if(res.msg!=null){
-                                this.$toast.success(res.msg);                                    
+                                this.$dialog.alert({
+                                    message: res.msg,
+                                }).then(() => {
+                                    // on close
+                                    this.$router.push("/index");
+                                });
                             }else{
                                 this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
+                                setTimeout(()=> {
+                                    that.$router.push("/index");
+                                }, 1000);
                             }
-                            this.$router.push("/index");
                         } else {
                             this.$toast.clear();
                             this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);

+ 13 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -2008,8 +2008,19 @@
                     // this.flgLg = true
                     if(res.code == "ok") {
                         this.$toast.clear();
-                        this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
-                        this.$router.push("/index");
+                        if(res.msg!=null){
+                            this.$dialog.alert({
+                                message: res.msg,
+                            }).then(() => {
+                                // on close
+                                this.$router.push("/index");
+                            });
+                        }else{
+                            this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
+                            setTimeout(()=> {
+                                that.$router.push("/index");
+                            }, 1000);
+                        }
                     } else {
                         this.$toast.clear();
                         this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);