From d50a93ffd0baa588ad4650b7584b608cdc761990 Mon Sep 17 00:00:00 2001
From: lishenao <3065849776@qq.com>
Date: 星期四, 03 七月 2025 09:45:42 +0800
Subject: [PATCH] 库存管理数据修改

---
 src/views/inventoryManagement/dispatchLog/index.vue |   94 +++++++++++++++++++++++-----------------------
 1 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/src/views/inventoryManagement/dispatchLog/index.vue b/src/views/inventoryManagement/dispatchLog/index.vue
index 7f8313a..aa30f73 100644
--- a/src/views/inventoryManagement/dispatchLog/index.vue
+++ b/src/views/inventoryManagement/dispatchLog/index.vue
@@ -284,24 +284,24 @@
 import useUserStore from "@/store/modules/user";
 import { userListNoPage } from "@/api/system/user.js";
 import {
-  ledgerListPage,
-  customerList,
-  addOrUpdateSalesLedger,
-  getSalesLedgerWithProducts,
-  delLedger,
-} from "@/api/salesManagement/salesLedger.js";
-import {
-  getStockOutPage
+  getStockOutPage,
+  addStockOut,
+  updateStockOut,
+  delStockOut,
+  exportStockOut
 } from "@/api/inventoryManagement/stockOut.js";
 
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
 const tableData = ref([]);
-const productData = ref([]);
+// const productData = ref([]);
 const selectedRows = ref([]);
 const userList = ref([]);
-const customerOption = ref([]);
+// const customerOption = ref([]);
 const tableLoading = ref(false);
+const supplierList = ref([])
+const productList = ref([])
+const productModelList = ref([])
 const page = reactive({
   current: 1,
   size: 100,
@@ -314,30 +314,30 @@
 const dialogFormVisible = ref(false);
 const data = reactive({
   searchForm: {
-    customerName: "",
+    supplierName: "",
   },
   form: {
-    salesContractNo: "",
-    salesman: "",
-    customerContractNo: "",
-    customerId: "",
-    projectName: "",
-    entryPerson: "",
-    entryDate: "",
-    maintenanceTime: "",
-    productData: [],
-    executionDate: "",
+    supplierId: null,
+    supplierName: '',
+    productId: null,
+    productCategory: '',
+    specificationModel: '',
+    unit: '',
+    inboundTime: '',
+    inboundBatch: '',
+    inboundQuantity: 0,
+    taxInclusiveUnitPrice: 0,
+    taxInclusiveTotalPrice: 0,
+    taxRate: 0,
+    taxExclusiveTotalPrice: 0,
+    userId: null,
+    nickname: ''
   },
   rules: {
-    salesman: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
-    customerContractNo: [
-      { required: true, message: "璇疯緭鍏�", trigger: "blur" },
-    ],
-    customerId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
-    projectName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
-    entryPerson: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
-    entryDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
-    executionDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
+    supplierId: [{ required: true, message: '璇烽�夋嫨渚涘簲鍟�', trigger: 'change' }],
+    productRecordid: [{ required: true, message: '璇烽�夋嫨浜у搧', trigger: 'change' }],
+    inboundTime: [{ required: true, message: '璇烽�夋嫨鍏ュ簱鏃堕棿', trigger: 'change' }],
+    inboundQuantity: [{ required: true, message: '璇疯緭鍏ュ叆搴撴暟閲�', trigger: 'blur' }]
   },
 });
 const { searchForm, form, rules } = toRefs(data);
@@ -368,24 +368,24 @@
       tableLoading.value = false;
     });
 };
-const findNodeById = (nodes, productId) => {
-  for (let i = 0; i < nodes.length; i++) {
-    if (nodes[i].value === productId) {
-      return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
-    }
-    if (nodes[i].children && nodes[i].children.length > 0) {
-      const foundNode = findNodeById(nodes[i].children, productId);
-      if (foundNode) {
-        return foundNode.label; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
-      }
-    }
-  }
-  return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
-};
+// const findNodeById = (nodes, productId) => {
+//   for (let i = 0; i < nodes.length; i++) {
+//     if (nodes[i].value === productId) {
+//       return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+//     }
+//     if (nodes[i].children && nodes[i].children.length > 0) {
+//       const foundNode = findNodeById(nodes[i].children, productId);
+//       if (foundNode) {
+//         return foundNode.label; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+//       }
+//     }
+//   }
+//   return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+// };
 // 琛ㄦ牸閫夋嫨鏁版嵁
 const handleSelectionChange = (selection) => {
   // 杩囨护鎺夊瓙鏁版嵁
-  selectedRows.value = selection.filter((item) => item.children !== undefined);
+  selectedRows.value = selection.filter((item) => item.id);
   console.log("selection", selectedRows.value);
 };
 const expandedRowKeys = ref([]);
@@ -468,7 +468,7 @@
     type: "warning",
   })
     .then(() => {
-      proxy.download("/sales/ledger/export", {}, "鍑哄簱鍙拌处.xlsx");
+      proxy.download("/stockmanagement/export", {}, "鍑哄簱鍙拌处.xlsx");
     })
     .catch(() => {
       proxy.$modal.msg("宸插彇娑�");
@@ -489,7 +489,7 @@
     type: "warning",
   })
     .then(() => {
-      delLedger(ids).then((res) => {
+      delStockOut(ids).then((res) => {
         proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
         getList();
       });

--
Gitblit v1.9.3