From 68aac33ec30eedd770a1281348c7ff0d1d29225e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 06 一月 2026 11:17:06 +0800
Subject: [PATCH] 二级套餐包改造: 1.封装公用组件 2.替换公共函数

---
 src/views/salesManagement/invoiceLedger/index.vue |   33 ++++++++++++---------------------
 1 files changed, 12 insertions(+), 21 deletions(-)

diff --git a/src/views/salesManagement/invoiceLedger/index.vue b/src/views/salesManagement/invoiceLedger/index.vue
index 986b3e7..cb8466e 100644
--- a/src/views/salesManagement/invoiceLedger/index.vue
+++ b/src/views/salesManagement/invoiceLedger/index.vue
@@ -3,7 +3,7 @@
     <div class="search_form">
       <el-form :inline="true" :model="searchForm">
         <el-form-item label="瀹㈡埛鍚嶇О/鍚堝悓鍙�">
-          <el-input v-model="searchForm.searchText" style="width: 240px" placeholder="杈撳叆瀹㈡埛鍚嶇О/鍚堝悓鍙锋悳绱�"
+          <el-input v-model="searchForm.searchText" style="width: 240px" placeholder="杈撳叆瀹㈡埛鍚嶇О/閿�鍞悎鍚屽彿鎼滅储"
             @change="handleQuery" clearable :prefix-icon="Search" />
         </el-form-item>
         <el-form-item label="寮�绁ㄦ棩鏈�">
@@ -33,17 +33,17 @@
         <el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" show-overflow-tooltip width="180" />
         <el-table-column label="瀹㈡埛鍚堝悓鍙�" prop="customerContractNo" show-overflow-tooltip width="180" />
         <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip width="240" />
-        <el-table-column label="椤圭洰" prop="projectName" width="200" />
+        <el-table-column label="椤圭洰" prop="projectName" width="320" />
         <el-table-column label="浜у搧澶х被" prop="productCategory" width="200" />
-        <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" width="300" show-overflow-tooltip />
+        <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" width="160" show-overflow-tooltip />
         <el-table-column label="鍙戠エ鍙�" prop="invoiceNo" width="200" show-overflow-tooltip />
         <el-table-column label="鍙戠エ閲戦(鍏�)" prop="invoiceTotal" show-overflow-tooltip :formatter="formattedNumber"
-          width="120" />
+          width="200" />
         <el-table-column label="绋庣巼(%)" prop="taxRate" show-overflow-tooltip />
         <el-table-column label="褰曞叆浜�" prop="invoicePerson" show-overflow-tooltip />
         <el-table-column label="褰曞叆鏃ユ湡" prop="createTime" show-overflow-tooltip :formatter="formatDate" width="180" />
         <el-table-column label="寮�绁ㄦ棩鏈�" prop="invoiceDate" show-overflow-tooltip width="120" />
-        <el-table-column label="鍙戠エ" prop="invoiceFileName" width="120" align="center" show-overflow-tooltip>
+        <el-table-column label="鍙戠エ" prop="invoiceFileName" width="120" align="center" show-overflow-tooltip fixed="right">
           <template #default="scope">
             <el-button v-if="scope.row.invoiceFileName" text bg type="primary"
               @click="handleFile(scope.row.commonFiles)">
@@ -85,8 +85,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="鍙戠エ閲戦(鍏�)锛�" prop="invoiceTotal">
-              <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.invoiceTotal" placeholder="璇疯緭鍏�" clearable />
+            <el-form-item :label="`鍙戠エ閲戦(鍏�)锛� 鍚堝悓鎬婚(${form.taxInclusiveTotalPrice}鍏�)`" prop="invoiceTotal">
+              <el-input-number :step="0.01" :min="0" :max="form.taxInclusiveTotalPrice" style="width: 100%" v-model="form.invoiceTotal" placeholder="璇疯緭鍏�" clearable :precision="2"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -168,6 +168,7 @@
 import useUserStore from "@/store/modules/user.js";
 import useFormData from "@/hooks/useFormData";
 import dayjs from "dayjs";
+import { getCurrentDate } from "@/utils/index.js";
 
 const { proxy } = getCurrentInstance();
 const tableData = ref([]);
@@ -185,12 +186,9 @@
   searchForm: {
     searchText: "",
     status: false,
-    invoiceDate: [
-      dayjs().startOf("month").format("YYYY-MM-DD"),
-      dayjs().endOf("month").format("YYYY-MM-DD"),
-    ],
-    invoiceDateStart: dayjs().startOf("month").format("YYYY-MM-DD"),
-    invoiceDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"),
+    invoiceDate: null,
+    invoiceDateStart: undefined,
+    invoiceDateEnd: undefined,
     createTimeStart: "", // 褰曞叆鏃ユ湡
   },
   form: {
@@ -398,6 +396,7 @@
   })
     .then(() => {
       delInvoiceLedgerByRegProductId(row.id).then((res) => {
+				proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
         getList();
       });
     })
@@ -406,14 +405,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