瀏覽代碼

feat: 修改列表返回刷新

aXin-0810 2 年之前
父節點
當前提交
77d759feac

+ 13 - 7
src/views/supply/apply/apply_list.vue

@@ -14,18 +14,23 @@
       :replaceOrNotMap="false"
     >
     </template-page>
-    <ExamineDialog :is-show.sync="isShowExamineDialog" :examine-form.sync="examineForm" />
+    <ExamineDialog
+      :is-show.sync="isShowExamineDialog"
+      :examine-form.sync="examineForm"
+      @submit="submitExamineForm"
+      @shuaxinlb="shuaxinlb"
+    />
     <div class="app-container" v-if="isShowDetail">
-      <ApplyDetail ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" />
+      <ApplyDetail ref="refDetail" :list-item="queryItem" @backListFormDetail="backList" @shuaxinlb="shuaxinlb" />
     </div>
     <div class="app-container" v-if="isShowExamine">
-      <ApplyExamine :list-item="queryItem" @backListFormDetail="backList" />
+      <ApplyExamine :list-item="queryItem" @backListFormDetail="backList" @shuaxinlb="shuaxinlb" />
     </div>
     <div class="app-container" v-if="isShowForm">
-      <ApplyForm :list-item="queryItem" @backListFormDetail="backList" />
+      <ApplyForm :list-item="queryItem" @backListFormDetail="backList" @shuaxinlb="shuaxinlb" />
     </div>
     <div class="app-container" v-if="isShowReturnForm">
-      <ApplyReturnForm :list-item="queryItem" :is-show="isShow" @backListFormDetail="backList" />
+      <ApplyReturnForm :list-item="queryItem" :is-show="isShow" @backListFormDetail="backList" @shuaxinlb="shuaxinlb" />
     </div>
   </div>
 </template>
@@ -488,7 +493,6 @@ export default {
       this.isShowExamine = false
       this.isShowForm = false
       this.isShowReturnForm = false
-      this.$refs.pageRef.refreshList()
     },
 
     handleDelete(id) {
@@ -497,7 +501,9 @@ export default {
         this.$refs.pageRef.refreshList()
       })
     },
-
+    shuaxinlb() {
+      this.$refs.pageRef.refreshList()
+    },
     // 申请/撤回
     handleSubmit(id, examineStatus) {
       submitApply({ id, examineStatus }).then(res => {

+ 1 - 0
src/views/supply/apply/components/apply_examine.vue

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

+ 5 - 3
src/views/supply/apply/components/apply_form.vue

@@ -59,7 +59,7 @@
         </el-col>
         <el-col :xs="24" :sm="8" :lg="8">
           <el-form-item label="附件" prop="fileUrl">
-            <fileUpload :fileList="fileList" multiple/>
+            <fileUpload :fileList="fileList" multiple />
           </el-form-item>
         </el-col>
       </el-row>
@@ -474,7 +474,7 @@ export default {
           k.name = k.fileName
           k.url = k.fileUrl
         })
-        this.fileList =  data.salesOrderPictures
+        this.fileList = data.salesOrderPictures
         // data.orders.forEach(item => {
         //   item.orderId = item.id;
         // })
@@ -600,7 +600,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.tableGoodsList = []
       // this.getGoodsList();
@@ -705,12 +705,14 @@ export default {
               this.$successMsg('编辑成功')
               this.goBack()
               this.$parent.getList()
+              this.$emit('shuaxinlb')
             })
           } else {
             addApply(params).then(res => {
               this.$successMsg('添加成功')
               this.goBack()
               this.$parent.getList()
+              this.$emit('shuaxinlb')
             })
           }
         }

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

@@ -516,7 +516,7 @@ export default {
           k.name = k.fileName
           k.url = k.fileUrl
         })
-        this.fileList =  data.salesOrderPictures
+        this.fileList = data.salesOrderPictures
         // data.orders.forEach(item => {
         //   item.orderId = item.id;
         // })
@@ -647,7 +647,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       // this.tableGoodsList = [];
       this.getSalesGoodsList()
@@ -755,12 +755,14 @@ export default {
               this.$successMsg('编辑成功')
               this.goBack()
               this.$parent.getList()
+              this.$emit('shuaxinlb')
             })
           } else {
             addApplyReturn(params).then(res => {
               this.$successMsg('添加成功')
               this.goBack()
               this.$parent.getList()
+              this.$emit('shuaxinlb')
             })
           }
         }

+ 1 - 0
src/views/supply/apply/components/engin_examine.vue

@@ -398,6 +398,7 @@ export default {
             this.$successMsg()
             this.goBack()
             // this.$parent.getList()
+            this.$emit('shuaxinlb')
           })
         })
         .catch(() => {})

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

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

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

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