lxf hai 1 ano
pai
achega
4b1af39729
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  1. 10 1
      src/components/process/order.vue

+ 10 - 1
src/components/process/order.vue

@@ -77,6 +77,10 @@
                 <el-table-column label="产品" width="280">
                   <template #default="{ row }">
                     <div style="width: 100%">
+                      <div style="line-height: 35px" v-if="!formOption.disabled">
+                        <span style="color: black; font-weight: 700">库存数量: </span>
+                        <span>{{ item.inventoryQuantity }}</span>
+                      </div>
                       <div style="line-height: 35px">
                         <span style="color: black; font-weight: 700">商品名称: </span>
                         <span>{{ item.wlnSkuName }}</span>
@@ -653,7 +657,7 @@ const selectProduct = (row, SKU) => {
     ElMessage("添加失败");
   }
 };
-const pushProduct = (res, SKU, row) => {
+const pushProduct = async (res, SKU, row) => {
   let data = proxy.deepClone(res);
   let orderSkuBomList = [];
   if (data.skuSpecList && data.skuSpecList.length > 0) {
@@ -671,6 +675,10 @@ const pushProduct = (res, SKU, row) => {
       }
     }
   }
+  let inventoryQuantity = 0;
+  let getSkuInventoryQuantity = await proxy.post("/skuSpec/getSkuInventoryQuantity", { id: row.id }).then((resQuantity) => {
+    inventoryQuantity = resQuantity;
+  });
   formData.data.orderSkuList.push({
     wlnSkuName: SKU.name,
     skuId: row.skuId,
@@ -691,6 +699,7 @@ const pushProduct = (res, SKU, row) => {
     orderSkuBomList: orderSkuBomList,
     blueprint: row.designImgUrl,
     productionDocument: row.sharedFolder,
+    inventoryQuantity: inventoryQuantity,
   });
   ElMessage({ message: "添加成功", type: "success" });
 };