From e093877b02cb5725fef570ee49ca2bca31f51871 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 11 七月 2025 14:17:06 +0800
Subject: [PATCH] 1.采购台账-销售台账:金额都可以填写,填一个计算另外一个

---
 src/views/salesManagement/receiptPayment/index.vue |  108 ++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 84 insertions(+), 24 deletions(-)

diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index 4c6fd8d..d9048a0 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -3,21 +3,38 @@
     <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"
-                @change="handleQuery"
               />
             </el-form-item>
-            <el-form-item label="涓嶆樉绀哄緟鍥炴">
+            <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>
               <el-checkbox
                 v-model="searchForm.status"
-                :label="0"
+                label="涓嶆樉绀哄緟鍥炴涓�0"
                 @change="handleQuery"
               />
             </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
@@ -46,6 +65,7 @@
         :summary-method="summarizeMainTable"
         :expand-row-keys="expandedRowKeys"
         @expand-change="expandChange"
+
         height="calc(100vh - 18.5em)"
       >
         <el-table-column align="center" type="selection" width="55" />
@@ -126,49 +146,59 @@
           label="閿�鍞悎鍚屽彿"
           prop="salesContractNo"
           show-overflow-tooltip
+          width="240"
         />
         <el-table-column
           label="瀹㈡埛鍚堝悓鍙�"
           prop="customerContractNo"
           show-overflow-tooltip
+          width="240"
+
         />
         <el-table-column
           label="瀹㈡埛鍚嶇О"
           prop="customerName"
           show-overflow-tooltip
+          width="240"
         />
         <el-table-column
           label="椤圭洰鍚嶇О"
-          prop="customerName"
+          prop="projectName"
           show-overflow-tooltip
+          width="200"
         />
         <el-table-column
           label="浜у搧澶х被"
           prop="productCategory"
           show-overflow-tooltip
+          width="100"
         />
         <el-table-column
           label="鍙戠エ鍙�"
           prop="invoiceNo"
           show-overflow-tooltip
+          width="200"
         />
         <el-table-column
           label="鍙戠エ閲戦(鍏�)"
           prop="invoiceTotal"
           show-overflow-tooltip
           :formatter="formattedNumber"
+          width="200"
         />
-        <el-table-column label="绋庣巼" prop="taxRate" show-overflow-tooltip />
+        <el-table-column label="绋庣巼(%)" prop="taxRate" show-overflow-tooltip />
         <el-table-column
           label="鍥炴閲戦(鍏�)"
           prop="receiptPaymentAmountTotal"
           show-overflow-tooltip
           :formatter="formattedNumber"
+          width="200"
         />
         <el-table-column
           label="寰呭洖娆鹃噾棰�(鍏�)"
           prop="noReceiptAmount"
           show-overflow-tooltip
+          width="200"
         >
           <template #default="{ row, column }">
             <el-text type="danger">
@@ -255,12 +285,9 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="鏈鍥炴閲戦锛�" prop="receiptPaymentAmount">
-              <el-input
-                type="number"
-                min="0"
+              <el-input-number :step="0.01" :min="0" style="width: 100%" 
                 v-model="form.receiptPaymentAmount"
                 placeholder="璇疯緭鍏�"
-                :step="0.01"
                 clearable
               />
             </el-form-item>
@@ -322,7 +349,7 @@
 
 <script setup>
 import pagination from "@/components/PIMTable/Pagination.vue";
-import { ref } from "vue";
+import { onMounted, ref } from "vue";
 import {
   receiptPaymentSaveOrUpdate,
   bindInvoiceNoRegPage,
@@ -351,7 +378,10 @@
 const data = reactive({
   searchForm: {
     searchText: "",
-    status: false,
+    status: true,
+    customerName: "",
+    customerContractNo: "",
+    projectName: "",
   },
   form: {
     salesContractNo: "",
@@ -543,11 +573,41 @@
   });
 };
 
-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">
 .table_list {
   margin-top: unset;
 }
+::v-deep(.el-checkbox__label) {
+  font-weight: bold;
+}
+.actions {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 10px;
+}
 </style>

--
Gitblit v1.9.3