From 378c343c859f135b18d39f994c247598bc9a2b9a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 15 一月 2026 17:55:24 +0800
Subject: [PATCH] Merge branch 'dev_天津军泰伟业' of http://114.132.189.42:9002/r/product-inventory-management into dev_天津军泰伟业

---
 src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue |   96 +++++++++++++++++++++++++-----------------------
 1 files changed, 50 insertions(+), 46 deletions(-)

diff --git a/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue b/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue
index 82b4164..68f3650 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue
@@ -1,62 +1,66 @@
 <template>
-  <el-dialog :title="modalOptions.title" v-model="visible" @close="close">
+  <el-dialog :title="modalOptions.title"
+             v-model="visible"
+             @close="close">
     <EditForm ref="editFormRef" />
     <template #footer>
-			<el-button type="primary" :loading="loading" @click="sendForm">
-				{{ modalOptions.confirmText }}
-			</el-button>
+      <el-button type="primary"
+                 :loading="loading"
+                 @click="sendForm">
+        {{ modalOptions.confirmText }}
+      </el-button>
       <el-button @click="closeModal">{{ modalOptions.cancelText }}</el-button>
     </template>
   </el-dialog>
 </template>
 
 <script setup>
-import { useModal } from "@/hooks/useModal";
-import EditForm from "../Form/EditForm.vue";
-import { updateRegistration } from "@/api/procurementManagement/procurementInvoiceLedger";
-import { ElMessage } from "element-plus";
+  import { useModal } from "@/hooks/useModal";
+  import EditForm from "../Form/EditForm.vue";
+  import { updateRegistration } from "@/api/procurementManagement/procurementInvoiceLedger";
+  import { ElMessage } from "element-plus";
 
-defineOptions({
-  name: "鏉ョエ鍙拌处缂栬緫",
-});
-const emits = defineEmits(["success"]);
+  defineOptions({
+    name: "鏉ョエ鍙拌处缂栬緫",
+  });
+  const emits = defineEmits(["success"]);
 
-const saleLedgerProjectId = ref('')
-const editFormRef = ref();
-const {
-  id,
-  visible,
-  loading,
-  openModal,
-  modalOptions,
-  handleConfirm,
-  closeModal,
-} = useModal({ title: "鏉ョエ鍙拌处" });
+  const saleLedgerProjectId = ref("");
+  const editFormRef = ref();
+  const {
+    id,
+    visible,
+    loading,
+    openModal,
+    modalOptions,
+    handleConfirm,
+    closeModal,
+  } = useModal({ title: "鏉ョエ鍙拌处" });
 
-const open = async (row) => {
-  openModal(row.id);
-	saleLedgerProjectId.value = row.saleLedgerProjectId;
-  await nextTick();
-  editFormRef.value.load(row.id);
-};
+  const open = async row => {
+    openModal(row.id);
+    saleLedgerProjectId.value = row.saleLedgerProjectId;
+    await nextTick();
+    editFormRef.value.load(row.id, row.purchaseLedgerId, row.productModelId);
+  };
 
-const close = () => {
-  editFormRef.value.resetForm();
-  closeModal();
-};
+  const close = () => {
+    editFormRef.value.resetForm();
+    closeModal();
+  };
 
-const sendForm = async () => {
-  const form = editFormRef.value.form;
-	form.saleLedgerProjectId = saleLedgerProjectId.value;
-  const { code } = await updateRegistration(form);
-  if (code === 200) {
-    emits("success");
-    ElMessage({ message: "鎿嶄綔鎴愬姛", type: "success" });
-    close();
-  }
-};
+  const sendForm = async () => {
+    const form = editFormRef.value.form;
+    form.saleLedgerProjectId = saleLedgerProjectId.value;
+    const { code } = await updateRegistration(form);
+    if (code === 200) {
+      emits("success");
+      ElMessage({ message: "鎿嶄綔鎴愬姛", type: "success" });
+      close();
+    }
+  };
 
-defineExpose({
-  open,
-});
+  defineExpose({
+    open,
+  });
 </script>

--
Gitblit v1.9.3