|
@@ -15,64 +15,33 @@
|
|
|
</div>
|
|
|
<a-table row-key="id" :data="dataSource" :columns="columns" :pagination="pagination" :scroll="{ x: 'auto' }"
|
|
|
@page-change="evChangePage">
|
|
|
- <template #id="{ record }">
|
|
|
- <!-- 修改 -->
|
|
|
+ <!-- <template #id="{ record }">
|
|
|
<a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(2, record)"
|
|
|
v-if="role.getRole == 1">{{
|
|
|
$t('form.alter')
|
|
|
}}</a>
|
|
|
<a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="meal(record)">{{
|
|
|
$t('tariffManagement.SetMeal') }}</a>
|
|
|
- <!-- 删除 -->
|
|
|
<a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
|
|
|
@ok="handleDel(record.id)">
|
|
|
<a class="a-link" href="javascript:;" style="margin-right: 1rem" v-if="role.getRole == 1">{{
|
|
|
$t('form.Delete')
|
|
|
}}</a>
|
|
|
</a-popconfirm>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
</a-table>
|
|
|
|
|
|
|
|
|
-
|
|
|
- <a-modal width="70%" :visible="planVisible" :title="$t('tariffManagement.SelectiveTrafficPacket')"
|
|
|
- @ok="handleSubmitPlan" @cancel="handleCancel">
|
|
|
- <!-- 搜索条件区 -->
|
|
|
- <div class="search-section">
|
|
|
- <a-form :model="formData" layout="inline">
|
|
|
- <a-form-item field="label" :label="$t('tariffManagement.label')">
|
|
|
- <a-input v-model="formData.label" :placeholder="$t('lotCard.please') + $t('tariffManagement.label')"
|
|
|
- allow-clear />
|
|
|
- </a-form-item>
|
|
|
- <a-form-item>
|
|
|
- <a-space>
|
|
|
- <a-button type="primary" @click="handleSearchPlan">{{ $t('form.Search') }}</a-button>
|
|
|
- <a-button @click="resetSearchPlan">{{ $t('form.Reset') }}</a-button>
|
|
|
- </a-space>
|
|
|
- </a-form-item>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- <a-table row-key="id" :data="planList" :columns="planColumns" :scroll="{ x: 'auto' }"
|
|
|
- :row-selection="rowSelectionPlan" v-model:selectedKeys="selectedKeysPlan">
|
|
|
-
|
|
|
- </a-table>
|
|
|
-
|
|
|
- </a-modal>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onMounted, ref, toRefs, getCurrentInstance } from "vue";
|
|
|
-import { useRoute } from "vue-router";
|
|
|
+import { onMounted, ref, toRefs } from "vue";
|
|
|
import { columns, planColumns ,trafficSearchFrom} from "../config";
|
|
|
-import { deleteTariff, tariffList } from "@/api/path/tariffManagement.api"
|
|
|
+import { tariffList } from "@/api/path/tariffManagement.api"
|
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
|
import { useSystemStore } from '@/store/modules/systemStore'
|
|
|
import Search from '@/components/Search/index.vue'
|
|
|
-import { useI18n } from 'vue-i18n'
|
|
|
-import { Message } from '@arco-design/web-vue'
|
|
|
-const { t } = useI18n();
|
|
|
const role = useSystemStore()
|
|
|
const state = ref({
|
|
|
searchForm: {},
|
|
@@ -84,21 +53,10 @@ const state = ref({
|
|
|
pageSize: 10,
|
|
|
current: 1,
|
|
|
},
|
|
|
- planList: [],
|
|
|
visible: false,
|
|
|
typeCurrent: null,
|
|
|
sourceList: [],
|
|
|
cycleist: [],
|
|
|
- modealShow: false,
|
|
|
- planVisible: false,
|
|
|
- formData: {},
|
|
|
- selectedKeysPlan: [],
|
|
|
- rowSelectionPlan: {
|
|
|
- type: 'radio',
|
|
|
- showCheckedAll: true,
|
|
|
- onlyCurrent: false,
|
|
|
- },
|
|
|
- ids: null,
|
|
|
methodList: []
|
|
|
})
|
|
|
const {
|
|
@@ -107,16 +65,10 @@ const {
|
|
|
currency,
|
|
|
dataSource,
|
|
|
pagination,
|
|
|
- planList,
|
|
|
visible,
|
|
|
typeCurrent,
|
|
|
sourceList,
|
|
|
cycleist,
|
|
|
- modealShow,
|
|
|
- planVisible,
|
|
|
- formData,
|
|
|
- selectedKeysPlan,
|
|
|
- rowSelectionPlan,
|
|
|
ids,
|
|
|
methodList
|
|
|
} = toRefs(state.value);
|
|
@@ -138,7 +90,6 @@ const intData = async (item) => {
|
|
|
const Activated = item.trafficBilling + item.trafficBillingType
|
|
|
const bagSize = item.pricing + '/' + item.mrcAmount + '/' + item.networkAccessFee
|
|
|
const billingMethodName = methodList.value.find(val => val.value == item.billingMethod)?.label
|
|
|
-
|
|
|
let pricingName;
|
|
|
|
|
|
if (item.billingMethod == 1) {
|
|
@@ -167,19 +118,6 @@ const reset = (item)=>{
|
|
|
intData()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// 删除
|
|
|
-const handleDel = async (id) => {
|
|
|
- const { code } = await deleteTariff({ id })
|
|
|
- if (code == 200) {
|
|
|
- Message.success({
|
|
|
- content: t('setting.deleteSuccess'),
|
|
|
- duration: 2000,
|
|
|
- })
|
|
|
- intData()
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
const evChangePage = (page) => {
|
|
|
pagination.value.current = page
|
|
|
intData()
|
|
@@ -192,25 +130,6 @@ const dictShowModel = (type, data) => {
|
|
|
visible.value = true;
|
|
|
}
|
|
|
|
|
|
-const resetSearchPlan = () => {
|
|
|
-
|
|
|
-}
|
|
|
-const handleSearchPlan = () => {
|
|
|
-
|
|
|
-}
|
|
|
-const handleCancel = () => {
|
|
|
- planVisible.value = false
|
|
|
-}
|
|
|
-
|
|
|
-const handleSubmitPlan = () => {
|
|
|
- if (selectedKeysPlan.value.length > 0) {
|
|
|
- formState.value.simDataPlanId = String(selectedKeysPlan.value[0])
|
|
|
- planVisible.value = false
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
const handleDictValue = async () => {
|
|
|
sourceList.value = await Getdictionary('source')
|
|
|
cycleist.value = await Getdictionary('Billingcycle')
|
|
@@ -218,12 +137,6 @@ const handleDictValue = async () => {
|
|
|
methodList.value = await Getdictionary('billingMethod')
|
|
|
}
|
|
|
|
|
|
-const meal = (data) => {
|
|
|
- ids.value = data.id
|
|
|
- modealShow.value = true
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
onMounted(async () => {
|
|
|
await handleDictValue()
|
|
|
await intData()
|