diff --git a/src/views/oa_apply/detail.vue b/src/views/oa_apply/detail.vue index 99f5296..c5e613e 100644 --- a/src/views/oa_apply/detail.vue +++ b/src/views/oa_apply/detail.vue @@ -22,7 +22,7 @@ </el-table-column> <el-table-column label="报销项目" show-overflow-tooltip prop="cate_id"> <template #default="{ row }"> - <dict-value :options="dictData.oa_approve_cate" :value="row.cate_id" /> + {{ cateIdToText(row.cate_id) }} </template> </el-table-column> <el-table-column label="备注信息" show-overflow-tooltip prop="remark"> @@ -131,14 +131,6 @@ const userStore = useUserStore().userInfo; const showBackDialog = ref(false) - -defineProps({ - dictData: { - type: Object as PropType<Record<string, any[]>>, - default: () => ({}) - }, -}) - // 表单数据 const formData = reactive({ id: 0, @@ -184,6 +176,17 @@ const submituser = (e) => { }; +const cateIdToText = (id) => { + // 1-交通费 2-住宿费 3-餐补费 4-招待费 5-汽油费 6-其他费 + if (id == 1) return '交通费'; + if (id == 2) return '住宿费'; + if (id == 3) return '餐补费'; + if (id == 4) return '招待费'; + if (id == 5) return '汽油费'; + if (id == 6) return '其他费'; + +} + //打开弹窗 const open = () => { popupRef.value?.open() diff --git a/src/views/oa_apply/edit.vue b/src/views/oa_apply/edit.vue index 08b3335..158febc 100644 --- a/src/views/oa_apply/edit.vue +++ b/src/views/oa_apply/edit.vue @@ -43,9 +43,12 @@ <el-table-column label="报销项目" show-overflow-tooltip> <template #default="{ row }"> <el-select v-model="row.cate_id" placeholder="请选择报销项目" class="flex-1"> - <el-option :label="item.name" :value="item.value" - v-for="item in dictData.oa_approve_cate"> - </el-option> + <el-option label="交通费" :value="1"></el-option> + <el-option label="住宿费" :value="2"></el-option> + <el-option label="餐补费" :value="3"></el-option> + <el-option label="招待费" :value="4"></el-option> + <el-option label="汽油费" :value="5"></el-option> + <el-option label="其他费" :value="6"></el-option> </el-select> </template> </el-table-column> @@ -83,13 +86,6 @@ const mode = ref("add"); -defineProps({ - dictData: { - type: Object as PropType<Record<string, any[]>>, - default: () => ({}) - }, -}) - // 弹窗标题 const popupTitle = computed(() => { return "新增审批" diff --git a/src/views/oa_apply/index.vue b/src/views/oa_apply/index.vue index 46ffff1..4fcc4e0 100644 --- a/src/views/oa_apply/index.vue +++ b/src/views/oa_apply/index.vue @@ -74,16 +74,14 @@ <pagination v-model="pager" @change="getLists" /> </div> </el-card> - <edit-popup v-if="showEdit" ref="editRef" :deptList="deptList" :dict-data="dictData" @success="getLists" - @close="showEdit = false" /> - <detailPopup v-if="showDetail" ref="detailRef" :dict-data="dictData" @success="showDetail = false, getLists()" + <edit-popup v-if="showEdit" ref="editRef" :deptList="deptList" @success="getLists" @close="showEdit = false" /> + <detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()" @close="showDetail = false, getLists()" /> </div> </template> <script lang="ts" setup name="oaPersonalQuitLists"> import { usePaging } from '@/hooks/usePaging' -import { useDictData } from '@/hooks/useDictOptions' import { apiExpenseList, apiExpenseDetail } from '@/api/oa_financial' import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' @@ -114,7 +112,6 @@ const handleSelectionChange = (val: any[]) => { } // 获取字典数据 -const { dictData } = useDictData('oa_approve_cate') // 分页相关 const { pager, getLists, resetParams, resetPage } = usePaging({