xuqiang 4 лет назад
Родитель
Сommit
b892c3961f

+ 6 - 0
src/main/pc-space/src/components/ConsignmentInfo.vue

@@ -84,6 +84,9 @@ export default {
         handleClose() {
             this.isShow = false;
         },
+        init() {
+            this.$emit('getDetail');
+        },
         Login() {
             if (this.form.price != '') {
                 this.$http
@@ -99,6 +102,9 @@ export default {
                             .then(res => {
                                 this.$message.success('寄售成功');
                                 this.isShow = false;
+                                setTimeout(() => {
+                                    this.init();
+                                }, 1000);
                             })
                             .catch(e => {
                                 if (e) {

+ 4 - 2
src/main/pc-space/src/views/AssetDetail.vue

@@ -252,7 +252,7 @@
         </el-dialog>
 
         <send ref="send"></send>
-        <consignment-info ref="refFn"></consignment-info>
+        <consignment-info @getDetail="getDetail" ref="refFn"></consignment-info>
     </div>
 </template>
 <script>
@@ -466,8 +466,10 @@ export default {
                         return this.$http.post(`/asset/cancelConsignment?id=${this.info.id}`);
                     })
                     .then(res => {
-                        this.getProduct();
                         this.$message.success('取消寄售');
+                        setTimeout(() => {
+                            this.getDetail();
+                        }, 1000);
                     });
             }
         },