| | |
| | | v-hasPermi="['cwgl:receivableBillManagement:remove']">删除 |
| | | </el-button> --> |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" |
| | | v-hasPermi="['cwgl:receivableBillManagement:export']">导出 |
| | | v-hasPermi="['cwgl:receivableBillManagement:export']">导出1 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{ size, row, index }"> |
| | | <el-link class="link-btn" type="primary" :underline="false" plain :size="size" @click="handleFy(row)" |
| | | v-hasPermi="['cwgl:receivableBillManagement:receivableBillManagement']"> 编辑 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1" :underline="false" plain :size="size" @click="handleSettle(row)" |
| | | v-hasPermi="['cwgl:receivableBillManagement:receivableBillSettlementDetail']"> 结算 |
| | | </el-link> |
| | |
| | | <BillSettlementHistory ref="historyRef" :type="activeType" /> |
| | | <NestedDetailDialog ref="feeDetailRef" :type="activeType" /> |
| | | <OperationLogModal ref="logModalRef" /> |
| | | |
| | | <BillEditDialog ref="billDialogRef" @submit="handleBillSubmit" /> |
| | | </template> |
| | | |
| | | <script setup name="receivableBillManagement" lang="ts"> |
| | |
| | | import { hasPermission } from "@/utils/permissionUtils"; |
| | | import SettlementDialog from '@/components/SettlementDialog/index.vue'; |
| | | import makeOutInvoice from '@/components/makeOutInvoice/index.vue'; |
| | | import BillEditDialog from "../../../components/BillEditDialog/index.vue"; |
| | | |
| | | import BillSettlementHistory from '../../../components/BillSettlementHistory/index.vue'; |
| | | import NestedDetailDialog from '../../../components/NestedDetailDialog/index.vue'; |
| | |
| | | periodType: { |
| | | label: '周期类型', |
| | | minWidth: 200, // 增加宽度以容纳日期范围 |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_period_type', |
| | | |
| | | }, |
| | | businessStartDateArray: { |
| | | label: '业务期间', |
| | | minWidth: 200, |
| | | formatter: (row) => { |
| | | if (row.businessEndDate && row.businessStartDate) { |
| | | return `${row.businessStartDate} 至 ${row.businessEndDate}`; |
| | |
| | | }, |
| | | businessDateArray: { |
| | | label: '账单周期', |
| | | minWidth: 200, |
| | | formatter: (row) => { |
| | | if (row.billingStartDate && row.billingEndDate) { |
| | | return `${row.billingStartDate} 至 ${row.billingEndDate}`; |
| | |
| | | }) |
| | | |
| | | } |
| | | const billDialogRef = ref(); |
| | | |
| | | /** |
| | | * 点击编辑按钮 |
| | | */ |
| | | const handleFy = (row: any) => { |
| | | // 1. 先通过接口获取最新的统计数据(系统编号、应结金额等) |
| | | getReceivableBillManagement(row.id).then((res) => { |
| | | if (res.code === 200) { |
| | | // 2. 调用子组件的 openDialog 方法,并将接口返回的数据传进去 |
| | | billDialogRef.value.openDialog(res.data); |
| | | } |
| | | }); |
| | | }; |
| | | /** |
| | | * 子组件点击“确定”后的回调 |
| | | */ |
| | | const handleBillSubmit = (data: any) => { |
| | | console.log(data); |
| | | |
| | | updateReceivableBillManagement(data).then((res) => { |
| | | if (res.code === 200) { |
| | | proxy.$message.success("修改成功"); |
| | | billDialogRef.value.handleClose(); // 关闭弹窗 |
| | | onLoad(page.value); // 刷新列表 |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | </script> |