|
@@ -1,191 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="container">
|
|
|
- <div class="head-title">
|
|
|
- <span>{{ route.meta.title }} </span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 搜索条件区 -->
|
|
|
- <div class="search-section">
|
|
|
- <a-form :model="formData" ref="formRef" layout="inline">
|
|
|
- <a-form-item field="iccid" :label="$t('lotCard.iccid')" :validate-trigger="['change', 'input', 'blur']"
|
|
|
- :rules="[{ required: true, message: $t('lotCard.please') + $t('lotCard.iccid') }]">
|
|
|
- <a-input v-model="formData.iccid" :placeholder="$t('lotCard.please') + $t('lotCard.iccid')" allow-clear />
|
|
|
- </a-form-item>
|
|
|
- <a-form-item field="orderChannel" :label="$t('lotCard.orderChannel')">
|
|
|
- <a-input v-model="formData.orderChannel" :placeholder="$t('lotCard.please') + $t('lotCard.orderChannel')"
|
|
|
- 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" :scroll="{ x: 'auto' }" @page-change="evChangePage">
|
|
|
- <template #id="{ record }">
|
|
|
- <!-- 结束套餐 -->
|
|
|
- <!-- <a-popconfirm :content="$t('lotCard.confirmOrderEnd')" :ok-text="$t('form.Confirm')"
|
|
|
- :cancel-text="$t('form.Cancel')" @ok="handleUnsubscribeDialog(record)">
|
|
|
- <a class="a-link" href="javascript:;" style="margin-right: 1rem">{{ $t('lotCard.orderEnd') }}</a>
|
|
|
- </a-popconfirm> -->
|
|
|
- </template>
|
|
|
-
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script setup>
|
|
|
-import { onMounted, ref, getCurrentInstance } from "vue";
|
|
|
-import { useRoute } from "vue-router";
|
|
|
-import { columns } from "./config";
|
|
|
-import { Message, Notification } from '@arco-design/web-vue'
|
|
|
-import { packageTariffPlan, unsubscribe, release, orderList } from "@/api/path/lotCard.api"
|
|
|
-
|
|
|
-const { proxy } = getCurrentInstance()
|
|
|
-const formRef = ref()
|
|
|
-const formData = ref({
|
|
|
- "iccid": "",
|
|
|
- "orderChannel": "",
|
|
|
- "hImsi": "",
|
|
|
- "status": "",
|
|
|
- "language": "0",
|
|
|
- // "beginIndex": 0,
|
|
|
- // "count": 50
|
|
|
-});
|
|
|
-
|
|
|
-const dataSource = ref([]);
|
|
|
-const route = useRoute();
|
|
|
-const pagination = ref({
|
|
|
- total: 0,
|
|
|
- pageSize: 10,
|
|
|
- current: 1,
|
|
|
-})
|
|
|
-
|
|
|
-// 拿取从卡清单管理的订购套餐成功后的数据查询套餐管理
|
|
|
-const cardRouteData = ref({});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-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 handleSearch = () => {
|
|
|
- formRef.value.validate((errors) => {
|
|
|
- if (!errors) {
|
|
|
- intData()
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-}
|
|
|
-const resetSearch = () => {
|
|
|
- proxy.$refs.formRef.resetFields()
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-const handleUnsubscribeDialog = async (data) => {
|
|
|
- // 订阅关系状态
|
|
|
- // 1:未激活
|
|
|
- // 2: 已过期
|
|
|
- // 3: 已激活99:已退款
|
|
|
- let info = {}
|
|
|
- let param = {}
|
|
|
- let thirdOrderId = ""
|
|
|
- // TODO 入参获取不到,结束套餐可能位置存在错误
|
|
|
- if (data.status == 1) {
|
|
|
- // 获取订单id
|
|
|
- const { data } = await orderList({
|
|
|
- "orderId": cardRouteData.value.orderID,
|
|
|
- "dataBundleId": cardRouteData.value.dataBundleId,
|
|
|
- "ICCID": cardRouteData.value.ICCID,
|
|
|
- "current": 1,
|
|
|
- "size": 10
|
|
|
- })
|
|
|
- if (data.records && Array.isArray(data.records) && data.records.length > 0) {
|
|
|
- thirdOrderId = data.records[0].id
|
|
|
- }
|
|
|
- console.log(data,)
|
|
|
- param = {
|
|
|
- "orderId": cardRouteData.value.orderID,
|
|
|
- thirdOrderId
|
|
|
- }
|
|
|
- info = await unsubscribe(param)
|
|
|
- }
|
|
|
- if (data.status == 3) {
|
|
|
- param = {
|
|
|
- "iccidPackageList": [
|
|
|
- {
|
|
|
- "iccid": cardRouteData.value.ICCID,
|
|
|
- "imsi": "",
|
|
|
- "packageid": cardRouteData.value.dataBundleId
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- info = await release(param)
|
|
|
-
|
|
|
- }
|
|
|
- if (info.code == 200) {
|
|
|
- Message.success({
|
|
|
- content: info.data.msg,
|
|
|
- duration: 2000,
|
|
|
- });
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- cardRouteData.value = route.query
|
|
|
- if (Object.keys(cardRouteData.value).length > 0) {
|
|
|
- console.log(cardRouteData.value.orderID, 'cardRouteData.value')
|
|
|
-
|
|
|
- formData.value.iccid = cardRouteData.value.ICCID
|
|
|
- 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>
|