From 15375a133f255a93a9734d9c66fb0b90dfd12341 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 14 七月 2025 13:14:56 +0800
Subject: [PATCH] 1.回款登记优化

---
 src/views/procurementManagement/procurementInvoiceLedger/index.vue           |    6 +++---
 src/views/salesManagement/receiptPayment/index.vue                           |   19 +++++++++++++------
 src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue |    9 ++++++---
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue b/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue
index 2ac2c10..da4fd04 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/Modal/EditModal.vue
@@ -21,6 +21,7 @@
 });
 const emits = defineEmits(["success"]);
 
+const saleLedgerProjectId = ref('')
 const editFormRef = ref();
 const {
   id,
@@ -32,10 +33,11 @@
   closeModal,
 } = useModal({ title: "鏉ョエ鍙拌处" });
 
-const open = async (id) => {
-  openModal(id);
+const open = async (row) => {
+  openModal(row.id);
+	saleLedgerProjectId.value = row.saleLedgerProjectId;
   await nextTick();
-  editFormRef.value.load(id);
+  editFormRef.value.load(row.id);
 };
 
 const close = () => {
@@ -45,6 +47,7 @@
 
 const sendForm = async () => {
   const form = editFormRef.value.form;
+	form.saleLedgerProjectId = saleLedgerProjectId.value;
   const { code } = await updateRegistration(form);
   if (code === 200) {
     emits("success");
diff --git a/src/views/procurementManagement/procurementInvoiceLedger/index.vue b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
index 6c35c5b..922cfdf 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/index.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -81,7 +81,7 @@
           <el-button
             type="primary"
             text
-            @click="openEdit(row.id)"
+            @click="openEdit(row)"
 						:disabled="row.issUerId !== userStore.id"
           >
             缂栬緫
@@ -310,8 +310,8 @@
   modalRef.value.handleImport(id);
 };
 
-const openEdit = (id) => {
-  editmodalRef.value.open(id);
+const openEdit = (row) => {
+  editmodalRef.value.open(row);
 };
 
 // 涓婁紶鎴愬姛鍚庡仛浠�涔�
diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index 3521017..a46b667 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -49,7 +49,7 @@
       <div class="actions">
         <div></div>
         <div>
-          <el-button type="primary" icon="Plus" @click="openForm('add')">
+          <el-button type="primary" @click="openForm('add')">
             鏂板鍥炴
           </el-button>
           <el-button icon="Download" @click="handleOut"> 瀵煎嚭 </el-button>
@@ -438,13 +438,20 @@
   getList();
 };
 const getList = () => {
-  expandedRowKeys.value = [];
   tableLoading.value = true;
   bindInvoiceNoRegPage({ ...searchForm, ...page })
     .then((res) => {
       tableLoading.value = false;
       tableData.value = res.data.records;
       total.value = res.data.total;
+			if (expandedRowKeys.value.length > 0) {
+				const arr = []
+				const index = tableData.value.findIndex(item => item.id === expandedRowKeys.value[0]);
+				if (index > -1) {
+					arr.push(tableData.value[index]);
+					expandChange(tableData.value[index], arr)
+				}
+			}
     })
     .catch(() => {
       tableLoading.value = false;
@@ -506,10 +513,8 @@
     proxy.$modal.msgError("璇烽�夋嫨涓�鏉℃暟鎹�");
     return;
   }
-  //
-  console.log("(selectedRows.value", selectedRows.value);
-  if (selectedRows.value[0].noReceiptAmount === 0) {
-    proxy.$modal.msgError("寰呭洖娆鹃噾棰濅负0鍏�");
+  if (selectedRows.value[0].noReceiptAmount == 0) {
+    proxy.$modal.warning("鏃犻渶鍐嶅洖娆�");
     return;
   }
   invoiceInfo({ id: selectedRows.value[0].id }).then((res) => {
@@ -577,6 +582,8 @@
   };
   receiptPaymentSaveOrUpdate(updateData).then((res) => {
     row.editType = !row.editType;
+		getList();
+		proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
   });
 };
 

--
Gitblit v1.9.3