Jelajahi Sumber

增加终端套餐管理

wxy 3 bulan lalu
induk
melakukan
029a2dc6f3

+ 41 - 0
src/views/SetMeal/config.js

@@ -0,0 +1,41 @@
+
+export const SetMealSearchForm = [
+    {
+      type: "input",
+      label: "套餐名称",
+      field: "label",
+      value: "", // 双向绑定的值
+    },
+    {
+      type: "input",
+      label: "套餐ID",
+      field: "label",
+      value: "", // 双向绑定的值
+    },
+    {
+      type: "select",
+      label: "所属客户",
+      field: "state",
+      options: [], // 默认空,后面会通过字典加载
+      dict: "userType",
+      value: "", // 双向绑定的值
+      width: "200",
+    },
+    {
+      type: "range-picker",
+      label: "创建时间",
+      field: "createdAt",
+      value: [], // 双向绑定的值
+      width: "300",
+      Custom: 'mode="month"', // 自定义值
+    },
+    {
+      type: "select",
+      label: "状态",
+      field: "state",
+      options: [], // 默认空,后面会通过字典加载
+      dict: "userType",
+      value: "", // 双向绑定的值
+      width: "200",
+    },
+  ]

+ 22 - 0
src/views/SetMeal/index.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>
+      <div class="search">
+          <Search :SearchForm="SetMealSearchForm"></Search>
+      </div>
+  
+      <div class="table">
+          
+      </div>
+    </div>
+  </template>
+  
+  <script setup>
+  import { ref, onMounted, toRefs } from 'vue';
+  import Search from '@/components/Search/index.vue'
+  import {SetMealSearchForm} from './config.js'
+  </script>
+  <style lang="less" scoped>
+  .search{
+      margin-top: 1rem;
+  }
+  </style>

+ 25 - 4
src/views/tariffManagement/Management/add.vue

@@ -69,17 +69,38 @@
             <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' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency }}
                     </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="MB">MB</a-option>
+                    <a-option value="GB">GB</a-option>
+                    <a-option value="KB">KB</a-option>
                 </a-select>
                 <a-input v-model="formState.trafficBillingAmount" v-if="formState.billingMethod == 1">
                     <template #append>
-                        {{ formState.currency === '0' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency }}
+                    </template>
+                </a-input>
+            </a-form-item>
+            <a-form-item label="原价" field="networkAccessFee">
+                <a-input v-model="formState.pricing" v-if="formState.billingMethod == 2">
+                    <template #append>
+                        {{ formState.currency }}
+                    </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="MB">MB</a-option>
+                    <a-option value="GB">GB</a-option>
+                    <a-option value="KB">KB</a-option>
+                </a-select>
+                <a-input v-model="formState.trafficBillingAmount" v-if="formState.billingMethod == 1">
+                    <template #append>
+                        {{ formState.currency }}
                     </template>
                 </a-input>
             </a-form-item>
@@ -89,14 +110,14 @@
             <a-form-item :label="$t('tariffManagement.MRCName')" field="mrcAmount">
                 <a-input v-model="formState.mrcAmount">
                     <template #append>
-                        {{ formState.currency === '0' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency }} 
                     </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' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency  }}
                     </template>
                 </a-input>
             </a-form-item>

+ 22 - 0
src/views/tariffManagement/SetMeal/index.vue

@@ -0,0 +1,22 @@
+<template>
+  <div>
+    <div class="search">
+        <Search :SearchForm="SetMealSearchForm"></Search>
+    </div>
+
+    <div class="table">
+        
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted, toRefs } from 'vue';
+import Search from '@/components/Search/index.vue'
+import {SetMealSearchForm} from '../config.js'
+</script>
+<style lang="less" scoped>
+.search{
+    margin-top: 1rem;
+}
+</style>

+ 42 - 0
src/views/tariffManagement/config.js

@@ -274,3 +274,45 @@ export const UserColumns = [
     fixed: "right",
   },
 ];
+
+
+export const SetMealSearchForm = [
+  {
+    type: "input",
+    label: "套餐名称",
+    field: "label",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "input",
+    label: "套餐ID",
+    field: "label",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "select",
+    label: "所属客户",
+    field: "state",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "userType",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+  {
+    type: "range-picker",
+    label: "创建时间",
+    field: "createdAt",
+    value: [], // 双向绑定的值
+    width: "300",
+    Custom: 'mode="month"', // 自定义值
+  },
+  {
+    type: "select",
+    label: "状态",
+    field: "state",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "userType",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+]