Przeglądaj źródła

客户余额列表补齐

吴sir 3 miesięcy temu
rodzic
commit
82197c09f5

+ 10 - 0
src/api/path/finance.js

@@ -62,4 +62,14 @@ export function getAdiroePuyList(data) {
     method: 'post',
     data
   })
+}
+
+
+// 账户余额管理
+export function getWalletList(data) {
+    return service({
+        url: '/admin/platform/monthBill',
+        method: 'post',
+        data
+    })
 }

+ 33 - 16
src/views/financialManagement/accountBalance/index.vue

@@ -28,9 +28,9 @@
         <template #status="{ record }">
           <div v-if="record.status == 1" class="status-table" style="color: rgba(43, 164, 113, 1)">
             <div class="status-icon" style="background-color: rgba(43, 164, 113, 1)"></div>
-            已出账
+            正常
           </div>
-          <div v-if="record.status == 2" class="status-table">
+          <div v-if="record.status == 0" class="status-table">
             <div class="status-icon"></div>
             欠费中
           </div>
@@ -162,7 +162,7 @@
 <script setup>
 import { ref, reactive, onMounted } from "vue";
 import { Message } from "@arco-design/web-vue";
-import { getWalletCard } from "@/api/path/finance.js";
+import { getWalletCard,getWalletList } from "@/api/path/finance.js";
 import { useI18n } from 'vue-i18n'
 import Search from '@/components/Search/index.vue'
 import {AccountBalanceSearch} from '../config'
@@ -171,6 +171,7 @@ const { t } = useI18n()
 
 onMounted(() => {
   getWalletCardFc();
+  getWallectData()
 });
 
 const cardList = ref([
@@ -181,10 +182,7 @@ const cardList = ref([
   { name: "总消耗流量", value: 0, unit: "G" },
 ]);
 
-const searchForm = reactive({
-  startTime: "",
-  endTime: "",
-});
+const searchForm = ref();
 
 const columns = [
   {
@@ -195,29 +193,30 @@ const columns = [
   },
   {
     title: "账单号",
-    dataIndex: "accountNumber",
+    dataIndex: "id",
     ellipsis: true,
     tooltip: true,
-    width: 100,
+    align: "center",
+    maxWidth: 150,
   },
   {
-    title: "客户名称", dataIndex: "customerName", align: "center",
+    title: "客户名称", dataIndex: "name", align: "center",
     ellipsis: true,
   },
   {
-    title: "账单生成时间", dataIndex: "createTime", align: "center",
+    title: "账单生成时间", dataIndex: "createdAt", align: "center",
     ellipsis: true,
   },
   {
-    title: "结算周期时间段", dataIndex: "createTime", align: "center",
+    title: "结算周期时间段", dataIndex: "statementTime", align: "center",
     ellipsis: true,
   },
   {
-    title: "结算金额", dataIndex: "money", align: "center",
+    title: "结算金额", dataIndex: "amount", align: "center",
     ellipsis: true,
   },
   {
-    title: "消耗流量", dataIndex: "deplete", align: "center",
+    title: "消耗流量", dataIndex: "DataVol", align: "center",
     ellipsis: true,
   },
   {
@@ -230,8 +229,8 @@ const columns = [
   },
 ];
 const tableData = ref([]);
-const pagination = reactive({
-  total: tableData.value.length,
+const pagination = ref({
+  total: 0,
   current: 1,
   pageSize: 10,
 });
@@ -287,6 +286,23 @@ const getWalletCardFc = async () => {
   cardList.value[3].value = data.moth_data_usage;
   cardList.value[4].value = data.dataUsage;
 };
+
+
+const getWallectData = async (item) => {
+  if(item){
+    searchForm.value = item
+  }
+  let res = await getWalletList({...pagination.value,...searchForm.value})
+  if(res.code===200){
+    tableData.value = res.data.records.map(res=>{
+      return {
+        ...res,
+        DataVol:res.DataVol+'G'
+      }
+    })
+    pagination.value.total = res.data.total
+  }
+}
 </script>
 <style scoped lang="less">
 .customer-top-up {
@@ -376,6 +392,7 @@ const getWalletCardFc = async () => {
   line-height: 22px;
   text-align: left;
   color: rgba(253, 63, 90, 1);
+  justify-content: center;
 
   .status-icon {
     width: 6px;