|
@@ -72,7 +72,7 @@
|
|
|
|
|
|
<!--资费 弹框 -->
|
|
<!--资费 弹框 -->
|
|
<a-modal :title="typeCurrent == 1 ? $t('form.Add') : $t('form.Edit')" v-model:visible="visible"
|
|
<a-modal :title="typeCurrent == 1 ? $t('form.Add') : $t('form.Edit')" v-model:visible="visible"
|
|
- @onCancel="resetForm" centered :maskClosable="false" :footer="null">
|
|
|
|
|
|
+ @onCancel="resetForm" centered :maskClosable="false" :footer="null" width="700px">
|
|
<a-form ref="formRef" :rules="rules" :model="formState" @submit="handleSubmit">
|
|
<a-form ref="formRef" :rules="rules" :model="formState" @submit="handleSubmit">
|
|
<div class="formTitle">基本信息</div>
|
|
<div class="formTitle">基本信息</div>
|
|
<a-form-item :label="$t('tariffManagement.source')" field="source">
|
|
<a-form-item :label="$t('tariffManagement.source')" field="source">
|
|
@@ -127,10 +127,21 @@
|
|
<a-radio value="2">按月</a-radio>
|
|
<a-radio value="2">按月</a-radio>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- <a-form-item field="pricing" :label="$t('tariffManagement.pricing')" required>
|
|
|
|
- <a-input v-model="formState.pricing" :placeholder="$t('tariffManagement.pricing')">
|
|
|
|
|
|
+ <a-form-item field="" :label="$t('tariffManagement.pricing')" required>
|
|
|
|
+ <a-input v-model="formState.pricing" v-if="formState.billingMethod==2">
|
|
|
|
+ <template #append >
|
|
|
|
+ {{ formState.currency === '0' ? '元' : '美金' }}
|
|
|
|
+ </template>
|
|
|
|
+ </a-input>
|
|
|
|
+ <a-input v-model="formState.trafficBilling" v-if="formState.billingMethod==1"> </a-input>
|
|
|
|
+ <a-select v-model="formState.trafficBillingType" style="width: 80px; margin:0 8px;" v-if="formState.billingMethod==1">
|
|
|
|
+ <a-option value="KB">KB</a-option>
|
|
|
|
+ <a-option value="MB">MB</a-option>
|
|
|
|
+ <a-option value="GB">GB</a-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ <a-input v-model="formState.trafficBillingAmount" v-if="formState.billingMethod==1">
|
|
<template #append>
|
|
<template #append>
|
|
- 元
|
|
|
|
|
|
+ {{ formState.currency === '0' ? '元' : '美金' }}
|
|
</template>
|
|
</template>
|
|
</a-input>
|
|
</a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -149,11 +160,20 @@
|
|
</template>
|
|
</template>
|
|
</a-input>
|
|
</a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- <a-form-item field="voice" label="计费函数">
|
|
|
|
- <a-input v-model="formState.billingFuc" placeholder="自动生成" :disabled="true"/>
|
|
|
|
-
|
|
|
|
|
|
+ <a-form-item :label="$t('tariffManagement.MRCName')" field="mrcAmount">
|
|
|
|
+ <a-input v-model="formState.mrcAmount" >
|
|
|
|
+ <template #append >
|
|
|
|
+ {{ formState.currency === '0' ? '元' : '美金' }}
|
|
|
|
+ </template>
|
|
|
|
+ </a-input>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <a-form-item :label="$t('tariffManagement.networkName')" field="networkAccessFee">
|
|
|
|
+ <a-input v-model="formState.networkAccessFee" >
|
|
|
|
+ <template #append >
|
|
|
|
+ {{ formState.currency === '0' ? '元' : '美金' }}
|
|
|
|
+ </template>
|
|
|
|
+ </a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
-
|
|
|
|
<a-form-item>
|
|
<a-form-item>
|
|
<a-button type="primary" html-type="submit" style="margin-right: 10px;">{{
|
|
<a-button type="primary" html-type="submit" style="margin-right: 10px;">{{
|
|
$t('form.Confirm')
|
|
$t('form.Confirm')
|
|
@@ -221,15 +241,6 @@ const pagination = ref({
|
|
current: 1,
|
|
current: 1,
|
|
})
|
|
})
|
|
|
|
|
|
-
|
|
|
|
-const rowSelection = reactive({
|
|
|
|
- type: 'checkbox',
|
|
|
|
- showCheckedAll: true,
|
|
|
|
- onlyCurrent: false,
|
|
|
|
-});
|
|
|
|
-const selectedKeys = ref([])
|
|
|
|
-
|
|
|
|
-
|
|
|
|
const intData = async () => {
|
|
const intData = async () => {
|
|
const param = {
|
|
const param = {
|
|
current: pagination.value.current,
|
|
current: pagination.value.current,
|
|
@@ -241,11 +252,10 @@ const intData = async () => {
|
|
const sourceName = sourceList.value.find(val => val.value == item.source)?.label
|
|
const sourceName = sourceList.value.find(val => val.value == item.source)?.label
|
|
const billingCycleName = cycleist.value.find(val => val.value == item.billingCycle)?.label
|
|
const billingCycleName = cycleist.value.find(val => val.value == item.billingCycle)?.label
|
|
const pricingCurrty = currency.value.find(val => val.value == item.currency)?.label
|
|
const pricingCurrty = currency.value.find(val => val.value == item.currency)?.label
|
|
- console.log(currency.value)
|
|
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
sourceName,
|
|
sourceName,
|
|
- pricing:item.pricing+'/'+pricingCurrty,
|
|
|
|
|
|
+ pricingName:item.pricing!==''?item.pricing + '/' + pricingCurrty:'',
|
|
billingCycleName,
|
|
billingCycleName,
|
|
feeCode: "NR0" + (index + 1),
|
|
feeCode: "NR0" + (index + 1),
|
|
status: "正常"
|
|
status: "正常"
|
|
@@ -308,17 +318,27 @@ const formState = ref({
|
|
// 计费周期(必填)
|
|
// 计费周期(必填)
|
|
"billingCycle": "",
|
|
"billingCycle": "",
|
|
// 计费方式(必填)
|
|
// 计费方式(必填)
|
|
- "billingMethod": "",
|
|
|
|
|
|
+ "billingMethod": "1",
|
|
// 结算周期(必填)
|
|
// 结算周期(必填)
|
|
"settlementCycle": "",
|
|
"settlementCycle": "",
|
|
// 价格(必填)
|
|
// 价格(必填)
|
|
"pricing": "",
|
|
"pricing": "",
|
|
// 币种(必填)
|
|
// 币种(必填)
|
|
- "currency": "",
|
|
|
|
-
|
|
|
|
- "settlementCycleMap":{
|
|
|
|
- "starTime":'',
|
|
|
|
- "endTime":''
|
|
|
|
|
|
+ "currency": "0",
|
|
|
|
+ // 流量资费计费
|
|
|
|
+ "trafficBilling":'',
|
|
|
|
+ // 流量资费计费类型
|
|
|
|
+ "trafficBillingType":'',
|
|
|
|
+ // 流量资费计费金
|
|
|
|
+ "trafficBillingAmount":'',
|
|
|
|
+ // MRC金额
|
|
|
|
+ "mrcAmount":'',
|
|
|
|
+ // 网络接入费
|
|
|
|
+ "networkAccessFee":'',
|
|
|
|
+
|
|
|
|
+ "settlementCycleMap": {
|
|
|
|
+ "starTime": '',
|
|
|
|
+ "endTime": ''
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -330,6 +350,11 @@ const rules = {
|
|
billingCycle: [{required: true, trigger: 'change',}],
|
|
billingCycle: [{required: true, trigger: 'change',}],
|
|
billingMethod: [{required: true, trigger: 'change',}],
|
|
billingMethod: [{required: true, trigger: 'change',}],
|
|
currency: [{required: true, trigger: 'change',}],
|
|
currency: [{required: true, trigger: 'change',}],
|
|
|
|
+ trafficBilling: [{required: true, trigger: 'change',}],
|
|
|
|
+ trafficBillingType: [{required: true, trigger: 'change',}],
|
|
|
|
+ trafficBillingAmount: [{required: true, trigger: 'change',}],
|
|
|
|
+ mrcAmount: [{required: true, trigger: 'change',}],
|
|
|
|
+ networkAccessFee: [{required: true, trigger: 'change',}],
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -386,14 +411,14 @@ const dictShowModel = (type, data) => {
|
|
|
|
|
|
// 编辑
|
|
// 编辑
|
|
if (type == 2) {
|
|
if (type == 2) {
|
|
- Object.keys(formState.value).forEach(key=>{
|
|
|
|
- if(data[key]){
|
|
|
|
|
|
+ Object.keys(formState.value).forEach(key => {
|
|
|
|
+ if (data[key]) {
|
|
formState.value[key] = data[key]
|
|
formState.value[key] = data[key]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formState.value.simDataPlanId = Number(formState.value.simDataPlanId)
|
|
formState.value.simDataPlanId = Number(formState.value.simDataPlanId)
|
|
formState.value.userId = Number(formState.value.userId)
|
|
formState.value.userId = Number(formState.value.userId)
|
|
- if (data.pricing) {
|
|
|
|
|
|
+ if (data.pricing!=='') {
|
|
formState.value.pricing = data.pricing.match(/\d+/)[0] || ''
|
|
formState.value.pricing = data.pricing.match(/\d+/)[0] || ''
|
|
}
|
|
}
|
|
if (data.settlementCycle) {
|
|
if (data.settlementCycle) {
|
|
@@ -547,4 +572,4 @@ onMounted(async () => {
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|