From 378c343c859f135b18d39f994c247598bc9a2b9a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 15 一月 2026 17:55:24 +0800
Subject: [PATCH] Merge branch 'dev_天津军泰伟业' of http://114.132.189.42:9002/r/product-inventory-management into dev_天津军泰伟业

---
 src/views/procurementManagement/invoiceEntry/index.vue |  488 +++++++++++++++++++++++++++---------------------------
 1 files changed, 244 insertions(+), 244 deletions(-)

diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index 2a04cab..d177c97 100644
--- a/src/views/procurementManagement/invoiceEntry/index.vue
+++ b/src/views/procurementManagement/invoiceEntry/index.vue
@@ -1,35 +1,30 @@
 <template>
   <div class="app-container">
     <div class="search_form">
-      <el-form :model="filters" :inline="true">
+      <el-form :model="filters"
+               :inline="true">
         <el-form-item label="渚涘簲鍟嗗悕绉�">
-          <el-input
-              v-model="filters.supplierName"
-              placeholder="璇疯緭鍏ュ悕绉版悳绱�"
-              clearable
-              prefix-icon="Search"
-              @change="getTableData"
-          />
+          <el-input v-model="filters.supplierName"
+                    placeholder="璇疯緭鍏ュ悕绉版悳绱�"
+                    clearable
+                    prefix-icon="Search"
+                    @change="getTableData" />
         </el-form-item>
         <el-form-item label="閲囪喘璁㈠崟鍙凤細">
-          <el-input
-            v-model="filters.purchaseContractNumber"
-            placeholder="璇疯緭鍏�"
-            clearable
-            prefix-icon="Search"
-            @change="getTableData"
-          />
+          <el-input v-model="filters.purchaseContractNumber"
+                    placeholder="璇疯緭鍏�"
+                    clearable
+                    prefix-icon="Search"
+                    @change="getTableData" />
         </el-form-item>
-
         <el-form-item label="閿�鍞悎鍚屽彿">
-          <el-input
-              v-model="filters.salesContractNo"
-              placeholder="璇疯緭鍏ラ攢鍞悎鍚屽彿"
-              clearable
-          />
+          <el-input v-model="filters.salesContractNo"
+                    placeholder="璇疯緭鍏ラ攢鍞悎鍚屽彿"
+                    clearable />
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="getTableData"> 鎼滅储 </el-button>
+          <el-button type="primary"
+                     @click="getTableData"> 鎼滅储 </el-button>
           <el-button @click="resetFilters"> 閲嶇疆 </el-button>
         </el-form-item>
       </el-form>
@@ -38,264 +33,269 @@
       <div class="actions">
         <div></div>
         <div>
-          <el-button @click="handleExport" style="margin-right: 10px">瀵煎嚭</el-button>
-          <el-button type="primary" @click="handleAdd('add')">
+          <el-button @click="handleExport"
+                     style="margin-right: 10px">瀵煎嚭</el-button>
+          <el-button type="primary"
+                     @click="handleAdd('add')">
             鏂板鐧昏
           </el-button>
-<!--          <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
+          <!--          <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>-->
         </div>
       </div>
-      <PIMTable
-        rowKey="id"
-        :column="columns"
-        :tableData="filteredDataList"
-        :tableLoading="loading"
-        :isSelection="true"
-        :page="{
+      <PIMTable rowKey="id"
+                :column="columns"
+                :tableData="dataList"
+                :tableLoading="loading"
+                :isSelection="true"
+                :page="{
           current: pagination.currentPage,
           size: pagination.pageSize,
           total: pagination.total,
         }"
-        :expand-row-keys="expandRowKeys"
-        :summaryMethod="summarizeMainTable"
-        :isShowSummary="true"
-        @expand-change="expandChange"
-        @selection-change="handleSelectionChange"
-        @pagination="changePage"
-      >
+                :expand-row-keys="expandRowKeys"
+                :summaryMethod="summarizeMainTable"
+                :isShowSummary="true"
+                @expand-change="expandChange"
+                @selection-change="handleSelectionChange"
+                @pagination="changePage">
         <template #expand="{ row }">
           <ExpandTable ref="expandTableRef" />
         </template>
         <template #operation="{ row }">
-          <el-button
-            text
-            type="primary"
-            size="small"
-            @click="handleEdit('edit', row.id)"
-          >
+          <el-button text
+                     type="primary"
+                     size="small"
+                     @click="handleEdit('edit', row.id)">
             缂栬緫
           </el-button>
         </template>
       </PIMTable>
     </div>
-    <Modal ref="modalRef" @refreshList="getTableData"></Modal>
+    <Modal ref="modalRef"
+           @refreshList="getTableData"></Modal>
   </div>
 </template>
 
 <script setup>
-import { usePaginationApi } from "@/hooks/usePaginationApi";
-import {delRegistration, gePurchaseListPage} from "@/api/procurementManagement/invoiceEntry.js";
-import { nextTick, onMounted, getCurrentInstance, ref } from "vue";
-import ExpandTable from "./components/ExpandTable.vue";
-import Modal from "./components/Modal.vue";
-import {ElMessageBox} from "element-plus";
+  import { usePaginationApi } from "@/hooks/usePaginationApi";
+  import {
+    delRegistration,
+    gePurchaseListPage,
+  } from "@/api/procurementManagement/invoiceEntry.js";
+  import { nextTick, onMounted, getCurrentInstance, ref } from "vue";
+  import ExpandTable from "./components/ExpandTable.vue";
+  import Modal from "./components/Modal.vue";
+  import { ElMessageBox } from "element-plus";
 
-defineOptions({
-  name: "鏉ョエ鐧昏",
-});
+  defineOptions({
+    name: "鏉ョエ鐧昏",
+  });
 
-const { proxy } = getCurrentInstance();
-const expandRowKeys = ref([]);
-const expandTableRef = ref();
-const modalRef = ref();
-const selectedRows = ref([]);
+  const { proxy } = getCurrentInstance();
+  const expandRowKeys = ref([]);
+  const expandTableRef = ref();
+  const modalRef = ref();
+  const selectedRows = ref([]);
 
-const {
-  loading,
-  filters,
-  columns,
-  dataList,
-  pagination,
-  getTableData,
-  resetFilters,
-  onCurrentChange,
-} = usePaginationApi(
-  gePurchaseListPage,
-  {
-    purchaseContractNumber: undefined,
-  },
-  [
+  const {
+    loading,
+    filters,
+    columns,
+    dataList,
+    pagination,
+    getTableData,
+    resetFilters,
+    onCurrentChange,
+  } = usePaginationApi(
+    gePurchaseListPage,
     {
-      type: "expand",
-      dataType: "slot",
-      slot: "expand",
+      purchaseContractNumber: undefined,
     },
-    {
-      label: "閲囪喘璁㈠崟鍙�",
-      prop: "purchaseContractNumber",
-      width:150
-    },
-    {
-      label: "閿�鍞悎鍚屽彿",
-      prop: "salesContractNo",
-      width:150
-    },
-    {
-      label: "渚涘簲鍟嗗悕绉�",
-      prop: "supplierName",
-      width:300
-    },
-    {
-      label: "褰曞叆浜�",
-      prop: "recorderName",
-    },
-    {
-      label: "褰曞叆鏃ユ湡",
-      prop: "entryDate",
-      width:110
-    },
-    {
-      label: "鍚堝悓閲戦(鍏�)",
-      prop: "contractAmount",
-      width:200,
-      formatData: (val) => {
-        return val ? parseFloat(val).toFixed(2) : 0;
+    [
+      {
+        type: "expand",
+        dataType: "slot",
+        slot: "expand",
       },
-    },
-    {
-      label: "宸叉潵绁ㄩ噾棰�(鍏�)",
-      prop: "receiptPaymentAmount",
-      width:200,
-      formatData: (val) => {
-        return val ? parseFloat(val).toFixed(2) : 0;
+      {
+        label: "閲囪喘璁㈠崟鍙�",
+        prop: "purchaseContractNumber",
+        width: 150,
       },
-    },
-    {
-      label: "寰呮潵绁ㄩ噾棰�(鍏�)",
-      prop: "unReceiptPaymentAmount",
-      width:200,
-      formatData: (val) => {
-        return val ? parseFloat(val).toFixed(2) : 0;
+      {
+        label: "閿�鍞悎鍚屽彿",
+        prop: "salesContractNo",
+        width: 150,
       },
-    },
-    // {
-    //   fixed: "right",
-    //   label: "鎿嶄綔",
-    //   dataType: "slot",
-    //   slot: "operation",
-    //   align: "center",
-    //   width: "200px",
-    // },
-  ]
-);
-// 璁$畻灞炴�ц繃婊� 瀹℃壒閫氳繃approvalStatus=1 鐨勬暟鎹�
-const filteredDataList = computed(() => {
-  return dataList.value.filter(item => item.approvalStatus == 1);
-});
-const handleSelectionChange = (selection) => {
-  selectedRows.value = selection.filter(
-    (item) => item.purchaseContractNumber !== undefined
+      {
+        label: "渚涘簲鍟嗗悕绉�",
+        prop: "supplierName",
+        width: 300,
+      },
+      {
+        label: "褰曞叆浜�",
+        prop: "recorderName",
+      },
+      {
+        label: "褰曞叆鏃ユ湡",
+        prop: "entryDate",
+        width: 110,
+      },
+      {
+        label: "鍚堝悓閲戦(鍏�)",
+        prop: "contractAmount",
+        width: 200,
+        formatData: val => {
+          return val ? parseFloat(val).toFixed(2) : 0;
+        },
+      },
+      {
+        label: "宸叉潵绁ㄩ噾棰�(鍏�)",
+        prop: "receiptPaymentAmount",
+        width: 200,
+        formatData: val => {
+          return val ? parseFloat(val).toFixed(2) : 0;
+        },
+      },
+      {
+        label: "寰呮潵绁ㄩ噾棰�(鍏�)",
+        prop: "unReceiptPaymentAmount",
+        width: 200,
+        formatData: val => {
+          return val ? parseFloat(val).toFixed(2) : 0;
+        },
+      },
+      // {
+      //   fixed: "right",
+      //   label: "鎿嶄綔",
+      //   dataType: "slot",
+      //   slot: "operation",
+      //   align: "center",
+      //   width: "200px",
+      // },
+    ]
   );
-};
+  // 璁$畻灞炴�ц繃婊� 瀹℃壒閫氳繃approvalStatus=1 鐨勬暟鎹�
+  // const filteredDataList = computed(() => {
+  //   // return dataList.value.filter(item => item.approvalStatus == 1);
+  //   return dataList;
+  // });
+  const handleSelectionChange = selection => {
+    selectedRows.value = selection.filter(
+      item => item.purchaseContractNumber !== undefined
+    );
+  };
 
-const handleAdd = (type) => {
-	if (selectedRows.value.length < 1) {
-		proxy.$modal.msgWarning("璇疯嚦灏戦�変腑涓�鏉℃暟鎹�");
-		return;
-	}
-	modalRef.value.open(type, selectedRows.value);
-};
-
-const handleEdit = (type, id) => {
-  modalRef.value.open(type, id);
-};
-
-// 瀵煎嚭
-const handleOut = () => {
-	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
-		confirmButtonText: "纭",
-		cancelButtonText: "鍙栨秷",
-		type: "warning",
-	})
-		.then(() => {
-			proxy.download("/purchase/registration/export", {}, "鏉ョエ鐧昏.xlsx");
-		})
-		.catch(() => {
-			proxy.$modal.msg("宸插彇娑�");
-		});
-};
-
-// 瀵煎嚭閲囪喘鍙拌处
-const handleExport = () => {
-	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
-		confirmButtonText: "纭",
-		cancelButtonText: "鍙栨秷",
-		type: "warning",
-	})
-		.then(() => {
-			proxy.download("/purchase/ledger/exportOne", {}, "鏉ョエ鐧昏.xlsx");
-		})
-		.catch(() => {
-			proxy.$modal.msg("宸插彇娑�");
-		});
-};
-
-// 鍒犻櫎
-const handleDelete = () => {
-	let ids = [];
-	if (selectedRows.value.length > 0) {
-    // 鏂板鍒ゆ柇锛氬鏋滄湁閫変腑鐨勬暟鎹病鏈塼icketRegistrationId锛屾彁绀哄苟缁堟
-    const noTicket = selectedRows.value.some(item => !item.ticketRegistrationId);
-    if (noTicket) {
-      proxy.$modal.msgWarning("閲囪喘鍙拌处杩樻湭杩涜鏉ョエ鐧昏,鏃犳硶杩涜鍒犻櫎鎿嶄綔");
+  const handleAdd = type => {
+    if (selectedRows.value.length < 1) {
+      proxy.$modal.msgWarning("璇疯嚦灏戦�変腑涓�鏉℃暟鎹�");
       return;
     }
-		ids = selectedRows.value.map((item) => item.ticketRegistrationId);
-	} else {
-		proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
-		return;
-	}
-	ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
-		confirmButtonText: "纭",
-		cancelButtonText: "鍙栨秷",
-		type: "warning",
-	})
-		.then(() => {
-			delRegistration(ids).then((res) => {
-				proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-				getList();
-			});
-		})
-		.catch(() => {
-			proxy.$modal.msg("宸插彇娑�");
-		});
-};
+    modalRef.value.open(type, selectedRows.value);
+  };
 
-const expandChange = async (row, expandedRows) => {
-  if (expandedRows.length > 0) {
-    await nextTick();
-    expandTableRef.value.getList(row.id);
-  }
-};
+  const handleEdit = (type, id) => {
+    modalRef.value.open(type, id);
+  };
 
-const changePage = ({ page, limit }) => {
-  pagination.currentPage = page;
-  pagination.pageSize = limit;
-  onCurrentChange(page);
-};
-// 涓昏〃鍚堣鏂规硶
-const summarizeMainTable = (param) => {
-	return proxy.summarizeTable(
-		param,
-		["contractAmount", "receiptPaymentAmount", "unReceiptPaymentAmount"],
-		{
-			ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
-			futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
-		}
-	);
-};
-onMounted(() => {
-  getTableData();
-});
+  // 瀵煎嚭
+  const handleOut = () => {
+    ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+      confirmButtonText: "纭",
+      cancelButtonText: "鍙栨秷",
+      type: "warning",
+    })
+      .then(() => {
+        proxy.download("/purchase/registration/export", {}, "鏉ョエ鐧昏.xlsx");
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+  };
+
+  // 瀵煎嚭閲囪喘鍙拌处
+  const handleExport = () => {
+    ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+      confirmButtonText: "纭",
+      cancelButtonText: "鍙栨秷",
+      type: "warning",
+    })
+      .then(() => {
+        proxy.download("/purchase/ledger/exportOne", {}, "鏉ョエ鐧昏.xlsx");
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+  };
+
+  // 鍒犻櫎
+  const handleDelete = () => {
+    let ids = [];
+    if (selectedRows.value.length > 0) {
+      // 鏂板鍒ゆ柇锛氬鏋滄湁閫変腑鐨勬暟鎹病鏈塼icketRegistrationId锛屾彁绀哄苟缁堟
+      const noTicket = selectedRows.value.some(
+        item => !item.ticketRegistrationId
+      );
+      if (noTicket) {
+        proxy.$modal.msgWarning("閲囪喘鍙拌处杩樻湭杩涜鏉ョエ鐧昏,鏃犳硶杩涜鍒犻櫎鎿嶄綔");
+        return;
+      }
+      ids = selectedRows.value.map(item => item.ticketRegistrationId);
+    } else {
+      proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+      return;
+    }
+    ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+      confirmButtonText: "纭",
+      cancelButtonText: "鍙栨秷",
+      type: "warning",
+    })
+      .then(() => {
+        delRegistration(ids).then(res => {
+          proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+          getList();
+        });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+  };
+
+  const expandChange = async (row, expandedRows) => {
+    if (expandedRows.length > 0) {
+      await nextTick();
+      expandTableRef.value.getList(row.id);
+    }
+  };
+
+  const changePage = ({ page, limit }) => {
+    pagination.currentPage = page;
+    pagination.pageSize = limit;
+    onCurrentChange(page);
+  };
+  // 涓昏〃鍚堣鏂规硶
+  const summarizeMainTable = param => {
+    return proxy.summarizeTable(
+      param,
+      ["contractAmount", "receiptPaymentAmount", "unReceiptPaymentAmount"],
+      {
+        ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+        futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+      }
+    );
+  };
+  onMounted(() => {
+    getTableData();
+  });
 </script>
 
 <style lang="scss" scoped>
-.table_list {
-  margin-top: unset;
-}
-.actions {
-  display: flex;
-  justify-content: space-between;
-  margin-bottom: 10px;
-}
+  .table_list {
+    margin-top: unset;
+  }
+  .actions {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 10px;
+  }
 </style>

--
Gitblit v1.9.3