吴sir 4 月之前
父节点
当前提交
0e9da3658d

+ 4 - 1
src/i18n/zh/flowPool.js

@@ -46,4 +46,7 @@ export default {
     start_timeName:'请选择更新时间',
     ICCIDlabel:'ICCID',
     ICCIDName:'请选择ICCID',
-}
+    tariffName:'资费名称',
+    ActivatedName:'已激活/总卡数量',
+    HaveBeenUsedName:'已使用/总流量(G)',
+}

+ 6 - 4
src/i18n/zh/tariffManagement.js

@@ -2,7 +2,7 @@ export default {
     // 资费计划
     simDataPlanId: "流量包",
     label: "资费名称",
-    userId: "户",
+    userId: "户",
     source: "供应商名称",
     trafficType: "流量类型",
     billingType: "计费分类",//计费方式
@@ -14,7 +14,7 @@ export default {
 
     billingMethod: "计费方式",
     sourcePrice: "来源价格",
-    currency: "币种",
+    currency: "结算币种",
 
 
     id: '序号',
@@ -32,5 +32,7 @@ export default {
     FlowType: '流量类型',
     BillingType:'计费分类',
     ChargingCycle:'计费周期',
-    userName:'客户名称'
-}
+    userName:'客户名称',
+    MRCName:'MRC费(月租)',
+    networkName:'网络接入费'
+}

+ 3 - 0
src/views/flowPool/config.js

@@ -9,6 +9,9 @@ export const columns = [
     // { title: window.$t('flowPool.surplusFlow'), dataIndex: 'surplusFlow', align: 'center', width: 200 },
     // { title: window.$t('flowPool.exceededFlow'), dataIndex: 'exceededFlow', align: 'center', width: 200 },
     { title: window.$t('flowPool.source'), dataIndex: 'sourceName', align: 'center', width: 200 },
+    { title: window.$t('flowPool.tariffName'), dataIndex: 'sourceName', align: 'center', width: 200 },
+    { title: window.$t('flowPool.ActivatedName'), dataIndex: 'sourceName', align: 'center', width: 200 },
+    { title: window.$t('flowPool.HaveBeenUsedName'), dataIndex: 'sourceName', align: 'center', width: 200 },
     // { title: window.$t('flowPool.cardRariffName'), dataIndex: 'cardRariffName', align: 'center', width: 200 },
     // { title: window.$t('flowPool.cardNum'), dataIndex: 'cardNum', align: 'center', width: 200 },
     // { title: window.$t('flowPool.totalFlow'), dataIndex: 'totalFlow', align: 'center', width: 200 },

+ 2 - 2
src/views/system/dict/index.vue

@@ -153,12 +153,12 @@ const handleSubmit = async ({values, errors}) => {
     remark: formState.remark,
     id: typeCurrent.value == 1 ? undefined : dicId.value
   }
-  let res = await typeCurrent.value === 1 ? dictionaryAdd(submitData) : dictionaryUpdate(submitData)
+  let res =  typeCurrent.value === 1 ? await dictionaryAdd(submitData) : await dictionaryUpdate(submitData)
+  console.log(res)
   if (res.code === 200) {
     intData();
     resetForm();
   }
-
 }
 // 删除
 const deleteChange = (e) => {

+ 1 - 1
src/views/tariffManagement/config.js

@@ -8,7 +8,7 @@ export let columns = [
     // { title: window.$t('tariffManagement.billingType'), dataIndex: 'billingTypeName', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.billingCycle'), dataIndex: 'billingCycleName', align: 'center', width: 200 },
     // { title: window.$t('tariffManagement.bagSize'), dataIndex: 'bagSize', align: 'center', width: 200 },
-    { title: window.$t('tariffManagement.pricing'), dataIndex: 'pricing', align: 'center', width: 200 },
+    { title: window.$t('tariffManagement.pricing'), dataIndex: 'pricingName', align: 'center', width: 200 },
     // { title: window.$t('tariffManagement.billingMethod'), dataIndex: 'billing_method', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.settlementCycleLabel'), dataIndex: 'settlementCycle', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.feeStatus'), dataIndex: 'status', align: 'center', width: 200 },

+ 4 - 4
src/views/customer/NewCustomerForm.vue → src/views/tariffManagement/customer/NewCustomerForm.vue

@@ -116,7 +116,7 @@
             <a-input v-model="formData.invoiceTitle" :placeholder="$t('customer.enterInvoiceTitle')" :max-length="60"
                      show-word-limit/>
           </a-form-item>
-          <a-form-item field="invoice_type" :label="$t('customer.invoice_vatTextType')" required
+          <a-form-item field="invoiceType" :label="$t('customer.invoice_vatTextType')" required
                        validate-trigger="blur">
             <a-select v-model="formData.invoiceType" :style="{width:'100%'}"
                       :placeholder="$t('customer.invoice_vatTextTypeSelect')">
@@ -177,14 +177,14 @@
 import {ref, watch, onMounted} from 'vue';
 import {Message} from '@arco-design/web-vue';
 import {useI18n} from 'vue-i18n';
-import {useSystemStore} from '@/store/modules/systemStore'
+import {useSystemStore} from '@/store/modules/systemStore.js'
 import {dictionaryDetail} from '@/api/path/dict.js'
 import Upload from "@/components/upload/index.vue";
-import {systemFindRoleList} from "@/api/path/system.api";
+import {systemFindRoleList} from "@/api/path/system.api.js";
 import {addCustomer, updateCustomer} from "@/api/customer.js";
 const {t} = useI18n();
 const systemStore = useSystemStore()
-import { encryptByDES } from '@/utils/crypto'
+import { encryptByDES } from '@/utils/crypto.js'
 const props = defineProps({
   visible: Boolean,
   editMode: Boolean,

+ 2 - 2
src/views/customer/index.vue → src/views/tariffManagement/customer/index.vue

@@ -73,7 +73,7 @@ import {ref, reactive, computed, onMounted} from 'vue';
 import {Message} from '@arco-design/web-vue';
 import {useI18n} from 'vue-i18n';
 import NewCustomerForm from './NewCustomerForm.vue';
-import {getMessUserList, deleteMessUser} from '@/api/customer';
+import {getMessUserList, deleteMessUser} from '@/api/customer.js';
 
 const {t} = useI18n();
 
@@ -250,4 +250,4 @@ const getStatusText = (state) => {
 .customer-management .arco-table-th {
   white-space: nowrap;
 }
-</style>
+</style>

+ 54 - 29
src/views/tariffManagement/index.vue

@@ -72,7 +72,7 @@
 
     <!--资费 弹框 -->
     <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">
         <div class="formTitle">基本信息</div>
         <a-form-item :label="$t('tariffManagement.source')" field="source">
@@ -127,10 +127,21 @@
             <a-radio value="2">按月</a-radio>
           </a-radio-group>
         </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>
-              元
+              {{ formState.currency === '0' ? '' : '美金' }}
             </template>
           </a-input>
         </a-form-item>
@@ -149,11 +160,20 @@
             </template>
           </a-input>
         </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-button type="primary" html-type="submit" style="margin-right: 10px;">{{
               $t('form.Confirm')
@@ -221,15 +241,6 @@ const pagination = ref({
   current: 1,
 })
 
-
-const rowSelection = reactive({
-  type: 'checkbox',
-  showCheckedAll: true,
-  onlyCurrent: false,
-});
-const selectedKeys = ref([])
-
-
 const intData = async () => {
   const param = {
     current: pagination.value.current,
@@ -241,11 +252,10 @@ const intData = async () => {
     const sourceName = sourceList.value.find(val => val.value == item.source)?.label
     const billingCycleName = cycleist.value.find(val => val.value == item.billingCycle)?.label
     const pricingCurrty = currency.value.find(val => val.value == item.currency)?.label
-    console.log(currency.value)
     return {
       ...item,
       sourceName,
-      pricing:item.pricing+'/'+pricingCurrty,
+      pricingName:item.pricing!==''?item.pricing + '/' + pricingCurrty:'',
       billingCycleName,
       feeCode: "NR0" + (index + 1),
       status: "正常"
@@ -308,17 +318,27 @@ const formState = ref({
   // 计费周期(必填)
   "billingCycle": "",
   // 计费方式(必填)
-  "billingMethod": "",
+  "billingMethod": "1",
   // 结算周期(必填)
   "settlementCycle": "",
   // 价格(必填)
   "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',}],
   billingMethod: [{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) {
-    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.simDataPlanId = Number(formState.value.simDataPlanId)
     formState.value.userId = Number(formState.value.userId)
-    if (data.pricing) {
+    if (data.pricing!=='') {
       formState.value.pricing = data.pricing.match(/\d+/)[0] || ''
     }
     if (data.settlementCycle) {
@@ -547,4 +572,4 @@ onMounted(async () => {
   margin-right: 10px;
 
 }
-</style>
+</style>