Просмотр исходного кода

修改bug:
订单审核-我的审核,点审核通过,提示这个,通过不了
增加详情页的loading效果

jiakai 4 месяцев назад
Родитель
Сommit
be955768fd
1 измененных файлов с 17 добавлено и 7 удалено
  1. 17 7
      src/views/finance/modules/auditDetail.vue

+ 17 - 7
src/views/finance/modules/auditDetail.vue

@@ -956,8 +956,7 @@ import image from "@/assets/images/image.png";
 import pdf from "@/assets/images/pdf.png";
 import word from "@/assets/images/word.png";
 import VueOfficeDocx from "@vue-office/docx";
-import { ElMessage } from "element-plus";
-
+import { ElMessage, ElLoading } from "element-plus";
 const myRoute = useRoute()
 const myRouter = useRouter()
 const activeindex = ref(myRoute.query.activeindex)
@@ -1215,17 +1214,28 @@ const download = (item) => {
   image.src = item.fileName
 }
 const vehicleAndVesselTaxVo = ref()//车船税
+
 // 获取详情
 const initDetail = () => {
+  // 打开 loading
+  const loading = ElLoading.service({
+    lock: true,
+    text: "正在加载订单详情...",
+    background: "rgba(0, 0, 0, 0.7)",
+  });
+
   api.financeApi.auditInfo(myRoute.query.id).then((res: any) => {
     if (res.code == 200) {
       detailData.value = res.data;
-      vehicleAndVesselTaxVo.value = res.data?.vehicleAndVesselTaxVo || {}
-      nextTick(() => jumpFn())
-
+      vehicleAndVesselTaxVo.value = res.data?.vehicleAndVesselTaxVo || {};
+      nextTick(() => jumpFn());
     }
-  })
-}
+  }).catch((err) => {
+    console.log("获取详情失败", err);
+  }).finally(() => {
+    loading.close();
+  });
+};
 
 // 放弃审核
 const handleAuditCancel = () => {