Browse Source

排期操作失败,弹框不消失

wangziqian 5 years ago
parent
commit
9ac0d941dc

+ 6 - 6
src/views/projectManage/projectList/components/modifySchedule.vue

@@ -287,25 +287,25 @@ export default {
       const res = await scheduleCreate(params)
       if (res.code === 200) {
         this.$message({ message: '添加成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     async scheduleUpdate(params) { // 更新排期
       const res = await scheduleUpdate(params)
       if (res.code === 200) {
         this.$message({ message: '更新成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     async scheduleDelete() { // 删除排期
       const res = await scheduleDelete(this.form.id)
       if (res.code === 200) {
         this.$message({ message: '删除成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     confirmForm() { // 确认提交表单
       if (this.isDeleteStatus) {

+ 6 - 6
src/views/projectManage/requirement/components/modifySchedule.vue

@@ -288,25 +288,25 @@ export default {
       const res = await scheduleCreate(params)
       if (res.code === 200) {
         this.$message({ message: '添加成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     async scheduleUpdate(params) { // 更新排期
       const res = await scheduleUpdate(params)
       if (res.code === 200) {
         this.$message({ message: '修改成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     async scheduleDelete() { // 删除排期
       const res = await scheduleDelete(this.form.id)
       if (res.code === 200) {
         this.$message({ message: '删除成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     confirmForm() { // 确认提交表单
       if (this.isDeleteStatus) {

+ 6 - 6
src/views/projectManage/taskList/components/modifySchedule.vue

@@ -273,25 +273,25 @@ export default {
       const res = await scheduleCreate(params)
       if (res.code === 200) {
         this.$message({ message: '添加成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     async scheduleUpdate(params) { // 更新排期
       const res = await scheduleUpdate(params)
       if (res.code === 200) {
         this.$message({ message: '更新成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     async scheduleDelete() { // 删除排期
       const res = await scheduleDelete(this.form.id)
       if (res.code === 200) {
         this.$message({ message: '删除成功', type: 'success', duration: 1000, offset: 150 })
+        this.$emit('update')
+        this.cancel()
       }
-      this.$emit('update')
-      this.cancel()
     },
     confirmForm() { // 确认提交表单
       if (this.isDeleteStatus) {