Browse Source

修改bug

qukaidi 2 years ago
parent
commit
4e536111dd

+ 2 - 2
src/views/InventoryManagement/inventory/index.vue

@@ -291,10 +291,10 @@ export default {
             this.inStockVisible = true;
         },
         goBack() {
-            if (this.$route.query.id) {
+            if (this.$route.query.check) {
                 this.$router.$avueRouter.closeTag(this.$route.fullPath);
                 this.$router.push({
-                    path: "/purchasingManagement/inStock/index"
+                    path: "/InventoryManagement/inventory/index"
                 });
             }
             this.detailData = this.$options.data().detailData;

+ 6 - 0
src/views/financing/financingManagement/index.vue

@@ -192,6 +192,12 @@ export default {
     },
     //返回列表
     backToList() {
+      if (this.$route.query.check) {
+        this.$router.$avueRouter.closeTag(this.$route.fullPath);
+        this.$router.push({
+          path: "/financing/financingManagement/index"
+        });
+      }
       this.detailData = this.$options.data().detailData;
       this.show = true;
       this.onLoad(this.page, this.search);

+ 1 - 1
src/views/purchasingManagement/inStock/index.vue

@@ -195,7 +195,7 @@ export default {
             });
         },
         goBack() {
-            if (this.$route.query.id) {
+            if (this.$route.query.check) {
                 this.$router.$avueRouter.closeTag(this.$route.fullPath);
                 this.$router.push({
                     path: "/purchasingManagement/inStock/index"

+ 17 - 6
src/views/salesManagement/outStock/detailsPage.vue

@@ -147,7 +147,7 @@
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess, revokeWarehousing } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess, revokeWarehousing,delItem } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
@@ -411,11 +411,21 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.$message({
-          type: "success",
-          message: "删除成功!"
-        });
-        this.itemsVOList.splice(row.$index, 1);
+        if (row.id) {
+          delItem({ itemId: row.id }).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.itemsVOList.splice(row.$index, 1);
+          });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.itemsVOList.splice(row.$index, 1);
+        }
       });
     },
     getDetail(id) {
@@ -448,6 +458,7 @@ export default {
           delete res.data.data.status
           res.data.data.stockTime = getCurrentDate()
           res.data.data.itemsVOList.forEach(e => {
+            e.storageInQuantity=e.balanceNumber
             delete e.id
           })
           this.form = res.data.data;

+ 8 - 2
src/views/salesManagement/outStock/index.vue

@@ -183,10 +183,16 @@ export default {
             this.show = false;
         },
         goBack() {
-            if (this.$route.query.id) {
+            if (this.$route.query.generateId) {
                 this.$router.$avueRouter.closeTag(this.$route.fullPath);
                 this.$router.push({
-                    path: "/purchasingManagement/inStock/index"
+                    path: "/salesManagement/outStock/index"
+                });
+            }
+            if (this.$route.query.check) {
+                this.$router.$avueRouter.closeTag(this.$route.fullPath);
+                this.$router.push({
+                    path: "/salesManagement/outStock/index"
                 });
             }
             this.detailData = this.$options.data().detailData;