瀏覽代碼

增加客户充值记录

wxy 3 月之前
父節點
當前提交
cea93e5e35

+ 11 - 1
src/api/finance.js → src/api/path/finance.js

@@ -1,4 +1,4 @@
-import service from '../utils/axios'
+import service from '../../utils/axios'
 
 // 查询充值记录
 export function getTopUpRecordList(data) {
@@ -52,4 +52,14 @@ export function getWalletCard(params) {
 // 客户详情
 export  function  deleteMessUser(params){
     return service.get('admin/platform/customerInfo', {params})
+}
+
+
+// H5充值记录
+export function getAdiroePuyList(data) {
+  return service({
+    url: '/admin/sim/payOrders',
+    method: 'post',
+    data
+  })
 }

+ 13 - 5
src/components/Layout/components/layoutHeader/index.vue

@@ -19,9 +19,12 @@
         </div>
 
         <a-dropdown trigger="click">
-          <a-avatar :size="38" class="avatar-body">
-            <img class="avatar-image" alt="avatar" src="https://avatars.githubusercontent.com/u/39849555?v=4" />
-          </a-avatar>
+          <div class="userInform">
+            <a-avatar :size="38" class="avatar-body">
+              <img class="avatar-image" alt="avatar" src="https://avatars.githubusercontent.com/u/39849555?v=4" />
+            </a-avatar>
+            <div class="userName">{{ userInfor?.username }}</div>
+          </div>
           <template #content>
             <a-doption>
               <a-space @click="evHandleLogout">
@@ -32,7 +35,7 @@
           </template>
         </a-dropdown>
 
-        <div class="userName">{{ userInfor?.username }}</div>
+
 
         <a-tooltip content="设置中心">
           <icon-settings size="22" style="margin-left: 10px;" @click="SettingVisible = true" />
@@ -140,7 +143,7 @@ watch(() => LayoutStore.setting.HeadNavigationBar, val => {
       }
     })
   }
-}, { immediate:true })
+}, { immediate: true })
 
 onMounted(() => {
   userInfor.value = JSON.parse(localStorage.getItem('user_login_information'))
@@ -149,6 +152,11 @@ onMounted(() => {
 </script>
 
 <style scoped lang="less">
+.userInform{
+  display: flex;
+  align-items: center;
+  cursor: pointer;
+}
 .layout_header {
   display: flex;
   align-items: center;

+ 44 - 84
src/views/financialManagement/accountBalance/index.vue

@@ -17,56 +17,17 @@
       <div class="item-title">账单明细</div>
       <!-- 搜索条件区 -->
       <div class="search-section">
-        <a-form :model="searchForm" layout="inline">
-          <a-form-item field="startTime" label="开始时间">
-            <a-date-picker
-              style="width: 220px; margin: 0 24px 24px 0"
-              show-time
-              v-model="searchForm.startTime"
-              :time-picker-props="{ defaultValue: '09:09:06' }"
-              format="YYYY-MM-DD HH:mm:ss"
-              @ok="onOkStart"
-            />
-          </a-form-item>
-          <a-form-item field="endTime" label="结束时间">
-            <a-date-picker
-              style="width: 220px; margin: 0 24px 24px 0"
-              show-time
-              v-model="searchForm.endTime"
-              :time-picker-props="{ defaultValue: '09:09:06' }"
-              format="YYYY-MM-DD HH:mm:ss"
-              @ok="onOkEnd"
-            />
-          </a-form-item>
-          <a-form-item>
-            <a-space>
-              <a-button type="primary" @click="handleSearch">搜索</a-button>
-              <a-button @click="resetSearch">重置</a-button>
-            </a-space>
-          </a-form-item>
-        </a-form>
+        <Search :SearchForm="AccountBalanceSearch"></Search>
       </div>
       <!-- 数据表格 -->
-      <a-table
-        row-key="customerName"
-        :columns="columns"
-        :data="tableData"
-        :pagination="pagination"
-      >
+      <a-table row-key="customerName" :columns="columns" :data="tableData" :pagination="pagination">
         <template #detail="{ record }">
           <a-button @click="openDetail(record)" type="text">查看</a-button>
           <a-button @click="openTopsUp(record)" type="text">结算</a-button>
         </template>
         <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 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">
@@ -76,15 +37,8 @@
         </template>
       </a-table>
     </div>
-    <a-modal
-      v-model:visible="showAdd"
-      title="结算"
-      @cancel="showAdd = false"
-      @before-ok="submitAdd"
-      okText="确定"
-      width="800px"
-      cancelText="关闭"
-    >
+    <a-modal v-model:visible="showAdd" title="结算" @cancel="showAdd = false" @before-ok="submitAdd" okText="确定"
+      width="800px" cancelText="关闭">
       <a-form :model="formAdd" auto-label-width>
         <a-form-item field="customerName" label="客户名称">
           <!-- <a-input v-model="formAdd.customerName" placeholder="请输入客户" /> -->
@@ -100,11 +54,7 @@
           123111.00元
         </a-form-item>
         <a-form-item field="fileList" label="打款凭证">
-          <a-upload
-            action="/"
-            :default-file-list="formAdd.fileList"
-            style="width: auto; max-width: 400px"
-          />
+          <a-upload action="/" :default-file-list="formAdd.fileList" style="width: auto; max-width: 400px" />
           <div class="text-box">
             <div class="text">1.请上传客户银行转账等同等性质的支付凭证文件</div>
             <div class="text">2.图片仅支持jpg或png格式</div>
@@ -113,13 +63,7 @@
         </a-form-item>
       </a-form>
     </a-modal>
-    <a-modal
-      v-model:visible="showDetail"
-      width="1000px"
-      title="订单详情"
-      :hide-cancel="true"
-      @cancel="detailCancel"
-    >
+    <a-modal v-model:visible="showDetail" width="1000px" title="订单详情" :hide-cancel="true" @cancel="detailCancel">
       <div class="detail">
         <div class="detail-box">
           <div class="detail-title">账单信息(泰国李总)</div>
@@ -208,11 +152,7 @@
           </div>
           <div class="detail-title">入账订单列表</div>
           <div class="detail-table">
-            <a-table
-              :columns="columnsDetail"
-              :data="dataDetail"
-              :pagination="pagination"
-            />
+            <a-table :columns="columnsDetail" :data="dataDetail" :pagination="pagination" />
           </div>
         </div>
       </div>
@@ -222,9 +162,10 @@
 <script setup>
 import { ref, reactive, onMounted } from "vue";
 import { Message } from "@arco-design/web-vue";
-import { getWalletCard } from "@/api/finance.js";
-import {useI18n} from 'vue-i18n'
-
+import { getWalletCard } from "@/api/path/finance.js";
+import { useI18n } from 'vue-i18n'
+import Search from '@/components/Search/index.vue'
+import {AccountBalanceSearch} from '../config'
 const { t } = useI18n()
 
 
@@ -259,13 +200,34 @@ const columns = [
     tooltip: true,
     width: 100,
   },
-  { title: "客户名称", dataIndex: "customerName" },
-  { title: "账单生成时间", dataIndex: "createTime" },
-  { title: "结算周期时间段", dataIndex: "createTime" },
-  { title: "结算金额", dataIndex: "money" },
-  { title: "消耗流量", dataIndex: "deplete" },
-  { title: "状态", slotName: "status" },
-  { title: "操作", slotName: "detail", align: "center" },
+  {
+    title: "客户名称", dataIndex: "customerName", align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "账单生成时间", dataIndex: "createTime", align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "结算周期时间段", dataIndex: "createTime", align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "结算金额", dataIndex: "money", align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "消耗流量", dataIndex: "deplete", align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "状态", slotName: "status", align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "操作", slotName: "detail", align: "center", align: "center",
+    ellipsis: true,
+  },
 ];
 const tableData = ref([]);
 const pagination = reactive({
@@ -321,7 +283,7 @@ const showDetail = ref(false);
 const openDetail = () => {
   showDetail.value = true;
 };
-const detailCancel = () => {};
+const detailCancel = () => { };
 
 const getWalletCardFc = async () => {
   const { data } = await getWalletCard();
@@ -401,11 +363,9 @@ const getWalletCardFc = async () => {
         line-height: 36px;
         color: rgba(0, 0, 0, 0.9);
 
-        .item-num {
-        }
+        .item-num {}
 
-        .item-dw {
-        }
+        .item-dw {}
       }
     }
   }

+ 270 - 0
src/views/financialManagement/config.js

@@ -0,0 +1,270 @@
+export const columns = [
+  {
+    title: window.$t("financialManagement.orderNumber"),
+    dataIndex: "index",
+    align: "center",
+    render: ({ rowIndex }) => rowIndex + 1,
+    width: 60,
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: window.$t("financialManagement.customerId"),
+    dataIndex: "id",
+    ellipsis: true,
+    tooltip: true,
+    width: 180,
+    align: "center",
+  },
+  {
+    title: window.$t("financialManagement.customerName"),
+    dataIndex: "name",
+    align: "center",
+    slotName: "name",
+  },
+  {
+    title: window.$t("financialManagement.customerAccount"),
+    dataIndex: "username",
+    align: "center",
+  },
+  {
+    title: window.$t("financialManagement.rechargeAmountTab"),
+    dataIndex: "rechargeAmount",
+    align: "center",
+  },
+  {
+    title: window.$t("financialManagement.availableAmountTab"),
+    dataIndex: "availableAmount",
+    width: 140,
+    align: "center",
+  },
+  {
+    title: window.$t("financialManagement.rechargeType"),
+    dataIndex: "status",
+    align: "center",
+    slotName: "status",
+    filterable: {
+      filters: [
+        {
+          text: window.$t("financialManagement.recharge"),
+          value: "1",
+        },
+        {
+          text: window.$t("financialManagement.offset"),
+          value: "2",
+        },
+        {
+          text: window.$t("financialManagement.deduct"),
+          value: "3",
+        },
+      ],
+      filter: (value, record) => {
+        return record.status === value[0];
+      },
+      multiple: true,
+    },
+  },
+  {
+    title: "凭证",
+    slotName: "image",
+    width: 180,
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: window.$t("financialManagement.updatedAt"),
+    dataIndex: "updatedAt",
+    width: 180,
+    align: "center",
+  },
+];
+
+export const handleStatusTxt = (status) => {
+  const obj = {
+    1: window.$t("financialManagement.recharge"),
+    2: window.$t("financialManagement.offset"),
+    3: window.$t("financialManagement.deduct"),
+  };
+  return obj[status];
+};
+
+export const statusOptions = [
+  { label: window.$t("financialManagement.recharge"), value: "1" },
+  { label: window.$t("financialManagement.offset"), value: "2" },
+  { label: window.$t("financialManagement.deduct"), value: "3" },
+];
+
+// h5充值
+export const UserAdiroColumns = [
+  {
+    title: "ICCID",
+    dataIndex: "iccid",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "资费名称",
+    dataIndex: "trafficName",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "套餐名称",
+    dataIndex: "productName",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+
+  {
+    title: "订单ID",
+    dataIndex: "orderId",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "支付状态",
+    dataIndex: "payStatus",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "支付渠道",
+    dataIndex: "payChannel",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "支付金额",
+    dataIndex: "payAmount",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "币种",
+    dataIndex: "currency",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+  {
+    title: "备注",
+    dataIndex: "remark",
+    align: "center",
+    ellipsis: true,
+    tooltip: true,
+  },
+];
+// 账户余额搜索
+export const AccountBalanceSearch = [
+  {
+    type: "input",
+    label: "账单号",
+    field: "id",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "input",
+    label: "客户名称",
+    field: "id",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "range-picker",
+    label: "账单生成时间",
+    field: "id",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "range-picker",
+    label: "结算周期时间段",
+    field: "id",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "select",
+    label: "状态",
+    field: "moderationStatus",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "orderType",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+];
+// 平台端搜索
+export const AdminSearchForm = [
+  {
+    type: "input",
+    label: "客户账号",
+    field: "id",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "input",
+    label: "客户名称",
+    field: "id",
+    value: "", // 双向绑定的值
+  }
+]
+
+// 客户端搜索
+export const ClientSearchForm = [
+  {
+    type: "input",
+    label: "ICCID",
+    field: "iccid",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "input",
+    label: "资费名称",
+    field: "tariffName",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "input",
+    label: "套餐名称",
+    field: "productName",
+    value: "", // 双向绑定的值
+  },
+  // {
+  //   type: "select",
+  //   label: "运营商名称",
+  //   field: "source",
+  //   options: [], // 默认空,后面会通过字典加载
+  //   dict: "source",
+  //   value: "", // 双向绑定的值
+  //   width: "200",
+  // },
+  {
+    type: "input",
+    label: "订单ID",
+    field: "id",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "select",
+    label: "支付状态",
+    field: "payStatus",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "puyType",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+  {
+    type: "select",
+    label: "币种",
+    field: "currency",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "currencyType",
+    value: "", // 双向绑定的值
+    width: "200",
+  }
+]

+ 60 - 185
src/views/financialManagement/customerTopsUp/index.vue

@@ -3,26 +3,9 @@
   <div class="customer-top-up">
     <!-- 搜索条件区 -->
     <div class="search-section">
-      <a-form ref="formRef" :model="searchForm" layout="inline">
-        <a-form-item
-          field="name"
-          :label="$t('financialManagement.searchForm.name')"
-        >
-          <a-input
-            v-model="searchForm.name"
-            :placeholder="$t('financialManagement.searchForm.placeholder')"
-            allow-clear
-          />
-        </a-form-item>
-        <a-form-item>
-          <a-space>
-            <a-button type="primary" @click="handleSearch">搜索</a-button>
-            <a-button @click="resetSearch">重置</a-button>
-          </a-space>
-        </a-form-item>
-      </a-form>
+      <Search @query="getTopUpRecordListFc" @reset="reset" :SearchForm="userType.userType == 1 ? AdminSearchForm : ClientSearchForm"></Search>
     </div>
-    <div class="audit-btn">
+    <div class="audit-btn" v-if="userType.userType == 1">
       <a-button @click="openTopsUp" type="text">
         <template #icon>
           <icon-plus-circle />
@@ -31,87 +14,43 @@
       </a-button>
     </div>
     <!-- 数据表格 -->
-    <a-table
-      row-key="id"
-      :columns="columns"
-      :data="tableData"
-      :pagination="pagination"
-      @page-change="onPageChange"
-      @page-size-change="onPageSizeChange"
-      :filter-icon-align-left="true"
-    >
+    <a-table row-key="id" :columns="userType.userType == 1 ? columns : UserAdiroColumns" :data="tableData"
+      :pagination="pagination" @page-change="onPageChange" @page-size-change="onPageSizeChange"
+      :filter-icon-align-left="true">
       <template #name="{ record }">
         <div class="boldTxt">{{ record.name }}</div>
       </template>
       <template #status="{ record }">
         <div>{{ handleStatusTxt(record.status) }}</div>
       </template>
+      <template #image="{ record }">
+        <a-image width="60" height="60" :src="record.certificateImg" :preview-props="{
+          actionsLayout: ['rotateRight', 'zoomIn', 'zoomOut'],
+        }" style="cursor: pointer;">
+        </a-image>
+      </template>
     </a-table>
-    <a-modal
-      :visible="showAdd"
-      :title="$t('financialManagement.recharge')"
-      @cancel="showAdd = false"
-      @ok="submitAdd"
-      okText="确定"
-      width="800px"
-      cancelText="关闭"
-      :mask-closable="false"
-      :loading="okLoading"
-      unmount-on-close
-    >
+    <a-modal :visible="showAdd" :title="$t('financialManagement.recharge')" @cancel="showAdd = false" @ok="submitAdd"
+      okText="确定" width="800px" cancelText="关闭" :mask-closable="false" :loading="okLoading" unmount-on-close>
       <a-form ref="addFormRef" :rules="rules" :model="formAdd" auto-label-width>
-        <a-form-item
-          field="status"
-          :label="$t('financialManagement.rechargeType')"
-        >
+        <a-form-item field="status" :label="$t('financialManagement.rechargeType')">
           <a-radio-group v-model="formAdd.status" :options="statusOptions" />
         </a-form-item>
-        <a-form-item
-          field="userId"
-          :label="$t('financialManagement.searchForm.name')"
-        >
-          <a-select
-            :options="customerOptions"
-            :style="{ width: '320px' }"
-            :loading="customerLoading"
-            :placeholder="$t('financialManagement.lenovoInput')"
-            @search="customerSearch"
-            :field-names="fieldNames"
-            allow-search
-            allow-clear
-            @change="customerChange"
-          />
+        <a-form-item field="userId" :label="$t('financialManagement.searchForm.name')">
+          <a-select :options="customerOptions" :style="{ width: '320px' }" :loading="customerLoading"
+            :placeholder="$t('financialManagement.lenovoInput')" @search="customerSearch" :field-names="fieldNames"
+            allow-search allow-clear @change="customerChange" />
         </a-form-item>
-        <a-form-item
-          field="amount"
-          :label="$t('financialManagement.rechargeAmount')"
-        >
-          <a-input-number
-            v-model="formAdd.amount"
-            :placeholder="$t('financialManagement.rechargeAmountPlace')"
-            class="input-demo"
-            :min="10"
-            :max="100"
-            :style="{ width: '320px' }"
-          />
+        <a-form-item field="amount" :label="$t('financialManagement.rechargeAmount')">
+          <a-input-number v-model="formAdd.amount" :placeholder="$t('financialManagement.rechargeAmountPlace')"
+            class="input-demo" :min="10" :max="100" :style="{ width: '320px' }" />
         </a-form-item>
         <a-form-item field="remarks" :label="$t('financialManagement.remarks')">
-          <a-textarea
-            :placeholder="$t('financialManagement.remarksPlace')"
-            v-model="formAdd.remarks"
-            allow-clear
-            :style="{ width: '320px' }"
-          />
+          <a-textarea :placeholder="$t('financialManagement.remarksPlace')" v-model="formAdd.remarks" allow-clear
+            :style="{ width: '320px' }" />
         </a-form-item>
-        <a-form-item
-          field="certificateImg"
-          :label="$t('financialManagement.voucher')"
-        >
-          <Upload
-            v-model:modelValue="formAdd.certificateImg"
-            :style="{ width: 'auto' }"
-            beforeUpload
-          />
+        <a-form-item field="certificateImg" :label="$t('financialManagement.voucher')">
+          <Upload v-model:modelValue="formAdd.certificateImg" :style="{ width: 'auto' }" beforeUpload />
           <div class="text-box">
             <div class="text">1.{{ $t("financialManagement.uploadTip1") }}</div>
             <div class="text">2.{{ $t("financialManagement.uploadTip2") }}</div>
@@ -125,9 +64,12 @@
 <script setup>
 import { ref, reactive, onMounted } from "vue";
 import { Message } from "@arco-design/web-vue";
-import { getTopUpRecordList, getCustomerList, topUpAs } from "@/api/finance.js";
+import { getTopUpRecordList, getCustomerList, topUpAs, getAdiroePuyList } from "@/api/path/finance.js";
 import Upload from "@/components/upload/index.vue";
-
+import { columns, handleStatusTxt, statusOptions, UserAdiroColumns, AdminSearchForm, ClientSearchForm } from '../config'
+const userType = ref(JSON.parse(localStorage.getItem('user_login_information')))
+import Search from '@/components/Search/index.vue'
+import { Getdictionary } from '@/mixins/index'
 const rules = {
   status: [
     {
@@ -156,102 +98,20 @@ onMounted(() => {
   getTopUpRecordListFc();
 });
 
-const initPage = {
-  total: 0,
-  current: 1,
-  pageSize: 10,
-};
 
 const formRef = ref();
-const searchForm = ref({
-  name: "",
-});
+const searchForm = ref();
+
+
 
-const columns = [
-  {
-    title: window.$t("financialManagement.orderNumber"),
-    dataIndex: "index",
-    align: "center",
-    render: ({ rowIndex }) => rowIndex + 1,
-    width: 60,
-  },
-  {
-    title: window.$t("financialManagement.customerId"),
-    dataIndex: "id",
-    ellipsis: true,
-    tooltip: true,
-    width: 180,
-    align: "center",
-  },
-  {
-    title: window.$t("financialManagement.customerName"),
-    dataIndex: "name",
-    align: "center",
-    slotName: "name",
-  },
-  {
-    title: window.$t("financialManagement.customerAccount"),
-    dataIndex: "username",
-    align: "center",
-  },
-  {
-    title: window.$t("financialManagement.rechargeAmountTab"),
-    dataIndex: "rechargeAmount",
-    align: "center",
-  },
-  {
-    title: window.$t("financialManagement.availableAmountTab"),
-    dataIndex: "availableAmount",
-    width: 140,
-    align: "center",
-  },
-  {
-    title: window.$t("financialManagement.rechargeType"),
-    dataIndex: "status",
-    align: "center",
-    slotName: "status",
-    filterable: {
-      filters: [
-        {
-          text: window.$t("financialManagement.recharge"),
-          value: "1",
-        },
-        {
-          text: window.$t("financialManagement.offset"),
-          value: "2",
-        },
-        {
-          text: window.$t("financialManagement.deduct"),
-          value: "3",
-        },
-      ],
-      filter: (value, record) => {
-        return record.status === value[0];
-      },
-      multiple: true,
-    },
-  },
-  {
-    title: window.$t("financialManagement.updatedAt"),
-    dataIndex: "updatedAt",
-    width: 180,
-    align: "center",
-  },
-];
-const handleStatusTxt = (status) => {
-  const obj = {
-    1: window.$t("financialManagement.recharge"),
-    2: window.$t("financialManagement.offset"),
-    3: window.$t("financialManagement.deduct"),
-  };
-  return obj[status];
-};
 const tableData = ref([]);
 const pagination = ref({
-  ...initPage,
   showTotal: true,
   showJumper: true,
   showPageSize: true,
+  total: 0,
+  current: 1,
+  pageSize: 10,
 });
 
 const onPageChange = (page) => {
@@ -275,11 +135,7 @@ const resetSearch = () => {
 
 // 新增弹窗
 const addFormRef = ref();
-const statusOptions = [
-  { label: window.$t("financialManagement.recharge"), value: "1" },
-  { label: window.$t("financialManagement.offset"), value: "2" },
-  { label: window.$t("financialManagement.deduct"), value: "3" },
-];
+
 const openTopsUp = () => {
   getCustomerListFc();
   showAdd.value = true;
@@ -310,15 +166,28 @@ const submitAdd = () => {
   });
 };
 
-const getTopUpRecordListFc = async () => {
+const getTopUpRecordListFc = async (item) => {
+  if(item){
+    searchForm.value = item
+  }
+  let res;
   const param = {
     current: pagination.value.current,
     size: pagination.value.pageSize,
     ...searchForm.value,
   };
-  const { data } = await getTopUpRecordList(param);
-  tableData.value = data?.records || [];
-  pagination.value.total = data.total;
+  if (userType.value.userType == 1) {
+    res = await getTopUpRecordList(param)
+    tableData.value = res.data?.records || [];
+  } else {
+    let puyType = await Getdictionary('puyType')
+    res = await getAdiroePuyList(param)
+    tableData.value = (res.data?.records || []).map(res=>{
+      res.payStatus = puyType.filter(item=>item.code == res.puyType)[0]?.label
+      return res
+    })
+  }
+  pagination.value.total = res.data.total;
 };
 
 // 客户选择
@@ -346,6 +215,12 @@ const getCustomerListFc = async (value) => {
   customerOptions.value = data?.records || [];
   customerLoading.value = false;
 };
+
+const reset = (item)=>{
+  searchForm.value = item 
+  pagination.value.current = 1
+  getTopUpRecordListFc()
+}
 </script>
 <style scoped lang="less">
 .customer-top-up {

+ 1 - 1
src/views/financialManagement/trafficDetails/index.vue

@@ -74,7 +74,7 @@
 <script setup>
 import { ref, reactive, onMounted } from "vue";
 import { Message } from "@arco-design/web-vue";
-import { getSimConsumptionDetailsList, getUserSimInfo } from "@/api/finance.js";
+import { getSimConsumptionDetailsList, getUserSimInfo } from "@/api/path/finance.js";
 
 onMounted(() => {
   getSimConsumptionDetailsListFc();

+ 1 - 1
src/views/tariffManagement/index.vue

@@ -144,7 +144,7 @@ const intData = async (item) => {
     const Activated = item.trafficBilling + item.trafficBillingType
     const bagSize = item.pricing + '/' + item.mrcAmount + '/' + item.networkAccessFee
     const billingMethodName = methodList.value.find(val => val.value == item.billingMethod)?.label
-
+    delete item.children
     let pricingName;
 
     if (item.billingMethod == 1) {