Преглед изворни кода

feat: 修改返回列表刷新

aXin-0810 пре 2 година
родитељ
комит
96c7b38815

+ 2 - 3
src/views/supply/apply/apply_list.vue

@@ -5,7 +5,7 @@
       ref="pageRef"
       :tableEvents="tableEvents"
       :tableAttributes="tableAttributes"
-      :getList="getList"
+      :getList="getListf"
       :exportList="exportList"
       :operation="operation()"
       :operationColumnWidth="200"
@@ -215,7 +215,6 @@ export default {
 
   created() {
     this.getSalesmanList()
-    // this.getList()
     this.getCategoryList()
     this.isShow = false
     if (this.$route.query && this.$route.query.isShow) {
@@ -234,7 +233,7 @@ export default {
   // },
   methods: {
     // 列表请求函数
-    getList: invoiceListRetailV2,
+    getListf: invoiceListRetailV2,
     // 列表导出函数
     exportList: invoiceListRetailV2Export,
     // 表格列解析渲染数据更改

+ 2 - 2
src/views/supply/apply/components/apply_examine.vue

@@ -369,9 +369,9 @@ export default {
       })
         .then(res => {
           this.$successMsg('审批成功')
-          this.goBack()
-          this.$parent.getList()
           this.$emit('shuaxinlb')
+          this.goBack()
+          this.$parent?.getList()
         })
         .finally(res => {
           this.formLoading = false

+ 4 - 4
src/views/supply/apply/components/apply_form.vue

@@ -702,17 +702,17 @@ export default {
           }
           if (this.listItem) {
             editApply(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              this.$parent.getList()
-              this.$emit('shuaxinlb')
+              this.$parent?.getList()
             })
           } else {
             addApply(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              this.$parent.getList()
-              this.$emit('shuaxinlb')
+              this.$parent?.getList()
             })
           }
         }

+ 4 - 4
src/views/supply/apply/components/apply_return_form.vue

@@ -752,17 +752,17 @@ export default {
           if (this.listItem) {
             params.id = this.listItem.id
             editApply(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              this.$parent.getList()
-              this.$emit('shuaxinlb')
+              this.$parent?.getList()
             })
           } else {
             addApplyReturn(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              this.$parent.getList()
-              this.$emit('shuaxinlb')
+              this.$parent?.getList()
             })
           }
         }

+ 2 - 2
src/views/supply/apply/components/engin_examine.vue

@@ -395,10 +395,10 @@ export default {
             orders: this.goodsList
           }
           examineEngin(params).then(res => {
+            this.$emit('shuaxinlb')
             this.$successMsg()
             this.goBack()
-            // this.$parent.getList()
-            this.$emit('shuaxinlb')
+            // this.$parent?.getList()
           })
         })
         .catch(() => {})

+ 4 - 4
src/views/supply/apply/components/engin_form.vue

@@ -958,17 +958,17 @@ export default {
           if (this.listItem) {
             params.id = this.listItem.id
             editEngin(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              // this.$parent.getList();
-              this.$emit('shuaxinlb')
+              // this.$parent?.getList();
             })
           } else {
             addEngin(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              // this.$parent.getList();
-              this.$emit('shuaxinlb')
+              // this.$parent?.getList();
             })
           }
         }

+ 4 - 4
src/views/supply/apply/components/engin_return_form.vue

@@ -973,17 +973,17 @@ export default {
           if (this.listItem) {
             params.id = this.listItem.id
             editEngin(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('编辑成功')
               this.goBack()
-              // this.$parent.getList();
-              this.$emit('shuaxinlb')
+              // this.$parent?.getList();
             })
           } else {
             addApplyReturn(params).then(res => {
+              this.$emit('shuaxinlb')
               this.$successMsg('添加成功')
               this.goBack()
-              // this.$parent.getList();
-              this.$emit('shuaxinlb')
+              // this.$parent?.getList();
             })
           }
         }