lxf il y a 1 an
Parent
commit
5c3b07e96c
1 fichiers modifiés avec 9 ajouts et 4 suppressions
  1. 9 4
      src/components/process/purchase.vue

+ 9 - 4
src/components/process/purchase.vue

@@ -98,11 +98,11 @@
             </el-table-column>
             <el-table-column label="可采购数量" width="100">
               <template #default="{ row }">
-                <span v-if="route.query.processType && route.query.processType != 30">
-                  {{ Number(Math.round(row.quantity - row.purchasedQuantity - row.frozenQuantity)) }}
+                <span v-if="route.query.processType && route.query.processType == 30">
+                  {{ Number(Math.round(row.quantity - row.purchasedQuantity - row.frozenQuantity + row.thisTimeQuantity)) }}
                 </span>
                 <span v-else>
-                  {{ Number(Math.round(row.quantity - row.purchasedQuantity - row.frozenQuantity + row.thisTimeQuantity)) }}
+                  {{ Number(Math.round(row.quantity - row.purchasedQuantity - row.frozenQuantity)) }}
                 </span>
               </template>
             </el-table-column>
@@ -566,6 +566,10 @@ onMounted(() => {
     proxy.post("/applyBuy/detail", { id: route.query.subscribeId }).then((res) => {
       if (res.applyBuyBomList && res.applyBuyBomList.length > 0) {
         formData.data.purchaseBomList = res.applyBuyBomList.map((item) => {
+          let frozenQuantity = 0;
+          if (item.frozenQuantity) {
+            frozenQuantity = item.frozenQuantity;
+          }
           return {
             applyBuyBomId: item.id,
             bomSpecId: item.bomSpecId,
@@ -580,9 +584,10 @@ onMounted(() => {
             bomSpecHeight: item.bomSpecHeight,
             quantity: item.quantity,
             purchasedQuantity: item.purchaseQuantity,
-            frozenQuantity: item.frozenQuantity,
+            frozenQuantity: frozenQuantity,
           };
         });
+        console.log(formData.data.purchaseBomList);
       }
     });
   }