From 8a3bfdab689684fe5ee19b2f69842e450fc7c60a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 14:02:39 +0800
Subject: [PATCH] fix: 完成生产数据分析页面

---
 src/views/salesManagement/invoiceLedger/index.vue |   31 +++++++++++--------------------
 1 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/src/views/salesManagement/invoiceLedger/index.vue b/src/views/salesManagement/invoiceLedger/index.vue
index eec3a26..b35023f 100644
--- a/src/views/salesManagement/invoiceLedger/index.vue
+++ b/src/views/salesManagement/invoiceLedger/index.vue
@@ -32,7 +32,6 @@
         <el-table-column align="center" label="搴忓彿" type="index" width="60" />
         <el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" show-overflow-tooltip width="180" />
         <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip width="240" />
-<!--        <el-table-column label="椤圭洰" prop="projectName" width="320" />-->
         <el-table-column label="浜у搧澶х被" prop="productCategory" width="200" />
         <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" width="160" show-overflow-tooltip />
         <el-table-column label="鍙戠エ鍙�" prop="invoiceNo" width="200" show-overflow-tooltip />
@@ -42,17 +41,6 @@
         <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 fixed="right">
-          <template #default="scope">
-            <el-button v-if="scope.row.invoiceFileName" text bg type="primary"
-              @click="handleFile(scope.row.commonFiles)">
-              鏌ョ湅闄勪欢
-            </el-button>
-            <el-button v-else link type="primary" @click="handleDownload(scope.row)">
-              涓婁紶
-            </el-button>
-          </template>
-        </el-table-column> -->
         <el-table-column fixed="right" label="鎿嶄綔" width="150" align="center">
           <template #default="scope">
             <el-button link type="primary" size="small" @click="openForm(scope.row)">缂栬緫</el-button>
@@ -85,8 +73,11 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <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 :label="`鍙戠エ閲戦(鍏�)锛� `" prop="invoiceTotal">
+              <el-input-number :step="0.01" :min="0" :max="maxInvoiceAmount || form.taxInclusiveTotalPrice" style="width: 100%" v-model="form.invoiceTotal" placeholder="璇疯緭鍏�" clearable :precision="2"/>
+              <div v-if="maxInvoiceAmount > 0" style="color: #909399; font-size: 12px; margin-top: 5px;">
+                鍙~鏈�澶ч噾棰濅负锛毬{ maxInvoiceAmount.toFixed(2) }}鍏�
+              </div>
             </el-form-item>
           </el-col>
         </el-row>
@@ -215,6 +206,7 @@
 const { form: searchForm, resetForm } = useFormData(data.searchForm);
 const currentId = ref("");
 const userStore = useUserStore();
+const maxInvoiceAmount = ref(0); // 鍙戠エ閲戦鏈�澶у��
 const upload = reactive({
   // 涓婁紶鐨勫湴鍧�
   url: import.meta.env.VITE_APP_BASE_API + "/invoiceLedger/uploadFile",
@@ -281,6 +273,11 @@
     if (!form.value.invoicePerson) {
       form.value.invoicePerson = userStore.nickName;
     }
+    
+    // 璁$畻鍙戠エ閲戦鏈�澶у�硷細noInvoiceAmount + invoiceAmount
+    const noInvoiceAmount = parseFloat(res.data.noInvoiceAmount || 0);
+    const invoiceAmount = parseFloat(res.data.invoiceAmount || 0);
+    maxInvoiceAmount.value = noInvoiceAmount + invoiceAmount;
   });
   dialogFormVisible.value = true;
 };
@@ -439,12 +436,6 @@
 }
 
 onMounted(() => {
-  // 璁剧疆寮�绁ㄦ棩鏈熻寖鍥撮粯璁ゅ�间负褰撳ぉ
-  const today = dayjs().format('YYYY-MM-DD');
-  searchForm.invoiceDate = [today, today];
-  // 璁剧疆鑼冨洿鏃ユ湡瀛楁鐨勮捣濮嬪拰缁撴潫鏃堕棿
-  searchForm.invoiceDateStart = today;
-  searchForm.invoiceDateEnd = today;
   getList();
 });
 </script>

--
Gitblit v1.9.3