فهرست منبع

fix: 入库仓库只能入到自己所管仓库

liujt 1 هفته پیش
والد
کامیت
4049bd6e0f

+ 6 - 1
src/views/bpm/handleTask/components/productionWarehousing/components/WarehousingDialog.vue

@@ -69,6 +69,11 @@ export default {
       measureQuantity: 0
     };
   },
+  computed: {
+    userInfo() {
+      return this.$store.getters.user.info;
+    },
+  },
   methods: {
     changeWarehouse() {
       this.tableDate = []
@@ -120,7 +125,7 @@ export default {
       this.tableDate.splice(index, 1);
     },
     async getWarehouseList(categoryType) {
-      const res = await warehouseDefinition.list({ inventoryType: categoryType });
+      const res = await warehouseDefinition.list({ inventoryType: categoryType, ownerId: this.userInfo.userId });
       console.log(res);
       this.warehouseList = res.map((item) => {
         return { ...item, name: item.name };

+ 7 - 2
src/views/bpm/stockManagement/components/WarehousingDialog.vue

@@ -69,6 +69,11 @@ export default {
       measureQuantity: 0
     };
   },
+  computed: {
+    userInfo() {
+      return this.$store.getters.user.info;
+    },
+  },
   methods: {
     changeWarehouse() {
       this.tableDate = []
@@ -120,8 +125,8 @@ export default {
       this.tableDate.splice(index, 1);
     },
     async getWarehouseList(categoryType) {
-      const res = await warehouseDefinition.list({ inventoryType: categoryType });
-      console.log(res);
+      const res = await warehouseDefinition.list({ inventoryType: categoryType, ownerId: this.userInfo.userId });
+      console.log('仓库列表', res);
       this.warehouseList = res.map((item) => {
         return { ...item, name: item.name };
       });