From 9af9bb8ce10c90aad33d41508f3c829810721ec5 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 16 五月 2025 16:31:37 +0800 Subject: [PATCH] 付款台账-前端开发联调 --- src/views/basicData/supplierManage/index.vue | 4 src/api/procurementManagement/paymentLedger.js | 11 +++ src/views/basicData/customerFile/index.vue | 2 src/components/PIMTable/PIMTable.vue | 13 +++- src/views/procurementManagement/paymentEntry/index.vue | 4 src/views/procurementManagement/paymentLedger/index.vue | 112 +++++++++++++++++++++++++++++++++++++ 6 files changed, 138 insertions(+), 8 deletions(-) diff --git a/src/api/procurementManagement/paymentLedger.js b/src/api/procurementManagement/paymentLedger.js new file mode 100644 index 0000000..12b2754 --- /dev/null +++ b/src/api/procurementManagement/paymentLedger.js @@ -0,0 +1,11 @@ +// 閲囪喘鍙拌处椤甸潰鎺ュ彛 +import request from '@/utils/request' + +// 鍒嗛〉鏌ヨ +export function paymentLedgerList(query) { + return request({ + url: '/purchase/paymentRegistration/paymentLedgerList', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue index 7435f7b..96f1f52 100644 --- a/src/components/PIMTable/PIMTable.vue +++ b/src/components/PIMTable/PIMTable.vue @@ -2,9 +2,9 @@ <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData" :header-cell-style="{ background: '#F0F1F5', color: '#333333' }" height="calc(100vh - 18.5em)" :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" :row-key="rowKey" - style="width: 100%" tooltip-effect="dark" @row-click="rowClick" @current-change="currentChange" + style="width: 100%" tooltip-effect="dark" @row-click="rowClick" @current-change="currentChange" :show-summary="isShowSummary" @selection-change="handleSelectionChange" class="lims-table"> - <el-table-column align="center" type="selection" width="55" /> + <el-table-column align="center" type="selection" width="55" v-if="isSelection"/> <el-table-column align="center" label="搴忓彿" type="index" width="60" /> <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" @@ -135,6 +135,14 @@ type: Boolean, default: true }, + isSelection: { + type: Boolean, + default: false, + }, + isShowSummary: { + type: Boolean, + default: false, + }, highlightCurrentRow: { type: Boolean, default: false @@ -179,7 +187,6 @@ }) // Data -const btnWidth = ref('120px') const uploadRefs = ref([]) const currentFiles = ref({}) const uploadKeys = ref({}) diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue index 827b8e9..49ddc7b 100644 --- a/src/views/basicData/customerFile/index.vue +++ b/src/views/basicData/customerFile/index.vue @@ -20,7 +20,7 @@ </div> </div> <div class="table_list"> - <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :handleSelectionChange="handleSelectionChange" + <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" :total="total"></PIMTable> </div> <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板瀹㈡埛淇℃伅' : '缂栬緫瀹㈡埛淇℃伅'" width="70%" @close="closeDia"> diff --git a/src/views/basicData/supplierManage/index.vue b/src/views/basicData/supplierManage/index.vue index e9932c6..ce4dac7 100644 --- a/src/views/basicData/supplierManage/index.vue +++ b/src/views/basicData/supplierManage/index.vue @@ -20,7 +20,7 @@ </div> </div> <div class="table_list"> - <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :handleSelectionChange="handleSelectionChange" + <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" :total="total"></PIMTable> </div> <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板渚涘簲鍟嗕俊鎭�' : '缂栬緫渚涘簲鍟嗕俊鎭�'" width="70%" @close="closeDia"> @@ -112,7 +112,7 @@ import { delSupplier} from "@/api/basicData/supplierManageFile.js"; import {ElMessageBox } from "element-plus"; import {userListNoPage} from "@/api/system/user.js"; -import {addSupplier,getSupplier,listSupplier,updateSupplier} from "../../../api/basicData/supplierManageFile.js"; +import {addSupplier,getSupplier,listSupplier,updateSupplier} from "@/api/basicData/supplierManageFile.js"; const { proxy } = getCurrentInstance() const tableColumn = ref([ diff --git a/src/views/procurementManagement/paymentEntry/index.vue b/src/views/procurementManagement/paymentEntry/index.vue index 4022021..5f8054a 100644 --- a/src/views/procurementManagement/paymentEntry/index.vue +++ b/src/views/procurementManagement/paymentEntry/index.vue @@ -19,10 +19,10 @@ </div> </div> <div class="table_list"> - <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :handleSelectionChange="handleSelectionChange" + <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" :total="total"></PIMTable> </div> - <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板渚涘簲鍟嗕俊鎭�' : '缂栬緫渚涘簲鍟嗕俊鎭�'" width="60%" @close="closeDia"> + <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '鏂板浠樻鐧昏' : '缂栬緫浠樻鐧昏'" width="60%" @close="closeDia"> <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> <el-row :gutter="30"> <el-col :span="12"> diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue new file mode 100644 index 0000000..628ea90 --- /dev/null +++ b/src/views/procurementManagement/paymentLedger/index.vue @@ -0,0 +1,112 @@ +<template> + <div class="app-container"> + <div class="search_form"> + <div> + <span class="search_title">渚涘簲鍟嗘。妗堬細</span> + <el-input + v-model="searchForm.supplierName" + style="width: 240px" + placeholder="杈撳叆渚涘簲鍟嗗悕绉版悳绱�" + @change="handleQuery" + clearable + :prefix-icon="Search" + /> + <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button> + </div> + </div> + <div class="table_list"> + <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isShowSummary="true" style="width: 50%" :highlightCurrentRow="true" + :tableLoading="tableLoading" @pagination="pagination" :total="total" :row-click="setTableData"></PIMTable> + <PIMTable :column="tableColumn1" :tableData="tableData1" :isShowSummary="true" style="width: 50%"></PIMTable> + </div> + </div> +</template> + +<script setup> +import { ref } from 'vue' +import {Search} from "@element-plus/icons-vue"; +import {paymentLedgerList} from "@/api/procurementManagement/paymentLedger.js"; + +const tableColumn = ref([ + { + label: '渚涘簲鍟嗗悕绉�', + prop: 'supplierName', + }, + { + label: '鏉ョエ閲戦(鍏�)', + prop: 'invoiceAmount' + }, + { + label: '浠樻閲戦(鍏�)', + prop: 'paymentAmount' + }, + { + label: '搴斾粯娆鹃噾棰�(鍏�)', + prop: 'payableAmount' + }, +]) +const tableColumn1 = ref([ + { + label: '鍙戠敓鏃ユ湡', + prop: 'createTime', + }, + { + label: '鏉ョエ鏁�', + prop: 'voteCount' + }, + { + label: '浠樻閲戦(鍏�)', + prop: 'paymentAmount' + }, + { + label: '搴斾粯娆鹃噾棰�(鍏�)', + prop: 'payableAmount' + }, +]) +const tableData = ref([]) +const tableData1 = ref([]) +const tableLoading = ref(false) +const page = reactive({ + current: 1, + size: 10, +}) +const total = ref(0) + +// 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁 +const data = reactive({ + searchForm: { + supplierName: '', + }, +}) +const { searchForm } = toRefs(data) + +// 鏌ヨ鍒楄〃 +/** 鎼滅储鎸夐挳鎿嶄綔 */ +const handleQuery = () => { + page.current = 1 + getList() +} +const setTableData = (data) => { + tableData1.value = data.details +} +const pagination = ({ current, limit }) => { + page.current = current; + page.size = limit; + getList() +} +const getList = () => { + tableLoading.value = true + paymentLedgerList({...searchForm.value, ...page}).then(res => { + tableLoading.value = false + tableData.value = res.data + total.value = res.total + }) +} +getList() +</script> + +<style scoped lang="scss"> +.table_list { + display: flex; +} +</style> -- Gitblit v1.9.3