|
@@ -1,16 +1,6 @@
|
|
|
<template>
|
|
|
<!-- 卡清单管理 -->
|
|
|
<div class="container">
|
|
|
- <div class="head-title">
|
|
|
- <span>{{ route.meta.title }} </span>
|
|
|
- <span class="head-title-right">
|
|
|
- <a-popconfirm :content="$t('form.ImportConfirm')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
|
|
|
- @ok="handleImport()">
|
|
|
- <!-- <a-button class="m-r-10" type="primary"> {{ $t('form.Import') }}</a-button> -->
|
|
|
- </a-popconfirm>
|
|
|
- </span>
|
|
|
-
|
|
|
- </div>
|
|
|
<!-- 搜索条件区 -->
|
|
|
<div class="search-section">
|
|
|
<a-form :model="searchForm" ref="formRef" layout="inline">
|
|
@@ -48,7 +38,7 @@
|
|
|
</div>
|
|
|
|
|
|
<a-table row-key="iccid" :data="dataSource" :columns="columns" :pagination="pagination" :scroll="{ x: 'auto' }"
|
|
|
- :expandable="expandable" @page-change="evChangePage">
|
|
|
+ @page-change="evChangePage">
|
|
|
<template #id="{ record }">
|
|
|
<!-- 查看流量消耗 -->
|
|
|
<a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handletrafficUseDialog(record)">详情</a>
|
|
@@ -56,20 +46,17 @@
|
|
|
|
|
|
</a-table>
|
|
|
<!-- 查看流量消耗 -->
|
|
|
- <trafficUseDialog ref="trafficUseDialogRef" @submit="intData()"/>
|
|
|
+ <trafficUseDialog ref="trafficUseDialogRef" @submit="intData()" />
|
|
|
+
|
|
|
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onMounted, ref, reactive, getCurrentInstance, h } from "vue";
|
|
|
-import { useRoute } from "vue-router";
|
|
|
+import { onMounted, ref, getCurrentInstance, h } from "vue";
|
|
|
import { columns } from "./config";
|
|
|
-import { Message, Notification } from '@arco-design/web-vue'
|
|
|
-import { cardInfoList, cardInfoImport, orderList, orderFlowData } from "@/api/path/lotCard.api"
|
|
|
+import { cardInfoList } from "@/api/path/lotCard.api"
|
|
|
import trafficUseDialog from "./trafficUseDialog.vue";
|
|
|
-import list from "./list.vue";
|
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
const formRef = ref()
|
|
@@ -81,7 +68,6 @@ const statusList = ref([]);
|
|
|
const sourceList = ref([]);
|
|
|
const serviceList = ref([]);
|
|
|
const dataSource = ref([]);
|
|
|
-const route = useRoute();
|
|
|
const pagination = ref({
|
|
|
total: 0,
|
|
|
pageSize: 10,
|
|
@@ -104,7 +90,7 @@ const intData = async () => {
|
|
|
const payType = item.payType == 0 ? 'Prepay' : 'Postpay';
|
|
|
const dataPackage = item.Info.dataPackage.map(res => res.productName).join(',');
|
|
|
const soure = soureName.find(val => val.value == item.source)?.label
|
|
|
- const accountStatus = accountStatusName.find(val=>val.value == item.Info.accountStatus)?.label
|
|
|
+ const accountStatus = accountStatusName.find(val => val.value == item.Info.accountStatus)?.label
|
|
|
return {
|
|
|
...item,
|
|
|
...item.Info,
|
|
@@ -117,65 +103,7 @@ const intData = async () => {
|
|
|
pagination.value.total = data.total
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// const { data: orderData } = await orderList({ current: 1, size: 999, ICCID: ICCID.value })
|
|
|
-// orderData.records?.forEach(async (orderItem) => {
|
|
|
-
|
|
|
-// const params = {
|
|
|
-// // iccid: orderItem.ICCID,
|
|
|
-// iccid: '89852342022040149139',
|
|
|
-// childOrderId: orderItem.id,
|
|
|
-// subscriptionKey: "1824754463183432097",
|
|
|
-// }
|
|
|
-
|
|
|
-// let trafficList = []
|
|
|
-// const { data } = await orderFlowData(params)
|
|
|
-// trafficList = data.historyData || []
|
|
|
-
|
|
|
-// dataSource.value.push({
|
|
|
-// ...orderItem,
|
|
|
-// trafficList
|
|
|
-// })
|
|
|
-// })
|
|
|
-
|
|
|
-
|
|
|
-const expandable = {
|
|
|
- expandedRowRender: (record) => {
|
|
|
- if (record.orderArr && Array.isArray(record.orderArr) && record.orderArr.length > 0) {
|
|
|
- return h('div', {}, [
|
|
|
- h(list, { 'data': record.orderArr })
|
|
|
- ]);
|
|
|
- }
|
|
|
- return h('div', {}, '暂无数据')
|
|
|
- },
|
|
|
-};
|
|
|
-
|
|
|
-const handleImport = async () => {
|
|
|
- if (!searchForm.value.iccid) {
|
|
|
- Message.warning({
|
|
|
- content: '请先输入ICCID,可输入多个以逗号分隔,然后再点击导入!',
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- const iccids = searchForm.value.iccid.split(',')
|
|
|
- const iccidList = iccids.map(item => {
|
|
|
- return {
|
|
|
- iccid: item
|
|
|
- }
|
|
|
- })
|
|
|
- const { code, data } = await cardInfoImport({ iccidList })
|
|
|
- if (code == 200) {
|
|
|
- Message.success({
|
|
|
- content: data,
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- intData()
|
|
|
- }
|
|
|
-
|
|
|
-};
|
|
|
-
|
|
|
-// 查看当前流量消耗详情
|
|
|
+// 详情
|
|
|
const handletrafficUseDialog = (data) => {
|
|
|
trafficUseDialogRef.value.open(data)
|
|
|
}
|
|
@@ -185,6 +113,8 @@ const evChangePage = (page) => {
|
|
|
pagination.value.current = page
|
|
|
intData()
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
const handleSearch = () => {
|
|
|
formRef.value.validate((errors) => {
|
|
|
if (!errors) {
|