Browse Source

库存查询bug

cz 1 year ago
parent
commit
c263937231

+ 1 - 0
src/views/processApproval/components/SendPurchasePayment.vue

@@ -561,6 +561,7 @@ watch(
     }
     if (route.query.processType == 10 || route.query.processType == 20) {
       formOption.readonly = true;
+      formOption.btnConfig.isNeed = false;
       formOptionOne.readonly = true;
     }
   },

+ 1 - 1
src/views/purchase-sales/inventory-management/inventoryQuery/index.vue

@@ -12,7 +12,7 @@
     @search="onRefresh"
   />
   <van-tabs v-model:active="active" @change="handleChangeTab">
-    <van-tab :title="$t('common.all')" name="all"></van-tab>
+    <van-tab :title="$t('inventoryQuery.all')" name="all"></van-tab>
     <van-tab
       v-for="(item, index) in warehouseData"
       :title="item.name"

+ 17 - 11
src/views/purchase-sales/inventory-management/outInList/index.vue

@@ -35,7 +35,7 @@
         <div style="margin-top: 10px">
           <div v-for="(item, index) in listData" :key="item.id" class="item">
             <div class="row">
-              <div class="left">{{$t('inventoryQuery.operationType')}}</div>
+              <div class="left">{{ $t("inventoryQuery.operationType") }}</div>
               <div class="center">
                 {{ item.type }}
               </div>
@@ -44,19 +44,21 @@
               </div>
             </div>
             <div class="row">
-              <div class="left">{{$t('inventoryQuery.warehouseName')}}</div>
+              <div class="left">{{ $t("inventoryQuery.warehouseName") }}</div>
               <div class="center">
                 {{ item.warehouseName }}
               </div>
             </div>
             <div class="row">
-              <div class="left">{{$t('inventoryQuery.itemName')}}</div>
+              <div class="left">{{ $t("inventoryQuery.itemName") }}</div>
               <div class="center">
                 {{ item.productName }}
               </div>
             </div>
             <div class="row">
-              <div class="left">{{$t('inventoryQuery.operationQuantity')}}</div>
+              <div class="left">
+                {{ $t("inventoryQuery.operationQuantity") }}
+              </div>
               <div class="center">
                 {{ item.quantity }}
               </div>
@@ -78,6 +80,7 @@ const req = ref({
   pageNum: 1,
   keyword: null,
   type: "",
+  opType: "",
   warehouseId: "",
   productId: "",
 });
@@ -89,15 +92,15 @@ const warehouseData = ref([]);
 const active = ref("all");
 const listConfig = ref([
   {
-    label: proxy.t('inventoryQuery.itemType'),
+    label: proxy.t("inventoryQuery.itemType"),
     prop: "type",
   },
   {
-    label: proxy.t('inventoryQuery.itemName'),
+    label: proxy.t("inventoryQuery.itemName"),
     prop: "productName",
   },
   {
-    label: proxy.t('inventoryQuery.inventoryQuantity'),
+    label: proxy.t("inventoryQuery.inventoryQuantity"),
     prop: "quantity",
   },
 ]);
@@ -136,9 +139,12 @@ const getList = (type) => {
   proxy
     .post("/stockJournalDetails/page", req.value)
     .then((res) => {
-      res.data.rows.map(item => {
-        item.type = item.type === 1 ? proxy.t('inventoryQuery.warehousing') : proxy.t('inventoryQuery.outbound')
-      })
+      res.data.rows.map((item) => {
+        item.type =
+          item.opType === 1
+            ? proxy.t("inventoryQuery.warehousing")
+            : proxy.t("inventoryQuery.outbound");
+      });
       listData.value =
         type === "refresh"
           ? res.data.rows
@@ -162,7 +168,7 @@ const getWarehouseData = () => {
 };
 
 const handleChangeTab = () => {
-  req.value.type = active.value === "all" ? "" : active.value;
+  req.value.opType = active.value === "all" ? "" : active.value;
   req.value.pageNum = 1;
   listData.value = [];
   getList();