774078984@qq.com 3 сар өмнө
parent
commit
63ed9be951

+ 8 - 0
src/api/path/lotCard.api.js

@@ -86,4 +86,12 @@ export function OffSIMCard(data) {
 // 操作日志
 export function OperationRecord(data) {
     return service.post("/logs/logCardOperation", data);
+<<<<<<< HEAD
+=======
+}
+
+// 查询当前卡下的充值记录
+export function getOrderCard(data){
+    return service.post("/admin/sim/payOrders", data);
+>>>>>>> dev
 }

+ 21 - 0
src/views/home/index.vue

@@ -92,7 +92,11 @@
       </div>
 
       <div class="cardModel">
+<<<<<<< HEAD
         <div class="modelTitle">账户信息</div>
+=======
+        <div class="modelTitle">客户账户信息汇总</div>
+>>>>>>> dev
         <div class="accountList">
           <div class="item">
             <div class="txt">账户余额</div>
@@ -116,7 +120,11 @@
             <div class="txt">已充值客户</div>
             <div class="val">0</div>
           </div>
+<<<<<<< HEAD
           <div class="item">
+=======
+          <div class="item" v-if="userType==2">
+>>>>>>> dev
             <a-link href="link" :hoverable="false">查看接入密钥</a-link>
           </div>
         </div>
@@ -200,6 +208,19 @@
   </div>
 </template>
 
+<<<<<<< HEAD
+=======
+<script setup>
+import {ref,toRefs} from 'vue'
+
+const state = ref({
+  userType: JSON.parse(localStorage.getItem('user_login_information'))?.userType,
+})
+
+const {userType} =toRefs(state.value)
+</script>
+
+>>>>>>> dev
 <style lang="less" scoped>
 .container {
   background: transparent !important;

+ 6 - 6
src/views/lotCard/cardList/config.js

@@ -245,37 +245,37 @@ export const columnsCard = [
 export const columnsTopup = [
   {
     title: window.$t('lotCard.OrderNumber'),
-    dataIndex: 'productName',
+    dataIndex: 'orderId',
     ellipsis: true,
     align: 'center',
   },
   {
     title: window.$t('lotCard.PurchasePackage'),
-    dataIndex: 'productName',
+    dataIndex: 'trafficName',
     ellipsis: true,
     align: 'center',
   },
   {
     title: window.$t('lotCard.PackagePrice'),
-    dataIndex: 'productName',
+    dataIndex: 'payAmount',
     ellipsis: true,
     align: 'center',
   },
   {
     title: window.$t('lotCard.operator'),
-    dataIndex: 'productName',
+    dataIndex: 'source',
     ellipsis: true,
     align: 'center',
   },
   {
     title: window.$t('lotCard.PaymentStatus'),
-    dataIndex: 'productName',
+    dataIndex: 'payStatus',
     ellipsis: true,
     align: 'center',
   },
   {
     title: window.$t('lotCard.OrderDate'),
-    dataIndex: 'productName',
+    dataIndex: 'createdAt',
     ellipsis: true,
     align: 'center',
   },

+ 34 - 6
src/views/lotCard/cardList/trafficUseDialog.vue

@@ -34,7 +34,7 @@
             </a-col>
             <a-col :span="12">
               <a-form-item :label="$t('lotCard.validity')">
-                {{ Card_info.expireDay }} 
+                {{ Card_info.expireDay }}
               </a-form-item>
             </a-col>
             <a-col :span="12">
@@ -126,7 +126,8 @@
             Content of Tab Panel 3
           </a-tab-pane>
           <a-tab-pane key="4" :title="$t('lotCard.RechargeRecord')">
-            <a-table :columns="columnsTopup" :data="dataTopup" :scroll="{ x: 'auto' }" />
+            <a-table :columns="columnsTopup" :data="dataTopup" :scroll="{ x: 'auto' }" :pagination="pagination"
+              @page-change="evChangePageCardPuy" />
           </a-tab-pane>
           <a-tab-pane key="5" :title="$t('lotCard.UsageAmount')">
             <a-table :columns="columnsAmount" :data="dataAmount" :scroll="{ x: 'auto' }" :pagination="false" />
@@ -153,7 +154,7 @@
 </template>
 <script setup>
 import { onMounted, ref, h } from "vue";
-import { getDataCDR, PauseSIMService, RecoverSIMService, OperationRecord, OffSIMCard } from '@/api/path/lotCard.api'
+import { getDataCDR, PauseSIMService, RecoverSIMService, OperationRecord, OffSIMCard, getOrderCard } from '@/api/path/lotCard.api'
 import { Getdictionary } from '@/mixins/index'
 import { Message, Modal } from '@arco-design/web-vue'
 // 图表插件
@@ -174,6 +175,12 @@ const pageData = ref({
   current: 1,
 })
 
+const pagination = ref({
+  total: 0,
+  size: 10,
+  current: 1,
+})
+
 // 图表插件
 const option = ref({
   xAxis: {
@@ -195,7 +202,6 @@ const option = ref({
 const dataCard = ref([])
 
 // 充值信息
-
 const dataTopup = ref([])
 // 使用量
 const dataAmount = ref([])
@@ -223,6 +229,28 @@ const open = (data) => {
   optionsRecordSetting()
   intData()
   visible.value = true
+  ICCIDPuyData(data.iccid)
+}
+
+
+const ICCIDPuyData = async (id) => {
+  let res = await getOrderCard({ iccid: id, current: 1, size: 10 })
+  let res1 = await Getdictionary('puyType')
+  dataTopup.value = res.data.records.map(val => {
+    const payType = res1.filter(item => item.value == val.payStatus)[0]?.label
+    return {
+      ...val,
+      payStatus:payType ,
+      payAmount: val.payAmount + '/' + val.currency
+    }
+  })
+
+  pagination.value.total = res.data.total
+}
+
+const evChangePageCardPuy = (e) => {
+  pagination.value.current = e
+  ICCIDPuyData(Card_info.value.iccid)
 }
 
 // 使用量
@@ -294,8 +322,8 @@ const initChart = () => {
   })
 }
 
-const evChangePage = () => {
-  pageData.value.current = page
+const evChangePage = (e) => {
+  pageData.value.current = e
   optionsRecordSetting()
 }