Bläddra i källkod

fix:5348【库存调拨】今天新入库的数据进行拆批了,去调拨,界面可用数量显示的是拆批前的数量;5352【销售订单】创库存式订单,点击左侧分类界面一直加载中,点击上面查询也这样==验证了5316的问题,进行操作存在的

mlchen 2 dagar sedan
förälder
incheckning
b47f6cf2ba

+ 17 - 9
src/views/warehouseManagement/stockManagement/components/selectType.vue

@@ -305,14 +305,17 @@
       // 获取动态表头
       getFieldModel() {
         storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
-          let newRes = res.map((m) => {
-            return {
-              prop: 'extField.' + m.prop,
-              label: m.label,
-              align: 'center',
-              showOverflowTooltip: true
-            };
-          });
+          let newRes = (Array.isArray(res) ? res : [])
+            .filter((m) => m && m.prop)
+            .map((m) => {
+              return {
+                prop: 'extField.' + m.prop,
+                columnKey: 'extField.' + m.prop,
+                label: m.label,
+                align: 'center',
+                showOverflowTooltip: true
+              };
+            });
           this.newColumns = [...newRes];
         });
       },
@@ -322,7 +325,9 @@
       /* 刷新表格 */
       reload(where) {
         this.$nextTick(() => {
-          this.$refs.multipleTable.reload({ page: 1, where });
+          if (this.$refs.multipleTable) {
+            this.$refs.multipleTable.reload({ page: 1, where: where || {} });
+          }
         });
       },
       onConfirm() {
@@ -352,6 +357,9 @@
       //   this.multipleSelection = val;
       // },
       handleNodeClick(data) {
+        if (!data || !data.id) {
+          return;
+        }
         console.log('-----------------');
         console.log(data);
         this.classificationId = data.id;