wxy 4 mēneši atpakaļ
vecāks
revīzija
072781c09e

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

@@ -66,3 +66,19 @@ export function getDataCDR(params) {
 export function getDataCDRDate(params) {
   return service.post("/scc/v1/cdr-daily", params);
 }
+
+// 暂停SIM卡服务
+export function PauseSIMService(params){
+  return service.post("/admin/sim/stopSim", params);
+}
+
+
+// 恢复SIM卡服务
+export function RecoverSIMService(data){
+  return service.post("/admin/sim/runeSim", data);
+}
+
+// 关闭SIM
+export function OffSIMCard(data){
+  return service.post("/admin/sim/closeSim", data);
+}

+ 1 - 1
src/api/path/purchase.js

@@ -2,7 +2,7 @@ import service from '../axios'
 
 // 采购订单分页查询
 export function purchaseOrderList(param) {
-    return service.post('/admin/sim/orderList', param)
+    return service.post('/admin/sim/applyList', param)
 }
 
 // 订购生成订单

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

@@ -1,12 +1,12 @@
 export const columns = [
   { title: window.$t('lotCard.iccid'), dataIndex: 'iccid', align: 'center',  ellipsis:true },
-  { title: window.$t('lotCard.source'), dataIndex: 'source', align: 'center',  ellipsis:true },
+  { title: window.$t('lotCard.source'), dataIndex: 'sourceName', align: 'center',  ellipsis:true },
   { title: 'IMSI', dataIndex: 'account', align: 'center', ellipsis:true},
   { title: 'SIM绑定的IMSI', dataIndex: 'currentImsi', align: 'center', ellipsis:true  },
   { title: 'SIM货币余额', dataIndex: 'moneyBalances', align: 'center', ellipsis:true  },
   { title: 'SIM生成日期', dataIndex: 'createTime', align: 'center',  ellipsis:true },
   { title: '支付方式', dataIndex: 'payType', align: 'center', ellipsis:true  },
-  { title: 'SIM状态', dataIndex: 'expireTime', align: 'center', ellipsis:true  },
+  { title: 'SIM状态', dataIndex: 'accountStatus', align: 'center', ellipsis:true  },
   { title: '已使用总流量', dataIndex: 'dataUsageTotal', align: 'center',  ellipsis:true },
   { title: '语音呼入分钟数', dataIndex: 'voiceMtTotal', align: 'center', ellipsis:true  },
   { title: '语音呼出分钟数', dataIndex: 'voiceMoTotal', align: 'center', ellipsis:true  },

+ 2 - 2
src/views/lotCard/cardList/index.vue

@@ -56,7 +56,7 @@
 
     </a-table>
     <!-- 查看流量消耗 -->
-    <trafficUseDialog ref="trafficUseDialogRef" />
+    <trafficUseDialog ref="trafficUseDialogRef" @submit="intData()"/>
 
     
   </div>
@@ -108,7 +108,7 @@ const intData = async () => {
       ...item.Info,
       payType: payType,
       dataPackageName: dataPackage,
-      source: soure
+      sourceName: soure
     }
   })
   pagination.value.total = data.total

+ 27 - 29
src/views/lotCard/cardList/trafficUseDialog.vue

@@ -136,18 +136,19 @@
 
         <template #footer>
             <div class="footer_button">
-                <a-button type="primary" status="warning">同步卡信息 V</a-button>
-                <a-button type="primary" status="warning">停复机 V</a-button>
-                <a-button type="primary" status="warning">断复机 V</a-button>
-                <a-button type="primary" status="warning">校准用量</a-button>
+                <!-- <a-button type="primary" status="warning">同步卡信息 V</a-button> -->
+                <a-button type="primary" status="warning" @click="SIMCardService(0)">暂停SIM卡服务</a-button>
+                <a-button type="primary" status="warning" @click="SIMCardService(1)">恢复SIM卡服务</a-button>
+                <a-button type="primary" status="warning">关闭SIM卡</a-button>
             </div>
         </template>
     </a-modal>
 </template>
 <script setup>
 import { onMounted, ref, nextTick } from "vue";
-import { getDataCDR, getDataCDRDate } from '@/api/path/lotCard.api'
+import { getDataCDR, PauseSIMService, RecoverSIMService, OffSIMCard } from '@/api/path/lotCard.api'
 import { Getdictionary } from '@/mixins/index'
+import { Message } from '@arco-design/web-vue'
 // 图表插件
 import * as echarts from "echarts";
 const props = defineProps({
@@ -158,12 +159,6 @@ const visible = ref(false)
 const Card_info = ref({})
 const dataPackage = ref()
 const dataSource = ref([]);
-const pagination = ref({
-    total: 0,
-    pageSize: 10,
-    current: 1,
-})
-
 const chartContainer = ref(null)
 const chart = ref(null)
 // 图表插件
@@ -327,8 +322,6 @@ const open = (data) => {
 
 // 使用量
 const intData = async () => {
-    let sourceName = await Getdictionary('source');
-
     // 获取今天的日期
     const today = new Date();
     const toDay = today.toISOString().split('T')[0];
@@ -341,17 +334,13 @@ const intData = async () => {
     // 获取 CDR 数据
     let res = await getDataCDR({
         iccid: Card_info.value.iccid,
-        source: sourceName.find(val => val.label == Card_info.value.source)?.value,
+        source: Card_info.value.source,
         startDate: formattedDate,
         endDate: toDay
     });
 
-    option.value.series[0].data = (res.data || [])
-        .filter(val => val.usage !== undefined) 
-        .map(val => val.usage); 
+    dataAmount.value = res.data
 
-    // 打印合并后的数据
-    console.log(option.value.series[0].data);
 
     // 定义季度时间段
     const time = ['1-3', '4-6', '7-9', '9-12'];
@@ -367,27 +356,36 @@ const intData = async () => {
         // 获取每个时间段的数据
         let res = await getDataCDR({
             iccid: Card_info.value.iccid,
-            source: sourceName.find(val => val.label == Card_info.value.source)?.value,
+            source: Card_info.value.source,
             startDate: startDate,
             endDate: endDate
         });
 
         // 将当前时间段的数据中的 'usage' 字段合并到 series[0].data 数组中
         const usageData = (res.data || [])
-            .filter(val => val.usage !== undefined) 
-            .map(val => val.usage); 
-        option.value.series[0].data.push(...usageData); 
+            .filter(val => val.usage !== undefined)
+            .map(val => val.usage);
+        option.value.series[0].data.push(...usageData);
     }
 }
 
-
-
-const evChangePage = (page) => {
-    pagination.value.current = page
+// SIM卡操作
+const SIMCardService = async (index) => {
+    const Inform = {
+        iccid: Card_info.value.iccid, source: Card_info.value.source
+    }
+    // 暂停SIM卡
+    let res = index == 0 ? await PauseSIMService(Inform) : (index == 1 ? await RecoverSIMService(Inform) : '')
+    if (res.code === 200) {
+        Message.success({
+            content: res.message,
+            duration: 2000,
+        })
+        handleSubmit()
+    }
 }
-
 const handleSubmit = () => {
-    emit('submit', { ...formData });
+    emit('submit', true);
     visible.value = false
 };
 

+ 1 - 2
src/views/order/BuyCard/index.vue

@@ -258,7 +258,7 @@ const columns = [
   { title: '订单编号', dataIndex: 'id', align: 'center', width: 300 },
   { title: '审核状态', dataIndex: 'orderTypeName', align: 'center' },
   { title: '订单状态', dataIndex: 'statusName', align: 'center' },
-  { title: '客户名称', dataIndex: 'user_id', align: 'center' },
+  { title: '客户名称', dataIndex: 'userName', align: 'center' },
   { title: '采购数量', dataIndex: 'quantity', align: 'center' },
   { title: '运营商名称', dataIndex: 'quantity', align: 'center' },
   { title: '资费', dataIndex: 'quantity', align: 'center' },
@@ -345,7 +345,6 @@ const handleDictValue = async () => {
   orderType.value = await Getdictionary('cardType')
   silenceOptions.value  = await Getdictionary('silenceOf')
   flowPoolData.value = await Getdictionary('groupPool')
-
   const param = {
     current: 1,
     size: 999,