ysy 1 år sedan
förälder
incheckning
b137a1057a

+ 18 - 20
src/views/material/product/components/index-data.vue

@@ -510,13 +510,14 @@
         const loading = this.$loading({ lock: true });
         removeMaterial(row.id)
           .then((msg) => {
+            this.$refs.table.reload({
+              page: 1,
+              categoryLevelId: this.currentId
+            });
             loading.close();
-            this.$message.success('删除' + msg);
-            this.reload();
           })
           .catch((e) => {
             loading.close();
-            // this.$message.error(e.message);
           });
       },
 
@@ -581,27 +582,24 @@
         handler(route) {
           this.pageShow = false;
           if (route.query && route.query.isWt) {
-
             getBomGetById(route.query.businessId).then((res) => {
               let rowData = {
-              categoryId: res.data.categoryId,
-              categoryName: res.data.name,
-              code: res.data.categoryCode,
-              rootPathIdParent: res.data.rootCategoryLevelId,
-              isProduct: res.data.rootCategoryLevelId == 9 ? true : false,
-              versions: res.data.versions,
-              bomType: res.data.bomType,
-              isWt: true
-            };
-            this.$nextTick(() => {
-              this.$refs.bomDrawer.open(rowData);
-              this.pageShow = true; 
-            })
-
+                categoryId: res.data.categoryId,
+                categoryName: res.data.name,
+                code: res.data.categoryCode,
+                rootPathIdParent: res.data.rootCategoryLevelId,
+                isProduct: res.data.rootCategoryLevelId == 9 ? true : false,
+                versions: res.data.versions,
+                bomType: res.data.bomType,
+                isWt: true
+              };
+              this.$nextTick(() => {
+                this.$refs.bomDrawer.open(rowData);
+                this.pageShow = true;
+              });
             });
-
           } else {
-            this.pageShow = true; 
+            this.pageShow = true;
           }
         },
         immediate: true

+ 4 - 0
src/views/material/product/detail.vue

@@ -449,6 +449,10 @@
           rootCategoryCode(this.categoryLevelPathId).then((res) => {
             this.$set(this.form, 'code', res);
           });
+      
+          this.form.createTime = null
+
+     
         }
 
         this.$forceUpdate();