From 847e6cc3ce61641b478c77b52565516745e1d860 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期一, 19 一月 2026 15:47:51 +0800
Subject: [PATCH] feat(inventory): 生产出库添加

---
 src/views/inventoryManagement/issueManagement/index.vue |   81 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 78 insertions(+), 3 deletions(-)

diff --git a/src/views/inventoryManagement/issueManagement/index.vue b/src/views/inventoryManagement/issueManagement/index.vue
index fa130b8..6f82adc 100644
--- a/src/views/inventoryManagement/issueManagement/index.vue
+++ b/src/views/inventoryManagement/issueManagement/index.vue
@@ -152,6 +152,76 @@
                       @pagination="paginationChange" />
         </div>
       </el-tab-pane>
+      <el-tab-pane label="鐢熶骇鍑哄簱"
+                   name="product">
+        <div class="search_form">
+          <div>
+            <span class="search_title ml10">浜у搧澶х被锛�</span>
+            <el-input v-model="searchForm.productCategory"
+                      style="width: 240px"
+                      placeholder="璇疯緭鍏�"
+                      clearable />
+            <el-button type="primary"
+                       @click="handleQuery"
+                       style="margin-left: 10px">鎼滅储</el-button>
+          </div>
+          <div>
+            <el-button @click="handleOut">瀵煎嚭</el-button>
+          </div>
+        </div>
+        <div class="table_list">
+          <el-table :data="tableData"
+                    border
+                    v-loading="tableLoading"
+                    @selection-change="handleSelectionChange"
+                    :expand-row-keys="expandedRowKeys"
+                    :row-key="row => row.id"
+                    show-summary
+                    style="width: 100%"
+                    :summary-method="summarizeMainTable"
+                    height="calc(100vh - 18.5em)">
+            <el-table-column align="center"
+                             type="selection"
+                             width="55" />
+            <el-table-column align="center"
+                             label="搴忓彿"
+                             type="index"
+                             width="60" />
+            <el-table-column label="浜у搧澶х被"
+                             prop="productCategory"
+                             show-overflow-tooltip />
+            <el-table-column label="瑙勬牸鍨嬪彿"
+                             prop="specificationModel"
+                             show-overflow-tooltip />
+            <el-table-column label="鍗曚綅"
+                             prop="unit"
+                             width="70"
+                             show-overflow-tooltip />
+            <el-table-column label="鍓╀綑搴撳瓨"
+                             prop="inboundNum0"
+                             width="90"
+                             show-overflow-tooltip />
+            <el-table-column fixed="right"
+                             label="鎿嶄綔"
+                             min-width="60"
+                             align="center">
+              <template #default="scope">
+                <el-button link
+                           :disabled="scope.row.inboundNum0 <= 0"
+                           type="primary"
+                           size="small"
+                           @click="openForm(scope.row);">棰嗙敤</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination v-show="total > 0"
+                      :total="total"
+                      layout="total, sizes, prev, pager, next, jumper"
+                      :page="page.current"
+                      :limit="page.size"
+                      @pagination="paginationChange" />
+        </div>
+      </el-tab-pane>
     </el-tabs>
     <el-dialog v-model="dialogFormVisible"
                :title="getDialogTitle()"
@@ -217,6 +287,7 @@
   import {
     getStockInPage,
     getStockInPageByProduction,
+    getStockInPageByProductProduction,
   } from "@/api/inventoryManagement/stockIn.js";
   import {
     getStockManagePage,
@@ -287,7 +358,9 @@
     let apiCall;
     if (activeTab.value === "production") {
       apiCall = getStockInPageByProduction(params);
-    } else {
+    } else if (activeTab.value === "product") {
+      apiCall = getStockInPageByProductProduction(params);
+    }else {
       apiCall = getStockInPage(params);
     }
     apiCall
@@ -345,13 +418,14 @@
 
   const currentRowNum = ref(0);
   const salesLedgerProductId = ref(null);
-
+const productModelId = ref(null);
   // 鎵撳紑寮规
   const openForm = async row => {
     dialogFormVisible.value = true;
     currentRowId.value = row.id;
     currentRowNum.value = row.inboundNum0;
     salesLedgerProductId.value = row.salesLedgerProductId;
+    productModelId.value = row.productModelId;
     form.value = {};
     // 鍒濆鍖栬〃鍗曟暟鎹�
     form.value = {
@@ -381,7 +455,7 @@
     }
     proxy.$refs["formRef"].validate(valid => {
       if (valid && currentRowId.value) {
-        const typeMap = { production: 2, purchase: 1 };
+        const typeMap = { production: 2, purchase: 1, product: 4 };
         const outData = {
           id: currentRowId.value, // 鍘熷璁板綍ID
           salesLedgerProductId: salesLedgerProductId.value,
@@ -389,6 +463,7 @@
           time: form.value.inboundTime, // 鍑哄簱鏃堕棿
           userId: form.value.nickName, // 鎿嶄綔浜�
           type: typeMap[activeTab.value], // 鍑哄簱绫诲瀷锛氶噰璐�1锛岀敓浜�2
+          productModelId: productModelId.value,
         };
         console.log(outData);
 

--
Gitblit v1.9.3