| | |
| | | <div> |
| | | <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>--> |
| | | </div> |
| | |
| | | import ExpandTable from "./components/ExpandTable.vue"; |
| | | import Modal from "./components/Modal.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { truncate } from "@/utils/index.js"; |
| | | |
| | | defineOptions({ |
| | | name: "来票登记", |
| | |
| | | prop: "contractAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : 0; |
| | | return val ? truncate(parseFloat(val), 3) : 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | prop: "receiptPaymentAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : 0; |
| | | return val ? truncate(parseFloat(val), 3) : 0; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | prop: "unReceiptPaymentAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : 0; |
| | | return val ? truncate(parseFloat(val), 3) : 0; |
| | | }, |
| | | }, |
| | | // { |
| | |
| | | }; |
| | | |
| | | 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) => { |