Browse Source

feat: 强制仓回显增加判断

Howie 1 năm trước cách đây
mục cha
commit
43ea1d615a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/views/setting/other.vue

+ 2 - 2
src/views/setting/other.vue

@@ -576,8 +576,8 @@ export default {
     getStockForceDetail() {
       getStockForceDetail().then(res => {
         this.forcedHoldForm = {
-          warehouse: res.data.stockCorrespondId,
-          category: res.data.stockForceCategories.map(k => k.categoryId)
+          warehouse: res.data?.stockCorrespondId || '',
+          category: res.data?.stockForceCategories.map(k => k.categoryId) || []
         }
       })
     },