|
@@ -2,13 +2,14 @@
|
|
|
<HcCard>
|
|
|
<template #header>
|
|
|
<div class="w-36">
|
|
|
- <el-select v-model="searchForm.projectType" block clearable placeholder="归属人" size="large">
|
|
|
- <el-option v-for="item in projectType" :label="item.name" :value="item.key"/>
|
|
|
+ <el-select v-model="searchForm.userIdVesting" block clearable placeholder="归属人" size="large">
|
|
|
+ <el-option label="暂无接口1" value="1"/>
|
|
|
+ <el-option label="暂无接口2" value="2"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="w-72 ml-2">
|
|
|
- <el-select v-model="searchForm.projectType" block clearable placeholder="项目名称" size="large">
|
|
|
- <el-option v-for="item in projectType" :label="item.name" :value="item.key"/>
|
|
|
+ <el-select v-model="searchForm.projectId" block clearable placeholder="项目名称" size="large">
|
|
|
+ <el-option v-for="item in projectType" :label="item.name" :value="item.id"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="ml-4">
|
|
@@ -64,24 +65,45 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {ref} from "vue";
|
|
|
+import {onActivated, ref} from "vue";
|
|
|
import {useRouter} from 'vue-router'
|
|
|
+import mainApi from "~api/expense/finReimburse";
|
|
|
+import projectApi from "~api/project/project-list";
|
|
|
+import {getArrValue} from "js-fast-way";
|
|
|
+import {getChildList} from "~api/system/parameter";
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
+onActivated(() => {
|
|
|
+ getProjectData()
|
|
|
+ getTableData()
|
|
|
+ getChildListApi()
|
|
|
+})
|
|
|
+
|
|
|
+const getChildListApi = () => {
|
|
|
+ getChildList({
|
|
|
+ code: 'expense_fr_type'
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
//项目类型
|
|
|
-const projectType = ref([
|
|
|
- {name: '二级路', key: '二级路'},
|
|
|
- {name: '国道', key: '国道'},
|
|
|
- {name: '水利水电', key: '水利水电'},
|
|
|
- {name: '市政', key: '市政'},
|
|
|
-])
|
|
|
+const projectType = ref([])
|
|
|
+const getProjectData = async () => {
|
|
|
+ const {error, code, data} = await projectApi.getProjectList({
|
|
|
+ current: 1,
|
|
|
+ size: 1000,
|
|
|
+ })
|
|
|
+ //判断状态
|
|
|
+ if (!error && code === 200) {
|
|
|
+ projectType.value = getArrValue(data?.records)
|
|
|
+ } else {
|
|
|
+ projectType.value = []
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
//搜索表单
|
|
|
-const searchForm = ref({
|
|
|
- projectType: null, user: null, project: null,
|
|
|
- current: 1, size: 20, total: 0
|
|
|
-})
|
|
|
+const searchForm = ref({userIdVesting: null, projectId: null, current: 1, size: 20, total: 0})
|
|
|
|
|
|
//搜索
|
|
|
const searchClick = () => {
|
|
@@ -104,30 +126,34 @@ const pageChange = ({current, size}) => {
|
|
|
//获取数据
|
|
|
const tableLoading = ref(false)
|
|
|
const tableColumn = [
|
|
|
- {key: 'key', name: '报销编号', width: '120', align: 'center'},
|
|
|
- {key: 'key1', name: '报销类型', width: '140'},
|
|
|
- {key: 'key2', name: '项目名称', minWidth: '200'},
|
|
|
- {key: 'key3', name: '报销金额', width: '160', align: 'center'},
|
|
|
- {key: 'key4', name: '归属人', width: '140', align: 'center'},
|
|
|
- {key: 'key5', name: '审批结果', width: '140', align: 'center'},
|
|
|
- {key: 'key6', name: '审批状态', width: '140', align: 'center'},
|
|
|
- {key: 'key7', name: '报销时间', width: '160', align: 'center'},
|
|
|
- {key: 'key8', name: '创建人', width: '140', align: 'center'},
|
|
|
- {key: 'key9', name: '创建时间', width: '160', align: 'center'},
|
|
|
+ {key: 'frNumber', name: '报销编号', width: '120', align: 'center'},
|
|
|
+ {key: 'frType', name: '报销类型', width: '140'},
|
|
|
+ {key: 'projectName', name: '项目名称', minWidth: '200'},
|
|
|
+ {key: 'frMoney', name: '报销金额', width: '160', align: 'center'},
|
|
|
+ {key: 'userNameVesting', name: '归属人', width: '140', align: 'center'},
|
|
|
+ {key: 'approvalResultName', name: '审批结果', width: '140', align: 'center'},
|
|
|
+ {key: 'approvalStatusName', name: '审批状态', width: '140', align: 'center'},
|
|
|
+ {key: 'frDate', name: '报销时间', width: '160', align: 'center'},
|
|
|
+ {key: 'createName', name: '创建人', width: '140', align: 'center'},
|
|
|
+ {key: 'createTime', name: '创建时间', width: '160', align: 'center'},
|
|
|
{key: 'action', name: '操作', width: '90', align: 'center', fixed: 'right'},
|
|
|
]
|
|
|
-const tableData = ref([
|
|
|
- {id: 1, key: 'YS-01', key1: 'xxxx', key2: 'xxxx', key3: '65632', key4: '35654', key5: '12312', key6: 'xxxx'},
|
|
|
- {id: 2, key: 'YS-01', key1: 'xxxx', key2: 'xxxx', key3: '65632', key4: '35654', key5: '12312', key6: 'xxxx'},
|
|
|
- {id: 3, key: 'YS-01', key1: 'xxxx', key2: 'xxxx', key3: '65632', key4: '35654', key5: '12312', key6: 'xxxx'},
|
|
|
- {id: 4, key: 'YS-01', key1: 'xxxx', key2: 'xxxx', key3: '65632', key4: '35654', key5: '12312', key6: 'xxxx'},
|
|
|
- {id: 5, key: 'YS-01', key1: 'xxxx', key2: 'xxxx', key3: '65632', key4: '35654', key5: '12312', key6: 'xxxx'},
|
|
|
- {id: 6, key: 'YS-01', key1: 'xxxx', key2: 'xxxx', key3: '65632', key4: '35654', key5: '12312', key6: 'xxxx'},
|
|
|
-])
|
|
|
+const tableData = ref([])
|
|
|
+const getTableData = async () => {
|
|
|
+ tableLoading.value = true
|
|
|
+ const {error, code, data} = await mainApi.page(searchForm.value)
|
|
|
+ //判断状态
|
|
|
+ tableLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ tableData.value = getArrValue(data['records'])
|
|
|
+ searchForm.value.total = data['total'] || 0
|
|
|
+ } else {
|
|
|
+ tableData.value = []
|
|
|
+ searchForm.value.total = 0
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-const getTableData = () => {
|
|
|
|
|
|
-}
|
|
|
|
|
|
//预览
|
|
|
const rowNameTap = (row) => {
|