| | |
| | | <el-row :gutter="24" class="table-toolbar"> |
| | | <el-button type="primary" :icon="Plus" @click="handleAdd">新建</el-button> |
| | | <el-button type="danger" :icon="Delete" @click="handleDelete">删除</el-button> |
| | | <el-button type="info" :icon="Download" @click="handleExport">导出</el-button> |
| | | <!-- <el-button type="info" :icon="Download" @click="handleExport">导出</el-button> --> |
| | | </el-row> |
| | | <!-- 表格组件 --> |
| | | <data-table :loading="loading" :table-data="tableData" :columns="columns" @selection-change="handleSelectionChange" |
| | |
| | | getList(); |
| | | }; |
| | | const userStore = useUserStore(); |
| | | // 获取用户信息 |
| | | const userInfo = ref({}); |
| | | onMounted(async() => { |
| | | let res = await userStore.getInfo() |
| | | form.value.registrantId = res.user.userName; // 设置登记人ID |
| | | userInfo.value = res.user; |
| | | }); |
| | | // 分页处理 |
| | | const handlePagination = (val) => { |
| | |
| | | priceIncludingTax: "", |
| | | totalPriceIncludingTax: "", |
| | | taxRate: "", |
| | | registrantId: "", |
| | | registrantId: userInfo.value.userName, |
| | | registrationDate: new Date().toISOString().split('T')[0] |
| | | }; |
| | | // 新建时也需要设置 copyForm 用于重置功能 |