| | |
| | | v-model="filters.supplierName" |
| | | placeholder="请输入名称搜索" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | @change="handleQuery" |
| | | prefix-icon="Search" |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="采购订单号:"> |
| | |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="项目名称"> |
| | | <el-input |
| | | v-model="filters.projectName" |
| | | placeholder="请输入项目名称" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getTableData"> 搜索 </el-button> |
| | | <el-button @click="resetFilters"> 重置 </el-button> |
| | |
| | | <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> |
| | | <!-- <el-button @click="handleOut">导出</el-button>--> |
| | | <!-- <el-button type="danger" plain @click="handleDelete">删除</el-button>--> |
| | | </div> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="columns" |
| | | :tableData="dataList" |
| | | :tableData="filteredDataList" |
| | | :tableLoading="loading" |
| | | :isSelection="true" |
| | | :page="{ |
| | |
| | | <script setup> |
| | | import { usePaginationApi } from "@/hooks/usePaginationApi"; |
| | | import {delRegistration, gePurchaseListPage} from "@/api/procurementManagement/invoiceEntry.js"; |
| | | import { nextTick, onMounted, getCurrentInstance } from "vue"; |
| | | import { nextTick, onMounted, getCurrentInstance, ref } from "vue"; |
| | | import ExpandTable from "./components/ExpandTable.vue"; |
| | | import Modal from "./components/Modal.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "项目名称", |
| | | prop: "projectName", |
| | | width:400 |
| | | }, |
| | | { |
| | | label: "录入人", |
| | | prop: "recorderName", |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "已开票金额(元)", |
| | | label: "已来票金额(元)", |
| | | prop: "receiptPaymentAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "待开票金额(元)", |
| | | label: "待来票金额(元)", |
| | | prop: "unReceiptPaymentAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | |
| | | // }, |
| | | ] |
| | | ); |
| | | |
| | | // 计算属性过滤 审批通过approvalStatus=1 的数据 |
| | | const filteredDataList = computed(() => { |
| | | return dataList.value.filter(item => item.approvalStatus == 1); |
| | | }); |
| | | 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[0].id); |
| | | if (selectedRows.value.length < 1) { |
| | | proxy.$modal.msgWarning("请至少选中一条数据"); |
| | | return; |
| | | } |
| | | modalRef.value.open(type, selectedRows.value); |
| | | }; |
| | | |
| | | const handleEdit = (type, id) => { |
| | |
| | | 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 = []; |