|
@@ -26,12 +26,14 @@
|
|
|
</div>
|
|
|
<div class="detail-item-box">
|
|
|
<div class="detail-item">
|
|
|
- <div class="item-label">{{ $t('order.MinimumSubscriptionPeriod') }}</div>
|
|
|
- <div class="item-content">{{ tariffForm.settlementCycle?.split('~')[0] }} {{ $t('order.Months') }}</div>
|
|
|
+ <div class="item-label">{{ $t('order.MinimumSubscriptionPeriod') }}</div>
|
|
|
+ <div class="item-content">{{ tariffForm.settlementCycle?.split('~')[0] }} {{ $t('order.Months') }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="detail-item">
|
|
|
- <div class="item-label">{{ $t('order.MaximumSubscriptionPeriod') }}</div>
|
|
|
- <div class="item-content">{{ tariffForm.settlementCycle?.split('~')[1] }} {{ $t('order.Months') }}</div>
|
|
|
+ <div class="item-label">{{ $t('order.MaximumSubscriptionPeriod') }}</div>
|
|
|
+ <div class="item-content">{{ tariffForm.settlementCycle?.split('~')[1] }} {{ $t('order.Months') }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="detail-item-box">
|
|
@@ -46,26 +48,28 @@
|
|
|
</div>
|
|
|
<div class="detail-item-box">
|
|
|
<div class="detail-item">
|
|
|
- <div class="item-label">{{ $t('order.CardType') }}</div>
|
|
|
+ <div class="item-label">{{ $t('order.CardType') }}</div>
|
|
|
<div class="item-content">{{ FormDataList.cardType }}</div>
|
|
|
</div>
|
|
|
<div class="detail-item">
|
|
|
- <div class="item-label">{{ $t('order.StandardPrice') }}</div>
|
|
|
+ <div class="item-label">{{ $t('order.StandardPrice') }}</div>
|
|
|
<div class="item-content">{{ tariffForm.pricingName }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="detail-item-box">
|
|
|
<div class="detail-item">
|
|
|
- <div class="item-label">{{ $t('order.FlowPool') }}</div>
|
|
|
- <div class="item-content">{{ FormDataList.isTrafficPool == 1 ? $t('lotCard.Yes') : $t('lotCard.No') }}</div>
|
|
|
+ <div class="item-label">{{ $t('order.FlowPool') }}</div>
|
|
|
+ <div class="item-content">{{ FormDataList.isTrafficPool == 1 ? $t('lotCard.Yes') : $t('lotCard.No')
|
|
|
+ }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="detail-item-box">
|
|
|
<div class="detail-item">
|
|
|
- <div class="item-label">{{ $t('order.CardNum') }}</div>
|
|
|
+ <div class="item-label">{{ $t('order.CardNum') }}</div>
|
|
|
<div class="item-content">{{ dataDetail.length }}
|
|
|
<a-button type="primary" @click="showCard = true" style="margin-left:10px;"
|
|
|
- v-if="userType == 1 && FormDataList.moderationStatus == 2">{{ $t('order.AllocationCardNumber') }}</a-button>
|
|
|
+ v-if="userType == 1 && FormDataList.moderationStatus == 2">{{
|
|
|
+ $t('order.AllocationCardNumber') }}</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -75,26 +79,27 @@
|
|
|
</div>
|
|
|
|
|
|
<template #footer>
|
|
|
- <a-button @click="cancel">{{ $t('form.Cancel')}}</a-button>
|
|
|
+ <a-button @click="cancel">{{ $t('form.Cancel') }}</a-button>
|
|
|
</template>
|
|
|
</a-modal>
|
|
|
|
|
|
<!-- 分配卡号 -->
|
|
|
- <a-modal v-model:visible="showCard" :title="$t('order.AllocationCardNumber')" @cancel="closeModal(showCard, FormDataList)"
|
|
|
- @before-ok="showCard = false" :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
|
|
|
+ <a-modal v-model:visible="showCard" :title="$t('order.AllocationCardNumber')"
|
|
|
+ @cancel="closeModal(showCard, FormDataList)" @before-ok="showCard = false" :okText="$t('form.Confirm')"
|
|
|
+ :cancelText="$t('form.Cancel')">
|
|
|
<Upload listType="" minx="1" accept=".xlsx" :handelUpload="customRequest" :showRemoveButton="false">
|
|
|
</Upload>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, onMounted, toRefs, toRef ,watch} from 'vue';
|
|
|
-import { AcquireOrdertariff, DistributionCard,ReturntheOrderCard } from '@/api/path/order'
|
|
|
+import { ref, onMounted, toRefs, toRef, watch } from 'vue';
|
|
|
+import { AcquireOrdertariff, DistributionCard, ReturntheOrderCard } from '@/api/path/order'
|
|
|
import { Message } from '@arco-design/web-vue';
|
|
|
import Upload from "@/components/upload/index.vue";
|
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
|
-import {useI18n} from 'vue-i18n'
|
|
|
-const {t} = useI18n();
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
+const { t } = useI18n();
|
|
|
const props = defineProps({
|
|
|
modelValue: {
|
|
|
type: Boolean,
|
|
@@ -111,13 +116,13 @@ const emit = defineEmits(['update:modelValue', 'submit'])
|
|
|
const state = ref({
|
|
|
tariffForm: {},
|
|
|
showCard: false,
|
|
|
- res1:[],
|
|
|
- res2:[],
|
|
|
- res3:[],
|
|
|
+ res1: [],
|
|
|
+ res2: [],
|
|
|
+ res3: [],
|
|
|
userType: JSON.parse(localStorage.getItem('user_login_information'))?.userType, // 1平台 2用户
|
|
|
})
|
|
|
-const { tariffForm, showCard,res1,res2,res3,userType } = toRefs(state.value)
|
|
|
-const columnsDetail = [{ title: 'ICCID', dataIndex: 'iccid' },{ title: t('order.CardStatus'), dataIndex: 'status' },{ title: t('order.CreationTime'), dataIndex: 'createdAt' }
|
|
|
+const { tariffForm, showCard, res1, res2, res3, userType } = toRefs(state.value)
|
|
|
+const columnsDetail = [{ title: 'ICCID', dataIndex: 'iccid' }, { title: t('order.CardStatus'), dataIndex: 'status' }, { title: t('order.CreationTime'), dataIndex: 'createdAt' }
|
|
|
]
|
|
|
const dataDetail = ref([])
|
|
|
|
|
@@ -127,10 +132,12 @@ const customRequest = (options) => {
|
|
|
formData.append('file', options.fileItem.file); // 这里将文件添加到 FormDataList 中
|
|
|
formData.append('orderId', FormDataList.value.id);
|
|
|
DistributionCard(formData).then(res => {
|
|
|
- Message.success(res.message)
|
|
|
- res.data[0].forEach(val=>[
|
|
|
- dataDetail.value.push({iccid:val})
|
|
|
- ])
|
|
|
+ if (res.code == 200) {
|
|
|
+ Message.success(res.message)
|
|
|
+ res.data[0].forEach(val => [
|
|
|
+ dataDetail.value.push({ iccid: val })
|
|
|
+ ])
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -138,7 +145,7 @@ const cancel = () => {
|
|
|
emit('update:modelValue', false)
|
|
|
}
|
|
|
|
|
|
-const closeModal = ()=>{
|
|
|
+const closeModal = () => {
|
|
|
showCard.value = false
|
|
|
}
|
|
|
|
|
@@ -152,10 +159,10 @@ watch(() => FormDataList.value, val => {
|
|
|
tariffForm.value.pricingName = tariffForm.value.pricing !== '' ? tariffForm.value.pricing + '/' + res3.value.filter(val => val.value == res.data.currency)[0]?.label : '';
|
|
|
})
|
|
|
dataDetail.value = []
|
|
|
- ReturntheOrderCard({id:val.id}).then(res=>{
|
|
|
- dataDetail.value = res.data.map(val=>({...val,status:val.status==1?t('order.normal'):t('order.unsubscribe')}))
|
|
|
+ ReturntheOrderCard({ id: val.id }).then(res => {
|
|
|
+ dataDetail.value = res.data.map(val => ({ ...val, status: val.status == 1 ? t('order.normal') : t('order.unsubscribe') }))
|
|
|
})
|
|
|
-},{deep: true})
|
|
|
+}, { deep: true })
|
|
|
|
|
|
onMounted(async () => {
|
|
|
res1.value = await Getdictionary('Billingcycle')
|