|
@@ -73,7 +73,8 @@
|
|
|
</a-popconfirm>
|
|
|
<!-- 导卡 -->
|
|
|
<a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
|
|
|
- $t('flowPool.exportCard') }}</a>
|
|
|
+ $t('flowPool.exportCard')
|
|
|
+ }}</a>
|
|
|
</template>
|
|
|
|
|
|
</a-table>
|
|
@@ -125,13 +126,22 @@
|
|
|
</a-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item :label="$t('flowPool.ICCIDlabel')" field="simTariffId" v-if="formState.simTariffId!==null">
|
|
|
+ <a-select v-model="formState.iccids" multiple
|
|
|
+ :placeholder="$t('flowPool.ICCIDName')">
|
|
|
+ <a-option v-for=" item in card" :key="item.iccid" :value="item.iccid">{{
|
|
|
+ item.iccid
|
|
|
+ }}
|
|
|
+ </a-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
<a-form-item :label="$t('flowPool.expireTime')" field="expireTime">
|
|
|
<a-date-picker v-model="formState.expireTime" show-time
|
|
|
:time-picker-props="{ defaultValue: '09:09:06' }" format="YYYY-MM-DD HH:mm:ss"/>
|
|
|
</a-form-item>
|
|
|
<a-form-item :label="$t('flowPool.poolSize')" field="size">
|
|
|
<a-input v-model="formState.size" :placeholder="$t('flowPool.poolSize')"/>
|
|
|
- <a-select v-model="formState.sizeTpye" style="width: 80px; margin-left: 8px;">
|
|
|
+ <a-select v-model="formState.sizeType" style="width: 80px; margin-left: 8px;">
|
|
|
<a-option value="KB">KB</a-option>
|
|
|
<a-option value="MB">MB</a-option>
|
|
|
<a-option value="GB">GB</a-option>
|
|
@@ -318,11 +328,17 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {onMounted, ref, reactive, getCurrentInstance, nextTick} from "vue";
|
|
|
+import {onMounted, ref, reactive, getCurrentInstance, nextTick, watch} from "vue";
|
|
|
import {useRoute} from "vue-router";
|
|
|
import {columns} from "../config";
|
|
|
import {Message, Notification} from '@arco-design/web-vue'
|
|
|
-import {deleteTrafficPool, addTrafficPool, updateTrafficPool, trafficPoolList} from "@/api/path/flowPool.api"
|
|
|
+import {
|
|
|
+ deleteTrafficPool,
|
|
|
+ addTrafficPool,
|
|
|
+ updateTrafficPool,
|
|
|
+ trafficPoolList,
|
|
|
+ updateCardList
|
|
|
+} from "@/api/path/flowPool.api"
|
|
|
import {tariffList} from "@/api/path/tariffManagement.api"
|
|
|
import {orderCancel} from "@/api/path/lotCard.api"
|
|
|
import {enum_dict} from "@/hooks/enum";
|
|
@@ -331,7 +347,7 @@ import {Getdictionary} from '@/mixins/index.js'
|
|
|
|
|
|
const systemStore = useSystemStore()
|
|
|
const role = ref(systemStore.getRole)
|
|
|
-
|
|
|
+const card = ref([])
|
|
|
|
|
|
const {proxy} = getCurrentInstance()
|
|
|
const formRef = ref()
|
|
@@ -348,14 +364,6 @@ const pagination = ref({
|
|
|
})
|
|
|
|
|
|
|
|
|
-const rowSelection = reactive({
|
|
|
- type: 'checkbox',
|
|
|
- showCheckedAll: true,
|
|
|
- onlyCurrent: false,
|
|
|
-});
|
|
|
-const selectedKeys = ref([])
|
|
|
-
|
|
|
-
|
|
|
const intData = async () => {
|
|
|
const param = {
|
|
|
current: pagination.value.current,
|
|
@@ -492,10 +500,10 @@ const formState = ref({
|
|
|
// 过期时间
|
|
|
"expireTime": "",
|
|
|
// ICCID列表
|
|
|
- "iccids": ["89852342022040149139", "89852342022060861597"],
|
|
|
+ "iccids": [],
|
|
|
|
|
|
"size": null,
|
|
|
- "sizeTpye": ''
|
|
|
+ "sizeType": ''
|
|
|
});
|
|
|
const formWarning = reactive({
|
|
|
// 总用量占比
|
|
@@ -524,73 +532,21 @@ const formWarning = reactive({
|
|
|
|
|
|
const rules = {
|
|
|
label: [{required: true, trigger: 'change',}],
|
|
|
- sim_data_plan_id: [{required: true, trigger: 'change',}],
|
|
|
- // user_id: [{required: true, trigger: 'change',}],
|
|
|
source: [{required: true, trigger: 'change',}],
|
|
|
- traffic_type: [{required: true, trigger: 'change',}],
|
|
|
- billing_type: [{required: true, trigger: 'change',}],
|
|
|
- bag_size: [{required: true, trigger: 'change',}],
|
|
|
- billing_cycle: [{required: true, trigger: 'change',}],
|
|
|
- trafficPoolType: [{required: true, trigger: 'change',}],
|
|
|
- settlement_cycle: [{required: true, trigger: 'change',}],
|
|
|
+ status: [{required: true, trigger: 'change',}],
|
|
|
simTariffId: [{required: true, trigger: 'change',}],
|
|
|
expireTime: [{required: true, trigger: 'change',}],
|
|
|
- // pricing: [{ required: true, trigger: 'change', }],
|
|
|
- // currency: [{ required: true, trigger: 'change', }],
|
|
|
+ iccids: [{required: true, trigger: 'change',}],
|
|
|
size: [{required: true, trigger: 'change',}],
|
|
|
sizeType: [{required: true, trigger: 'change',}],
|
|
|
};
|
|
|
|
|
|
-const earlyList = [
|
|
|
- {value: 1, label: '手工停机'},
|
|
|
-
|
|
|
-];
|
|
|
-
|
|
|
-// 退订
|
|
|
-const handleUnsubscribeDialog = async (record) => {
|
|
|
- // 订阅关系状态
|
|
|
- // 1:未激活
|
|
|
- // 2: 已过期
|
|
|
- // 3: 已激活99:已退款
|
|
|
- let param = {}
|
|
|
- let statusFlag = true
|
|
|
- if (selectedKeys.value.length > 0) {
|
|
|
- statusFlag = false
|
|
|
- param = {
|
|
|
- ids: selectedKeys.value
|
|
|
- }
|
|
|
- }
|
|
|
- if (record && record.id) {
|
|
|
- statusFlag = false
|
|
|
- param = {
|
|
|
- ids: [record.id]
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- console.log(param, "param")
|
|
|
- if (!statusFlag) {
|
|
|
-
|
|
|
- const {code, data} = await orderCancel(param)
|
|
|
-
|
|
|
- if (code == 200) {
|
|
|
- Message.success({
|
|
|
- content: data,
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- Message.warning({
|
|
|
- content: $t('lotCard.tipsOrder'),
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- }
|
|
|
-};
|
|
|
|
|
|
// 提交
|
|
|
const handleSubmit = ({values, errors}) => {
|
|
|
formRef.value.validate(async (errors) => {
|
|
|
if (!errors) {
|
|
|
- // values.user_id = Number(values.user_id)
|
|
|
+ values.size = Number(values.size)
|
|
|
if (formState.value.id) {
|
|
|
const {code, data} = await updateTrafficPool(values)
|
|
|
|
|
@@ -667,12 +623,6 @@ const resetForm = () => {
|
|
|
delete formState.value.id
|
|
|
}
|
|
|
|
|
|
-// 卡详情
|
|
|
-
|
|
|
-const handleOk = () => {
|
|
|
-}
|
|
|
-const handleCancel = () => {
|
|
|
-}
|
|
|
// --------------------------------------------------------
|
|
|
// 获取字典
|
|
|
const handleDictValue = async () => {
|
|
@@ -681,10 +631,19 @@ const handleDictValue = async () => {
|
|
|
typeList.value = await Getdictionary('trafficPoolType')
|
|
|
}
|
|
|
|
|
|
+watch(() => formState.value.simTariffId, val => {
|
|
|
+ if (val === null) return
|
|
|
+ updateCardList({id: val}).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ card.value = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- handleDictValue()
|
|
|
- intData()
|
|
|
+onMounted(async () => {
|
|
|
+ await handleDictValue()
|
|
|
+ await intData()
|
|
|
})
|
|
|
|
|
|
|