wxy 4 ماه پیش
والد
کامیت
a3e934946c
3فایلهای تغییر یافته به همراه37 افزوده شده و 110 حذف شده
  1. 5 0
      src/api/path/flowPool.api.js
  2. 32 109
      src/views/flowPool/index.vue
  3. 0 1
      src/views/tariffManagement/index.vue

+ 5 - 0
src/api/path/flowPool.api.js

@@ -17,4 +17,9 @@ export function updateTrafficPool(param) {
 // 删除
 export function deleteTrafficPool(params) {
     return service.get('/admin/platform/deleteTrafficPool', { params })
+}
+
+// 卡信息列表
+export  function  getCardList (data) {
+    return service.post('admin/sim/cardInfoList',data)
 }

+ 32 - 109
src/views/flowPool/index.vue

@@ -72,8 +72,9 @@
             }}</a>
         </a-popconfirm>
         <!-- 导卡 -->
-     <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
-            $t('flowPool.exportCard') }}</a>
+        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
+            $t('flowPool.exportCard')
+          }}</a>
       </template>
 
     </a-table>
@@ -282,7 +283,8 @@
             导入结果
           </div>
           <div class="box-item-content">
-            <a-table :columns="columnsExport" :data="dataExport">
+            <a-table :columns="columnsExport" :data="dataExport" :pagination="paginationCard" :scroll="{ x: 'auto' }"
+                     @page-change="evChangePageCard">
               <template #operate="{ record }">
                 <a-button @click="openContract(record)" type="text">下载</a-button>
               </template>
@@ -313,10 +315,14 @@ import {onMounted, ref, reactive, getCurrentInstance, nextTick} from "vue";
 import {useRoute} from "vue-router";
 import {columns} from "./config";
 import {Message, Notification} from '@arco-design/web-vue'
-import {deleteTrafficPool, addTrafficPool, updateTrafficPool, trafficPoolList} from "@/api/path/flowPool.api"
+import {
+  deleteTrafficPool,
+  addTrafficPool,
+  updateTrafficPool,
+  trafficPoolList,
+  getCardList
+} from "@/api/path/flowPool.api"
 import {tariffList} from "@/api/path/tariffManagement.api"
-import {orderCancel} from "@/api/path/lotCard.api"
-import {enum_dict} from "@/hooks/enum";
 import {useSystemStore} from "@/store/modules/systemStore"
 
 
@@ -338,14 +344,12 @@ const pagination = ref({
   pageSize: 10,
   current: 1,
 })
-
-
-const rowSelection = reactive({
-  type: 'checkbox',
-  showCheckedAll: true,
-  onlyCurrent: false,
-});
-const selectedKeys = ref([])
+// 卡信息列表
+const paginationCard = ref({
+  total: 0,
+  pageSize: 10,
+  current: 1,
+})
 
 
 const intData = async () => {
@@ -358,7 +362,6 @@ const intData = async () => {
   const {data} = await trafficPoolList(param)
   dataSource.value = (data.records || []).map((item, index) => {
     const trafficPoolType = typeList.value.find(val => val.value == item.trafficPoolType)?.label
-    console.log(trafficList.value)
     const trafficPoolStatus = trafficList.value.find(val => val.value == item.status)?.label
     const sourceName = sourceList.value.find(val => val.value == item.source)?.label
     return {
@@ -367,13 +370,6 @@ const intData = async () => {
       trafficPoolType,
       trafficPoolStatus,
       poolNumber: "NR0" + (index + 1),
-      // cardRariffName: "监控1G月租",
-      // cardFlow: "1G/月",
-      // cardNum: "11/100",
-      // UsedMonth: "1.00G",
-      // surplusFlow: "99.0G",
-      // totalFlow: "100.0G",
-      // exceededFlow: "--",
     }
   })
   pagination.value.total = data.total
@@ -397,6 +393,12 @@ const evChangePage = (page) => {
   intData()
 }
 
+// 卡信息
+const evChangePageCard = (page) => {
+  paginationCard.value.current = page
+  intData()
+}
+
 const handleSearch = () => {
   intData()
 }
@@ -438,37 +440,7 @@ const columnsExport = [
   },
   {title: '操作', slotName: 'operate', align: 'center'},
 ];
-const dataExport = reactive([{
-  key: '1',
-  name: 'Jane Doe',
-  exportTime: '2024-10-13 22:20:01',
-  successTime: '2024-10-13 22:20:01',
-  status: 1
-}, {
-  key: '2',
-  name: 'Alisa Ross',
-  exportTime: '2024-10-13 22:20:01',
-  successTime: '2024-10-13 22:20:01',
-  status: 2
-}, {
-  key: '3',
-  name: 'Kevin Sandra',
-  exportTime: '2024-10-13 22:20:01',
-  successTime: '2024-10-13 22:20:01',
-  status: 3
-}, {
-  key: '4',
-  name: 'Ed Hellen',
-  exportTime: '2024-10-13 22:20:01',
-  successTime: '2024-10-13 22:20:01',
-  status: 2
-}, {
-  key: '5',
-  name: 'William Smith',
-  exportTime: '2024-10-13 22:20:01',
-  successTime: '2024-10-13 22:20:01',
-  status: 3
-}]);
+const dataExport = reactive();
 // -------------------------------
 
 const formState = ref({
@@ -530,56 +502,10 @@ const rules = {
   // currency: [{ required: true, trigger: 'change', }],
 };
 
-const earlyList = [
-  {value: 1, label: '手工停机'},
-
-];
-
-// 退订
-const handleUnsubscribeDialog = async (record) => {
-  // 订阅关系状态
-  // 1:未激活
-  // 2: 已过期
-  // 3: 已激活99:已退款
-  let param = {}
-  let statusFlag = true
-  if (selectedKeys.value.length > 0) {
-    statusFlag = false
-    param = {
-      ids: selectedKeys.value
-    }
-  }
-  if (record && record.id) {
-    statusFlag = false
-    param = {
-      ids: [record.id]
-    }
-  }
-
-  console.log(param, "param")
-  if (!statusFlag) {
-
-    const {code, data} = await orderCancel(param)
-
-    if (code == 200) {
-      Message.success({
-        content: data,
-        duration: 2000,
-      })
-    }
-  } else {
-    Message.warning({
-      content: $t('lotCard.tipsOrder'),
-      duration: 2000,
-    })
-  }
-};
-
 // 提交
 const handleSubmit = ({values, errors}) => {
   formRef.value.validate(async (errors) => {
     if (!errors) {
-      // values.user_id = Number(values.user_id)
       if (formState.value.id) {
         const {code, data} = await updateTrafficPool(values)
 
@@ -610,6 +536,10 @@ const handleSubmit = ({values, errors}) => {
 const dictShowModel = (type, data) => {
   if (type == 3) {
     openExport.value = true;
+    getCardList({iccid: data.id, current: 1, size: 10}).then((res) => {
+      dataExport.value = res.data.records || []
+      paginationCard.value.total = res.data.total
+    })
     return
   }
   handleTariff()
@@ -657,13 +587,6 @@ const resetForm = () => {
   })
   delete formState.value.id
 }
-
-// 卡详情
-
-const handleOk = () => {
-}
-const handleCancel = () => {
-}
 // --------------------------------------------------------
 // 获取字典
 const handleDictValue = async () => {
@@ -672,9 +595,9 @@ const handleDictValue = async () => {
   typeList.value = await Getdictionary('trafficPoolType')
 }
 
-onMounted(() => {
-  handleDictValue()
-  intData()
+onMounted(async () => {
+  await handleDictValue()
+  await intData()
 })
 
 

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

@@ -337,7 +337,6 @@ const handleSubmit = ({values, errors}) => {
     if (!errors) {
       const formVal = JSON.parse(JSON.stringify(values))
       delete formVal.settlementCycleMap
-      formVal.currency = '1'
       formVal.userId = Number(values.userId)
       formVal.simDataPlanId = String(values.simDataPlanId)
       if (values.settlementCycleMap.starTime && values.settlementCycleMap.starTime) {