瀏覽代碼

@
fix: 全站 PageResult items→list 兼容(account/employee/facetoface/quota)
@

alphaH 9 小時之前
父節點
當前提交
e8d7053f00

+ 2 - 2
frontend/src/views/module_payment/account/index.vue

@@ -1443,7 +1443,7 @@ async function fetchTransferList() {
       tenant_id: transferSearchForm.tenant_id || undefined,
       enterprise_id: transferSearchForm.enterprise_id || undefined,
     });
-    transferList.value = res.data.data.items || [];
+    transferList.value = res.data.data?.items || res.data.data?.list || [];
     transferPage.total = res.data.data.total || 0;
   } finally {
     transferListLoading.value = false;
@@ -1501,7 +1501,7 @@ async function fetchConsumeList() {
       start_time: consumeSearchForm.start_time || undefined,
       end_time: consumeSearchForm.end_time || undefined,
     });
-    consumeRecordList.value = res.data.data.items || [];
+    consumeRecordList.value = res.data.data?.items || res.data.data?.list || [];
     consumePage.total = res.data.data.total || 0;
   } finally {
     consumeListLoading.value = false;

+ 1 - 1
frontend/src/views/module_payment/employee/index.vue

@@ -421,7 +421,7 @@ const contentConfig = reactive<IContentConfig<EmployeePageQuery>>({
     if (params.employee_no) query.employee_no = params.employee_no;
     const res = await EmployeeAPI.listEmployee(query);
     return {
-      list: res.data.data?.items || [],
+      list: res.data.data?.items || res.data.data?.list || [],
       total: Number(res.data.data?.total) || 0,
     };
   },

+ 1 - 1
frontend/src/views/module_payment/facetoface/index.vue

@@ -267,7 +267,7 @@ const contentConfig = reactive<IContentConfig<any>>({
     }
     const res = await FacetofaceAPI.list(params.page_no, params.page_size, search);
     return {
-      list: res.data?.data?.items || [],
+      list: res.data?.data?.items || res.data?.data?.list || [],
       total: res.data?.data?.total || 0,
     };
   },

+ 2 - 2
frontend/src/views/module_payment/quota/index.vue

@@ -323,7 +323,7 @@ async function handleSearchEmployee() {
       const quotaRes = await QuotaAPI.employeeRecords(employeeIdSearch.value, {
         institution_id: employeeInstSearch.value || undefined,
       });
-      const records = quotaRes.data.data?.items || [];
+      const records = quotaRes.data.data?.items || quotaRes.data.data?.list || [];
       employeesData.value = [{
         employee_id: emp.employee_id,
         name: emp.employee_name,
@@ -435,7 +435,7 @@ const contentConfig = reactive<IContentConfig<QuotaPageQuery>>({
     if (params.status) query.status = params.status;
     const res = await QuotaAPI.listQuota(query);
     return {
-      list: res.data.data?.items || [],
+      list: res.data.data?.items || res.data.data?.list || [],
       total: res.data.data?.total || 0,
     };
   },