From 2e77330d87341624c88301562fd137b58f9a101a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 25 十二月 2025 10:57:35 +0800
Subject: [PATCH] 1.海川开心-录入日期都默认当天,封装公用组件和方法

---
 src/views/salesManagement/invoiceLedger/index.vue |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/views/salesManagement/invoiceLedger/index.vue b/src/views/salesManagement/invoiceLedger/index.vue
index d1bb3fe..f2ba229 100644
--- a/src/views/salesManagement/invoiceLedger/index.vue
+++ b/src/views/salesManagement/invoiceLedger/index.vue
@@ -165,12 +165,12 @@
   commitFile,
   registrationProductPage,
   delInvoiceLedgerByRegProductId,
-} from "../../../api/salesManagement/invoiceLedger.js";
-import { getSalesLedgerWithProducts } from "@/api/salesManagement/salesLedger.js";
+} from "@/api/salesManagement/invoiceLedger.js";
 import useUserStore from "@/store/modules/user.js";
 import useFormData from "@/hooks/useFormData";
 import dayjs from "dayjs";
 import FileList from "./fileList.vue";
+import { getCurrentDate } from "@/utils/index.js";
 
 const { proxy } = getCurrentInstance();
 const tableData = ref([]);
@@ -279,6 +279,10 @@
   invoiceLedgerProductInfo({ id: row.id }).then((res) => {
     form.value = { ...res.data };
     fileList.value = res.data.fileList;
+    // 淇濆瓨ticketRegistrationId鍒拌〃鍗曟暟鎹腑
+    if (row.ticketRegistrationId) {
+      form.value.ticketRegistrationId = row.ticketRegistrationId;
+    }
     if (!form.value.invoicePerson) {
       form.value.invoicePerson = userStore.nickName;
       // 绉婚櫎褰曞叆鏃ユ湡榛樿鍊艰缃紝鍙鐞嗚寖鍥存棩鏈熷瓧娈�
@@ -409,14 +413,6 @@
     });
 };
 
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
-  const today = new Date();
-  const year = today.getFullYear();
-  const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
-  const day = String(today.getDate()).padStart(2, "0");
-  return `${year}-${month}-${day}`;
-}
 const changeDateRange = (date) => {
   if (date) {
     searchForm.invoiceDateStart = date[0];

--
Gitblit v1.9.3