Browse Source

完成套餐计划管理

吴sir 3 months ago
parent
commit
d148667d0a

+ 2 - 2
src/api/path/tariffManagement.api.js

@@ -26,8 +26,8 @@ export function addTariffPackage(data) {
 }
 
 // 查询资费商品
-export function CheckTariffPackages(params) {
-    return service.get('/admin/platform/tariffProductList', { params })
+export function CheckTariffPackages(data) {
+    return service.post('/admin/platform/tariffProductList', data)
 }
 
 // 更新资费商品

+ 2 - 1
src/utils/axios.js

@@ -4,6 +4,7 @@ import { Message, Notification } from "@arco-design/web-vue";
 import { useSystemStore } from "@/store/modules/systemStore";
 import moment from 'moment-timezone';
 import { fn_logout } from "@/utils";
+import error from "@/i18n/zh/error";
 
 const axiosInstance = axios.create({
   // baseURL: `${import.meta.env.PROD? import.meta.env.VITE_PRO_PATH : ''}/api`,
@@ -88,7 +89,7 @@ axiosInstance.interceptors.response.use(
       console.log("请求中断");
       return;
     }
-    const msg = err.response.data ? err.response.data.message : "";
+    const msg = err.response?.data ? err.response.data.message : "";
     Notification.warning({
       title: "系统信息",
       content: msg

+ 0 - 182
src/views/tariffManagement/Management/meal.vue

@@ -1,182 +0,0 @@
-<template>
-    <a-modal width="55%" v-model:visible="modelValue" @ok="handleOk" @cancel="handleCancel"
-        :title="$t('tariffManagement.SetMeal')" :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
-        <div class="add"><a-button type="primary" @click="addMeal" v-if="role.getRole == 1">{{
-            $t('tariffManagement.AddPackage') }}</a-button></div>
-        <div class="item_warp">
-            <a-table :columns="columns" :data="wanberFloter" style="margin-top: 20px" :pagination="false"
-                :scroll="{ y: 'auto' }">
-                <template #period="{ record, rowIndex }">
-                    <a-input v-model="record.period" :disabled="role.getRole == 2" />
-                </template>
-                <template #price="{ record, rowIndex }">
-                    <a-input v-model="record.price" />
-                </template>
-                <template #currency="{ record, rowIndex }">
-                    <a-select v-model="record.currency" :style="{ width: '300px' }"
-                        :placeholder="$t('form.datapoolForm.pleaseSelect')" :disabled="role.getRole == 2">
-                        <a-option v-for="res of Pricing" :value="res.value" :label="res.label" />
-                    </a-select>
-                </template>
-                <template #label="{ record, rowIndex }">
-                    <a-input v-model="record.label" v-if="role.getRole !== 1" />
-                </template>
-                <template #setting="{ record, rowIndex }">
-                    <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="addUpate(record)">{{
-                        $t('form.confirm') }}</a>
-                    <a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')"
-                        :cancel-text="$t('form.Cancel')" @ok="deletaMeal(record.id, rowIndex)">
-                        <a class="a-link" href="javascript:;" v-if="role.getRole == 1">{{
-                            $t('form.Delete')
-                            }}</a>
-                    </a-popconfirm>
-                </template>
-            </a-table>
-        </div>
-    </a-modal>
-</template>
-
-<script setup>
-import { ref, onMounted, toRefs, toRef, watch } from 'vue';
-import { Getdictionary } from '@/mixins/index.js'
-import { useSystemStore } from '@/store/modules/systemStore'
-import { Message } from '@arco-design/web-vue'
-import { addTariffPackage, CheckTariffPackages, UpdateTariffTtems, DeleteTariffItems } from '@/api/path/tariffManagement.api'
-import { useI18n } from 'vue-i18n'
-const { t } = useI18n();
-const props = defineProps({
-    modelValue: {
-        type: Boolean,
-        default: false
-    },
-    traffIds: {
-        type: [String, Number],
-        default: undefined
-    }
-})
-const role = useSystemStore()
-const modelValue = toRef(props, 'modelValue')
-const traffIds = toRef(props, 'traffIds')
-const indexSet = ref(0)
-
-const emit = defineEmits(['update:modelValue', 'submit'])
-const columns = [{
-    title: t('tariffManagement.PackageTermMonth'),
-    dataIndex: 'period',
-    slotName: 'period',
-    ellipsis: true,
-    align: 'center',
-}, {
-    title: t('tariffManagement.PackagePrice'),
-    dataIndex: 'price',
-    slotName: 'price',
-    ellipsis: true,
-    align: 'center',
-}, {
-    title: t('tariffManagement.Currency'),
-    dataIndex: 'currency',
-    slotName: 'currency',
-    ellipsis: true,
-    align: 'center',
-}, {
-    title: t('lotCard.PackageName'),
-    slotName: 'label',
-    ellipsis: true,
-    align: 'center',
-}, {
-    title: t('lotCard.Controls'),
-    slotName: 'setting',
-    ellipsis: true,
-    align: 'center',
-}];
-const state = ref({
-    wanberFloter: [
-        { id: '', period: '', price: '', currency: '', label: '' }
-    ],
-    formRef: null,
-    Pricing: []
-})
-const { wanberFloter, formRef, Pricing } = toRefs(state.value)
-// 添加套餐
-const handleOk = () => {
-    emit('update:modelValue', false)
-    emit('submit', true)
-    handleCancel()
-}
-// 确定或者修改
-const addUpate = async (item) => {
-    item.period = Number(item.period)
-    let res;
-    if (item.id == '') {
-        res = await addTariffPackage({ TrafficId: String(traffIds.value), price: item.price, currency: item.currency, period: item.period, label: item.label })
-    } else {
-        res = await UpdateTariffTtems(item)
-    }
-
-    if (res.code === 200) {
-        Message.success(res.message)
-        await getList()
-    }
-}
-const handleCancel = () => {
-    emit('update:modelValue', false)
-    wanberFloter.value = [
-        { id: '', period: '', price: '', currency: '', label: '' }
-    ]
-    traffIds.value = undefined
-}
-const addMeal = () => {
-    wanberFloter.value.push({ id: '', period: '', price: '', currency: '', label: '' })
-}
-// 删除
-const deletaMeal = async (ids, index) => {
-    if (ids) {
-        let res = await DeleteTariffItems({ id: ids })
-        if (res.code === 200) {
-            Message.success(t('setting.deleteSuccess'))
-            await getList()
-        }
-    } else {
-        wanberFloter.value.splice(index, 1)
-    }
-
-}
-
-const handeDict = async () => {
-    Pricing.value = await Getdictionary('currencyType')
-}
-
-const getList = () => {
-    CheckTariffPackages({ tariffId: traffIds.value }).then(res => {
-        if (res.code === 200) {
-            indexSet.value = res.data.length
-            wanberFloter.value = res.data
-        }
-    })
-}
-
-watch(() => modelValue.value, async (val, newVal) => {
-    if (val) {
-        await getList()
-    }
-}, { deep: true })
-
-
-onMounted(() => {
-    handeDict()
-})
-</script>
-<style scoped lang="less">
-.add {
-    display: flex;
-    justify-content: end;
-}
-
-.item_warp {
-    margin-top: 20px;
-    display: flex;
-    flex-wrap: wrap;
-    gap: 10px;
-    justify-content: space-between;
-}
-</style>

+ 262 - 0
src/views/tariffManagement/SetMeal/addSetMeal.vue

@@ -0,0 +1,262 @@
+<template>
+    <div>
+        <div class="search">
+            <Search :SearchForm="SetMealSearchForm" @query="initData" @reset="reset"></Search>
+        </div>
+
+        <div class="addSetMeal">
+            <a-button type="primary" @click="visibleSetMeal = true">新增套餐</a-button>
+        </div>
+
+        <div class="table">
+            <a-table row-key="id" :data="tableData" :columns="columnsTarrit" :pagination="pagination"
+                :scroll="{ x: 'auto' }" @page-change="evChangePage">
+                <template #status="{ record }">
+                    <a-tag :color="record.status == 1 ? '#7bc616' : '#86909c'">{{ record.status == 1 ? '上架' : '下架'
+                        }}</a-tag>
+                </template>
+                <template #options="{ record }">
+                    <a-space>
+                        <a-button type="text" @click="SetUpPackage(record)">修改</a-button>
+                        <a-button type="text" @click="unmount(record)">{{ record.status == 1 ? '下架' : '上架' }}</a-button>
+                        <a-popconfirm content="是否要删除该资费商品?" @ok="handelDeleteTariff(record)">
+                            <a-button type="text">删除</a-button>
+                        </a-popconfirm>
+                    </a-space>
+                </template>
+            </a-table>
+        </div>
+
+
+        <a-modal v-model:visible="visible" width="600px" @cancel="handelCancel" title="新增套餐计划">
+            <div class="Form">
+                <a-form ref="formRef" :rules="rules" :model="Form">
+                    <a-form-item label="套餐名称" field="label" validate-trigger="input">
+                        <a-input placeholder="请输入套餐名称" v-model="Form.label"></a-input>
+                    </a-form-item>
+                    <a-form-item label="充值类型" field="type" validate-trigger="input">
+                        <a-select v-model="Form.type" placeholder="请选择充值类型">
+                            <a-option v-for="item in puyType" :value="item.value" :key="item.value">{{ item.label
+                                }}</a-option>
+                        </a-select>
+                    </a-form-item>
+                    <a-form-item label="充值周期" field="period" validate-trigger="input">
+                        <a-input v-model="Form.period"></a-input>
+                        <a-select v-model="Form.timeUnit" style="width: 140px; margin:0 8px;">
+                            <a-option v-for="item in cyciy" :value="item.value" :key="item.value">{{ item.label
+                                }}</a-option>
+                        </a-select>
+                    </a-form-item>
+                    <a-form-item label="充值售价" field="price" validate-trigger="input">
+                        <a-input v-model="Form.price"></a-input>
+                        <a-select v-model="Form.currency" style="width: 140px; margin:0 8px;">
+                            <a-option v-for="item in Currency" :value="item.value" :key="item.value">{{ item.label
+                                }}</a-option>
+                        </a-select>
+                    </a-form-item>
+                    <a-form-item label="充值绑定资费" field="trafficId" validate-trigger="blur">
+                        <a-select v-model="Form.trafficId">
+                            <a-option v-for="item in tariffListData" :value="item.id" :key="item.id">{{ item.label
+                                }}</a-option>
+                        </a-select>
+                    </a-form-item>
+                    <a-form-item label="流量大小" field="Flow" validate-trigger="change" v-if="Form.type == 2">
+                        <a-input v-model="Form.flow"></a-input>
+                        <a-select v-model="Form.flowUnit" style="width: 140px; margin:0 8px;">
+                            <a-option value="KB">KB</a-option>
+                            <a-option value="MB">MB</a-option>
+                            <a-option value="GB">GB</a-option>
+                        </a-select>
+                    </a-form-item>
+                </a-form>
+            </div>
+            <template #footer>
+                <a-button @click="visible = false">取消</a-button>
+                <a-button type="primary" @click="handleSubmit">确定</a-button>
+            </template>
+        </a-modal>
+    </div>
+</template>
+
+<script setup>
+import { watch, defineProps, toRefs, ref, onMounted } from 'vue';
+import { CheckTariffPackages } from '@/api/path/tariffManagement.api'
+import { Getdictionary, tableFunction, filterDict } from '@/mixins/index.js'
+import Search from '@/components/Search/index.vue'
+import { columnsTarrit } from '../config'
+import { tariffList, addTariffPackage, UpdateTariffTtems, DeleteTariffItems } from "@/api/path/tariffManagement.api"
+import { Message, Modal } from '@arco-design/web-vue';
+const props = defineProps({
+    id: [Array, String]
+})
+
+const state = ref({
+    pagination: {
+        total: 0,
+        pageSize: 10,
+        current: 1,
+        simTerminalId: null
+    },
+    visible: false,
+    puyType: [],
+    cyciy: [],
+    Currency: [],
+    tariffListData: [],
+    billingMethodList: [],
+    Form: {
+        label: '',
+        type: "",
+        period: "",
+        timeUnit: "",
+        price: "",
+        currency: "",
+        trafficId: "",
+        flow: "1",
+        flowUnit: "",
+        id:"",
+    },
+    formRef: null,
+    Type: true,
+})
+const { pagination, visible, puyType, Currency, cyciy, tariffListData, Form, formRef, billingMethodList, Type } = toRefs(state.value)
+
+const rules = {
+    label: [{ required: true, message: '套餐名称不能为空' }],
+    type: [{ required: true, message: '请选择充值类型' }],
+    period: [{ required: true, message: '请填写充值周期' }, {
+        validator: (value, cb) => {
+            const pattern = /^[1-9]\d*$/
+            if (!pattern.test(value)) {
+                cb('请输入整数')
+            } else {
+                cb()
+            }
+        }
+    }],
+    price: [{ required: true, message: '请填写充值售价' }, {
+        validator: (value, cb) => {
+            const pattern = /^[1-9]\d*$/
+            if (!pattern.test(value)) {
+                cb('请输入合法的数字')
+            } else {
+                cb()
+            }
+        }
+    }],
+    trafficId: [{ required: true, message: '请选择充值绑定资费' }]
+}
+
+const processData = (data) => {
+    return (data.records || []).map((item, index) => {
+        return {
+            ...item,
+            price: item.price + '/' + item.currency,
+            typeName: item.type == 1 ? '服务时长' : "购买流量",
+            profitPrice: item.profitPrice + '/' + item.currency,
+            billingMethod: filterDict(billingMethodList.value, item.billingMethod),
+            costPrice:item.costPrice + '/' + item.trafficCurrency,
+            oldPrice:item.oldPrice + '/' + item.trafficCurrency
+        }
+    })
+}
+
+const { tableData, evChangePage, initData, reset } = tableFunction(pagination.value, CheckTariffPackages, processData)
+
+
+const handleSubmit = () => {
+    formRef.value.validate(async (errors) => {
+        if (!errors) {
+            const FormList = {
+                ...Form.value,
+                type: Number(Form.value.type),
+                period: Number(Form.value.period),
+                simTerminalId: props.id
+            }
+            if(Type.value){
+                delete FormList.id
+            }
+            let res = Type.value ? await addTariffPackage(FormList) : await UpdateTariffTtems(FormList)
+            if (res.code === 200) {
+                initData()
+                Message.success(Type.value ? '添加成功' : '修改成功')
+                visible.value = false
+                handelCancel()
+            }
+        }
+    })
+}
+
+const handelCancel = () => {
+    Form.value.label = ""
+    Form.value.type = puyType.value[0]?.value
+    Form.value.period = ""
+    Form.value.timeUnit = cyciy.value[0]?.value
+    Form.value.price = ""
+    Form.value.currency = Currency.value[0]?.value
+    Form.value.trafficId = null
+    Type.value = true
+}
+
+
+const unmount = async (record) => {
+    Modal.info({
+        title: `确定要${record.status == 1 ? '下架' : '上架'}吗?`,
+        content: '',
+        onOk: async () => {
+            const FormList = {
+                ...record,
+                type: Number(Form.value.type),
+                period: Number(Form.value.period),
+                simTerminalId: props.id
+            }
+            let res = await UpdateTariffTtems(FormList)
+            if (res.code === 200) {
+                Message.success(`${record.status == 1 ? '下架' : '上架'}成功`)
+                initData()
+            }
+        }
+    });
+}
+
+const handelDeleteTariff = async (record) => {
+    let res = await DeleteTariffItems({ id: record.id })
+    if (res.code === 200) {
+        Message.success('删除成功')
+        initData()
+    }
+}
+
+const SetUpPackage = async (record) => {
+    Object.keys(Form.value).forEach(key => {
+        Form.value[key] = record[key]
+    })
+    Form.value.price = record.price.split('/')[0];
+    Form.value.type = String(Form.value.type)
+    visible.value = true
+    Type.value = false
+}
+
+onMounted(async () => {
+    let dict = await Getdictionary(['RechargeType', 'PuyCycle', 'currencyType', 'billingMethod'])
+    puyType.value = dict[0]
+    Form.value.type = puyType.value[0]?.value
+    cyciy.value = dict[1]
+    Form.value.timeUnit = cyciy.value[0]?.value
+    Currency.value = dict[2]
+    Form.value.currency = Currency.value[0]?.value
+    billingMethodList.value = dict[3]
+    let res = await tariffList({ current: 1, size: 99999 })
+    if (res.code === 200) {
+        tariffListData.value = res.data.records || res.data
+    }
+    pagination.value.simTerminalId = props.id
+    initData()
+})
+</script>
+
+<style scoped lang='less'>
+.search,
+.table {
+    margin-top: 20px;
+}
+</style>

+ 41 - 27
src/views/tariffManagement/SetMeal/index.vue

@@ -1,28 +1,30 @@
 <template>
   <div>
-    <div class="search">
-      <Search :SearchForm="SetMealSearchForm"></Search>
-    </div>
-
-    <div class="addSetMeal">
-      <a-button type="primary" @click="visibleSetMeal = true">新增套餐计划</a-button>
-    </div>
-
-    <div class="table">
-      <a-table row-key="id" :data="tableData" :columns="columnsSetMeal" :pagination="pagination" :scroll="{ x: 'auto' }"
-        @page-change="evChangePage">
-        <template #status="{ record }">
-          <a-tag :color="record.status == 1 ? '#7bc616' : '#86909c'">{{ record.status == 1 ? '上架' : '下架' }}</a-tag>
-        </template>
-        <template #Controls="{ record }">
-          <a-space>
-            <a-button type="text">设置套餐</a-button>
-            <a-button type="text" @click="visibleQrCode = true">充值二维码</a-button>
-            <a-button type="text" @click="unmount(record)">{{ record.status == 1 ? '下架' : '上架' }}</a-button>
-          </a-space>
-        </template>
-      </a-table>
-    </div>
+    <template v-if="AddSet">
+      <div class="search">
+        <Search :SearchForm="SetMealSearchForm" @query="initData" @reset="reset"></Search>
+      </div>
+
+      <div class="addSetMeal">
+        <a-button type="primary" @click="visibleSetMeal = true">新增套餐计划</a-button>
+      </div>
+
+      <div class="table">
+        <a-table row-key="id" :data="tableData" :columns="columnsSetMeal" :pagination="pagination"
+          :scroll="{ x: 'auto' }" @page-change="evChangePage">
+          <template #status="{ record }">
+            <a-tag :color="record.status == 1 ? '#7bc616' : '#86909c'">{{ record.status == 1 ? '上架' : '下架' }}</a-tag>
+          </template>
+          <template #Controls="{ record }">
+            <a-space>
+              <a-button type="text" @click="SetUpPackage(record)">设置套餐</a-button>
+              <a-button type="text" @click="visibleQrCode = true">充值二维码</a-button>
+              <a-button type="text" @click="unmount(record)">{{ record.status == 1 ? '下架' : '上架' }}</a-button>
+            </a-space>
+          </template>
+        </a-table>
+      </div>
+    </template>
 
     <a-modal v-model:visible="visibleQrCode" width="700px" @cancel="visibleQrCode = false" title="充值二维码">
       <div class="code">
@@ -51,7 +53,10 @@
         <a-button type="primary" @click="handleSubmit">确定</a-button>
       </template>
     </a-modal>
+    <!-- 新增套餐计划 -->
+    <AddSetMeal v-if="!AddSet" :id="pid"/>
   </div>
+
 </template>
 
 <script setup>
@@ -63,6 +68,8 @@ import { PackageSchedule, addTariffSchedule, PackageTakedown } from '@/api/path/
 import QrcodeVue from 'qrcode.vue'
 import { Getdictionary, tableFunction, filterDict } from '@/mixins/index.js'
 import { Message, Modal } from '@arco-design/web-vue';
+import AddSetMeal from './addSetMeal.vue'
+import { add } from 'lodash';
 const formRef = ref(null);
 const rules = {
   userId: [
@@ -87,9 +94,11 @@ const state = ref({
     userId: null,
     label: null,
   },
-  userList: []
+  userList: [],
+  AddSet: true,
+  pid: null
 })
-const { pagination, visibleQrCode, codeUrl, visibleSetMeal, userList, Form } = toRefs(state.value)
+const { pagination, visibleQrCode, codeUrl, visibleSetMeal, userList, Form, AddSet, pid } = toRefs(state.value)
 
 
 const { tableData, evChangePage, initData, reset } = tableFunction(pagination.value, PackageSchedule)
@@ -125,8 +134,8 @@ const unmount = async (record) => {
     title: `确定要${record.status == 1 ? '下架' : '上架'}吗?`,
     content: '',
     onOk: async () => {
-      let res = await PackageTakedown({id: record.id,status: record.status==1 ? 2:1,label:record.label,userId:record.userId})
-      if(res.code===200){
+      let res = await PackageTakedown({ id: record.id, status: record.status == 1 ? 2 : 1, label: record.label, userId: record.userId })
+      if (res.code === 200) {
         Message.success(`${record.status == 1 ? '下架' : '上架'}成功`)
         initData()
       }
@@ -134,6 +143,11 @@ const unmount = async (record) => {
   });
 }
 
+const SetUpPackage = (item) => {
+  pid.value = item.id
+  AddSet.value = false
+}
+
 onMounted(() => {
   initData()
   fetchCustomerList()

+ 103 - 8
src/views/tariffManagement/config.js

@@ -204,13 +204,10 @@ export const SetMealSearchForm = [
     value: "", // 双向绑定的值
   },
   {
-    type: "select",
+    type: "input",
     label: "所属客户",
-    field: "state",
-    options: [], // 默认空,后面会通过字典加载
-    dict: "userType",
+    field: "name",
     value: "", // 双向绑定的值
-    width: "200",
   },
   {
     type: "range-picker",
@@ -224,7 +221,10 @@ export const SetMealSearchForm = [
     type: "select",
     label: "状态",
     field: "state",
-    options: [], // 默认空,后面会通过字典加载
+    options: [
+      { label: "上架", value: 1 },
+      { label: "下架", value: 2 },
+    ], // 默认空,后面会通过字典加载
     dict: "userType",
     value: "", // 双向绑定的值
     width: "200",
@@ -273,7 +273,102 @@ export const columnsSetMeal = [
     title: "操作",
     align: "center",
     ellipsis: true,
-    slotName:'Controls',
-    fixed:'right'
+    slotName: 'Controls',
+    fixed: 'right'
   },
 ];
+
+
+export const columnsTarrit = [
+  {
+    title: "序号",
+    dataIndex: "index",
+    align: "center",
+    ellipsis: true,
+    render: ({ rowIndex }) => rowIndex + 1,
+  },
+  {
+    title: "套餐名称",
+    dataIndex: "label",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "所属套餐计划",
+    dataIndex: "terminalName",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "资费名称",
+    dataIndex: "trafficName",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "套餐类型",
+    dataIndex: "typeName",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "充值币种",
+    dataIndex: "currency",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "原价",
+    dataIndex: "oldPrice",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "成本",
+    dataIndex: "costPrice",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "售价(终端充值)",
+    dataIndex: "price",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "利润",
+    dataIndex: "profitPrice",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "流量成本结算方式",
+    dataIndex: "billingMethod",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "创建时间",
+    dataIndex: "createdAt",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "更新时间",
+    dataIndex: "updatedAt",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "状态",
+    slotName: "status",
+    align: "center",
+    ellipsis: true,
+  },
+  {
+    title: "操作",
+    align: "center",
+    slotName: 'options',
+    fixed: 'right'
+  },
+]

+ 3 - 13
src/views/tariffManagement/index.vue

@@ -19,9 +19,6 @@
         <!-- 修改 -->
         <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(2, record)"
           v-if="role.getRole == 1">编辑</a>
-        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="meal(record)"
-          v-if="role.getRole == 1">{{
-            $t('tariffManagement.SetMeal') }}</a>
         <!-- 删除 -->
         <a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
           @ok="handleDel(record.id)">
@@ -57,7 +54,6 @@
     </a-modal>
 
 
-    <Meal v-model:model-value="modealShow" :traffIds="ids" @submit="initData()" />
     <Add v-model:model-value="visible" :type-index="typeCurrent" ref="addDetaile" @submit="initData()"></Add>
   </div>
 </template>
@@ -69,7 +65,6 @@ import { columns, planColumns, trafficSearchFrom } from "./config";
 import { deleteTariff, tariffList, UpdateTariffName } from "@/api/path/tariffManagement.api"
 import { Getdictionary, tableFunction, filterDict } from '@/mixins/index.js'
 import { useSystemStore } from '@/store/modules/systemStore'
-import Meal from './Management/meal.vue'
 import Add from './Management/add.vue'
 import Search from '@/components/Search/index.vue'
 import { useI18n } from 'vue-i18n'
@@ -90,7 +85,6 @@ const state = ref({
   typeCurrent: null,
   sourceList: [],
   cycleist: [],
-  modealShow: false,
   planVisible: false,
   formData: {},
   selectedKeysPlan: [],
@@ -114,7 +108,6 @@ const {
   typeCurrent,
   sourceList,
   cycleist,
-  modealShow,
   planVisible,
   formData,
   selectedKeysPlan,
@@ -128,19 +121,16 @@ const addDetaile = ref(null)
 
 const processData = (data) => {
   return (data.records || []).map((item, index) => {
-    const sourceName = filterDict(sourceList.value, item.source)
-    const billingCycleName = filterDict(cycleist.value, item.billingCycle)
-    const billingMethodName = filterDict(methodList.value, item.billingMethod)
     delete item.children
     return {
       ...item,
-      sourceName,
+      sourceName:filterDict(sourceList.value, item.source),
       pricingName: item.billingMethod == 1 ? item.trafficBillingAmount + '/' + item.currency : item.pricing + '/' + item.currency,
-      billingCycleName,
+      billingCycleName:filterDict(cycleist.value, item.billingCycle),
       Activated: item.trafficBilling + item.trafficBillingType,
       status: "正常",
       bagSize: item.pricing + '/' + item.mrcAmount + '/' + item.networkAccessFee,
-      billingMethodName,
+      billingMethodName:filterDict(methodList.value, item.billingMethod),
       Number: index + 1
     }
   })