| | |
| | | <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" |
| | |
| | | import ProductionDialog from './components/ProductionDialog.vue'; |
| | | import { purchaseRegistration } from "@/api/procureMent"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import useDictStore from "@/store/modules/dict"; |
| | | // 引入字典数据 |
| | | const useDictStores = useDictStore(); |
| | | useDictStores.setDict({ |
| | | id: 1, |
| | | name: "煤种类型", |
| | | type: "coalType", |
| | | items: [ |
| | | { label: "无烟煤", value: "anthracite" }, |
| | | { label: "烟煤", value: "bituminous" }, |
| | | { label: "褐煤", value: "lignite" } |
| | | ] |
| | | }) |
| | | console.log(useDictStores.dict); |
| | | |
| | | const { proxy } = getCurrentInstance() |
| | | const dialogFormVisible = ref(false); |
| | |
| | | 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 用于重置功能 |