From 76a985e3d790e506eef36c4df7442a95db0b29a3 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期一, 23 六月 2025 16:48:00 +0800
Subject: [PATCH] feat: 完成设备台账

---
 src/views/salesManagement/receiptPayment/index.vue |   81 ++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 16 deletions(-)

diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index 0525c8b..f1e4531 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -3,15 +3,32 @@
     <div class="search_form">
       <el-form :inline="true" :model="searchForm" style="width: 100%">
         <el-row justify="space-between">
-          <el-col :span="20">
-            <el-form-item label="鍥炴鐧昏">
+          <el-col :span="24">
+            <el-form-item label="瀹㈡埛鍚嶇О">
               <el-input
-                v-model="searchForm.searchText"
-                style="width: 240px"
-                placeholder="杈撳叆瀹㈡埛鍚嶇О/鍚堝悓鍙锋悳绱�"
+                v-model="searchForm.customerName"
+                placeholder="璇疯緭鍏�"
+                @change="handleQuery"
                 clearable
                 prefix-icon="Search"
+              />
+            </el-form-item>
+            <el-form-item label="瀹㈡埛鍚堝悓鍙�">
+              <el-input
+                v-model="searchForm.customerContractNo"
+                placeholder="璇疯緭鍏�"
                 @change="handleQuery"
+                clearable
+                prefix-icon="Search"
+              />
+            </el-form-item>
+            <el-form-item label="椤圭洰鍚嶇О">
+              <el-input
+                v-model="searchForm.projectName"
+                placeholder="璇疯緭鍏�"
+                @change="handleQuery"
+                clearable
+                prefix-icon="Search"
               />
             </el-form-item>
             <el-form-item>
@@ -25,17 +42,19 @@
               <el-button type="primary" @click="handleQuery"> 鎼滅储 </el-button>
             </el-form-item>
           </el-col>
-          <el-col :span="4">
-            <el-form-item style="float: right; margin-right: unset">
-              <el-button type="primary" @click="openForm('add')">
-                鏂板鍥炴
-              </el-button>
-            </el-form-item>
-          </el-col>
         </el-row>
       </el-form>
     </div>
     <div class="table_list">
+      <div class="actions">
+        <div></div>
+        <div>
+          <el-button type="primary" icon="Plus" @click="openForm('add')">
+            鏂板鍥炴
+          </el-button>
+          <el-button icon="Download" @click="handleOut"> 瀵煎嚭 </el-button>
+        </div>
+      </div>
       <el-table
         :data="tableData"
         border
@@ -158,7 +177,7 @@
           show-overflow-tooltip
           :formatter="formattedNumber"
         />
-        <el-table-column label="绋庣巼" prop="taxRate" show-overflow-tooltip />
+        <el-table-column label="绋庣巼(%)" prop="taxRate" show-overflow-tooltip />
         <el-table-column
           label="鍥炴閲戦(鍏�)"
           prop="receiptPaymentAmountTotal"
@@ -322,7 +341,7 @@
 
 <script setup>
 import pagination from "@/components/PIMTable/Pagination.vue";
-import { ref } from "vue";
+import { onMounted, ref } from "vue";
 import {
   receiptPaymentSaveOrUpdate,
   bindInvoiceNoRegPage,
@@ -351,7 +370,10 @@
 const data = reactive({
   searchForm: {
     searchText: "",
-    status: false,
+    status: true,
+    customerName: "",
+    customerContractNo: "",
+    projectName: "",
   },
   form: {
     salesContractNo: "",
@@ -543,7 +565,29 @@
   });
 };
 
-getList();
+// 瀵煎嚭
+const handleOut = () => {
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+    .then(() => {
+      const ids = selectedRows.value.map((item) => item.id);
+      proxy.download(
+        `/receiptPayment/export`,
+        { ids: `${ids}` },
+        "鍥炴鐧昏妗f.xlsx"
+      );
+    })
+    .catch(() => {
+      proxy.$modal.msg("宸插彇娑�");
+    });
+};
+
+onMounted(() => {
+  getList();
+});
 </script>
 
 <style scoped lang="scss">
@@ -553,4 +597,9 @@
 ::v-deep(.el-checkbox__label) {
   font-weight: bold;
 }
+.actions {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 10px;
+}
 </style>

--
Gitblit v1.9.3