From e277db8bf75fa7b62bd2a281fe8ba4956f77cd82 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期四, 05 六月 2025 13:03:19 +0800
Subject: [PATCH] 供应商往来功能修改
---
src/api/procurementManagement/paymentLedger.js | 10 ++++
src/views/procurementManagement/paymentLedger/index.vue | 64 +++++++++++++++++++++++--------
2 files changed, 56 insertions(+), 18 deletions(-)
diff --git a/src/api/procurementManagement/paymentLedger.js b/src/api/procurementManagement/paymentLedger.js
index 12b2754..250774b 100644
--- a/src/api/procurementManagement/paymentLedger.js
+++ b/src/api/procurementManagement/paymentLedger.js
@@ -8,4 +8,12 @@
method: 'get',
params: query
})
-}
\ No newline at end of file
+}
+
+// 鍒嗛〉鏌ヨ
+export function paymentRecordList(supplierId) {
+ return request({
+ url: '/purchase/paymentRegistration/getPaymentRecordList/'+ supplierId,
+ method: 'get'
+ })
+}
diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue
index f720960..4d24bbb 100644
--- a/src/views/procurementManagement/paymentLedger/index.vue
+++ b/src/views/procurementManagement/paymentLedger/index.vue
@@ -58,6 +58,14 @@
>
</el-table-column>
</el-table>
+ <pagination
+ v-show="total > 0"
+ @pagination="paginationSearch"
+ :total="total"
+ :layout="page.layout"
+ :page="page.current"
+ :limit="page.size"
+ />
</div>
</el-col>
<el-col :span="10">
@@ -69,18 +77,16 @@
:tableLoading="tableLoadingSon"
:isShowSummary="isShowSummarySon"
></PIMTable>
+ <pagination
+ v-show="sonTotal > 0"
+ :total="sonTotal"
+ @pagination="sonPaginationSearch"
+ :layout="page.layout"
+ :page="sonPage.current"
+ :limit="sonPage.size"
+ />
</div>
</el-col>
- <div class="el-pagination">
- <pagination
- v-show="total > 0"
- @pagination="paginationSearch"
- :total="total"
- :layout="page.layout"
- :page="page.current"
- :limit="page.size"
- />
- </div>
</el-row>
</div>
</template>
@@ -88,7 +94,7 @@
<script setup>
import { ref, toRefs } from "vue";
import { Search } from "@element-plus/icons-vue";
-import { paymentLedgerList } from "@/api/procurementManagement/paymentLedger.js";
+import { paymentLedgerList,paymentRecordList } from "@/api/procurementManagement/paymentLedger.js";
const tableColumn = ref([
{
@@ -119,25 +125,32 @@
current: 1,
size: 10,
});
+const sonPage = reactive({
+ current: 1,
+ size: 10,
+});
const total = ref(0);
+const sonTotal = ref(0);
const isShowSummary = ref(true);
const { searchForm } = toRefs(data);
+const currentSupplierId = ref('')
const rowClick = (row) => {
- tableDataSon.value = Array.isArray(row.details) ? row.details : [];
+ currentSupplierId.value = row.supplierId;
+ getPaymenRecordtList(row.supplierId)
};
// 瀛愭ā鍧�
const tableColumnSon = ref([
{
- label: "浠樻鏃ユ湡",
- prop: "paymentDate",
+ label: "鍙戠敓鏃ユ湡",
+ prop: "happenTime",
},
{
- label: "寮�绁ㄦ暟",
- prop: "voteCount",
+ label: "鍙戠エ閲戦",
+ prop: "invoiceAmount",
},
{
label: "浠樻閲戦(鍏�)",
- prop: "paymentAmount",
+ prop: "currentPaymentAmount",
},
{
label: "搴斾粯閲戦(鍏�)",
@@ -173,9 +186,26 @@
tableLoading.value = false;
tableData.value = result.records || [];
total.value = result.total || 0;
+ if(tableData.value.length > 0) {
+ getPaymenRecordtList(tableData.value[0].supplierId);
+ currentSupplierId.value = tableData.value[0].supplierId
+ }
+
});
};
+const getPaymenRecordtList = (supplierId) => {
+ paymentRecordList(supplierId).then(res => {
+ tableDataSon.value = res.data
+ sonTotal.value = res.data.length
+ })
+}
+
+const sonPaginationSearch = ({ current, limit }) => {
+ sonPage.current = current;
+ sonPage.size = limit;
+};
+
getList();
</script>
--
Gitblit v1.9.3