2024-01-18 23:16:50 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
|
|
|
<div class="mt-4">
|
|
|
|
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
|
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
|
|
|
<el-table-column label="机具预算单号" prop="equipment_budget_code" show-overflow-tooltip />
|
|
|
|
<el-table-column label="金额" prop="total_amount" show-overflow-tooltip />
|
|
|
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
|
|
|
<el-table-column label="附件" prop="annex" show-overflow-tooltip align="center">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<el-link style="margin-right: 4px;" type="primary" :href="item.uri"
|
|
|
|
v-for="(item, index) in row.annex">文件{{
|
|
|
|
index + 1 }}</el-link>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</div>
|
2024-01-31 11:48:10 +08:00
|
|
|
<div class="flex justify-end mt-4">
|
2024-01-18 23:16:50 +08:00
|
|
|
<pagination v-model="pager" @change="getLists" />
|
|
|
|
</div>
|
|
|
|
</el-card>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { usePaging } from "@/hooks/usePaging"
|
|
|
|
import { apiProjectEquipmentBudgetLists } from '@/api/project_equipment_budget'
|
|
|
|
import { defineEmits } from "vue"
|
|
|
|
|
2024-01-31 11:48:10 +08:00
|
|
|
const props = defineProps({
|
|
|
|
project_id: Number
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2024-01-18 23:16:50 +08:00
|
|
|
// 查询条件
|
|
|
|
const queryParams = reactive({
|
2024-01-31 11:48:10 +08:00
|
|
|
project_id: props.project_id
|
2024-01-18 23:16:50 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 选中数据
|
|
|
|
const emits = defineEmits(["customEvent"]);
|
|
|
|
|
|
|
|
// 选中数据子父传递
|
|
|
|
const handleCurrentChange = (value: any) => {
|
|
|
|
emits("customEvent", value);
|
|
|
|
};
|
|
|
|
|
|
|
|
// 分页相关
|
|
|
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
|
|
|
fetchFun: apiProjectEquipmentBudgetLists,
|
|
|
|
params: queryParams,
|
|
|
|
});
|
|
|
|
|
|
|
|
getLists();
|
|
|
|
</script>
|