Explorar o código

Merge branch 'whr'

* whr:
  卡,套餐,流量列表
  暂存
  暂存
liming hai 5 meses
pai
achega
336e3ea405

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

@@ -0,0 +1,47 @@
+
+import service from '../axios'
+
+// 获取流量包信息
+export function packageInfo(param) {
+  return service.post('/sim/packageInfo', param)
+}
+
+// 订购套餐
+export function orderSync(param) {
+  return service.post('/sim/orderSync', param)
+}
+
+// 查询流量
+export function upccData(param) {
+  return service.post('/sim/upccData', param)
+}
+
+// 激活前-结束套餐
+export function release(param) {
+  return service.post('/sim/release', param)
+}
+
+// // 激活后-结束套餐
+export function unsubscribe(param) {
+  return service.post('/sim/unsubscribe', param)
+}
+
+// 订购套餐列表
+export function packageTariffPlan(param) {
+  return service.post('/sim/packageTariffPlan', param)
+}
+
+// sim卡
+export function simInfo(param) {
+  return service.post('/sim/simInfo', param)
+}
+
+// 卡信息列表
+export function cardInfoList(param) {
+  return service.post('/admin/simCard/cardInfoList', param)
+}
+
+// 卡信息導入
+export function cardInfoImport(param) {
+  return service.post('/admin/simCard/cardInfoImport', param)
+}

+ 3 - 1
src/i18n/zh/index.js

@@ -6,6 +6,7 @@ import plan from './plan'
 import dataPackage from './dataPackage'
 import customer from './customer'
 import customerPackage from './customerPackage'
+import lotCard from './lotCard'
 
 export default {
   login,
@@ -15,5 +16,6 @@ export default {
   plan,
   dataPackage,
   customer,
-  customerPackage
+  customerPackage,
+  lotCard
 }

+ 46 - 0
src/i18n/zh/lotCard.js

@@ -0,0 +1,46 @@
+export default {
+    // 搜索
+    please:"请输入",
+    // 卡列表
+    created_at: "创建时间",
+    updated_at: "更新时间",
+    deleted_at: "删除时间",
+    msisdn: "主电话卡",
+    source: "来源",
+    status: "主卡状态",
+    CreateTime: "卡创建时间",
+    ExpireTime: "到期时间",
+    UserId: "用户ID",
+    iccid:"ICCID",
+    himsi:'HIMSI',
+    
+    // 流量列表
+    activationMode:"激活方式",
+    lastModifyTime:"上次修改时间",
+    period:"流量包套餐时长",
+    periodType:"周期类型",
+    type:"流量使用限制类型",
+    cardPools:"卡池ID",
+    desc:"描述",
+    ext:"扩展属性",
+    name:"流量包名",
+    refuelingPackage:"加油包",
+
+    // 套餐列表
+    bundleDesc:"流量包说明",
+    dataBundleId:"流量包ID",
+    orderEndTime:"过期时间",
+    orderActiveTime:"套餐激活时间",
+    orderCreateTime:"订购时间",
+    orderExpireTime:"到期时间",
+    orderRemainTime:"套餐剩余可用时间",
+    isSupportFuelpack:"周期类型",
+    orderChannel:"订购渠道",
+    orderID:"平台订单ID",
+    packageType:"包类型",
+    subscriptionKey:"子订单标识",
+    packageStatus:"订阅关系状态",
+    price:"订单价格",
+    deductionModel:"套餐收费方式",
+
+}  

+ 20 - 0
src/views/lotCard/cardList/config.js

@@ -0,0 +1,20 @@
+export const columns = [
+  { title: window.$t('lotCard.iccid'), dataIndex: 'iccid', align: 'center', width:200   },
+  { title: window.$t('lotCard.himsi'), dataIndex: 'hImsi', align: 'center', width:200   },
+  { title: window.$t('lotCard.status'), dataIndex: 'status', align: 'center', width:100 },
+  { title: window.$t('lotCard.created_at'), dataIndex: 'created_at', align: 'center', width:200 },
+  { title: window.$t('lotCard.deleted_at'), dataIndex: 'deleted_at', align: 'center', width:200 },
+  { title: window.$t('lotCard.updated_at'), dataIndex: 'updated_at', align: 'center', width:200 },
+  { title: window.$t('lotCard.msisdn'), dataIndex: 'msisdn', align: 'center', width:200 },
+  { title: window.$t('lotCard.source'), dataIndex: 'source', align: 'center', width:200 },
+  { title: window.$t('lotCard.ExpireTime'), dataIndex: 'expire_time', align: 'center', width:200 },
+  { title: window.$t('lotCard.UserId'), dataIndex: 'user_id', align: 'center', width:200 },
+  {
+    title: window.$t('global.common.operations'),
+    dataIndex: 'id',
+    slotName: 'id',
+    align: 'center',
+    width: 180,
+    fixed: "right",
+  }
+]

+ 103 - 0
src/views/lotCard/cardList/index.vue

@@ -0,0 +1,103 @@
+<template>
+    <div class="container">
+        <div class="head-title">
+          <span>{{  route.meta.title }} </span>
+      </div>
+      <!-- 搜索条件区 -->
+    <div class="search-section">
+      <a-form :model="searchForm" layout="inline">
+        <a-form-item field="iccid" label="ICCID">
+          <a-input v-model="searchForm.iccid" :placeholder="$t('lotCard.please')+$t('lotCard.iccid')" allow-clear />
+        </a-form-item>
+        <a-form-item field="hImsi" label="HIMSI">
+          <a-input v-model="searchForm.cardNumber" :placeholder="$t('lotCard.please')+$t('lotCard.himsi')" allow-clear />
+        </a-form-item>
+        <a-form-item>
+          <a-space>
+            <a-button type="primary" @click="handleSearch">{{$t('form.Search')}}</a-button>
+            <a-button @click="resetSearch">{{$t('form.Reset')}}</a-button>
+          </a-space>
+        </a-form-item>
+      </a-form>
+    </div>
+        
+      <a-table  :data="dataSource" :columns="columns" :pagination="pagination"  :scroll="{ x: 'auto' }" > 
+        <template #id="{ record }">
+          <!-- <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="evEdit(record)">编辑</a>
+          <a-popconfirm content="确认删除该信息?" ok-text="确定" cancel-text="取消" @ok="evDelete(record.id)">
+            <a href="javascript:;" class="a-link">删除</a>
+          </a-popconfirm> -->
+        </template>
+
+      </a-table>
+  </div>
+  </template>
+  
+  <script setup>
+  import { onMounted, ref, h } from "vue";
+  import { useRoute } from "vue-router";
+  import { columns } from "./config";
+  import { Message, Notification } from '@arco-design/web-vue'
+  import { cardInfoList } from "@/api/path/lotCard.api"
+  const searchForm = ref({
+    "iccid": "",
+    "imsi" : "",
+  });
+
+  const dataSource = ref([]);
+  const route = useRoute();
+  const pagination = ref({
+  total: 0,
+  pageSize: 10,
+  current: 1,
+})  
+
+const cardStatusOptions = [
+  { label: '正常', value: 'normal' },
+  { label: '停机', value: 'suspended' },
+];
+  
+  const intData = async () => {
+  const param = {
+    current:  pagination.value.current,
+    size:  pagination.value.pageSize,
+    ...searchForm.value,
+  }
+  const { data } = await cardInfoList(param)
+  dataSource.value = data.records ||[]
+  pagination.value.total = data.total
+}
+  
+onMounted(() => {
+  intData()
+})
+  </script>
+  
+  <style scoped lang="less">
+
+.search-section {
+  margin-top: 20px;
+  margin-bottom: 20px;
+}
+
+  .container {
+    .head-title {
+      display: flex;
+      justify-content: space-between;
+    }
+    .form-row {
+      display: flex;
+      .form-row-col{
+          width: 25%;
+          display: flex;
+          align-items: center;        
+          .form-row-label{
+              width: 120px;
+              text-align: right;
+          }
+      }
+    }
+  }
+  
+  </style>
+  

+ 29 - 0
src/views/lotCard/packageMange/config.js

@@ -0,0 +1,29 @@
+export const columns = [
+  { title: window.$t('lotCard.dataBundleId'), dataIndex: 'dataBundleId', align: 'center', width:200   },
+  // { title: window.$t('lotCard.bundleDesc'), dataIndex: 'bundleDesc', align: 'center', width:200   },
+  { title: window.$t('lotCard.orderEndTime'), dataIndex: 'endTime', align: 'center' , width:200   },
+  { title: window.$t('lotCard.orderCreateTime'), dataIndex: 'createTime', align: 'center',  width:200   },
+  { title: window.$t('lotCard.orderExpireTime'), dataIndex: 'expireTime', align: 'center',width:200 },
+  {
+    title: window.$t('lotCard.orderRemainTime'),
+    dataIndex: 'remainTime',
+    align: 'center',
+    width:200 
+  },
+  { title: window.$t('lotCard.isSupportFuelpack'), dataIndex: 'isSupportFuelpack', align: 'center', width:200 },
+  { title: window.$t('lotCard.orderChannel'), dataIndex: 'orderChannel', align: 'center', width:200 },
+  { title: window.$t('lotCard.orderID'), dataIndex: 'orderID', align: 'center', width:200 },
+  { title: window.$t('lotCard.packageType'), dataIndex: 'packageType', align: 'center', width:200 },
+  { title: window.$t('lotCard.subscriptionKey'), dataIndex: 'subscriptionKey', align: 'center', width:200 },
+  { title: window.$t('lotCard.price'), dataIndex: 'prince', align: 'center', width:200 },
+  { title: window.$t('lotCard.deductionModel'), dataIndex: 'deductionModel', align: 'center', width:200 },
+  { title: window.$t('lotCard.packageStatus'), dataIndex: 'status', align: 'center',  width:200 },
+  {
+    title: window.$t('global.common.operations'),
+    dataIndex: 'id',
+    slotName: 'id',
+    align: 'center',
+    width: 180,
+    fixed: "right",
+  }
+]

+ 90 - 0
src/views/lotCard/packageMange/index.vue

@@ -0,0 +1,90 @@
+<template>
+    <div class="container">
+        <div class="head-title">
+          <span>{{  route.meta.title }} </span>
+      </div>
+        
+      <a-table  :data="dataSource" :columns="columns"   :scroll="{ x: 'auto' }" @page-change="evChangePage" @page-size-change="evChangePageSize"  > 
+        <template #id="{ record }">
+          <!-- <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="evEdit(record)">编辑</a>
+          <a-popconfirm content="确认删除该信息?" ok-text="确定" cancel-text="取消" @ok="evDelete(record.id)">
+            <a href="javascript:;" class="a-link">删除</a>
+          </a-popconfirm> -->
+        </template>
+
+      </a-table>
+  </div>
+  </template>
+  
+  <script setup>
+  import { onMounted, ref, h } from "vue";
+  import { useRoute } from "vue-router";
+  import { columns } from "./config";
+  import { Message, Notification } from '@arco-design/web-vue'
+  import { packageTariffPlan } from "@/api/path/lotCard.api"
+  const formData = ref({
+    username: '',
+    "iccid": "89852342022040149139",
+    "hImsi": "454120387374989",
+  });
+
+  const dataSource = ref([]);
+  const route = useRoute();
+  const pagination = ref({
+  total: 0,
+  pageSize: 10,
+  current: 1,
+})  
+  
+  const intData = async () => {
+  const param = {
+    current:  pagination.value.current,
+    size:  pagination.value.pageSize,
+    ...formData.value,
+  }
+  const { data } = await packageTariffPlan(param)
+  dataSource.value = (data || []).map(item=>{
+    return{
+      ...item,
+      prince:item.price.price
+    }
+  })
+  pagination.value.total = data.length
+}
+
+const evChangePage = (page) => {
+  pagination.value.current = page
+}
+
+const evChangePageSize = (pageSize) => {
+  pagination.value.pageSize = pageSize
+}
+
+  
+onMounted(() => {
+  intData()
+})
+  </script>
+  
+  <style scoped lang="less">
+  .container {
+    .head-title {
+      display: flex;
+      justify-content: space-between;
+    }
+    .form-row {
+      display: flex;
+      .form-row-col{
+          width: 25%;
+          display: flex;
+          align-items: center;        
+          .form-row-label{
+              width: 120px;
+              text-align: right;
+          }
+      }
+    }
+  }
+  
+  </style>
+  

+ 19 - 0
src/views/lotCard/trafficList/config.js

@@ -0,0 +1,19 @@
+export const columns = [
+    { title: window.$t('lotCard.activationMode'), dataIndex: 'activationMode', align: 'center', width:100   },
+    // { title: window.$t('lotCard.cardPools'), dataIndex: 'cardPools', align: 'center', width:100   },
+    // { title: window.$t('lotCard.desc'), dataIndex: 'desc', align: 'center', width:200 },
+    { title: window.$t('lotCard.lastModifyTime'), dataIndex: 'lastModifyTime', align: 'center', width:200 },
+    // { title: window.$t('lotCard.name'), dataIndex: 'name', align: 'center', width:200 },
+    { title: window.$t('lotCard.period'), dataIndex: 'period', align: 'center', width:200 },
+    { title: window.$t('lotCard.periodType'), dataIndex: 'periodType', align: 'center', width:200 },
+    { title: window.$t('lotCard.status'), dataIndex: 'status', align: 'center', width:200 },
+    { title: window.$t('lotCard.type'), dataIndex: 'type', align: 'center', width:200 },
+    {
+      title: window.$t('global.common.operations'),
+      dataIndex: 'id',
+      slotName: 'id',
+      align: 'center',
+      width: 180,
+      fixed: "right",
+    }
+  ]

+ 113 - 0
src/views/lotCard/trafficList/index.vue

@@ -0,0 +1,113 @@
+<!-- 流量列表 -->
+<template>
+    <div class="container">
+        <div class="head-title">
+          <span>{{  route.meta.title }} </span>
+      </div>
+      <!-- 搜索条件区 -->
+    <div class="search-section">
+      <a-form :model="searchForm" layout="inline">
+        <a-form-item field="iccid" label="ICCID">
+          <a-input v-model="searchForm.iccid" :placeholder="$t('lotCard.please')+$t('lotCard.iccid')" allow-clear />
+        </a-form-item>
+        <a-form-item field="hImsi" label="HIMSI">
+          <a-input v-model="searchForm.cardNumber" :placeholder="$t('lotCard.please')+$t('lotCard.himsi')" allow-clear />
+        </a-form-item>
+        <a-form-item>
+          <a-space>
+            <a-button type="primary" @click="handleSearch">{{$t('form.Search')}}</a-button>
+            <a-button @click="resetSearch">{{$t('form.Reset')}}</a-button>
+          </a-space>
+        </a-form-item>
+      </a-form>
+    </div>
+        
+      <a-table  :data="dataSource" :columns="columns" :pagination="pagination"  :scroll="{ x: 'auto' }" @page-change="evChangePage" @page-size-change="evChangePageSize" > 
+        <template #id="{ record }">
+          <!-- <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="evEdit(record)">编辑</a>
+          <a-popconfirm content="确认删除该信息?" ok-text="确定" cancel-text="取消" @ok="evDelete(record.id)">
+            <a href="javascript:;" class="a-link">删除</a>
+          </a-popconfirm> -->
+        </template>
+
+      </a-table>
+  </div>
+  </template>
+  
+  <script setup>
+  import { onMounted, ref, h } from "vue";
+  import { useRoute } from "vue-router";
+  import { columns } from "./config";
+  import { Message, Notification } from '@arco-design/web-vue'
+  import { packageInfo } from "@/api/path/lotCard.api"
+  const searchForm = ref({
+    "iccid": "",
+    "imsi" : "",
+  });
+
+  const dataSource = ref([]);
+  const route = useRoute();
+  const pagination = ref({
+  total: 0,
+  pageSize: 10,
+  current: 1,
+})  
+
+const cardStatusOptions = [
+  { label: '正常', value: 'normal' },
+  { label: '停机', value: 'suspended' },
+];
+  
+  const intData = async () => {
+  const param = {
+    current:  pagination.value.current,
+    size:  9999999,
+    ...searchForm.value,
+  }
+  const { data } = await packageInfo(param)
+  dataSource.value =  data || []
+  pagination.value.total =  dataSource.value.length
+}
+  
+
+const evChangePage = (page) => {
+  pagination.value.current = page
+}
+
+const evChangePageSize = (pageSize) => {
+  pagination.value.pageSize = pageSize
+}
+
+onMounted(() => {
+  intData()
+})
+  </script>
+  
+  <style scoped lang="less">
+
+.search-section {
+  margin-top: 20px;
+  margin-bottom: 20px;
+}
+
+  .container {
+    .head-title {
+      display: flex;
+      justify-content: space-between;
+    }
+    .form-row {
+      display: flex;
+      .form-row-col{
+          width: 25%;
+          display: flex;
+          align-items: center;        
+          .form-row-label{
+              width: 120px;
+              text-align: right;
+          }
+      }
+    }
+  }
+  
+  </style>
+  

+ 1 - 1
vite.config.js

@@ -61,7 +61,7 @@ export default defineConfig({
     hmr: true,
     proxy: {
       '/api': {
-        target: "http://localhost:3001",
+        target: "http://sim.nanodreamtech.com",
         changeOrigin: true,
         ws: true,
         secure: true,