From 03c87707468888db87a98c843b67488b1e88832f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 15 五月 2025 13:39:04 +0800
Subject: [PATCH] 来票台账-前端开发联调

---
 src/views/salesManagement/invoiceLedger/index.vue |   39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/src/views/salesManagement/invoiceLedger/index.vue b/src/views/salesManagement/invoiceLedger/index.vue
index f7669cc..e7eba1d 100644
--- a/src/views/salesManagement/invoiceLedger/index.vue
+++ b/src/views/salesManagement/invoiceLedger/index.vue
@@ -2,7 +2,7 @@
   <div class="app-container">
     <div class="search_form">
       <div>
-        <span class="search_title">寮�绁ㄥ彴璐︼細</span>
+        <span class="search_title">瀹㈡埛鍚嶇О/鍚堝悓鍙凤細</span>
         <el-input
             v-model="searchForm.searchText"
             style="width: 240px"
@@ -11,16 +11,16 @@
             clearable
             :prefix-icon="Search"
         />
-        <span class="search_title">寮�绁ㄦ棩鏈燂細</span>
+        <span class="search_title" style="margin-left: 10px">寮�绁ㄦ棩鏈燂細</span>
         <el-date-picker
-          style="width: 240px"
-          v-model="form.invoiceDate"
-          value-format="YYYY-MM-DD"
-          format="YYYY-MM-DD"
-          type="date"
-          placeholder="璇烽�夋嫨"
-          clearable
-          />
+            style="width: 240px"
+            v-model="form.invoiceDate"
+            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            type="date"
+            placeholder="璇烽�夋嫨"
+            clearable
+        />
         <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
       </div>
       <div>
@@ -46,7 +46,7 @@
         <el-table-column label="绋庣巼" prop="taxRate" show-overflow-tooltip/>
         <el-table-column label="寮�绁ㄤ汉" prop="invoicePerson" show-overflow-tooltip/>
         <el-table-column label="寮�绁ㄦ棩鏈�" prop="invoiceDate" show-overflow-tooltip/>
-        <el-table-column label="鍙戠エ" prop="invoiceDate" show-overflow-tooltip>
+        <el-table-column label="鍙戠エ" prop="invoiceFileName" show-overflow-tooltip>
           <template #default="scope">
             <span v-if="scope.row.invoiceFileName">{{ scope.row.invoiceFileName }}</span>
             <el-button v-else link type="primary" @click="handleDownload(scope.row)">涓婁紶</el-button>
@@ -126,6 +126,8 @@
                   ref="fileUpload"
                   auto-upload
                   :headers="upload.headers"
+                  accept=".pdf"
+                  :limit="1"
                   :before-upload="handleBeforeUpload"
                   :on-error="handleUploadError"
                   :on-success="handleUploadSuccess"
@@ -161,6 +163,9 @@
                 ref="fileUpload"
                 auto-upload
                 :headers="upload.headers"
+                accept=".pdf"
+                :limit="1"
+                :on-exceed="handleExceed"
                 :before-upload="handleBeforeUpload"
                 :on-error="handleUploadError"
                 :on-success="handleUploadSuccess"
@@ -168,9 +173,8 @@
             >
               <el-button type="primary">涓婁紶</el-button>
               <template #tip>
-                <!--                  鏂囦欢鏍煎紡鏀寔 doc锛宒ocx锛寈ls锛寈lsx锛宲pt锛宲ptx锛宲df锛宼xt锛寈ml锛宩pg锛宩peg锛宲ng锛実if锛宐mp锛宺ar锛寊ip锛�7z-->
                 <div class="el-upload__tip">
-                  鏂囦欢鏍煎紡鏀寔 pdf
+                  鏂囦欢鏍煎紡浠呮敮鎸� pdf
                 </div>
               </template>
             </el-upload>
@@ -321,10 +325,17 @@
   }
   dialogFormVisible.value = true
 }
+// 涓婁紶澶氫釜鏂囦欢灏辫鐩栧師鏉ョ殑
+const handleExceed = (files) => {
+  proxy.$refs["fileUpload"].clearFiles();
+  const file = files[0];
+  file.uid = genFileId();
+  proxy.$refs["fileUpload"].handleStart(file);
+};
 // 涓婁紶鍓嶆牎妫�
 function handleBeforeUpload(file) {
   // 鏍℃鏂囦欢澶у皬
-  if (file.size > 1024 * 1024) {
+  if (file.size > 1024 * 1024 * 10) {
     proxy.$modal.msgError('涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃10MB!')
     return false
   }

--
Gitblit v1.9.3