From def0c35f4e2a9ea5aa198065a77b74565fea5b71 Mon Sep 17 00:00:00 2001
From: zmj <1493694146@qq.com>
Date: Wed, 29 May 2024 11:15:21 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E6=B5=81=E7=A8=8B=E6=98=BE?=
 =?UTF-8?q?=E7=A4=BA=E6=96=B9=E5=BC=8F=E6=9B=B4=E6=96=B0=EF=BC=8C=E5=A4=9A?=
 =?UTF-8?q?=E4=B8=AA=E8=A7=86=E5=9B=BE=E9=A1=B5=E9=9D=A2=E5=8F=8A=E7=BB=84?=
 =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/oa_apply/detail.vue | 21 ++++++++++++---------
 src/views/oa_apply/edit.vue   | 16 ++++++----------
 src/views/oa_apply/index.vue  |  7 ++-----
 3 files changed, 20 insertions(+), 24 deletions(-)

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({